/* ============================================================
   MimPayManage — dark theme
   ============================================================ */
:root {
    --bg:        #0e1117;
    --bg-2:      #161b22;
    --bg-3:      #1c2230;
    --panel:     #161b22;
    --panel-2:   #1b2230;
    --border:    #2a3140;
    --text:      #e6edf3;
    --text-dim:  #9aa7b5;
    --muted:     #6b7785;
    --primary:   #5b8def;
    --primary-2: #3f6fd1;
    --accent:    #22d3ee;
    --success:   #2ecc71;
    --warning:   #f5a623;
    --danger:    #ff5c5c;
    --purple:    #a78bfa;
    --pink:      #f472b6;
    --sidebar-w: 256px;
    --radius:    14px;
    --shadow:    0 8px 28px rgba(0,0,0,.35);
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
    background: var(--bg);
    color: var(--text);
    font-family: "Segoe UI", Inter, system-ui, -apple-system, Arial, sans-serif;
    font-size: 14.5px;
    min-height: 100vh;
}

a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--accent); }

/* ---------- Auth (login / otp) ---------- */
.auth-wrap {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background:
        radial-gradient(1100px 600px at 15% -10%, rgba(91,141,239,.20), transparent 60%),
        radial-gradient(900px 500px at 110% 110%, rgba(34,211,238,.16), transparent 55%),
        var(--bg);
    padding: 24px;
}
.auth-card {
    width: 100%;
    max-width: 410px;
    background: linear-gradient(180deg, var(--panel-2), var(--panel));
    border: 1px solid var(--border);
    border-radius: 18px;
    box-shadow: var(--shadow);
    padding: 34px 30px;
}
.auth-brand { display:flex; align-items:center; gap:12px; margin-bottom:18px; }
.auth-brand .logo {
    width:44px; height:44px; border-radius:12px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    display:flex; align-items:center; justify-content:center;
    font-weight:800; color:#06121f; font-size:20px;
}
.auth-brand h1 { font-size:19px; margin:0; }
.auth-brand small { color: var(--text-dim); }
.auth-sub { color: var(--text-dim); margin: 0 0 22px; font-size: 13.5px; }

/* ---------- Forms ---------- */
.form-group { margin-bottom: 16px; }
label { display:block; font-size:12.5px; color: var(--text-dim); margin-bottom:6px; font-weight:600; letter-spacing:.2px; }
.form-control, .form-select, select, input[type=text], input[type=password], input[type=email],
input[type=number], input[type=date], textarea {
    width: 100%;
    background: var(--bg-3);
    border: 1px solid var(--border);
    color: var(--text);
    border-radius: 10px;
    padding: 11px 13px;
    font-size: 14px;
    outline: none;
    transition: border-color .15s, box-shadow .15s;
}
.form-control:focus, .form-select:focus, select:focus, input:focus, textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(91,141,239,.18);
}
.otp-input { letter-spacing: 14px; text-align:center; font-size: 26px; font-weight:700; }

