/* OneCounter — plain CSS, no build step on purpose (nothing to compile on a shared host). */

:root {
    --bg: #F4F6F3;
    --surface: #FFFFFF;
    --border: #D9DFD6;
    --text: #16201B;
    --text-muted: #57685E;
    --accent: #1B7A4D;
    --accent-dark: #135C3A;
    --accent-soft: #DCEEE3;
    --danger: #B3261E;
    --danger-soft: #FBEAE9;
    --warn: #A2540C;
    --warn-soft: #F3E4D2;
    --radius: 8px;
    --sidebar-w: 220px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
    background: var(--bg);
    color: var(--text);
    font-family: 'Segoe UI', 'Noto Sans Bengali', Arial, sans-serif;
    font-size: 15px;
    line-height: 1.5;
}
a { color: var(--accent-dark); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { margin: 0 0 .5em; line-height: 1.25; }

/* ---- layout shell ---- */
.shell { display: flex; min-height: 100vh; }
.sidebar {
    width: var(--sidebar-w); flex: 0 0 var(--sidebar-w);
    background: var(--accent-dark); color: #fff;
    padding: 20px 0; position: sticky; top: 0; height: 100vh; overflow-y: auto;
}
.sidebar .brand { font-size: 1.2rem; font-weight: 700; padding: 0 20px 20px; }
.sidebar .brand span { opacity: .75; font-weight: 400; }
.sidebar nav a {
    display: block; padding: 10px 20px; color: rgba(255,255,255,.85);
    border-left: 3px solid transparent;
}
.sidebar nav a:hover, .sidebar nav a.active {
    background: rgba(255,255,255,.08); color: #fff; text-decoration: none;
    border-left-color: #fff;
}
.main { flex: 1 1 auto; min-width: 0; }
.topbar {
    display: flex; align-items: center; justify-content: space-between;
    padding: 14px 24px; background: var(--surface); border-bottom: 1px solid var(--border);
}
.topbar .biz { font-weight: 600; }
.topbar .right { display: flex; align-items: center; gap: 14px; font-size: .88rem; color: var(--text-muted); }
.content { padding: 24px; max-width: 1100px; }

/* ---- plain (unauthenticated / installer) layout ---- */
.plain-shell { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px; }
.plain-card { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 32px; width: 100%; max-width: 460px; box-shadow: 0 8px 24px -12px rgba(22,32,27,0.15); }
.plain-card.wide { max-width: 640px; }
.plain-card .brand { text-align: center; font-size: 1.4rem; font-weight: 800; color: var(--accent-dark); margin-bottom: 4px; }
.plain-card .tagline { text-align: center; color: var(--text-muted); font-size: .85rem; margin-bottom: 24px; }

/* ---- install wizard steps ---- */
.steps { display: flex; gap: 6px; margin-bottom: 24px; }
.steps li, .steps span { list-style: none; }
.steps { padding: 0; }
.step-pill {
    flex: 1; text-align: center; font-size: .74rem; text-transform: uppercase; letter-spacing: .04em;
    padding: 8px 4px; border-radius: 999px; background: var(--bg); color: var(--text-muted);
}
.step-pill.active { background: var(--accent); color: #fff; }
.step-pill.done { background: var(--accent-soft); color: var(--accent-dark); }

.req-list { list-style: none; padding: 0; margin: 0 0 20px; }
.req-list li { display: flex; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid var(--border); font-size: .9rem; }
.req-list li:last-child { border-bottom: none; }
.badge-ok { color: var(--accent-dark); font-weight: 600; }
.badge-fail { color: var(--danger); font-weight: 600; }

/* ---- cards / stats ---- */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; margin-bottom: 24px; }
.stat-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px 18px; }
.stat-card .label { font-size: .78rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: .04em; margin-bottom: 6px; }
.stat-card .value { font-size: 1.6rem; font-weight: 700; }
.panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px 20px; margin-bottom: 20px; }
.panel h2 { font-size: 1.05rem; }
.empty-state { color: var(--text-muted); font-size: .9rem; padding: 16px 0; }

/* ---- tables ---- */
table { width: 100%; border-collapse: collapse; font-size: .9rem; }
thead th { text-align: left; color: var(--text-muted); font-size: .74rem; text-transform: uppercase; letter-spacing: .04em; padding: 8px 10px; border-bottom: 1px solid var(--border); }
tbody td { padding: 10px; border-bottom: 1px solid var(--border); }
tbody tr:hover { background: var(--bg); }

/* ---- forms ---- */
.field { margin-bottom: 16px; }
.field label { display: block; font-size: .85rem; font-weight: 600; margin-bottom: 5px; }
.field input, .field select, .field textarea {
    width: 100%; padding: 9px 11px; border: 1px solid var(--border); border-radius: 6px;
    font-size: .92rem; font-family: inherit; background: var(--surface); color: var(--text);
}
.field input:focus, .field select:focus, .field textarea:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.field small.hint { color: var(--text-muted); }
.field-row { display: flex; gap: 14px; }
.field-row .field { flex: 1; }

.btn {
    display: inline-block; padding: 10px 18px; border-radius: 6px; border: 1px solid var(--accent);
    background: var(--accent); color: #fff; font-size: .92rem; font-weight: 600; cursor: pointer;
}
.btn:hover { background: var(--accent-dark); border-color: var(--accent-dark); text-decoration: none; }
.btn.block { width: 100%; text-align: center; }
.btn.secondary { background: var(--surface); color: var(--accent-dark); }
.btn.danger { background: var(--danger); border-color: var(--danger); }

.alert { padding: 12px 16px; border-radius: 6px; margin-bottom: 18px; font-size: .9rem; }
.alert-success { background: var(--accent-soft); color: var(--accent-dark); }
.alert-error { background: var(--danger-soft); color: var(--danger); }
.alert-warn { background: var(--warn-soft); color: var(--warn); }

/* ---- POS screen ---- */
.pos-grid { display: grid; grid-template-columns: 1fr 340px; gap: 18px; align-items: start; }
.pos-products { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.pos-product { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 12px; cursor: pointer; text-align: left; font: inherit; }
.pos-product:hover { border-color: var(--accent); }
.pos-product .name { font-weight: 600; font-size: .88rem; margin-bottom: 4px; }
.pos-product .price { color: var(--accent-dark); font-weight: 700; }
.cart-panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; position: sticky; top: 16px; }
.cart-line { display: flex; justify-content: space-between; gap: 8px; padding: 8px 0; border-bottom: 1px solid var(--border); font-size: .88rem; }
.cart-total-row { display: flex; justify-content: space-between; padding: 10px 0; font-weight: 700; font-size: 1.1rem; border-top: 2px solid var(--text); margin-top: 8px; }

/* mobile */
@media (max-width: 820px) {
    .shell { flex-direction: column; }
    .sidebar { width: 100%; flex: none; height: auto; position: static; padding: 12px 0; }
    .sidebar nav { display: flex; overflow-x: auto; }
    .sidebar nav a { white-space: nowrap; border-left: none; border-bottom: 3px solid transparent; }
    .sidebar nav a.active { border-bottom-color: #fff; }
    .content { padding: 16px; }
    .pos-grid { grid-template-columns: 1fr; }
    .field-row { flex-direction: column; gap: 0; }
}
