:root {
    --primary: #10b981;
    --primary-dark: #059669;
    --bg-page: #f9fafb;
    --bg-sidebar: #111827;
    --bg-card: #ffffff;
    --text-main: #1f2937;
    --text-muted: #6b7280;
    --border-color: #e5e7eb;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --transition: all 0.2s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg-page);
    color: var(--text-main);
    line-height: 1.5;
    height: 100vh;
    overflow: hidden;
}

.dashboard-wrapper {
    display: flex;
    height: 100vh;
}

/* Professional Header - Hidden on Desktop */
.mobile-top-bar {
    display: none;
}

/* Sidebar Styling (Globally refined) */
.sidebar {
    width: 260px;
    background: var(--bg-dark);
    color: white;
    display: flex;
    flex-direction: column;
    padding: 24px 16px;
    transition: var(--transition);
}

.sidebar-header {
    padding: 0 24px;
    margin-bottom: 40px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.admin-icon {
    width: 32px;
    height: 32px;
    background: var(--primary);
    border-radius: 8px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: 600;
}

.sidebar-header h2 {
    font-size: 18px;
    font-weight: 600;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 0 12px;
}

.nav-item {
    background: transparent;
    border: none;
    color: #9ca3af;
    padding: 12px 16px;
    border-radius: 8px;
    text-align: left;
    cursor: pointer;
    font-size: 14px;
    font-weight: 400;
    transition: var(--transition);
    text-decoration: none;
}

.nav-item:hover {
    background: rgba(255, 255, 255, 0.05);
    color: white;
}

.nav-item.active {
    background: rgba(16, 185, 129, 0.1);
    color: var(--primary);
    font-weight: 600;
}

.back-home {
    margin-top: auto;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 24px;
    color: #ef4444;
}

/* Main Content */
.content {
    flex: 1;
    overflow-y: auto;
    padding: 40px;
}

.tab-content {
    display: none;
    animation: fadeIn 0.3s ease;
}

.tab-content.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.content-header {
    margin-bottom: 32px;
}

.content-header h1 {
    font-size: 28px;
    font-weight: 600;
    margin-bottom: 8px;
}

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

/* Settings Grid */
.settings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
    margin-bottom: 32px;
}

.setting-card {
    background: white;
    padding: 24px;
    border-radius: 16px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
}

.setting-card h3 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 20px;
    color: #111827;
}

