/* ============================================================
   TEMA LAPAS BANJARMASIN - Biru Tua & Gold Futuristik
   ============================================================ */

:root {
    --dark-blue: #0B1D3A;
    --mid-blue: #122C54;
    --light-blue: #1A3A6B;
    --gold: #C9A227;
    --gold-light: #F5D77E;
    --gold-dim: rgba(201, 162, 39, 0.3);
    --neon-gold: rgba(245, 215, 126, 0.5);
    --text-white: #E8EDF5;
    --text-muted: #8A9BBF;
}

/* ---- Base ---- */
body {
    background: var(--dark-blue);
    color: var(--text-white);
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    min-height: 100vh;
    overflow-x: hidden;
}

/* Background pattern halus */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    background:
        radial-gradient(ellipse 80% 60% at 20% 10%, rgba(201,162,39,0.06) 0%, transparent 60%),
        radial-gradient(ellipse 60% 50% at 80% 90%, rgba(26,58,107,0.3) 0%, transparent 60%),
        repeating-linear-gradient(0deg, transparent, transparent 60px, rgba(201,162,39,0.02) 60px, rgba(201,162,39,0.02) 61px),
        repeating-linear-gradient(90deg, transparent, transparent 60px, rgba(201,162,39,0.02) 60px, rgba(201,162,39,0.02) 61px);
    pointer-events: none;
    z-index: 0;
}

main, header, footer, section {
    position: relative;
    z-index: 1;
}

/* ---- Glassmorphism Card ---- */
.glass-card {
    background: rgba(18, 44, 84, 0.55);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border: 1px solid rgba(201, 162, 39, 0.35);
    border-radius: 18px;
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.35),
        inset 0 1px 0 rgba(201, 162, 39, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.glass-card:hover {
    transform: translateY(-3px);
    box-shadow:
        0 12px 40px rgba(0, 0, 0, 0.4),
        0 0 30px rgba(201, 162, 39, 0.12),
        inset 0 1px 0 rgba(201, 162, 39, 0.15);
}

/* ---- Tombol Gold Glow ---- */
.btn-gold {
    background: linear-gradient(135deg, var(--gold), var(--gold-light));
    color: var(--dark-blue);
    font-weight: 700;
    border: none;
    border-radius: 12px;
    padding: 12px 32px;
    box-shadow: 0 0 20px rgba(201, 162, 39, 0.45);
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.btn-gold:hover {
    box-shadow: 0 0 35px rgba(245, 215, 126, 0.65);
    transform: translateY(-2px) scale(1.02);
    color: var(--dark-blue);
}
.btn-gold:active {
    transform: translateY(0) scale(0.98);
}

.btn-gold-outline {
    background: transparent;
    color: var(--gold);
    font-weight: 600;
    border: 1.5px solid var(--gold);
    border-radius: 12px;
    padding: 10px 28px;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.btn-gold-outline:hover {
    background: rgba(201, 162, 39, 0.12);
    box-shadow: 0 0 20px rgba(201, 162, 39, 0.2);
    color: var(--gold-light);
}

/* ---- Progress Bar Futuristik ---- */
.progress-track {
    background: rgba(18, 44, 84, 0.8);
    border: 1px solid rgba(201, 162, 39, 0.2);
    border-radius: 50px;
    height: 8px;
    overflow: hidden;
    position: relative;
}
.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--gold), var(--gold-light));
    border-radius: 50px;
    transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 0 12px rgba(245, 215, 126, 0.6);
    position: relative;
}
.progress-fill::after {
    content: '';
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 14px;
    height: 14px;
    background: var(--gold-light);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--gold-light);
}

