/* ==============================================
   Indonesia Hijabfest Ramadhan 2026
   Dark Theme + Blue Accent (#3B82F6)
   ============================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

/* ===== CSS Variables ===== */
:root {
    --bg-primary: #0a0a0f;
    --bg-secondary: #111118;
    --bg-card: #16161f;
    --bg-card-hover: #1c1c28;
    --bg-input: #1a1a25;
    --bg-glass: rgba(22, 22, 31, 0.8);
    --border-color: rgba(59, 130, 246, 0.15);
    --border-subtle: rgba(255, 255, 255, 0.06);
    --accent: #3B82F6;
    --accent-hover: #2563EB;
    --accent-glow: rgba(59, 130, 246, 0.25);
    --accent-light: rgba(59, 130, 246, 0.1);
    --text-primary: #f0f0f5;
    --text-secondary: #9ca3af;
    --text-muted: #6b7280;
    --success: #10b981;
    --success-bg: rgba(16, 185, 129, 0.1);
    --warning: #f59e0b;
    --warning-bg: rgba(245, 158, 11, 0.1);
    --danger: #ef4444;
    --danger-bg: rgba(239, 68, 68, 0.1);
    --info: #06b6d4;
    --info-bg: rgba(6, 182, 212, 0.1);
    --radius: 12px;
    --radius-sm: 8px;
    --radius-lg: 16px;
    --shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.5);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ===== Reset & Base ===== */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
}

/* ===== Animated Background ===== */
.bg-pattern {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background:
        radial-gradient(ellipse at 20% 50%, rgba(59, 130, 246, 0.06) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 20%, rgba(59, 130, 246, 0.04) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 80%, rgba(99, 102, 241, 0.03) 0%, transparent 50%);
    z-index: 0;
    pointer-events: none;
}

/* ===== Typography ===== */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.3;
}

h1 { font-size: 2.25rem; }
h2 { font-size: 1.75rem; }
h3 { font-size: 1.375rem; }
h4 { font-size: 1.125rem; }

a {
    color: var(--accent);
    text-decoration: none;
    transition: var(--transition);
}
a:hover { color: var(--accent-hover); }

/* ===== Container ===== */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.container-sm { max-width: 580px; }
.container-md { max-width: 800px; }

/* ===== Public Page Layout ===== */
.public-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
    position: relative;
    z-index: 1;
}

.registration-card {
    width: 100%;
    max-width: 520px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 2.5rem;
    box-shadow: var(--shadow-lg);
    backdrop-filter: blur(20px);
    position: relative;
    overflow: hidden;
    animation: fadeInUp 0.6s ease-out;
}

.registration-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--accent), #8b5cf6, var(--accent));
    background-size: 200% 100%;
    animation: shimmer 3s linear infinite;
}

@keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.brand-header {
    text-align: center;
    margin-bottom: 2rem;
}

.brand-header .logo {
    width: 60px;
    height: 60px;
    margin: 0 auto 1rem;
    background: linear-gradient(135deg, var(--accent), #8b5cf6);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 800;
    color: white;
    box-shadow: 0 4px 20px var(--accent-glow);
}

.brand-header h1 {
    font-size: 1.5rem;
    background: linear-gradient(135deg, var(--text-primary), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.5rem;
}

.brand-header .subtitle {
    color: var(--text-secondary);
    font-size: 0.875rem;
    font-weight: 500;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

/* ===== Forms ===== */
.form-group {
    margin-bottom: 1.25rem;
}

.form-group label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    background: var(--bg-input);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-family: inherit;
    font-size: 0.95rem;
    transition: var(--transition);
    outline: none;
}

.form-control:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-glow);
    background: var(--bg-secondary);
}

.form-control::placeholder {
    color: var(--text-muted);
}

.form-control.error {
    border-color: var(--danger);
    box-shadow: 0 0 0 3px var(--danger-bg);
}

select.form-control {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%239ca3af' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10l-5 5z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    padding-right: 2.5rem;
}

textarea.form-control {
    resize: vertical;
    min-height: 80px;
}

/* ===== Honeypot ===== */
.hp-field {
    position: absolute;
    left: -9999px;
    opacity: 0;
    height: 0;
    overflow: hidden;
}

/* ===== Checkbox ===== */
.checkbox-group {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    margin: 1.5rem 0;
}

