@import url('https://cdn.jsdelivr.net/gh/rastikerdar/vazirmatn@v33.003/Vazirmatn-font-face.css');

:root {
    --bg: #F6F7F9;
    --surface: #FFFFFF;
    --ink: #1C232E;
    --ink-soft: #667085;
    --line: #E3E6EC;
    --brand-navy: #112C49;       /* آبی سرمه‌ای برند (از لوگو) */
    --brand-navy-dark: #0B1E33;
    --brand-red: #BB1C06;     /* قرمز شعله‌ی برند (از لوگو) */
    --brand-red-dark: #8F1504;
    --danger: #BB1C06;
    --radius: 10px;
    --shadow: 0 1px 2px rgba(17,44,73,.06), 0 4px 14px rgba(17,44,73,.06);
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
    background: var(--bg);
    color: var(--ink);
    font-family: 'Vazirmatn', Tahoma, sans-serif;
    direction: rtl;
    text-align: right;
}

body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

a { color: var(--brand-navy); text-decoration: none; }
a:hover { text-decoration: underline; }

.topbar {
    background: var(--brand-navy);
    color: #fff;
    padding: 14px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.topbar .brand {
    font-weight: 700;
    font-size: 16px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.topbar .brand img { height: 28px; width: auto; display: block; }

.topbar .who {
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 14px;
}

.topbar a { color: #fff; opacity: .9; }
.topbar a:hover { opacity: 1; }

.container {
    max-width: 720px;
    width: 100%;
    margin: 0 auto;
    padding: 24px 16px 60px;
    flex: 1;
}

.wide { max-width: 1040px; }

h1 { font-size: 22px; font-weight: 700; margin: 0 0 4px; }
h2 { font-size: 17px; font-weight: 700; margin: 0 0 12px; }
.subtitle { color: var(--ink-soft); font-size: 14px; margin: 0 0 24px; }

.card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 20px;
    margin-bottom: 16px;
    box-shadow: var(--shadow);
}

.day-card { padding: 0; overflow: hidden; }
.day-head {
    padding: 14px 18px;
    background: #F3EFE4;
    border-bottom: 1px solid var(--line);
    display: flex;
    justify-content: space-between;
    align-items: baseline;
}
.day-head .day-name { font-weight: 700; font-size: 15px; }
.day-head .day-date { color: var(--ink-soft); font-size: 13px; }
.day-body { padding: 14px 18px; }

.deadline-note { font-size: 12.5px; color: var(--ink-soft); margin-top: 8px; }
.deadline-note.passed { color: var(--danger); font-weight: 600; }

.option {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    margin-bottom: 8px;
    cursor: pointer;
}
.option:has(input:checked) { border-color: var(--brand-navy); background: #F4F8F2; }
.option input { margin-top: 3px; accent-color: var(--brand-navy); }
.option .food-name { font-weight: 600; font-size: 14.5px; }
.option .food-desc { font-size: 12.5px; color: var(--ink-soft); margin-top: 2px; }

.option.no-food .food-name { color: var(--ink-soft); }

fieldset { border: none; padding: 0; margin: 0; }
fieldset:disabled .option { opacity: .55; cursor: not-allowed; }

label.field { display: block; margin-bottom: 14px; }
label.field span { display: block; font-size: 13.5px; margin-bottom: 6px; color: var(--ink-soft); }

input[type=text], input[type=password], input[type=date], input[type=datetime-local], textarea, select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    font-family: inherit;
    font-size: 14.5px;
    background: #fff;
    color: var(--ink);
}
input:focus, textarea:focus, select:focus {
    outline: 2px solid var(--brand-navy);
    outline-offset: 1px;
}

.btn {
    display: inline-block;
    padding: 11px 20px;
    border-radius: 8px;
    border: none;
    background: var(--brand-navy);
    color: #fff;
    font-family: inherit;
    font-size: 14.5px;
    font-weight: 600;
    cursor: pointer;
}
.btn:hover { background: var(--brand-navy-dark); }
.btn.secondary { background: transparent; color: var(--brand-navy); border: 1px solid var(--brand-navy); }
.btn.secondary:hover { background: #F4F8F2; text-decoration: none; }
.btn.accent { background: var(--brand-red); }
.btn.accent:hover { background: var(--brand-red-dark); }
.btn:disabled { background: #C9C4B4; cursor: not-allowed; }
.btn-row { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 16px; }

.alert {
    padding: 12px 14px;
    border-radius: 8px;
    font-size: 14px;
    margin-bottom: 18px;
}
.alert.error { background: #FBEAE7; color: var(--danger); border: 1px solid #EFC7BF; }
.alert.success { background: #EAF3E8; color: var(--brand-navy-dark); border: 1px solid #C9DFC4; }

.login-page { flex: 1; display: flex; min-height: 100vh; }

.login-hero {
    flex: 1.15;
    background-size: cover;
    background-position: center;
    position: relative;
    display: none;
    border-bottom: 6px solid var(--brand-red);
}
.login-hero::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(17,44,73,0) 55%, rgba(11,20,33,.55) 100%);
}

.login-wrap {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.login-box { max-width: 380px; width: 100%; }
.login-box .logo {
    text-align: center;
    margin-bottom: 14px;
}
.login-box .logo img { height: 76px; width: auto; }
.login-box h1 { text-align: center; margin-bottom: 4px; }
.login-box .subtitle { text-align: center; }

@media (min-width: 860px) {
    .login-hero { display: block; }
}

table.report {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}
table.report th, table.report td {
    padding: 9px 10px;
    border-bottom: 1px solid var(--line);
    text-align: right;
}
table.report th { background: #F3EFE4; font-weight: 700; }
table.report tr:hover td { background: #FAF8F2; }

.tabs { display: flex; gap: 8px; margin-bottom: 18px; flex-wrap: wrap; }
.tabs a {
    padding: 8px 14px;
    border-radius: 20px;
    border: 1px solid var(--line);
    color: var(--ink);
    font-size: 13.5px;
}
.tabs a.active { background: var(--brand-navy); color: #fff; border-color: var(--brand-navy); }
.tabs a:hover { text-decoration: none; background: #F3EFE4; }

.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; margin-bottom: 20px; }
.stat {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 16px;
    text-align: center;
}
.stat .num { font-size: 26px; font-weight: 700; color: var(--brand-navy-dark); }
.stat .label { font-size: 12.5px; color: var(--ink-soft); margin-top: 2px; }

.empty-state {
    text-align: center;
    padding: 50px 20px;
    color: var(--ink-soft);
}
.empty-state .icon { font-size: 40px; margin-bottom: 10px; }

@media print {
    .topbar, .no-print { display: none !important; }
    body { background: #fff; }
}

@media (max-width: 480px) {
    .container { padding: 16px 12px 50px; }
    .topbar { padding: 12px 14px; }
}
