/* Studio Doctor Theme CSS */

:root {
    --bg-primary: #0B1121;
    --bg-surface: rgba(20, 30, 50, 0.55);
    --bg-card: rgba(20, 30, 50, 0.5);
    --text-primary: #f1f5f9;
    --text-muted: #94a3b8;
    --color-purple: #7C3AED;
    --color-blue: #3B82F6;
    --color-success: #10B981;
    --color-warning: #F59E0B;
    --color-danger: #EF4444;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.5;
    padding: 16px;
    min-height: 100vh;
}

.app {
    max-width: 1440px;
    margin: 0 auto;
    width: 100%;
}

/* Glass Effects */
.glass {
    background: var(--bg-surface);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-radius: 28px;
    border: 1px solid rgba(255, 255, 255, 0.04);
    box-shadow: 0 24px 48px -16px rgba(0, 0, 0, 0.7);
    padding: 24px;
    transition: all 0.2s ease;
}

.glass:hover {
    border-color: rgba(124, 58, 237, 0.2);
    box-shadow: 0 28px 56px -16px rgba(124, 58, 237, 0.12);
}

/* Typography */
.page-title {
    font-size: clamp(22px, 5vw, 32px);
    font-weight: 700;
    letter-spacing: -0.02em;
    color: white;
}

.page-sub {
    color: var(--text-muted);
    font-size: clamp(12px, 2vw, 15px);
}

/* Badges */
.badge-purple {
    background: rgba(124, 58, 237, 0.2);
    color: #a78bfa;
    padding: 4px 14px;
    border-radius: 100px;
    font-size: 12px;
    font-weight: 600;
}

.badge-blue {
    background: rgba(59, 130, 246, 0.18);
    color: #60a5fa;
    padding: 4px 14px;
    border-radius: 100px;
    font-size: 12px;
    font-weight: 600;
}

.badge-success {
    background: rgba(16, 185, 129, 0.18);
    color: #34d399;
    padding: 4px 14px;
    border-radius: 100px;
    font-size: 12px;
    font-weight: 600;
}

.badge-warning {
    background: rgba(245, 158, 11, 0.18);
    color: #fbbf24;
    padding: 4px 14px;
    border-radius: 100px;
    font-size: 12px;
    font-weight: 600;
}

.badge-danger {
    background: rgba(239, 68, 68, 0.18);
    color: #fca5a5;
    padding: 4px 14px;
    border-radius: 100px;
    font-size: 12px;
    font-weight: 600;
}

/* Navigation */
.top-nav {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px 16px;
    background: rgba(11, 17, 33, 0.8);
    backdrop-filter: blur(8px);
    border-radius: 40px;
    padding: 12px 20px;
    border: 1px solid rgba(255, 255, 255, 0.03);
    margin-bottom: 24px;
}

