/* =====================================================================
   Ghatnaein Admin — shell (Dashboard.html) and login (login.html)
   Inner pages loaded in the frame use gn-admin-pages.css instead.
   ===================================================================== */

:root {
    --ga-red: #d7141a;
    --ga-red-600: #b90f15;
    --ga-red-50: #fff1f1;
    --ga-ink: #16181d;
    --ga-ink-2: #3d424b;
    --ga-muted: #6b7280;
    --ga-line: #e6e8ec;
    --ga-bg: #f4f5f7;
    --ga-side: #ffffff;
    --ga-font: "Mukta", "Noto Sans Devanagari", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
    --ga-side-w: 252px;
    --ga-top-h: 60px;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; }
body.ga-body { margin: 0; font-family: var(--ga-font); font-size: 15px; color: var(--ga-ink); background: var(--ga-bg); -webkit-font-smoothing: antialiased; }
.ga-body a { color: inherit; text-decoration: none; }
.ga-body button { font-family: inherit; }
.ga-body svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }

/* ---------- Shell ---------- */
.ga-app { display: grid; grid-template-columns: var(--ga-side-w) minmax(0, 1fr); grid-template-rows: var(--ga-top-h) minmax(0, 1fr); height: 100vh; }

.ga-side { grid-row: 1 / -1; background: var(--ga-side); border-right: 1px solid var(--ga-line); display: flex; flex-direction: column; min-height: 0; z-index: 20; }
.ga-brand { display: flex; align-items: center; gap: 10px; height: var(--ga-top-h); padding: 0 18px; border-bottom: 1px solid var(--ga-line); flex: none; }
.ga-brand img { height: 38px; width: auto; display: block; }
.ga-brand span { font-size: 12px; font-weight: 700; color: var(--ga-muted); background: var(--ga-bg); border-radius: 6px; padding: 2px 8px; letter-spacing: .4px; }

