/* ============================================
   DIS — Design System v2
   Premium Dark Theme · Warm Accent
   ============================================ */

/* --- RESET --- */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* --- DESIGN TOKENS --- */
:root {
    /* Palette: Deep Navy + Warm Amber */
    --bg-primary: #0a0c10;
    --bg-secondary: #12151c;
    --bg-card: #171b24;
    --bg-elevated: #1d2230;
    --bg-hover: #232838;
    --border-subtle: rgba(255, 255, 255, 0.06);
    --border-default: rgba(255, 255, 255, 0.1);
    --border-accent: rgba(232, 170, 66, 0.3);

    /* Accent: Warm amber/gold */
    --accent: #e8aa42;
    --accent-hover: #d49a38;
    --accent-soft: rgba(232, 170, 66, 0.12);
    --accent-glow: rgba(232, 170, 66, 0.25);

    /* Text */
    --text-primary: #eaedf3;
    --text-secondary: #8a90a0;
    --text-tertiary: #555b6e;
    --text-inverse: #0a0c10;

    /* Status */
    --success: #3ecf8e;
    --warning: #e8aa42;
    --danger: #e54d5e;
    --info: #4da6e8;

    /* Typography */
    --font-display: 'Space Grotesk', system-ui, sans-serif;
    --font-body: 'DM Sans', system-ui, sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', monospace;

    /* Spacing scale */
    --space-xs: 4px;
    --space-sm: 8px;
    --space-md: 16px;
    --space-lg: 24px;
    --space-xl: 32px;
    --space-2xl: 48px;
    --space-3xl: 64px;

    /* Radius */
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 14px;
    --radius-xl: 20px;

    /* Shadow */
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.25);
    --shadow-lg: 0 8px 30px rgba(0, 0, 0, 0.35);
    --shadow-glow: 0 0 20px var(--accent-glow);
}

/* --- BASE --- */
body {
    background: var(--bg-primary);
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 15px;
    line-height: 1.6;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Subtle noise texture overlay */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.02'/%3E%3C/svg%3E");
    pointer-events: none;
    z-index: 0;
}

body>* {
    position: relative;
    z-index: 1;
}

h1,
h2,
h3,
h4 {
    font-family: var(--font-display);
    font-weight: 600;
    letter-spacing: -0.02em;
    line-height: 1.2;
    color: var(--text-primary);
}

h1 {
    font-size: 2.25rem;
}

h2 {
    font-size: 1.5rem;
}

h3 {
    font-size: 1.2rem;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.2s;
}

.hidden {
    display: none !important;
}

/* --- NAVBAR --- */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 var(--space-xl);
    height: 60px;
    background: rgba(10, 12, 16, 0.85);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border-subtle);
    position: sticky;
    top: 0;
    z-index: 100;
}

.logo {
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    color: var(--accent);
}

.nav-links {
    display: flex;
    gap: var(--space-xs);
    list-style: none;
}

.nav-links a {
    display: block;
    padding: 6px 14px;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-secondary);
    border-radius: var(--radius-sm);
    transition: color 0.2s, background 0.2s;
}

.nav-links a:hover {
    color: var(--text-primary);
    background: var(--bg-hover);
}

.nav-links a.active {
    color: var(--accent);
    background: var(--accent-soft);
}

.btn-login {
    font-size: 0.85rem;
    font-weight: 600;
    padding: 7px 18px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-default);
    color: var(--text-secondary);
    transition: all 0.2s;
}

.btn-login:hover {
    color: var(--text-primary);
    border-color: var(--text-secondary);
}

/* --- BUTTONS --- */
.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    background: var(--accent);
    color: var(--text-inverse);
    border: none;
    padding: 10px 22px;
    font-size: 0.9rem;
    font-family: var(--font-body);
    font-weight: 600;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
    background: var(--accent-hover);
    box-shadow: var(--shadow-glow);
    transform: translateY(-1px);
}

.btn-primary:disabled {
    background: var(--bg-elevated);
    color: var(--text-tertiary);
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
}

.btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    background: transparent;
    border: 1px solid var(--border-default);
    color: var(--text-secondary);
    padding: 10px 22px;
    font-size: 0.9rem;
    font-family: var(--font-body);
    font-weight: 500;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s;
}

.btn-secondary:hover {
    border-color: var(--text-secondary);
    color: var(--text-primary);
    background: var(--bg-hover);
}

