/* Grand Ellora Marketing Portal — Styles */

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

:root {
    --gold: #D4A84B;
    --gold-light: #E8C068;
    --gold-dark: #B8923D;
    --navy: #0A2E2A;
    --navy-light: #134840;
    --charcoal: #0f0f23;
    --cream: #F8FAF8;
    --white: #FFFFFF;
    --error: #E74C3C;
    --success: #2ECC71;
    --border: rgba(212, 168, 75, 0.15);
    --text-muted: rgba(255, 255, 255, 0.5);
    --text-light: rgba(255, 255, 255, 0.7);
    --text: #ccc;
    --radius: 8px;
    --radius-lg: 12px;
    --shadow: 0 4px 24px rgba(0, 0, 0, 0.3);
    --shadow-gold: 0 4px 24px rgba(212, 168, 75, 0.15);
    --transition: 0.2s ease;

    /* Status Colors */
    --status-new: #3B82F6;
    --status-contacted: #F59E0B;
    --status-site-visit: #8B5CF6;
    --status-negotiation: #F97316;
    --status-closed-won: #10B981;
    --status-closed-lost: #EF4444;
}

html {
    scroll-behavior: smooth;
}

body {
    min-height: 100vh;
    background: var(--charcoal);
    background-image:
        radial-gradient(ellipse at 50% 0%, rgba(212, 168, 75, 0.06) 0%, transparent 60%),
        radial-gradient(ellipse at 50% 100%, rgba(10, 46, 42, 0.3) 0%, transparent 60%);
    font-family: 'Montserrat', sans-serif;
    color: var(--text);
    line-height: 1.6;
}

a {
    color: var(--gold);
    text-decoration: none;
}

/* ─── Loading Screen ──────────────────────────── */

.loading-screen {
    position: fixed;
    inset: 0;
    background: var(--charcoal);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.3s ease;
}

.loading-screen.hidden {
    opacity: 0;
    pointer-events: none;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--border);
    border-top-color: var(--gold);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

/* ─── Login Page ──────────────────────────────── */

.login-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 2rem;
}

.login-container {
    text-align: center;
    width: 100%;
    max-width: 380px;
    animation: fadeIn 0.8s ease-out;
}

.login-logo {
    width: 200px;
    height: auto;
    margin-bottom: 2rem;
    filter: drop-shadow(0 4px 24px rgba(212, 168, 75, 0.2));
    animation: logoReveal 1.2s ease-out;
}

.login-divider {
    width: 80px;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--gold), transparent);
    margin: 0 auto 1.5rem;
}

.login-title {
    font-family: 'Playfair Display', serif;
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--gold);
    letter-spacing: 0.15em;
    text-transform: uppercase;
    margin-bottom: 0.5rem;
}

.login-subtitle {
    font-size: 0.85rem;
    font-weight: 300;
    color: var(--text-muted);
    letter-spacing: 0.05em;
    margin-bottom: 2rem;
}

/* ─── Forms ───────────────────────────────────── */

.form-group {
    margin-bottom: 1.25rem;
    text-align: left;
}

.form-label {
    display: block;
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-light);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-bottom: 0.5rem;
}

.form-input {
    width: 100%;
    padding: 0.85rem 1rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--white);
    font-family: 'Montserrat', sans-serif;
    font-size: 0.95rem;
    transition: border-color var(--transition), box-shadow var(--transition);
    outline: none;
}

.form-input::placeholder {
    color: rgba(255, 255, 255, 0.25);
}

.form-input:focus {
    border-color: var(--gold);
    box-shadow: 0 0 0 3px rgba(212, 168, 75, 0.1);
}

.form-textarea {
    resize: vertical;
    min-height: 80px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

select.form-input {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='rgba(255,255,255,0.5)' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    padding-right: 2.5rem;
}

select.form-input option {
    background: var(--charcoal);
    color: var(--white);
}

/* ─── Password Toggle ────────────────────────── */

.input-password-wrapper {
    position: relative;
}

.input-password-wrapper .form-input {
    padding-right: 3rem;
}

.password-toggle {
    position: absolute;
    right: 0;
    top: 0;
    height: 100%;
    width: 3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-muted);
    transition: color var(--transition);
    padding: 0;
}

.password-toggle:hover {
    color: var(--gold);
}

.password-toggle svg {
    width: 18px;
    height: 18px;
}

