/* =========================================================
   ROOT VARIABLES
========================================================= */
:root {
    --primary: #2563eb;
    --primary-hover: #1d4ed8;
    --success: #22c55e;
    --success-hover: #16a34a;
    --danger: #ef4444;
    --danger-hover: #dc2626;
    --warning: #f97316;
    --warning-hover: #ea580c;
    --dark: #0f172a;
    --dark-2: #1e293b;
    --dark-3: #334155;
    --light: #f8fafc;
    --white: #ffffff;
    --border: #e2e8f0;
    --text: #1e293b;
    --text-light: #64748b;
    --radius: 18px;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    --transition: all 0.3s ease;
}

/* =========================================================
   RESET & GLOBAL
========================================================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', sans-serif;
}

html {
    scroll-behavior: smooth;
}

body {
    background: #f1f5f9;
    color: #0f172a;
    transition: var(--transition);
}

a {
    text-decoration: none;
}

img {
    max-width: 100%;
    display: block;
}

button,
input,
textarea,
select {
    font-family: inherit;
}

/* =========================================================
   LAYOUT
========================================================= */
.layout {
    display: flex;
    min-height: 100vh;
}

.main {
    flex: 1;
    margin-left: 260px;
    min-height: 100vh;
    transition: var(--transition);
}

body.sidebar-hide .main {
    margin-left: 0;
}

.content {
    padding: 95px 25px 25px;
}

/* =========================================================
   SIDEBAR
========================================================= */
.sidebar {
    width: 260px;
    background: #0f172a;
    color: white;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 1000;
    overflow-y: auto;
    transition: var(--transition);
    padding: 25px 18px;
    -webkit-overflow-scrolling: touch;
}

body.sidebar-hide .sidebar {
    transform: translateX(-100%);
}

.logo {
    text-align: center;
    margin-bottom: 35px;
}

.logo img {
    width: 85px;
    height: 85px;
    border-radius: 20px;
    object-fit: cover;
    margin: 0 auto 12px auto;
    display: block;
    border: 3px solid rgba(255, 255, 255, 0.15);
}

.logo h3 {
    font-size: 22px;
    font-weight: 700;
    color: white;
    text-align: center;
}

.logo p {
    font-size: 13px;
    color: #94a3b8;
    margin-top: 5px;
    text-align: center;
}

/* =========================================================
   MENU
========================================================= */
.menu {
    list-style: none;
}

.menu li {
    margin-bottom: 10px;
}

.menu li a {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: #e2e8f0;
    padding: 14px 16px;
    border-radius: 14px;
    font-size: 14px;
    font-weight: 600;
    transition: var(--transition);
}

.menu li a:hover {
    background: #1e293b;
    color: white;
}

.menu li.active a {
    background: linear-gradient(135deg, #2563eb, #3b82f6);
    color: #fff;
    box-shadow: 0 10px 25px rgba(37, 99, 235, 0.25);
}

.logout {
    background: #dc2626 !important;
    color: white !important;
}

.logout:hover {
    background: #b91c1c !important;
}

/* =========================================================
   NAVBAR
========================================================= */
.navbar {
    height: 75px;
    left:260px;
    width:calc(100% - 260px);
    background: white;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 25px;
    border-bottom: 1px solid #e2e8f0;
    position: fixed;
    top: 0;
    z-index: 500;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
}

body.sidebar-hide .navbar{
    left:0;
    width:100%;
}

.toggle-btn,
.dark-btn {
    width: 42px;
    height: 42px;
    border: none;
    border-radius: 12px;
    background: #e2e8f0;
    cursor: pointer;
    font-size: 18px;
    transition: var(--transition);
}

.toggle-btn:hover,
.dark-btn:hover {
    background: #cbd5e1;
}

.navbar .right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.navbar .right span {
    font-size: 14px;
    font-weight: 700;
}

/* =========================================================
   CARD
========================================================= */
.card {
    background: var(--white);
    border-radius: 24px;
    padding: 28px;
    margin-bottom: 25px;
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
    transition: var(--transition);
    overflow:hidden;
}

.card:hover {
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
}

.card-title {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 22px;
    color: var(--text);
}

/* =========================================================
   FORM
========================================================= */
.form-modern {
    width: 100%;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width:100%;
    overflow:hidden;
}

.form-group label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-light);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    min-height: 48px;
    padding: 14px 16px;
    border: 1px solid #dbe2ea;
    border-radius: 14px;
    background: #f8fafc;
    font-size: 14px;
    transition: var(--transition);
}