.btn-link {
    background: none;
    border: none;
    color: var(--accent);
    cursor: pointer;
    font-weight: 500;
    font-size: 0.85rem;
    font-family: var(--font-body);
    transition: opacity 0.2s;
}

.btn-link:hover {
    opacity: 0.8;
}

.full-width {
    width: 100%;
}

/* --- LAYOUT --- */
main {
    padding: var(--space-2xl) var(--space-xl);
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: calc(100vh - 60px);
}

/* --- LANDING / HERO --- */
.hero {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    min-height: 70vh;
    max-width: 640px;
}

.hero h1 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: var(--space-md);
    letter-spacing: -0.03em;
}

.hero h1 .accent {
    color: var(--accent);
}

.hero p {
    font-size: 1.1rem;
    color: var(--text-secondary);
    max-width: 480px;
    margin-bottom: var(--space-xl);
    line-height: 1.7;
}

.hero-actions {
    display: flex;
    gap: var(--space-md);
    flex-wrap: wrap;
    justify-content: center;
}

/* --- CARDS --- */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    transition: border-color 0.25s, box-shadow 0.25s;
}

.card:hover {
    border-color: var(--border-default);
    box-shadow: var(--shadow-md);
}

/* --- AUTH PAGE --- */
.auth-body {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: var(--space-xl);
}

.auth-container {
    width: 100%;
    max-width: 380px;
}

.auth-brand {
    text-align: center;
    margin-bottom: var(--space-2xl);
}

.auth-brand .logo {
    font-size: 1.8rem;
    margin-bottom: var(--space-sm);
}

.auth-brand h2 {
    font-size: 1.4rem;
    margin-bottom: var(--space-xs);
}

.auth-brand p {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.auth-card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-xl);
    padding: var(--space-xl);
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-group label {
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.form-group input,
.form-group textarea,
.form-group select {
    padding: 11px 14px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 0.95rem;
    font-family: var(--font-body);
    transition: border-color 0.2s, box-shadow 0.2s;
    outline: none;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 2px var(--accent-soft);
}

.form-group input::placeholder {
    color: var(--text-tertiary);
}

.auth-message {
    padding: 10px 14px;
    border-radius: var(--radius-md);
    font-size: 0.88rem;
    text-align: center;
}

.auth-message.error {
    background: rgba(229, 77, 94, 0.1);
    color: var(--danger);
    border: 1px solid rgba(229, 77, 94, 0.2);
}

.auth-message.success {
    background: rgba(62, 207, 142, 0.1);
    color: var(--success);
    border: 1px solid rgba(62, 207, 142, 0.2);
}

.auth-footer {
    text-align: center;
    margin-top: var(--space-lg);
    font-size: 0.88rem;
    color: var(--text-tertiary);
}

.auth-divider {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    margin: var(--space-lg) 0;
    color: var(--text-tertiary);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border-subtle);
}

.btn-google {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    width: 100%;
    padding: 11px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-family: var(--font-body);
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-google:hover {
    background: var(--bg-hover);
    border-color: var(--text-tertiary);
    color: var(--text-primary);
}

/* --- ANALYSIS PAGE --- */
.analysis-container {
    max-width: 960px;
    margin: 0 auto;
    width: 100%;
}

.analysis-header {
    text-align: center;
    margin-bottom: var(--space-2xl);
}

.analysis-header p {
    color: var(--text-secondary);
    margin-top: var(--space-sm);
}

/* Drop Zone */
.drop-zone {
    border: 2px dashed var(--border-default);
    border-radius: var(--radius-xl);
    padding: var(--space-3xl) var(--space-xl);
    text-align: center;
    cursor: pointer;
    margin-bottom: var(--space-2xl);
    width: 100%;
    max-width: 580px;
    background: var(--bg-card);
    transition: border-color 0.3s, background 0.3s;
}

.drop-zone:hover {
    border-color: var(--accent);
    background: var(--bg-elevated);
}

.drop-zone.highlight {
    background: var(--accent-soft);
    border-color: var(--accent);
}

.drop-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-md);
}

.icon-upload {
    stroke: var(--text-tertiary);
    transition: stroke 0.3s;
}

.drop-zone:hover .icon-upload {
    stroke: var(--accent);
}

.drop-content p {
    color: var(--text-secondary);
}

.sub-text {
    font-size: 0.82rem;
    color: var(--text-tertiary);
}

.file-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-lg);
}