.checkbox-group input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--accent);
    margin-top: 2px;
    flex-shrink: 0;
    cursor: pointer;
}

.checkbox-group label {
    font-size: 0.85rem;
    color: var(--text-secondary);
    cursor: pointer;
    line-height: 1.5;
    margin-bottom: 0;
}

/* ===== Buttons ===== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    line-height: 1.4;
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent), #2563EB);
    color: white;
    box-shadow: 0 4px 16px var(--accent-glow);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 24px var(--accent-glow);
    color: white;
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.btn-secondary {
    background: var(--bg-input);
    color: var(--text-primary);
    border: 1px solid var(--border-subtle);
}

.btn-secondary:hover {
    background: var(--bg-card-hover);
    border-color: var(--border-color);
    color: var(--text-primary);
}

.btn-success {
    background: linear-gradient(135deg, var(--success), #059669);
    color: white;
}
.btn-success:hover {
    transform: translateY(-2px);
    color: white;
}

.btn-danger {
    background: linear-gradient(135deg, var(--danger), #dc2626);
    color: white;
}
.btn-danger:hover { transform: translateY(-2px); color: white; }

.btn-outline {
    background: transparent;
    color: var(--accent);
    border: 1px solid var(--accent);
}
.btn-outline:hover {
    background: var(--accent-light);
    color: var(--accent);
}

.btn-sm {
    padding: 0.4rem 0.85rem;
    font-size: 0.8rem;
    border-radius: 6px;
}

.btn-lg {
    padding: 0.9rem 2rem;
    font-size: 1.05rem;
}

.btn-block {
    width: 100%;
}

.btn-group {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

/* ===== Alerts ===== */
.alert {
    padding: 0.85rem 1.15rem;
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    animation: slideDown 0.3s ease-out;
    border: 1px solid;
}

.alert-icon {
    font-size: 1.1rem;
    flex-shrink: 0;
    margin-top: 1px;
}

.alert-danger {
    background: var(--danger-bg);
    border-color: rgba(239, 68, 68, 0.3);
    color: #fca5a5;
}

.alert-success {
    background: var(--success-bg);
    border-color: rgba(16, 185, 129, 0.3);
    color: #6ee7b7;
}

.alert-warning {
    background: var(--warning-bg);
    border-color: rgba(245, 158, 11, 0.3);
    color: #fcd34d;
}

.alert-info {
    background: var(--info-bg);
    border-color: rgba(6, 182, 212, 0.3);
    color: #67e8f9;
}

/* ===== Success / Result Card ===== */
.result-card {
    text-align: center;
    animation: fadeInUp 0.5s ease-out;
}

.result-card .success-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 1.5rem;
    background: var(--success-bg);
    border: 2px solid var(--success);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
}

.result-card h2 {
    font-size: 1.4rem;
    margin-bottom: 0.5rem;
}

.result-card .reg-id {
    display: inline-block;
    font-family: 'Inter', monospace;
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--accent);
    background: var(--accent-light);
    padding: 0.5rem 1.25rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
    margin: 1rem 0;
    letter-spacing: 0.05em;
}

