/* Metropark «Signature» layer for People Count — same identity as management.metropark.az:
   cobalt logo blue, the red/blue/green emblem, the cellular facade and its night lighting.
   Loaded after app.css/auth.css; removing the <link> restores the previous look. */

:root {
  --mp-blue: #02599b; --mp-blue-bright: #3b9cf0; --mp-red: #e31412; --mp-coral: #ec5870; --mp-green: #028c38;
  --mp-ease: cubic-bezier(.2, .8, .2, 1);
  --mp-serif: "Didot", "Bodoni 72", "Bodoni MT", "Playfair Display", Georgia, "Times New Roman", "DejaVu Serif", serif;
  --mp-facade: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='360' height='360' fill='none' stroke='%23fff' stroke-opacity='.075' stroke-width='1.4'%3E%3Cpath d='M18 14c30-10 64-6 82 12 14 15 10 44-6 60-20 19-58 22-78 6C0 78-6 46 4 30c3-7 8-13 14-16ZM128 8c26-6 54 2 66 20 11 17 2 42-16 52-22 12-54 10-68-6-12-14-12-40 0-54 5-6 11-10 18-12ZM228 18c24-14 62-12 82 4 18 15 16 44-2 60-21 19-62 22-82 4-17-15-16-50 2-68ZM74 112c22-12 56-10 72 6 17 17 14 48-6 64-22 18-60 18-78 0-16-16-12-56 12-70ZM176 104c24-8 54-2 68 16 13 18 8 46-12 60-22 15-56 12-70-6-14-19-10-58 14-70ZM276 116c22-10 52-6 66 10 13 16 10 42-8 56-20 15-52 14-66-2-14-17-12-52 8-64ZM20 212c20-14 56-14 74 2 17 16 16 46-2 62-21 18-58 18-76 0-16-17-16-50 4-64ZM128 212c26-10 60-4 74 14 13 18 6 46-14 58-24 14-58 10-72-8-12-17-10-52 12-64ZM238 206c22-12 58-10 76 6 17 16 16 46-4 62-22 17-60 16-76-2-15-18-14-52 4-66Z'/%3E%3C/svg%3E");
  --bg: #050b18; --surface: #0c1729; --surface-2: #0f1d33; --surface-3: #13233d;
  --line: #1f2f4b; --line-soft: #172640; --text: #eef2f9; --muted: #94a2bb; --faint: #6b7a94;
  --cyan: #4aa6f2; --cyan-soft: rgba(74, 166, 242, .13); --green: #34d27f; --red: #ff6170; --amber: #f3bd5b; --blue: #6aa8f0;
  --accent: var(--cyan); --focus-ring: rgba(74, 166, 242, .35); --radius: 20px;
  --shadow: 0 1px 2px rgba(0, 0, 0, .25), 0 14px 34px rgba(0, 0, 0, .28);
}
html[data-theme="light"] {
  --bg: #f4f6fa; --surface: #ffffff; --surface-2: #f8fafd; --surface-3: #eef2f8;
  --line: #d9e0eb; --line-soft: #e6ebf3; --text: #0a1630; --muted: #5b6880; --faint: #7a869c;
  --cyan: #02599b; --cyan-soft: rgba(2, 89, 155, .09); --green: #028c38; --red: #d11a2b; --amber: #a46a0d; --blue: #02599b;
  --focus-ring: rgba(2, 89, 155, .25); --shadow: 0 1px 2px rgba(10, 22, 48, .04), 0 10px 30px rgba(10, 22, 48, .06);
}
body { background: var(--bg); letter-spacing: -.004em; }

/* ——— Emblem ——— */
.mp-emblem { width: 100%; height: 100%; display: block; }
.mp-ring { stroke: var(--mp-blue); }
.mp-blue { stroke: var(--mp-blue); fill: var(--mp-blue); }
.mp-red { stroke: var(--mp-red); fill: var(--mp-red); }
.mp-green { stroke: var(--mp-green); fill: var(--mp-green); }
.mp-blue circle, .mp-red circle, .mp-green circle { stroke: none; }
.mp-blue, .mp-red, .mp-green { transform-box: fill-box; transform-origin: 50% 100%; }
.mp-brand-mark { flex: none; width: 44px; height: 44px; padding: 3px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 1px rgba(255,255,255,.18), 0 6px 18px rgba(2,89,155,.45); display: inline-grid; }
a.mp-brand-mark:hover .mp-red { animation: mp-cheer .7s var(--mp-ease); }
a.mp-brand-mark:hover .mp-blue { animation: mp-cheer .7s var(--mp-ease) .08s; }
a.mp-brand-mark:hover .mp-green { animation: mp-cheer .7s var(--mp-ease) .16s; }

