/* ============================================================
   DOCUMIND AI - Luxury Light 2026 Theme
   PREFIX: DMI_
   ============================================================ */

:root{
    --bg-primary: var(--th-bg);
    --bg-secondary: var(--th-surface-2);
    --bg-sidebar: var(--th-surface-2);
    --text-primary: var(--th-ink);
    --text-secondary: var(--th-ink-2);
    --text-muted: var(--th-muted);
    --accent-1: var(--th-primary);
    --accent-2: var(--th-accent);
    --accent-gradient: var(--th-grad-2);
    --success: var(--th-success);
    --success-bg: var(--th-success);
    --error: var(--th-error);
    --error-bg: var(--th-error);
    --warning: var(--th-warning);
    --warning-bg: var(--th-accent);
    --info: var(--th-info);
    --info-bg: var(--th-primary);
    --glass-bg: var(--th-glass);
    --glass-border: var(--th-glass-bd);
    --glass-shadow: var(--th-shadow-2);
    --glass-shadow-lg: 0 8px 40px rgba(0,0,0,0.08);
    --sidebar-width: 260px;
    --topbar-height: 64px;
    --radius: 16px;
    --radius-sm: 10px;
    --radius-xs: 6px;
    --transition: all 0.2s ease;}

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

body {
    font-family: 'Inter', -apple-system, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Poppins', 'Inter', sans-serif;
    font-weight: 600;
    color: var(--text-primary);
}

/* ============================================================
   SIDEBAR
   ============================================================ */
.dmi-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: var(--sidebar-width);
    height: 100vh;
    background: var(--bg-sidebar);
    border-right: 1px solid var(--glass-border);
    display: flex;
    flex-direction: column;
    z-index: 50;
    transition: transform 0.3s ease;
}

.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 20px 24px;
    border-bottom: 1px solid var(--glass-border);
}

.sidebar-logo .logo-icon {
    width: 40px;
    height: 40px;
    background: var(--accent-gradient);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1.1rem;
    box-shadow: 0 4px 12px rgba(91,78,229,0.3);
}

.sidebar-logo h2 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.02em;
}

.sidebar-nav {
    flex: 1;
    overflow-y: auto;
    padding: 12px 12px;
}

.sidebar-nav::-webkit-scrollbar { width: 4px; }
.sidebar-nav::-webkit-scrollbar-track { background: transparent; }
.sidebar-nav::-webkit-scrollbar-thumb { background: rgba(0,0,0,0.1); border-radius: 4px; }

.sidebar-nav .nav-section {
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    padding: 16px 12px 6px;
}

.sidebar-nav a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
    transition: var(--transition);
    margin-bottom: 2px;
}

.sidebar-nav a i {
    width: 20px;
    text-align: center;
    font-size: 0.9rem;
}

.sidebar-nav a:hover {
    background: rgba(91,78,229,0.06);
    color: var(--accent-1);
}

.sidebar-nav a.active {
    background: rgba(91,78,229,0.1);
    color: var(--accent-1);
    font-weight: 600;
    position: relative;
}

.sidebar-nav a.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 24px;
    background: var(--accent-gradient);
    border-radius: 0 4px 4px 0;
}

.sidebar-user {
    padding: 16px 20px;
    border-top: 1px solid var(--glass-border);
    display: flex;
    align-items: center;
    gap: 12px;
}

.sidebar-user .user-avatar {
    width: 36px;
    height: 36px;
    background: var(--accent-gradient);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 700;
    color: #fff;
}

/* ============================================================
   TOPBAR
   ============================================================ */
.dmi-topbar {
    position: fixed;
    top: 0;
    left: var(--sidebar-width);
    right: 0;
    height: var(--topbar-height);
    background: rgba(243,245,251,0.9);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--glass-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    z-index: 40;
}

.topbar-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.hamburger-btn {
    display: none;
    background: none;
    border: none;
    font-size: 1.2rem;
    color: var(--text-primary);
    cursor: pointer;
    padding: 8px;
    border-radius: var(--radius-xs);
    transition: var(--transition);
}