.result-card .qr-container {
    margin: 1.5rem auto;
    padding: 1.5rem;
    background: white;
    border-radius: var(--radius);
    display: inline-block;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.result-card .qr-container canvas {
    display: block;
}

.result-card .ticket-link {
    display: block;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 0.75rem;
    word-break: break-all;
}

/* ===== Admin Layout ===== */
.admin-layout {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 260px;
    background: var(--bg-secondary);
    border-right: 1px solid var(--border-subtle);
    padding: 1.5rem 0;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    overflow-y: auto;
    z-index: 100;
    transition: transform 0.3s ease;
}

.sidebar-brand {
    padding: 0 1.25rem 1.5rem;
    border-bottom: 1px solid var(--border-subtle);
    margin-bottom: 1rem;
}

.sidebar-brand h3 {
    font-size: 1rem;
    background: linear-gradient(135deg, var(--accent), #8b5cf6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.sidebar-brand small {
    color: var(--text-muted);
    font-size: 0.75rem;
}

.sidebar-nav {
    list-style: none;
    padding: 0 0.75rem;
}

.sidebar-nav li {
    margin-bottom: 2px;
}

.sidebar-nav a {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.65rem 1rem;
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-size: 0.875rem;
    font-weight: 500;
    transition: var(--transition);
}

.sidebar-nav a:hover {
    background: var(--accent-light);
    color: var(--text-primary);
}

.sidebar-nav a.active {
    background: linear-gradient(135deg, var(--accent-light), rgba(139, 92, 246, 0.1));
    color: var(--accent);
    border: 1px solid var(--border-color);
}

.sidebar-nav .nav-icon {
    font-size: 1.1rem;
    width: 20px;
    text-align: center;
}

.sidebar-footer {
    padding: 1rem 1.25rem;
    border-top: 1px solid var(--border-subtle);
    margin-top: 1rem;
}

.sidebar-footer .admin-info {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.main-content {
    flex: 1;
    margin-left: 260px;
    padding: 2rem;
    min-height: 100vh;
}

.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.page-header h1 {
    font-size: 1.75rem;
}

.page-header .actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

/* ===== Mobile Menu Toggle ===== */
.menu-toggle {
    display: none;
    position: fixed;
    top: 1rem;
    left: 1rem;
    z-index: 200;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 0.5rem;
    color: var(--text-primary);
    cursor: pointer;
    font-size: 1.25rem;
}

/* ===== KPI Cards ===== */
.kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.kpi-card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius);
    padding: 1.25rem;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.kpi-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 4px;
    height: 100%;
    border-radius: 4px 0 0 4px;
}

.kpi-card:nth-child(1)::before { background: var(--accent); }
.kpi-card:nth-child(2)::before { background: var(--success); }
.kpi-card:nth-child(3)::before { background: var(--warning); }
.kpi-card:nth-child(4)::before { background: var(--info); }
.kpi-card:nth-child(5)::before { background: #8b5cf6; }
.kpi-card:nth-child(6)::before { background: #ec4899; }

.kpi-card:hover {
    border-color: var(--border-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.kpi-card .kpi-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
}

.kpi-card .kpi-value {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--text-primary);
}

.kpi-card .kpi-sub {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-top: 0.25rem;
}

/* ===== Tables ===== */
.table-wrapper {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius);
    overflow: hidden;
}

.table-toolbar {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border-subtle);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

.table-toolbar .search-box {
    flex: 1;
    max-width: 320px;
}

.table-toolbar .search-box input {
    width: 100%;
    padding: 0.55rem 1rem;
    padding-left: 2.25rem;
    background: var(--bg-input);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 0.85rem;
    outline: none;
    transition: var(--transition);
}

.table-toolbar .search-box input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 2px var(--accent-glow);
}

.table-toolbar .filters {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

table {
    width: 100%;
    border-collapse: collapse;
}

table th {
    padding: 0.75rem 1rem;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    text-align: left;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-subtle);
    white-space: nowrap;
}

table td {
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
    border-bottom: 1px solid var(--border-subtle);
    vertical-align: middle;
}

table tbody tr {
    transition: var(--transition);
}

table tbody tr:hover {
    background: var(--bg-card-hover);
}

table tbody tr:nth-child(even) {
    background: rgba(255, 255, 255, 0.01);
}

table tbody tr:nth-child(even):hover {
    background: var(--bg-card-hover);
}

.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* ===== Badges / Tags ===== */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.2rem 0.65rem;
    border-radius: 100px;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    white-space: nowrap;
}

.badge-accent { background: var(--accent-light); color: var(--accent); border: 1px solid rgba(59, 130, 246, 0.3); }
.badge-success { background: var(--success-bg); color: var(--success); border: 1px solid rgba(16, 185, 129, 0.3); }
.badge-warning { background: var(--warning-bg); color: var(--warning); border: 1px solid rgba(245, 158, 11, 0.3); }
.badge-danger { background: var(--danger-bg); color: var(--danger); border: 1px solid rgba(239, 68, 68, 0.3); }
.badge-info { background: var(--info-bg); color: var(--info); border: 1px solid rgba(6, 182, 212, 0.3); }
.badge-neutral { background: rgba(107, 114, 128, 0.15); color: var(--text-secondary); border: 1px solid rgba(107, 114, 128, 0.3); }

/* ===== Tags (CRM) ===== */
.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}