.btn {
    display:inline-flex; align-items:center; justify-content:center; gap:8px;
    border:1px solid transparent; border-radius:10px;
    padding:11px 18px; font-size:14px; font-weight:600; cursor:pointer;
    transition: filter .15s, transform .02s, background .15s;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: linear-gradient(135deg, var(--primary), var(--primary-2)); color:#fff; }
.btn-primary:hover { filter: brightness(1.08); }
.btn-block { width: 100%; }
.btn-ghost { background: transparent; border-color: var(--border); color: var(--text-dim); }
.btn-ghost:hover { color: var(--text); border-color: var(--primary); }
.btn-sm { padding: 7px 12px; font-size: 13px; }
.btn-danger { background: var(--danger); color:#fff; }
.btn-success { background: var(--success); color:#06210f; }

/* ---------- Alerts ---------- */
.alert { border-radius:10px; padding:11px 14px; margin-bottom:16px; font-size:13.5px; border:1px solid; }
.alert-danger { background: rgba(255,92,92,.12); border-color: rgba(255,92,92,.4); color:#ffb4b4; }
.alert-info  { background: rgba(91,141,239,.12); border-color: rgba(91,141,239,.4); color:#bcd0ff; }
.alert-success { background: rgba(46,204,113,.12); border-color: rgba(46,204,113,.4); color:#a9efc7; }
.field-error, .text-danger { color:#ff9b9b; font-size:12.5px; }
.dev-code { font-size:13px; color: var(--accent); margin-top:8px; }
.dev-code b { font-size:18px; letter-spacing:3px; }

/* ---------- App shell ---------- */
.shell { display:flex; min-height:100vh; }
.sidebar {
    width: var(--sidebar-w);
    flex: 0 0 var(--sidebar-w);
    background: linear-gradient(180deg, #11161f, #0c1016);
    border-right:1px solid var(--border);
    position: sticky; top:0; height:100vh; overflow-y:auto;
    display:flex; flex-direction:column;
}
.sidebar .brand { display:flex; align-items:center; gap:11px; padding:20px 18px; border-bottom:1px solid var(--border); }
.sidebar .brand .logo {
    width:38px; height:38px; border-radius:10px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    display:flex; align-items:center; justify-content:center; font-weight:800; color:#06121f;
}
.sidebar .brand .t { font-weight:700; font-size:15px; }
.sidebar .brand .t small { display:block; color:var(--text-dim); font-weight:500; font-size:11px; }
.nav-section { padding: 14px 14px 4px; color: var(--muted); font-size:10.5px; letter-spacing:1.2px; text-transform:uppercase; }
.nav { list-style:none; margin:0; padding:4px 10px; }
.nav li a {
    display:flex; align-items:center; gap:11px;
    padding:10px 12px; border-radius:10px; color:var(--text-dim);
    font-weight:500; margin-bottom:2px; transition: background .12s, color .12s;
}
.nav li a:hover { background: var(--bg-3); color:var(--text); }
.nav li a.active { background: linear-gradient(135deg, rgba(91,141,239,.22), rgba(34,211,238,.12)); color:#fff; border:1px solid rgba(91,141,239,.35); }
.nav .ic { width:18px; text-align:center; opacity:.9; }

.main { flex:1; min-width:0; display:flex; flex-direction:column; }
.topbar {
    height:62px; display:flex; align-items:center; justify-content:space-between;
    padding:0 24px; border-bottom:1px solid var(--border);
    background: rgba(22,27,34,.7); backdrop-filter: blur(6px); position:sticky; top:0; z-index:10;
}
.topbar .page-title { font-size:17px; font-weight:700; }
.topbar .user { display:flex; align-items:center; gap:12px; color:var(--text-dim); }
.avatar { width:34px; height:34px; border-radius:50%; background:linear-gradient(135deg,var(--purple),var(--primary)); display:flex; align-items:center; justify-content:center; color:#fff; font-weight:700; }
.content { padding:24px; flex:1; }

/* ---------- Cards & grid ---------- */
.cards { display:grid; grid-template-columns: repeat(auto-fit, minmax(210px,1fr)); gap:16px; margin-bottom:22px; }
.stat {
    background: linear-gradient(180deg, var(--panel-2), var(--panel));
    border:1px solid var(--border); border-radius: var(--radius);
    padding:18px; position:relative; overflow:hidden;
}
.stat::after { content:""; position:absolute; right:-30px; top:-30px; width:90px; height:90px; border-radius:50%; opacity:.18; }
.stat .label { color:var(--text-dim); font-size:12.5px; font-weight:600; }
.stat .value { font-size:25px; font-weight:800; margin-top:6px; }
.stat .ic { position:absolute; right:16px; top:16px; font-size:22px; opacity:.5; }
.stat.b-blue::after { background:var(--primary); }
.stat.b-green::after { background:var(--success); }
.stat.b-amber::after { background:var(--warning); }
.stat.b-red::after { background:var(--danger); }
.stat.b-purple::after { background:var(--purple); }
.stat.b-cyan::after { background:var(--accent); }

.panel { background: var(--panel); border:1px solid var(--border); border-radius: var(--radius); padding:18px; margin-bottom:20px; }
.panel h3 { margin:0 0 14px; font-size:15px; }
.panel-head { display:flex; align-items:center; justify-content:space-between; margin-bottom:14px; }
.panel-head h3 { margin:0; }

.grid-2 { display:grid; grid-template-columns: 1fr 1fr; gap:20px; }
.grid-3 { display:grid; grid-template-columns: repeat(3,1fr); gap:16px; }
@media (max-width: 980px){ .grid-2,.grid-3 { grid-template-columns:1fr; } .sidebar{ position:fixed; left:-300px; z-index:50; transition:left .2s; } .sidebar.open{ left:0; } }

/* ---------- Tables ---------- */
.table-wrap { overflow-x:auto; }
table.tbl { width:100%; border-collapse:collapse; font-size:13.5px; }
table.tbl th { text-align:left; padding:11px 12px; color:var(--text-dim); border-bottom:1px solid var(--border); font-weight:600; white-space:nowrap; }
table.tbl td { padding:10px 12px; border-bottom:1px solid rgba(42,49,64,.6); }
table.tbl tbody tr:hover { background: var(--bg-3); }
table.tbl td.num, table.tbl th.num { text-align:right; font-variant-numeric: tabular-nums; }

.badge { display:inline-block; padding:3px 10px; border-radius:20px; font-size:11.5px; font-weight:700; }
.badge.pending { background:rgba(245,166,35,.15); color:#ffd27a; }
.badge.alloc { background:rgba(91,141,239,.15); color:#bcd0ff; }
.badge.partial { background:rgba(167,139,250,.15); color:#d6c8ff; }
.badge.completed { background:rgba(46,204,113,.15); color:#a9efc7; }

.toolbar { display:flex; gap:10px; align-items:center; flex-wrap:wrap; margin-bottom:16px; }
.toolbar .spacer { flex:1; }
.row { display:flex; gap:16px; flex-wrap:wrap; }
.col { flex:1; min-width:200px; }
.muted { color:var(--text-dim); }
.right { text-align:right; }
.mt-0{margin-top:0}.mb-0{margin-bottom:0}
.hint { font-size:12px; color:var(--muted); }
.menu-toggle{ display:none; background:none;border:none;color:var(--text);font-size:22px;cursor:pointer; }
@media (max-width:980px){ .menu-toggle{ display:block; } }

/* ---------- BS Hair branding ---------- */
:root { --gold: #c9a227; --gold-soft: rgba(201,162,39,.45); }

/* Logo images replace the old lettermark tiles. */
.sidebar .brand img.logo,
.auth-brand img.logo {
    background: none;
    object-fit: cover;
    border: 1px solid var(--gold-soft);
    box-shadow: 0 2px 10px rgba(0,0,0,.5);
}
.sidebar .brand img.logo { width: 38px; height: 38px; border-radius: 10px; }
.auth-brand img.logo     { width: 44px; height: 44px; border-radius: 12px; }

.auth-stack { width: 100%; max-width: 410px; }
.auth-stack .auth-card { max-width: none; }

.powered-by {
    margin-top: 12px;
    text-align: center;
    font-size: 11px;
    letter-spacing: .4px;
    color: var(--muted);
}
.powered-by span { color: var(--gold); font-weight: 600; }


/* Auth helper links (forgot password) */
.auth-links { margin-top: 14px; text-align: center; font-size: 13px; }
.auth-links a { color: var(--text-dim); text-decoration: none; }
.auth-links a:hover { color: var(--gold); text-decoration: underline; }
