/* PetStore Pro — لوحة التحكم */
:root {
    --primary: #0d7a5f;
    --accent: #f4a259;
    --ink: #1d2b36;
    --muted: #5b6b7b;
    --line: #e3e8ee;
    --bg: #f2f5f7;
    --card: #ffffff;
    --danger: #d64550;
    --ok: #1f9d61;
    --warn: #e2a03f;
    --info: #2f7fd1;
    --radius: 14px;
    --sidebar-w: 258px;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { height: 100%; }
body.admin-body {
    font-family: 'Cairo', Tahoma, Arial, sans-serif;
    background: var(--bg); color: var(--ink);
    font-size: 14.5px; line-height: 1.75;
    display: flex; min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}
a { color: var(--primary); text-decoration: none; }
.ic { vertical-align: -3px; flex-shrink: 0; }

/* ---------- الشريط الجانبي ---------- */
.sidebar {
    width: var(--sidebar-w); flex-shrink: 0;
    background: #122b23; color: #d5e4de;
    display: flex; flex-direction: column;
    position: sticky; top: 0; height: 100vh; overflow-y: auto;
}
.sidebar-brand {
    display: flex; align-items: center; gap: 10px;
    padding: 18px 18px 14px; font-weight: 700; font-size: 17px; color: #fff;
}
.sidebar-brand .brand-icon {
    width: 38px; height: 38px; border-radius: 11px; background: var(--primary); color: #fff;
    display: inline-flex; align-items: center; justify-content: center;
}
.demo-flag { margin-inline-start: auto; background: var(--accent); color: #3c2a10; font-size: 11px; font-weight: 700; border-radius: 7px; padding: 3px 8px; }
.sidebar-nav { flex: 1; padding: 6px 10px 16px; }
.nav-group { margin-bottom: 10px; }
.nav-group-label {
    font-size: 11.5px; font-weight: 700; letter-spacing: 0.4px;
    color: #7d968c; padding: 10px 10px 4px; text-transform: uppercase;
}
.nav-item {
    display: flex; align-items: center; gap: 10px;
    padding: 9px 12px; border-radius: 10px; color: #cfe0d9; font-size: 13.8px; font-weight: 600;
    margin-bottom: 2px;
}
.nav-item:hover { background: rgba(255,255,255,0.07); color: #fff; }
.nav-item.active { background: var(--primary); color: #fff; }
.sidebar-foot { padding: 12px 16px; font-size: 11.5px; color: #7d968c; border-top: 1px solid rgba(255,255,255,0.06); }

/* ---------- المحتوى ---------- */
.page-wrap { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar {
    display: flex; align-items: center; gap: 14px;
    background: var(--card); border-bottom: 1px solid var(--line);
    padding: 12px 22px; position: sticky; top: 0; z-index: 30;
}
.topbar-title { font-size: 19px; font-weight: 700; }
.topbar-actions { margin-inline-start: auto; display: flex; align-items: center; gap: 10px; }
.chip {
    display: inline-flex; align-items: center; gap: 6px;
    border: 1px solid var(--line); border-radius: 999px;
    background: #fff; padding: 6px 14px; font-size: 13px; font-weight: 700; color: var(--muted);
}
.chip:hover { border-color: var(--primary); color: var(--primary); }
.chip-on { background: var(--primary); border-color: var(--primary); color: #fff; }
.chip-on:hover { color: #fff; }
.chip-red.chip-on { background: var(--danger); border-color: var(--danger); }
.menu-toggle { display: none; background: none; border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; cursor: pointer; color: var(--ink); }
.user-chip {
    display: flex; align-items: center; gap: 8px;
    background: var(--bg); border: 1px solid var(--line); border-radius: 999px; padding: 5px 12px;
    font-weight: 700; font-size: 13px;
}
.user-link { color: var(--muted); display: inline-flex; }
.user-link:hover { color: var(--primary); }
.demo-banner {
    background: repeating-linear-gradient(45deg, #fff4e0, #fff4e0 14px, #ffe9c4 14px, #ffe9c4 28px);
    color: #7a5410; text-align: center; font-weight: 700; padding: 8px 16px; font-size: 13.5px;
    border-bottom: 1px solid #f0d9ae;
}

/* ---------- المحتوى الداخلي ---------- */
.content-area, .page-wrap > * { min-width: 0; }
.page-wrap { padding: 0; }
.page-wrap > .topbar { margin-bottom: 0; }
.page-wrap { padding-bottom: 0; }
.page-wrap { flex: 1; }
.page-wrap > .flash-area, .page-wrap > .kpi-grid, .page-wrap > .panel, .page-wrap > .list-tools, .page-wrap > .grid2, .page-wrap > .grid2-1,
.page-wrap > .page-desc, .page-wrap > .filters-row, .page-wrap > .view-tabs, .page-wrap > .day-nav, .page-wrap > .rpt-filters, .page-wrap > .crumbs,
.page-wrap > .detail-head, .page-wrap > .board4, .page-wrap > .calendar, .page-wrap > .cal-legend, .page-wrap > .notif-list, .page-wrap > .empty-state,
.page-wrap > .form-actions, .page-wrap > .demo-banner {
    margin: 18px 22px 0;
}
.admin-foot { margin-top: auto; text-align: center; color: var(--muted); font-size: 12.5px; padding: 26px 0 20px; }
.page-desc { color: var(--muted); margin-top: 14px !important; }
.crumbs { color: var(--muted); font-size: 13px; display: flex; gap: 8px; }
.crumbs a:hover { text-decoration: underline; }

/* ---------- KPI ---------- */
.kpi-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; }
.kpi-grid.kpi-3 { grid-template-columns: repeat(3, 1fr); }
.kpi {
    background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
    padding: 16px; display: flex; align-items: center; gap: 12px;
}
.kpi-icon {
    width: 44px; height: 44px; border-radius: 12px; flex-shrink: 0;
    display: inline-flex; align-items: center; justify-content: center;
}
.tone-green .kpi-icon { background: #e7f6ee; color: var(--ok); }
.tone-orange .kpi-icon { background: #fdf1e2; color: var(--warn); }
.tone-blue .kpi-icon { background: #e8f1fb; color: var(--info); }
.tone-red .kpi-icon { background: #fdebec; color: var(--danger); }
.kpi-value { font-size: 22px; font-weight: 700; line-height: 1.2; }
.kpi-label { color: var(--muted); font-size: 12.5px; font-weight: 600; }

/* ---------- اللوحات ---------- */
.panel { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 18px; }
.panel-head {
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    padding: 15px 20px; border-bottom: 1px solid var(--line);
}
.panel-head h2 { font-size: 16px; font-weight: 700; }
.panel-actions { display: flex; gap: 8px; align-items: center; }
.panel-body { padding: 18px 20px; }
.panel-flush { padding: 0; overflow-x: auto; }
.narrow-panel { max-width: 620px; }
.narrow-wide { max-width: 860px; }

.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; align-items: start; }
.grid2 > .panel { margin-bottom: 0; }
.grid2-1 { display: grid; grid-template-columns: 2fr 1fr; gap: 18px; align-items: start; }
.grid2-1 > .panel { margin-bottom: 0; }

/* ---------- الجداول ---------- */
.tbl { width: 100%; border-collapse: collapse; min-width: 640px; }
.tbl th, .tbl td { padding: 11px 14px; text-align: start; border-bottom: 1px solid var(--line); font-size: 13.6px; }
.tbl thead th { background: var(--bg); color: var(--muted); font-size: 12.5px; font-weight: 700; }
.tbl tbody tr:hover { background: #fafcfd; }
.tbl tbody tr:last-child td { border-bottom: none; }
.row-link { font-weight: 700; }
.wrap { max-width: 360px; overflow-wrap: anywhere; }
.center { text-align: center !important; }
.muted { color: var(--muted); }
.pad-note { padding: 12px 16px; font-size: 13px; }
.row-actions { white-space: nowrap; }
.row-actions > * { vertical-align: middle; }
.act-code { background: var(--bg); border: 1px solid var(--line); border-radius: 6px; padding: 1px 7px; font-size: 12px; }

.ibtn {
    display: inline-flex; align-items: center; justify-content: center;
    width: 32px; height: 32px; border-radius: 9px;
    border: 1px solid var(--line); background: #fff; color: var(--muted);
    cursor: pointer; transition: all 0.12s;
}
.ibtn:hover { border-color: var(--primary); color: var(--primary); }
.ibtn.danger:hover { border-color: var(--danger); color: var(--danger); }
.inline-form { display: inline-block; margin: 0 2px; }

/* ---------- الشارات ---------- */
.badge {
    display: inline-block; border-radius: 999px; padding: 3px 12px;
    font-size: 12px; font-weight: 700; white-space: nowrap;
}
.tone-green { background: #e7f6ee; color: #157347; }
.tone-red { background: #fdebec; color: #b3323c; }
.tone-blue { background: #e8f1fb; color: #2361a8; }
.tone-orange { background: #fdf1e2; color: #a86a12; }
.tone-gray { background: #eef1f4; color: #5b6b7b; }
.st-appt-pending { background: #fdf1e2; color: #a86a12; }
.st-appt-confirmed { background: #e8f1fb; color: #2361a8; }
.st-appt-completed { background: #e7f6ee; color: #157347; }
.st-appt-cancelled { background: #fdebec; color: #b3323c; }
.st-task-open { background: #e8f1fb; color: #2361a8; }
.st-task-in_progress { background: #fdf1e2; color: #a86a12; }
.st-task-done { background: #e7f6ee; color: #157347; }
.st-task-cancelled { background: #fdebec; color: #b3323c; }
.st-prio-low { background: #eef1f4; color: #5b6b7b; }
.st-prio-medium { background: #fdf1e2; color: #a86a12; }
.st-prio-high { background: #fdebec; color: #b3323c; }
.st-pet-active { background: #e7f6ee; color: #157347; }
.st-pet-inactive { background: #eef1f4; color: #5b6b7b; }
.st-pet-archived { background: #f0e9fb; color: #6d4bb0; }
.st-ok { background: #e7f6ee; color: #157347; }
.st-bad { background: #fdebec; color: #b3323c; }

/* ---------- النماذج ---------- */
.field { display: flex; flex-direction: column; gap: 5px; margin-bottom: 13px; }
.field label { font-size: 13px; font-weight: 700; color: var(--ink); }
.field .req { color: var(--danger); }
.field input, .field select, .field textarea, .search-form input, .search-form select {
    font-family: inherit; font-size: 14px; color: var(--ink);
    border: 1.5px solid var(--line); border-radius: 10px;
    padding: 9px 13px; background: #fff; width: 100%;
    transition: border-color 0.12s;
}
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--primary); }
.field textarea { resize: vertical; }
.field-wide { grid-column: 1 / -1; }
.field-grow { flex: 1; }
.hint { color: var(--muted); font-size: 12px; }
.check { display: flex; align-items: center; gap: 9px; font-weight: 600; cursor: pointer; }
.check input { width: auto; }
.form-actions { display: flex; gap: 10px; margin-top: 6px; flex-wrap: wrap; }
.form-sec { font-size: 14.5px; border-bottom: 1px dashed var(--line); padding-bottom: 7px; margin: 18px 0 14px; }
.form-errors {
    background: #fdebec; border: 1px solid #f3c4c8; border-radius: 10px;
    padding: 12px 16px; margin-bottom: 14px; color: #9c2f38;
}
.form-errors ul { margin-inline-start: 18px; }
.grid2 .field { min-width: 0; }

/* أزرار */
.btn {
    display: inline-flex; align-items: center; gap: 7px;
    background: #fff; color: var(--ink);
    border: 1.5px solid var(--line); border-radius: 10px;
    padding: 9px 18px; font-family: inherit; font-size: 13.8px; font-weight: 700;
    cursor: pointer; transition: all 0.13s; white-space: nowrap;
}
.btn:hover { border-color: var(--primary); color: var(--primary); }
.btn-primary { background: var(--primary); border-color: var(--primary); color: #fff; }
.btn-primary:hover { filter: brightness(1.07); color: #fff; }
.btn-ok { background: var(--ok); border-color: var(--ok); color: #fff; }
.btn-ok:hover { color: #fff; border-color: var(--ok); }
.btn-danger { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn-danger:hover { color: #fff; }
.btn-sm { padding: 6px 13px; font-size: 12.8px; }
.btn-xs { padding: 3px 10px; font-size: 12px; border-radius: 8px; }
.btn-lg { padding: 12px 26px; font-size: 15px; }
.btn-block { width: 100%; justify-content: center; }

/* ---------- أدوات القوائم ---------- */
.list-tools { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.search-form { display: flex; gap: 8px; align-items: center; flex: 1; max-width: 420px; }
.filter-chips { display: flex; gap: 7px; flex-wrap: wrap; }
.tools-end { margin-inline-start: auto; display: flex; gap: 8px; }
.filters-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.flabel { font-weight: 700; color: var(--muted); font-size: 13px; display: inline-flex; align-items: center; gap: 6px; }
.mini-input { border: 1.5px solid var(--line); border-radius: 9px; padding: 6px 10px; font-family: inherit; font-size: 13px; }
.mini-select { border: 1.5px solid var(--line); border-radius: 8px; padding: 4px 8px; font-family: inherit; font-size: 12.5px; background: #fff; }

/* ترقيم الصفحات */
.pager { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 16px 0 4px; color: var(--muted); font-size: 13px; flex-wrap: wrap; }
.pager nav { display: flex; gap: 6px; flex-wrap: wrap; }
.pager nav a {
    border: 1px solid var(--line); background: #fff; border-radius: 8px;
    padding: 5px 12px; font-weight: 700; font-size: 13px; color: var(--ink);
}
.pager nav a.cur { background: var(--primary); border-color: var(--primary); color: #fff; }

/* ---------- Flash ---------- */
.flash-area { display: flex; flex-direction: column; gap: 8px; }
.flash {
    border-radius: 11px; padding: 12px 18px; font-weight: 600; font-size: 13.8px;
    border: 1px solid transparent;
}
.flash.ok { background: #e7f6ee; border-color: #bfe6d1; color: #14663f; }
.flash.bad { background: #fdebec; border-color: #f3c4c8; color: #9c2f38; }
.flash.warn { background: #fdf6e5; border-color: #efd9a8; color: #8a6110; }

/* ---------- حالات فارغة ---------- */
.empty-state { text-align: center; padding: 44px 20px; color: var(--muted); }
.empty-icon { color: #c3cfd8; margin-bottom: 10px; }

/* ---------- الرسوم ---------- */
.bar-chart { display: block; width: 100% !important; height: 190px !important; min-height: 190px !important; max-height: 190px !important; max-width: 100% !important; margin-inline: auto; flex: 0 0 190px; overflow: hidden; }
.panel-body .bar-chart { overflow: hidden; }
.bc-val { font-size: 11px; font-weight: 700; fill: var(--ink); }
.bc-lbl { font-size: 10.5px; fill: var(--muted); }

/* ---------- قوائم مصغرة ---------- */
.mini-list { list-style: none; }
.mini-list li {
    display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
    padding: 9px 2px; border-bottom: 1px dashed var(--line); font-size: 13px;
}
.mini-list li:last-child { border-bottom: none; }
.mini-list time { margin-inline-start: auto; color: var(--muted); font-size: 12px; white-space: nowrap; }
.mini-action { flex: 1; min-width: 140px; }
.mini-type { border-radius: 7px; padding: 2px 9px; font-size: 11.5px; font-weight: 700; }
.type-admin { background: #e7f6ee; color: #157347; }
.type-demo { background: #fdf1e2; color: #a86a12; }
.type-system { background: #eef1f4; color: #5b6b7b; }

/* ملاحظات */
.inline-note { display: flex; gap: 10px; align-items: flex-start; margin-bottom: 16px; }
.inline-note textarea { flex: 1; border: 1.5px solid var(--line); border-radius: 10px; padding: 9px 13px; font-family: inherit; font-size: 13.8px; }
.note-list { list-style: none; }
.note-list li { border-bottom: 1px dashed var(--line); padding: 10px 2px; font-size: 13.5px; }
.note-list li:last-child { border-bottom: none; }
.note-list time { color: var(--muted); font-size: 12px; margin-inline-start: 8px; }
.note-list p { margin-top: 3px; }

/* تفاصيل */
.detail-head { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.detail-avatar {
    width: 54px; height: 54px; border-radius: 14px;
    background: #eef7f3; color: var(--primary);
    display: inline-flex; align-items: center; justify-content: center;
}
.detail-head h2 { font-size: 19px; }
.detail-actions { margin-inline-start: auto; }

.kv { width: 100%; border-collapse: collapse; }
.kv th, .kv td { text-align: start; padding: 9px 12px; border-bottom: 1px dashed var(--line); font-size: 13.5px; }
.kv th { color: var(--muted); width: 38%; font-weight: 700; }
.kv tr:last-child th, .kv tr:last-child td { border-bottom: none; }

/* خط زمني */
.timeline { list-style: none; margin-top: 16px; }
.timeline li { display: flex; gap: 12px; padding: 10px 0; border-bottom: 1px dashed var(--line); }
.timeline li:last-child { border-bottom: none; }
.tl-icon {
    width: 34px; height: 34px; border-radius: 10px; flex-shrink: 0;
    background: var(--bg); color: var(--muted);
    display: inline-flex; align-items: center; justify-content: center;
}
.tl-note .tl-icon { background: #e8f1fb; color: var(--info); }
.tl-appt .tl-icon { background: #e7f6ee; color: var(--ok); }
.tl-pet .tl-icon { background: #fdf1e2; color: var(--warn); }
.tl-body { flex: 1; }
.tl-head { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; font-size: 13.5px; }
.tl-head time { color: var(--muted); font-size: 12px; }
.tl-body p { font-size: 13px; color: var(--muted); }

/* لوحة حالات العمل */
.board4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.board-col { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; min-height: 220px; }
.board-col-head {
    display: flex; align-items: center; justify-content: space-between;
    font-weight: 700; font-size: 13.5px; padding: 8px 10px; border-radius: 9px; margin-bottom: 10px;
}
.st-head-pending { background: #fdf1e2; color: #a86a12; }
.st-head-confirmed { background: #e8f1fb; color: #2361a8; }
.st-head-completed { background: #e7f6ee; color: #157347; }
.st-head-cancelled { background: #fdebec; color: #b3323c; }
.board-card { border: 1px solid var(--line); border-radius: 11px; padding: 10px 12px; margin-bottom: 9px; font-size: 13px; }
.st-border-pending { border-inline-start: 4px solid var(--warn); }
.st-border-confirmed { border-inline-start: 4px solid var(--info); }
.st-border-completed { border-inline-start: 4px solid var(--ok); }
.st-border-cancelled { border-inline-start: 4px solid var(--danger); }
.bc-time { font-weight: 700; font-size: 12.5px; color: var(--muted); }
.bc-cust { font-weight: 700; display: block; }
.bc-svc { color: var(--muted); font-size: 12.5px; }
.bc-actions { display: flex; gap: 6px; margin-top: 7px; flex-wrap: wrap; }
.board-empty { text-align: center; color: #b9c5cf; padding: 30px 0; }

/* تبويبات العرض */
.view-tabs { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.tabs-end { margin-inline-start: auto; }
.day-nav { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }

/* التقويم */
.cal-legend { display: flex; gap: 18px; flex-wrap: wrap; font-size: 12.5px; color: var(--muted); }
.cal-legend .dot { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-inline-end: 5px; }
.dot-pending { background: var(--warn); }
.dot-confirmed { background: var(--info); }
.dot-completed { background: var(--ok); }
.dot-cancelled { background: var(--danger); }
.calendar { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.cal-head { display: grid; grid-template-columns: repeat(7, 1fr); background: var(--bg); }
.cal-dow { text-align: center; padding: 9px 4px; font-size: 12px; font-weight: 700; color: var(--muted); }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); }
.cal-cell { border: 1px solid var(--line); min-height: 96px; padding: 5px; font-size: 12px; }
.cal-cell.empty { background: #fafbfc; }
.cal-cell.today { background: #f2faf6; }
.cal-day { font-weight: 700; color: var(--muted); margin-bottom: 3px; }
.cal-cell.today .cal-day { color: var(--primary); }
.cal-ev {
    border-radius: 6px; padding: 2px 6px; margin-bottom: 3px;
    font-size: 11px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.st-ev-pending { background: #fdf1e2; color: #a86a12; }
.st-ev-confirmed { background: #e8f1fb; color: #2361a8; }
.st-ev-completed { background: #e7f6ee; color: #157347; }
.st-ev-cancelled { background: #fdebec; color: #b3323c; }
.cal-more { display: block; font-size: 10.5px; color: var(--muted); }

/* التنبيهات */
.notif-list { display: flex; flex-direction: column; gap: 12px; max-width: 720px; }
.notif-item {
    display: flex; align-items: center; gap: 14px;
    background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
    padding: 16px 20px; color: var(--ink);
}
.notif-item:hover { border-color: var(--primary); }
.notif-icon { width: 42px; height: 42px; border-radius: 12px; display: inline-flex; align-items: center; justify-content: center; }
.notif-item.tone-red .notif-icon { background: #fdebec; color: var(--danger); }
.notif-item.tone-orange .notif-icon { background: #fdf1e2; color: var(--warn); }
.notif-item.tone-blue .notif-icon { background: #e8f1fb; color: var(--info); }
.notif-item.tone-green .notif-icon { background: #e7f6ee; color: var(--ok); }
.notif-text { font-weight: 700; }
.notif-count { margin-inline-start: auto; font-size: 20px; font-weight: 700; color: var(--muted); }
.notif-go { color: var(--primary); font-size: 12.5px; font-weight: 700; white-space: nowrap; }

/* التقارير */
.rpt-filters { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 20px; margin-bottom: 18px; }
.rf-row { display: flex; gap: 14px; align-items: flex-end; flex-wrap: wrap; }
.rf-row .field { margin-bottom: 0; min-width: 160px; }
.rpt-summary { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.rpt-sum-item {
    background: var(--bg); border: 1px solid var(--line); border-radius: 11px;
    padding: 10px 18px; display: flex; align-items: center; gap: 12px; font-size: 13px;
}
.rpt-sum-item b { font-size: 17px; }
.rpt-sub { margin: 18px 0 10px; font-size: 14.5px; color: var(--muted); }

/* سجل الصحة */
.health-list { list-style: none; }
.health-item {
    display: flex; align-items: center; gap: 12px;
    padding: 11px 4px; border-bottom: 1px dashed var(--line); font-size: 13.8px;
}
.health-item:last-child { border-bottom: none; }
.health-ico { border-radius: 50%; display: inline-flex; }
.health-item.ok .health-ico { color: var(--ok); }
.health-item.bad .health-ico { color: var(--danger); }
.health-label { font-weight: 700; }
.health-detail { margin-inline-start: auto; background: var(--bg); border-radius: 6px; padding: 2px 9px; font-size: 11.5px; color: var(--muted); }
.health-state { font-weight: 700; width: 92px; text-align: end; }
.health-item.ok .health-state { color: var(--ok); }
.health-item.bad .health-state { color: var(--danger); }
.log-pre {
    background: #101b14; color: #cfe0d9; border-radius: 10px;
    padding: 14px 16px; font-size: 12px; overflow-x: auto; line-height: 1.7;
    max-height: 320px; overflow-y: auto;
}

/* محتوى الموقع */
.content-block { border: 1px solid var(--line); border-radius: 12px; padding: 16px 18px; margin-bottom: 14px; background: #fcfdfe; }
.content-block h3 { font-size: 14px; margin-bottom: 12px; color: var(--muted); }
.brand-preview {
    display: flex; align-items: center; gap: 10px;
    border: 1px dashed var(--line); border-radius: 12px;
    padding: 14px 18px; margin-bottom: 16px; font-size: 17px;
}
.brand-preview .brand-paw { width: 40px; height: 40px; border-radius: 11px; background: var(--primary); color: #fff; display: inline-flex; align-items: center; justify-content: center; }
.note-form-row { display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; }
.note-form-row .field { margin-bottom: 0; }

/* تسجيل الدخول */
.login-body { display: block; }
.login-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px; background: linear-gradient(160deg, #10231d 0%, #1c4437 100%); }
.login-card {
    background: #fff; border-radius: 18px; box-shadow: 0 24px 60px rgba(0,0,0,0.25);
    padding: 38px 36px 30px; width: 100%; max-width: 420px; position: relative;
}
.login-brand { display: flex; align-items: center; justify-content: center; gap: 10px; font-size: 21px; font-weight: 700; margin-bottom: 20px; }
.login-brand span { color: var(--primary); }
.login-brand .ic { color: #fff; background: var(--primary); border-radius: 11px; padding: 7px; }
.login-card h1 { font-size: 17px; text-align: center; color: var(--muted); margin-bottom: 22px; font-weight: 600; }
.login-foot { display: flex; justify-content: space-between; margin-top: 20px; color: var(--muted); font-size: 12.5px; }
.demo-top-flag {
    position: absolute; top: -14px; inset-inline-end: 22px;
    background: var(--accent); color: #3c2a10; font-weight: 700; font-size: 12px;
    border-radius: 8px; padding: 4px 14px; letter-spacing: 1px;
}
.demo-creds-box {
    margin-top: 18px; background: #fdf6e5; border: 1px dashed #efd9a8;
    border-radius: 10px; padding: 12px 16px; text-align: center; font-size: 13.5px;
}
.demo-creds-box code { font-size: 14px; direction: ltr; display: inline-block; margin-top: 4px; }

.forbidden-box { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 40px; text-align: center; max-width: 460px; margin: 60px auto; }
.version-block { border-inline-start: 3px solid var(--primary); padding-inline-start: 16px; }

/* ---------- الطباعة ---------- */
.print-header { display: none; }
@media print {
    @page { margin: 14mm; size: A4; }
    body.admin-body { background: #fff; font-size: 12px; }
    .sidebar, .topbar, .no-print, .flash-area, .demo-banner, .admin-foot, .search-form, .rpt-filters, .list-tools, .filters-row, .pager, .view-tabs, .day-nav, .cal-legend { display: none !important; }
    .page-wrap { margin: 0 !important; }
    .page-wrap > * { margin: 0 0 12px !important; }
    .panel { border: none; box-shadow: none; margin: 0 0 14px !important; }
    .panel-head { border: none; padding: 0 0 8px; }
    .panel-body { padding: 0; }
    .print-header { display: block; border-bottom: 2px solid #222; padding-bottom: 10px; margin-bottom: 16px; }
    .ph-row { display: flex; justify-content: space-between; font-size: 11px; color: #555; }
    .ph-title { font-size: 18px; font-weight: 700; margin-top: 8px; }
    .ph-period { font-size: 12px; color: #555; }
    .tbl { min-width: 0 !important; width: 100%; }
    .tbl th, .tbl td { padding: 6px 8px; font-size: 11px; border: 1px solid #ccc; }
    .tbl thead { display: table-header-group; }
    .tbl tbody tr { page-break-inside: avoid; }
    .row-actions, .no-print { display: none !important; }
    a { color: #222; text-decoration: none; }
}

/* ---------- الجوال ---------- */
@media (max-width: 1100px) {
    .kpi-grid { grid-template-columns: repeat(3, 1fr); }
    .board4 { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 860px) {
    .sidebar {
        position: fixed; inset-inline-start: 0; top: 0; z-index: 60;
        transform: translateX(100%);
        transition: transform 0.22s ease;
        box-shadow: -12px 0 40px rgba(0,0,0,0.2);
    }
    html[dir="ltr"] .sidebar { transform: translateX(-100%); box-shadow: 12px 0 40px rgba(0,0,0,0.2); }
    .sidebar.open { transform: translateX(0); }
    .sidebar-backdrop { position: fixed; inset: 0; background: rgba(0,0,0,0.4); z-index: 55; }
    .menu-toggle { display: inline-flex; }
    .grid2, .grid2-1 { grid-template-columns: 1fr; }
    .kpi-grid, .kpi-grid.kpi-3 { grid-template-columns: 1fr 1fr; }
    .page-wrap > * { margin-inline: 14px; }
    .topbar { padding: 10px 14px; }
    .topbar-title { font-size: 16px; }
    .board4 { grid-template-columns: 1fr; }
    .user-chip span { display: none; }
}
@media (max-width: 560px) {
    .kpi-grid, .kpi-grid.kpi-3 { grid-template-columns: 1fr; }
    .note-form-row { flex-direction: column; align-items: stretch; }
    .list-tools { align-items: stretch; }
    .search-form { max-width: none; }
    .tools-end { margin-inline-start: 0; }
}


/* PetStore Pro 1.0.7: hard limits for dashboard SVG charts */
.panel-body > svg.bar-chart,
.panel-body svg.bar-chart {
    display: block !important;
    width: 100% !important;
    height: 190px !important;
    min-height: 190px !important;
    max-height: 190px !important;
    max-width: 100% !important;
    aspect-ratio: auto !important;
    overflow: hidden !important;
    flex: 0 0 190px !important;
}
