/**
 * EVOYOU Diagnostic Assessment System
 * Custom Stylesheet & Design System Tokens (shadcn-inspired)
 */

:root {
    --primary-dark: #0f172a;
    --primary-foreground: #f8fafc;
    --header-table: #1E293B;
    --header-table-foreground: #ecfdf5;
    --accent: #0284c7;
    --accent-hover: #0369a1;
    --muted: #f1f5f9;
    --muted-foreground: #64748b;
    --border: #e2e8f0;
    --card: #ffffff;
    --card-foreground: #0f172a;
    --ring: rgba(2, 132, 199, 0.4);
    --radius-sm: 0.25rem;
    --radius-md: 0.375rem;
    --radius-lg: 0.5rem;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: #1e293b;
    background-color: #f8fafc;
    -webkit-font-smoothing: antialiased;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: #f1f5f9;
}

::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 9999px;
}

::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* shadcn-inspired focus ring */
.focus-ring:focus-visible {
    outline: none;
    box-shadow: 0 0 0 2px #ffffff, 0 0 0 4px var(--accent);
}

/* Table Dark Green Header Standard */
.table-header-darkgreen {
    background-color: #064E3B !important;
    color: #FFFFFF !important;
}

.table-header-darkgreen th {
    background-color: #064E3B !important;
    color: #FFFFFF !important;
    font-weight: 600 !important;
    letter-spacing: 0.025em;
    font-size: 12px !important;
    padding: 10px 16px !important;
}

/* Table Dark Gray Header Standard */
.table-header-darkgray {
    background-color: #1E293B !important;
    color: #FFFFFF !important;
}

.table-header-darkgray th {
    background-color: #1E293B !important;
    color: #FFFFFF !important;
    font-weight: 600 !important;
    letter-spacing: 0.025em;
    font-size: 12px !important;
    padding: 10px 16px !important;
}

/* Custom Table Specification: default 2px radius (overridable by rounded-xl), odd #FFFFFF, even #FCFDFE, hover #F7F7F7, dashed border */
.table-container-custom {
    border-radius: 2px;
    overflow: hidden !important;
    border: 1px solid #e2e8f0;
    background-color: #FFFFFF;
}

.table-container-custom.rounded-xl,
.rounded-xl.table-container-custom {
    border-radius: 0.75rem !important;
}

.table-custom {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px !important;
}

.table-custom thead {
    background-color: #064E3B !important;
}

.table-custom thead th {
    background-color: #064E3B !important;
    color: #FFFFFF !important;
    font-size: 12px !important;
    font-weight: 600 !important;
    padding: 10px 16px !important;
    text-align: left;
    border-bottom: none;
}

/* Table Dark Gray Header Standard */
.table-header-darkgray,
.table-custom-darkgray thead,
.table-custom-darkgray thead th,
.table-custom thead.table-header-darkgray,
.table-custom thead.table-header-darkgray th,
.table-custom.table-custom-darkgray thead,
.table-custom.table-custom-darkgray thead th,
.table-custom thead.bg-gray-800,
.table-custom thead.bg-gray-800 th,
.table-custom thead tr.bg-gray-800,
.table-custom thead tr.bg-gray-800 th,
.table-custom thead th.bg-gray-800,
thead.bg-gray-800,
thead.bg-gray-800 th,
thead.bg-gray-800 tr,
tr.bg-gray-800 th,
.table-pembayaran thead,
.table-pembayaran thead th,
.table-role-access thead,
.table-role-access thead th,
.table-roles-access thead,
.table-roles-access thead th {
    background-color: #1f2937 !important;
    /* Tailwind bg-gray-800 / Dark Gray */
    color: #FFFFFF !important;
}

.table-custom tbody tr {
    transition: background-color 0.15s ease;
    border-bottom: 1px dashed #e2e8f0 !important;
}

/* ==========================================================================
   Border Antar Record Tabel - Modul-modul Data Master
   Pengaturan: border-2 border-dashed border-gray-400 (#9ca3af)
   Ubah di sini dengan mudah untuk mengganti ketebalan, jenis garis, atau warna:
   ========================================================================== */
.table-master-data tbody tr,
.table-custom.table-master-data tbody tr,
.table-paket-soal tbody tr,
.table-custom.table-paket-soal tbody tr {
    border-bottom: 2px dashed #9ca3af !important;
}

/* ==========================================================================
   Border Antar Record Tabel - Modul-modul Bank Soal
   Pengaturan: border-2 border-dashed border-gray-400 (#9ca3af)
   Ubah di sini dengan mudah untuk mengganti ketebalan, jenis garis, atau warna:
   ========================================================================== */
.table-bank-soal tbody tr,
.table-custom.table-bank-soal tbody tr {
    border-bottom: 2px dashed #9ca3af !important;
    border-top: none !important;
}

/* ==========================================================================
   Border Antar Record Tabel - Modul Pembayaran (/admin/pembayaran)
   Pengaturan: border-2 border-dashed border-gray-400 (#9ca3af)
   Ubah di sini dengan mudah untuk mengganti ketebalan, jenis garis, atau warna:
   ========================================================================== */
.table-pembayaran tbody tr,
.table-custom.table-pembayaran tbody tr {
    border-bottom: 2px dashed #9ca3af !important;
    border-top: none !important;
}

/* ==========================================================================
   Border Antar Record Tabel - Modul Manajemen Hak Akses (/admin/roles-access)
   Pengaturan: border-2 border-dashed border-gray-400 (#9ca3af)
   Ubah di sini dengan mudah untuk mengganti ketebalan, jenis garis, atau warna:
   ========================================================================== */
.table-role-access tbody tr,
.table-custom.table-role-access tbody tr,
.table-roles-access tbody tr,
.table-custom.table-roles-access tbody tr {
    border-bottom: 2px dashed #9ca3af !important;
    border-top: none !important;
}

.table-custom tbody tr:nth-child(odd) {
    background-color: #FFFFFF !important;
}

.table-custom tbody tr:nth-child(even) {
    background-color: #FCFDFE !important;
}

.table-custom tbody tr:hover {
    background-color: #F7F7F7 !important;
}

.table-custom tbody td {
    padding: 10px 16px !important;
    font-size: 12px !important;
    color: #1e293b;
    vertical-align: middle;
}

/* Pagination Specification: transparent outside table, uniform 12px text */
.pagination-container-custom {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    font-size: 12px !important;
}

.pagination-container-custom button,
.pagination-container-custom select,
.pagination-container-custom span,
.pagination-container-custom label {
    font-size: 12px !important;
}

/* Glassmorphism subtle */
.glass-panel {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(226, 232, 240, 0.8);
}

/* Alpine transition helper */
[x-cloak] {
    display: none !important;
}