#filename-display {
    font-family: var(--font-mono);
    font-size: 0.9rem;
    color: var(--accent);
    background: var(--accent-soft);
    padding: 6px 14px;
    border-radius: var(--radius-sm);
}

/* Genre Selector */
.genre-selector {
    width: 100%;
    max-width: 360px;
    text-align: left;
}

.genre-selector label {
    display: block;
    margin-bottom: 6px;
    color: var(--text-secondary);
    font-size: 0.82rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.genre-selector select {
    width: 100%;
    padding: 12px 40px 12px 16px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 0.95rem;
    font-family: var(--font-body);
    cursor: pointer;
    transition: border-color 0.25s, box-shadow 0.25s, background 0.25s;
    outline: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23d4a843' d='M1.41 0L6 4.58 10.59 0 12 1.41l-6 6-6-6z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    background-size: 12px 8px;
}

.genre-selector select:hover {
    border-color: rgba(212, 168, 67, 0.4);
    background-color: rgba(255, 255, 255, 0.03);
}

.genre-selector select:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 2px var(--accent-soft);
}

.genre-selector select option,
.genre-selector select optgroup {
    background: var(--bg-card);
    color: var(--text-primary);
    font-family: var(--font-body);
}

/* Results */
.results-section {
    width: 100%;
    animation: fadeUp 0.4s ease-out;
}

.section-title {
    font-size: 1.3rem;
    margin-bottom: var(--space-xl);
    text-align: center;
    color: var(--text-secondary);
    font-weight: 500;
}

.analysis-grid-container {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2xl);
    justify-content: center;
    align-items: flex-start;
    margin-bottom: var(--space-2xl);
}

/* Score Circle */
.score-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 220px;
}

.score-circle {
    position: relative;
    width: 200px;
    height: 200px;
}

.progress-ring__circle {
    transition: stroke-dashoffset 1.5s ease-out, stroke 0.3s;
    transform: rotate(-90deg);
    transform-origin: 50% 50%;
    stroke-dasharray: 565;
    stroke-dashoffset: 565;
    fill: var(--bg-secondary);
}

.score-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-family: var(--font-display);
    font-size: 3.2rem;
    font-weight: 700;
    color: var(--text-primary);
}

.score-status {
    margin-top: var(--space-md);
    font-family: var(--font-display);
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.stroke-red {
    stroke: var(--danger);
}

.stroke-yellow {
    stroke: var(--warning);
}

.stroke-green {
    stroke: var(--success);
}

.status-red {
    color: var(--danger);
}

.status-yellow {
    color: var(--warning);
}

.status-green {
    color: var(--success);
}

/* Metric Cards */
.metrics-container {
    flex: 1;
    min-width: 300px;
    max-width: 520px;
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.metric-card-row {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: var(--space-md);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--space-md);
}

.metric-icon {
    font-size: 1.3rem;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-elevated);
    border-radius: var(--radius-sm);
}

.metric-details {
    flex: 1;
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.metric-label {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.metric-value-text {
    font-family: var(--font-mono);
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
}

.metric-bar-bg {
    width: 100%;
    height: 4px;
    background: var(--bg-elevated);
    border-radius: 2px;
    overflow: hidden;
}

.metric-bar-fill {
    height: 100%;
    width: 0%;
    border-radius: 2px;
    transition: width 1s ease-out, background-color 0.3s;
}

/* Tonal Balance 4-band visualization */
.tonal-balance-card .metric-details {
    flex-direction: column;
    align-items: stretch;
}

.tonal-balance-bars {
    margin-top: var(--space-sm);
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.tonal-band-row {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.tonal-band-label {
    font-size: 0.7rem;
    font-weight: 500;
    color: var(--text-secondary);
    width: 52px;
    flex-shrink: 0;
    text-align: right;
}

.tonal-band-bar-bg {
    flex: 1;
    height: 4px;
    background: var(--bg-elevated);
    border-radius: 2px;
    overflow: hidden;
}

.tonal-band-bar-fill {
    height: 100%;
    border-radius: 2px;
    transition: width 1s ease-out;
}

.tonal-band-value {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--text-primary);
    width: 48px;
    flex-shrink: 0;
    text-align: right;
}

/* Suggestions */
.suggestions-container {
    margin-top: var(--space-xl);
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    text-align: left;
}

.suggestions-container h3 {
    margin-bottom: var(--space-md);
    color: var(--accent);
    font-size: 1rem;
}

#suggestions-list {
    list-style-type: none;
    padding: 0;
}

#suggestions-list li {
    padding: var(--space-sm) 0;
    border-bottom: 1px solid var(--border-subtle);
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.6;
}

#suggestions-list li:last-child {
    border-bottom: none;
}