.hamburger-btn:hover { background: rgba(0,0,0,0.04); }

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.breadcrumb span { color: var(--text-muted); }

/* ============================================================
   MAIN CONTENT
   ============================================================ */
.dmi-main {
    margin-left: var(--sidebar-width);
    margin-top: var(--topbar-height);
    padding: 24px;
    min-height: calc(100vh - var(--topbar-height));
}

/* ============================================================
   GLASS CARDS
   ============================================================ */
.dmi-card {
    background: var(--bg-secondary);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius);
    box-shadow: var(--glass-shadow);
    padding: 24px;
    transition: var(--transition);
}

.dmi-card:hover { box-shadow: var(--glass-shadow-lg); }

.dmi-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.dmi-card-header h3 {
    font-size: 1rem;
    font-weight: 600;
}

/* ============================================================
   STAT CARDS
   ============================================================ */
.stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.stat-card {
    background: var(--bg-secondary);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius);
    padding: 20px;
    display: flex;
    align-items: flex-start;
    gap: 16px;
    box-shadow: var(--glass-shadow);
    transition: var(--transition);
}

.stat-card:hover {
    box-shadow: var(--glass-shadow-lg);
    transform: translateY(-2px);
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.stat-icon.accent { background: rgba(91,78,229,0.1); color: var(--accent-1); }
.stat-icon.success { background: var(--success-bg); color: var(--success); }
.stat-icon.error { background: var(--error-bg); color: var(--error); }
.stat-icon.warning { background: var(--warning-bg); color: var(--warning); }
.stat-icon.info { background: var(--info-bg); color: var(--info); }

.stat-info h4 {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 4px;
}

.stat-info .stat-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.2;
    font-family: 'Poppins', sans-serif;
}

.stat-info .stat-sub {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 4px;
}

/* ============================================================
   BUTTONS
   ============================================================ */
.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: var(--accent-gradient);
    color: #fff;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    font-family: 'Inter', sans-serif;
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(91,78,229,0.35);
}

.btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: var(--bg-secondary);
    color: var(--text-primary);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    font-family: 'Inter', sans-serif;
}

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

.btn-sm {
    padding: 6px 14px;
    font-size: 0.78rem;
    border-radius: var(--radius-xs);
}

.btn-danger {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: var(--error);
    color: #fff;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    font-family: 'Inter', sans-serif;
}

.btn-danger:hover { background: #B91C1C; }

.btn-success {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: var(--success);
    color: #fff;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    font-family: 'Inter', sans-serif;
}

/* ============================================================
   FORMS
   ============================================================ */
.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 6px;
}

.form-control {
    width: 100%;
    padding: 10px 14px;
    background: var(--bg-primary);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    color: var(--text-primary);
    transition: var(--transition);
    font-family: 'Inter', sans-serif;
    outline: none;
}

.form-control:focus {
    border-color: var(--accent-1);
    box-shadow: 0 0 0 3px rgba(91,78,229,0.12);
}

select.form-control {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236B7280' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
}

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

/* ============================================================
   TABLE
   ============================================================ */
.dmi-table-wrap {
    overflow-x: auto;
    border-radius: var(--radius);
    border: 1px solid var(--glass-border);
}

.dmi-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
}

.dmi-table thead th {
    background: var(--bg-primary);
    padding: 12px 16px;
    text-align: left;
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-muted);
    border-bottom: 1px solid var(--glass-border);
    white-space: nowrap;
}

.dmi-table tbody td {
    padding: 12px 16px;
    border-bottom: 1px solid rgba(0,0,0,0.04);
    color: var(--text-primary);
}

.dmi-table tbody tr:hover {
    background: rgba(91,78,229,0.02);
}

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

/* ============================================================
   BADGES
   ============================================================ */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.72rem;
    font-weight: 600;
    white-space: nowrap;
}

