/* ========================================
   Slate Records - Смарт ссылки
   Нормальный дизайн, без ИИ
======================================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background: #0a0a0f;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
    color: #e0e0e0;
    line-height: 1.5;
}

/* ========== ДАШБОРД ЛАЙАУТ ========== */
.dashboard {
    display: flex;
    min-height: 100vh;
}

/* Сайдбар */
.sidebar {
    width: 260px;
    background: #111116;
    border-right: 1px solid #1e1e26;
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
}

.sidebar-header {
    padding: 24px 20px;
    border-bottom: 1px solid #1e1e26;
    margin-bottom: 20px;
}

.sidebar-header .logo {
    font-size: 20px;
    font-weight: 700;
    color: #fff;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 10px;
}

.sidebar-header .logo span {
    background: linear-gradient(135deg, #7c3aed, #db2777);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.nav-menu {
    flex: 1;
    padding: 0 12px;
}

.nav-menu a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    color: #9ca3af;
    text-decoration: none;
    border-radius: 12px;
    margin-bottom: 6px;
    transition: all 0.2s;
}

.nav-menu a svg {
    width: 20px;
    height: 20px;
}

.nav-menu a:hover {
    background: #1a1a24;
    color: #e0e0e0;
}

.nav-menu a.active {
    background: #1e1e2e;
    color: #7c3aed;
}

.sidebar-footer {
    padding: 20px;
    border-top: 1px solid #1e1e26;
    font-size: 12px;
    color: #6b7280;
}

/* Основной контент */
.main-content {
    flex: 1;
    margin-left: 260px;
    padding: 24px 32px;
}

/* Хедер */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 28px;
    flex-wrap: wrap;
    gap: 16px;
}

.page-header h1 {
    font-size: 28px;
    font-weight: 600;
    color: #fff;
}

.page-header h1 small {
    font-size: 14px;
    font-weight: 400;
    color: #6b7280;
    margin-left: 8px;
}

/* Кнопки */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
    text-decoration: none;
}

.btn-primary {
    background: #7c3aed;
    color: white;
}

.btn-primary:hover {
    background: #6d28d9;
    transform: translateY(-1px);
}

.btn-outline {
    background: transparent;
    border: 1px solid #2a2a35;
    color: #d4d4d8;
}

.btn-outline:hover {
    background: #1a1a24;
    border-color: #3a3a45;
}

.btn-danger {
    background: transparent;
    color: #f43f5e;
}

.btn-danger:hover {
    background: rgba(244, 63, 94, 0.1);
}

/* Карточки со ссылками */
.links-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.link-card {
    background: #111116;
    border: 1px solid #1e1e26;
    border-radius: 16px;
    padding: 20px;
    transition: all 0.2s;
}

.link-card:hover {
    border-color: #2a2a35;
    transform: translateY(-2px);
}