#suggestions-list li::before {
    content: '→ ';
    color: var(--accent);
    font-weight: 600;
}

.action-area {
    margin-top: var(--space-2xl);
    text-align: center;
}

/* --- LABEL MATCHING --- */
.labels-section {
    margin-top: var(--space-3xl);
    width: 100%;
    animation: fadeUp 0.4s ease-out;
}

.labels-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: var(--space-md);
    margin-top: var(--space-lg);
}

.label-card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
    min-height: 180px;
    transition: border-color 0.25s, box-shadow 0.25s, transform 0.25s;
}

.label-card:hover {
    border-color: var(--border-accent);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.label-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.label-name {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 1.05rem;
}

.label-location {
    font-size: 0.78rem;
    color: var(--text-tertiary);
    margin-top: 2px;
}

.match-badge {
    padding: 3px 10px;
    border-radius: 100px;
    font-size: 0.75rem;
    font-weight: 700;
    font-family: var(--font-mono);
    background: rgba(62, 207, 142, 0.12);
    color: var(--success);
    white-space: nowrap;
}

.match-badge.medium {
    background: rgba(232, 170, 66, 0.12);
    color: var(--warning);
}

.match-badge.low {
    background: rgba(229, 77, 94, 0.12);
    color: var(--danger);
}

.tags-container {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.genre-tag {
    font-size: 0.72rem;
    padding: 3px 8px;
    border-radius: 100px;
    background: var(--bg-elevated);
    color: var(--text-secondary);
    font-weight: 500;
}

.btn-pitch {
    padding: 8px 16px;
    border-radius: var(--radius-md);
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
}

/* --- DASHBOARD --- */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: var(--space-md);
    width: 100%;
    margin-bottom: var(--space-2xl);
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    transition: border-color 0.25s;
}

.stat-card:hover {
    border-color: var(--border-accent);
}

.stat-value {
    font-family: var(--font-display);
    font-size: 2.8rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: var(--space-xs);
}

.stat-label {
    color: var(--text-tertiary);
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 600;
}

.dashboard-layout {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: var(--space-lg);
    width: 100%;
}

.panel {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-lg);
}

.panel-title {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 1rem;
    color: var(--text-primary);
}

.activity-list {
    display: flex;
    flex-direction: column;
}

.activity-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-sm) 0;
    border-bottom: 1px solid var(--border-subtle);
}

.activity-item:last-child {
    border-bottom: none;
}

.activity-info h4 {
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 2px;
}

.activity-info p {
    color: var(--text-tertiary);
    font-size: 0.8rem;
}

.score-pip {
    font-family: var(--font-mono);
    font-weight: 700;
    font-size: 0.82rem;
    padding: 3px 10px;
    border-radius: var(--radius-sm);
}

.loading-text {
    color: var(--text-tertiary);
    font-size: 0.88rem;
    text-align: center;
    padding: var(--space-lg);
}

/* --- CRM --- */
.full-width-container {
    max-width: 1100px;
}

.crm-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: var(--space-md);
    flex-wrap: wrap;
    margin-bottom: var(--space-lg);
}

.crm-header p {
    color: var(--text-secondary);
    margin-top: var(--space-xs);
}

.crm-toolbar {
    display: flex;
    gap: var(--space-sm);
    margin-bottom: var(--space-md);
}

.crm-search {
    flex: 1;
    background: var(--bg-secondary);
    border: 1px solid var(--border-default);
    color: var(--text-primary);
    padding: 10px 14px;
    border-radius: var(--radius-md);
    font-family: var(--font-body);
    font-size: 0.9rem;
    outline: none;
    transition: border-color 0.2s;
}

.crm-search:focus {
    border-color: var(--accent);
}

.crm-filter,
.crm-select {
    background: var(--bg-secondary);
    border: 1px solid var(--border-default);
    color: var(--text-primary);
    padding: 10px 14px;
    border-radius: var(--radius-md);
    cursor: pointer;
    font-family: var(--font-body);
    font-size: 0.9rem;
    outline: none;
}

/* Table */
.table-container {
    overflow-x: auto;
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-subtle);
}

.crm-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 780px;
}

