/* Admin + login — flat and simple: no shadows, no glow, no gradients */
:root {
    --navy: #0a0f1f;
    --blue: #254c9b;
    --orange: #ff6420;
    --orange-d: #e5531a;
    --bg: #f5f6f9;
    --card: #fff;
    --text: #2b3245;
    --muted: #6f778a;
    --line: #e3e6ee;
    --ok-bg: #e8f6ec;
    --ok: #1b6b34;
    --err-bg: #fdecec;
    --err: #b71c1c;
    --r: 8px
}

* { box-sizing: border-box; margin: 0; padding: 0 }

body {
    font-family: 'Cairo', Tahoma, sans-serif;
    color: var(--text);
    background: var(--bg);
    line-height: 1.7;
    font-size: 15px
}

a { color: inherit; text-decoration: none }
img { max-width: 100%; display: block }
.container { width: min(1100px, 92%); margin-inline: auto }
.muted { color: var(--muted) }
.center { text-align: center }

/* top bar */
.admin-bar { background: var(--navy); color: #fff }
.admin-bar .container { display: flex; align-items: center; gap: 6px; min-height: 60px; flex-wrap: wrap; padding-block: 6px }
.admin-bar .brand { display: flex; align-items: center; gap: 10px; font-weight: 800; margin-inline-end: 18px }
.admin-bar .brand img { height: 34px; width: auto }
.admin-bar a.nav { color: #c4cbe0; font-weight: 600; font-size: 14px; padding: 6px 12px; border-radius: var(--r) }
.admin-bar a.nav:hover { color: #fff; background: rgba(255, 255, 255, .08) }
.admin-bar a.nav.on { color: #fff; background: var(--orange) }
.admin-bar .sp { margin-inline-start: auto }

main.container { padding-block: 28px 48px }

/* page header */
.page-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 18px }
.page-head h1 { font-size: 22px; font-weight: 800; color: var(--navy) }
.page-head p { color: var(--muted); font-size: 14px }

/* cards */
.panel { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 22px; margin: 0 auto 20px }
.panel h1, .panel h2 { color: var(--navy); font-size: 18px; font-weight: 800; margin-bottom: 14px }
.panel.narrow { max-width: 640px }
.panel.table-panel { padding: 0; overflow: hidden }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 8px 18px; border-radius: var(--r); font: 600 14px 'Cairo', Tahoma, sans-serif; cursor: pointer; border: 1px solid transparent; line-height: 1.6 }
.btn-primary { background: var(--orange); color: #fff }
.btn-primary:hover { background: var(--orange-d) }
.btn-outline { background: #fff; color: var(--text); border-color: var(--line) }
.btn-outline:hover { border-color: var(--navy); color: var(--navy) }
.btn-danger { background: #fff; color: var(--err); border-color: #efc5c5 }
.btn-danger:hover { background: var(--err-bg); border-color: var(--err) }
.btn:focus-visible, a:focus-visible, input:focus-visible, textarea:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px }
.row { display: flex; gap: 10px; flex-wrap: wrap }

/* forms */
.field { margin-bottom: 16px }
.field label { display: block; font-weight: 700; font-size: 13px; margin-bottom: 5px }
.field .hint { font-weight: 400; color: var(--muted) }
.field input[type=text], .field input[type=password], .field input[type=number], .field input[type=file], .field textarea {
    width: 100%; padding: 9px 12px; border: 1px solid var(--line); border-radius: var(--r); font: inherit; background: #fff; color: var(--text)
}
.field input:focus, .field textarea:focus { border-color: var(--blue); outline: none }
.field textarea { min-height: 130px; resize: vertical }
.check { display: flex; align-items: center; gap: 8px; font-weight: 400 !important }
.preview { width: 120px; height: 120px; object-fit: cover; border-radius: var(--r); border: 1px solid var(--line); margin-bottom: 8px }

/* alerts */
.alert { padding: 10px 14px; border-radius: var(--r); margin-bottom: 16px; font-size: 14px; border: 1px solid transparent }
.alert.err { background: var(--err-bg); color: var(--err); border-color: #f3caca }
.alert.ok { background: var(--ok-bg); color: var(--ok); border-color: #c6e6cf }

/* tables */
.scroll { overflow-x: auto }
table.t { width: 100%; border-collapse: collapse; font-size: 14px }
.t th, .t td { padding: 12px 16px; border-bottom: 1px solid var(--line); text-align: start; vertical-align: middle }
.t th { color: var(--muted); font-weight: 700; font-size: 13px; background: #fafbfd }
.t tr:last-child td { border-bottom: 0 }
.t img { width: 46px; height: 46px; object-fit: cover; border-radius: 6px; border: 1px solid var(--line) }
.t .act { display: flex; gap: 6px; flex-wrap: wrap }
.t .btn { padding: 3px 12px; font-size: 13px }
.tag { display: inline-block; font-size: 12px; font-weight: 600; padding: 1px 10px; border-radius: 99px; background: var(--ok-bg); color: var(--ok) }
.tag.off { background: #eceef3; color: var(--muted) }

/* dashboard */
.stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; margin-bottom: 20px }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 18px 20px }
.stat b { display: block; font-size: 32px; line-height: 1.2; color: var(--navy); font-weight: 800 }
.stat span { color: var(--muted); font-size: 14px }
.quick { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 14px }
.quick a { display: block; background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 16px 18px }
.quick a:hover { border-color: var(--orange) }
.quick a b { display: block; color: var(--navy); font-weight: 700 }
.quick a span { color: var(--muted); font-size: 13px }

/* login */
.login-wrap { min-height: 100vh; display: grid; place-items: center; padding: 20px }
.login-box { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 32px; width: min(400px, 100%) }
.login-box img { height: 64px; width: auto; margin: 0 auto 12px }
.login-box h1 { text-align: center; color: var(--navy); font-size: 20px; margin-bottom: 20px }
.login-box .btn { width: 100%; padding: 10px }

@media (max-width: 700px) {
    .stats { grid-template-columns: 1fr }
    .t .hide-sm { display: none }
    .t th, .t td { padding: 10px 12px }
    .admin-bar .brand span { display: none }
}