/* Step indicators */
.step-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
}
.step-dot {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 15px;
    border: 2px solid rgba(201, 162, 39, 0.3);
    background: rgba(18, 44, 84, 0.8);
    color: var(--text-muted);
    transition: all 0.4s ease;
    position: relative;
    z-index: 2;
}
.step-dot.active {
    border-color: var(--gold);
    background: linear-gradient(135deg, var(--gold), var(--gold-light));
    color: var(--dark-blue);
    box-shadow: 0 0 20px rgba(201, 162, 39, 0.5);
}
.step-dot.done {
    border-color: var(--gold);
    background: rgba(201, 162, 39, 0.2);
    color: var(--gold-light);
}
.step-line {
    flex: 1;
    height: 2px;
    background: rgba(201, 162, 39, 0.2);
    position: relative;
    z-index: 1;
}
.step-line.active {
    background: linear-gradient(90deg, var(--gold), var(--gold-light));
    box-shadow: 0 0 8px rgba(245, 215, 126, 0.4);
}

/* ---- Form Inputs ---- */
.form-control-dark {
    background: rgba(11, 29, 58, 0.85);
    border: 1px solid rgba(201, 162, 39, 0.25);
    border-radius: 12px;
    color: var(--text-white);
    padding: 12px 16px;
    transition: all 0.3s ease;
    width: 100%;
    font-size: 15px;
}
.form-control-dark:focus {
    outline: none;
    border-color: var(--gold);
    box-shadow: 0 0 15px rgba(201, 162, 39, 0.25);
    background: rgba(11, 29, 58, 0.95);
}
.form-control-dark::placeholder {
    color: var(--text-muted);
    opacity: 0.7;
}
.form-control-dark.is-invalid {
    border-color: #e74c3c;
    box-shadow: 0 0 10px rgba(231, 76, 60, 0.25);
}
.form-control-dark.is-valid {
    border-color: #2ecc71;
}

select.form-control-dark {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%23C9A227' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L2 5h12z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 40px;
}
select.form-control-dark option {
    background: var(--dark-blue);
    color: var(--text-white);
}

.form-label-gold {
    color: var(--gold-light);
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 6px;
    display: block;
}
.field-error {
    color: #e74c3c;
    font-size: 13px;
    margin-top: 4px;
    display: none;
}
.field-error.show {
    display: block;
    animation: fadeIn 0.3s ease;
}

/* ---- File Upload Group ---- */
.file-upload-group {
    border: 1.5px dashed rgba(201, 162, 39, 0.35);
    border-radius: 14px;
    padding: 20px;
    background: rgba(11, 29, 58, 0.5);
    transition: all 0.3s ease;
}
.file-upload-group:hover {
    border-color: rgba(201, 162, 39, 0.6);
    background: rgba(11, 29, 58, 0.7);
}
.file-upload-group.has-file {
    border-color: #2ecc71;
    border-style: solid;
}
.file-upload-group.has-error {
    border-color: #e74c3c;
}

.upload-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 18px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s ease;
    border: 1.5px solid rgba(201, 162, 39, 0.4);
    background: rgba(201, 162, 39, 0.08);
    color: var(--gold-light);
}
.upload-btn:hover {
    background: rgba(201, 162, 39, 0.2);
    box-shadow: 0 0 12px rgba(201, 162, 39, 0.2);
    border-color: var(--gold);
}
.upload-btn.active-cam {
    background: rgba(201, 162, 39, 0.25);
    border-color: var(--gold);
}

.file-preview {
    margin-top: 12px;
    display: none;
}
.file-preview img {
    max-width: 180px;
    max-height: 140px;
    border-radius: 10px;
    border: 1px solid rgba(201, 162, 39, 0.3);
    object-fit: cover;
}
.file-preview.show {
    display: block;
    animation: fadeIn 0.3s ease;
}
.file-name {
    font-size: 13px;
    color: var(--text-muted);
    margin-top: 6px;
    word-break: break-all;
}

/* ---- Jadwal Card Highlight ---- */
.schedule-card {
    border-left: 4px solid rgba(201, 162, 39, 0.3);
    transition: all 0.3s ease;
}
.schedule-card.highlight {
    border-left-color: var(--gold);
    background: rgba(201, 162, 39, 0.08) !important;
}
.schedule-card.highlight .schedule-day {
    color: var(--gold-light);
    text-shadow: 0 0 10px rgba(245, 215, 126, 0.4);
}