.badge-success { background: var(--success-bg); color: var(--success); }
.badge-error { background: var(--error-bg); color: var(--error); }
.badge-warning { background: var(--warning-bg); color: var(--warning); }
.badge-info { background: var(--info-bg); color: var(--info); }
.badge-accent { background: rgba(91,78,229,0.1); color: var(--accent-1); }
.badge-active { background: var(--success-bg); color: var(--success); }
.badge-inactive { background: rgba(0,0,0,0.06); color: var(--text-muted); }
.badge-draft { background: rgba(0,0,0,0.06); color: var(--text-muted); }
.badge-pending { background: var(--warning-bg); color: var(--warning); }
.badge-processing { background: var(--info-bg); color: var(--info); }
.badge-processed { background: var(--success-bg); color: var(--success); }
.badge-uploaded { background: var(--warning-bg); color: var(--warning); }
.badge-expired { background: var(--error-bg); color: var(--error); }
.badge-signed { background: rgba(91,78,229,0.1); color: var(--accent-1); }
.badge-critical { background: var(--error-bg); color: var(--error); }
.badge-high { background: rgba(234,88,12,0.1); color: #EA580C; }
.badge-medium { background: var(--warning-bg); color: var(--warning); }
.badge-low { background: var(--info-bg); color: var(--info); }

/* ============================================================
   MODAL
   ============================================================ */
.dmi-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.4);
    backdrop-filter: blur(4px);
    z-index: 100;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.dmi-modal-overlay.show { display: flex; }

.dmi-modal {
    background: var(--bg-secondary);
    border-radius: var(--radius);
    box-shadow: var(--glass-shadow-lg);
    width: 100%;
    max-width: 560px;
    max-height: 85vh;
    overflow-y: auto;
    animation: modalSlideIn 0.25s ease;
}

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

.dmi-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid var(--glass-border);
}

.dmi-modal-header h3 { font-size: 1.05rem; font-weight: 600; }

.dmi-modal-close {
    background: none;
    border: none;
    font-size: 1.2rem;
    color: var(--text-muted);
    cursor: pointer;
    padding: 4px;
    transition: var(--transition);
}

.dmi-modal-close:hover { color: var(--error); }

.dmi-modal-body { padding: 24px; }

.dmi-modal-footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    padding: 16px 24px;
    border-top: 1px solid var(--glass-border);
}

/* ============================================================
   PAGINATION
   ============================================================ */
.pagination {
    display: flex;
    align-items: center;
    gap: 8px;
    justify-content: center;
    margin-top: 20px;
}

.pagination button {
    padding: 8px 14px;
    border: 1px solid var(--glass-border);
    background: var(--bg-secondary);
    border-radius: var(--radius-xs);
    font-size: 0.8rem;
    cursor: pointer;
    transition: var(--transition);
    color: var(--text-secondary);
    font-family: 'Inter', sans-serif;
}

.pagination button:hover { border-color: var(--accent-1); color: var(--accent-1); }
.pagination button.active { background: var(--accent-gradient); color: #fff; border-color: transparent; }
.pagination button:disabled { opacity: 0.4; cursor: not-allowed; }

/* ============================================================
   SKELETON LOADER
   ============================================================ */
.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: var(--radius-sm);
}

@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

.skeleton-text { height: 14px; margin-bottom: 8px; }
.skeleton-title { height: 24px; width: 60%; margin-bottom: 12px; }
.skeleton-card { height: 120px; }

/* ============================================================
   TOAST
   ============================================================ */
.dmi-toast-container {
    position: fixed;
    top: 80px;
    right: 24px;
    z-index: 200;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.dmi-toast {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 20px;
    background: var(--bg-secondary);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-sm);
    box-shadow: var(--glass-shadow-lg);
    font-size: 0.85rem;
    min-width: 300px;
    animation: toastIn 0.3s ease;
}

@keyframes toastIn {
    from { opacity: 0; transform: translateX(60px); }
    to { opacity: 1; transform: translateX(0); }
}