.crm-table th {
    text-align: left;
    padding: 14px var(--space-lg);
    border-bottom: 1px solid var(--border-default);
    color: var(--text-tertiary);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.crm-table td {
    padding: 14px var(--space-lg);
    border-bottom: 1px solid var(--border-subtle);
    color: var(--text-primary);
    font-size: 0.9rem;
}

.crm-table tr:hover {
    background: var(--bg-hover);
}

/* Status Badges */
.status-select {
    appearance: none;
    -webkit-appearance: none;
    padding: 4px 22px 4px 10px;
    border-radius: 100px;
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    border: none;
    font-family: var(--font-body);
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23555' stroke-width='2'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 6px center;
    background-size: 11px;
}

.status-sent {
    background: rgba(138, 144, 160, 0.12);
    color: var(--text-secondary);
    padding: 4px 10px;
    border-radius: 100px;
    font-size: 0.78rem;
    font-weight: 600;
}

.status-opened {
    background: rgba(77, 166, 232, 0.12);
    color: var(--info);
    padding: 4px 10px;
    border-radius: 100px;
    font-size: 0.78rem;
    font-weight: 600;
}

.status-replied {
    background: rgba(232, 170, 66, 0.12);
    color: var(--warning);
    padding: 4px 10px;
    border-radius: 100px;
    font-size: 0.78rem;
    font-weight: 600;
}

.status-signed {
    background: rgba(62, 207, 142, 0.12);
    color: var(--success);
    padding: 4px 10px;
    border-radius: 100px;
    font-size: 0.78rem;
    font-weight: 600;
}

.status-rejected {
    background: rgba(229, 77, 94, 0.12);
    color: var(--danger);
    padding: 4px 10px;
    border-radius: 100px;
    font-size: 0.78rem;
    font-weight: 600;
}

/* Actions */
.action-btn {
    background: none;
    border: none;
    color: var(--text-tertiary);
    cursor: pointer;
    margin-right: 6px;
    font-size: 1rem;
    transition: color 0.2s;
    padding: 4px;
    border-radius: var(--radius-sm);
}

.action-btn:hover {
    color: var(--text-primary);
    background: var(--bg-hover);
}

.text-danger:hover {
    color: var(--danger);
}

.text-accent:hover {
    color: var(--accent);
}

/* --- MODALS --- */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 200;
    animation: fadeIn 0.15s ease-out;
}

.modal-content {
    width: 90%;
    max-width: 520px;
    background: var(--bg-card);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-xl);
    padding: var(--space-xl);
    box-shadow: var(--shadow-lg);
    animation: slideUp 0.2s ease-out;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-lg);
}

.modal-title {
    font-family: var(--font-display);
    font-size: 1.25rem;
}

.close-modal {
    background: var(--bg-elevated);
    border: none;
    color: var(--text-secondary);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.close-modal:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.modal-actions {
    margin-top: var(--space-lg);
    display: flex;
    gap: var(--space-sm);
}

/* Tabs */
.tabs {
    display: flex;
    gap: 4px;
    margin-bottom: var(--space-lg);
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    padding: 3px;
}

.tab-btn {
    flex: 1;
    background: none;
    border: none;
    color: var(--text-tertiary);
    padding: 8px 14px;
    cursor: pointer;
    font-weight: 500;
    font-size: 0.85rem;
    font-family: var(--font-body);
    border-radius: var(--radius-sm);
    transition: all 0.2s;
}

.tab-btn.active {
    background: var(--bg-elevated);
    color: var(--text-primary);
    box-shadow: var(--shadow-sm);
}

.tab-btn:hover:not(.active) {
    color: var(--text-secondary);
}

/* Email displays */
.email-preview,
.email-display {
    background: var(--bg-secondary);
    padding: var(--space-lg);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-subtle);
}

.email-subject {
    font-weight: 600;
    margin-bottom: var(--space-md);
    color: var(--text-primary);
    font-size: 0.95rem;
    padding-bottom: var(--space-md);
    border-bottom: 1px solid var(--border-subtle);
}

.email-body {
    white-space: pre-line;
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.7;
}

/* --- LOADER --- */
.loader {
    width: 36px;
    height: 36px;
    border: 3px solid var(--border-subtle);
    border-left-color: var(--accent);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: var(--space-xl) auto;
}

