/* ═══════════════════════════════════════════════════════════════════════════
   PAPYRUS.IO — Design System
   Aesthetic: Refined editorial + emerald accents + geometric precision
   ═══════════════════════════════════════════════════════════════════════════ */

:root {
    --papyrus-emerald: #10b981;
    --papyrus-emerald-glow: rgba(16, 185, 129, 0.12);
    --papyrus-gold: #f59e0b;
    --papyrus-surface-glass: rgba(255, 255, 255, 0.03);
    --papyrus-border-subtle: rgba(255, 255, 255, 0.06);
    --papyrus-radius: 10px;
    --papyrus-transition: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

html, body {
    font-family: 'DM Sans', system-ui, sans-serif;
    margin: 0;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ─── Appbar ──────────────────────────────────────────────────────────────── */
.papyrus-appbar {
    border-bottom: 1px solid var(--papyrus-border-subtle) !important;
    backdrop-filter: blur(20px) saturate(1.4);
    background: rgba(15, 17, 24, 0.85) !important;
}

.papyrus-wordmark {
    font-weight: 700 !important;
    letter-spacing: 0.18em !important;
    font-size: 0.85rem !important;
    background: linear-gradient(135deg, #10b981 0%, #34d399 50%, #a7f3d0 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.papyrus-logo-mark {
    width: 28px;
    height: 28px;
    border-radius: 7px;
    background: linear-gradient(135deg, #10b981, #059669);
    position: relative;
    box-shadow: 0 0 20px rgba(16, 185, 129, 0.25);
}
.papyrus-logo-mark::after {
    content: '';
    position: absolute;
    inset: 5px;
    border-radius: 4px;
    border: 2px solid rgba(255, 255, 255, 0.6);
    border-right: none;
    border-bottom: none;
}

.papyrus-search {
    max-width: 420px;
}
.papyrus-search .mud-input-outlined {
    border-radius: 20px !important;
}

/* ─── Drawer ──────────────────────────────────────────────────────────────── */
.papyrus-drawer {
    border-right: 1px solid var(--papyrus-border-subtle) !important;
}
.papyrus-drawer .mud-nav-link {
    border-radius: 8px;
    margin: 2px 8px;
    transition: var(--papyrus-transition);
}
.papyrus-drawer .mud-nav-link:hover {
    background: var(--papyrus-emerald-glow) !important;
}
.papyrus-drawer .mud-nav-link.active {
    background: var(--papyrus-emerald-glow) !important;
    color: var(--papyrus-emerald) !important;
    font-weight: 600;
}
.papyrus-drawer .mud-nav-link.active .mud-icon-root {
    color: var(--papyrus-emerald) !important;
}

/* ─── Main Content ────────────────────────────────────────────────────────── */
.papyrus-main {
    min-height: 100vh;
}

/* ─── Cards ───────────────────────────────────────────────────────────────── */
.papyrus-card {
    border: 1px solid var(--papyrus-border-subtle);
    border-radius: var(--papyrus-radius);
    transition: var(--papyrus-transition);
    overflow: hidden;
}
.papyrus-card:hover {
    border-color: rgba(16, 185, 129, 0.2);
    box-shadow: 0 8px 32px rgba(16, 185, 129, 0.08);
    transform: translateY(-1px);
}

/* ─── Stat Cards ──────────────────────────────────────────────────────────── */
.stat-card {
    position: relative;
    overflow: hidden;
}
.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--papyrus-emerald), transparent);
}
.stat-card .stat-value {
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1;
}
.stat-card .stat-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    opacity: 0.6;
    margin-top: 4px;
}
.stat-card .stat-trend {
    font-size: 0.75rem;
    font-weight: 600;
}
.stat-card .stat-trend.up { color: #10b981; }
.stat-card .stat-trend.down { color: #ef4444; }

/* ─── Document Grid ───────────────────────────────────────────────────────── */
.doc-type-badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 10px;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}
.doc-type-badge.pdf { background: rgba(239, 68, 68, 0.12); color: #ef4444; }
.doc-type-badge.docx { background: rgba(59, 130, 246, 0.12); color: #3b82f6; }
.doc-type-badge.xlsx { background: rgba(16, 185, 129, 0.12); color: #10b981; }
.doc-type-badge.img { background: rgba(168, 85, 247, 0.12); color: #a855f7; }
.doc-type-badge.default { background: rgba(148, 163, 184, 0.12); color: #94a3b8; }

/* ─── Login Page ──────────────────────────────────────────────────────────── */
.login-page {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 1fr 1fr;
    overflow: hidden;
}
.login-hero {
    background: linear-gradient(160deg, #0c0e14 0%, #0f2922 50%, #0d3b2e 100%);
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 4rem;
    position: relative;
    overflow: hidden;
}
.login-hero::before {
    content: '';
    position: absolute;
    width: 600px;
    height: 600px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(16, 185, 129, 0.15), transparent 70%);
    top: -100px;
    right: -200px;
}
.login-hero::after {
    content: '';
    position: absolute;
    bottom: -50px;
    left: -100px;
    width: 400px;
    height: 400px;
    border: 1px solid rgba(16, 185, 129, 0.1);
    border-radius: 50%;
}
.login-hero h1 {
    font-size: 3rem;
    font-weight: 700;
    letter-spacing: -0.03em;
    color: #f1f5f9;
    line-height: 1.1;
}
.login-hero h1 span {
    background: linear-gradient(135deg, #10b981, #34d399);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.login-hero p {
    color: #94a3b8;
    font-size: 1.1rem;
    line-height: 1.7;
    max-width: 480px;
    margin-top: 1.5rem;
}
.login-form-side {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3rem;
    background: #0c0e14;
}
.login-form-container {
    width: 100%;
    max-width: 400px;
}

@media (max-width: 960px) {
    .login-page { grid-template-columns: 1fr; }
    .login-hero { display: none; }
}

/* ─── Scrollbar ───────────────────────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
    background: rgba(148, 163, 184, 0.2);
    border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover { background: rgba(148, 163, 184, 0.4); }

/* ─── Animations ──────────────────────────────────────────────────────────── */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(16px); }
    to { opacity: 1; transform: translateY(0); }
}
.animate-in {
    animation: fadeInUp 0.5s ease forwards;
}
.animate-in:nth-child(1) { animation-delay: 0s; }
.animate-in:nth-child(2) { animation-delay: 0.08s; }
.animate-in:nth-child(3) { animation-delay: 0.16s; }
.animate-in:nth-child(4) { animation-delay: 0.24s; }
.animate-in:nth-child(5) { animation-delay: 0.32s; }
.animate-in:nth-child(6) { animation-delay: 0.40s; }

/* ─── Utility ─────────────────────────────────────────────────────────────── */
.cursor-pointer { cursor: pointer; }
.text-mono { font-family: 'JetBrains Mono', monospace; }
