:root {
    --primary: #4f46e5; /* Indigo 600 */
    --primary-hover: #4338ca;
    --sidebar-bg: #1e293b; /* Slate 800 */
    --sidebar-text: #94a3b8;
    --sidebar-active: #ffffff;
    --sidebar-active-bg: #334155;
    --background: #f8fafc;
    --card-bg: #ffffff;
    --text-main: #1e293b;
    --text-muted: #64748b;
    --border: #e2e8f0;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --accent: #8b5cf6;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', 'Sarabun', sans-serif;
}

body {
    background-color: var(--background);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Auth Pages */
.auth-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #4f46e5 0%, #1e293b 100%);
}

.auth-card {
    background: var(--card-bg);
    padding: 2.5rem;
    border-radius: 1.25rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.2);
    width: 100%;
    max-width: 420px;
}

/* Layout */
.dashboard-layout {
    display: grid;
    grid-template-columns: 260px 1fr;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    background-color: var(--sidebar-bg);
    color: var(--sidebar-text);
    padding: 1.5rem 1rem;
    display: flex;
    flex-direction: column;
}

.sidebar-brand {
    font-size: 1.25rem;
    font-weight: 800;
    color: white;
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 1rem;
    min-height: 60px;
}

.sidebar-brand i.fa-shield-alt {
    font-size: 1.75rem;
    color: var(--primary);
    background: white;
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
}

.sidebar-nav {
    list-style: none;
    flex-grow: 1;
}

.sidebar-nav li {
    margin-bottom: 0.25rem;
}

.sidebar-nav a {
    color: var(--sidebar-text);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 1rem;
    border-radius: 0.75rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

.sidebar-nav a:hover {
    background-color: var(--sidebar-active-bg);
    color: white;
}

.sidebar-nav a.active {
    background-color: var(--primary);
    color: white;
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
}

.sidebar-divider {
    height: 1px;
    background: rgba(255,255,255,0.1);
    margin: 1.5rem 1rem;
}

.sidebar-section-title {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 700;
    margin-bottom: 0.75rem;
    padding: 0 1rem;
    color: #475569;
}

/* Main Content */
.main-content {
    padding: 2.5rem;
    max-width: 1400px;
}

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2.5rem;
}

.header-info h1 {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--text-main);
    letter-spacing: -0.025em;
}

.header-info p {
    color: var(--text-muted);
}

/* UI Elements */
.card {
    background: var(--card-bg);
    border-radius: 1rem;
    padding: 1.5rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05), 0 1px 2px rgba(0,0,0,0.06);
    border: 1px solid var(--border);
    margin-bottom: 2rem;
}

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

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-main);
}

.form-control, .form-select {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border);
    border-radius: 0.75rem;
    font-size: 0.95rem;
    transition: all 0.2s;
    background-color: #fcfcfd;
}

.form-control:focus, .form-select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.1);
    background-color: white;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.25rem;
    border-radius: 0.75rem;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
    gap: 0.5rem;
}

.btn-primary { background-color: var(--primary); color: white; }
.btn-primary:hover { background-color: var(--primary-hover); transform: translateY(-1px); box-shadow: 0 4px 12px rgba(79, 70, 229, 0.2); }

.btn-success { background-color: var(--success); color: white; }
.btn-success:hover { background-color: #059669; transform: translateY(-1px); box-shadow: 0 4px 12px rgba(16, 185, 129, 0.2); }

.btn-warning { background-color: var(--warning); color: white; }
.btn-warning:hover { background-color: #d97706; transform: translateY(-1px); box-shadow: 0 4px 12px rgba(245, 158, 11, 0.2); }

.btn-danger { background-color: var(--danger); color: white; }
.btn-danger:hover { background-color: #dc2626; transform: translateY(-1px); box-shadow: 0 4px 12px rgba(239, 68, 68, 0.2); }

.btn-info { background-color: #0ea5e9; color: white; }
.btn-info:hover { background-color: #0284c7; transform: translateY(-1px); box-shadow: 0 4px 12px rgba(14, 165, 233, 0.2); }

.btn-sm { padding: 0.375rem 0.75rem; font-size: 0.8125rem; }

.btn-line {
    background-color: #06c755;
    color: white;
    width: 100%;
}
.btn-line:hover {
    background-color: #05b04a;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(6, 199, 85, 0.2);
}

.btn-light {
    background-color: #f1f5f9;
    color: #475569;
}

.btn-light:hover {
    background-color: #e2e8f0;
}

/* Badges */
.badge {
    padding: 0.375rem 0.75rem;
    border-radius: 0.5rem;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
}

.badge-pending { background-color: #f1f5f9; color: #475569; }
.badge-verifying { background-color: #fef3c7; color: #d97706; }
.badge-verified { background-color: #d1fae5; color: #059669; }
.badge-reported { background-color: #e0e7ff; color: #4f46e5; }

.badge-real { background-color: #d1fae5; color: #059669; }
.badge-fake { background-color: #fee2e2; color: #dc2626; }
.badge-distorted { background-color: #fef3c7; color: #d97706; }
.badge-inconclusive { background-color: #f1f5f9; color: #475569; }

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

.detail-item label {
    display: block;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    margin-bottom: 0.25rem;
}

.detail-item p {
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-main);
    margin: 0;
}

.info-section-title {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border);
}
.table-responsive {
    overflow-x: auto;
    border-radius: 0.75rem;
}

table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

th {
    background-color: #f8fafc;
    text-align: left;
    padding: 1rem;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 700;
    color: var(--text-muted);
    border-bottom: 1px solid var(--border);
}

td {
    padding: 1.25rem 1rem;
    border-bottom: 1px solid var(--border);
    font-size: 0.95rem;
}

tr:last-child td {
    border-bottom: none;
}

tr:hover td {
    background-color: #fcfcfd;
}

/* Utilities */
.text-primary { color: var(--primary) !important; }
.fw-bold { font-weight: 700 !important; }
.mt-4 { margin-top: 1.5rem !important; }

/* Responsive */
@media (max-width: 992px) {
    .dashboard-layout {
        grid-template-columns: 1fr;
    }
    .sidebar {
        position: fixed;
        left: -100%;
        top: 0;
        bottom: 0;
        z-index: 1050;
        width: 280px;
        transition: left 0.3s ease;
        box-shadow: 20px 0 50px rgba(0,0,0,0.1);
    }
    .sidebar.active {
        left: 0;
    }
    .main-content {
        padding: 1rem;
    }
    .header {
        margin-bottom: 1.5rem;
        gap: 1rem;
    }
    .header-info h1 {
        font-size: 1.25rem;
    }
    .header-info p {
        font-size: 0.875rem;
    }
    .mobile-toggle {
        display: flex !important;
    }
    .mobile-close {
        display: flex !important;
    }
}

.mobile-toggle {
    display: none;
    background: white;
    border: 1px solid var(--border);
    width: 40px;
    height: 40px;
    border-radius: 10px;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text-main);
    flex-shrink: 0;
}

.mobile-close {
    display: none;
    background: rgba(255,255,255,0.1);
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: white;
    margin-left: auto;
}

.header {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 2.5rem;
}

.header-info {
    flex-grow: 1;
}

/* Mobile transformation for tables */
@media (max-width: 768px) {
    .table-responsive td:before {
        font-size: 0.75rem;
    }
}