.dmi-toast.success { border-left: 4px solid var(--success); }
.dmi-toast.error { border-left: 4px solid var(--error); }
.dmi-toast.warning { border-left: 4px solid var(--warning); }
.dmi-toast.info { border-left: 4px solid var(--accent-1); }

/* ============================================================
   PAGE HEADER
   ============================================================ */
.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 24px;
}

.page-header h1 {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.page-header p {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-top: 4px;
}

/* ============================================================
   GRID HELPERS
   ============================================================ */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }

/* ============================================================
   FILTER BAR
   ============================================================ */
.filter-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.filter-bar .search-input {
    flex: 1;
    min-width: 200px;
    padding: 10px 14px 10px 38px;
    background: var(--bg-secondary);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    color: var(--text-primary);
    outline: none;
    transition: var(--transition);
    font-family: 'Inter', sans-serif;
    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='%239CA3AF' stroke-width='2'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cline x1='21' y1='21' x2='16.65' y2='16.65'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: 12px center;
}

.filter-bar .search-input:focus {
    border-color: var(--accent-1);
    box-shadow: 0 0 0 3px rgba(91,78,229,0.12);
}

/* ============================================================
   CHART CONTAINER
   ============================================================ */
.chart-container {
    width: 100%;
    height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ============================================================
   EMPTY STATE
   ============================================================ */
.empty-state {
    text-align: center;
    padding: 48px 20px;
    color: var(--text-muted);
}

.empty-state i {
    font-size: 3rem;
    margin-bottom: 16px;
    color: var(--text-muted);
    opacity: 0.4;
}

.empty-state h3 {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.empty-state p { font-size: 0.85rem; }

/* ============================================================
   ANIMATIONS
   ============================================================ */
.fade-in { animation: fadeInUp 0.4s ease; }

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

/* ============================================================
   ALERT BADGE
   ============================================================ */
.alert-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    width: 18px;
    height: 18px;
    background: var(--error);
    color: #fff;
    border-radius: 50%;
    font-size: 0.6rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
}

/* ============================================================
   LOGIN PAGE
   ============================================================ */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-primary);
    padding: 20px;
}

.login-card {
    background: var(--bg-secondary);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius);
    box-shadow: var(--glass-shadow-lg);
    padding: 40px;
    width: 100%;
    max-width: 420px;
    animation: fadeInUp 0.5s ease;
}

.login-card .login-logo {
    text-align: center;
    margin-bottom: 32px;
}

.login-card .login-logo .logo-circle {
    width: 64px;
    height: 64px;
    background: var(--accent-gradient);
    border-radius: 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: #fff;
    box-shadow: 0 8px 24px rgba(91,78,229,0.3);
    margin-bottom: 16px;
}

.login-card .login-logo h1 {
    font-size: 1.35rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.login-card .login-logo p {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-top: 4px;
}

.login-card .form-group { margin-bottom: 20px; }

.login-card .btn-primary {
    width: 100%;
    justify-content: center;
    padding: 12px 20px;
    font-size: 0.9rem;
}

.login-msg {
    text-align: center;
    font-size: 0.82rem;
    padding: 10px;
    border-radius: var(--radius-xs);
    margin-bottom: 16px;
}

.login-msg.error { background: var(--error-bg); color: var(--error); }
.login-msg.success { background: var(--success-bg); color: var(--success); }

/* ============================================================
   TABS
   ============================================================ */
.dmi-tabs {
    display: flex;
    gap: 4px;
    border-bottom: 1px solid var(--glass-border);
    margin-bottom: 20px;
}

.dmi-tabs button {
    padding: 10px 20px;
    background: none;
    border: none;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-muted);
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: var(--transition);
    font-family: 'Inter', sans-serif;
}

.dmi-tabs button:hover { color: var(--text-primary); }
.dmi-tabs button.active { color: var(--accent-1); border-bottom-color: var(--accent-1); font-weight: 600; }

/* ============================================================
   PROGRESS BAR
   ============================================================ */
