/* FrontEnd V2 — shared classes (ported from sample/styles.css). Tailwind handles layout;
 * these are the reusable pieces every screen uses. Light first, `.dark` overrides. */
/* Colours as "red green blue". A client's branding can change them (v2brand.js). */
:root { --bx-b50: 238 242 255; --bx-b100: 224 231 255; --bx-b400: 147 197 253; --bx-b500: 59 102 255; --bx-b600: 47 91 255; --bx-b700: 33 70 216; --bx-canvas-l: 246 248 251; --bx-canvas-d: 11 14 20; --bx-surface-l: 255 255 255; --bx-surface-d: 18 23 33; --bx-subtle-l: 241 245 249; --bx-subtle-d: 26 33 46; --bx-line-l: 232 237 244; --bx-line-d: 36 45 61; }
.dark .text-brand-600, .dark .hover\:text-brand-600:hover, .dark .tab.active { color: rgb(var(--bx-b400)); }
* { box-sizing: border-box; }
body { -webkit-font-smoothing: antialiased; letter-spacing: -0.01em; font-family: 'Plus Jakarta Sans', system-ui, sans-serif; }
.tabular-nums { font-variant-numeric: tabular-nums; }
.no-scrollbar::-webkit-scrollbar { display: none; }
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-thumb { background: rgba(148,163,184,.35); border-radius: 9999px; }

.ms { font-family: 'Material Symbols Rounded'; font-weight: normal; font-style: normal; font-size: 18px; line-height: 1;
  font-variation-settings: 'FILL' 0, 'wght' 300, 'GRAD' 0, 'opsz' 20; display: inline-flex; align-items: center; justify-content: center;
  text-transform: none; letter-spacing: normal; white-space: nowrap; direction: ltr; user-select: none; -webkit-font-feature-settings: 'liga'; }

.card { background: rgb(var(--bx-surface-l)); border: 1px solid rgb(var(--bx-line-l)); border-radius: 1rem; box-shadow: 0 2px 14px -2px rgba(15,23,42,.04), 0 1px 3px rgba(15,23,42,.02); }
.dark .card { background: rgb(var(--bx-surface-d)); border-color: rgb(var(--bx-line-d)); box-shadow: none; }