.link-card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.link-card-icon {
    width: 48px;
    height: 48px;
    background: #1a1a24;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

.link-card-info {
    flex: 1;
}

.link-card-info h3 {
    font-size: 16px;
    font-weight: 600;
    color: #fff;
    margin-bottom: 4px;
}

.link-card-info .artist {
    font-size: 13px;
    color: #9ca3af;
}

.link-card-stats {
    display: flex;
    gap: 16px;
    padding: 12px 0;
    border-top: 1px solid #1a1a24;
    border-bottom: 1px solid #1a1a24;
    margin-bottom: 12px;
}

.stat {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: #9ca3af;
}

.stat svg {
    width: 16px;
    height: 16px;
    opacity: 0.7;
}

.link-card-url {
    font-size: 12px;
    color: #6b7280;
    margin-bottom: 12px;
    word-break: break-all;
}

.link-card-url a {
    color: #7c3aed;
    text-decoration: none;
}

.link-card-actions {
    display: flex;
    gap: 12px;
}

.link-card-actions .btn {
    flex: 1;
    justify-content: center;
    padding: 8px 12px;
    font-size: 13px;
}

/* ========== СТРАНИЦА СОЗДАНИЯ ========== */
.create-container {
    max-width: 800px;
    margin: 0 auto;
}

.create-card {
    background: #111116;
    border: 1px solid #1e1e26;
    border-radius: 24px;
    overflow: hidden;
}

.form-section {
    padding: 24px;
    border-bottom: 1px solid #1a1a24;
}

.form-section:last-child {
    border-bottom: none;
}

.form-section-title {
    font-size: 18px;
    font-weight: 600;
    color: #fff;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: #9ca3af;
    margin-bottom: 8px;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px 14px;
    background: #0a0a0f;
    border: 1px solid #2a2a35;
    border-radius: 12px;
    font-size: 14px;
    color: #fff;
    transition: all 0.2s;
    font-family: inherit;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #7c3aed;
    background: #0f0f14;
}

.form-group textarea {
    resize: vertical;
    min-height: 80px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

/* UPC поиск */
.upc-group {
    background: #1a1a24;
    border-radius: 16px;
    padding: 16px;
    margin-bottom: 24px;
}

.upc-search {
    display: flex;
    gap: 12px;
}

.upc-search input {
    flex: 1;
}

.upc-search button {
    padding: 0 24px;
    background: #2a2a35;
    border: 1px solid #3a3a45;
    border-radius: 12px;
    color: #fff;
    cursor: pointer;
}

.upc-search button:hover {
    background: #3a3a45;
}

/* Блок ссылок */
.services-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.service-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
}

.service-icon {
    width: 40px;
    text-align: center;
    font-size: 20px;
}

.service-name {
    width: 110px;
    font-size: 13px;
    font-weight: 500;
}

.service-input {
    flex: 1;
}

.service-input input {
    width: 100%;
    padding: 10px 12px;
    background: #0a0a0f;
    border: 1px solid #2a2a35;
    border-radius: 10px;
    font-size: 13px;
    color: #fff;
}

.service-input input:focus {
    border-color: #7c3aed;
    outline: none;
}

.service-badge {
    font-size: 11px;
    padding: 4px 8px;
    border-radius: 20px;
    background: #1a1a24;
    color: #6b7280;
    white-space: nowrap;
}

.service-badge.filled {
    background: rgba(124, 58, 237, 0.15);
    color: #7c3aed;
}

/* Обложка */
.cover-row {
    display: flex;
    gap: 20px;
    align-items: flex-start;
    flex-wrap: wrap;
}

.cover-preview {
    width: 100px;
    height: 100px;
    background: #0a0a0f;
    border: 1px solid #2a2a35;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.cover-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cover-placeholder {
    text-align: center;
    color: #6b7280;
    font-size: 12px;
}

.cover-upload-btn {
    flex: 1;
    background: #1a1a24;
    border: 1px dashed #3a3a45;
    border-radius: 16px;
    padding: 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
}

.cover-upload-btn:hover {
    background: #1e1e2e;
    border-color: #7c3aed;
}

.form-actions {
    display: flex;
    gap: 16px;
    justify-content: flex-end;
    padding: 20px 24px;
    background: #0a0a0f;
    border-top: 1px solid #1a1a24;
}

/* Пустое состояние */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    background: #111116;
    border: 1px solid #1e1e26;
    border-radius: 16px;
}

.empty-state svg {
    width: 64px;
    height: 64px;
    margin-bottom: 16px;
    opacity: 0.3;
}

.empty-state h3 {
    font-size: 18px;
    font-weight: 500;
    margin-bottom: 8px;
}

.empty-state p {
    color: #6b7280;
    margin-bottom: 20px;
}

/* Алерты */
.alert {
    padding: 14px 18px;
    border-radius: 12px;
    margin-bottom: 20px;
    font-size: 14px;
}

.alert-success {
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid #22c55e;
    color: #22c55e;
}

.alert-error {
    background: rgba(244, 63, 94, 0.1);
    border: 1px solid #f43f5e;
    color: #f43f5e;
}

/* Копирование */
.copy-success {
    position: fixed;
    bottom: 24px;
    right: 24px;
    background: #22c55e;
    color: white;
    padding: 10px 20px;
    border-radius: 10px;
    font-size: 13px;
    animation: fadeOut 2s forwards;
    z-index: 1000;
}

@keyframes fadeOut {
    0% { opacity: 1; }
    70% { opacity: 1; }
    100% { opacity: 0; visibility: hidden; }
}

/* Адаптив */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
        position: fixed;
        z-index: 100;
        transition: transform 0.3s;
    }
    
    .sidebar.open {
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: 0;
        padding: 16px;
    }
    
    .form-row {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .links-grid {
        grid-template-columns: 1fr;
    }
    
    .service-row {
        flex-wrap: wrap;
    }
    
    .service-name {
        width: 100%;
    }
}