*{box-sizing:border-box}
html{height:100%}
body{margin:0;font-family:Arial,Helvetica,sans-serif;background:#f3f6fb;color:#061f49;min-height:100vh;display:flex;flex-direction:column;overflow-x:hidden;}
.login-body{min-height:100vh;display:flex;align-items:center;justify-content:center;background:linear-gradient(135deg,#09234f,#6b43d8)}
.login-card{width:390px;background:#fff;border-radius:20px;padding:30px;box-shadow:0 20px 60px rgba(0,0,0,.2)}
.login-card h2{margin:0 0 8px}
.input,select,textarea{width:100%;padding:12px;border:1px solid #dce5f2;border-radius:10px;margin:7px 0 13px;background:#fff}
.btn{background:#276bd8;color:white;border:0;border-radius:10px;padding:11px 16px;font-weight:bold;cursor:pointer;text-decoration:none;display:inline-block}
.button-group{display:flex;flex-wrap:wrap;gap:16px;margin-top:10px}
.button-group .btn{margin:0;display:inline-flex;align-items:center;justify-content:center}
.btn.green{background:#20a354}.btn.red{background:#d93025}.btn.purple{background:#6b43d8}.btn.light{background:#edf4ff;color:#0b2c5c}
.back-to-dashboard{display:none;margin-bottom:12px}
@media(max-width:1000px){.back-to-dashboard{display:block}.back-to-dashboard .btn{width:100%;max-width:240px;padding:10px 14px;border-radius:8px}}

.btn.delivered-btn{background:#0d2a5b}
.layout{display:flex;min-height:100vh}
.sidebar{width:255px;background:#0d2a5b;color:#fff;padding:22px 14px 26px;position:fixed;top:0;bottom:0;overflow-y:auto;overflow-x:hidden}
.sidebar h2{font-size:20px;margin:0 0 22px}
.sidebar a{display:block;color:#e9f1ff;text-decoration:none;padding:12px 14px;border-radius:10px;margin:4px 0;font-size:15px}
.sidebar a:hover,.sidebar a.active{background:#2b6fd8}
.sidebar .logout-link{margin-top:16px;padding:12px 14px;border-radius:10px;background:#d93025;color:#fff;font-weight:700}
.sidebar .logout-link:hover{background:#b82a20}
.main{margin-left:255px;padding:30px;width:calc(100% - 255px);display:flex;flex-direction:column;flex:1}
.topbar{display:flex;justify-content:space-between;align-items:center;margin-bottom:20px}
h1{font-size:34px;margin:0 0 22px}.small{color:#687993}
.btn.small{font-size:12px;padding:6px 12px}
.cards{display:grid;grid-template-columns:repeat(4,1fr);gap:12px;margin-bottom:16px}
.card{background:#fff;border:1px solid #e7edf7;border-radius:16px;padding:14px;box-shadow:0 8px 20px rgba(20,45,90,.05);overflow-x:auto}
.card h2, .card h3{margin:0 0 10px}
.card h3{font-size:14px;color:#61708c}
.card p{margin:6px 0}
.value{font-size:24px;font-weight:900}
.chart-canvas{width:100%;max-width:300px;height:auto;display:block;margin:0 auto 10px}
.chart-legend{display:flex;justify-content:center;gap:12px;flex-wrap:wrap;margin-top:10px}
.legend-item{display:flex;align-items:center;gap:8px;font-size:13px;color:#475569}
.legend-dot{width:12px;height:12px;border-radius:50%;background:#4f46e5;display:inline-block}
.legend-dot.legend-today{background:#10b981}
.grid-2{display:grid;grid-template-columns:minmax(320px,420px) minmax(520px,1fr);gap:18px}.grid-3{display:grid;grid-template-columns:repeat(3,1fr);gap:18px}
.table{width:100%;border-collapse:collapse;background:#fff;border-radius:14px;overflow:hidden}
.table th,.table td{padding:12px;border-bottom:1px solid #eef2f7;text-align:left;font-size:14px}
.table th{background:#f7faff}
.table-wrapper{overflow-x:auto}
.payment-history{display:table;min-width:900px;width:100%}
.payment-history th, .payment-history td{white-space:nowrap;word-break:normal}
.payment-history th:first-child, .payment-history td:first-child,
.payment-history th:nth-child(2), .payment-history td:nth-child(2),
.payment-history th:nth-child(3), .payment-history td:nth-child(3),
.payment-history th:nth-child(4), .payment-history td:nth-child(4),
.payment-history th:last-child, .payment-history td:last-child{width:auto;max-width:none}
.description-summary{margin-top:20px;padding:18px;background:#f7fbff;border:1px solid #d8e7f4;border-radius:16px}
.description-summary h3{margin:0 0 14px;font-size:18px;color:#11254d}
.desc-list{display:grid;gap:10px}
.desc-item{display:flex;justify-content:space-between;align-items:center;padding:10px 12px;border-radius:12px;background:#edf4ff}
.desc-item.total{background:#e1efff;font-weight:800}
.desc-label{font-weight:700;color:#0f2b5d}
.desc-amount{font-weight:700;color:#0b3a60}
.form-box{background:#fff;border:1px solid #e7edf7;border-radius:16px;padding:18px;box-shadow:0 8px 24px rgba(20,45,90,.06)}
.filter-bar{background:#fff;border:1px solid #e7edf7;border-radius:16px;padding:14px 18px;margin-bottom:18px;box-shadow:0 8px 24px rgba(20,45,90,.06)}
.filter-bar form{display:flex;flex-wrap:wrap;gap:12px;align-items:flex-end}
.filter-bar label{margin:0;font-weight:700;color:#1b3251}
.filter-bar .input, .filter-bar select{min-width:170px;max-width:240px}
.filter-bar button{margin-top:4px}
@media print{body *{visibility:hidden;} .report-table, .report-table *{visibility:visible;} .report-table{position:absolute;top:0;left:0;width:100%;} }
.badge{display:inline-block;padding:6px 10px;border-radius:20px;background:#edf4ff;color:#1d5fd0;font-weight:bold;font-size:12px}
.method-tabs{display:flex;gap:8px;flex-wrap:wrap}.tab{padding:9px 13px;background:#edf4ff;border-radius:10px;font-weight:bold}
.mobile-card{max-width:430px;border:10px solid #13213f;border-radius:34px;background:white;padding:24px;box-shadow:0 15px 45px rgba(0,0,0,.13)}
.alert{padding:12px;background:#e9fff1;border:1px solid #bfebcf;border-radius:10px;margin-bottom:12px;color:#11652f}
@media(max-width:1000px){.sidebar{position:relative;width:100%;height:auto}.layout{display:block}.main{margin-left:0;width:100%}.cards,.grid-2,.grid-3{grid-template-columns:1fr}}

@media(max-width:768px){
  .sidebar{
    position:fixed;
    top:0;
    left:-100%;
    width:80%;
    max-width:280px;
    height:100%;
    transform:translateX(-100%);
    transition:transform .3s ease;
    z-index:1001;
    overflow-y:auto;
    padding:22px 14px 26px;
  }

  .sidebar.active{transform:translateX(0)}

  .main{margin-left:0;width:100%;padding-top:64px}

  .sidebar-backdrop{display:none;position:fixed;inset:0;background:rgba(0,0,0,.35);z-index:1000}
  .sidebar-backdrop.active{display:block}

  .mobile-hamburger{position:fixed;top:12px;left:12px;z-index:1002;width:44px;height:44px;border-radius:12px;background:#276bd8;color:#fff;border:none;display:flex;align-items:center;justify-content:center;box-shadow:0 6px 18px rgba(0,0,0,.18);cursor:pointer}
  .mobile-hamburger i{font-size:18px}
}

footer{text-align:center;padding:20px;background:#f3f6fb;border-top:1px solid #e7edf7;color:#687993;font-size:14px;margin-top:auto;align-self:stretch}
.positive { color: #20a354; font-weight: bold; }
.negative { color: #d93025; font-weight: bold; }