.ga-nav { flex: 1; overflow-y: auto; padding: 12px 10px 20px; scrollbar-width: thin; }
.ga-nav__group { margin-top: 10px; }
.ga-nav__group:first-child { margin-top: 0; }
.ga-nav__label { font-size: 11.5px; font-weight: 700; letter-spacing: .8px; text-transform: uppercase; color: #9aa0aa; padding: 4px 12px 2px; }
.ga-nav a { display: flex; align-items: center; gap: 12px; padding: 7px 12px; margin: 1px 0; border-radius: 8px; font-weight: 600; font-size: 14.5px; color: var(--ga-ink-2); transition: background .15s, color .15s; }
.ga-nav a svg { color: #8a909b; transition: color .15s; }
.ga-nav a:hover { background: var(--ga-bg); color: var(--ga-ink); }
.ga-nav a.is-active { background: var(--ga-red-50); color: var(--ga-red); }
.ga-nav a.is-active svg { color: var(--ga-red); }
.ga-nav a.ga-nav__primary { background: var(--ga-red); color: #fff; margin-bottom: 6px; justify-content: center; }
.ga-nav a.ga-nav__primary svg { color: #fff; }
.ga-nav a.ga-nav__primary:hover { background: var(--ga-red-600); }

.ga-top { grid-column: 2; display: flex; align-items: center; gap: 14px; padding: 0 20px; background: #fff; border-bottom: 1px solid var(--ga-line); min-width: 0; }
.ga-top__title { font-size: 18px; font-weight: 700; margin: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ga-top__actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.ga-btn { display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 14px; border-radius: 8px; border: 1px solid var(--ga-line); background: #fff; font-weight: 600; font-size: 14.5px; color: var(--ga-ink-2); cursor: pointer; white-space: nowrap; transition: border-color .15s, background .15s, color .15s; }
.ga-btn:hover { border-color: #cfd3da; background: var(--ga-bg); color: var(--ga-ink); }
.ga-btn--red { background: var(--ga-red); border-color: var(--ga-red); color: #fff !important; }
.ga-btn--red:hover { background: var(--ga-red-600); border-color: var(--ga-red-600); }
.ga-icon-btn { width: 38px; padding: 0; justify-content: center; }
.ga-burger { display: none; }

.ga-main { grid-column: 2; position: relative; min-height: 0; background: var(--ga-bg); }
.ga-frame { display: block; width: 100%; height: 100%; border: 0; background: var(--ga-bg); }
.ga-loading { position: absolute; left: 0; right: 0; top: 0; height: 3px; background: linear-gradient(90deg, transparent, var(--ga-red), transparent); background-size: 50% 100%; background-repeat: no-repeat; animation: ga-load 1s linear infinite; opacity: 0; transition: opacity .2s; pointer-events: none; }
.ga-main.is-loading .ga-loading { opacity: 1; }
@keyframes ga-load { from { background-position: -50% 0; } to { background-position: 150% 0; } }

.ga-backdrop { display: none; }

/* ---------- Login ---------- */
.ga-login { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; background: radial-gradient(1200px 500px at 50% -10%, #ffe3e3 0, var(--ga-bg) 60%); }
.ga-login__card { width: 100%; max-width: 400px; background: #fff; border: 1px solid var(--ga-line); border-radius: 16px; padding: 32px 28px 28px; box-shadow: 0 20px 50px rgba(16, 16, 20, .08); }
.ga-login__logo { display: block; height: 54px; width: auto; margin: 0 auto 18px; }
.ga-login h1 { font-size: 22px; font-weight: 800; text-align: center; margin: 0; }
.ga-login p.ga-login__sub { text-align: center; color: var(--ga-muted); margin: 4px 0 22px; font-size: 14.5px; }
.ga-field { margin-bottom: 14px; }
.ga-field label { display: block; font-size: 13.5px; font-weight: 600; color: var(--ga-ink-2); margin-bottom: 6px; }
.ga-input-wrap { position: relative; }
.ga-input { width: 100%; height: 46px; border: 1px solid #d5d8de; border-radius: 10px; padding: 0 14px; font-family: inherit; font-size: 15.5px; color: var(--ga-ink); background: #fff; transition: border-color .15s, box-shadow .15s; }
.ga-input:focus { outline: 0; border-color: var(--ga-red); box-shadow: 0 0 0 3px rgba(215, 20, 26, .14); }
.ga-input-wrap .ga-input { padding-right: 70px; }
.ga-peek { position: absolute; right: 6px; top: 6px; height: 34px; padding: 0 10px; border: 0; background: transparent; color: var(--ga-muted); font-weight: 600; font-size: 13px; cursor: pointer; border-radius: 6px; }
.ga-peek:hover { background: var(--ga-bg); color: var(--ga-ink); }
.ga-submit { width: 100%; height: 48px; margin-top: 6px; border: 0; border-radius: 10px; background: var(--ga-red); color: #fff; font-weight: 700; font-size: 16px; cursor: pointer; transition: background .15s; }
.ga-submit:hover { background: var(--ga-red-600); }
.ga-submit:disabled { opacity: .65; cursor: wait; }
.ga-error { display: none; background: var(--ga-red-50); color: var(--ga-red-600); border: 1px solid #f7c9cb; border-radius: 8px; padding: 9px 12px; font-size: 14px; font-weight: 600; margin-bottom: 14px; }
.ga-error.is-show { display: block; }
.ga-login__foot { text-align: center; margin-top: 18px; font-size: 14px; color: var(--ga-muted); }
.ga-login__foot a { color: var(--ga-red); font-weight: 600; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
    .ga-app { grid-template-columns: minmax(0, 1fr); }
    .ga-side { position: fixed; inset: 0 auto 0 0; width: 280px; transform: translateX(-100%); transition: transform .25s ease; }
    .ga-app.is-menu .ga-side { transform: none; box-shadow: 0 0 40px rgba(0, 0, 0, .18); }
    .ga-app.is-menu .ga-backdrop { display: block; position: fixed; inset: 0; background: rgba(10, 10, 12, .4); z-index: 15; }
    .ga-top, .ga-main { grid-column: 1; }
    .ga-top { padding: 0 12px; gap: 10px; }
    .ga-burger { display: inline-flex; }
    .ga-hide-sm { display: none !important; }
}