/* ---- Tabel Admin ---- */
.table-dark-gold {
    --bs-table-bg: rgba(18, 44, 84, 0.5);
    --bs-table-border-color: rgba(201, 162, 39, 0.15);
    --bs-table-hover-bg: rgba(201, 162, 39, 0.08);
    --bs-table-striped-bg: rgba(26, 58, 107, 0.3);
    color: var(--text-white);
    border-radius: 14px;
    overflow: hidden;
}
.table-dark-gold thead th {
    background: rgba(201, 162, 39, 0.15);
    color: var(--gold-light);
    font-weight: 700;
    border-bottom: 2px solid rgba(201, 162, 39, 0.4);
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ---- Toast Notifikasi ---- */
.toast-alert {
    animation: slideIn 0.4s ease;
}

/* ---- Animasi ---- */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes slideIn {
    from { opacity: 0; transform: translateX(30px); }
    to { opacity: 1; transform: translateX(0); }
}
@keyframes pulseGold {
    0%, 100% { box-shadow: 0 0 20px rgba(201, 162, 39, 0.3); }
    50% { box-shadow: 0 0 40px rgba(245, 215, 126, 0.6); }
}
@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-6px); }
}

.animate-fade-in {
    animation: fadeIn 0.6s ease both;
}
.animate-pulse-gold {
    animation: pulseGold 2.5s ease-in-out infinite;
}
.animate-float {
    animation: float 3s ease-in-out infinite;
}

/* Stagger delay untuk kartu */
.delay-1 { animation-delay: 0.1s; }
.delay-2 { animation-delay: 0.2s; }
.delay-3 { animation-delay: 0.3s; }
.delay-4 { animation-delay: 0.4s; }

/* ---- Hero glow text ---- */
.text-glow-gold {
    color: var(--gold-light);
    text-shadow: 0 0 30px rgba(245, 215, 126, 0.4), 0 0 60px rgba(201, 162, 39, 0.15);
}

/* ---- Section divider ---- */
.gold-divider {
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--gold), transparent);
    border: none;
    margin: 2rem 0;
    opacity: 0.5;
}

/* ---- Conditional field transition ---- */
.conditional-field {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height 0.5s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.4s ease, margin 0.4s ease;
    margin-top: 0;
}
.conditional-field.show {
    max-height: 2000px;
    opacity: 1;
    margin-top: 16px;
}

/* ---- Spinner OCR ---- */
.ocr-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2.5px solid rgba(201, 162, 39, 0.2);
    border-top-color: var(--gold);
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
}
@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ---- Scrollbar kustom ---- */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--dark-blue); }
::-webkit-scrollbar-thumb {
    background: rgba(201, 162, 39, 0.3);
    border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(201, 162, 39, 0.5);
}

/* ---- Detail admin card ---- */
.detail-row {
    display: flex;
    padding: 10px 0;
    border-bottom: 1px solid rgba(201, 162, 39, 0.1);
}
.detail-label {
    width: 200px;
    flex-shrink: 0;
    color: var(--text-muted);
    font-size: 14px;
}
.detail-value {
    color: var(--text-white);
    font-weight: 500;
    font-size: 14px;
    word-break: break-word;
}
.detail-value img {
    max-width: 250px;
    max-height: 200px;
    border-radius: 10px;
    border: 1px solid rgba(201, 162, 39, 0.3);
    margin-top: 4px;
}

/* ---- Responsive ---- */
@media (max-width: 768px) {
    .detail-row { flex-direction: column; gap: 2px; }
    .detail-label { width: 100%; }
    .step-dot { width: 34px; height: 34px; font-size: 13px; }
}

/* Override Bootstrap yang bentrok */
.btn-close { filter: invert(1); }
.modal-content {
    background: var(--mid-blue) !important;
    border: 1px solid rgba(201, 162, 39, 0.3) !important;
    color: var(--text-white) !important;
}
.modal-header { border-bottom-color: rgba(201, 162, 39, 0.2) !important; }
.modal-footer { border-top-color: rgba(201, 162, 39, 0.2) !important; }