/* hozor-app — luxury dark & gold theme */
* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
    font-family: Tahoma, "Segoe UI", sans-serif;
    background: radial-gradient(1200px 600px at 50% -10%, #251d0f 0%, #12100a 55%, #0a0805 100%);
    background-attachment: fixed;
    color: #f3ecd9;
    direction: rtl;
    min-height: 100vh;
}
.wrap { max-width: 520px; margin: 0 auto; padding: 16px 16px 40px; }
.topbar {
    background: linear-gradient(180deg, #1e1810 0%, #131009 100%);
    border-bottom: 1px solid rgba(212,175,55,.4);
    color: #f3ecd9;
    padding: 20px 16px 18px;
    text-align: center;
    border-radius: 0 0 20px 20px;
    box-shadow: 0 4px 24px rgba(0,0,0,.5);
}
.topbar .company { font-size: 14px; color: #e8c15a; font-weight: bold; letter-spacing: .5px; }
.topbar h1 { font-size: 19px; margin-top: 6px; color: #f8f2df; }
.topbar .date { font-size: 13px; color: #a89f8d; margin-top: 6px; }
.welcome { text-align: center; margin-top: 28px; padding: 0 10px; }
.welcome .greet {
    font-size: 36px; font-weight: bold; line-height: 1.4;
    background: linear-gradient(135deg, #f7e58b 0%, #d4af37 50%, #b8860b 100%);
    -webkit-background-clip: text; background-clip: text;
    -webkit-text-fill-color: transparent; color: transparent;
}
.welcome .sub { font-size: 15px; color: #cfc29c; margin-top: 10px; line-height: 2; }
.welcome .rule {
    width: 130px; height: 2px; margin: 16px auto 0;
    background: linear-gradient(90deg, transparent, #d4af37, transparent);
}
.card {
    background: linear-gradient(180deg, #211b11 0%, #161207 100%);
    border: 1px solid rgba(212,175,55,.3);
    border-radius: 18px;
    padding: 22px 18px;
    margin-top: 18px;
    box-shadow: 0 8px 30px rgba(0,0,0,.45);
}
.card h2 { font-size: 17px; margin-bottom: 14px; text-align: center; color: #f2e9cb; }
label.lbl { display: block; font-size: 14px; margin-bottom: 8px; color: #cbbf9f; }
input[type=text], input[type=password], input[type=number], select {
    width: 100%;
    font-family: inherit;
    font-size: 22px;
    padding: 14px 12px;
    border: 2px solid rgba(212,175,55,.3);
    border-radius: 12px;
    text-align: center;
    background: #0e0c07;
    color: #f5efe0;
    direction: ltr;
}
input[type=text].fa, input[type=password].fa { direction: rtl; text-align: right; font-size: 16px; }
input:focus, select:focus { outline: none; border-color: #d4af37; background: #14110a; }
select { font-size: 16px; direction: rtl; }
.btn {
    display: block;
    width: 100%;
    font-family: inherit;
    font-size: 18px;
    font-weight: bold;
    padding: 16px;
    margin-top: 14px;
    border: none;
    border-radius: 14px;
    cursor: pointer;
    color: #231a06;
    background: linear-gradient(135deg, #f0d878 0%, #d4af37 45%, #a87f14 100%);
    box-shadow: 0 4px 18px rgba(212,175,55,.28);
}
.btn:active { transform: scale(.98); }
.btn.green { background: linear-gradient(135deg, #f0d878 0%, #c9962e 100%); color: #231a06; }
.btn.red { background: transparent; border: 1px solid rgba(212,175,55,.45); color: #e8c15a; box-shadow: none; }
.btn.gray { background: #3a3324; color: #d8cfae; box-shadow: none; }
.btn.small { font-size: 14px; padding: 10px; }
.bigchoice { display: flex; gap: 12px; margin-top: 14px; }
.bigchoice .btn { margin-top: 0; font-size: 20px; padding: 22px 8px; }
.msg { text-align: center; padding: 14px; border-radius: 12px; margin-top: 14px; font-size: 15px; }
.msg.err { background: rgba(185,28,28,.18); border: 1px solid rgba(185,28,28,.5); color: #fca5a5; }
.msg.ok { background: rgba(21,128,61,.18); border: 1px solid rgba(21,128,61,.5); color: #86efac; }
.msg.info { background: rgba(212,175,55,.12); border: 1px solid rgba(212,175,55,.35); color: #e8c15a; }
.nameplate {
    text-align: center;
    font-size: 24px;
    font-weight: bold;
    padding: 18px 10px;
    background: rgba(212,175,55,.07);
    border: 2px dashed rgba(212,175,55,.55);
    border-radius: 14px;
    margin-bottom: 6px;
    color: #f6e9bd;
}
.success { text-align: center; padding: 26px 10px; }
.success .tick {
    font-size: 60px;
    background: linear-gradient(135deg, #f7e58b, #b8860b);
    -webkit-background-clip: text; background-clip: text;
    -webkit-text-fill-color: transparent; color: transparent;
}
.success h2 {
    font-size: 24px; margin: 10px 0;
    background: linear-gradient(135deg, #f7e58b 0%, #d4af37 60%, #b8860b 100%);
    -webkit-background-clip: text; background-clip: text;
    -webkit-text-fill-color: transparent; color: transparent;
}
.success .t { font-size: 42px; font-weight: bold; color: #f0d878; margin: 8px 0; }
.success p { font-size: 15px; color: #cbbf9f; margin-top: 8px; line-height: 2; }
table.grid { width: 100%; border-collapse: collapse; margin-top: 12px; font-size: 14px; }
table.grid th, table.grid td { padding: 10px 8px; border-bottom: 1px solid rgba(212,175,55,.14); text-align: center; }
table.grid th { background: rgba(212,175,55,.1); font-size: 13px; color: #e8c15a; }
table.grid td { color: #eee4c4; }
.badge { display: inline-block; padding: 4px 12px; border-radius: 999px; font-size: 13px; font-weight: bold; }
.badge.yes { background: rgba(212,175,55,.18); border: 1px solid rgba(212,175,55,.5); color: #f0d878; }
.badge.no { background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.14); color: #a89f8d; }
.badge.on { background: rgba(21,128,61,.25); border: 1px solid rgba(21,128,61,.6); color: #86efac; }
.badge.off { background: rgba(185,28,28,.25); border: 1px solid rgba(185,28,28,.6); color: #fca5a5; }
.stats { display: flex; gap: 12px; margin-top: 14px; }
.stat {
    flex: 1; border-radius: 14px; padding: 16px 8px; text-align: center;
    background: linear-gradient(180deg, #211b11 0%, #161207 100%);
    border: 1px solid rgba(212,175,55,.3);
    box-shadow: 0 4px 16px rgba(0,0,0,.4);
}
.stat .n { font-size: 34px; font-weight: bold; color: #f0d878; }
.stat .l { font-size: 13px; color: #a89f8d; margin-top: 4px; }
.tabs { display: flex; gap: 8px; margin-top: 16px; }
.tabs a {
    flex: 1; text-align: center; text-decoration: none; color: #d8cfae;
    background: #1d1810; border: 1px solid rgba(212,175,55,.22);
    padding: 12px 4px; border-radius: 12px; font-size: 14px;
}
.tabs a.active {
    background: linear-gradient(135deg, #f0d878 0%, #c9962e 100%);
    color: #231a06; font-weight: bold; border: none;
}
.rowform { display: flex; gap: 8px; margin-top: 12px; }
.rowform input { font-size: 16px; }
.rowform .btn { margin-top: 0; width: auto; padding: 12px 20px; font-size: 15px; white-space: nowrap; }
.hrow { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.linkbtn { background: none; border: none; color: #e8c15a; font-family: inherit; font-size: 14px; cursor: pointer; text-decoration: underline; padding: 4px; }
.footer { text-align: center; color: #6b6250; font-size: 12px; margin-top: 26px; }
.histselects { display: flex; gap: 8px; margin-top: 12px; }
.histselects select { flex: 1; }
.empty { text-align: center; color: #6b6250; padding: 24px 0; font-size: 14px; }

/* foroosh-app additions */
.tablewrap { overflow-x: auto; margin: 12px -6px 0; padding: 0 6px; -webkit-overflow-scrolling: touch; }
.tablewrap table.grid { min-width: 860px; }
table.grid td.num { font-weight: bold; color: #f0d878; }
.rank { display: inline-block; min-width: 30px; padding: 4px 6px; border-radius: 10px;
    background: rgba(212,175,55,.14); border: 1px solid rgba(212,175,55,.4);
    color: #f0d878; font-weight: bold; }
.rank.r1 { background: linear-gradient(135deg, #f0d878, #b8860b); color: #231a06; border: none; }
.rank.r2 { background: rgba(220,225,235,.18); border-color: rgba(220,225,235,.45); color: #e6ebf3; }
.rank.r3 { background: rgba(205,140,60,.18); border-color: rgba(205,140,60,.5); color: #e8b06a; }
.monthpick { display: flex; gap: 8px; margin-top: 12px; }
.monthpick select { flex: 1; }
.hint { font-size: 12px; color: #8a8069; margin-top: 8px; line-height: 2; text-align: center; }
.delbtn { background: none; border: none; color: #f87171; font-family: inherit;
    font-size: 13px; cursor: pointer; text-decoration: underline; padding: 4px; }
.invrow { display: flex; align-items: center; justify-content: space-between; gap: 8px;
    padding: 10px 4px; border-bottom: 1px solid rgba(212,175,55,.14); font-size: 14px; }
.invrow .who { color: #f2e9cb; font-weight: bold; }
.invrow .amt { color: #e8c15a; }
.invrow .dt { color: #8a8069; font-size: 12px; }

label.chk { display: flex; align-items: center; gap: 10px; padding: 9px 4px;
    border-bottom: 1px solid rgba(212,175,55,.14); font-size: 15px; color: #f2e9cb; cursor: pointer; }
label.chk input[type="checkbox"] { width: 20px; height: 20px; accent-color: #d4af37; }

.ctabtn { display: block; text-align: center; text-decoration: none;
    background: linear-gradient(135deg, #d4af37, #b8860b);
    color: #1a1408 !important; font-weight: bold; font-size: 20px;
    padding: 16px 12px; border-radius: 14px; margin: 4px 0 18px;
    box-shadow: 0 4px 18px rgba(212,175,55,.35); }
.ctabtn:active { transform: scale(.98); }

/* compact one-screen dashboard (no scrolling) */
.dash .topbar { padding: 12px 12px 10px; }
.dash .topbar .company { font-size: 12px; }
.dash .topbar h1 { font-size: 16px; margin-top: 4px; }
.dash .topbar .date { font-size: 11px; margin-top: 4px; }
.dash .monthpick { margin-top: 8px; }
.dash .monthpick select { font-size: 14px; padding: 8px; }
.dash .stats { margin-top: 8px; gap: 8px; }
.dash .stat { padding: 8px 4px; border-radius: 12px; }
.dash .stat .n { font-size: 22px; }
.dash .stat .l { font-size: 10.5px; }
.dash .ctabtn { font-size: 17px; padding: 11px 10px; margin: 8px 0 10px; border-radius: 12px; }
.dash .card { padding: 12px 8px; margin-top: 10px; }
.dash .card h2 { font-size: 14px; margin-bottom: 8px; }
.dash .hint { font-size: 10.5px; margin-top: 6px; }
.dash .footer { margin-top: 12px; }
table.grid.compact { table-layout: fixed; width: 100%; margin-top: 6px; }
table.grid.compact th, table.grid.compact td {
    padding: 4px 1px; font-size: 11.5px;
    white-space: nowrap; overflow: hidden; }
table.grid.compact th { font-size: 10px; position: sticky; top: 0; }
table.grid.compact td.nm { text-align: right; text-overflow: ellipsis; }
table.grid.compact .rank { min-width: 20px; padding: 2px 3px; font-size: 10.5px; border-radius: 7px; }

/* one-screen v2: slimmer chrome so all 21 rows fit */
.dash .topbar { padding: 10px 10px 8px; }
.dash .topbar h1 { font-size: 15px; margin-top: 3px; }
.dash .topbar .date { font-size: 10.5px; margin-top: 3px; }
.dash .monthpick select { padding: 6px; font-size: 13px; }
.sumstrip { text-align: center; font-size: 12px; color: #a89f8d; margin-top: 8px;
    padding: 6px 4px; background: rgba(212,175,55,.07);
    border: 1px solid rgba(212,175,55,.2); border-radius: 10px; }
.sumstrip b { color: #f0d878; }
.dash .ctabtn { font-size: 16px; padding: 9px 10px; margin: 6px 0 8px; }
.dash .card h2 { font-size: 13px; margin-bottom: 6px; }
table.grid.compact th, table.grid.compact td { padding: 3px 1px; font-size: 11px; }

/* one-screen v3: fit all 21 rows */
.dash .topbar { padding: 8px 10px 6px; }
.dash .topbar .company { font-size: 11px; }
.dash .topbar h1 { font-size: 14px; margin-top: 2px; }
.dash .topbar .date { font-size: 10px; margin-top: 2px; }
.dash .ctabtn { font-size: 15px; padding: 8px 10px; }
.dash .card { padding: 10px 6px; }
.dash .card h2 { font-size: 12.5px; margin-bottom: 4px; }
table.grid.compact th { font-size: 9.5px; padding: 3px 1px; }
table.grid.compact td { padding: 2px 1px; font-size: 10.5px; }
table.grid.compact .rank { min-width: 18px; padding: 1px 2px; font-size: 10px; }

/* one-screen v4: final squeeze — everything on the first screen */
.dash .topbar { padding: 6px 10px 5px; }
.dash .topbar .company { font-size: 10px; }
.dash .topbar h1 { font-size: 13px; margin-top: 1px; }
.dash .topbar .date { font-size: 9.5px; margin-top: 1px; }
.dash .monthpick { margin-top: 6px; }
.dash .monthpick select { padding: 5px; font-size: 12px; }
.sumstrip { font-size: 11px; padding: 4px; margin-top: 6px; }
.dash .ctabtn { font-size: 14px; padding: 7px 10px; margin: 6px 0; }
.dash .card { padding: 8px 6px; margin-top: 8px; }
.dash .card h2 { font-size: 12px; margin-bottom: 3px; }
.dash .hint { font-size: 9px; margin-top: 4px; line-height: 1.6; }
table.grid.compact th { font-size: 9px; padding: 2px 1px; }
table.grid.compact td { padding: 2px 1px; font-size: 10px; line-height: 1.5; }
table.grid.compact .rank { min-width: 16px; padding: 0 2px; font-size: 9.5px; }