.form-group textarea {
    min-height: 100px;
    resize: vertical;
}

.form-group input:hover,
.form-group select:hover,
.form-group textarea:hover {
    background: #fff;
    border-color: #94a3b8;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--success);
    background: #fff;
    box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.15);
}

/* =========================================================
   BUTTON SYSTEM
========================================================= */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    min-width: 100px;
    height: 44px;
    padding: 0 18px;
    border: none;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 700;
    color: #fff;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.08);
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.12);
    filter: brightness(1.05);
}

.btn:active {
    transform: scale(0.97);
}

.btn-primary {
    background: linear-gradient(135deg, #2563eb, #3b82f6);
}

.btn-success {
    background: linear-gradient(135deg, #16a34a, #22c55e);
}

.btn-danger {
    background: linear-gradient(135deg, #dc2626, #ef4444);
}

.btn-warning {
    background: linear-gradient(135deg, #ea580c, #f97316);
}

.btn-dark {
    background: linear-gradient(135deg, #0f172a, #334155);
}

.btn-secondary {
    background: linear-gradient(135deg, #64748b, #94a3b8);
}

.aksi {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

/* =========================================================
   SEARCH FORM
========================================================= */
.form-search {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 22px;
    padding: 18px;
    background: #fff;
    border-radius: 18px;
    border: 1px solid var(--border);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
}

.form-search input {
    min-width: 220px;
    height: 44px;
    padding: 0 14px;
    border: 1px solid #dbe2ea;
    border-radius: 12px;
    flex: 1;
}

.form-search input:focus {
    outline: none;
    border-color: var(--success);
    box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.15);
}

/* =========================================================
   TABLE
========================================================= */
.table-container {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: 18px;
}

.table-modern {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.05);
    min-width: 600px;
}

.table-modern thead {
    background: linear-gradient(135deg, #0f172a, #1e293b);
}

.table-modern th {
    padding: 16px;
    text-align: left;
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    white-space: nowrap;
}

.table-modern td {
    padding: 15px;
    border-top: 1px solid var(--border);
    font-size: 13px;
    vertical-align: top;
    max-width: 220px;
}

.table-modern tbody tr {
    transition: var(--transition);
}

.table-modern tbody tr:nth-child(even) {
    background: #f8fafc;
}

.table-modern tbody tr:hover {
    background: #dcfce7;
}

/* =========================================================
   PAGINATION
========================================================= */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 25px;
}

.page-btn {
    min-width: 42px;
    height: 42px;
    padding: 0 15px;
    border-radius: 12px;
    background: #e2e8f0;
    color: #0f172a;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 700;
    transition: var(--transition);
    text-decoration: none;
}

.page-btn:hover {
    background: #dbeafe;
}

.active-page {
    background: #2563eb;
    color: #fff;
}

/* =========================================================
   ALERT
========================================================= */
.alert-error {
    background: #fee2e2;
    color: #b91c1c;
    padding: 14px 16px;
    border-radius: 14px;
    margin-bottom: 20px;
}

/* =========================================================
   MODAL
========================================================= */
.modal-wrapper {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.55);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    padding: 20px;
}

.modal-box {
    width: 100%;
    max-width: 450px;
    background: #fff;
    border-radius: 24px;
    padding: 25px;
    animation: modalShow 0.25s ease;
}

@keyframes modalShow {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.modal-close {
    border: none;
    background: none;
    font-size: 28px;
    cursor: pointer;
    color: #64748b;
}

.modal-footer {
    display: flex;
    justify-content: end;
    gap: 10px;
    margin-top: 25px;
}

/* =========================================================
   RATE CARD
========================================================= */
.rate-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.rate-card {
    position: relative;
    overflow: hidden;
    padding: 24px;
    border-radius: 22px;
    color: #fff;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
    transition: var(--transition);
}

.rate-card:hover {
    transform: translateY(-5px);
}

.rate-card h3 {
    font-size: 16px;
    margin-bottom: 10px;
}

.rate-card p {
    font-size: 30px;
    font-weight: 700;
}

.usd {
    background: linear-gradient(135deg, #1e3c72, #2a5298);
}

.aud {
    background: linear-gradient(135deg, #11998e, #38ef7d);
}

.eur {
    background: linear-gradient(135deg, #8e2de2, #4a00e0);
}

.sgd {
    background: linear-gradient(135deg, #ff512f, #dd2476);
}

/* =========================================================
   RATE BOARD
========================================================= */
.board-wrapper {
    background: #fff;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.06);
}

.board-header,
.board-row {
    display: grid;
    grid-template-columns: 1fr 180px;
    align-items: center;
    padding: 18px 24px;
}

.board-header {
    background: linear-gradient(135deg, #0f172a, #1e293b);
    color: #fff;
    font-size: 14px;
    font-weight: 700;
}

.board-row {
    border-bottom: 1px solid #edf2f7;
    transition: var(--transition);
}

.board-row:last-child {
    border-bottom: none;
}

.board-row:hover {
    background: #f8fbff;
}

.currency {
    font-size: 15px;
    font-weight: 700;
}

.buy {
    text-align: right;
    color: #0f766e;
    font-weight: 700;
}

/* =========================================================
   BADGE
========================================================= */
.badge-total,
.badge-mc,
.badge-nus,
.badge-grand,
.badge-diambil {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 120px;
    padding: 8px 14px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
}

.badge-total {
    background: #ecfeff;
    color: #155e75;
}

.badge-mc {
    background: #eff6ff;
    color: #1d4ed8;
}

.badge-nus {
    background: #f0fdf4;
    color: #15803d;
}

.badge-grand {
    background: #fef3c7;
    color: #92400e;
}

.badge-diambil {
    background: #dcfce7;
    color: #166534;
}

.badge-cash {
    background: #dcfce7;
    color: #166534;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 100px;
    padding: 8px 14px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
}

.badge-transfer {
    background: #dbeafe;
    color: #1d4ed8;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 100px;
    padding: 8px 14px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
}

/* =========================================================
   SALDO
========================================================= */
.saldo-card {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 18px;
}

.saldo-item {
    background: #fff;
    padding: 20px;
    border-radius: 18px;
    border: 1px solid var(--border);
}

.saldo-label {
    font-size: 12px;
    color: #64748b;
    margin-bottom: 10px;
}

.saldo-value {
    font-size: 24px;
    font-weight: 700;
}

.saldo-item.total {
    background: linear-gradient(135deg, #16a34a, #22c55e);
    color: #fff;
}

/* =========================================================
   TRANSAKSI PAGE
========================================================= */
.driver-check-group {
    display: flex;
    gap: 12px;
    align-items: center;
}

.driver-check-group input {
    flex: 1;
}

.section-divider {
    height: 1px;
    background: #e2e8f0;
    margin: 30px 0;
}

.transaksi-box {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 18px;
    padding: 20px;
    margin-bottom: 18px;
    position: relative;
    transition: var(--transition);
}

.transaksi-box:hover {
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.aksi-group {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
}

/* =========================================================
   EDIT TRANSAKSI PAGE
========================================================= */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    flex-wrap: wrap;
    gap: 15px;
}

.subtitle {
    color: var(--text-light);
    margin-top: 5px;
    font-size: 14px;
}

.top-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.sub-text {
    color: #64748b;
    margin-top: 5px;
    font-size: 14px;
}

.line {
    margin: 35px 0;
    border: none;
    border-top: 1px solid var(--border);
}

.section-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    gap: 15px;
    flex-wrap: wrap;
}

.remove-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 35px;
    height: 35px;
    border: none;
    border-radius: 10px;
    background: var(--danger);
    color: #fff;
    cursor: pointer;
    font-size: 18px;
    font-weight: bold;
    transition: var(--transition);
}

.remove-btn:hover {
    opacity: 0.9;
    transform: scale(1.05);
}

.action-group {
    display: flex;
    gap: 12px;
    margin-top: 30px;
    flex-wrap: wrap;
}

/* =========================================================
   PENGAMBILAN SUSUK PAGE
========================================================= */
.search-driver-box {
    display: flex;
    gap: 14px;
    align-items: stretch;
    width: 100%;
}

.search-driver-box input {
    flex: 1;
    min-width: 0;
}

.search-driver-box button {
    white-space: nowrap;
    min-width: 160px;
}

.driver-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    gap: 20px;
    flex-wrap: wrap;
}

.driver-name {
    font-size: 30px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 5px;
}

.driver-code {
    color: var(--text-light);
    font-size: 14px;
}

.empty-box {
    padding: 60px 20px;
    text-align: center;
}

.empty-box h3 {
    font-size: 20px;
    color: var(--text-light);
    font-weight: 600;
}

.btn-claim {
    width: 100%;
    border: none;
    margin-top: 30px;
    padding: 18px;
    border-radius: 18px;
    background: linear-gradient(135deg, #16a34a, #15803d);
    color: white;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 10px 25px rgba(22, 163, 74, 0.25);
}

.btn-claim:hover {
    transform: translateY(-2px);
    opacity: 0.95;
}

.btn-claim:active {
    transform: scale(0.98);
}

/* =========================================================
   LAPORAN PENGAMBILAN PAGE
========================================================= */
.filter-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.filter-actions {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: nowrap;
}

.filter-actions .btn {
    flex: 0 0 auto;
    min-width: 100px;
}

.summary-card {
    background: linear-gradient(135deg, #16a34a, #15803d);
    color: white;
    padding: 35px;
    border-radius: 24px;
    margin-bottom: 25px;
}

.summary-card small {
    opacity: 0.9;
    display: block;
    margin-bottom: 10px;
}

.summary-card h1 {
    font-size: 42px;
    font-weight: 800;
}

/* =========================================================
   DETAIL PENGAMBILAN PAGE
========================================================= */
.summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 25px;
}

.blue-card {
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
}

.green-card {
    background: linear-gradient(135deg, #16a34a, #15803d);
}

.gold-card {
    background: linear-gradient(135deg, #f59e0b, #d97706);
}

.info-pengambilan {
    display: flex;
    gap: 25px;
    flex-wrap: wrap;
    margin-top: 15px;
}

.info-item {
    background: #B0E0E6;
    padding: 14px 18px;
    border-radius: 14px;
    min-width: 200px;
    transition: var(--transition);
}

.info-item span {
    display: block;
    font-size: 12px;
    color: var(--text-light);
    margin-bottom: 6px;
}

.info-item strong {
    color: var(--text);
    font-size: 15px;
}

.btn-print {
    border: none;
    background: #16a34a;
    color: white;
    padding: 11px 18px;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.btn-print:hover {
    transform: translateY(-2px);
    opacity: 0.95;
}

/* =========================================================
   OVERLAY
========================================================= */
#overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    z-index: 999;
    display: none;
}

#overlay.show {
    display: block;
}

/* =========================================================
   TAB TRANSAKSI
========================================================= */
.tab-transaksi {
    display: flex;
    gap: 10px;
    margin-bottom: 25px;
    border-bottom: 1px solid var(--border);
    padding-bottom: 10px;
}

.tab-btn {
    padding: 12px 24px;
    border: none;
    background: none;
    font-size: 15px;
    font-weight: 600;
    color: var(--text-light);
    cursor: pointer;
    border-radius: 12px 12px 0 0;
    transition: var(--transition);
}

.tab-btn:hover {
    background: #f1f5f9;
    color: var(--primary);
}

.tab-btn.active {
    color: var(--primary);
    background: #eff6ff;
    border-bottom: 3px solid var(--primary);
}

.transaksi-section {
    grid-column: span 4;
}

/* =========================================================
   TOTAL SUSUK
========================================================= */
.total-susuk-card {
    margin-top: 20px;
    text-align: center;
    background: linear-gradient(135deg, #16a34a, #22c55e);
    color: #fff;
}

.total-susuk-card h3 {
    font-size: 18px;
    margin-bottom: 12px;
    font-weight: 600;
}

.total-susuk-value {
    font-size: 38px;
    font-weight: 700;
    letter-spacing: 1px;
}

/* =========================================================
   SWEET ALERT CUSTOM
========================================================= */
.swal2-popup {
    border-radius: 24px !important;
    padding: 25px !important;
}

.swal2-input,
.swal2-select {
    width: 100% !important;
    height: 42px !important;
    padding: 0 14px !important;
    border-radius: 14px !important;
    border: 1px solid #dbe2ea !important;
    background: #f8fafc !important;
    font-size: 14px !important;
    box-sizing: border-box !important;
    margin: 10px 0 !important;
}

.swal2-input:focus,
.swal2-select:focus {
    border-color: #22c55e !important;
    box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.15) !important;
    outline: none !important;
}

.swal2-confirm {
    border-radius: 12px !important;
    font-weight: 700 !important;
}

.swal2-cancel {
    border-radius: 12px !important;
    font-weight: 700 !important;
}

input[name="kode_driver"] {
    text-transform: uppercase;
}
.swal2-popup.popup-pengambilan{
    width: 500px !important;
    padding: 18px !important;
}

.swal2-popup.popup-pengambilan .swal2-title{
    font-size: 20px !important;
    margin-bottom: 10px !important;
}

.swal2-popup.popup-pengambilan label{
    margin-bottom: 3px !important;
    font-size: 13px !important;
}
/* =========================================================
   DARK MODE
========================================================= */
body.dark-mode {
    background: #0f172a;
    color: #fff;
}

body.dark-mode .sidebar {
    background: #020617;
}

body.dark-mode .menu li a:hover {
    background: #1e293b;
}

body.dark-mode .navbar,
body.dark-mode .card,
body.dark-mode .table-modern,
body.dark-mode .modal-box,
body.dark-mode .saldo-item,
body.dark-mode .form-search,
body.dark-mode .board-wrapper,
body.dark-mode .transaksi-box,
body.dark-mode .detail-item,
body.dark-mode .info-item {
    background: #1e293b;
    color: #fff;
    border-color: #334155;
}

body.dark-mode .table-modern td,
body.dark-mode .board-row {
    border-color: #334155;
    color: #e2e8f0;
}

body.dark-mode .table-modern tbody tr:nth-child(even) {
    background: #273449;
}

body.dark-mode .table-modern tbody tr:hover,
body.dark-mode .board-row:hover {
    background: #334155;
}

body.dark-mode input,
body.dark-mode select,
body.dark-mode textarea {
    background: #0f172a;
    border: 1px solid #334155;
    color: #fff;
}

body.dark-mode .card-title,
body.dark-mode .currency,
body.dark-mode .form-group label,
body.dark-mode .driver-name,
body.dark-mode .detail-item b,
body.dark-mode .info-item strong {
    color: #fff;
}

body.dark-mode .page-btn {
    background: #334155;
    color: #fff;
}

body.dark-mode .active-page {
    background: #2563eb;
}

body.dark-mode .line {
    border-top-color: #334155;
}

body.dark-mode .remove-btn {
    background: #dc2626;
}

body.dark-mode .subtitle,
body.dark-mode .driver-code,
body.dark-mode .empty-box h3,
body.dark-mode .info-item span,
body.dark-mode .detail-item label {
    color: #94a3b8;
}

body.dark-mode .detail-item {
    color: #cbd5e1;
}

body.dark-mode .btn-claim {
    background: linear-gradient(135deg, #15803d, #16a34a);
}

body.dark-mode .summary-card {
    background: linear-gradient(135deg, #15803d, #16a34a);
}

body.dark-mode .btn-print {
    background: #15803d;
}

body.dark-mode .form-group input:focus,
body.dark-mode .form-group select:focus,
body.dark-mode .form-group textarea:focus {
    background: #1e293b !important;
    color: #fff;
}

body.dark-mode .tab-btn {
    color: #94a3b8;
}

body.dark-mode .tab-btn:hover {
    background: #334155;
}

body.dark-mode .tab-btn.active {
    color: #60a5fa;
    background: #1e293b;
    border-bottom-color: #60a5fa;
}
body.dark-mode .popup-pengambilan{
    background:#1e293b !important;
    color:white !important;
}

body.dark-mode .popup-pengambilan label{
    color:#e2e8f0 !important;
}

body.dark-mode .popup-pengambilan .swal2-input,
body.dark-mode .popup-pengambilan .swal2-select{
    background:#334155 !important;
    color:white !important;
    border:1px solid #475569 !important;
}
.modal-content-ambil{
    background:#ffffff;
    border-radius:20px;
    padding:25px;
    width:90%;
    max-width:400px;
}

body.dark-mode .modal-content-ambil{
    background:#1e293b;
    color:#f8fafc;
}

body.dark-mode .modal-content-ambil input,
body.dark-mode .modal-content-ambil select{
    background:#334155;
    color:#f8fafc;
    border:1px solid #475569;
}

body.dark-mode .modal-content-ambil label{
    color:#e2e8f0;
}
/* =========================================================
   PRINT STYLES
========================================================= */
@media print {
    body {
        background: white;
    }
    
    .btn-dark,
    .btn-print,
    .btn-warning,
    .sidebar,
    .navbar,
    .topbar,
    .menu,
    .toggle-btn,
    .dark-btn {
        display: none !important;
    }
    
    .card {
        box-shadow: none !important;
        border: none !important;
        padding: 0 !important;
        margin-bottom: 20px !important;
    }
    
    .table-modern {
        width: 100%;
        border-collapse: collapse;
    }
    
    .table-modern th,
    .table-modern td {
        border: 1px solid #ddd;
        padding: 10px;
    }
    
    .badge-mc,
    .badge-nus,
    .badge-grand {
        background: none !important;
        color: black !important;
        border: 1px solid #ccc;
    }
}

/* =========================================================
   RESPONSIVE MOBILE (SEMUA PERANGKAT)
========================================================= */
@media (max-width: 992px) {
    .table-container {
        overflow-x: auto;
    }
    .table-modern {
        min-width: 100%;
    }
}

@media (max-width: 768px) {
    /* Layout */
    .sidebar {
        transform: translateX(-100%);
    }
    
    .sidebar.show {
        transform: translateX(0);
    }
    
    .main {
        margin-left: 0;
    }
    
     .navbar{
        left:0;
        width:100%;
    }

    
    .content {
        padding: 95px 12px 12px;
    }
    
    /* Card */
    .card {
        padding: 12px !important;
        margin-bottom: 15px !important;
        border-radius: 16px !important;
    }
    
    .card-title {
        font-size: 18px !important;
        margin-bottom: 15px !important;
    }
    
    /* Form */
    .form-grid {
        grid-template-columns: 1fr !important;
        gap: 15px !important;
    }
    
    .form-group input,
    .form-group select,
    .form-group textarea {
        font-size: 16px !important;
        padding: 12px 15px !important;
        width:100% !important;
        max-width:100% !important;
        box-sizing:border-box !important;
        min-width:0 !important;
    }
    
    .form-search {
        flex-direction: column;
        align-items: stretch;
        width:100%;
    }
    
    .form-search input{
    min-width:0 !important;
    }
    
    /* Button - Full width di mobile */
    button[type="submit"],
    .btn-claim,
    .filter-actions .btn,
    .form-search .btn {
        width:100% !important;
        margin-bottom: 10px !important;
        justify-content: center !important;
    }
    
    /* Button Groups */
    .aksi,
    .aksi-group,
    .action-group,
    .driver-check-group,
    .search-driver-box,
    .section-title,
    .filter-actions {
        flex-direction: column !important;
        align-items: stretch !important;
    }
    
    .filter-actions {
        flex-wrap: wrap;
    }
    
    .filter-actions .btn {
        flex: 1;
    }
    
    /* Table - Scroll horizontal */
    .table-container {
        width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .table-modern {
        min-width:auto !important;
        width:100% !important;
        border-collapse: collapse;
    }
    
    .table-modern th,
    .table-modern td {
        white-space:normal !important;
        word-break:break-word;
        padding: 10px 12px !important;
        font-size: 12px;
    }
    .table-container::-webkit-scrollbar {
    height: 6px;
    }

    .table-container::-webkit-scrollbar-thumb {
    background: #94a3b8;
    border-radius: 20px;
    }
    /* Board */
    .board-header,
    .board-row {
        grid-template-columns: 1fr 120px;
        padding: 15px;
    }
    
    .currency,
    .buy {
        font-size: 14px;
    }
    
    /* Badge */
    .badge-total,
    .badge-mc,
    .badge-nus,
    .badge-grand,
    .badge-diambil,
    .badge-cash,
    .badge-transfer {
        min-width: auto !important;
        width: 100% !important;
        font-size: 11px !important;
        padding: 4px 8px !important;
    }
    
    /* Driver Header */
    .driver-header {
        flex-direction: column !important;
        text-align: center !important;
    }
    
    .driver-name {
        font-size: 24px !important;
    }
    
    /* Info Pengambilan */
    .info-pengambilan {
        flex-direction: column !important;
        gap: 10px !important;
    }
    
    .info-item {
        min-width: 100% !important;
        width: 100% !important;
        flex-direction: column !important;
        text-align: center !important;
        padding: 10px !important;
    }
    
    /* Detail Items */
    .detail-item {
        margin-bottom: 8px !important;
        padding-bottom: 5px !important;
    }
    
    /* Total Susuk Card */
    .total-susuk-card {
        padding: 15px !important;
    }
    
    .total-susuk-value {
        font-size: 24px !important;
    }
    
    /* Filter Grid */
    .filter-grid {
        grid-template-columns: 1fr !important;
        gap: 12px !important;
    }
    
    /* Rate Card */
    .rate-grid {
        grid-template-columns: 1fr 1fr;
        gap: 12px !important;
    }
    
    .rate-card {
        padding: 15px !important;
    }
    
    .rate-card p {
        font-size: 20px !important;
    }
    
    /* Pagination */
    .pagination {
        gap: 5px !important;
    }
    
    .page-btn {
        min-width: 35px !important;
        height: 35px !important;
        padding: 0 10px !important;
        font-size: 12px !important;
    }
    
    /* Modal di handphone */
    #modalAmbil > div {
        width: 95% !important;
        margin: 10px !important;
        padding: 20px !important;
        max-height: 90vh !important;
        overflow-y: auto !important;
    }
    
    /* Summary Grid */
    .summary-grid {
        grid-template-columns: 1fr !important;
    }
    
    /* Remove Button */
    .remove-btn {
        width: 30px;
        height: 30px;
        font-size: 16px;
        top: 10px;
        right: 10px;
    }
}

/* Ukuran HP kecil (max-width 480px) */
@media (max-width: 480px) {
    .rate-grid {
        grid-template-columns: 1fr !important;
    }
    
    .card-title {
        font-size: 16px !important;
    }
    
    .driver-name {
        font-size: 18px !important;
    }
    
    .total-susuk-value {
        font-size: 20px !important;
    }
    
    .table-modern th,
    .table-modern td {
        font-size: 10px !important;
        padding: 6px 4px !important;
    }
    
    .badge-total,
    .badge-mc,
    .badge-nus,
    .badge-grand {
        font-size: 9px !important;
        padding: 2px 6px !important;
    }
    
}
/* FIX OVERFLOW MOBILE */

html,
body{
    overflow-x:hidden;
}
tfoot td{
    font-weight:700;
    background:#f8fafc;
}
.popup-pengambilan{
    width:650px !important;
    max-width:90vw !important;
    padding:18px !important;
}

.popup-pengambilan .swal2-input,
.popup-pengambilan .swal2-select{
    margin:4px 0 !important;
    height:42px !important;
}