/* --- ANIMATIONS --- */
@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(12px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* --- RESPONSIVE --- */
@media (max-width: 768px) {
    .navbar {
        padding: 0 var(--space-md);
        height: auto;
        flex-wrap: wrap;
        gap: var(--space-sm);
        padding: var(--space-md);
    }

    .nav-links {
        gap: 2px;
        flex-wrap: wrap;
    }

    .nav-links a {
        padding: 5px 10px;
        font-size: 0.8rem;
    }

    .hero h1 {
        font-size: 2rem;
    }

    .dashboard-layout {
        grid-template-columns: 1fr;
    }

    .analysis-grid-container {
        flex-direction: column;
        align-items: center;
    }

    .crm-toolbar {
        flex-direction: column;
    }

    h1 {
        font-size: 1.75rem;
    }
}

@media (max-width: 480px) {
    main {
        padding: var(--space-lg) var(--space-md);
    }

    .hero h1 {
        font-size: 1.65rem;
    }

    .drop-zone {
        padding: var(--space-2xl) var(--space-md);
    }
}

/* ═══════════════════════════════════════════════
   LABEL DETAIL MODAL
   ═══════════════════════════════════════════════ */

.label-detail-content {
    max-width: 520px;
}

.label-detail-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-md);
}

.label-detail-header h2 {
    font-family: var(--font-display);
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text-primary);
}

.ld-score-badge {
    padding: 4px 14px;
    border-radius: 100px;
    font-size: 0.85rem;
    font-weight: 700;
    font-family: var(--font-mono);
    background: rgba(62, 207, 142, 0.12);
    color: var(--success);
    white-space: nowrap;
}

.ld-bio {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.6;
    margin-bottom: var(--space-md);
}

/* Tags: genre, mood, style */
.ld-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: var(--space-lg);
}

.ld-tag {
    font-size: 0.72rem;
    padding: 3px 10px;
    border-radius: 100px;
    font-weight: 600;
    text-transform: capitalize;
}

.ld-tag-genre {
    background: var(--bg-elevated);
    color: var(--text-secondary);
}

.ld-tag-mood {
    background: rgba(232, 170, 66, 0.12);
    color: var(--accent);
}

.ld-tag-style {
    background: rgba(77, 166, 232, 0.12);
    color: var(--info);
}

/* Info grid */
.ld-info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-sm) var(--space-md);
    padding: var(--space-md);
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    margin-bottom: var(--space-lg);
}

.ld-info-item {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.ld-info-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-tertiary);
    font-weight: 600;
}

.ld-info-value {
    font-size: 0.85rem;
    color: var(--text-primary);
}

.ld-email-link {
    color: var(--accent) !important;
    text-decoration: none;
    transition: opacity 0.2s;
}

.ld-email-link:hover {
    opacity: 0.7;
}

.ld-actions {
    display: flex;
    gap: var(--space-sm);
}

.ld-actions .btn-primary {
    width: 100%;
}

/* Mood tag in label cards */
.mood-tag {
    background: rgba(232, 170, 66, 0.1);
    color: var(--accent);
}

/* Label bio preview in card */
.label-bio-preview {
    font-size: 0.78rem;
    color: var(--text-tertiary);
    line-height: 1.4;
    margin-top: auto;
}

/* Section subtitle */
.section-subtitle {
    font-size: 0.85rem;
    color: var(--text-tertiary);
    margin-top: -8px;
    margin-bottom: var(--space-md);
    font-family: var(--font-mono);
}

/* ═══════════════════════════════════════════════
   PITCH MODAL ENHANCEMENTS
   ═══════════════════════════════════════════════ */

.pitch-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-2xl);
    color: var(--text-secondary);
}

.pitch-loading p {
    font-size: 0.9rem;
}

.pitch-actions {
    display: flex;
    gap: var(--space-sm);
    margin-top: var(--space-md);
}

.pitch-actions .btn-primary,
.pitch-actions .btn-secondary {
    flex: 1;
    text-align: center;
}

.pitch-error {
    text-align: center;
    padding: var(--space-lg);
    color: var(--danger);
}

.pitch-error p {
    margin-bottom: var(--space-md);
    font-size: 0.95rem;
}

/* ═══════════════════════════════════════════════
   RESPONSIVE: Label Detail
   ═══════════════════════════════════════════════ */

@media (max-width: 480px) {
    .ld-info-grid {
        grid-template-columns: 1fr;
    }

    .pitch-actions {
        flex-direction: column;
    }

    .label-detail-header {
        flex-direction: column;
        gap: var(--space-sm);
        align-items: flex-start;
    }
}