/* Seri's Choice Enterprise - one stylesheet for every page */
:root {
    --peach: #fbd9b0;
    --maroon: #800000;
    --red: #dc3545;
    --blue: #007bff;
    --blue-dark: #0069d9;
    --teal: #17a2b8;
    --yellow: #ffc107;
    --dark: #343a40;
    --panel: #f1f1f1;
    --readonly: #e4e7ea;
    --border: #ced4da;
    --text: #212529;
    --muted: #6c757d;
    --sidebar-w: 230px;
    --font: "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); font-size: 14px; color: var(--text); background: #fff; line-height: 1.4; }
h1, h2, h3 { margin: 0; }
img { max-width: 100%; }
.is-hidden { display: none !important; }

/* ---------- Shared admin layout ---------- */
.topbar { background: var(--peach); height: 10px; display: flex; align-items: center; }
.menu-toggle, .topbar-brand { display: none; }
.app { display: flex; min-height: calc(100vh - 10px); }
.sidebar { width: var(--sidebar-w); flex: 0 0 var(--sidebar-w); background: #000; color: #fff; padding: 20px 0 30px; }
.sidebar-brand { font-weight: 700; font-size: 17px; line-height: 1.25; padding: 0 18px 22px; color: #fff; }
.sidebar ul { list-style: none; margin: 0; padding: 0; }
.sidebar a { display: block; padding: 7px 18px; color: #b5b5b5; text-decoration: none; font-size: 14px; }
.sidebar a:hover { color: #fff; }
.sidebar a.active { color: #fff; background: #222; border-left: 3px solid var(--peach); padding-left: 15px; }
.content { flex: 1; min-width: 0; padding: 18px 28px 40px; background: #fff; }
.sidebar-backdrop { display: none; }

.home-title { font-size: 30px; font-weight: 400; letter-spacing: .5px; text-transform: uppercase; }
.home-tagline { font-size: 12px; margin-top: 2px; }

/* decorative western titles */
.western { font-family: "Rye", "Georgia", serif; font-weight: 400; text-align: center; font-size: 34px; line-height: 1.15; margin: 4px 0 22px; color: #111; letter-spacing: .5px; }
.page-title { font-size: 26px; font-weight: 500; margin-bottom: 14px; }

/* ---------- Alerts ---------- */
.alert { padding: 10px 14px; border-radius: 4px; margin: 0 0 14px; font-size: 14px; border: 1px solid transparent; }
.alert ul { margin: 0; padding-left: 18px; }
.alert-error { background: #f8d7da; color: #721c24; border-color: #f1b0b7; }
.alert-success { background: #d4edda; color: #155724; border-color: #b9dfc2; }
.alert-info { background: #d1ecf1; color: #0c5460; border-color: #b8dde4; }
.alert-warn { background: #fff3cd; color: #856404; border-color: #ffe69c; }

/* ---------- Forms ---------- */
.form-wrap { max-width: 860px; margin: 0 auto; }
.panel { background: var(--panel); padding: 16px 18px; border-radius: 4px; margin-bottom: 16px; }
.section-label { font-weight: 700; margin: 0 0 4px; font-size: 14px; }
.grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: 12px 14px; }
.c-2 { grid-column: span 2; } .c-3 { grid-column: span 3; } .c-4 { grid-column: span 4; }
.c-5 { grid-column: span 5; } .c-6 { grid-column: span 6; } .c-7 { grid-column: span 7; }
.c-8 { grid-column: span 8; } .c-9 { grid-column: span 9; } .c-12 { grid-column: span 12; }
.field { display: flex; flex-direction: column; min-width: 0; }
.field label { font-size: 12px; color: #444; margin-bottom: 3px; }
.req { color: var(--red); }

input[type=text], input[type=password], input[type=email], input[type=tel], input[type=date], input[type=number], select {
    width: 100%; height: 34px; padding: 4px 8px; font: inherit; color: var(--text);
    background: #fff; border: 1px solid var(--border); border-radius: 3px;
}
input:focus, select:focus, button:focus-visible, a:focus-visible { outline: 2px solid #80bdff; outline-offset: 1px; }
input[readonly], input:disabled, select:disabled { background: var(--readonly); color: #333; }

/* buttons */
.btn { display: inline-block; border: 1px solid transparent; border-radius: 4px; padding: 7px 16px; font: inherit; font-size: 13px; cursor: pointer; color: #fff; text-align: center; text-decoration: none; }
.btn:disabled { opacity: .6; cursor: not-allowed; }
.btn-blue { background: var(--blue); } .btn-blue:hover:not(:disabled) { background: var(--blue-dark); }
.btn-teal { background: var(--teal); }
.btn-yellow { background: var(--yellow); color: #212529; }
.btn-red { background: var(--red); }
.btn-dark { background: var(--dark); }
.btn-outline { background: #fff; border-color: #999; color: #555; }
.btn-sm { padding: 5px 12px; }
.btn-search { background: #e60000; color: #fff; border: 1px solid #b30000; padding: 6px 18px; border-radius: 3px; font: inherit; font-size: 13px; cursor: pointer; text-transform: uppercase; }
.btn-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }

/* employee registration */
.photo-col { display: flex; flex-direction: column; gap: 8px; }
.photo-box { width: 130px; height: 150px; border: 1px solid #bbb; background: #fff; overflow: hidden; }
.photo-box img { width: 100%; height: 100%; object-fit: cover; display: block; }
.photo-col input[type=file] { font-size: 12px; max-width: 220px; }
.reg-top { display: grid; grid-template-columns: 220px 1fr; gap: 14px; align-items: start; }

/* ---------- Reports ---------- */
.report-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.report-head h1 { font-size: 24px; font-weight: 500; }
.search-form { display: flex; align-items: center; gap: 6px; }
.search-form label { font-size: 13px; }
.search-form input { width: 180px; height: 30px; }
.table-wrap { overflow-x: auto; }
table.report { width: 100%; border-collapse: collapse; font-size: 13px; min-width: 640px; }
table.report thead th { background: var(--maroon); color: #fff; text-align: left; padding: 10px 8px; font-weight: 600; vertical-align: bottom; }
table.report td { padding: 9px 8px; border-bottom: 1px solid #e3e3e3; vertical-align: top; }
table.report tbody tr:hover { background: #faf5f5; }
table.report .num { text-align: right; white-space: nowrap; }
.empty-row td { text-align: center; color: var(--muted); padding: 22px; }

/* ---------- Payroll ---------- */
.card { background: #fff; border: 1px solid #eee; box-shadow: 0 1px 6px rgba(0,0,0,.08); padding: 18px 26px 22px; max-width: 900px; margin: 0 auto; }
.pr-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 0 40px; }
.pr-title { font-size: 15px; font-weight: 700; text-transform: uppercase; margin: 14px 0 8px; }
.pr-title:first-child { margin-top: 0; }
.pr-row { display: grid; grid-template-columns: 1fr 150px; align-items: center; gap: 8px; margin-bottom: 7px; }
.pr-row label { font-size: 12px; color: #333; }
.pr-photo { width: 150px; height: 160px; border: 1px solid #ccc; padding: 3px; background: #fff; margin-bottom: 14px; }
.pr-photo img { width: 100%; height: 100%; object-fit: cover; display: block; background: #e8e8e8; }
.pr-search { display: flex; justify-content: flex-start; }
.pr-btns { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 16px; }
.pr-btns .btn { font-size: 11px; padding: 6px 10px; text-transform: uppercase; }

/* ---------- POS ---------- */
.pos-wrap { max-width: 980px; margin: 0 auto; }
.pos-search { display: flex; gap: 6px; margin-bottom: 12px; align-items: center; flex-wrap: wrap; }
.pos-search select { width: 240px; max-width: 100%; }
.pos-search .btn-search { background: var(--red); border-color: var(--red); }
.product-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 14px 12px; margin-bottom: 18px; }
.product { background: none; border: 0; padding: 0; cursor: pointer; font: inherit; color: var(--text); text-align: center; }
.product .thumb { display: block; width: 100%; aspect-ratio: 1 / 1; border: 1px solid #bbb; background: #fff; box-shadow: 0 2px 5px rgba(0,0,0,.25); overflow: hidden; }
.product .thumb img { width: 100%; height: 100%; object-fit: contain; display: block; }
.product:hover .thumb, .product.selected .thumb { border-color: var(--blue); box-shadow: 0 2px 8px rgba(0,123,255,.45); }
.product .pname { display: block; margin-top: 5px; font-size: 12px; }
.product .pprice { display: block; font-weight: 700; font-size: 12px; }
.pos-bottom { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.pos-bottom h2 { font-size: 15px; font-weight: 700; margin-bottom: 10px; }
.od-row { display: grid; grid-template-columns: 140px 1fr; gap: 8px; align-items: center; margin-bottom: 7px; }
.od-row label { font-size: 12px; }
.order-list { margin-top: 10px; border: 1px solid #ddd; background: #fafafa; font-size: 12px; max-height: 170px; overflow-y: auto; }
.order-list .oi { display: grid; grid-template-columns: 1fr auto auto; gap: 8px; padding: 5px 8px; border-bottom: 1px solid #eee; align-items: center; }
.order-list .oi:last-child { border-bottom: 0; }
.order-list .oi-empty { padding: 8px; color: var(--muted); }
.order-list .rm { border: 0; background: none; color: var(--red); cursor: pointer; font-size: 16px; line-height: 1; padding: 0 4px; }
.discount-opts { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 12px; margin-bottom: 10px; }
.discount-opts label { display: inline-flex; align-items: center; gap: 4px; cursor: pointer; }
.pos-actions { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 6px; margin-bottom: 8px; }
.pos-actions .btn { font-size: 12px; padding: 9px 4px; text-transform: uppercase; }
.keypad { display: grid; grid-template-columns: 1.15fr repeat(3, 1fr); grid-template-rows: repeat(5, 44px); gap: 5px; }
.key { background: var(--dark); color: #fff; border: 0; border-radius: 4px; font: inherit; font-size: 14px; cursor: pointer; }
.key:hover { background: #23272b; }
.key.enter { grid-row: 1 / span 5; grid-column: 1; background: var(--blue); font-size: 13px; text-transform: uppercase; }
.key.enter:hover { background: var(--blue-dark); }

/* ---------- User account ---------- */
.ua-top { display: grid; grid-template-columns: 130px 1fr; gap: 12px; align-items: start; }
.ua-photo { width: 100px; height: 100px; border: 1px solid #ddd; background: #fff; }
.ua-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* ---------- Login ---------- */
.login-body { background: #f7f7f9; min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 20px; }
.login-card { width: 100%; max-width: 360px; background: #fff; border-radius: 12px; box-shadow: 0 12px 36px rgba(0,0,0,.18); overflow: hidden; }
.login-main { padding: 26px 26px 22px; text-align: center; }
.login-logo { width: 72px; height: 72px; object-fit: contain; display: block; margin: 0 auto 6px; }
.login-title { color: #4aa8e0; font-size: 25px; font-weight: 400; margin: 0 0 16px; }
.login-main input { background: #f2f2f2; border: 1px solid #f2f2f2; height: 42px; margin-bottom: 10px; text-align: center; font-size: 13px; }
.login-btn { width: 56%; background: #5bb9ea; color: #fff; border: 0; height: 36px; border-radius: 3px; font-size: 11px; letter-spacing: .5px; cursor: pointer; box-shadow: 0 4px 10px rgba(91,185,234,.45); margin-top: 6px; }
.login-btn:hover { background: #46a9de; }
.login-foot { background: #f4f4f4; padding: 16px; text-align: center; border-top: 1px solid #eee; }
.login-foot a { color: #7fb8de; text-decoration: none; font-size: 12px; }
.login-note { margin-top: 12px; font-size: 12px; text-align: left; }

/* setup page */
.setup-wrap { max-width: 720px; margin: 30px auto; padding: 0 16px; }
.setup-wrap h1 { font-size: 24px; margin-bottom: 8px; }

/* ---------- Small screens ---------- */
@media (max-width: 1000px) { .product-grid { grid-template-columns: repeat(4, 1fr); } }
@media (max-width: 820px) {
    .topbar { height: 48px; padding: 0 10px; gap: 10px; }
    .menu-toggle { display: inline-block; background: none; border: 0; font-size: 26px; cursor: pointer; line-height: 1; padding: 4px 8px; color: #222; }
    .topbar-brand { display: inline; font-weight: 700; font-size: 14px; }
    .sidebar { position: fixed; top: 0; bottom: 0; left: 0; z-index: 30; transform: translateX(-100%); visibility: hidden; transition: transform .2s, visibility .2s; overflow-y: auto; }
    .sidebar.open { transform: none; visibility: visible; }
    .sidebar-backdrop.show { display: block; position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 20; }
    .content { padding: 14px 14px 30px; }
    .western { font-size: 24px; }
    .c-2, .c-3, .c-4, .c-5, .c-6, .c-7, .c-8, .c-9 { grid-column: span 12; }
    .reg-top { grid-template-columns: 1fr; }
    .pr-cols, .pos-bottom { grid-template-columns: 1fr; }
    .card { padding: 14px; }
    .product-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 520px) {
    .product-grid { grid-template-columns: repeat(2, 1fr); }
    .pr-row { grid-template-columns: 1fr 130px; }
    .home-title { font-size: 22px; }
    .ua-top { grid-template-columns: 1fr; }
    .search-form input { width: 130px; }
}

.mt-12 { margin-top: 12px; }
.mt-14 { margin-top: 14px; }
.product[hidden] { display: none; }