.progress-bar {
    width: 100%;
    height: 8px;
    background: rgba(0,0,0,0.06);
    border-radius: 4px;
    overflow: hidden;
}

.progress-bar .progress-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 0.5s ease;
}

.progress-fill.accent { background: var(--accent-gradient); }
.progress-fill.success { background: var(--success); }
.progress-fill.warning { background: var(--warning); }
.progress-fill.error { background: var(--error); }

/* ============================================================
   UPLOAD ZONE
   ============================================================ */
.upload-zone {
    border: 2px dashed var(--glass-border);
    border-radius: var(--radius);
    padding: 48px 24px;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    background: var(--bg-primary);
}

.upload-zone:hover {
    border-color: var(--accent-1);
    background: rgba(91,78,229,0.02);
}

.upload-zone.dragover {
    border-color: var(--accent-1);
    background: rgba(91,78,229,0.06);
}

.upload-zone i {
    font-size: 2.5rem;
    color: var(--accent-1);
    margin-bottom: 12px;
    opacity: 0.6;
}

.upload-zone h3 {
    font-size: 1rem;
    margin-bottom: 8px;
}

.upload-zone p {
    font-size: 0.82rem;
    color: var(--text-muted);
}

/* ============================================================
   DOCUMENT GRID
   ============================================================ */
.doc-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
}

.doc-card {
    background: var(--bg-secondary);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius);
    padding: 20px;
    transition: var(--transition);
    cursor: pointer;
}

.doc-card:hover {
    box-shadow: var(--glass-shadow-lg);
    transform: translateY(-2px);
}

.doc-card .doc-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    margin-bottom: 12px;
}

.doc-card .doc-icon.pdf { background: var(--error-bg); color: var(--error); }
.doc-card .doc-icon.doc { background: var(--info-bg); color: var(--info); }
.doc-card .doc-icon.xls { background: var(--success-bg); color: var(--success); }
.doc-card .doc-icon.img { background: rgba(91,78,229,0.1); color: var(--accent-1); }
.doc-card .doc-icon.default { background: rgba(0,0,0,0.06); color: var(--text-muted); }

.doc-card .doc-title {
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 4px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.doc-card .doc-meta {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* ============================================================
   COMPARISON VIEW
   ============================================================ */
.compare-panel {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.compare-side {
    background: var(--bg-secondary);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius);
    padding: 20px;
    min-height: 400px;
}

.compare-diff {
    background: var(--error-bg);
    padding: 2px 4px;
    border-radius: 3px;
}

.compare-match {
    background: var(--success-bg);
    padding: 2px 4px;
    border-radius: 3px;
}

/* ============================================================
   COMPLIANCE METER
   ============================================================ */
.compliance-score {
    display: flex;
    align-items: center;
    gap: 12px;
}

.compliance-ring {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: conic-gradient(var(--success) var(--score-pct, 0%), rgba(0,0,0,0.06) 0%);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.compliance-ring::before {
    content: '';
    width: 48px;
    height: 48px;
    background: var(--bg-secondary);
    border-radius: 50%;
    position: absolute;
}

.compliance-ring span {
    position: relative;
    z-index: 1;
    font-size: 0.85rem;
    font-weight: 700;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 768px) {
    .dmi-sidebar { transform: translateX(-100%); }
    .dmi-sidebar.open { transform: translateX(0); }
    .sidebar-overlay { display: none; }
    .sidebar-overlay.show { display: block; }
    .dmi-topbar { left: 0; }
    .dmi-main { margin-left: 0; }
    .hamburger-btn { display: block; }
    .stat-grid { grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }
    .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
    .page-header { flex-direction: column; align-items: flex-start; }
    .filter-bar { flex-direction: column; }
    .filter-bar .search-input { width: 100%; }
    .compare-panel { grid-template-columns: 1fr; }
    .doc-grid { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
    .dmi-main { padding: 16px; }
    .dmi-card { padding: 16px; }
    .stat-card { padding: 16px; }
    .login-card { padding: 24px; }
}
