:root{--emerald:#00695c;--emerald2:#004d40;--teal:#00897b;--gold:#d97706;--bg:#f6f8fa;--card:#fff;--text:#0f172a;--muted:#64748b;--border:#e2e8f0;--green:#16a34a;--red:#dc2626;--yellow:#ca8a04;--black:#111827;--shadow:0 6px 20px rgba(15,23,42,.06)}*{box-sizing:border-box}body{margin:0;background:var(--bg);color:var(--text);font-family:system-ui,-apple-system,"Noto Sans Bengali",sans-serif}button,input,select,textarea{font:inherit}button{cursor:pointer;border:0}.app{min-height:100vh}.topbar{height:64px;background:linear-gradient(135deg,var(--emerald2),var(--emerald));color:#fff;display:flex;align-items:center;justify-content:space-between;padding:0 18px;position:sticky;top:0;z-index:30}.brand{display:flex;align-items:center;gap:10px;font-weight:800}.brand img{width:42px;height:42px;border-radius:10px;object-fit:cover;background:#fff}.brand small{display:block;font-weight:500;opacity:.8;font-size:11px}.top-actions{display:flex;gap:8px}.iconbtn{background:rgba(255,255,255,.13);color:#fff;border-radius:10px;padding:9px 11px}.layout{display:flex;min-height:calc(100vh - 64px)}.sidebar{width:245px;background:#fff;border-right:1px solid var(--border);padding:14px 10px;position:sticky;top:64px;height:calc(100vh - 64px);overflow:auto}.navbtn{width:100%;display:flex;align-items:center;gap:10px;padding:11px 12px;border-radius:11px;background:transparent;text-align:left;color:#334155;margin:3px 0}.navbtn.active,.navbtn:hover{background:#e6f4f1;color:var(--emerald);font-weight:700}.content{flex:1;padding:20px;max-width:1500px;margin:auto;width:100%}.pagehead{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-bottom:18px}.pagehead h1{margin:0;font-size:24px}.muted{color:var(--muted)}.btn{padding:10px 14px;border-radius:10px;font-weight:700}.primary{background:var(--emerald);color:#fff}.secondary{background:#e2e8f0;color:#334155}.danger{background:#fee2e2;color:#b91c1c}.gold{background:#fff3d6;color:#9a5b00}.cards{display:grid;grid-template-columns:repeat(4,1fr);gap:14px}.card{background:var(--card);border:1px solid var(--border);border-radius:16px;padding:16px;box-shadow:var(--shadow)}.metric .label{color:var(--muted);font-size:13px}.metric .value{font-size:25px;font-weight:800;margin-top:7px}.metric .hint{font-size:12px;color:var(--muted);margin-top:4px}.grid2{display:grid;grid-template-columns:1fr 1fr;gap:16px;margin-top:16px}.section{margin-top:16px}.tablewrap{overflow:auto;background:#fff;border:1px solid var(--border);border-radius:15px}.table{width:100%;border-collapse:collapse;min-width:720px}.table th,.table td{padding:11px 12px;border-bottom:1px solid var(--border);text-align:left;font-size:13px}.table th{background:#f8fafc;color:#475569}.toolbar{display:flex;gap:8px;flex-wrap:wrap;margin-bottom:12px}.field{display:flex;flex-direction:column;gap:5px}.field label{font-size:12px;color:#475569;font-weight:700}.field input,.field select,.field textarea{border:1px solid #cbd5e1;border-radius:10px;padding:10px 11px;background:#fff;outline:none}.field textarea{min-height:85px;resize:vertical}.formgrid{display:grid;grid-template-columns:repeat(2,1fr);gap:12px}.modalback{position:fixed;inset:0;background:rgba(15,23,42,.55);display:flex;align-items:center;justify-content:center;padding:16px;z-index:100}.modal{background:#fff;border-radius:18px;width:min(700px,100%);max-height:92vh;overflow:auto;padding:20px}.modal h2{margin:0 0 15px}.modalfoot{display:flex;justify-content:flex-end;gap:8px;margin-top:18px}.seatlegend{display:flex;gap:12px;flex-wrap:wrap;margin-bottom:12px;font-size:13px}.legend span{display:inline-flex;align-items:center;gap:5px}.dot{width:13px;height:13px;border-radius:4px;display:inline-block}.seatmap{background:#f8fafc;border:1px solid var(--border);border-radius:18px;padding:15px;overflow:auto}.bus{max-width:520px;margin:auto;background:#fff;border:2px solid #cbd5e1;border-radius:24px;padding:15px}.driver{background:#ecfeff;border:1px dashed #67e8f9;border-radius:12px;padding:8px;text-align:center;color:#0e7490;font-size:12px;margin-bottom:12px}.seatrow{display:grid;grid-template-columns:repeat(2,minmax(0,1fr)) 18px repeat(2,minmax(0,1fr));gap:8px;margin:8px 0}.seatrow:not(.last) .seat:nth-child(3){grid-column:4;margin-left:0;width:100%}.seatrow:not(.last) .seat:nth-child(4){grid-column:5}.seatrow.last{grid-template-columns:repeat(5,1fr)}.seat{min-height:48px;border-radius:10px;border:2px solid transparent;color:#fff;font-weight:800;display:flex;align-items:center;justify-content:center;transition:.15s}.seat.available{background:var(--green)}.seat.booked{background:var(--red)}.seat.partial{background:var(--yellow)}.seat.hold{background:#000!important;color:#fff!important;border-color:#000!important}.seat.pending{background:#6b7280!important;color:#fff!important;border-color:#6b7280!important}.seat.blocked{background:var(--black)}.seat:hover{transform:translateY(-1px);filter:brightness(1.05)}.badge{display:inline-block;padding:5px 8px;border-radius:999px;font-size:11px;font-weight:800}.b-green{background:#dcfce7;color:#166534}.b-red{background:#fee2e2;color:#991b1b}.b-yellow{background:#fef3c7;color:#92400e}.b-gray{background:#e5e7eb;color:#374151}.mobilebottom{display:none}.empty{padding:28px;text-align:center;color:var(--muted)}.toast{position:fixed;right:18px;bottom:18px;background:#0f172a;color:#fff;padding:12px 16px;border-radius:10px;z-index:200}.statline{display:flex;justify-content:space-between;padding:8px 0;border-bottom:1px solid var(--border)}.trash{background:#fff7ed;border-color:#fed7aa}.dangerbox{background:#fff1f2;border:1px solid #fecdd3;padding:12px;border-radius:12px;color:#9f1239}.login{min-height:100vh;display:grid;place-items:center;background:linear-gradient(135deg,#003c35,#00897b);padding:18px}.loginbox{width:min(420px,100%);background:#fff;border-radius:22px;padding:26px;box-shadow:0 20px 60px rgba(0,0,0,.2)}.loginbox img{width:72px;height:72px;display:block;margin:auto;border-radius:18px}.loginbox h1{text-align:center;margin:10px 0 2px}.loginbox p{text-align:center;color:var(--muted);margin:0 0 20px}.loginbox .field{margin:12px 0}.loginbox .btn{width:100%}
@media(max-width:900px){.sidebar{display:none}.content{padding:14px 14px 84px}.cards{grid-template-columns:repeat(2,1fr)}.grid2{grid-template-columns:1fr}.mobilebottom{position:fixed;display:grid;grid-template-columns:repeat(4,1fr);bottom:0;left:0;right:0;background:#fff;border-top:1px solid var(--border);z-index:50;padding:6px}.mobilebottom button{background:transparent;color:#64748b;font-size:11px;padding:6px 2px}.mobilebottom button.active{color:var(--emerald);font-weight:800}.formgrid{grid-template-columns:1fr}.pagehead h1{font-size:20px}.brand span{display:none}.table{min-width:650px}}
@media(max-width:480px){.cards{grid-template-columns:1fr 1fr;gap:9px}.card{padding:12px;border-radius:13px}.metric .value{font-size:20px}.topbar{padding:0 12px}.content{padding:12px 10px 84px}.pagehead{align-items:flex-start}.seatrow{gap:6px}.seat{min-height:44px;font-size:13px}.bus{padding:10px}.toolbar>*{flex:1 1 45%}.toolbar .btn{flex:1 1 auto}}
.selectionbar{display:flex;align-items:center;gap:10px;flex-wrap:wrap;padding:12px;margin:12px 0;background:#ecfdf5;border:1px solid #a7f3d0;border-radius:12px;color:#065f46}.selectionbar b{flex:1;min-width:220px}.selectionbar .btn:disabled{opacity:.45;cursor:not-allowed}.seat.selected{outline:4px solid #f59e0b;box-shadow:0 0 0 2px #fff inset;transform:translateY(-2px)}.selected-summary{background:#ecfdf5;border:1px solid #a7f3d0;padding:12px;border-radius:12px;line-height:1.8;margin-bottom:12px}

.rolepill{display:inline-flex;align-items:center;padding:7px 10px;border-radius:999px;background:#e8f5f2;color:#00695c;font-weight:700;font-size:13px}.roleselect{border:1px solid #d8e0e8;border-radius:10px;padding:8px 10px;background:#fff;color:#172033;font-weight:600}.quickgrid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.rolecards{display:grid;gap:10px}.rolecards>div{padding:12px;border:1px solid #e4e8ee;border-radius:12px;display:flex;justify-content:space-between;gap:10px}.rolecards small{color:#6b7280}.demologins{margin-top:14px;padding:12px;border-radius:12px;background:#f3f6f9;line-height:1.7;font-size:12px}@media(max-width:720px){.top-actions{gap:6px}.rolepill{display:none}.roleselect{max-width:110px}.quickgrid{grid-template-columns:1fr 1fr}.rolecards>div{display:block}}

.headactions{display:flex;gap:10px;align-items:center;flex-wrap:wrap}
@media(max-width:700px){.headactions{width:100%}.headactions .btn{flex:1;min-width:0}}

.actionstack{display:flex;gap:6px;flex-wrap:wrap}.actionstack .btn{padding:7px 9px;font-size:12px}

/* Booking details: compact action buttons on mobile only. No other UI changes. */
.booking-detail-actions{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:6px;align-items:stretch}
.booking-detail-actions .btn{min-width:0;padding:8px 4px;font-size:12px;line-height:1.15;white-space:normal;overflow-wrap:anywhere}
@media(max-width:480px){.booking-detail-actions{gap:5px}.booking-detail-actions .btn{padding:7px 3px;font-size:11px;line-height:1.12}}

/* Booking Details actions: keep all four buttons fully visible on narrow screens. */
.modalfoot.booking-detail-actions{width:100%;max-width:100%;box-sizing:border-box;display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:4px;overflow:hidden}
.modalfoot.booking-detail-actions>*{min-width:0!important;width:100%!important;max-width:100%!important;box-sizing:border-box;overflow:hidden;text-overflow:clip;white-space:normal;word-break:break-word}
.modalfoot.booking-detail-actions .btn{padding:6px 2px!important;font-size:10px!important;line-height:1.08!important;border-radius:8px}
@media(max-width:480px){
  .modal{padding:16px;overflow-x:hidden}
  .modalfoot.booking-detail-actions{gap:4px;margin-left:0;margin-right:0}
  .modalfoot.booking-detail-actions .btn{padding:6px 1px!important;font-size:9.5px!important;line-height:1.05!important}
}

/* Trips action buttons: compact, equal-sized controls only. */
.trip-actions{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:5px;align-items:stretch}
.trip-actions .btn{min-width:0;width:100%;padding:7px 6px;font-size:11px;line-height:1.1;border-radius:8px;white-space:normal;overflow-wrap:anywhere}
@media(max-width:700px){.trip-actions{grid-template-columns:1fr;gap:4px}.trip-actions .btn{padding:6px 5px;font-size:11px;min-height:34px}}
.notifbtn{position:relative;min-width:42px}.notifbadge{position:absolute;top:-5px;right:-5px;min-width:18px;height:18px;padding:0 5px;border-radius:999px;background:#dc2626;color:#fff;font-size:10px;display:flex;align-items:center;justify-content:center;border:2px solid #00695c}
/* Desktop layout alignment fix: keep main content aligned to the available workspace instead of centering it. */
@media(min-width:901px){.content{margin:0;max-width:none;width:100%;}}

/* Customer List: preserve the normal responsive layout. */
@media (min-width:901px){
  .app.customer-page .sidebar{
    display:flex !important;
    visibility:visible !important;
  }
}
@media (max-width:900px){
  .app.customer-page .sidebar{
    display:none !important;
  }
  .app.customer-page .content{
    margin-left:0 !important;
    width:100% !important;
    padding:14px 14px 100px !important;
  }
}

/* Customer List desktop: prevent the left menu from shrinking because of the wide table. */
@media (min-width:901px){
  .app.customer-page .layout{
    display:flex !important;
  }
  .app.customer-page .sidebar{
    flex:0 0 245px !important;
    width:245px !important;
    min-width:245px !important;
  }
  .app.customer-page .content{
    flex:1 1 auto !important;
    min-width:0 !important;
    width:auto !important;
    margin:0 !important;
  }
}

/* Customer List only: lock the desktop/tablet workspace so the left menu cannot collapse. */
@media (min-width:701px){
  .app.customer-page .layout{
    display:grid !important;
    grid-template-columns:245px minmax(0,1fr) !important;
    width:100% !important;
  }
  .app.customer-page .sidebar{
    display:flex !important;
    flex:initial !important;
    width:245px !important;
    min-width:245px !important;
    max-width:245px !important;
    box-sizing:border-box !important;
    grid-column:1 !important;
  }
  .app.customer-page .content{
    grid-column:2 !important;
    min-width:0 !important;
    width:auto !important;
    max-width:none !important;
    margin:0 !important;
    box-sizing:border-box !important;
    overflow-x:hidden !important;
  }
}
@media (max-width:700px){
  .app.customer-page .layout{
    display:block !important;
  }
  .app.customer-page .sidebar{
    display:none !important;
  }
  .app.customer-page .content{
    width:100% !important;
    margin:0 !important;
    max-width:none !important;
  }
}



/* FINAL CUSTOMER LIST SIDEBAR FIX ONLY */
@media (min-width:701px){
  .app.customer-page .layout{
    display:grid !important;
    grid-template-columns:360px minmax(0,1fr) !important;
    width:100vw !important;
    max-width:none !important;
    margin:0 !important;
  }
  .app.customer-page .sidebar{
    display:flex !important;
    width:360px !important;
    min-width:360px !important;
    max-width:360px !important;
    flex:none !important;
    box-sizing:border-box !important;
    overflow-x:hidden !important;
    position:sticky !important;
    left:0 !important;
  }
  .app.customer-page .sidebar .navbtn{
    width:100% !important;
    box-sizing:border-box !important;
    white-space:nowrap !important;
  }
  .app.customer-page .content{
    grid-column:2 !important;
    width:100% !important;
    min-width:0 !important;
    max-width:none !important;
    margin:0 !important;
    box-sizing:border-box !important;
    overflow-x:auto !important;
  }
}


/* CUSTOMER LIST ONLY — restore sidebar as a vertical menu. */
@media (min-width:701px){
  .app.customer-page .sidebar{
    display:flex !important;
    flex-direction:column !important;
    align-items:stretch !important;
    justify-content:flex-start !important;
    width:245px !important;
    min-width:245px !important;
    max-width:245px !important;
    flex:0 0 245px !important;
    box-sizing:border-box !important;
    overflow-x:hidden !important;
  }
  .app.customer-page .sidebar .navbtn{
    display:flex !important;
    flex:0 0 auto !important;
    width:100% !important;
    min-width:0 !important;
    margin:3px 0 !important;
    box-sizing:border-box !important;
    white-space:nowrap !important;
  }
  .app.customer-page .layout{
    display:flex !important;
    width:100% !important;
    max-width:none !important;
  }
  .app.customer-page .content{
    flex:1 1 auto !important;
    min-width:0 !important;
    width:auto !important;
    max-width:none !important;
    margin:0 !important;
    box-sizing:border-box !important;
  }
}

/* CUSTOMER LIST — keep the last rows above the fixed mobile navigation. */
@media (max-width:900px){
  .app.customer-page .content{
    padding-bottom:150px !important;
  }
  .app.customer-page #customerTable{
    margin-bottom:20px !important;
  }
}
