/* ---------- Layout dasar ---------- */
body {
    background: #f5f7fb;
    color: #111827;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    margin: 0;
    padding-bottom: 90px; /* ruang untuk bottom nav */
}

.page-content {
    padding: 16px;
}

a {
    text-decoration: none !important;
}

a:hover, a:focus, a:active, a:visited {
    text-decoration: none !important;
}


/* ---------- Header / breadcrumb ---------- */
.breadcrumb-bar {
    font-size: 13px;
    font-weight: 500;
}

.breadcrumb-back {
    padding: 4px 10px;
    background: #eef2ff;
    border-radius: 8px;
    color: #4338ca;
    font-weight: 600;
    transition: .25s;
}

.breadcrumb-back:hover {
    background: #e0e7ff;
    transform: translateX(-3px);
}

.breadcrumb-items .crumb {
    color: #6b7280;
}

.breadcrumb-items .crumb.active {
    color: #111827;
    font-weight: 700;
}

.separator {
    color: #9ca3af;
}

.breadcrumb-container {
    position: relative;
    padding: 10px 0 4px;
    margin-bottom: 10px;
}

.breadcrumb-trail {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
    font-weight: 500;
}

.breadcrumb-back {
    padding: 6px 12px;
    background: #eef2ff;
    border-radius: 10px;
    color: #4338ca;
    font-weight: 600;
    transition: 0.25s;
}

.breadcrumb-back:hover {
    background: #e0e7ff;
    transform: translateX(-3px);
}

.breadcrumb-items {
    display: flex;
    align-items: center;
    gap: 6px;
}

.crumb {
    color: #6b7280;
}

.crumb.active {
    color: #111827;
    font-weight: 700;
}

.separator {
    color: #9ca3af;
}

/* ==== PREVIEW CARD ==== */

.breadcrumb-preview {
    display: none;
    position: absolute;
    top: 42px;
    left: 0;
    background: white;
    padding: 14px 16px;
    border-radius: 14px;
    width: 240px;
    box-shadow: 0 12px 30px rgba(0,0,0,0.12);
    animation: fadeIn 0.25s ease;
    z-index: 100;
}

.preview-title {
    font-size: 15px;
    font-weight: 700;
    margin-bottom: 4px;
}

.preview-url {
    font-size: 12px;
    color: #64748b;
    word-break: break-all;
}

/* Dark mode */
body.dark .breadcrumb-back {
    background: #1e293b;
    color: #93c5fd;
}

body.dark .breadcrumb-preview {
    background: #0f172a;
    color: white;
    box-shadow: 0 12px 30px rgba(255,255,255,0.08);
}

body.dark .preview-url {
    color: #94a3b8;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-5px); }
    to   { opacity: 1; transform: translateY(0); }
}

.app-header {
    background: #f5f7fb;
    border-bottom: 1px solid #e5e7eb;
}

/* tombol theme */
.theme-toggle-btn {
    border: none;
    border-radius: 999px;
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #e5e7eb;
    color: #111827;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.15s ease;
}

.theme-toggle-btn:hover {
    transform: translateY(-1px);
}

.theme-icon {
    display: none;
}

body:not(.dark) .sun-icon { display: none; }
body:not(.dark) .moon-icon { display: block; }
body.dark .sun-icon { display: block; }
body.dark .moon-icon { display: none; }

/* ---------- Bottom nav iOS style ---------- */
.bottom-nav {
    position: fixed;
    left: 50%;
    bottom: 16px;
    transform: translateX(-50%);
    width: 92%;
    max-width: 480px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 999px;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.25);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    display: flex;
    padding: 6px 8px;
    z-index: 100;
}

.bottom-nav .nav-item {
    flex: 1;
    text-align: center;
    color: #6b7280;
    text-decoration: none;
    font-size: 11px;
    padding: 4px 0 2px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    transition: color 0.2s ease, transform 0.2s ease;
}

.bottom-nav .icon-wrapper {
    width: 32px;
    height: 32px;
    border-radius: 999px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease, transform 0.2s ease;
}

.bottom-nav svg {
    transition: transform 0.2s ease;
}

.bottom-nav .label {
    line-height: 1;
}

/* state aktif + animasi scale / naik */
.bottom-nav .nav-item.active {
    color: #0d6efd;
    transform: translateY(-4px);
}

.bottom-nav .nav-item.active .icon-wrapper {
    background: rgba(13, 110, 253, 0.12);
    transform: scale(1.08);
}

.bottom-nav .nav-item.active svg {
    transform: scale(1.05);
}