.tag {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.2rem 0.6rem;
    background: var(--accent-light);
    color: var(--accent);
    border: 1px solid var(--border-color);
    border-radius: 100px;
    font-size: 0.7rem;
    font-weight: 500;
    cursor: default;
}

.tag .remove-tag {
    cursor: pointer;
    font-size: 0.85rem;
    opacity: 0.6;
    line-height: 1;
}

.tag .remove-tag:hover {
    opacity: 1;
    color: var(--danger);
}

/* ===== Cards Section ===== */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius);
    padding: 1.5rem;
    transition: var(--transition);
}

.card:hover {
    border-color: var(--border-color);
}

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border-subtle);
}

.card-header h3 {
    font-size: 1rem;
}

/* ===== Charts ===== */
.chart-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));
    gap: 1.25rem;
    margin-bottom: 2rem;
}

.chart-card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius);
    padding: 1.25rem;
}

.chart-card h4 {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.chart-card canvas {
    max-height: 280px;
}

/* ===== Scanner Page ===== */
.scanner-container {
    max-width: 600px;
    margin: 0 auto;
}

.scanner-box {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius);
    overflow: hidden;
    margin-bottom: 1.5rem;
}

.scanner-box #reader {
    width: 100%;
    border: none !important;
}

.scanner-box #reader video {
    border-radius: var(--radius-sm);
}

.scan-result {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius);
    padding: 1.5rem;
    animation: fadeInUp 0.4s ease-out;
}

.scan-result.success {
    border-color: rgba(16, 185, 129, 0.4);
}

.scan-result.error {
    border-color: rgba(239, 68, 68, 0.4);
}

.scan-result.already {
    border-color: rgba(245, 158, 11, 0.4);
}

.scan-result h3 {
    margin-bottom: 0.75rem;
}

.scan-result .participant-info {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 0.5rem 1rem;
    font-size: 0.9rem;
}

.scan-result .participant-info dt {
    color: var(--text-muted);
    font-weight: 500;
}

/* ===== Modal ===== */
.modal-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 1rem;
    animation: fadeIn 0.2s ease-out;
}

.modal {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 560px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
    animation: fadeInUp 0.3s ease-out;
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--border-subtle);
}

.modal-header h3 {
    font-size: 1.1rem;
}

.modal-close {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 1.25rem;
    padding: 0.25rem;
    transition: var(--transition);
}
.modal-close:hover { color: var(--text-primary); }

.modal-body {
    padding: 1.5rem;
}

.modal-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--border-subtle);
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
}

/* ===== Pagination ===== */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    padding: 1rem;
}

.pagination a, .pagination span {
    padding: 0.4rem 0.75rem;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 500;
    transition: var(--transition);
}

.pagination a {
    color: var(--text-secondary);
    background: var(--bg-input);
    border: 1px solid var(--border-subtle);
}

.pagination a:hover {
    background: var(--accent-light);
    border-color: var(--border-color);
    color: var(--accent);
}

.pagination .active {
    background: var(--accent);
    color: white;
    border: 1px solid var(--accent);
}

.pagination .disabled {
    opacity: 0.4;
    pointer-events: none;
}

/* ===== Login Page ===== */
.login-card {
    width: 100%;
    max-width: 420px;
    margin: 0 auto;
}

/* ===== Ticket Page ===== */
.ticket-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
    position: relative;
    z-index: 1;
}

.ticket-card {
    width: 100%;
    max-width: 460px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    animation: fadeInUp 0.6s ease-out;
}

.ticket-card .ticket-header {
    background: linear-gradient(135deg, var(--accent), #1d4ed8);
    padding: 1.5rem;
    text-align: center;
}

.ticket-card .ticket-header h2 {
    font-size: 1.15rem;
    color: white;
    margin-bottom: 0.25rem;
}

.ticket-card .ticket-header p {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.7);
}

.ticket-card .ticket-body {
    padding: 1.5rem;
    text-align: center;
}

.ticket-card .ticket-info {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 0.5rem 1rem;
    text-align: left;
    font-size: 0.9rem;
    margin: 1.25rem 0;
}

.ticket-card .ticket-info dt {
    color: var(--text-muted);
    font-weight: 500;
}

.ticket-card .ticket-info dd {
    color: var(--text-primary);
    font-weight: 600;
}