.icon-btn { display: inline-flex; align-items: center; justify-content: center; padding: .45rem .55rem; border-radius: .75rem; border: 1px solid rgb(var(--bx-line-l)); font-size: .8rem; color: #64748b; line-height: 1; }
.icon-btn:hover { background: rgb(var(--bx-subtle-l)); }
.dark .icon-btn { border-color: rgb(var(--bx-line-d)); color: #cbd5e1; }
.dark .icon-btn:hover { background: rgb(var(--bx-subtle-d)); }

.kbd { font-family: 'JetBrains Mono', monospace; font-size: 10px; padding: 1px 6px; border-radius: 6px; border: 1px solid rgb(var(--bx-line-l)); color: #94a3b8; background: #fff; }
.dark .kbd { border-color: rgb(var(--bx-line-d)); background: rgb(var(--bx-surface-d)); }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: .4rem; padding: .5rem .9rem; border-radius: .75rem; font-size: .75rem; font-weight: 600; transition: background .15s, border-color .15s; }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn-primary { background: rgb(var(--bx-b600)); color: #fff; }
.btn-primary:hover:not(:disabled) { background: rgb(var(--bx-b700)); }
.btn-ghost { border: 1px solid rgb(var(--bx-line-l)); color: #475569; background: transparent; }
.btn-ghost:hover { background: rgb(var(--bx-subtle-l)); }
.dark .btn-ghost { border-color: rgb(var(--bx-line-d)); color: #cbd5e1; }
.dark .btn-ghost:hover { background: rgb(var(--bx-subtle-d)); }
.btn-danger { background: #e11d48; color: #fff; }
.btn-danger:hover { background: #be123c; }

.input { width: 100%; padding: .55rem .75rem; border-radius: .65rem; border: 1px solid rgb(var(--bx-line-l)); background: rgb(var(--bx-canvas-l)); font-size: .8rem; outline: none; color: #0f172a; }
.input:focus { border-color: rgb(var(--bx-b600)); background: #fff; }
.dark .input { border-color: rgb(var(--bx-line-d)); background: rgb(var(--bx-canvas-d)); color: #e2e8f0; }
.dark .input:focus { border-color: rgb(var(--bx-b500)); }
.label { display: block; font-size: 11px; font-weight: 600; color: #64748b; margin-bottom: .3rem; }

.nav-item { width: 100%; display: flex; align-items: center; gap: .7rem; padding: .45rem .75rem; border-radius: .75rem; font-size: .75rem; font-weight: 500; color: #475569; text-align: left; }
.nav-item:hover { background: rgb(var(--bx-subtle-l)); color: #0f172a; }
.nav-item.active { background: rgb(var(--bx-b50)); color: rgb(var(--bx-b600)); font-weight: 700; }
.dark .nav-item { color: #94a3b8; }
.dark .nav-item:hover { background: rgb(var(--bx-subtle-d)); color: rgb(var(--bx-subtle-l)); }
.dark .nav-item.active { background: rgb(var(--bx-b600) / .15); color: rgb(var(--bx-b400)); }
.nav-group { padding: 0 .75rem; margin-bottom: .25rem; font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: #94a3b8; }

.chip { display: inline-flex; align-items: center; gap: .25rem; padding: 2px 7px; border-radius: 6px; font-size: 10px; font-weight: 700; font-family: 'JetBrains Mono', monospace; }
.chip-ok { background: #ecfdf5; color: #059669; }
.chip-draft { background: #fffbeb; color: #d97706; }
.chip-missing { background: rgb(var(--bx-subtle-l)); color: #94a3b8; border: 1px dashed #cbd5e1; }
.chip-stale { background: #fff7ed; color: #ea580c; }
.chip-ai { background: rgb(var(--bx-b50)); color: #4f46e5; }
.dark .chip-ok { background: rgba(16,185,129,.15); color: #34d399; }
.dark .chip-draft { background: rgba(245,158,11,.15); color: #fbbf24; }
.dark .chip-missing { background: transparent; color: #64748b; border-color: #334155; }
.dark .chip-stale { background: rgba(249,115,22,.15); color: #fb923c; }
.dark .chip-ai { background: rgba(99,102,241,.18); color: #a5b4fc; }

.tab { padding: .75rem 0; border-bottom: 2px solid transparent; font-size: .75rem; font-weight: 600; color: #94a3b8; }
.tab:hover { color: #334155; }
.tab.active { border-color: rgb(var(--bx-b600)); color: rgb(var(--bx-b600)); }
.dark .tab:hover { color: #e2e8f0; }

/* Untranslated value shown from the default language */
.fallback { color: #94a3b8 !important; font-style: italic; }

/* Content in the editing language. #v2-view gets data-locale-dir from the language context;
   the UI itself never flips, only elements marked .v2-localized (content fields, previews). */
#v2-view[data-locale-dir="rtl"] .v2-localized { direction: rtl; text-align: right; }
[dir="rtl"], #v2-view[data-locale-dir="rtl"] .v2-localized { font-family: 'Noto Sans Arabic', 'Plus Jakarta Sans', sans-serif; }

@keyframes v2pulse { 0%,100% { opacity: 1; } 50% { opacity: .4; } }
.pulse { animation: v2pulse 2s infinite; }
@keyframes v2fadeUp { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.fade-up { animation: v2fadeUp .18s ease-out; }
@keyframes v2spin { to { transform: rotate(360deg); } }
.spin { animation: v2spin .8s linear infinite; }

/* People can't switch version: CMS Admin sets it (CLIENT_PROXY.md §15). This hides old links in
   views compiled before they were removed. */
[data-action="open-classic"], #v2-auth a[href$="/login"] { display: none !important; }