/* ─── Buttons ─────────────────────────────────── */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.85rem 2rem;
    border: none;
    border-radius: var(--radius);
    font-family: 'Montserrat', sans-serif;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    cursor: pointer;
    transition: all var(--transition);
    outline: none;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-primary {
    width: 100%;
    background: linear-gradient(135deg, var(--gold), var(--gold-dark));
    color: var(--charcoal);
    box-shadow: var(--shadow-gold);
}

.btn-primary:hover:not(:disabled) {
    background: linear-gradient(135deg, var(--gold-light), var(--gold));
    transform: translateY(-1px);
}

.btn-add {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.65rem 1.25rem;
    background: linear-gradient(135deg, var(--gold), var(--gold-dark));
    color: var(--charcoal);
    border: none;
    border-radius: var(--radius);
    font-family: 'Montserrat', sans-serif;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    cursor: pointer;
    transition: all var(--transition);
    white-space: nowrap;
}

.btn-add:hover {
    background: linear-gradient(135deg, var(--gold-light), var(--gold));
    transform: translateY(-1px);
    box-shadow: var(--shadow-gold);
}

.btn-icon-sm {
    padding: 0.4rem;
    background: transparent;
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text-light);
    cursor: pointer;
    transition: all var(--transition);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-icon-sm:hover {
    color: var(--gold);
    border-color: var(--gold);
    background: rgba(212, 168, 75, 0.08);
}

/* ─── Error / Success Messages ────────────────── */

.message {
    padding: 0.75rem 1rem;
    border-radius: var(--radius);
    font-size: 0.85rem;
    margin-bottom: 1rem;
    display: none;
}

.message.show {
    display: block;
    animation: fadeIn 0.3s ease-out;
}

.message-error {
    background: rgba(231, 76, 60, 0.12);
    border: 1px solid rgba(231, 76, 60, 0.3);
    color: #E74C3C;
}

.message-success {
    background: rgba(46, 204, 113, 0.12);
    border: 1px solid rgba(46, 204, 113, 0.3);
    color: #2ECC71;
}

/* ─── Modal / Overlay ─────────────────────────── */

.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 1.5rem;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: all;
}

.modal {
    background: var(--charcoal);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 2rem;
    width: 100%;
    max-width: 400px;
    box-shadow: var(--shadow);
    transform: translateY(20px);
    transition: transform 0.3s ease;
    max-height: 90vh;
    overflow-y: auto;
}

.modal--wide {
    max-width: 560px;
}

.modal-overlay.active .modal {
    transform: translateY(0);
}

.modal-title {
    font-family: 'Playfair Display', serif;
    font-size: 1.2rem;
    color: var(--gold);
    margin-bottom: 0.5rem;
}

.modal-subtitle {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}

.modal-actions {
    display: flex;
    gap: 0.75rem;
    margin-top: 1.5rem;
}

.modal-actions .btn-primary {
    flex: 1;
}

.btn-cancel {
    flex: 1;
    padding: 0.75rem 1.5rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text-light);
    font-family: 'Montserrat', sans-serif;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    cursor: pointer;
    transition: all var(--transition);
}

.btn-cancel:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* ─── Dashboard Layout ────────────────────────── */

.dashboard {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.dashboard-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1.5rem;
    border-bottom: 1px solid var(--border);
    background: rgba(15, 15, 35, 0.95);
    backdrop-filter: blur(10px);
    position: sticky;
    top: 0;
    z-index: 100;
    gap: 1rem;
}

.header-left {
    display: flex;
    align-items: center;
}

.header-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
}

.header-logo {
    width: 40px;
    height: auto;
    border-radius: 4px;
}

.header-title {
    font-family: 'Playfair Display', serif;
    font-size: 0.95rem;
    color: var(--gold);
    letter-spacing: 0.08em;
}