.ticket-card .ticket-qr {
    margin: 1.25rem auto;
    padding: 1.25rem;
    background: white;
    border-radius: var(--radius);
    display: inline-block;
}

.ticket-card .ticket-footer {
    padding: 1.25rem 1.5rem;
    border-top: 1px solid var(--border-subtle);
    text-align: center;
}

/* ===== Detail Page (Participant/Contact) ===== */
.detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
}

.detail-grid .full-width {
    grid-column: 1 / -1;
}

.info-group {
    margin-bottom: 1rem;
}

.info-group label {
    display: block;
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.25rem;
}

.info-group .value {
    font-size: 0.95rem;
    font-weight: 600;
}

/* ===== Filter Bar ===== */
.filter-bar {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius);
    padding: 1rem 1.25rem;
    margin-bottom: 1.25rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: flex-end;
}

.filter-bar .filter-group {
    flex: 1;
    min-width: 150px;
}

.filter-bar .filter-group label {
    display: block;
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: 0.3rem;
}

.filter-bar .filter-group input,
.filter-bar .filter-group select {
    width: 100%;
    padding: 0.5rem 0.75rem;
    background: var(--bg-input);
    border: 1px solid var(--border-subtle);
    border-radius: 6px;
    color: var(--text-primary);
    font-size: 0.85rem;
    outline: none;
    transition: var(--transition);
}

.filter-bar .filter-group input:focus,
.filter-bar .filter-group select:focus {
    border-color: var(--accent);
}

.filter-bar .filter-actions {
    display: flex;
    gap: 0.5rem;
}

/* ===== Loading Spinner ===== */
.spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.loading-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

/* ===== Empty State ===== */
.empty-state {
    text-align: center;
    padding: 3rem 1.5rem;
    color: var(--text-muted);
}

.empty-state .icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.empty-state p {
    font-size: 0.9rem;
}

/* ===== Utilities ===== */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-muted { color: var(--text-muted); }
.text-accent { color: var(--accent); }
.text-success { color: var(--success); }
.text-danger { color: var(--danger); }
.text-warning { color: var(--warning); }
.text-sm { font-size: 0.8rem; }
.text-xs { font-size: 0.7rem; }
.fw-600 { font-weight: 600; }
.fw-700 { font-weight: 700; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.d-none { display: none; }
.d-flex { display: flex; }
.gap-1 { gap: 0.5rem; }
.gap-2 { gap: 1rem; }
.flex-wrap { flex-wrap: wrap; }
.align-center { align-items: center; }
.justify-between { justify-content: space-between; }

/* ===== Responsive ===== */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
    }

    .sidebar.open {
        transform: translateX(0);
    }

    .menu-toggle {
        display: flex;
    }

    .main-content {
        margin-left: 0;
        padding: 1rem;
        padding-top: 4rem;
    }

    .page-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .kpi-grid {
        grid-template-columns: 1fr 1fr;
    }

    .chart-grid {
        grid-template-columns: 1fr;
    }

    .detail-grid {
        grid-template-columns: 1fr;
    }

    .registration-card {
        padding: 1.5rem;
    }

    h1 { font-size: 1.5rem; }
    h2 { font-size: 1.25rem; }

    .filter-bar {
        flex-direction: column;
    }

    .filter-bar .filter-group {
        min-width: 100%;
    }

    .table-toolbar {
        flex-direction: column;
        align-items: stretch;
    }

    .table-toolbar .search-box {
        max-width: 100%;
    }

    .btn-group {
        flex-direction: column;
    }

    .btn-group .btn {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .kpi-grid {
        grid-template-columns: 1fr;
    }

    .registration-card {
        padding: 1.25rem;
        border-radius: var(--radius);
    }

    .brand-header h1 {
        font-size: 1.2rem;
    }

    table {
        font-size: 0.8rem;
    }

    table th, table td {
        padding: 0.5rem 0.75rem;
    }
}

/* ===== Scrollbar ===== */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--accent);
}

/* ===== Print Styles ===== */
@media print {
    .sidebar, .menu-toggle, .btn, .filter-bar, .table-toolbar {
        display: none !important;
    }

    .main-content {
        margin-left: 0 !important;
        padding: 0 !important;
    }

    body {
        background: white;
        color: black;
    }

    .card, .kpi-card, .table-wrapper {
        border: 1px solid #ddd;
        background: white;
    }
}
