/* Gas Station Management System - main theme */
:root { --gs-primary: #1e3a8a; --gs-accent: #f97316; --gs-sidebar-w: 250px; --gs-bg: #f3f5f9; }
body { background: var(--gs-bg); font-family: "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; font-size: .92rem; color: #1f2937; }
a { color: var(--gs-primary); }
.gs-wrapper { display: flex; min-height: 100vh; }

/* Sidebar */
.gs-sidebar { width: var(--gs-sidebar-w); background: var(--gs-primary); color: #fff; position: fixed; top: 0; bottom: 0; left: 0; overflow-y: auto; z-index: 1040; transition: transform .2s; }
.gs-sidebar::-webkit-scrollbar { width: 6px; } .gs-sidebar::-webkit-scrollbar-thumb { background: rgba(255,255,255,.2); border-radius: 3px; }
.gs-brand { display: flex; align-items: center; gap: .6rem; padding: 1.1rem 1.2rem; font-weight: 700; font-size: 1.25rem; letter-spacing: .5px; border-bottom: 1px solid rgba(255,255,255,.12); }
.gs-brand i { color: var(--gs-accent); font-size: 1.6rem; } .gs-brand img { max-height: 34px; }
.gs-menu { padding: .5rem 0 2rem; }
.gs-menu-head { font-size: .7rem; text-transform: uppercase; letter-spacing: 1px; opacity: .55; padding: 1rem 1.3rem .35rem; }
.gs-menu a { display: flex; align-items: center; gap: .75rem; color: rgba(255,255,255,.85); text-decoration: none; padding: .55rem 1.3rem; border-left: 3px solid transparent; }
.gs-menu a i { font-size: 1.05rem; width: 20px; text-align: center; }
.gs-menu a:hover { background: rgba(255,255,255,.08); color: #fff; }
.gs-menu a.active { background: rgba(255,255,255,.14); color: #fff; border-left-color: var(--gs-accent); font-weight: 600; }

/* Main */
.gs-main { flex: 1; margin-left: var(--gs-sidebar-w); display: flex; flex-direction: column; min-width: 0; }
.gs-topbar { background: #fff; height: 60px; display: flex; align-items: center; padding: 0 1.5rem; box-shadow: 0 1px 3px rgba(0,0,0,.06); position: sticky; top: 0; z-index: 1030; }
.gs-page-title { font-size: 1.15rem; font-weight: 600; margin: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gs-content { padding: 1.5rem; flex: 1; }
.gs-footer { padding: .9rem 1.5rem; font-size: .8rem; color: #6b7280; border-top: 1px solid #e5e7eb; background: #fff; }
.gs-avatar { width: 28px; height: 28px; border-radius: 50%; background: var(--gs-accent); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: .85rem; }
.btn-branch { background: #fff7ed; color: #9a3412; border: 1px solid #fed7aa; }
.btn-branch:hover, .btn-branch:focus { background: #ffedd5; color: #9a3412; }
.gs-backdrop { display: none; }

@media (max-width: 991.98px) {
  .gs-sidebar { transform: translateX(-100%); }
  .gs-sidebar.show { transform: translateX(0); }
  .gs-main { margin-left: 0; }
  .gs-backdrop.show { display: block; position: fixed; inset: 0; background: rgba(0,0,0,.4); z-index: 1035; }
  .gs-content { padding: 1rem; }
  .gs-topbar { padding: 0 1rem; }
}

/* Cards & components */
.card { border: 0; border-radius: .7rem; box-shadow: 0 1px 3px rgba(16,24,40,.06), 0 1px 2px rgba(16,24,40,.04); }
.card-header { background: #fff; border-bottom: 1px solid #eef0f4; font-weight: 600; padding: .85rem 1.1rem; border-radius: .7rem .7rem 0 0 !important; }
.btn-primary { background: var(--gs-primary); border-color: var(--gs-primary); }
.btn-primary:hover, .btn-primary:focus { background: var(--gs-primary); border-color: var(--gs-primary); filter: brightness(1.12); }
.btn-accent { background: var(--gs-accent); border-color: var(--gs-accent); color: #fff; }
.btn-accent:hover { background: var(--gs-accent); color: #fff; filter: brightness(1.08); }
.text-primary { color: var(--gs-primary) !important; }
.bg-primary { background-color: var(--gs-primary) !important; }
.page-actions { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; justify-content: space-between; margin-bottom: 1rem; }
.table > :not(caption) > * > * { padding: .55rem .6rem; }
.table thead th { background: #f8fafc; font-weight: 600; font-size: .8rem; text-transform: uppercase; letter-spacing: .3px; color: #475569; white-space: nowrap; }
.form-label { font-weight: 500; font-size: .85rem; margin-bottom: .3rem; }
.required::after { content: " *"; color: #dc2626; }

/* Stat boxes */
.stat-card { padding: 1.1rem 1.2rem; display: flex; align-items: center; gap: 1rem; }
.stat-icon { width: 50px; height: 50px; border-radius: .7rem; display: flex; align-items: center; justify-content: center; font-size: 1.5rem; flex-shrink: 0; }
.stat-card .stat-label { font-size: .78rem; color: #6b7280; text-transform: uppercase; letter-spacing: .3px; }
.stat-card .stat-value { font-size: 1.35rem; font-weight: 700; line-height: 1.2; }
.bg-soft-primary { background: #dbeafe; color: #1d4ed8; } .bg-soft-accent { background: #ffedd5; color: #c2410c; }
.bg-soft-success { background: #dcfce7; color: #15803d; } .bg-soft-danger { background: #fee2e2; color: #b91c1c; }
.bg-soft-info { background: #cffafe; color: #0e7490; } .bg-soft-purple { background: #ede9fe; color: #6d28d9; }

/* Tank gauge */
.tank-gauge { height: 14px; background: #e5e7eb; border-radius: 7px; overflow: hidden; }
.tank-gauge > div { height: 100%; border-radius: 7px; }

/* Login */
.login-page { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, var(--gs-primary) 0%, #0f172a 100%); padding: 1rem; }
.login-card { width: 100%; max-width: 400px; }
.login-card .login-logo { font-size: 3rem; color: var(--gs-accent); }

/* Print */
@media print {
  .gs-sidebar, .gs-topbar, .gs-footer, .no-print, .dataTables_filter, .dataTables_length, .dataTables_paginate, .dataTables_info, .btn { display: none !important; }
  .gs-main { margin: 0 !important; } .gs-content { padding: 0 !important; } body { background: #fff; }
  .card { box-shadow: none !important; border: 0 !important; }
}

/* Inline filter forms inside the actions bar */
.page-actions form .form-control, .page-actions form .form-select { width: auto; min-width: 140px; }
@media (max-width: 575.98px) { .page-actions form .form-control, .page-actions form .form-select { width: 100%; } }