/* Form Styles */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.form-control {
    width: 100%;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 10px 14px;
    font-size: 14px;
    font-family: 'Outfit', sans-serif;
    transition: var(--transition);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

.form-group small {
    display: block;
    margin-top: 4px;
    font-size: 11px;
    color: var(--text-muted);
}

/* Actions */
.action-bar {
    display: flex;
    align-items: center;
    gap: 16px;
}

.btn-primary {
    background: var(--primary);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.btn-primary:hover {
    background: var(--primary-dark);
}

.status-msg {
    font-size: 14px;
    font-weight: 500;
}

.status-msg.success { color: #10b981; }
.status-msg.error { color: #ef4444; }

/* Table */
.table-container {
    background: white;
    border-radius: 16px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    overflow: hidden;
}

table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

th {
    background: #f9fafb;
    padding: 16px;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    border-bottom: 1px solid var(--border-color);
}

td {
    padding: 16px;
    font-size: 14px;
    border-bottom: 1px solid var(--border-color);
}

.empty-state {
    padding: 40px;
    text-align: center;
    color: var(--text-muted);
}

/* Bank List Dinamis */
.bank-row {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr auto;
    gap: 12px;
    margin-bottom: 12px;
    align-items: end;
    background: #fcfcfc;
    padding: 16px;
    border-radius: 12px;
    border: 1px dashed var(--border-color);
    transition: var(--transition);
}

.bank-row:hover {
    border-color: var(--primary);
    background: #f6fdfa;
}

.remove-bank-btn {
    background: #fee2e2;
    color: #ef4444;
    border: none;
    padding: 10px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    transition: var(--transition);
    height: 40px;
}

.remove-bank-btn:hover {
    background: #fecaca;
    transform: scale(0.98);
}

/* Action Buttons in Table */
.btn-action {
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: var(--transition);
    margin-right: 4px;
}

.btn-confirm {
    background: #ecfdf5;
    color: #10b981;
    border: 1px solid #10b981;
}
.btn-confirm:hover { background: #10b981; color: white; }

.btn-edit {
    background: #eff6ff;
    color: #3b82f6;
    border: 1px solid #3b82f6;
}
.btn-edit:hover { background: #3b82f6; color: white; }

.btn-delete {
    background: #fef2f2;
    color: #ef4444;
    border: 1px solid #ef4444;
}
.btn-delete:hover { background: #ef4444; color: white; }

/* Modal Overlay */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(17, 24, 39, 0.7);
    backdrop-filter: blur(8px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    padding: 20px;
    animation: fadeIn 0.3s ease;
}

/* Modal Content */
.modal-content {
    background: white;
    width: 100%;
    max-width: 420px;
    border-radius: 28px;
    padding: 32px;
    position: relative;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    animation: scaleUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-header {
    text-align: center;
    margin-bottom: 24px;
}

.modal-header h3 {
    font-size: 20px;
    font-weight: 600;
    color: #111827;
    margin-bottom: 4px;
}

.modal-header p {
    font-size: 14px;
    color: var(--text-muted);
}

@keyframes scaleUp {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

/* Toast Notification Pro */
.toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 12px;
    pointer-events: none;
}

.toast {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
    border-radius: 12px;
    padding: 16px 20px;
    min-width: 300px;
    max-width: 400px;
    display: flex;
    align-items: center;
    gap: 12px;
    pointer-events: auto;
    animation: slideInRight 0.3s cubic-bezier(0.16, 1, 0.3, 1), fadeOut 0.3s ease forwards 4.7s;
}

.toast.success { border-left: 4px solid var(--primary); }
.toast.error { border-left: 4px solid #ef4444; }
.toast.info { border-left: 4px solid #3b82f6; }

.toast-content {
    flex: 1;
    font-size: 14px;
    font-weight: 500;
    color: #1f2937;
    line-height: 1.4;
}

@keyframes pulse {
    0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.4); }
    70% { transform: scale(1.05); box-shadow: 0 0 0 15px rgba(239, 68, 68, 0); }
    100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}

@keyframes slideInRight {
    from { opacity: 0; transform: translateX(100%) scale(0.9); }
    to { opacity: 1; transform: translateX(0) scale(1); }
}


/* Admin Login Overlay */
.login-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(243, 244, 246, 0.8);
    backdrop-filter: blur(20px);
    z-index: 10000; /* Above everything */
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.login-card {
    background: white;
    width: 100%;
    max-width: 380px;
    padding: 40px;
    border-radius: 32px;
    text-align: center;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.1);
    animation: scaleUp 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.login-avatar-container {
    width: 100px;
    height: 100px;
    margin: 0 auto 20px;
}

.login-avatar {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    border: 4px solid white;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.login-card h3 {
    font-size: 22px;
    font-weight: 600;
    color: #111827;
    margin-bottom: 8px;
}

.login-card p {
    font-size: 14px;
    color: #6b7280;
    margin-bottom: 30px;
}

@keyframes fadeOut {
    from { opacity: 1; transform: scale(1); }
    to { opacity: 0; transform: scale(0.9); }
}

/* Confirmed Row Highlights */
.confirmed-row {
    background-color: #f0fdf4 !important; /* Hijau sangat muda */
}

.confirmed-row td {
    color: #166534;
}

.btn-confirmed-status {
    background: #10b981 !important;
    color: white !important;
    border: none !important;
    cursor: default !important;
}

.btn-confirmed-status::before {
    content: '✓ ';
}
/* Mobile Optimization: Bottom Navigation & Responsive Layout */
@media (max-width: 768px) {
    body {
        overflow: auto;
        height: auto;
    }

    .dashboard-wrapper {
        flex-direction: column;
        height: auto;
        padding-bottom: 20px;
    }

    /* Unified Professional Sticky Header & Nav Group */
    .sticky-nav-group {
        position: sticky;
        top: 0;
        z-index: 1000;
        background: #fff;
        box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.05);
    }

    .mobile-top-bar {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 12px 20px;
        background: transparent; /* Background now handled by group */
        border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    }

    .brand-info {
        display: flex;
        align-items: center;
        gap: 8px;
    }

    .brand-logo { font-size: 20px; }
    .brand-name {
        font-weight: 600;
        font-size: 15px;
        color: #111827;
        letter-spacing: -0.01em;
    }

    .user-status {
        font-size: 11px;
        color: #10b981;
        font-weight: 600;
        text-transform: uppercase;
        display: flex;
        align-items: center;
        gap: 4px;
    }

    .user-status::before {
        content: '';
        width: 6px;
        height: 6px;
        background: #10b981;
        border-radius: 50%;
    }

    /* Pro Navigation Tabs (Stays under Header) */
    .sidebar {
        width: 100%;
        height: auto;
        position: static; /* No longer individually sticky */
        background: transparent;
        border: none;
        padding: 12px 20px 10px 20px;
        margin-bottom: 0px;
        order: -1;
    }

    .sidebar-header {
        display: none;
    }

    .sidebar-nav {
        flex-direction: row;
        width: 100%;
        justify-content: flex-start;
        padding: 0;
        gap: 12px;
        overflow-x: auto;
        scrollbar-width: none;
    }

    .sidebar-nav::-webkit-scrollbar { display: none; }

    .nav-item {
        padding: 6px 16px;
        background: #f3f4f6 !important;
        color: #6b7280;
        font-size: 13px;
        font-weight: 500;
        border-radius: 20px;
        box-shadow: none;
        display: inline-flex;
        align-items: center;
        border: 1px solid transparent;
        transition: all 0.3s ease;
        white-space: nowrap;
    }

    .nav-item.active {
        background: #111827 !important; /* Dark theme for active tab */
        color: #fff;
        font-weight: 600;
        transform: none;
        box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    }

    .nav-item i {
        display: inline-block;
        font-size: 14px;
        margin-right: 6px;
    }

    .nav-item:not(:last-child)::after {
        display: none; /* Hide breadcrumb symbols in Pill mode */
    }

    .nav-item.back-home {
        display: none;
    }

    /* Content Area Adjustment */
    .dashboard-main {
        padding: 15px 20px;
    }

    .content-header h1 {
        font-size: 22px;
        color: #111827;
        margin-bottom: 6px;
    }

    .content-header p {
        font-size: 13px;
    }

    .nav-item.back-home {
        display: none; /* Hide back home in bottom nav to save space */
    }

    /* Content Area */
    .dashboard-main {
        padding: 20px 16px;
        width: 100%;
        height: auto;
        overflow: visible;
    }

    .settings-grid {
        grid-template-columns: 1fr;
    }

    /* Table Responsiveness */
    .table-container {
        overflow-x: auto;
        border-radius: 12px;
        margin-top: 16px;
    }

    table {
        min-width: 600px; /* Ensure table scrolling */
    }

    /* Modals */
    .modal-content {
        width: 95%;
        max-height: 90vh;
        overflow-y: auto;
    }

    /* Login Area */
    .login-card {
        padding: 30px 20px;
        border-radius: 24px;
    }

    /* Bank Row Mobile Refinement */
    .bank-row {
        grid-template-columns: 1fr !important;
        gap: 12px;
        padding: 16px !important;
        position: relative;
        border: 1px solid rgba(0,0,0,0.05) !important;
        background: #fff !important;
        margin-bottom: 20px !important;
    }

    .bank-row .form-group {
        width: 100%;
        margin-bottom: 4px;
    }

    .bank-row .form-control {
        width: 100%;
        height: 42px;
    }

    .remove-bank-btn {
        position: static !important; /* Move back to normal flow */
        margin-top: 10px;
        height: 35px;
        width: 100%; /* Full width button on mobile for easier tapping */
        background: #fef2f2 !important;
        color: #ef4444 !important;
        border: 1px solid #fee2e2 !important;
    }
}

@keyframes scaleUp {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}