/* ——— Header: night glass in both themes, tricolour hairline ——— */
html .topbar, html[data-theme="light"] .topbar {
  background: linear-gradient(180deg, rgba(8, 20, 44, .97), rgba(5, 12, 28, .97)) !important;
  backdrop-filter: saturate(1.4) blur(14px); border-bottom: 0 !important; box-shadow: 0 10px 30px rgba(4, 10, 22, .35) !important; position: sticky;
}
.topbar::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: linear-gradient(90deg, transparent, var(--mp-blue-bright) 18%, var(--mp-coral) 50%, #16b356 82%, transparent); opacity: .75; }
.topbar .brand { gap: 12px; }
.topbar .brand h1 { font-family: var(--mp-serif); color: #fff !important; text-transform: uppercase; letter-spacing: 1.6px; font-size: 21px; }
.topbar .brand p { color: #ff9fb0 !important; letter-spacing: .14em; text-transform: uppercase; font-size: 9px; font-weight: 700; }
.topbar .brand p span { color: #b8c6dc; }
html .topnav, html[data-theme="light"] .topnav { background: rgba(255, 255, 255, .06) !important; border: 1px solid rgba(255, 255, 255, .1) !important; border-radius: 999px; padding: 4px; }
html .nav-button, html[data-theme="light"] .nav-button { color: #a9b8d0 !important; background: transparent !important; border-radius: 999px; border: 0 !important; transition: color .2s, background .25s; }
html .nav-button:hover:not(:disabled), html[data-theme="light"] .nav-button:hover:not(:disabled) { color: #fff !important; background: rgba(255, 255, 255, .08) !important; }
html .nav-button.active, html[data-theme="light"] .nav-button.active { background: #fff !important; color: #07122a !important; box-shadow: 0 4px 14px rgba(0, 0, 0, .35); }
html .topbar .status-badge, html[data-theme="light"] .topbar .status-badge { background: rgba(255, 255, 255, .07) !important; border: 1px solid rgba(255, 255, 255, .14) !important; color: #dbe6f5 !important; border-radius: 999px; }
.topbar .status-badge.online i, .topbar .status-badge.active i { background: #34d27f !important; box-shadow: 0 0 0 3px rgba(52, 210, 127, .25); }
.topbar .status-badge.offline i, .topbar .status-badge.error i { background: #ff6170 !important; box-shadow: 0 0 0 3px rgba(255, 97, 112, .25); }
html .account-chip, html[data-theme="light"] .account-chip, html .logout-button, html[data-theme="light"] .logout-button { background: rgba(255, 255, 255, .07) !important; border: 1px solid rgba(255, 255, 255, .14) !important; color: #dbe6f5 !important; border-radius: 12px; }
.account-chip span { color: #fff !important; }
.account-chip small { color: #ff9fb0 !important; }
.mp-portal-link { display: inline-flex; align-items: center; min-height: 34px; padding: 0 14px; border-radius: 999px; font-size: 11px; font-weight: 700; letter-spacing: .04em; color: #fff; text-decoration: none; background: linear-gradient(135deg, #3b9cf0, #02599b); box-shadow: 0 6px 16px -6px rgba(59, 156, 240, .8); transition: transform .25s var(--mp-ease); }
.mp-portal-link:hover { transform: translateY(-1px); }
.topbar .language-control select, .topbar .theme-toggle { background: rgba(255, 255, 255, .07) !important; color: #dbe6f5 !important; border-color: rgba(255, 255, 255, .14) !important; }

/* ——— Surfaces ——— */
.panel, dialog, .dialog-card { border-radius: 22px !important; border-color: var(--line) !important; box-shadow: var(--shadow) !important; }
.app-view.active > * { animation: mp-rise .55s var(--mp-ease) both; }
.app-view.active > :nth-child(2) { animation-delay: .06s; } .app-view.active > :nth-child(3) { animation-delay: .12s; } .app-view.active > :nth-child(n+4) { animation-delay: .18s; }
.panel-heading h2 { letter-spacing: -.3px; }
.eyebrow { color: var(--cyan) !important; letter-spacing: .2em; }
.count-card { border-radius: 18px !important; transition: transform .4s var(--mp-ease), box-shadow .4s var(--mp-ease); }
.count-card:hover { transform: translateY(-3px); box-shadow: 0 16px 34px -14px rgba(2, 89, 155, .45); }

/* ——— Buttons ——— */
button.primary, .auth-form button { background: linear-gradient(160deg, #1479c8, var(--mp-blue) 55%, #01447a) !important; color: #fff !important; border: 0 !important; box-shadow: 0 8px 20px -8px rgba(2, 89, 155, .75); transition: transform .25s var(--mp-ease), box-shadow .25s; }
button.primary:hover:not(:disabled), .auth-form button:hover:not(:disabled) { transform: translateY(-1px); box-shadow: 0 14px 28px -10px rgba(2, 89, 155, .85); }

/* ——— Charts (bars now sized via CSSOM) ——— */
.bar-stack { height: 12px !important; border-radius: 999px !important; background: var(--surface-3) !important; }
.bar-enter { background: linear-gradient(90deg, #16b356, var(--mp-green)) !important; transition: width .8s var(--mp-ease); }
.bar-leave { background: linear-gradient(90deg, var(--mp-coral), var(--mp-red)) !important; transition: width .8s var(--mp-ease); }
.table-wrap { border-radius: 16px; }
.field-test-preview { width: 100%; max-height: 360px; object-fit: contain; }

/* ——— Sign-in ——— */
.auth-brand, html[data-theme="light"] .auth-brand {
  background: var(--mp-facade) 0 0 / 360px 360px repeat, radial-gradient(60% 50% at 90% 15%, rgba(194, 24, 122, .4), transparent 65%),
    radial-gradient(60% 60% at 10% 100%, rgba(106, 43, 217, .33), transparent 65%), linear-gradient(160deg, #061530, #0a2048 50%, #120f3d) !important;
  color: #fff !important; position: relative; animation: mp-aurora 20s ease-in-out infinite alternate;
}
.auth-brand::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: linear-gradient(90deg, var(--mp-blue-bright) 0 33.3%, var(--mp-red) 33.3% 66.6%, #16b356 66.6%); }
.auth-brand h1 { font-family: var(--mp-serif); color: #fff !important; animation: mp-fade .8s var(--mp-ease) .1s both; }
.auth-brand p { color: #c3cde0 !important; }
.brand-lockup { gap: 12px; align-items: center; }
.brand-lockup strong { font-family: var(--mp-serif); text-transform: uppercase; letter-spacing: 1.6px; color: #fff !important; font-size: 20px; }
.brand-lockup span { color: #ff9fb0 !important; letter-spacing: .16em; text-transform: uppercase; }
.security-strip span, html[data-theme="light"] .security-strip span { background: rgba(255, 255, 255, .08) !important; color: #dbe6f5 !important; border-color: rgba(255, 255, 255, .16) !important; }
.auth-card { border-radius: 24px !important; animation: mp-rise .7s var(--mp-ease) .1s both; }
.auth-card .eyebrow { color: var(--cyan) !important; }
.sso-divider { display: flex; align-items: center; gap: 12px; margin: 18px 0 14px; color: var(--muted); font-size: 12px; }
.sso-divider::before, .sso-divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.sso-button { display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 46px; border-radius: 12px; font-weight: 700; text-decoration: none;
  color: var(--text); background: var(--surface-2); border: 1px solid var(--line); transition: border-color .25s, transform .25s var(--mp-ease), box-shadow .25s; }
.sso-button:hover { border-color: var(--mp-blue-bright); transform: translateY(-1px); box-shadow: 0 10px 24px -12px rgba(59, 156, 240, .8); }
.sso-emblem { width: 24px; height: 24px; border-radius: 50%; background: #fff conic-gradient(var(--mp-blue) 0 33%, var(--mp-red) 0 66%, var(--mp-green) 0) content-box; padding: 6px; box-shadow: inset 0 0 0 2px var(--mp-blue); }

/* ——— Motion ——— */
@keyframes mp-rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes mp-fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes mp-aurora { from { background-position: 0 0, 0% 0%, 100% 100%, 0 0; } to { background-position: 360px 120px, 100% 60%, 0% 20%, 0 0; } }
@keyframes mp-cheer { 0%, 100% { transform: none; } 40% { transform: translateY(-2.5px) scaleY(1.06); } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