.header-nav {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.nav-link {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.5rem 0.85rem;
    border-radius: var(--radius);
    border: 1px solid transparent;
    color: var(--text-light);
    font-family: 'Montserrat', sans-serif;
    font-size: 0.8rem;
    font-weight: 500;
    letter-spacing: 0.04em;
    text-decoration: none;
    transition: all var(--transition);
}

.nav-link:hover {
    color: var(--gold);
    background: rgba(212, 168, 75, 0.06);
}

.nav-link.active {
    color: var(--gold);
    background: rgba(212, 168, 75, 0.1);
    border-color: rgba(212, 168, 75, 0.2);
}

.header-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.header-user {
    font-size: 0.8rem;
    color: var(--text-light);
    font-weight: 500;
    letter-spacing: 0.05em;
}

.btn-logout {
    padding: 0.5rem 1rem;
    background: transparent;
    border: 1px solid rgba(231, 76, 60, 0.3);
    border-radius: var(--radius);
    color: #E74C3C;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    cursor: pointer;
    transition: all var(--transition);
}

.btn-logout:hover {
    background: rgba(231, 76, 60, 0.1);
    border-color: #E74C3C;
}

/* ─── Dashboard Content ───────────────────────── */

.dashboard-content {
    flex: 1;
    padding: 2rem 1.5rem;
    max-width: 900px;
    width: 100%;
    margin: 0 auto;
}

.dashboard-content--wide {
    max-width: 1200px;
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.section-title {
    font-family: 'Playfair Display', serif;
    font-size: 1.5rem;
    color: var(--cream);
    font-weight: 600;
}

.section-subtitle {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
}

/* ─── Stats Row ───────────────────────────────── */

.stats-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.25rem 1.5rem;
    text-align: center;
    transition: border-color var(--transition), box-shadow var(--transition);
}

.stat-card:hover {
    border-color: rgba(212, 168, 75, 0.3);
    box-shadow: 0 2px 16px rgba(212, 168, 75, 0.06);
}

.stat-value {
    font-family: 'Playfair Display', serif;
    font-size: 2rem;
    font-weight: 700;
    color: var(--cream);
    line-height: 1.2;
    margin-bottom: 0.25rem;
}

.stat-label {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-muted);
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.stat-card--blue .stat-value { color: var(--status-new); }
.stat-card--green .stat-value { color: var(--status-closed-won); }
.stat-card--gold .stat-value { color: var(--gold); }

/* ─── Pipeline ────────────────────────────────── */

.pipeline {
    margin-bottom: 2rem;
}

.pipeline-title {
    font-family: 'Playfair Display', serif;
    font-size: 1.1rem;
    color: var(--cream);
    font-weight: 600;
    margin-bottom: 1rem;
}

.pipeline-row {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 0.75rem;
}

.pipeline-stage {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1rem 0.75rem;
    text-align: center;
    cursor: pointer;
    transition: all var(--transition);
    position: relative;
    overflow: hidden;
}

.pipeline-stage:hover {
    border-color: rgba(212, 168, 75, 0.3);
    background: rgba(255, 255, 255, 0.05);
    transform: translateY(-2px);
}

.pipeline-count {
    font-family: 'Playfair Display', serif;
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 0.25rem;
}

.pipeline-label {
    font-size: 0.68rem;
    font-weight: 500;
    color: var(--text-muted);
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.pipeline-bar {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
}

.pipeline-bar-fill {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    transition: width 0.4s ease;
}

/* ─── Toolbar ─────────────────────────────────── */

.toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.25rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.toolbar-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.toolbar-right {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.filter-group {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.filter-select {
    padding: 0.55rem 2.2rem 0.55rem 0.75rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text-light);
    font-family: 'Montserrat', sans-serif;
    font-size: 0.8rem;
    cursor: pointer;
    outline: none;
    transition: border-color var(--transition);
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='rgba(255,255,255,0.5)' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.6rem center;
}

.filter-select:focus {
    border-color: var(--gold);
}

.filter-select option {
    background: var(--charcoal);
    color: var(--white);
}

.filter-search {
    padding: 0.55rem 0.85rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--white);
    font-family: 'Montserrat', sans-serif;
    font-size: 0.8rem;
    outline: none;
    transition: border-color var(--transition);
    min-width: 180px;
}

.filter-search::placeholder {
    color: rgba(255, 255, 255, 0.25);
}

.filter-search:focus {
    border-color: var(--gold);
}

/* ─── Data Table ──────────────────────────────── */

.table-wrapper {
    overflow-x: auto;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: rgba(255, 255, 255, 0.02);
}

.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table thead th {
    padding: 0.85rem 1rem;
    text-align: left;
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--text-muted);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
}

.data-table tbody td {
    padding: 0.85rem 1rem;
    font-size: 0.85rem;
    color: var(--text);
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
    vertical-align: middle;
}

.data-table tbody tr:last-child td {
    border-bottom: none;
}

.lead-row {
    cursor: pointer;
    transition: background var(--transition);
}

.lead-row:hover {
    background: rgba(212, 168, 75, 0.04);
}

.lead-name {
    font-weight: 500;
    color: var(--cream);
}

.lead-email {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 0.15rem;
}

.table-loading {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* ─── Status Badges ───────────────────────────── */

.status-badge {
    display: inline-block;
    padding: 0.25rem 0.6rem;
    border-radius: 100px;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    white-space: nowrap;
}

.status-new {
    background: rgba(59, 130, 246, 0.15);
    color: #3B82F6;
    border: 1px solid rgba(59, 130, 246, 0.3);
}

.status-contacted {
    background: rgba(245, 158, 11, 0.15);
    color: #F59E0B;
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.status-site-visit {
    background: rgba(139, 92, 246, 0.15);
    color: #8B5CF6;
    border: 1px solid rgba(139, 92, 246, 0.3);
}

.status-negotiation {
    background: rgba(249, 115, 22, 0.15);
    color: #F97316;
    border: 1px solid rgba(249, 115, 22, 0.3);
}

.status-closed-won {
    background: rgba(16, 185, 129, 0.15);
    color: #10B981;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.status-closed-lost {
    background: rgba(239, 68, 68, 0.15);
    color: #EF4444;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

/* ─── Project Badge ───────────────────────────── */

.project-badge {
    display: inline-block;
    padding: 0.2rem 0.5rem;
    background: rgba(212, 168, 75, 0.1);
    border: 1px solid rgba(212, 168, 75, 0.25);
    border-radius: 4px;
    font-size: 0.72rem;
    font-weight: 500;
    color: var(--gold);
    letter-spacing: 0.04em;
}

/* ─── Empty State ─────────────────────────────── */

.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    border: 2px dashed var(--border);
    border-radius: var(--radius-lg);
}

.empty-state svg {
    width: 64px;
    height: 64px;
    color: rgba(212, 168, 75, 0.2);
    margin-bottom: 1.5rem;
}

.empty-state-title {
    font-family: 'Playfair Display', serif;
    font-size: 1.1rem;
    color: var(--cream);
    margin-bottom: 0.5rem;
}

.empty-state-text {
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* ═══════════════════════════════════════════════ */
/* ─── MATERIALS PAGE ───────────────────────────── */
/* ═══════════════════════════════════════════════ */

.materials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1rem;
}

.material-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    transition: border-color var(--transition), box-shadow var(--transition), transform var(--transition);
}

.material-card:hover {
    border-color: rgba(212, 168, 75, 0.35);
    box-shadow: 0 4px 20px rgba(212, 168, 75, 0.08);
    transform: translateY(-2px);
}

.material-card-icon {
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(212, 168, 75, 0.08);
    border-radius: var(--radius);
    color: var(--gold);
    flex-shrink: 0;
}

.material-card-body {
    flex: 1;
    min-width: 0;
}

.material-title {
    font-family: 'Playfair Display', serif;
    font-size: 1rem;
    color: var(--cream);
    font-weight: 600;
    margin-bottom: 0.5rem;
    line-height: 1.3;
}

.material-meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-bottom: 0.5rem;
}

.category-badge {
    display: inline-block;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-size: 0.65rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.category-brochure {
    background: rgba(59, 130, 246, 0.15);
    color: #3B82F6;
    border: 1px solid rgba(59, 130, 246, 0.3);
}

.category-price-list {
    background: rgba(16, 185, 129, 0.15);
    color: #10B981;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.category-flyer {
    background: rgba(245, 158, 11, 0.15);
    color: #F59E0B;
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.category-render {
    background: rgba(139, 92, 246, 0.15);
    color: #8B5CF6;
    border: 1px solid rgba(139, 92, 246, 0.3);
}

.category-video {
    background: rgba(249, 115, 22, 0.15);
    color: #F97316;
    border: 1px solid rgba(249, 115, 22, 0.3);
}

.category-other {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-light);
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.project-tag {
    font-size: 0.7rem;
    color: var(--text-muted);
    font-weight: 500;
}

.material-details {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
}

.material-file {
    font-size: 0.75rem;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 200px;
}

.material-size {
    font-size: 0.72rem;
    color: var(--text-muted);
    font-weight: 500;
    white-space: nowrap;
}

.material-card-actions {
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding-top: 1rem;
}

.btn-download {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.55rem 1.25rem;
    background: rgba(212, 168, 75, 0.1);
    border: 1px solid rgba(212, 168, 75, 0.25);
    border-radius: var(--radius);
    color: var(--gold);
    font-family: 'Montserrat', sans-serif;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    cursor: pointer;
    transition: all var(--transition);
    width: 100%;
    justify-content: center;
}

.btn-download:hover:not(:disabled) {
    background: rgba(212, 168, 75, 0.18);
    border-color: var(--gold);
    transform: translateY(-1px);
}

.btn-download:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ─── Toast Notifications ─────────────────────── */

.toast-container {
    position: fixed;
    top: 1.5rem;
    right: 1.5rem;
    z-index: 2000;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    pointer-events: none;
}

.toast {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.85rem 1.25rem;
    background: var(--charcoal);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    font-size: 0.85rem;
    color: var(--text);
    pointer-events: auto;
    opacity: 0;
    transform: translateX(20px);
    transition: opacity 0.3s ease, transform 0.3s ease;
    max-width: 380px;
}

.toast.show {
    opacity: 1;
    transform: translateX(0);
}

.toast-success {
    border-color: rgba(46, 204, 113, 0.3);
    color: #2ECC71;
}

.toast-error {
    border-color: rgba(231, 76, 60, 0.3);
    color: #E74C3C;
}

.toast-info {
    border-color: rgba(59, 130, 246, 0.3);
    color: #3B82F6;
}

.toast-message {
    color: var(--text-light);
}

/* ─── Animations ──────────────────────────────── */

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes logoReveal {
    from { opacity: 0; transform: scale(0.9); }
    to { opacity: 1; transform: scale(1); }
}

/* ─── Responsive ──────────────────────────────── */

@media (max-width: 1024px) {
    .stats-row {
        grid-template-columns: repeat(2, 1fr);
    }

    .pipeline-row {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .dashboard-header {
        flex-wrap: wrap;
        padding: 0.65rem 1rem;
        gap: 0.5rem;
    }

    .header-nav {
        order: 3;
        width: 100%;
        justify-content: center;
        border-top: 1px solid var(--border);
        padding-top: 0.5rem;
    }

    .dashboard-content {
        padding: 1.5rem 1rem;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .toolbar {
        flex-direction: column;
        align-items: flex-start;
    }

    .toolbar-right {
        width: 100%;
        flex-direction: column;
    }

    .filter-group {
        width: 100%;
    }

    .filter-select,
    .filter-search {
        flex: 1;
        min-width: 0;
    }

    .btn-add {
        width: 100%;
        justify-content: center;
    }

    .pipeline-row {
        grid-template-columns: repeat(3, 1fr);
    }

    .stats-row {
        grid-template-columns: repeat(2, 1fr);
    }

    .stat-value {
        font-size: 1.6rem;
    }

    .section-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .section-title {
        font-size: 1.3rem;
    }

    .materials-grid {
        grid-template-columns: 1fr;
    }

    .modal--wide {
        max-width: 100%;
    }
}

@media (max-width: 480px) {
    .login-logo {
        width: 160px;
    }

    .login-title {
        font-size: 1.2rem;
    }

    .header-logo {
        width: 32px;
    }

    .header-title {
        font-size: 0.85rem;
    }

    .header-user {
        display: none;
    }

    .nav-link span {
        display: none;
    }

    .nav-link {
        padding: 0.45rem;
    }

    .btn-logout {
        font-size: 0.7rem;
        padding: 0.4rem 0.75rem;
    }

    .pipeline-row {
        grid-template-columns: repeat(2, 1fr);
    }

    .pipeline-count {
        font-size: 1.2rem;
    }

    .stats-row {
        grid-template-columns: 1fr 1fr;
        gap: 0.75rem;
    }

    .stat-card {
        padding: 1rem;
    }

    .stat-value {
        font-size: 1.4rem;
    }

    .stat-label {
        font-size: 0.65rem;
    }

    .modal {
        padding: 1.5rem;
    }

    .empty-state {
        padding: 3rem 1.5rem;
    }

    .toast-container {
        left: 1rem;
        right: 1rem;
    }

    .toast {
        max-width: 100%;
    }

    .data-table thead th,
    .data-table tbody td {
        padding: 0.65rem 0.75rem;
        font-size: 0.78rem;
    }
}