/* ---------- Card mirip mobile banking ---------- */
.card {
    border-radius: 18px;
    min-height: 90px;
    border: none;
    box-shadow: 0 10px 25px rgba(15, 23, 42, 0.10);
}

.card-banking {
    border-radius: 18px;
    border: none;
    min-height: 100px;
    padding: 16px 18px;
    background: linear-gradient(135deg, #2563eb, #4f46e5);
    color: #f9fafb;
    box-shadow: 0 18px 40px rgba(37, 99, 235, 0.45);
}

/* ---------- Dark mode ---------- */
body.dark {
    background: #020617;
    color: #e5e7eb;
}

body.dark .app-header {
    background: #020617;
    border-bottom-color: #111827;
}

body.dark .theme-toggle-btn {
    background: #111827;
    color: #e5e7eb;
}

body.dark .card {
    background: #020617;
    border: 1px solid #111827;
    box-shadow: 0 14px 35px rgba(0, 0, 0, 0.8);
}

body.dark .card-banking {
    background: linear-gradient(135deg, #1d4ed8, #4c1d95);
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.9);
}

body.dark .bottom-nav {
    background: rgba(15, 23, 42, 0.98);
    box-shadow: 0 10px 35px rgba(0, 0, 0, 0.9);
}

body.dark .bottom-nav .nav-item {
    color: #9ca3af;
}

body.dark .bottom-nav .nav-item.active {
    color: #38bdf8;
}

body.dark .bottom-nav .nav-item.active .icon-wrapper {
    background: rgba(56, 189, 248, 0.18);
}

body.dark h1,
body.dark h2,
body.dark h3,
body.dark h4,
body.dark h5,
body.dark h6,
body.dark p,
body.dark span,
body.dark strong {
    color: #ffffff !important; /* Semua heading & teks putih */
}

body.dark .text-muted,
body.dark .small,
body.dark .small.text-muted {
    color: #d4d4d8 !important; /* PUTIH 85% */
}

/* ---- EXCEPTIONS for Bootstrap color texts ---- */
body.dark .text-success {
    color: #22c55e !important; /* hijau terang */
}

body.dark .text-danger {
    color: #ef4444 !important; /* merah */
}

body.dark .text-warning {
    color: #facc15 !important; /* kuning */
}

body.dark .text-info {
    color: #38bdf8 !important; /* biru muda */
}

body.dark .text-primary {
    color: #60a5fa !important; /* biru terang */
}

body.dark .text-secondary {
    color: #cbd5e1 !important; /* abu2 terang for muted */
}


/* -------------------------
   ICON BUBBLE STYLE (iOS)
--------------------------*/
.icon-bubble {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #ffffff;
    box-shadow: 0 4px 12px rgba(0,0,0,0.10);
    transition: 0.2s ease-in-out;
}

.icon-bubble i {
    font-size: 20px;
    color: #1e293b;
}

/* Hover effect (optional) */
.icon-bubble:hover {
    transform: scale(1.05);
}

/* ----- Dark Mode ----- */
body.dark .icon-bubble {
    background: rgba(255,255,255,0.08);
    box-shadow: 0 0 18px rgba(56,189,248,0.25);
}

body.dark .icon-bubble i {
    color: #f1f5f9;
}

/* Success Bubble */
.icon-bubble-success {
    background: #dcfce7;
}

.icon-bubble-success i {
    color: #16a34a;
}

/* Dark mode success */
body.dark .icon-bubble-success {
    background: rgba(34,197,94,0.15);
}

body.dark .icon-bubble-success i {
    color: #4ade80;
}


/* ----------- LIST CARD (Check-in / Checkout) ----------- */

.list-card {
    border-radius: 18px;
    padding: 16px 18px;
    background: #ffffff;
    border: none;
    box-shadow: 0 4px 15px rgba(0,0,0,0.06);
    margin-bottom: 14px;
}

.list-card .name {
    font-size: 17px;
    font-weight: 600;
}

.list-card .info {
    font-size: 13px;
    color: #6b7280;
}

.badge-booking {
    padding: 4px 12px;
    border-radius: 999px;
    background: #e0e7ff;
    color: #1d4ed8;
    font-weight: 600;
    font-size: 12px;
}

.btn-checkout {
    padding: 6px 14px;
    background: #ffffff;
    border: 1px solid #d1d5db;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 500;
}

/* Dark mode */
body.dark .list-card {
    background: #0f172a;
    border: 1px solid #1e293b;
    box-shadow: 0 4px 18px rgba(0,0,0,0.5);
}

body.dark .info {
    color: #cbd5e1 !important;
}

body.dark .badge-booking {
    background: rgba(129, 140, 248, 0.2);
    color: #93c5fd !important;
}

body.dark .btn-checkout {
    background: rgba(255,255,255,0.06);
    border-color: #334155;
    color: #e2e8f0;
}


/* ---------- FORM ELEGANT STYLE ---------- */
.form-label {
    font-weight: 600;
    color: #374151;
    margin-bottom: 6px;
}

body.dark .form-label {
    color: #e5e7eb;
}

.input-box {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    padding: 12px 14px;
    font-size: 15px;
    width: 100%;
}

.input-box:focus {
    border-color: #3b82f6;
    outline: none;
    box-shadow: 0 0 0 3px rgba(59,130,246,0.25);
}

body.dark .input-box {
    background: #0f172a;
    border-color: #1e293b;
    color: #f8fafc;
}

/* SELECT */
.select-box {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg fill='gray' height='24' width='24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M7 10l5 5 5-5z'/%3E%3C/svg%3E");
    background-position: right 14px center;
    background-repeat: no-repeat;
    padding-right: 40px;
}

/* Mode Switch Buttons */
.mode-switch {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.mode-btn {
    flex: 1;
    padding: 12px 0;
    border-radius: 12px;
    text-align: center;
    border: 1px solid #d1d5db;
    background: #f9fafb;
    font-weight: 600;
}

.mode-btn.active {
    background: #2563eb;
    color: white;
    border-color: #2563eb;
}

body.dark .mode-btn {
    background: #1e293b;
    border-color: #334155;
    color: #e2e8f0;
}

body.dark .mode-btn.active {
    background: #3b82f6;
}

/* Submit Button */
.submit-btn {
    width: 100%;
    background: #2563eb;
    color: white;
    font-size: 16px;
    padding: 14px 0;
    border: none;
    border-radius: 14px;
    font-weight: 600;
    margin-top: 20px;
}

.submit-btn:active {
    transform: scale(0.98);
}

/* SLIDE ANIMATION */
.form-slide {
    transition: transform 0.35s ease, opacity 0.35s ease;
}

.slide-left {
    transform: translateX(-20px);
    opacity: 0;
}

.slide-right {
    transform: translateX(20px);
    opacity: 0;
}

.slide-active {
    transform: translateX(0);
    opacity: 1;
}


.badge-history {
    padding: 4px 12px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
}

.badge-checkout {
    background: #dbeafe;
    color: #1e40af;
}

.badge-booking {
    background: #e0e7ff;
    color: #4338ca;
}

.badge-batal {
    background: #fee2e2;
    color: #b91c1c;
}

/* Dark mode badges */
body.dark .badge-history {
    opacity: 0.9;
}

body.dark .badge-checkout {
    background: rgba(59,130,246,0.2);
    color: #60a5fa;
}

body.dark .badge-booking {
    background: rgba(129,140,248,0.2);
    color: #a5b4fc;
}

body.dark .badge-batal {
    background: rgba(248,113,113,0.2);
    color: #fca5a5;
}


.badge-checkout-now {
    background: #dbeafe;
    color: #1e40af;
    padding: 4px 12px;
    font-weight: 600;
    border-radius: 999px;
    font-size: 12px;
}

.badge-checkout-later {
    background: #fef9c3;
    color: #ca8a04;
    padding: 4px 12px;
    font-weight: 600;
    border-radius: 999px;
    font-size: 12px;
}

.badge-checkout-done {
    background: #dcfce7;
    color: #15803d;
    padding: 4px 12px;
    font-weight: 600;
    border-radius: 999px;
    font-size: 12px;
}

/* DARK MODE */
body.dark .badge-checkout-now  { background: rgba(59,130,246,0.2); color:#60a5fa; }
body.dark .badge-checkout-later { background: rgba(234,179,8,0.2); color:#facc15; }
body.dark .badge-checkout-done { background: rgba(74,222,128,0.2); color:#4ade80; }


.history-tabs {
    display: flex;
    background: #f3f4f6;
    padding: 6px;
    border-radius: 12px;
    margin-bottom: 16px;
}

.history-tab {
    flex: 1;
    text-align: center;
    padding: 10px 0;
    border-radius: 10px;
    font-weight: 600;
    color: #6b7280;
    cursor: pointer;
    transition: all 0.25s ease;
}

.history-tab.active {
    background: #ffffff;
    color: #111827;
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
}

.list-card {
    border-radius: 18px;
    padding: 18px;
    background: #ffffff;
    box-shadow: 0 4px 14px rgba(0,0,0,0.06);
    margin-bottom: 14px;
}

.btn-cancel {
    background: #ef4444;
    color: #fff;
    padding: 6px 16px;
    border-radius: 12px;
    border: none;
    font-weight: 600;
}

body.dark .history-tabs { background: #1e293b; }
body.dark .history-tab { color: #cbd5e1; }
body.dark .history-tab.active { background: #0f172a; color: #fff; }


/* Animasi slide */
.history-content {
    transition: transform 0.35s ease, opacity 0.35s ease;
}

.slide-in-left {
    transform: translateX(-20px);
    opacity: 0;
}

.slide-in-right {
    transform: translateX(20px);
    opacity: 0;
}

.slide-active {
    transform: translateX(0);
    opacity: 1;
}


/* ===== Sidebar Overlay ===== */
#sidebar-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.45);
    opacity: 0;
    pointer-events: none;
    transition: 0.3s ease;
    z-index: 200;
}

/* ===== Sidebar Panel ===== */
#sidebar-profile {
    position: fixed;
    right: -280px;
    top: 0;
    width: 260px;
    height: 100vh;
    background: #ffffff;
    box-shadow: -5px 0 20px rgba(0,0,0,0.15);
    transition: right 0.35s ease;
    z-index: 210;
    padding: 20px;
}

#sidebar-profile.active {
    right: 0;
}

#sidebar-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.sidebar-header {
    border-bottom: 1px solid #e5e7eb;
    padding-bottom: 12px;
    margin-bottom: 12px;
}

.sidebar-link {
    display: block;
    padding: 10px 0;
    font-weight: 500;
    color: #111827;
}

.sidebar-link:hover {
    color: #2563eb;
}

/* Dark Mode */
body.dark #sidebar-profile {
    background: #0f172a;
    box-shadow: -5px 0 25px rgba(0,0,0,0.45);
}

body.dark .sidebar-header {
    border-color: #1e293b;
}

body.dark .sidebar-link {
    color: #e5e7eb;
}

/* ==== SIDEBAR PANEL NEW STYLE ==== */
.sidebar-panel {
    position: fixed;
    right: -300px;
    top: 0;
    width: 270px;
    height: 100vh;
    background: #ffffff;
    backdrop-filter: blur(20px);
    box-shadow: -4px 0 30px rgba(0,0,0,0.15);
    transition: right 0.35s ease;
    padding: 20px;
    z-index: 210;
    border-radius: 0 0 0 20px;
}

.sidebar-panel.active {
    right: 0;
}

body.dark .sidebar-panel {
    background: rgba(15, 23, 42, 0.9);
    box-shadow: -4px 0 40px rgba(0,0,0,0.6);
}

/* Profile section */
.profile-photo {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: #e5e7eb;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

body.dark .profile-photo {
    background: rgba(255,255,255,0.1);
}

/* Role badge */
.role-badge {
    display: inline-block;
    font-size: 11px;
    padding: 3px 10px;
    border-radius: 999px;
    background: #dbeafe;
    color: #1e40af;
    font-weight: 600;
}

body.dark .role-badge {
    background: rgba(59,130,246,0.2);
    color: #60a5fa;
}

/* Sidebar sections */
.sidebar-section {
    margin-top: 20px;
}

.sidebar-title {
    text-transform: uppercase;
    font-size: 11px;
    font-weight: 700;
    color: #9ca3af;
    margin-bottom: 8px;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 8px;
    border-radius: 10px;
    font-weight: 500;
    color: #111827;
}

.sidebar-link:hover {
    background: #f3f4f6;
}

body.dark .sidebar-link {
    color: #e5e7eb;
}

body.dark .sidebar-link:hover {
    background: rgba(255,255,255,0.07);
}

.btn-logout {
    background: none;
    border: none;
    padding: 0;
    width: 100%;
    text-align: left;
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 500;
    cursor: pointer;
}

.btn-logout:hover {
    background: #fee2e2;
    border-radius: 10px;
}

body.dark .btn-logout:hover {
    background: rgba(248,113,113,0.15);
}

/* ================================
   DARK MODE — Bootstrap Modal Fix
================================ */
body.dark .modal-content {
    background-color: #1e1e1e !important;
    color: #ffffff !important;
    border: 1px solid #333;
}

body.dark .modal-header,
body.dark .modal-footer {
    background-color: #1e1e1e !important;
    border-color: #333 !important;
}

body.dark .modal-body {
    background-color: #1e1e1e !important;
}

body.dark .btn-close {
    filter: invert(1);
}

body.dark textarea.input-box,
body.dark input.input-box,
body.dark select.input-box {
    background-color: #2b2b2b !important;
    color: white !important;
    border-color: #444 !important;
}