.logo-area {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.logo-icon {
    background: radial-gradient(circle at 30% 30%, #7C3AED, #3B82F6);
    width: 44px;
    height: 44px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: white;
    font-weight: 700;
    box-shadow: 0 8px 20px -6px rgba(124, 58, 237, 0.35);
    flex-shrink: 0;
}

.logo-text {
    font-size: clamp(18px, 3vw, 24px);
    font-weight: 700;
    letter-spacing: -0.02em;
    background: linear-gradient(135deg, #fff 50%, #a78bfa);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    white-space: nowrap;
}

.tagline {
    font-size: 11px;
    color: var(--text-muted);
    background: rgba(255,255,255,0.03);
    padding: 2px 14px;
    border-radius: 40px;
    border: 1px solid rgba(255,255,255,0.04);
    white-space: nowrap;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1 1 auto;
    justify-content: flex-end;
    min-width: 0;
}

.search-wrap {
    background: rgba(20, 30, 50, 0.7);
    border-radius: 40px;
    padding: 6px 16px;
    display: flex;
    align-items: center;
    gap: 10px;
    border: 1px solid rgba(255,255,255,0.04);
    flex: 0 1 240px;
    min-width: 120px;
    max-width: 300px;
    transition: all 0.3s ease;
}

.search-wrap:focus-within {
    border-color: rgba(124, 58, 237, 0.4);
    box-shadow: 0 0 0 2px rgba(124, 58, 237, 0.1);
}

.search-wrap i {
    color: #64748b;
    font-size: 14px;
    flex-shrink: 0;
}

.search-wrap input {
    background: transparent;
    border: none;
    color: white;
    font-size: 14px;
    padding: 6px 0;
    width: 100%;
    outline: none;
    min-width: 60px;
}

.search-wrap input::placeholder {
    color: #475569;
}

.user-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.bell-icon {
    color: #94a3b8;
    font-size: 20px;
    cursor: pointer;
    flex-shrink: 0;
    transition: color 0.2s ease;
    padding: 4px;
    border-radius: 50%;
}

.bell-icon:hover {
    color: #f1f5f9;
}

.bell-icon.active {
    color: #a78bfa;
}

.avatar-link {
    display: block;
    text-decoration: none;
    transition: transform 0.2s ease;
}

.avatar-link:hover {
    transform: scale(1.05);
}

.avatar-link .avatar {
    cursor: pointer;
}

.avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #7C3AED, #3B82F6);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 15px;
    color: white;
    border: 2px solid rgba(255,255,255,0.06);
    flex-shrink: 0;
    overflow: hidden;
    transition: border-color 0.2s ease;
}

.avatar:hover {
    border-color: rgba(124, 58, 237, 0.4);
}

.avatar img {
    border-radius: 50%;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Grid & Cards */
.main-grid {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.stats-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 14px;
}

.stat-card {
    background: var(--bg-card);
    border-radius: 20px;
    padding: 16px 18px;
    border: 1px solid rgba(255,255,255,0.02);
}

.stat-label {
    font-size: 13px;
    color: var(--text-muted);
    font-weight: 500;
}

.stat-number {
    font-size: clamp(24px, 4vw, 32px);
    font-weight: 700;
    color: white;
    letter-spacing: -0.02em;
}

.project-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.sd-asset-table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin-bottom: 10px;
}

.sd-asset-table-wrap table {
    width: 100%;
    min-width: 900px;
    border-collapse: collapse;
}

.sd-asset-table-wrap th,
.sd-asset-table-wrap td {
    padding: 12px 14px;
    white-space: nowrap;
    text-align: left;
}

.sd-asset-table-wrap td {
    min-width: 0;
}

.sd-asset-table-wrap td .waveform-player,
.sd-asset-table-wrap td .sd-asset-actions {
    justify-content: flex-start;
}

.sd-waveform-panel {
    width: 100%;
    max-width: 100%;
}

@media (max-width: 900px) {
    .sd-asset-table-wrap table {
        min-width: 760px;
    }
}

@media (max-width: 720px) {
    .sd-asset-table-wrap table {
        min-width: 620px;
    }
    .sd-asset-table-wrap th:nth-child(4),
    .sd-asset-table-wrap th:nth-child(5),
    .sd-asset-table-wrap td:nth-child(4),
    .sd-asset-table-wrap td:nth-child(5) {
        display: none;
    }
    .sd-asset-table-wrap td {
        white-space: normal;
    }
}

@media (max-width: 560px) {
    .sd-asset-table-wrap table {
        min-width: 520px;
    }
    .sd-asset-table-wrap th:nth-child(6),
    .sd-asset-table-wrap td:nth-child(6) {
        display: none;
    }
    .sd-asset-table-wrap th:nth-child(2),
    .sd-asset-table-wrap td:nth-child(2),
    .sd-asset-table-wrap th:nth-child(3),
    .sd-asset-table-wrap td:nth-child(3) {
        display: none;
    }
    .sd-asset-table-wrap .sd-asset-actions {
        display: flex;
        flex-direction: column;
        gap: 8px;
    }
    .sd-asset-table-wrap td {
        white-space: normal;
    }
    .sd-asset-table-wrap .waveform-player {
        width: 100%;
        gap: 8px;
    }
}

@media (max-width: 820px) {
    .project-grid,
    .project-grid.dashboard-grid,
    .project-grid.dashboard-secondary-grid,
    .workspace-grid {
        grid-template-columns: 1fr;
    }
    .project-grid.dashboard-grid,
    .workspace-grid {
        gap: 16px;
    }
    .project-grid.dashboard-secondary-grid,
    .workspace-details-grid {
        gap: 14px;
    }
}

.workspace-hero-panel {
    margin-top: 20px;
    padding: 24px;
    background: rgba(15,23,42,0.95);
    border-radius: 24px;
    border: 1px solid rgba(148,163,184,0.12);
}

.workspace-hero {
    display: grid;
    grid-template-columns: 1.3fr 1fr;
    gap: 24px;
    align-items: stretch;
}

.workspace-hero-copy {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.workspace-hero-title {
    margin: 0;
    font-size: clamp(1.75rem, 3vw, 2.4rem);
    line-height: 1.05;
    color: #f8fafc;
}

.workspace-hero-copy-text {
    color: #cbd5e1;
    line-height: 1.75;
    max-width: 100%;
}

.workspace-hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.workspace-hero-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    color: #94a3b8;
    font-size: 14px;
}

.workspace-hero-player {
    min-width: 0;
}

.workspace-section {
    margin-top: 20px;
}

.workspace-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.workspace-details-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
}

.workspace-approval-block,
.workspace-block {
    background: rgba(255,255,255,0.06);
    border-radius: 18px;
    padding: 18px;
    margin-top: 16px;
}

.workspace-block h4 {
    margin-bottom: 10px;
    font-size: 16px;
}

.workspace-block ul {
    margin: 0;
    padding-left: 18px;
    color: #94a3b8;
}

.workspace-block li {
    margin-bottom: 10px;
}

.workspace-section .text-muted {
    margin-top: 8px;
}

@media (max-width: 900px) {
    .workspace-hero {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 720px) {
    .workspace-hero-panel {
        padding: 18px;
    }
    .workspace-hero-actions {
        flex-direction: column;
        align-items: stretch;
    }
    .workspace-hero-stats {
        flex-direction: column;
    }
}

@media (max-width: 560px) {
    .workspace-grid,
    .workspace-details-grid {
        gap: 14px;
    }
    .workspace-hero-panel {
        padding: 16px;
    }
}

.project-card {
    background: var(--bg-card);
    border-radius: 20px;
    padding: 18px;
    border: 1px solid rgba(255,255,255,0.03);
    transition: 0.2s;
    margin-top: 6px;
}

.project-card:hover {
    border-color: rgba(124, 58, 237, 0.2);
    transform: translateY(-2px);
}

.project-title {
    font-weight: 600;
    font-size: 16px;
    color: white;
}

.project-meta {
    font-size: 13px;
    color: var(--text-muted);
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 4px;
}

.progress-bar {
    height: 4px;
    background: #1E293B;
    border-radius: 8px;
    flex: 1;
    min-width: 60px;
}

.progress-fill {
    height: 4px;
    background: linear-gradient(90deg, #7C3AED, #3B82F6);
    border-radius: 8px;
}

/* Asset upload dropzone and progress */
.sd-asset-dropzone {
    border: 2px dashed rgba(148,163,184,0.12);
    padding: 18px;
    border-radius: 10px;
    text-align: center;
    color: #94a3b8;
    background: rgba(2,6,23,0.4);
}
.sd-asset-dropzone.sd-drag-over {
    border-color: #7C3AED;
    background: rgba(124,58,237,0.06);
}
.sd-upload-batch { margin-top:12px; }
.sd-upload-item { margin-bottom:8px; }
.sd-upload-progress { width:100%;height:8px;background:#0b1622;border-radius:6px;overflow:hidden;margin-top:6px }
.sd-upload-progress-fill { height:8px;background:linear-gradient(90deg,#7C3AED,#3B82F6);width:0% }
.sd-upload-status { font-size:12px;color:#94a3b8;margin-top:6px }

/* Buttons */
.btn-primary {
    background: linear-gradient(135deg, #7C3AED, #3B82F6);
    border: none;
    color: white;
    padding: 10px 20px;
    border-radius: 40px;
    font-weight: 600;
    font-size: clamp(13px, 1.5vw, 15px);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: 0.15s;
    box-shadow: 0 8px 20px -8px rgba(124, 58, 237, 0.3);
    text-decoration: none;
}

.btn-primary:hover {
    transform: scale(1.02);
    opacity: 0.9;
    color: white;
}

.btn-outline {
    background: transparent;
    border: 1px solid rgba(255,255,255,0.08);
    color: #e2e8f0;
    padding: 8px 16px;
    border-radius: 40px;
    font-weight: 500;
    font-size: clamp(12px, 1.3vw, 14px);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: 0.15s;
    text-decoration: none;
    cursor: pointer;
}

.btn-outline:hover {
    background: rgba(255,255,255,0.04);
    color: white;
}

/* Waveform Player */
.waveform-player {
    background: rgba(11, 17, 33, 0.8);
    border-radius: 60px;
    padding: 12px 18px;
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255,255,255,0.03);
}

.sd-waveform-panel {
    background: rgba(15, 23, 42, 0.95);
    border: 1px solid rgba(148, 163, 184, 0.12);
    border-radius: 22px;
    padding: 16px;
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.25);
}

.sd-wf-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.sd-wf-meta {
    color: #94a3b8;
    font-size: 0.9rem;
}

.sd-wf-canvas {
    width: 100%;
    min-height: 120px;
    margin-bottom: 16px;
}

.sd-wf-controls {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(90px, auto));
    gap: 10px;
    align-items: center;
    margin-bottom: 12px;
}

.sd-wf-volume-group,
.sd-wf-speed-group {
    display: flex;
    align-items: center;
    gap: 6px;
}

.sd-wf-volume {
    width: 100px;
}

.sd-wf-speed-label {
    color: #cbd5e1;
    font-size: 0.95rem;
}

.sd-wf-info {
    display: flex;
    justify-content: flex-start;
    gap: 8px;
    align-items: center;
    margin-bottom: 16px;
    color: #cbd5e1;
}

.sd-wf-comments {
    display: grid;
    gap: 10px;
}

.sd-wf-comment-list {
    max-height: 220px;
    overflow-y: auto;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 14px;
    padding: 10px;
    background: rgba(15, 23, 42, 0.8);
}

.sd-wf-comment-row {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 10px;
    padding: 10px;
    border-radius: 12px;
    cursor: pointer;
    transition: background 0.2s ease;
}

.sd-wf-comment-row:hover,
.sd-wf-comment-row:focus {
    background: rgba(79, 70, 229, 0.15);
    outline: none;
}

.sd-wf-comment-time {
    font-weight: 600;
    color: #e2e8f0;
}

.sd-wf-comment-text {
    color: #cbd5e1;
}

.sd-wf-comment-empty {
    color: #94a3b8;
    padding: 12px;
}

.sd-wf-comment-form {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 10px;
}

.sd-wf-comment-input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 12px;
    background: rgba(15, 23, 42, 0.8);
    color: #f8fafc;
}

.sd-wf-comment-input::placeholder {
    color: #94a3b8;
}

.sd-wf-current-time,
.sd-wf-duration {
    font-family: monospace;
}

.waveform {
    display: flex;
    align-items: center;
    gap: 3px;
    flex: 1 1 120px;
    min-width: 80px;
    overflow-x: auto;
    padding: 4px 0;
}

.wave-bar {
    width: 4px;
    height: 28px;
    background: #334155;
    border-radius: 4px;
    transition: 0.1s;
    flex-shrink: 0;
}

.wave-bar.active {
    background: #7C3AED;
    height: 40px;
}

.wave-bar.mid {
    height: 34px;
    background: #475569;
}

.sd-asset-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.sd-asset-comment-form {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 8px;
}

.sd-asset-comment-input {
    flex: 1 1 220px;
    min-width: 180px;
    padding: 10px 12px;
    border-radius: 12px;
    border: 1px solid rgba(148, 165, 205, 0.15);
    background: rgba(15, 23, 42, 0.95);
    color: #f8fafc;
    outline: none;
}

.sd-audio-play-toggle,
.sd-asset-comment-submit,
.sd-asset-approve {
    white-space: nowrap;
}

/* Kanban */
.kanban-scroll {
    display: flex;
    flex-wrap: nowrap;
    gap: 14px;
    overflow-x: auto;
    padding: 4px 2px 12px 2px;
    -webkit-overflow-scrolling: touch;
}

.kanban-col {
    background: rgba(20,30,50,0.3);
    border-radius: 20px;
    padding: 14px;
    min-width: 160px;
    flex: 0 0 auto;
}

.kanban-card {
    background: #1E293B;
    border-radius: 16px;
    padding: 12px 14px;
    margin-bottom: 10px;
    border-left: 3px solid #7C3AED;
}

/* Utility */
.flex { display: flex; }
.items-center { align-items: center; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.gap-4 { gap: 16px; }
.mt-2 { margin-top: 8px; }
.mt-3 { margin-top: 12px; }
.mt-4 { margin-top: 16px; }
.w-full { width: 100%; }
.justify-between { justify-content: space-between; }
.text-muted { color: var(--text-muted); }
.text-sm { font-size: 13px; }
.flex-wrap { flex-wrap: wrap; }

/* Responsive */
@media (max-width: 768px) {
    body { padding: 10px; }
    
    .top-nav {
        padding: 12px 14px;
        border-radius: 28px;
        flex-direction: column;
        align-items: stretch;
    }
    
    .logo-area {
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .nav-actions {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
        width: 100%;
    }
    
    .search-wrap {
        flex: 1 1 auto;
        max-width: 100%;
        width: 100%;
    }
    
    .user-actions {
        justify-content: center;
        padding-top: 4px;
        border-top: 1px solid rgba(255,255,255,0.04);
    }
    
    .glass { padding: 18px; border-radius: 20px; }
    .stats-row { grid-template-columns: 1fr 1fr; }
    .stat-card { padding: 12px 14px; }
    .waveform-player { border-radius: 32px; padding: 10px 14px; }
    
    .tagline {
        display: none;
    }
}

@media (max-width: 480px) {
    .stats-row { grid-template-columns: 1fr 1fr; gap: 8px; }
    .project-card { padding: 14px; }
    .btn-primary, .btn-outline { padding: 6px 14px; font-size: 12px; }
    
    .logo-text {
        font-size: 16px;
    }
    
    .logo-icon {
        width: 36px;
        height: 36px;
        font-size: 16px;
    }
    
    .avatar {
        width: 32px;
        height: 32px;
        font-size: 12px;
    }
}

/* Scrollbar styling */
.kanban-scroll::-webkit-scrollbar {
    height: 4px;
}

.kanban-scroll::-webkit-scrollbar-track {
    background: rgba(255,255,255,0.02);
    border-radius: 8px;
}

.kanban-scroll::-webkit-scrollbar-thumb {
    background: #7C3AED;
    border-radius: 8px;
}

/* Notification badge */
.bell-icon {
    position: relative;
}

.bell-icon.has-notification::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 8px;
    height: 8px;
    background: #EF4444;
    border-radius: 50%;
    border: 2px solid #0B1121;
}

/* Login page specific */
.login-container .glass {
    padding: 40px;
}

.login-container input[type="text"],
.login-container input[type="password"] {
    background: rgba(11, 17, 33, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 40px;
    padding: 14px 20px;
    color: white;
    font-size: 14px;
    outline: none;
    width: 100%;
    transition: border-color 0.2s ease;
}

.login-container input[type="text"]:focus,
.login-container input[type="password"]:focus {
    border-color: #7C3AED;
    box-shadow: 0 0 0 2px rgba(124, 58, 237, 0.2);
}

.login-container .button-primary {
    width: 100%;
    background: linear-gradient(135deg, #7C3AED, #3B82F6);
    border: none;
    border-radius: 40px;
    padding: 14px 24px;
    color: white;
    font-weight: 600;
    font-size: 16px;
    cursor: pointer;
    box-shadow: 0 8px 20px -8px rgba(124, 58, 237, 0.3);
    transition: all 0.15s ease;
}

.login-container .button-primary:hover {
    transform: scale(1.02);
    opacity: 0.9;
}

/* Alert messages */
.alert-success {
    background: rgba(16,185,129,0.15);
    border: 1px solid rgba(16,185,129,0.2);
    border-radius: 12px;
    padding: 14px 20px;
    color: #34d399;
}

.alert-error {
    background: rgba(239,68,68,0.15);
    border: 1px solid rgba(239,68,68,0.2);
    border-radius: 12px;
    padding: 14px 20px;
    color: #fca5a5;
}

/* Client profile image hover effect */
.client-profile .profile-image-wrapper {
    transition: transform 0.2s ease;
}

.client-profile .profile-image-wrapper:hover {
    transform: scale(1.02);
}

/* Full width helper */
.full-width {
    grid-column: 1 / -1 !important;
}