/**
 * ════════════════════════════════════════════════════════════════
 *  agstyle.css — AGDevRepublika Starter Pack Design System
 *  Version: 2.1.0
 *  Covers: layout, typography, components, utilities, responsive,
 *          auth/login pages
 *  No framework dependency (Bootstrap 5 compatible but not required)
 * ════════════════════════════════════════════════════════════════
 */

/* ──────────────────────────────────────────────────────────────
   1. DESIGN TOKENS
   ────────────────────────────────────────────────────────────── */
:root {
   /* ── Brand (muted, B&W primary) ── */
   --primary: #111111;
   --primary-hover: #333333;
   --primary-light: #d4d4d8;
   --primary-bg: #f4f4f5;
   --primary-gradient: linear-gradient(135deg, #111 0%, #444 100%);

   /* ── Semantic ── */
   --success: #166534;
   --success-bg: #f0fdf4;
   --success-light: #bbf7d0;
   --warning: #92400e;
   --warning-border: #fcd34d;
   --warning-bg: #fffbeb;
   --danger: #991b1b;
   --danger-bg: #fef2f2;
   --danger-border: #fecaca;
   --info: #1e40af;
   --info-bg: #eff6ff;
   --info-border: #bfdbfe;

   /* ── Surfaces ── */
   --bg-body: #f7f7f8;
   --bg-surface: #ffffff;
   --bg-gray: #f4f4f5;
   --bg-surface-alt: #f4f4f5;
   --border-color: rgba(0, 0, 0, .08);
   --border-focus: #111111;

   /* ── Text ── */
   --text-main: #09090b;
   --text-muted: #71717a;
   --text-light: #a1a1aa;
   --text-white: #ffffff;
   --text-black: #18181a;

   /* ── Radii ── */
   --radius-xs: 4px;
   --radius-sm: 6px;
   --radius-md: 10px;
   --radius-lg: 14px;
   --radius-xl: 20px;
   --radius-full: 9999px;

   /* ── Shadows ── */
   --shadow-xs: 0 1px 2px rgba(0, 0, 0, .04);
   --shadow-sm: 0 1px 3px rgba(0, 0, 0, .06), 0 1px 2px rgba(0, 0, 0, .04);
   --shadow-md: 0 4px 12px rgba(0, 0, 0, .07), 0 2px 4px rgba(0, 0, 0, .04);
   --shadow-lg: 0 10px 28px rgba(0, 0, 0, .10);
   --shadow-xl: 0 20px 48px rgba(0, 0, 0, .14);

   /* ── Typography ── */
   --font-sans: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
   --font-mono: ui-monospace, "SFMono-Regular", Consolas, monospace;
   --font-size-button: 0.91rem;
   --font-size-nav: 0.9rem;

   /* ── Spacing ── */
   --space-1: 4px;
   --space-2: 8px;
   --space-3: 12px;
   --space-4: 16px;
   --space-5: 20px;
   --space-6: 24px;
   --space-8: 32px;
   --space-10: 40px;
   --space-12: 48px;

   /* ── Transitions ── */
   --transition-fast: 120ms ease;
   --transition-normal: 200ms ease;
   --transition-slow: 350ms ease;

   /* ── Layout ── */
   --rail-width: 60px;
   --panel-width: 220px;
   --sidebar-width: 260px;
   --topbar-height: 60px;
   --content-max-w: 1800px;

   /* ════════════════════════════════════════════════════════
     AUTH PAGE TOKENS  (light defaults)
     ════════════════════════════════════════════════════════ */
   --auth-accent: #7C6EF0;
   --auth-accent-dark: #5B4ECC;
   --auth-accent-soft: #9D8FF8;
   --auth-accent-shadow: rgba(124, 110, 240, .40);
   --auth-page-bg: #F5F6FA;
   --auth-brand-bg: linear-gradient(145deg, #111111 0%, #1E1E2E 60%, #111111 100%);
   --auth-brand-text: #ffffff;
   --auth-brand-sub: rgba(255, 255, 255, .50);
   --auth-brand-muted: rgba(255, 255, 255, .22);
   --auth-brand-pill: rgba(124, 110, 240, .18);
   --auth-brand-pill-ic: #9D8FF8;
   --auth-form-bg: #FFFFFF;
   --auth-card-bg: #FFFFFF;
   --auth-card-bdr: rgba(0, 0, 0, .08);
   --auth-card-shadow: 0 20px 60px rgba(0, 0, 0, .09);
   --auth-card-blur: 0px;
   --auth-input-bg: #F4F4F5;
   --auth-input-bdr: rgba(0, 0, 0, .10);
   --auth-input-bdr-f: #7C6EF0;
   --auth-input-text: #09090B;
   --auth-input-hint: #A1A1AA;
   --auth-input-icon: #A1A1AA;
   --auth-label: #3F3F46;
   --auth-text-sub: #71717A;
   --auth-link: #7C6EF0;
   --auth-eye-color: #A1A1AA;
   --auth-check-bdr: rgba(0, 0, 0, .22);
   --auth-check-active: #7C6EF0;
   --auth-tab-wrap: rgba(0, 0, 0, .05);
   --auth-tab-active-bg: rgba(124, 110, 240, .14);
   --auth-tab-active-c: #5B4ECC;
   --auth-tab-idle-c: #71717A;
   --auth-blob-1: rgba(124, 110, 240, .09);
   --auth-blob-2: rgba(0, 184, 169, .06);
   --auth-blob-3: rgba(157, 143, 248, .05);
   --auth-grid-dot: rgba(0, 0, 0, .035);
   --auth-loc-bg-idle: rgba(0, 0, 0, .04);
   --auth-loc-bdr-idle: rgba(0, 0, 0, .09);
   --auth-loc-c-idle: #71717A;
   --auth-loc-bg-req: rgba(245, 158, 11, .09);
   --auth-loc-bdr-req: rgba(245, 158, 11, .22);
   --auth-loc-c-req: #92400E;
   --auth-loc-bg-ok: rgba(16, 185, 129, .09);
   --auth-loc-bdr-ok: rgba(16, 185, 129, .22);
   --auth-loc-c-ok: #065F46;
   --auth-loc-bg-deny: rgba(239, 68, 68, .09);
   --auth-loc-bdr-deny: rgba(239, 68, 68, .20);
   --auth-loc-c-deny: #991B1B;
   --auth-chip-wait-bg: rgba(0, 0, 0, .05);
   --auth-chip-wait-bdr: rgba(0, 0, 0, .10);
   --auth-chip-wait-c: #71717A;
   --auth-chip-ok-bg: rgba(16, 185, 129, .10);
   --auth-chip-ok-bdr: rgba(16, 185, 129, .25);
   --auth-chip-ok-c: #065F46;
   --auth-chip-fail-bg: rgba(239, 68, 68, .10);
   --auth-chip-fail-bdr: rgba(239, 68, 68, .25);
   --auth-chip-fail-c: #991B1B;
   --auth-alert-err-bg: rgba(239, 68, 68, .09);
   --auth-alert-err-bdr: rgba(239, 68, 68, .28);
   --auth-alert-err-c: #991B1B;
   --auth-alert-ok-bg: rgba(16, 185, 129, .09);
   --auth-alert-ok-bdr: rgba(16, 185, 129, .25);
   --auth-alert-ok-c: #065F46;
   --auth-alert-warn-bg: rgba(245, 158, 11, .09);
   --auth-alert-warn-bdr: rgba(245, 158, 11, .25);
   --auth-alert-warn-c: #92400E;
   --auth-otp-bg: #F4F4F5;
   --auth-otp-bdr: rgba(0, 0, 0, .10);
   --auth-otp-text: #09090B;
   --auth-otp-bdr-f: #7C6EF0;
   --auth-otp-bdr-fill: rgba(124, 110, 240, .35);
   --auth-cam-overlay: rgba(0, 0, 0, .40);
   --auth-foot-bdr: rgba(0, 0, 0, .07);
   --auth-foot-c: #A1A1AA;
   --auth-div-line: rgba(0, 0, 0, .09);
   --auth-div-text: #A1A1AA;
   --auth-2fa-warn-bg: rgba(245, 158, 11, .10);
   --auth-2fa-warn-bdr: rgba(245, 158, 11, .28);
   --auth-2fa-warn-c: #92400E;
   --auth-bio-bg: rgba(124, 110, 240, .07);
   --auth-bio-bdr: rgba(124, 110, 240, .20);
   --auth-bio-ic-bg: rgba(124, 110, 240, .12);
   --auth-bio-title: #09090B;
   --auth-bio-sub: #71717A;
   --auth-bio-chevron: #7C6EF0;
   --auth-backup-bg: #F4F4F5;
   --auth-backup-bdr: rgba(0, 0, 0, .10);
   --auth-backup-text: #09090B;
   --auth-countdown-c: #71717A;
   --auth-countdown-bold: #3F3F46;
   --auth-countdown-urg: #991B1B;
}

/* ──────────────────────────────────────────────────────────────
   CMS dashboard
   ────────────────────────────────────────────────────────────── */
.ag-cms-dashboard {
   --cms-ink: #272334;
   --cms-muted: #8b8794;
   --cms-line: rgba(39, 35, 52, .07);
   --cms-blue: #82aceb;
   --cms-purple: #c47cdf;
   --cms-coral: #ee9a7c;
   --cms-gold: #f1cc42;
   --cms-teal: #56d9dc;
   --cms-green: #86d7a6;
   padding: 4px 0 28px;
   color: var(--cms-ink);
}

.ag-cms-hello {
   display: flex;
   align-items: center;
   justify-content: space-between;
   gap: 18px;
   margin-bottom: 22px;
}

.ag-cms-eyebrow {
   margin: 0 0 4px;
   color: var(--cms-muted);
   font-size: 12px;
   font-weight: 700;
}

.ag-cms-hello h1 {
   margin: 0;
   font-size: 28px;
   line-height: 1.15;
   font-weight: 800;
   letter-spacing: 0;
}

.ag-cms-actions {
   display: flex;
   align-items: center;
   gap: 10px;
}

.ag-cms-icon-btn,
.ag-cms-primary-btn {
   display: inline-flex;
   align-items: center;
   justify-content: center;
   border: 1px solid rgba(39, 35, 52, .08);
   background: rgba(255, 255, 255, .82);
   color: var(--cms-ink);
   box-shadow: 0 8px 24px rgba(40, 34, 58, .07);
}

.ag-cms-icon-btn {
   width: 38px;
   height: 38px;
   border-radius: 50%;
}

.ag-cms-primary-btn {
   min-height: 38px;
   gap: 8px;
   padding: 0 14px;
   border-radius: 999px;
   font-size: 13px;
   font-weight: 800;
}

.ag-cms-top-grid {
   display: grid;
   grid-template-columns: minmax(210px, .9fr) minmax(360px, 1.65fr) minmax(210px, .9fr);
   gap: 18px;
   align-items: stretch;
}

.ag-cms-main-grid {
   display: grid;
   grid-template-columns: minmax(0, 1fr) 260px;
   gap: 18px;
   margin-top: 18px;
}

.ag-cms-side-stack {
   display: flex;
   flex-direction: column;
   gap: 18px;
}

.ag-cms-panel {
   position: relative;
   border: 1px solid rgba(39, 35, 52, .055);
   border-radius: 8px;
   background: rgba(255, 255, 255, .82);
   box-shadow: 0 18px 38px rgba(38, 31, 52, .07);
}

.ag-cms-panel-title {
   color: #4f4b59;
   font-size: 14px;
   font-weight: 800;
}

.ag-cms-metric-card {
   min-height: 178px;
   padding: 24px;
}

.ag-cms-big-number {
   display: flex;
   align-items: baseline;
   gap: 8px;
   margin-top: 26px;
   font-size: 74px;
   line-height: .82;
   font-weight: 700;
   letter-spacing: 0;
}

.ag-cms-big-number span {
   font-size: 21px;
   font-weight: 600;
}

.ag-cms-metric-card p {
   margin: 14px 0 0;
   color: var(--cms-muted);
   font-size: 13px;
   font-weight: 600;
}

.ag-cms-usage-card {
   min-height: 178px;
   padding: 24px 28px;
}

.ag-cms-stack {
   display: flex;
   height: 22px;
   margin: 28px 0 20px;
   overflow: hidden;
   border-radius: 999px;
   background: #eeeef2;
   box-shadow: 0 10px 18px rgba(39, 35, 52, .18);
}

.ag-cms-stack span {
   min-width: 20px;
}

.ag-cms-stack .published,
.ag-cms-progress-row b.published {
   background: var(--cms-blue);
}

.ag-cms-stack .draft,
.ag-cms-progress-row b.draft {
   background: var(--cms-purple);
}

.ag-cms-stack .approval,
.ag-cms-progress-row b.approval {
   background: var(--cms-coral);
}

.ag-cms-stack .scheduled,
.ag-cms-progress-row b.scheduled {
   background: var(--cms-gold);
}

.ag-cms-progress-row b.queue {
   background: #9ac1f0;
}

.ag-cms-progress-row b.image {
   background: var(--cms-blue);
}

.ag-cms-progress-row b.video {
   background: var(--cms-coral);
}

.ag-cms-progress-row b.infographic {
   background: var(--cms-purple);
}

.ag-cms-progress-row b.audio {
   background: var(--cms-green);
}

.ag-cms-usage-metrics {
   display: grid;
   grid-template-columns: repeat(4, 1fr);
   gap: 12px;
}

.ag-cms-usage-metrics div {
   min-width: 0;
}

.ag-cms-usage-metrics strong {
   display: block;
   color: #332d40;
   font-size: 32px;
   line-height: 1;
   font-weight: 700;
   letter-spacing: 0;
}

.ag-cms-usage-metrics span {
   display: block;
   margin-top: 9px;
   color: var(--cms-muted);
   font-size: 12px;
   font-weight: 700;
}

.ag-cms-floating-cta {
   position: absolute;
   left: 50%;
   bottom: -32px;
   z-index: 2;
   display: grid;
   grid-template-columns: 42px auto;
   grid-template-rows: auto auto;
   column-gap: 12px;
   align-items: center;
   min-width: 300px;
   padding: 12px 20px 12px 12px;
   border: 10px solid rgba(255, 255, 255, .82);
   border-radius: 999px;
   background: #34293a;
   color: #fff;
   box-shadow: 0 16px 32px rgba(51, 41, 58, .24);
   transform: translateX(-50%);
}

.ag-cms-floating-cta:hover {
   color: #fff;
}

.ag-cms-floating-cta span {
   grid-row: 1 / span 2;
   display: flex;
   align-items: center;
   justify-content: center;
   width: 42px;
   height: 42px;
   border-radius: 50%;
   background: #f7d7df;
   color: #33283a;
}

.ag-cms-floating-cta strong {
   font-size: 14px;
   line-height: 1.1;
}

.ag-cms-floating-cta small {
   margin-top: 4px;
   color: rgba(255, 255, 255, .64);
   font-size: 12px;
}

.ag-cms-table-panel {
   min-width: 0;
   overflow: hidden;
}

.ag-cms-section-head {
   display: flex;
   align-items: center;
   justify-content: space-between;
   gap: 14px;
   padding: 20px 22px 6px;
}

.ag-cms-section-head.compact {
   padding-bottom: 12px;
}

.ag-cms-section-head h2 {
   margin: 0;
   color: #4a4555;
   font-size: 16px;
   line-height: 1.2;
   font-weight: 800;
   letter-spacing: 0;
}

.ag-cms-section-head a {
   display: inline-flex;
   align-items: center;
   gap: 6px;
   color: #9c89cf;
   font-size: 13px;
   font-weight: 800;
}

.ag-cms-table-wrap {
   width: 100%;
   overflow-x: auto;
}

.ag-cms-table {
   width: 100%;
   min-width: 760px;
   border-collapse: collapse;
}

.ag-cms-table th,
.ag-cms-table td {
   padding: 15px 22px;
   text-align: left;
   border-bottom: 1px solid rgba(39, 35, 52, .055);
}

.ag-cms-table th {
   color: #bbb6c2;
   font-size: 11px;
   text-transform: uppercase;
   font-weight: 800;
}

.ag-cms-table td {
   color: #686272;
   font-size: 13px;
   font-weight: 650;
   vertical-align: middle;
}

.ag-cms-table tr:last-child td {
   border-bottom: 0;
}

.ag-cms-title-cell {
   display: flex;
   align-items: center;
   gap: 11px;
   min-width: 0;
}

.ag-cms-title-cell span {
   display: flex;
   align-items: center;
   justify-content: center;
   width: 28px;
   height: 28px;
   border-radius: 50%;
   background: #f1f5ff;
   color: #6fa0e5;
   flex: 0 0 auto;
}

.ag-cms-title-cell strong {
   display: block;
   max-width: 300px;
   overflow: hidden;
   color: #5a5362;
   text-overflow: ellipsis;
   white-space: nowrap;
}

.ag-cms-avatar-stack span {
   display: inline-flex;
   align-items: center;
   justify-content: center;
   width: 24px;
   height: 24px;
   border: 2px solid #fff;
   border-radius: 50%;
   background: linear-gradient(135deg, #f0b7a1, #8fc6bf);
   color: #fff;
   font-size: 10px;
   font-weight: 800;
}

.ag-cms-status {
   display: inline-flex;
   align-items: center;
   gap: 7px;
   min-height: 24px;
   padding: 0 10px;
   border-radius: 999px;
   font-size: 12px;
   font-weight: 800;
   white-space: nowrap;
}

.ag-cms-status i {
   width: 7px;
   height: 7px;
   border-radius: 50%;
}

.ag-cms-status.published {
   background: rgba(86, 217, 220, .12);
   color: #2f9da0;
}

.ag-cms-status.published i {
   background: var(--cms-teal);
}

.ag-cms-status.draft,
.ag-cms-status.queue {
   background: rgba(130, 172, 235, .13);
   color: #668fd0;
}

.ag-cms-status.draft i,
.ag-cms-status.queue i {
   background: var(--cms-blue);
}

.ag-cms-status.scheduled {
   background: rgba(241, 204, 66, .14);
   color: #b28e13;
}

.ag-cms-status.scheduled i {
   background: var(--cms-gold);
}

.ag-cms-status.approval {
   background: rgba(196, 124, 223, .13);
   color: #a76ec2;
}

.ag-cms-status.approval i {
   background: var(--cms-purple);
}

.ag-cms-progress-list {
   display: grid;
   gap: 17px;
   padding: 0 22px 22px;
}

.ag-cms-progress-row div {
   display: flex;
   align-items: center;
   justify-content: space-between;
   gap: 12px;
   margin-bottom: 8px;
   color: #716b79;
   font-size: 13px;
   font-weight: 750;
}

.ag-cms-progress-row em {
   color: #b7b2bd;
   font-style: normal;
   font-size: 12px;
}

.ag-cms-progress-row {
   position: relative;
}

.ag-cms-progress-row::after,
.ag-cms-progress-row b {
   display: block;
   height: 5px;
   border-radius: 999px;
}

.ag-cms-progress-row::after {
   content: "";
   width: 100%;
   background: #efedf1;
}

.ag-cms-progress-row b {
   position: absolute;
   left: 0;
   bottom: 0;
   min-width: 18px;
}

.ag-cms-activity {
   padding-bottom: 8px;
}

.ag-cms-activity-row {
   display: flex;
   gap: 10px;
   padding: 0 22px 14px;
}

.ag-cms-activity-row>span {
   display: flex;
   align-items: center;
   justify-content: center;
   width: 28px;
   height: 28px;
   border-radius: 50%;
   background: #fff5df;
   color: #d69a22;
   flex: 0 0 auto;
}

.ag-cms-activity-row strong {
   display: -webkit-box;
   overflow: hidden;
   color: #5d5665;
   font-size: 12px;
   line-height: 1.35;
   font-weight: 800;
   -webkit-box-orient: vertical;
   -webkit-line-clamp: 2;
}

.ag-cms-activity-row small {
   display: block;
   margin-top: 4px;
   color: var(--cms-muted);
   font-size: 11px;
   font-weight: 700;
}

.ag-cms-empty {
   display: flex;
   align-items: center;
   justify-content: center;
   gap: 10px;
   min-height: 96px;
   color: var(--cms-muted);
   font-size: 13px;
   font-weight: 700;
}

.ag-cms-empty.compact {
   min-height: auto;
   justify-content: flex-start;
   padding: 0 22px 16px;
}

@media (max-width: 1180px) {

   .ag-cms-top-grid,
   .ag-cms-main-grid {
      grid-template-columns: 1fr;
   }

   .ag-cms-side-stack {
      display: grid;
      grid-template-columns: repeat(3, minmax(0, 1fr));
   }
}

@media (max-width: 820px) {
   .ag-cms-hello {
      align-items: flex-start;
      flex-direction: column;
   }

   .ag-cms-actions {
      width: 100%;
      justify-content: flex-end;
   }

   .ag-cms-usage-metrics {
      grid-template-columns: repeat(2, 1fr);
   }

   .ag-cms-floating-cta {
      position: static;
      min-width: 0;
      margin: 22px auto 0;
      transform: none;
   }

   .ag-cms-side-stack {
      grid-template-columns: 1fr;
   }
}

@media (max-width: 560px) {

   .ag-cms-hello h1 {
      font-size: 24px;
   }

   .ag-cms-metric-card,
   .ag-cms-usage-card {
      min-height: 0;
      padding: 20px;
   }

   .ag-cms-big-number {
      font-size: 56px;
   }

   .ag-cms-floating-cta {
      grid-template-columns: 36px minmax(0, 1fr);
      width: 100%;
      border-width: 7px;
      padding-right: 14px;
   }

   .ag-cms-floating-cta span {
      width: 36px;
      height: 36px;
   }
}

/* ──────────────────────────────────────────────────────────────
   2. GLOBAL RESET & BASE
   ────────────────────────────────────────────────────────────── */
*,
*::before,
*::after {
   box-sizing: border-box
}

body {
   margin: 0;
   font-family: var(--font-sans);
   background-color: var(--bg-body);
   color: var(--text-main);
   font-size: 13px;
   line-height: 1.55;
   -webkit-font-smoothing: antialiased;
   -moz-osx-font-smoothing: grayscale
}

a {
   color: var(--primary);
   text-decoration: none;
   transition: color var(--transition-fast)
}

a:hover {
   color: var(--primary-hover)
}

img {
   display: block;
   max-width: 100%
}

i[class^="fa"],
i[class*=" fa-"] {
   font-family: "Font Awesome 6 Free", "Font Awesome 6 Brands" !important
}

i.fa-solid,
i[class*=" fa-solid"] {
   font-weight: 900 !important
}

i.fa-regular,
i[class*=" fa-regular"] {
   font-weight: 400 !important
}

/* ──────────────────────────────────────────────────────────────
   3. LAYOUT
   ────────────────────────────────────────────────────────────── */

/* ── Dual-Rail Sidebar ── */

.rail-icon {
   width: 40px;
   height: 40px;
   display: flex;
   align-items: center;
   justify-content: center;
   border-radius: var(--radius-md);
   color: #71717a;
   cursor: pointer;
   transition: all var(--transition-fast);
   position: relative;
   text-decoration: none;
   border: none;
   background: transparent;
   font-size: 16px
}

.rail-icon:hover {
   background: #f0f0f0;
   color: var(--text-main)
}

.rail-icon.active {
   background: var(--text-main);
   color: #fff;
   box-shadow: 0 2px 8px rgba(0, 0, 0, .18)
}

.rail-dot {
   position: absolute;
   top: 6px;
   right: 6px;
   width: 7px;
   height: 7px;
   background: #f43f5e;
   border-radius: 50%;
   border: 1.5px solid #fafafa
}

.rail-divider {
   width: 20px;
   height: 1px;
   background: var(--border-color);
   margin: 4px auto
}

/* .nav-item.active i {
   color: #fff
} */

.nav-badge {
   margin-left: auto;
   background: var(--text-main);
   color: #fff;
   font-size: 10px;
   font-weight: 700;
   border-radius: var(--radius-full);
   padding: 1px 7px;
   min-width: 20px;
   text-align: center
}

.nav-toggle-btn {
   margin-left: auto;
   width: 20px;
   height: 20px;
   display: flex;
   align-items: center;
   justify-content: center;
   font-size: 14px;
   color: inherit;
   opacity: .6
}

/* Collapsed sidebar */

/* ── Topbar ── */

/* News studio pages (the selector + block editor) run full-bleed with
   their own topbar — the app chrome's topbar would just be a second,
   redundant header stacked above it. `.main-content` is `display:flex;
   flex-direction:column` with the topbar as a normal flex child, so
   removing it here doesn't leave a gap; nothing needs compensating. */

.notif-badge {
   position: absolute;
   top: 4px;
   right: 4px;
   width: 8px;
   height: 8px;
   background: var(--danger);
   border-radius: 50%;
   border: 2px solid var(--bg-surface)
}

.user-avatar-btn {
   display: flex;
   align-items: center;
   gap: 8px;
   padding: 5px 10px;
   border: none;
   background: transparent;
   border-radius: var(--radius-md);
   cursor: pointer;
   transition: background var(--transition-fast)
}

.user-avatar-btn:hover {
   background: var(--bg-surface-alt)
}

.user-avatar {
   width: 32px;
   height: 32px;
   border-radius: 50%;
   background: var(--primary-gradient);
   color: #fff;
   font-weight: 700;
   font-size: 13px;
   display: flex;
   align-items: center;
   justify-content: center;
   flex-shrink: 0
}

.user-name {
   font-size: 13px;
   font-weight: 600;
   color: var(--text-main)
}

.user-role-text {
   font-size: 11px;
   color: var(--text-muted)
}

.page-container {
   padding: 10px 10px 0;
   flex: 1;
   max-width: var(--content-max-w)
}

/* ──────────────────────────────────────────────────────────────
   4. PAGE HEADER + BREADCRUMB
   ────────────────────────────────────────────────────────────── */
.page-header {
   display: none;
   align-items: flex-start;
   justify-content: space-between;
   flex-wrap: wrap;
   gap: 16px;
   margin-bottom: 24px
}

.page-header-left {
   flex: 1;
   min-width: 0
}

.page-title {
   font-size: 20px;
   font-weight: 700;
   color: var(--text-main);
   margin: 0 0 6px;
   letter-spacing: -0.025em
}

.page-subtitle {
   font-size: 13px;
   color: var(--text-muted);
   margin: 0
}

.breadcrumb {
   display: flex;
   align-items: center;
   gap: 6px;
   list-style: none;
   padding: 0;
   margin: 0 0 8px;
   font-size: 12px;
   color: var(--text-muted)
}

.breadcrumb li+li::before {
   content: '/';
   margin-right: 6px;
   opacity: .4
}

.breadcrumb a {
   color: var(--text-muted)
}

.breadcrumb a:hover {
   color: var(--primary)
}

.breadcrumb .active {
   color: var(--text-main);
   font-weight: 500
}

/* ──────────────────────────────────────────────────────────────
   5. CARDS
   ────────────────────────────────────────────────────────────── */

.inner-card {
   background: var(--bg-surface);
   border: .5px solid var(--border-color);
   border-radius: var(--radius-md);
   box-shadow: var(--shadow-xs)
}

.inner-card-body {
   padding: 16px
}

.stat-card {
   background: var(--bg-surface);
   border: 1px solid var(--border-color);
   border-radius: var(--radius-lg);
   padding: 18px 20px;
   position: relative;
   transition: box-shadow var(--transition-fast)
}

.stat-card:hover {
   box-shadow: var(--shadow-md)
}

.stat-card-icon {
   position: absolute;
   top: 16px;
   right: 18px;
   font-size: 18px;
   color: #d4d4d8
}

.stat-card-label {
   font-size: 12px;
   font-weight: 500;
   color: var(--text-muted);
   margin-bottom: 6px;
   display: flex;
   align-items: center;
   justify-content: space-between
}

.stat-card-value {
   font-size: 2rem;
   font-weight: 700;
   color: var(--text-main);
   letter-spacing: -.03em;
   line-height: 1;
   margin-bottom: 8px
}

.stat-card-sub {
   font-size: 11.5px;
   color: var(--text-muted)
}

.stat-card-sub .up {
   color: #16a34a
}

.stat-card-sub .down {
   color: #dc2626
}

.stat-card-green {
   border-left: 3px solid #22c55e
}

.stat-card-amber {
   border-left: 3px solid #f59e0b
}

.stat-card-red {
   border-left: 3px solid #ef4444
}

.stat-card-cyan {
   border-left: 3px solid #06b6d4
}

.stat-card-purple {
   border-left: 3px solid #8b5cf6
}

.stat-card-rose {
   border-left: 3px solid #f43f5e
}

.stats-grid {
   display: grid;
   grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
   gap: 12px;
   margin-bottom: 24px
}

/* ──────────────────────────────────────────────────────────────
   6. BUTTONS
   ────────────────────────────────────────────────────────────── */

/* ──────────────────────────────────────────────────────────────
   7. FORMS
   ────────────────────────────────────────────────────────────── */
.form-group {
   margin-bottom: 16px
}

.form-label {
   display: block;
   font-size: 12px;
   font-weight: 600;
   color: var(--text-main);
   margin-bottom: 6px
}

.form-label .req {
   color: var(--danger);
   margin-left: 2px
}

.form-hint {
   display: none;
   font-size: 11px;
   color: var(--text-light);
   margin-top: 4px
}

textarea.form-control {
   resize: vertical;
   min-height: 80px
}

.input-group {
   display: flex;
   align-items: stretch
}

.input-group .form-control {
   border-radius: var(--radius-sm) 0 0 var(--radius-sm);
   flex: 1
}

.input-group-text {
   background: var(--bg-surface-alt);
   color: var(--text-muted);
   border: .5px solid rgba(15, 23, 42, .18);
   border-left: none;
   border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
   padding: 8px 12px;
   font-size: 12px;
   font-family: var(--font-mono);
   white-space: nowrap;
   display: flex;
   align-items: center
}

.invalid-feedback {
   font-size: 11.5px;
   color: var(--danger);
   margin-top: 4px;
   display: block
}

.form-grid-2 {
   display: grid;
   grid-template-columns: 1fr 1fr;
   gap: 16px
}

.form-grid-3 {
   display: grid;
   grid-template-columns: 1fr 1fr 1fr;
   gap: 16px
}

.form-grid-full {
   grid-column: 1/-1
}

.filter-grid {
   display: grid;
   grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
   gap: 12px;
   align-items: end
}

/* ──────────────────────────────────────────────────────────────
   8. TABLES
   ────────────────────────────────────────────────────────────── */

.dataTables_filter,
.dataTables_length {
   display: none
}

.dataTables_info {
   padding-top: 14px;
   font-size: 12px;
   color: var(--text-muted);
   float: left
}

.dataTables_paginate {
   padding-top: 14px;
   float: right
}

/* ──────────────────────────────────────────────────────────────
   9. BADGES & PILLS
   ────────────────────────────────────────────────────────────── */
.badge {
   display: inline-block;
   border-radius: var(--radius-full);
   font-size: 11px;
   font-weight: 600;
   letter-spacing: .04em;
   text-transform: uppercase;
   padding: 3px 10px;
   white-space: nowrap
}

.badge-draft {
   background: #e2e8f0;
   color: #475569
}

.badge-pending {
   background: var(--warning-bg);
   color: #854F0B
}

.badge-primary {
   background: var(--primary-bg);
   color: var(--primary)
}

.badge-success {
   background: var(--success-bg);
   color: var(--success)
}

.badge-danger {
   background: var(--danger-bg);
   color: var(--danger)
}

.badge-info {
   background: var(--info-bg);
   color: var(--info)
}

.badge-secondary {
   background: var(--bg-surface-alt);
   color: var(--text-muted)
}

.badge-neutral {
   background: #f4f4f5;
   color: #71717a;
   border: 1px solid #e4e4e7
}

.badge-warning {
   background: #fffbeb;
   color: #92400e
}

.badge-mono {
   background: var(--bg-surface-alt);
   color: var(--text-muted);
   border: .5px solid rgba(15, 23, 42, .12);
   border-radius: var(--radius-xs);
   font-size: 11px;
   font-family: var(--font-mono);
   padding: 2px 7px;
   letter-spacing: 0;
   text-transform: none
}

.status-pill {
   display: inline-flex;
   align-items: center;
   gap: 5px;
   border-radius: var(--radius-full);
   font-size: 11px;
   font-weight: 600;
   padding: 3px 10px
}

.status-dot {
   width: 6px;
   height: 6px;
   border-radius: 50%;
   flex-shrink: 0
}

.status-active {
   background: var(--success-bg);
   color: var(--success)
}

.status-active .status-dot {
   background: var(--success)
}

.status-inactive {
   background: var(--bg-surface-alt);
   color: var(--text-muted)
}

.status-inactive .status-dot {
   background: var(--text-light)
}

.status-warning {
   background: var(--warning-bg);
   color: #854F0B
}

.status-warning .status-dot {
   background: var(--warning)
}

.status-danger {
   background: var(--danger-bg);
   color: var(--danger)
}

.status-danger .status-dot {
   background: var(--danger)
}

/* ──────────────────────────────────────────────────────────────
   10. MODALS
   ────────────────────────────────────────────────────────────── */
.modal-overlay {
   position: fixed;
   inset: 0;
   width: 100vw;
   height: 100vh;
   background: rgba(0, 0, 0, .45);
   z-index: 9000;
   display: flex;
   align-items: center;
   justify-content: center;
   padding: 24px;
   opacity: 0;
   pointer-events: none;
   transition: opacity var(--transition-normal);
   backdrop-filter: blur(3px);
   -webkit-backdrop-filter: blur(3px)
}

.modal-overlay.show {
   opacity: 1;
   pointer-events: all
}

.modal-content {
   background: var(--bg-surface);
   border: .5px solid var(--border-color);
   border-radius: var(--radius-xl);
   overflow: hidden;
   box-shadow: var(--shadow-xl);
   width: 100%;
   max-width: 600px;
   max-height: 90vh;
   display: flex;
   flex-direction: column;
   transform: translateY(20px) scale(.97);
   transition: transform var(--transition-normal), opacity var(--transition-normal)
}

.modal-overlay.show .modal-content {
   transform: translateY(0) scale(1)
}

.modal-sm {
   max-width: 440px
}

.modal-lg {
   max-width: 800px
}

.modal-xl {
   max-width: 1140px
}

.modal-fullscreen {
   max-width: 98vw;
   max-height: 96vh
}

.modal-sidebar {
   position: absolute;
   top: 0;
   right: 0;
   bottom: 0;
   height: 100vh;
   max-height: 100vh;
   margin: 0;
   border-radius: 0;
   border: none;
   border-left: .5px solid var(--border-color);
   transform: translateX(100%) !important;
   transition: transform var(--transition-normal) cubic-bezier(.4, 0, .2, 1)
}

.modal-overlay.show .modal-sidebar {
   transform: translateX(0) !important
}

.modal-sidebar.modal-sm {
   width: 440px;
   max-width: 100vw
}

.modal-sidebar.modal-lg {
   width: 800px;
   max-width: 100vw
}

.modal-sidebar.modal-xl {
   width: 1140px;
   max-width: 100vw
}

.modal-header {
   padding: 18px 22px;
   border-bottom: .5px solid var(--border-color);
   display: flex;
   align-items: flex-start;
   justify-content: space-between;
   gap: 12px;
   flex-shrink: 0
}

.modal-title {
   font-size: 16px;
   font-weight: 700;
   color: var(--text-main);
   letter-spacing: -.01em;
   margin: 0
}

.modal-subtitle {
   font-size: 12px;
   color: var(--text-muted);
   margin: 3px 0 0
}

.modal-body {
   background: var(--bg-body);
   padding: 22px;
   overflow-y: auto;
   flex: 1
}

.modal-footer {
   background: var(--bg-surface-alt);
   border-top: .5px solid var(--border-color);
   padding: 14px 22px;
   display: flex;
   align-items: center;
   justify-content: flex-end;
   gap: 10px;
   flex-shrink: 0
}

.modal-overlay-right {
   align-items: stretch;
   justify-content: flex-end;
   padding: 0
}

.modal-drawer {
   background: var(--bg-surface);
   height: 100%;
   display: flex;
   flex-direction: column;
   box-shadow: -8px 0 40px rgba(0, 0, 0, .14);
   transform: translateX(100%);
   transition: transform var(--transition-slow);
   overflow: hidden
}

.modal-overlay-right.show .modal-drawer {
   transform: translateX(0)
}

.modal-drawer-sm {
   width: 420px;
   max-width: 100vw
}

.modal-drawer-lg {
   width: 720px;
   max-width: 100vw
}

.modal-drawer-header {
   display: flex;
   align-items: flex-start;
   justify-content: space-between;
   padding: 18px 20px;
   border-bottom: 1px solid var(--border-color);
   background: var(--bg-surface);
   flex-shrink: 0;
   gap: 12px
}

.modal-drawer-body {
   flex: 1;
   overflow-y: auto;
   scrollbar-width: thin;
   scrollbar-color: #e4e4e7 transparent
}

.modal-drawer-body::-webkit-scrollbar {
   width: 4px
}

.modal-drawer-body::-webkit-scrollbar-thumb {
   background: #e4e4e7;
   border-radius: 4px
}

.modal-drawer-footer {
   display: flex;
   align-items: center;
   gap: 10px;
   padding: 14px 20px;
   border-top: 1px solid var(--border-color);
   background: var(--bg-surface);
   flex-shrink: 0
}

.modal-close-btn {
   width: 30px;
   height: 30px;
   display: flex;
   align-items: center;
   justify-content: center;
   border: 1px solid var(--border-color);
   border-radius: var(--radius-sm);
   background: #fff;
   font-size: 20px;
   line-height: 1;
   color: var(--text-muted);
   cursor: pointer;
   transition: all var(--transition-fast);
   flex-shrink: 0
}

.modal-close-btn:hover {
   background: var(--bg-surface-alt);
   color: var(--text-main)
}

/* ──────────────────────────────────────────────────────────────
   11. ALERTS
   ────────────────────────────────────────────────────────────── */
.alert {
   display: flex;
   align-items: flex-start;
   gap: 10px;
   padding: 12px 16px;
   border-radius: var(--radius-md);
   font-size: 13px;
   margin-bottom: 16px;
   border: .5px solid transparent;
   line-height: 1.5
}

.alert i {
   flex-shrink: 0;
   margin-top: 1px
}

.alert-dismissible {
   position: relative;
   padding-right: 40px
}

.alert-close {
   position: absolute;
   top: 10px;
   right: 12px;
   background: none;
   border: none;
   font-size: 18px;
   cursor: pointer;
   opacity: .5;
   line-height: 1;
   transition: opacity var(--transition-fast)
}

.alert-close:hover {
   opacity: 1
}

.alert-success {
   background: var(--success-bg);
   color: var(--success);
   border-color: var(--success-light)
}

.alert-warning {
   background: var(--warning-bg);
   color: #854F0B;
   border-color: var(--warning-border)
}

.alert-danger {
   background: var(--danger-bg);
   color: var(--danger);
   border-color: var(--danger-border)
}

.alert-info {
   background: var(--info-bg);
   color: var(--info);
   border-color: var(--info-border)
}

/* ──────────────────────────────────────────────────────────────
   12. TOASTS
   ────────────────────────────────────────────────────────────── */
.toast-container {
   position: fixed;
   top: 20px;
   right: 20px;
   z-index: 9999;
   display: flex;
   flex-direction: column;
   gap: 10px;
   pointer-events: none
}

.toast {
   pointer-events: auto;
   display: flex;
   align-items: center;
   gap: 12px;
   padding: 13px 18px;
   border-radius: var(--radius-lg);
   box-shadow: var(--shadow-lg);
   font-size: 13px;
   font-weight: 500;
   min-width: 280px;
   max-width: 440px;
   color: #fff;
   animation: toastIn .3s ease forwards
}

.toast.hiding {
   animation: toastOut .3s ease forwards
}

.toast-success {
   background: #059669
}

.toast-error {
   background: #dc2626
}

.toast-warning {
   background: #d97706
}

.toast-info {
   background: #2563eb
}

.toast i {
   font-size: 15px;
   flex-shrink: 0
}

.toast-close {
   margin-left: auto;
   background: none;
   border: none;
   color: rgba(255, 255, 255, .7);
   cursor: pointer;
   font-size: 18px;
   padding: 0 0 0 8px
}

.toast-close:hover {
   color: #fff
}

@keyframes toastIn {
   from {
      opacity: 0;
      transform: translateX(100%)
   }

   to {
      opacity: 1;
      transform: translateX(0)
   }
}

@keyframes toastOut {
   from {
      opacity: 1;
      transform: translateX(0)
   }

   to {
      opacity: 0;
      transform: translateX(100%)
   }
}

/* ──────────────────────────────────────────────────────────────
   13. PAGINATION
   ────────────────────────────────────────────────────────────── */
.pagination {
   display: flex;
   align-items: center;
   gap: 4px;
   list-style: none;
   padding: 0;
   margin: 16px 0 0;
   flex-wrap: wrap
}

.page-link {
   display: flex;
   align-items: center;
   justify-content: center;
   min-width: 34px;
   height: 34px;
   border: .5px solid rgba(15, 23, 42, .18);
   border-radius: var(--radius-sm);
   color: var(--text-muted);
   text-decoration: none;
   font-size: 13px;
   font-weight: 500;
   transition: all var(--transition-fast);
   padding: 0 8px;
   cursor: pointer
}

.page-link:hover {
   background: var(--bg-surface-alt);
   color: var(--text-main);
   border-color: rgba(15, 23, 42, .3)
}

.page-link.active {
   background: var(--primary);
   border-color: var(--primary);
   color: #fff
}

.page-link:disabled,
.page-link[aria-disabled="true"] {
   opacity: .4;
   pointer-events: none
}

/* ──────────────────────────────────────────────────────────────
   14. EMPTY STATE
   ────────────────────────────────────────────────────────────── */
.empty-state {
   text-align: center;
   padding: 48px 20px;
   border: 1px dashed rgba(15, 23, 42, .15);
   border-radius: var(--radius-lg);
   color: var(--text-muted);
   font-size: 14px;
   background: var(--bg-surface)
}

.empty-state-icon {
   font-size: 2.5rem;
   opacity: .3;
   display: block;
   margin-bottom: 12px
}

.empty-state-title {
   font-size: 15px;
   font-weight: 600;
   color: var(--text-main);
   margin-bottom: 6px
}

/* ──────────────────────────────────────────────────────────────
   15. DROPDOWNS
   ────────────────────────────────────────────────────────────── */
.dropdown {
   position: relative;
   display: inline-block
}

.dropdown-menu {
   position: absolute;
   top: calc(100% + 6px);
   right: 0;
   background: var(--bg-surface);
   border: .5px solid var(--border-color);
   border-radius: var(--radius-lg);
   box-shadow: var(--shadow-lg);
   min-width: 180px;
   z-index: 500;
   padding: 6px 0;
   display: none;
   animation: dropIn .15s ease
}

.dropdown-menu.show {
   display: block
}

.dropdown-menu.align-left {
   right: auto;
   left: 0
}

.dropdown-item {
   display: flex;
   align-items: center;
   gap: 8px;
   padding: 8px 16px;
   font-size: 13px;
   color: var(--text-main);
   cursor: pointer;
   transition: background var(--transition-fast);
   white-space: nowrap;
   text-decoration: none
}

.dropdown-item:hover {
   background: var(--bg-surface-alt)
}

.dropdown-item.danger {
   color: var(--danger)
}

.dropdown-item.danger:hover {
   background: var(--danger-bg)
}

.dropdown-divider {
   height: 1px;
   background: var(--border-color);
   margin: 5px 0
}

@keyframes dropIn {
   from {
      opacity: 0;
      transform: translateY(-6px)
   }

   to {
      opacity: 1;
      transform: translateY(0)
   }
}

/* ──────────────────────────────────────────────────────────────
   16. FILTER BAR & STATUS PILLS
   ────────────────────────────────────────────────────────────── */
.filter-bar {
   display: flex;
   align-items: center;
   gap: 8px;
   flex-wrap: wrap;
   margin-bottom: 20px;
   padding: 14px 18px;
   background: var(--bg-surface);
   border: .5px solid var(--border-color);
   border-radius: var(--radius-lg);
   box-shadow: var(--shadow-xs)
}

.filter-label {
   font-weight: 600;
   font-size: 12px;
   color: var(--text-muted);
   white-space: nowrap
}

.status-pills {
   display: flex;
   gap: 6px;
   flex-wrap: wrap
}

.status-pill-btn {
   display: inline-flex;
   align-items: center;
   gap: 4px;
   padding: 5px 13px;
   border-radius: var(--radius-full);
   font-size: 12px;
   font-weight: 500;
   cursor: pointer;
   border: 1px solid rgba(15, 23, 42, .15);
   background: var(--bg-surface);
   color: var(--text-muted);
   transition: all var(--transition-fast)
}

.status-pill-btn:hover {
   border-color: var(--primary);
   color: var(--primary)
}

.status-pill-btn.active {
   background: var(--primary);
   color: #fff;
   border-color: var(--primary)
}

.pill-count {
   background: rgba(0, 0, 0, .12);
   padding: 1px 6px;
   border-radius: var(--radius-full);
   font-size: 10px;
   font-weight: 700
}

.status-pill-btn.active .pill-count {
   background: rgba(255, 255, 255, .25)
}

/* ──────────────────────────────────────────────────────────────
   17. TABS
   ────────────────────────────────────────────────────────────── */

/* ──────────────────────────────────────────────────────────────
   18. SELECT2 OVERRIDES
   ────────────────────────────────────────────────────────────── */
.select2-container--bootstrap-5 .select2-selection {
   border: .5px solid rgba(15, 23, 42, .18) !important;
   border-radius: var(--radius-sm) !important;
   font-size: 13px !important;
   min-height: 36px !important;
   font-family: var(--font-sans) !important
}

.select2-container--bootstrap-5 .select2-selection--single {
   padding: 6px 12px !important
}

.select2-container--bootstrap-5 .select2-dropdown {
   border-radius: var(--radius-md) !important;
   box-shadow: var(--shadow-lg) !important;
   border: .5px solid var(--border-color) !important
}

/* ──────────────────────────────────────────────────────────────
   19. LOADING STATES
   ────────────────────────────────────────────────────────────── */
.spinner {
   display: inline-block;
   width: 18px;
   height: 18px;
   border: 2.5px solid rgba(15, 23, 42, .15);
   border-top-color: var(--primary);
   border-radius: 50%;
   animation: spin .7s linear infinite
}

.spinner-lg {
   width: 36px;
   height: 36px;
   border-width: 4px
}

@keyframes spin {
   to {
      transform: rotate(360deg)
   }
}

.loading-overlay {
   position: fixed;
   inset: 0;
   background: rgba(15, 23, 42, .45);
   z-index: 9999;
   display: flex;
   align-items: center;
   justify-content: center;
   backdrop-filter: blur(1px)
}

.skeleton {
   background: linear-gradient(90deg, #f1f5f9 25%, #e2e8f0 50%, #f1f5f9 75%);
   background-size: 200% 100%;
   animation: shimmer 1.4s infinite;
   border-radius: var(--radius-sm);
   display: block
}

@keyframes shimmer {
   from {
      background-position: 200% 0
   }

   to {
      background-position: -200% 0
   }
}

/* ──────────────────────────────────────────────────────────────
   20. UTILITIES
   ────────────────────────────────────────────────────────────── */
.d-flex {
   display: flex
}

.d-grid {
   display: grid
}

.d-block {
   display: block
}

.d-inline {
   display: inline
}

.d-none {
   display: none !important
}

.flex-wrap {
   flex-wrap: wrap
}

.flex-1 {
   flex: 1
}

.flex-col {
   flex-direction: column
}

.align-center {
   align-items: center
}

.align-start {
   align-items: flex-start
}

.align-end {
   align-items: flex-end
}

.justify-between {
   justify-content: space-between
}

.justify-end {
   justify-content: flex-end
}

.justify-center {
   justify-content: center
}

.gap-1 {
   gap: 4px
}

.gap-2 {
   gap: 8px
}

.gap-3 {
   gap: 12px
}

.gap-4 {
   gap: 16px
}

.gap-5 {
   gap: 20px
}

.gap-6 {
   gap: 24px
}

.gap-7 {
   gap: 28px
}

.gap-8 {
   gap: 32px
}

.mt-0 {
   margin-top: 0
}

.mt-2 {
   margin-top: 8px
}

.mt-3 {
   margin-top: 12px
}

.mt-4 {
   margin-top: 16px
}

.mt-5 {
   margin-top: 20px
}

.mt-6 {
   margin-top: 24px
}

.mb-0 {
   margin-bottom: 0
}

.mb-2 {
   margin-bottom: 8px
}

.mb-3 {
   margin-bottom: 12px
}

.mb-4 {
   margin-bottom: 16px
}

.mb-5 {
   margin-bottom: 20px
}

.mb-6 {
   margin-bottom: 24px
}

.me-2 {
   margin-right: 8px
}

.ms-2 {
   margin-left: 8px
}

.ms-auto {
   margin-left: auto
}

.p-0 {
   padding: 0
}

.p-2 {
   padding: 8px
}

.p-3 {
   padding: 12px
}

.p-4 {
   padding: 16px
}

.p-6 {
   padding: 24px
}

.px-3 {
   padding-left: 12px;
   padding-right: 12px
}

.px-4 {
   padding-left: 16px;
   padding-right: 16px
}

.px-5 {
   padding-left: 20px;
   padding-right: 20px
}

.px-6 {
   padding-left: 24px;
   padding-right: 24px
}

.py-2 {
   padding-top: 8px;
   padding-bottom: 8px
}

.py-3 {
   padding-top: 12px;
   padding-bottom: 12px
}

.py-4 {
   padding-top: 16px;
   padding-bottom: 16px
}

.py-5 {
   padding-top: 20px;
   padding-bottom: 20px
}

.pt-4 {
   padding-top: 16px
}

.pb-4 {
   padding-bottom: 16px
}

.ps-4 {
   padding-left: 16px
}

.pe-4 {
   padding-right: 16px
}

.text-center {
   text-align: center
}

.text-right {
   text-align: right
}

.text-left {
   text-align: left
}

.text-sm {
   font-size: 12px
}

.text-xs {
   font-size: 11px
}

.text-lg {
   font-size: 15px
}

.text-xl {
   font-size: 18px
}

.text-muted {
   color: var(--text-muted)
}

.text-primary {
   color: var(--primary)
}

.text-success {
   color: var(--success)
}

.text-danger {
   color: var(--danger)
}

.text-warning {
   color: #854F0B
}

.font-bold {
   font-weight: 700
}

.font-semibold {
   font-weight: 600
}

.font-medium {
   font-weight: 500
}

.font-mono {
   font-family: var(--font-mono)
}

.truncate {
   overflow: hidden;
   text-overflow: ellipsis;
   white-space: nowrap
}

.w-full {
   width: 100%
}

.w-auto {
   width: auto
}

.h-full {
   height: 100%
}

.min-w-0 {
   min-width: 0
}

.rounded {
   border-radius: var(--radius-md)
}

.rounded-lg {
   border-radius: var(--radius-lg)
}

.rounded-xl {
   border-radius: var(--radius-xl)
}

.rounded-full {
   border-radius: var(--radius-full)
}

.border {
   border: .5px solid var(--border-color)
}

.shadow-sm {
   box-shadow: var(--shadow-sm)
}

.shadow-md {
   box-shadow: var(--shadow-md)
}

.shadow-lg {
   box-shadow: var(--shadow-lg)
}

.shadow-none {
   box-shadow: none !important
}

.overflow-hidden {
   overflow: hidden
}

.overflow-auto {
   overflow: auto
}

.overflow-x-auto {
   overflow-x: auto
}

.cursor-pointer {
   cursor: pointer
}

.relative {
   position: relative
}

.absolute {
   position: absolute
}

.sticky {
   position: sticky
}

.fade-in {
   animation: fadeIn .35s ease both
}

@keyframes fadeIn {
   from {
      opacity: 0
   }

   to {
      opacity: 1
   }
}

.fade-in-fast {
   animation: fadeIn .2s ease both
}

/* ──────────────────────────────────────────────────────────────
   21. ANIMATIONS
   ────────────────────────────────────────────────────────────── */
/* (in utilities above) */

/* ──────────────────────────────────────────────────────────────
   22. RESPONSIVE
   ────────────────────────────────────────────────────────────── */
@media(max-width:1024px) {
   .form-grid-3 {
      grid-template-columns: 1fr 1fr
   }
}

@media(max-width:768px) {
   .ag-media-embed .ag-media-grid {
      grid-template-columns: repeat(auto-fill, minmax(138px, 1fr))
   }

   .filter-grid {
      grid-template-columns: 1fr
   }

   .form-grid-2,
   .form-grid-3 {
      grid-template-columns: 1fr
   }

   .page-header {
      flex-direction: column;
      align-items: flex-start
   }

   .stats-grid {
      grid-template-columns: repeat(2, 1fr)
   }

   .page-container {
      padding: 16px
   }

   .modal-content {
      max-height: 95vh
   }

}

@media(max-width:480px) {
   .stats-grid {
      grid-template-columns: 1fr
   }

   .page-container {
      padding: 12px
   }

   .modal-body {
      padding: 16px
   }

   .modal-header,
   .modal-footer {
      padding: 14px 16px
   }
}

@media print {

   .alert,
   .toast-container {
      display: none !important
   }

   body {
      background: #fff
   }
}

/* ──────────────────────────────────────────────────────────────
   23. DATA TABLE
   ────────────────────────────────────────────────────────────── */
.page-tabs {
   display: flex;
   gap: 2px;
   background: var(--bg-surface-alt);
   border: 1px solid var(--border-color);
   border-radius: var(--radius-md);
   padding: 3px;
   width: fit-content;
   margin-bottom: 20px
}

.page-tab {
   padding: 6px 14px;
   font-size: 12.5px;
   font-weight: 500;
   color: var(--text-muted);
   border-radius: var(--radius-sm);
   cursor: pointer;
   border: none;
   background: transparent;
   transition: all var(--transition-fast);
   white-space: nowrap
}

.page-tab:hover {
   color: var(--text-main)
}

.page-tab.active {
   background: var(--bg-surface);
   color: var(--text-main);
   font-weight: 600;
   box-shadow: var(--shadow-xs)
}

.dt-stats-grid {
   display: grid;
   grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
   border: 1px solid var(--border-color);
   border-radius: var(--radius-lg);
   overflow: hidden;
   margin-bottom: 16px;
   background: var(--bg-surface)
}

.dt-stat-item {
   padding: 16px 18px;
   border-right: 1px solid var(--border-color);
   position: relative;
   margin: 10px
}

.dt-stat-item:last-child {
   border-right: none
}

.dt-stat-label {
   font-size: 11.5px;
   font-weight: 500;
   color: var(--text-muted);
   margin-bottom: 6px;
   display: flex;
   align-items: center;
   justify-content: space-between
}

.dt-stat-label i {
   font-size: 14px;
   color: #d4d4d8
}

.dt-stat-value {
   font-size: 1.6rem;
   font-weight: 700;
   color: var(--text-main);
   letter-spacing: -.03em;
   line-height: 1;
   margin-bottom: 4px
}

.dt-stat-sub {
   font-size: 11px;
   color: var(--text-muted)
}

.dt-stat-sub .up {
   color: #16a34a;
   font-weight: 600
}

.dt-stat-sub .down {
   color: #dc2626;
   font-weight: 600
}

.data-table-card {
   background: var(--bg-surface);
   border: 1px solid var(--border-color);
   border-radius: var(--radius-lg);
   overflow: hidden;
   box-shadow: var(--shadow-xs)
}

.data-table-toolbar {
   display: flex;
   align-items: center;
   justify-content: space-between;
   flex-wrap: wrap;
   gap: 10px;
   padding: 12px 16px;
   border-bottom: 1px solid var(--border-color);
   background: var(--bg-surface)
}

.data-table-toolbar-left,
.data-table-toolbar-right {
   display: flex;
   align-items: center;
   gap: 6px;
   flex-wrap: wrap
}

.view-toggle {
   display: flex;
   border: 1px solid var(--border-color);
   border-radius: var(--radius-sm);
   overflow: hidden
}

.view-toggle-btn {
   padding: 5px 10px;
   font-size: 12px;
   font-weight: 500;
   color: var(--text-muted);
   background: var(--bg-surface);
   border: none;
   cursor: pointer;
   display: flex;
   align-items: center;
   gap: 5px;
   transition: all var(--transition-fast);
   border-right: 1px solid var(--border-color)
}

.view-toggle-btn:last-child {
   border-right: none
}

.view-toggle-btn:hover,
.view-toggle-btn.active {
   background: var(--bg-surface-alt);
   color: var(--text-main)
}

.view-toggle-btn.active {
   font-weight: 600
}

.data-table {
   width: 100%;
   border-collapse: collapse;
   font-size: 13px
}

.data-table thead {
   background: var(--bg-gray)
}

.data-table thead th {
   padding: 10px 14px;
   font-size: 11.5px;
   font-weight: 600;
   color: var(--text-muted);
   border-bottom: 1px solid var(--border-color);
   white-space: nowrap;
   user-select: none
}

.data-table thead th.sortable {
   cursor: pointer;
   transition: background var(--transition-fast), color var(--transition-fast)
}

.data-table thead th.sortable:hover {
   background: #ebebed;
   color: var(--text-main)
}

.data-table thead th.sortable .sort-icon {
   display: inline-flex;
   flex-direction: column;
   gap: 1px;
   vertical-align: middle;
   margin-left: 5px;
   opacity: .3;
   transition: opacity var(--transition-fast);
   line-height: 1;
   font-size: 9px
}

.data-table thead th.sortable .sort-icon::before {
   content: '▲';
   display: block
}

.data-table thead th.sortable .sort-icon::after {
   content: '▼';
   display: block
}

.data-table thead th.sort-asc .sort-icon,
.data-table thead th.sort-desc .sort-icon {
   opacity: 1
}

.data-table thead th.sort-asc .sort-icon::after,
.data-table thead th.sort-desc .sort-icon::before {
   opacity: .2
}

.data-table thead th.sort-asc,
.data-table thead th.sort-desc {
   color: var(--text-main);
   background: #ebebed
}

.data-table tbody tr {
   border-bottom: 1px solid var(--border-color);
   transition: background var(--transition-fast);
   cursor: pointer
}

.data-table tbody tr:last-child {
   border-bottom: none
}

.data-table tbody tr:hover {
   background: var(--bg-surface-alt)
}

.data-table tbody td {
   padding: 11px 14px;
   color: var(--text-main);
   vertical-align: middle;
   font-size: 13px
}

.data-table td.td-check,
.data-table th.td-check{
   width: 40px;
   text-align: center;
   padding-left: 14px;
   padding-right: 6px
}

.dt-avatar {
   width: 30px;
   height: 30px;
   border-radius: 50%;
   object-fit: cover;
   flex-shrink: 0
}

.dt-avatar-fallback {
   width: 30px;
   height: 30px;
   border-radius: 50%;
   background: var(--bg-surface-alt);
   border: 1px solid var(--border-color);
   display: inline-flex;
   align-items: center;
   justify-content: center;
   font-size: 11px;
   font-weight: 700;
   color: var(--text-muted);
   flex-shrink: 0
}

.dt-name-cell {
   display: flex;
   align-items: center;
   gap: 10px
}

.dt-cell-primary {
   font-weight: 500;
   color: var(--text-main);
   font-size: 13px
}

.dt-cell-sub {
   font-size: 12px;
   color: var(--text-muted);
   margin-top: 1px
}

.data-table-footer {
   display: flex;
   align-items: center;
   justify-content: space-between;
   flex-wrap: wrap;
   gap: 10px;
   padding: 11px 16px;
   border-top: 1px solid var(--border-color);
   font-size: 12px;
   color: var(--text-muted);
   background: var(--bg-surface)
}

.dt-per-page-wrap {
   display: flex;
   align-items: center;
   gap: 6px;
   font-size: 12px;
   color: var(--text-muted)
}

.dt-per-page {
   appearance: none;
   -webkit-appearance: none;
   background: var(--bg-surface);
   border: .5px solid rgba(15, 23, 42, .18);
   border-radius: var(--radius-sm);
   padding: 4px 24px 4px 8px;
   font-size: 12px;
   font-family: var(--font-sans);
   color: var(--text-main);
   cursor: pointer;
   outline: none;
   min-height: 28px;
   background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
   background-repeat: no-repeat;
   background-position: right 6px center;
   background-size: 12px;
   transition: border-color var(--transition-fast)
}

.dt-per-page:focus {
   border-color: var(--border-focus);
   box-shadow: 0 0 0 3px rgba(55, 138, 221, .1)
}

.action-menu-wrap {
   position: relative;
   display: inline-block
}

.action-dropdown {
   position: absolute;
   right: 0;
   top: calc(100% + 4px);
   background: var(--bg-surface);
   border: 1px solid var(--border-color);
   border-radius: var(--radius-md);
   box-shadow: var(--shadow-lg);
   min-width: 155px;
   z-index: 200;
   display: none;
   overflow: hidden
}

.action-dropdown.show {
   display: block;
   animation: dropIn .12s ease
}

.action-dropdown-item {
   display: flex;
   align-items: center;
   gap: 8px;
   padding: 8px 12px;
   font-size: 13px;
   color: var(--text-main);
   cursor: pointer;
   border: none;
   background: none;
   width: 100%;
   text-align: left;
   text-decoration: none;
   transition: background var(--transition-fast)
}

.action-dropdown-item:hover {
   background: var(--bg-surface-alt)
}

.action-dropdown-item.danger {
   color: var(--danger)
}

.action-dropdown-item.danger:hover {
   background: var(--danger-bg)
}

.action-dropdown-divider {
   height: 1px;
   background: var(--border-color);
   margin: 4px 0
}

.filter-panel {
   border-bottom: 1px solid var(--border-color);
   overflow: hidden;
   max-height: 0;
   transition: max-height var(--transition-slow);
   background: #fafafa
}

.filter-panel.open {
   max-height: 400px
}

.filter-panel-body {
   padding: 12px 16px;
   display: flex;
   flex-wrap: wrap;
   gap: 12px;
   align-items: flex-end
}

.filter-field {
   display: flex;
   flex-direction: column;
   gap: 4px;
   min-width: 150px;
   flex: 1
}

.filter-field label {
   font-size: 11px;
   font-weight: 600;
   color: var(--text-muted);
   text-transform: uppercase;
   letter-spacing: .04em
}

.stats-strip {
   display: grid;
   grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
   gap: 0;
   border-bottom: 1px solid var(--border-color);
   overflow: hidden;
   max-height: 0;
   transition: max-height var(--transition-slow)
}

.stats-strip.open {
   max-height: 120px
}

.stats-strip-item {
   padding: 14px 18px;
   border-right: 1px solid var(--border-color)
}

.stats-strip-item:last-child {
   border-right: none
}

.stats-strip-value {
   font-size: 20px;
   font-weight: 700;
   color: var(--text-main);
   line-height: 1
}

.stats-strip-label {
   font-size: 11px;
   color: var(--text-muted);
   margin-top: 3px
}

.toolbar-search {
   position: relative;
   display: flex;
   align-items: center
}

.toolbar-search i {
   position: absolute;
   left: 10px;
   color: var(--text-light);
   font-size: 12px;
   pointer-events: none
}

.toolbar-search .form-control {
   padding-left: 32px;
   height: 32px;
   min-width: 200px;
   font-size: 12.5px;
   border-radius: var(--radius-full)
}

.toolbar-search-hint {
   position: absolute;
   right: 10px;
   font-size: 10px;
   color: var(--text-light);
   pointer-events: none
}

.dt-pagination {
   display: flex;
   align-items: center;
   gap: 3px
}

.dt-page-btn {
   min-width: 28px;
   height: 28px;
   padding: 0 6px;
   border: 1px solid var(--border-color);
   background: var(--bg-surface);
   border-radius: var(--radius-sm);
   cursor: pointer;
   font-size: 12px;
   color: var(--text-muted);
   display: flex;
   align-items: center;
   justify-content: center;
   transition: all var(--transition-fast)
}

.dt-page-btn:hover:not(:disabled) {
   background: var(--bg-surface-alt);
   color: var(--text-main)
}

.dt-page-btn.active {
   background: var(--text-main);
   color: #fff;
   border-color: var(--text-main);
   font-weight: 600
}

.dt-page-btn:disabled {
   opacity: .35;
   cursor: not-allowed
}

.dt-skeleton-bar {
   height: 12px;
   border-radius: 6px;
   background: linear-gradient(90deg, #f4f4f5 25%, #e4e4e7 50%, #f4f4f5 75%);
   background-size: 200% 100%;
   animation: skeleton-shimmer 1.4s ease infinite
}

@keyframes skeleton-shimmer {
   0% {
      background-position: 200% 0
   }

   100% {
      background-position: -200% 0
   }
}

/* ──────────────────────────────────────────────────────────────
   23b. BATCH BAR
   ────────────────────────────────────────────────────────────── */
.batch-bar {
   align-items: center;
   justify-content: space-between;
   padding: 10px 16px;
   background: var(--bg-surface);
   border: 1px solid var(--border-color);
   border-radius: var(--radius-md);
   margin-bottom: 16px;
   box-shadow: var(--shadow-sm);
   animation: fadeIn 0.2s ease;
}

.batch-info {
   font-size: 13px;
   font-weight: 500;
   color: var(--text-muted);
}

.batch-info span {
   font-weight: 700;
   color: var(--text-main);
}

.batch-actions {
   display: flex;
   align-items: center;
   gap: 8px;
}

/* ──────────────────────────────────────────────────────────────
   24. MODAL PANEL SECTIONS + DRAWER
   ────────────────────────────────────────────────────────────── */
.mp-2col-body {
   display: grid;
   grid-template-columns: 1fr 1fr;
   flex: 1;
   overflow: hidden;
   min-height: 0;
   max-height: calc(90vh - 118px)
}

.mp-col {
   overflow-y: auto;
   scrollbar-width: thin;
   scrollbar-color: #e4e4e7 transparent
}

.mp-col::-webkit-scrollbar {
   width: 3px
}

.mp-col::-webkit-scrollbar-thumb {
   background: #e4e4e7;
   border-radius: 4px
}

.mp-col-border {
   border-right: 1px solid var(--border-color)
}

.mp-2col-fields {
   display: grid;
   grid-template-columns: 1fr 1fr;
   gap: 12px
}

.mp-section {
   border-bottom: 1px solid var(--border-color)
}

.mp-section-hd {
   display: flex;
   align-items: center;
   gap: 7px;
   padding: 10px 18px;
   font-size: 10.5px;
   font-weight: 700;
   text-transform: uppercase;
   letter-spacing: .07em;
   color: var(--text-muted);
   background: var(--bg-gray);
   border-bottom: 1px solid var(--border-color);
   user-select: none
}

.mp-section-hd i {
   font-size: 12px;
   color: var(--text-light);
   flex-shrink: 0
}

.mp-section-bd {
   padding: 14px 18px 6px
}

.mp-line-item {
   background: #fafafa;
   border: 1px solid var(--border-color);
   border-radius: var(--radius-md);
   padding: 12px 14px;
   margin-bottom: 8px
}

@media(max-width:720px) {
   .mp-2col-body {
      grid-template-columns: 1fr !important
   }

   .mp-2col-fields {
      grid-template-columns: 1fr !important
   }

   .modal-drawer-lg {
      width: 100vw
   }
}

/* ──────────────────────────────────────────────────────────────
   25. AG GRID + PREMIUM COMPONENTS
   ────────────────────────────────────────────────────────────── */
.ag-row {
   display: flex;
   flex-wrap: wrap;
   margin-right: -12px;
   margin-left: -12px
}

.ag-row>* {
   box-sizing: border-box;
   flex-shrink: 0;
   width: 100%;
   max-width: 100%;
   padding-right: 12px;
   padding-left: 12px
}

.ag-col-1 {
   flex: 0 0 auto;
   width: 8.33333333%
}

.ag-col-2 {
   flex: 0 0 auto;
   width: 16.66666667%
}

.ag-col-3 {
   flex: 0 0 auto;
   width: 25%
}

.ag-col-4 {
   flex: 0 0 auto;
   width: 33.33333333%
}

.ag-col-5 {
   flex: 0 0 auto;
   width: 41.66666667%
}

.ag-col-6 {
   flex: 0 0 auto;
   width: 50%
}

.ag-col-7 {
   flex: 0 0 auto;
   width: 58.33333333%
}

.ag-col-8 {
   flex: 0 0 auto;
   width: 66.66666667%
}

.ag-col-9 {
   flex: 0 0 auto;
   width: 75%
}

.ag-col-10 {
   flex: 0 0 auto;
   width: 83.33333333%
}

.ag-col-11 {
   flex: 0 0 auto;
   width: 91.66666667%
}

.ag-col-12 {
   flex: 0 0 auto;
   width: 100%
}

.ag-col-auto {
   flex: 0 0 auto;
   width: auto
}

@media(min-width:576px) {
   .ag-col-sm-1 {
      flex: 0 0 auto;
      width: 8.33%
   }

   .ag-col-sm-2 {
      flex: 0 0 auto;
      width: 16.67%
   }

   .ag-col-sm-3 {
      flex: 0 0 auto;
      width: 25%
   }

   .ag-col-sm-4 {
      flex: 0 0 auto;
      width: 33.33%
   }

   .ag-col-sm-6 {
      flex: 0 0 auto;
      width: 50%
   }

   .ag-col-sm-12 {
      flex: 0 0 auto;
      width: 100%
   }
}

@media(min-width:768px) {
   .ag-col-md-1 {
      flex: 0 0 auto;
      width: 8.33%
   }

   .ag-col-md-2 {
      flex: 0 0 auto;
      width: 16.67%
   }

   .ag-col-md-3 {
      flex: 0 0 auto;
      width: 25%
   }

   .ag-col-md-4 {
      flex: 0 0 auto;
      width: 33.33%
   }

   .ag-col-md-6 {
      flex: 0 0 auto;
      width: 50%
   }

   .ag-col-md-8 {
      flex: 0 0 auto;
      width: 66.67%
   }

   .ag-col-md-12 {
      flex: 0 0 auto;
      width: 100%
   }
}

@media(min-width:992px) {
   .ag-col-lg-1 {
      flex: 0 0 auto;
      width: 8.33%
   }

   .ag-col-lg-2 {
      flex: 0 0 auto;
      width: 16.67%
   }

   .ag-col-lg-3 {
      flex: 0 0 auto;
      width: 25%
   }

   .ag-col-lg-4 {
      flex: 0 0 auto;
      width: 33.33%
   }

   .ag-col-lg-6 {
      flex: 0 0 auto;
      width: 50%
   }

   .ag-col-lg-8 {
      flex: 0 0 auto;
      width: 66.67%
   }

   .ag-col-lg-12 {
      flex: 0 0 auto;
      width: 100%
   }
}

@media(min-width:1200px) {
   .ag-col-xl-3 {
      flex: 0 0 auto;
      width: 25%
   }

   .ag-col-xl-4 {
      flex: 0 0 auto;
      width: 33.33%
   }

   .ag-col-xl-6 {
      flex: 0 0 auto;
      width: 50%
   }

   .ag-col-xl-8 {
      flex: 0 0 auto;
      width: 66.67%
   }

   .ag-col-xl-12 {
      flex: 0 0 auto;
      width: 100%
   }
}

.ag-premium-card {
   background: var(--bg-surface);
   border: 1px solid #e4e4e7;
   border-radius: 16px;
   overflow: hidden;
   transition: box-shadow var(--transition-normal), transform var(--transition-normal);
   margin-bottom: 24px
}

.ag-premium-card:hover {
   box-shadow: 0 12px 32px rgba(0, 0, 0, .08), 0 2px 6px rgba(0, 0, 0, .04)
}

.ag-premium-card-header {
   padding: 24px 28px 20px;
   border-bottom: 1px solid var(--border-color);
   background: var(--bg-surface);
   display: flex;
   align-items: center;
   gap: 12px
}

.ag-premium-card-header h6 {
   margin: 0;
   font-size: 16px;
   font-weight: 700;
   color: var(--text-main);
   letter-spacing: -.01em
}

.ag-premium-card-header i {
   color: #a1a1aa;
   font-size: 18px
}

.ag-premium-card-body {
   padding: 28px
}

.ag-form-label {
   display: block;
   font-size: 13px;
   font-weight: 600;
   color: #52525b;
   margin-bottom: 8px;
   letter-spacing: .01em
}

.ag-form-label .text-danger {
   color: #e11d48 !important
}

.ag-input-modern {
   width: 100%;
   padding: 12px 16px;
   background: var(--bg-gray);
   border: 1.5px solid var(--border-color);
   border-radius: 12px;
   font-size: 14px;
   font-family: var(--font-sans);
   color: var(--text-main);
   transition: all .2s ease
}

.ag-input-modern:focus {
   background: var(--bg-surface);
   border-color: var(--primary);
   box-shadow: 0 0 0 4px var(--border-color);
   outline: none
}

.ag-input-modern::placeholder {
   color: var(--text-light)
}

.ag-input-modern:read-only {
   background: var(--bg-surface-alt);
   color: var(--text-muted);
   cursor: not-allowed
}

select.ag-input-modern {
   appearance: none;
   background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
   background-repeat: no-repeat;
   background-position: right 14px center;
   padding-right: 40px
}

.ag-input-group {
   display: flex;
   align-items: stretch
}

.ag-input-group .ag-input-modern {
   border-top-right-radius: 0;
   border-bottom-right-radius: 0;
   flex: 1
}

.ag-input-group .btn {
   border-top-left-radius: 0;
   border-bottom-left-radius: 0;
   border-width: 1.5px;
   border-left-width: 0;
   padding-left: 16px;
   padding-right: 16px;
   display: flex;
   align-items: center;
   gap: 6px
}

.ag-premium-checkbox {
   display: flex;
   align-items: center;
   gap: 12px;
   padding: 12px 16px;
   border: 1.5px solid var(--border-color);
   border-radius: 12px;
   cursor: pointer;
   transition: all .2s;
   background: var(--bg-gray)
}

.ag-premium-checkbox:hover {
   background: var(--bg-surface-alt);
   border-color: var(--primary-light)
}

.ag-premium-checkbox input[type="checkbox"] {
   width: 20px;
   height: 20px;
   accent-color: var(--primary);
   cursor: pointer
}

.ag-premium-checkbox span {
   font-size: 14px;
   font-weight: 500;
   color: var(--text-main)
}

.ag-premium-checkbox.active {
   background: var(--bg-surface);
   border-color: var(--primary);
   box-shadow: 0 2px 8px var(--border-color)
}

.ag-form-actions {
   display: flex;
   justify-content: flex-end;
   gap: 12px;
   padding-top: 24px;
   border-top: 1px solid #f4f4f5;
   margin-top: 32px
}

.ag-premium-checkbox-content {
   display: flex;
   flex-direction: column
}

.ag-premium-checkbox-content strong {
   font-size: 14px;
   font-weight: 600;
   color: var(--text-main);
   line-height: 1.2
}

.ag-premium-checkbox-content .text-muted {
   font-size: 12px;
   margin-top: 4px
}

.ag-premium-checkbox label {
   cursor: pointer;
   user-select: none;
   margin-bottom: 0;
   width: 100%
}

/* ══════════════════════════════════════════════════════════════════
   27. AUTH / LOGIN PAGES  — all auth-page CSS
   ══════════════════════════════════════════════════════════════════ */

/* ── Page shell ─────────────────────────────────────────────────── */
.auth-page {
   display: flex;
   min-height: 100vh;
   background: var(--auth-page-bg);
   font-family: var(--font-sans);
   color: var(--auth-input-text)
}

/* ── Left branding panel ────────────────────────────────────────── */
.auth-brand {
   flex: 0 0 44%;
   background: var(--auth-brand-bg);
   display: flex;
   flex-direction: column;
   justify-content: center;
   padding: 60px 52px;
   position: relative;
   overflow: hidden
}

@media(max-width:860px) {
   .auth-brand {
      display: none
   }
}

.auth-brand-title {
   font-size: 3rem;
   font-weight: 900;
   letter-spacing: 5px;
   color: var(--auth-brand-text);
   line-height: 1;
   margin-top: 28px
}

.auth-brand-sub {
   font-size: .9rem;
   color: var(--auth-brand-sub);
   margin-top: 8px;
   letter-spacing: .4px
}

.auth-brand-tagline {
   font-size: 1.3rem;
   font-weight: 600;
   color: rgba(255, 255, 255, .82);
   line-height: 1.5;
   margin-top: 44px
}

.auth-brand-features {
   display: flex;
   flex-direction: column;
   gap: 14px;
   margin-top: 32px
}

.auth-feature-pill {
   display: flex;
   align-items: center;
   gap: 12px
}

.auth-feature-icon {
   width: 32px;
   height: 32px;
   border-radius: 9px;
   background: var(--auth-brand-pill);
   display: flex;
   align-items: center;
   justify-content: center;
   flex-shrink: 0
}

.auth-feature-icon svg {
   width: 15px;
   height: 15px;
   fill: none;
   stroke: var(--auth-brand-pill-ic);
   stroke-width: 2;
   stroke-linecap: round;
   stroke-linejoin: round
}

.auth-feature-text {
   font-size: .85rem;
   font-weight: 500;
   color: var(--auth-brand-sub)
}

.auth-brand-copy {
   font-size: .72rem;
   color: var(--auth-brand-muted);
   margin-top: auto;
   padding-top: 40px
}

/* ── Right form panel ───────────────────────────────────────────── */
.auth-form-panel {
   flex: 1;
   background: var(--auth-page-bg);
   display: flex;
   flex-direction: column;
   align-items: center;
   justify-content: center;
   position: relative;
   overflow: hidden;
   padding: 40px 20px
}

.auth-form-panel::before {
   content: '';
   position: absolute;
   inset: 0;
   background-image: radial-gradient(var(--auth-grid-dot) 1px, transparent 1px);
   background-size: 28px 28px;
   pointer-events: none
}

.auth-center {
   min-height: 100vh;
   display: flex;
   align-items: center;
   justify-content: center;
   position: relative;
   overflow: hidden;
   padding: 24px;
   background: var(--auth-page-bg)
}

.auth-center::before {
   content: '';
   position: absolute;
   inset: 0;
   background-image: radial-gradient(var(--auth-grid-dot) 1px, transparent 1px);
   background-size: 28px 28px;
   pointer-events: none
}

/* ── Blobs ──────────────────────────────────────────────────────── */
.auth-blob {
   position: absolute;
   border-radius: 50%;
   pointer-events: none;
   animation: authBlobFloat 7s ease-in-out infinite alternate
}

.auth-blob-1 {
   width: 280px;
   height: 280px;
   top: -80px;
   right: -60px;
   background: var(--auth-blob-1)
}

.auth-blob-2 {
   width: 220px;
   height: 220px;
   bottom: 60px;
   left: -50px;
   background: var(--auth-blob-2);
   animation-delay: -3s;
   animation-direction: alternate-reverse
}

.auth-blob-3 {
   width: 160px;
   height: 160px;
   top: 42%;
   right: 8%;
   background: var(--auth-blob-3);
   animation-delay: -5s
}

.auth-brand .auth-blob-1 {
   width: 340px;
   height: 340px;
   top: -120px;
   left: -80px;
   right: auto
}

.auth-brand .auth-blob-2 {
   width: 260px;
   height: 260px;
   bottom: -60px;
   right: -50px;
   left: auto
}

@keyframes authBlobFloat {
   from {
      transform: translateY(0)
   }

   to {
      transform: translateY(20px)
   }
}

/* ── Logo marks ─────────────────────────────────────────────────── */
.auth-logo-mark {
   width: 64px;
   height: 64px;
   border-radius: 18px;
   background: linear-gradient(135deg, var(--auth-accent) 0%, var(--auth-accent-dark) 100%);
   display: flex;
   align-items: center;
   justify-content: center;
   box-shadow: 0 12px 32px var(--auth-accent-shadow);
   flex-shrink: 0
}

.auth-logo-mark svg {
   width: 32px;
   height: 32px;
   fill: #fff
}

.auth-logo-mark-sm {
   width: 38px;
   height: 38px;
   border-radius: 10px;
   background: linear-gradient(135deg, var(--auth-accent) 0%, var(--auth-accent-dark) 100%);
   display: flex;
   align-items: center;
   justify-content: center;
   flex-shrink: 0
}

.auth-logo-mark-sm svg {
   width: 18px;
   height: 18px;
   fill: #fff
}

/* ── Card ───────────────────────────────────────────────────────── */
.auth-card {
   width: 100%;
   max-width: 420px;
   background: var(--auth-card-bg);
   border: 1px solid var(--auth-card-bdr);
   border-radius: 24px;
   box-shadow: var(--auth-card-shadow);
   backdrop-filter: blur(var(--auth-card-blur));
   -webkit-backdrop-filter: blur(var(--auth-card-blur));
   overflow: hidden;
   position: relative;
   z-index: 1;
   animation: authCardIn .65s cubic-bezier(.16, 1, .3, 1) both
}

@keyframes authCardIn {
   from {
      opacity: 0;
      transform: translateY(16px) scale(.98)
   }

   to {
      opacity: 1;
      transform: none
   }
}

.auth-card-head {
   padding: 28px 28px 0
}

.auth-card-body {
   padding: 24px 28px 28px
}

.auth-card-foot {
   border-top: 1px solid var(--auth-foot-bdr);
   padding: 13px 28px;
   text-align: center;
   font-size: .7rem;
   color: var(--auth-foot-c)
}

.auth-card-foot a {
   color: var(--auth-text-sub);
   text-decoration: none;
   font-weight: 500
}

.auth-card-foot a:hover {
   color: var(--auth-input-text)
}

.auth-card-logo {
   display: flex;
   align-items: center;
   gap: 12px;
   margin-bottom: 22px
}

.auth-card-logo-text {
   font-size: .78rem;
   font-weight: 700;
   letter-spacing: .8px;
   text-transform: uppercase;
   color: var(--auth-text-sub)
}

/* wide layout (no card) */
.auth-wide-form {
   width: 100%;
   max-width: 400px;
   animation: authCardIn .65s cubic-bezier(.16, 1, .3, 1) both
}

.auth-wide-title {
   font-size: 1.75rem;
   font-weight: 800;
   color: var(--auth-input-text);
   letter-spacing: -.02em;
   margin-bottom: 6px
}

.auth-wide-sub {
   font-size: .85rem;
   color: var(--auth-text-sub);
   margin-bottom: 32px
}

/* ── Tabs ───────────────────────────────────────────────────────── */
.auth-tabs {
   display: flex;
   gap: 4px;
   background: var(--auth-tab-wrap);
   border-radius: 10px;
   padding: 3px
}

.auth-tab-btn {
   flex: 1;
   padding: 8px 6px;
   border: none;
   border-radius: 8px;
   font-family: var(--font-sans);
   font-size: .78rem;
   font-weight: 600;
   cursor: pointer;
   background: transparent;
   color: var(--auth-tab-idle-c);
   transition: all .2s;
   display: flex;
   align-items: center;
   justify-content: center;
   gap: 6px
}

.auth-tab-btn svg {
   width: 14px;
   height: 14px;
   fill: none;
   stroke: currentColor;
   stroke-width: 2;
   stroke-linecap: round;
   stroke-linejoin: round;
   flex-shrink: 0
}

.auth-tab-btn.active {
   background: var(--auth-tab-active-bg);
   color: var(--auth-tab-active-c)
}

.auth-code-tabs {
   display: flex;
   gap: 4px;
   background: var(--auth-tab-wrap);
   border-radius: 10px;
   padding: 3px;
   margin-bottom: 20px
}

.auth-code-tab {
   flex: 1;
   padding: 8px 6px;
   border: none;
   border-radius: 8px;
   font-family: var(--font-sans);
   font-size: .75rem;
   font-weight: 600;
   cursor: pointer;
   background: transparent;
   color: var(--auth-tab-idle-c);
   transition: all .2s
}

.auth-code-tab.active {
   background: var(--auth-tab-active-bg);
   color: var(--auth-tab-active-c)
}

/* ── Form fields ────────────────────────────────────────────────── */
.auth-field {
   margin-bottom: 16px
}

.auth-field-row {
   display: flex;
   justify-content: space-between;
   align-items: center;
   margin-bottom: 7px
}

.auth-label {
   font-size: .75rem;
   font-weight: 600;
   color: var(--auth-label);
   letter-spacing: .2px
}

.auth-field-link {
   font-size: .72rem;
   font-weight: 600;
   color: var(--auth-link);
   text-decoration: none;
   transition: opacity .15s
}

.auth-field-link:hover {
   opacity: .75
}

.auth-input-wrap {
   position: relative
}

.auth-input-wrap .auth-input-icon {
   position: absolute;
   left: 13px;
   top: 50%;
   transform: translateY(-50%);
   pointer-events: none;
   color: var(--auth-input-icon)
}

.auth-input-wrap .auth-input-icon svg {
   width: 17px;
   height: 17px;
   fill: none;
   stroke: currentColor;
   stroke-width: 2;
   stroke-linecap: round;
   stroke-linejoin: round
}

.auth-input {
   width: 100%;
   padding: 12px 14px 12px 42px;
   background: var(--auth-input-bg);
   border: 1px solid var(--auth-input-bdr);
   border-radius: 14px;
   font-family: var(--font-sans);
   font-size: .9rem;
   color: var(--auth-input-text);
   outline: none;
   transition: border-color .2s, background .2s, box-shadow .2s
}

.auth-input::placeholder {
   color: var(--auth-input-hint)
}

.auth-input:focus {
   border-color: var(--auth-input-bdr-f);
   background: var(--auth-form-bg);
   box-shadow: 0 0 0 3px rgba(124, 110, 240, .12)
}

.auth-input.auth-err {
   border-color: var(--danger)
}

.auth-input-pw {
   padding-right: 42px
}

.auth-toggle-pw {
   position: absolute;
   right: 12px;
   top: 50%;
   transform: translateY(-50%);
   background: none;
   border: none;
   cursor: pointer;
   padding: 4px;
   color: var(--auth-eye-color);
   transition: color .15s
}

.auth-toggle-pw:hover {
   color: var(--auth-input-text)
}

.auth-toggle-pw svg {
   width: 17px;
   height: 17px;
   fill: none;
   stroke: currentColor;
   stroke-width: 2;
   stroke-linecap: round;
   stroke-linejoin: round;
   display: block
}

/* ── Remember me ────────────────────────────────────────────────── */
.auth-remember {
   display: flex;
   align-items: center;
   gap: 8px;
   margin-bottom: 20px;
   cursor: pointer;
   width: fit-content
}

.auth-remember input[type=checkbox] {
   display: none
}

.auth-check-box {
   width: 18px;
   height: 18px;
   border-radius: 5px;
   flex-shrink: 0;
   border: 1.5px solid var(--auth-check-bdr);
   display: flex;
   align-items: center;
   justify-content: center;
   transition: all .18s;
   background: transparent
}

.auth-remember input:checked+.auth-check-box {
   background: var(--auth-accent);
   border-color: var(--auth-accent)
}

.auth-check-box svg {
   width: 11px;
   height: 11px;
   fill: none;
   stroke: #fff;
   stroke-width: 2.5;
   stroke-linecap: round;
   stroke-linejoin: round;
   display: none
}

.auth-remember input:checked+.auth-check-box svg {
   display: block
}

.auth-remember-label {
   font-size: .78rem;
   color: var(--auth-text-sub);
   font-weight: 500
}

/* ── Primary button ─────────────────────────────────────────────── */
.auth-btn {
   width: 100%;
   padding: 13px;
   border: none;
   border-radius: 14px;
   background: linear-gradient(135deg, var(--auth-accent) 0%, var(--auth-accent-dark) 100%);
   color: #fff;
   font-family: var(--font-sans);
   font-size: .9rem;
   font-weight: 700;
   letter-spacing: .8px;
   cursor: pointer;
   display: flex;
   align-items: center;
   justify-content: center;
   gap: 8px;
   box-shadow: 0 8px 24px var(--auth-accent-shadow);
   transition: opacity .18s, transform .12s
}

.auth-btn:hover:not(:disabled) {
   opacity: .9;
   box-shadow: 0 12px 28px var(--auth-accent-shadow)
}

.auth-btn:active:not(:disabled) {
   transform: scale(.98)
}

.auth-btn:disabled {
   opacity: .4;
   cursor: not-allowed;
   box-shadow: none
}

.auth-btn svg {
   width: 17px;
   height: 17px;
   fill: none;
   stroke: #fff;
   stroke-width: 2.2;
   stroke-linecap: round;
   stroke-linejoin: round
}

.auth-btn-spinner {
   width: 18px;
   height: 18px;
   border-radius: 50%;
   border: 2px solid rgba(255, 255, 255, .3);
   border-top-color: #fff;
   animation: authSpin .65s linear infinite
}

@keyframes authSpin {
   to {
      transform: rotate(360deg)
   }
}

/* ── Register / misc links ──────────────────────────────────────── */
.auth-reg-row {
   display: flex;
   justify-content: center;
   align-items: center;
   gap: 4px;
   margin-top: 18px
}

.auth-reg-row span {
   font-size: .78rem;
   color: var(--auth-text-sub)
}

.auth-reg-row a {
   font-size: .78rem;
   font-weight: 700;
   color: var(--auth-link);
   text-decoration: none;
   transition: opacity .15s
}

.auth-reg-row a:hover {
   opacity: .75
}

.auth-back-link {
   text-align: center;
   font-size: .78rem;
   color: var(--auth-text-sub)
}

.auth-back-link a {
   color: var(--auth-link);
   font-weight: 600;
   text-decoration: none;
   transition: opacity .15s
}

.auth-back-link a:hover {
   opacity: .75
}

/* ── Divider ────────────────────────────────────────────────────── */
.auth-divider {
   display: flex;
   align-items: center;
   gap: 10px;
   margin: 18px 0;
   color: var(--auth-div-text)
}

.auth-divider::before,
.auth-divider::after {
   content: '';
   flex: 1;
   height: 1px;
   background: var(--auth-div-line)
}

.auth-divider span {
   font-size: .72rem;
   white-space: nowrap
}

/* ── Alert banners ──────────────────────────────────────────────── */
.auth-alert {
   padding: 11px 13px;
   border-radius: 10px;
   font-size: .8rem;
   display: flex;
   align-items: flex-start;
   gap: 9px;
   margin-bottom: 16px;
   animation: authAlertIn .25s ease
}

@keyframes authAlertIn {
   from {
      opacity: 0;
      transform: translateY(-5px)
   }

   to {
      opacity: 1;
      transform: none
   }
}

.auth-alert svg {
   width: 16px;
   height: 16px;
   flex-shrink: 0;
   margin-top: 1px;
   fill: none;
   stroke: currentColor;
   stroke-width: 2;
   stroke-linecap: round
}

.auth-alert-body {
   display: flex;
   flex-direction: column;
   gap: 2px
}

.auth-alert-title {
   font-weight: 700
}

.auth-alert-desc {
   font-size: .73rem;
   opacity: .85;
   line-height: 1.4
}

.auth-alert-err {
   background: var(--auth-alert-err-bg);
   border: 1px solid var(--auth-alert-err-bdr);
   color: var(--auth-alert-err-c)
}

.auth-alert-ok {
   background: var(--auth-alert-ok-bg);
   border: 1px solid var(--auth-alert-ok-bdr);
   color: var(--auth-alert-ok-c)
}

.auth-alert-warn {
   background: var(--auth-alert-warn-bg);
   border: 1px solid var(--auth-alert-warn-bdr);
   color: var(--auth-alert-warn-c)
}

/* ── Location chip ──────────────────────────────────────────────── */
.auth-loc-chip {
   display: flex;
   align-items: center;
   gap: 8px;
   padding: 7px 12px;
   border-radius: 30px;
   font-size: .72rem;
   font-weight: 600;
   margin-bottom: 18px;
   width: fit-content;
   transition: all .3s;
   background: var(--auth-loc-bg-idle);
   border: 1px solid var(--auth-loc-bdr-idle);
   color: var(--auth-loc-c-idle)
}

.auth-loc-chip svg {
   width: 13px;
   height: 13px;
   flex-shrink: 0;
   fill: none;
   stroke: currentColor;
   stroke-width: 2;
   stroke-linecap: round
}

.auth-loc-chip-spinner {
   width: 12px;
   height: 12px;
   border-radius: 50%;
   border: 1.5px solid transparent;
   border-top-color: currentColor;
   animation: authSpin .7s linear infinite;
   flex-shrink: 0
}

.auth-loc-chip.requesting {
   background: var(--auth-loc-bg-req);
   border-color: var(--auth-loc-bdr-req);
   color: var(--auth-loc-c-req)
}

.auth-loc-chip.granted {
   background: var(--auth-loc-bg-ok);
   border-color: var(--auth-loc-bdr-ok);
   color: var(--auth-loc-c-ok)
}

.auth-loc-chip.denied {
   background: var(--auth-loc-bg-deny);
   border-color: var(--auth-loc-bdr-deny);
   color: var(--auth-loc-c-deny);
   cursor: pointer
}

/* ── Status chips ───────────────────────────────────────────────── */
.auth-chip-row {
   display: flex;
   gap: 7px;
   flex-wrap: wrap;
   margin-bottom: 14px
}

.auth-chip {
   padding: 4px 10px;
   border-radius: 20px;
   font-size: .7rem;
   font-weight: 600;
   border: 1px solid;
   display: flex;
   align-items: center;
   gap: 5px;
   background: var(--auth-chip-wait-bg);
   border-color: var(--auth-chip-wait-bdr);
   color: var(--auth-chip-wait-c)
}

.auth-chip-dot {
   width: 8px;
   height: 8px;
   border-radius: 50%;
   background: currentColor;
   flex-shrink: 0;
   opacity: .65
}

.auth-chip.ok {
   background: var(--auth-chip-ok-bg);
   border-color: var(--auth-chip-ok-bdr);
   color: var(--auth-chip-ok-c)
}

.auth-chip.fail {
   background: var(--auth-chip-fail-bg);
   border-color: var(--auth-chip-fail-bdr);
   color: var(--auth-chip-fail-c)
}

/* ── Biometric card ─────────────────────────────────────────────── */
.auth-bio-card {
   display: flex;
   align-items: center;
   gap: 16px;
   padding: 16px 20px;
   border-radius: 18px;
   cursor: pointer;
   background: var(--auth-bio-bg);
   border: 1px solid var(--auth-bio-bdr);
   transition: all .2s;
   text-decoration: none
}

.auth-bio-card:hover {
   filter: brightness(.97)
}

.auth-bio-icon {
   width: 48px;
   height: 48px;
   border-radius: 14px;
   flex-shrink: 0;
   background: var(--auth-bio-ic-bg);
   display: flex;
   align-items: center;
   justify-content: center
}

.auth-bio-icon svg {
   width: 26px;
   height: 26px;
   fill: none;
   stroke: var(--auth-accent);
   stroke-width: 2;
   stroke-linecap: round
}

.auth-bio-title {
   font-size: .88rem;
   font-weight: 700;
   color: var(--auth-bio-title);
   display: block
}

.auth-bio-sub {
   font-size: .75rem;
   color: var(--auth-bio-sub);
   display: block;
   margin-top: 2px
}

.auth-bio-chevron svg {
   width: 18px;
   height: 18px;
   fill: none;
   stroke: var(--auth-bio-chevron);
   stroke-width: 2;
   stroke-linecap: round;
   margin-left: auto
}

/* ── Camera ─────────────────────────────────────────────────────── */
.auth-cam-wrap {
   position: relative;
   border-radius: 14px;
   overflow: hidden;
   background: #000;
   aspect-ratio: 4/3;
   margin-bottom: 14px
}

.auth-cam-wrap video {
   width: 100%;
   height: 100%;
   object-fit: cover;
   display: block
}

.auth-cam-overlay {
   position: absolute;
   inset: 0;
   display: flex;
   align-items: center;
   justify-content: center;
   pointer-events: none
}

.auth-cam-oval {
   width: 120px;
   height: 150px;
   border-radius: 50%;
   border: 2px solid rgba(157, 143, 248, .85);
   box-shadow: 0 0 0 9999px var(--auth-cam-overlay)
}

.auth-cam-tip {
   position: absolute;
   bottom: 12px;
   left: 0;
   right: 0;
   text-align: center;
   font-size: .72rem;
   color: rgba(255, 255, 255, .65)
}

.auth-cam-wrap canvas {
   display: none
}

/* ── 2FA inline panel ───────────────────────────────────────────── */
.auth-twofa-panel {
   overflow: hidden;
   max-height: 0;
   opacity: 0;
   transition: max-height .4s cubic-bezier(.16, 1, .3, 1), opacity .3s
}

.auth-twofa-panel.open {
   max-height: 280px;
   opacity: 1
}

/* ── OTP digits ─────────────────────────────────────────────────── */
.auth-otp-row {
   display: flex;
   gap: 7px;
   justify-content: center;
   margin: 12px 0 6px
}

.auth-otp-d {
   width: 44px;
   height: 52px;
   text-align: center;
   font-size: 1.3rem;
   font-weight: 700;
   background: var(--auth-otp-bg);
   border: 1.5px solid var(--auth-otp-bdr);
   border-radius: 10px;
   font-family: var(--font-sans);
   color: var(--auth-otp-text);
   outline: none;
   transition: border-color .15s, transform .1s;
   caret-color: var(--auth-accent)
}

.auth-otp-d:focus {
   border-color: var(--auth-otp-bdr-f);
   transform: scale(1.04)
}

.auth-otp-d.filled {
   border-color: var(--auth-otp-bdr-fill)
}

.auth-otp-label {
   text-align: center;
   font-size: .74rem;
   font-weight: 600;
   color: var(--auth-label);
   letter-spacing: .25px;
   margin-bottom: 12px
}

.auth-otp-timer {
   text-align: center;
   font-size: .72rem;
   color: var(--auth-countdown-c);
   margin: 6px 0 20px
}

.auth-otp-timer b {
   color: var(--auth-countdown-bold);
   font-weight: 700
}

.auth-otp-timer b.urgent {
   color: var(--auth-countdown-urg)
}

/* ── Backup code field ──────────────────────────────────────────── */
.auth-backup-field {
   width: 100%;
   padding: 14px;
   background: var(--auth-backup-bg);
   border: 1.5px solid var(--auth-backup-bdr);
   border-radius: 14px;
   font-family: var(--font-sans);
   font-size: 1.1rem;
   font-weight: 700;
   color: var(--auth-backup-text);
   outline: none;
   text-align: center;
   letter-spacing: 4px;
   text-transform: uppercase;
   transition: border-color .15s
}

.auth-backup-field:focus {
   border-color: var(--auth-accent)
}

.auth-backup-field::placeholder {
   letter-spacing: 1px;
   font-size: .85rem;
   font-weight: 400;
   text-transform: none;
   color: var(--auth-input-hint)
}

/* ── Shield icon (2FA page) ─────────────────────────────────────── */
.auth-shield-wrap {
   width: 64px;
   height: 64px;
   border-radius: 18px;
   margin: 0 auto 18px;
   background: linear-gradient(135deg, var(--auth-accent), var(--auth-accent-dark));
   display: flex;
   align-items: center;
   justify-content: center;
   box-shadow: 0 12px 30px var(--auth-accent-shadow)
}

.auth-shield-wrap svg {
   width: 30px;
   height: 30px;
   fill: none;
   stroke: #fff;
   stroke-width: 2;
   stroke-linecap: round;
   stroke-linejoin: round
}

/* ── Page head texts ────────────────────────────────────────────── */
.auth-page-head-title {
   font-size: 1.25rem;
   font-weight: 800;
   text-align: center;
   margin-bottom: 6px;
   color: var(--auth-input-text)
}

.auth-page-head-sub {
   font-size: .82rem;
   color: var(--auth-text-sub);
   text-align: center;
   line-height: 1.55
}

/* ── Location warning (new-location 2FA) ────────────────────────── */
.auth-loc-warn {
   display: flex;
   align-items: flex-start;
   gap: 10px;
   padding: 12px 14px;
   background: var(--auth-2fa-warn-bg);
   border: 1px solid var(--auth-2fa-warn-bdr);
   border-radius: 12px;
   color: var(--auth-2fa-warn-c)
}

.auth-loc-warn-icon {
   width: 32px;
   height: 32px;
   border-radius: 8px;
   flex-shrink: 0;
   background: var(--auth-2fa-warn-bg);
   display: flex;
   align-items: center;
   justify-content: center
}

.auth-loc-warn-icon svg {
   width: 16px;
   height: 16px;
   fill: none;
   stroke: currentColor;
   stroke-width: 2;
   stroke-linecap: round
}

.auth-loc-warn-title {
   font-size: .8rem;
   font-weight: 700;
   margin-bottom: 2px
}

.auth-loc-warn-desc {
   font-size: .73rem;
   opacity: .8;
   line-height: 1.4
}

/* ── Shake ──────────────────────────────────────────────────────── */
.auth-shake {
   animation: authShake .44s ease both
}

@keyframes authShake {

   0%,
   100% {
      transform: translateX(0)
   }

   15% {
      transform: translateX(-7px)
   }

   30% {
      transform: translateX(7px)
   }

   45% {
      transform: translateX(-5px)
   }

   60% {
      transform: translateX(5px)
   }

   75% {
      transform: translateX(-3px)
   }

   90% {
      transform: translateX(3px)
   }
}

/* ── Auth responsive ────────────────────────────────────────────── */
@media(max-width:500px) {

   .auth-card-head,
   .auth-card-body {
      padding-left: 20px;
      padding-right: 20px
   }

   .auth-card-foot {
      padding-left: 20px;
      padding-right: 20px
   }

   .auth-otp-d {
      width: 38px;
      height: 46px;
      font-size: 1.1rem
   }

   .auth-brand-title {
      font-size: 2.2rem
   }
}

/* ── Canvas cropper (media-crop.js) ─────────────────────────────── */
.mc-overlay {
   position: fixed;
   inset: 0;
   background: rgba(12, 17, 23, .62);
   display: flex;
   align-items: center;
   justify-content: center;
   z-index: 10050;
   padding: 20px;
   opacity: 0;
   visibility: hidden;
   transition: opacity .16s ease
}

.mc-overlay.mc-show {
   opacity: 1;
   visibility: visible
}

.mc-dialog {
   background: #fff;
   border-radius: 14px;
   width: min(640px, 96vw);
   box-shadow: 0 12px 40px rgba(0, 0, 0, .22);
   display: flex;
   flex-direction: column;
   overflow: hidden;
   font-family: var(--font-sans)
}

.mc-head {
   display: flex;
   align-items: center;
   justify-content: space-between;
   padding: 14px 18px;
   border-bottom: 1px solid #eceff3
}

.mc-title {
   font-weight: 800;
   font-size: 15px;
   color: #151c24
}

.mc-x {
   border: 0;
   background: transparent;
   font-size: 22px;
   line-height: 1;
   cursor: pointer;
   color: #667085;
   width: 30px;
   height: 30px;
   border-radius: 8px
}

.mc-x:hover {
   background: #f3f5f7;
   color: #151c24
}

.mc-tabs {
   display: flex;
   gap: 8px;
   padding: 12px 18px 0;
   flex-wrap: wrap
}

.mc-tab {
   display: inline-flex;
   align-items: center;
   gap: 8px;
   border: 1px solid #dfe5ec;
   background: #fff;
   color: #3a4552;
   border-radius: 9px;
   padding: 7px 12px;
   font-size: 12.5px;
   font-weight: 600;
   cursor: pointer
}

.mc-tab.active {
   border-color: var(--primary, #2563eb);
   color: var(--primary, #2563eb);
   background: #f5f8ff
}

.mc-inc {
   display: inline-flex;
   align-items: center;
   gap: 4px;
   font-size: 11px;
   font-weight: 600;
   color: #667085;
   cursor: pointer
}

.mc-inc input {
   margin: 0
}

.mc-stage-wrap {
   display: flex;
   align-items: center;
   justify-content: center;
   padding: 16px 18px;
   background: #0f141a
}

.mc-stage {
   position: relative;
   overflow: hidden;
   border-radius: 8px;
   background: #000;
   cursor: grab;
   touch-action: none;
   box-shadow: 0 0 0 1px rgba(255, 255, 255, .08);
   max-width: 100%
}

.mc-stage.mc-grabbing {
   cursor: grabbing
}

.mc-img {
   position: absolute;
   left: 0;
   top: 0;
   transform-origin: 0 0;
   user-select: none;
   -webkit-user-drag: none;
   pointer-events: none;
   max-width: none
}

.mc-controls {
   display: flex;
   align-items: center;
   gap: 10px;
   padding: 12px 18px
}

.mc-zoom {
   flex: 0 1 220px;
   accent-color: var(--primary, #2563eb)
}

.mc-zoom-ic {
   color: #98a2b3;
   font-size: 12px
}

.mc-hint {
   margin-left: auto;
   font-size: 11px;
   color: #98a2b3
}

.mc-foot {
   display: flex;
   justify-content: flex-end;
   gap: 10px;
   padding: 12px 18px 16px;
   border-top: 1px solid #eceff3
}

/* ── Video poster grab + per-leg upload progress ─────────────────── */
.ag-media-vid-grab {
   display: flex;
   flex-direction: column;
   gap: 8px
}

.ag-media-vid {
   width: 100%;
   max-height: 200px;
   border-radius: 8px;
   background: #000;
   display: block
}

.ag-media-legs {
   display: flex;
   flex-direction: column;
   gap: 10px;
   margin-top: 14px
}

.ag-media-leg {
   border: 1px solid #e6eaf0;
   border-radius: 10px;
   padding: 10px 12px;
   background: #fff
}

.ag-media-leg-head {
   display: flex;
   align-items: center;
   justify-content: space-between;
   gap: 10px;
   font-size: 12.5px;
   font-weight: 700;
   color: #151c24
}

.ag-media-leg-status {
   font-size: 11.5px;
   font-weight: 600;
   color: #667085
}

.ag-media-leg[data-state="done"] .ag-media-leg-status {
   color: #0a7d33
}

.ag-media-leg[data-state="error"] .ag-media-leg-status {
   color: #c02626
}

.ag-media-leg-bar {
   height: 6px;
   background: #eef1f5;
   border-radius: 6px;
   overflow: hidden;
   margin-top: 8px
}

.ag-media-leg-bar span {
   display: block;
   height: 100%;
   width: 0;
   background: var(--primary, #2563eb);
   transition: width .2s ease
}

.ag-media-leg[data-state="done"] .ag-media-leg-bar span {
   background: #12a150
}

.ag-media-leg[data-state="error"] .ag-media-leg-bar span {
   background: #e5484d
}

.ag-media-leg-retry {
   margin-top: 8px
}

.ag-media-page {
   margin: 0;
   background: #f3f5f7;
   color: #151c24;
   font-family: var(--font-sans);
   overflow: hidden
}

.ag-media-app {
   height: 100vh;
   display: grid;
   grid-template-rows: 56px minmax(0, 1fr)
}

.ag-media-topbar,
.ag-media-brand,
.ag-media-actions {
   display: flex;
   align-items: center
}

.ag-media-topbar {
   background: #fff;
   border-bottom: 1px solid #dfe5ec;
   padding: 0 16px;
   justify-content: space-between;
   gap: 12px
}

.ag-media-brand {
   gap: 10px
}

.ag-media-brand-icon {
   width: 34px;
   height: 34px;
   border-radius: 8px;
   display: grid;
   place-items: center;
   background: #111827;
   color: #fff
}

.ag-media-brand-title,
.ag-media-panel-title {
   font-weight: 850;
   font-size: 14px
}

.ag-media-brand-sub,
.ag-media-panel-sub {
   color: #667085;
   font-size: 11px
}

.ag-media-actions {
   gap: 8px
}

.ag-media-workspace {
   min-height: 0;
   display: grid;
   grid-template-columns: 220px minmax(0, 1fr)318px
}

.ag-media-sidebar,
.ag-media-details {
   background: #fff;
   min-height: 0;
   display: flex;
   flex-direction: column
}

.ag-media-sidebar {
   border-right: 1px solid #dfe5ec
}

.ag-media-details {
   border-left: 1px solid #dfe5ec
}

.ag-media-content {
   min-width: 0;
   min-height: 0;
   display: flex;
   flex-direction: column
}

.ag-media-panel-head {
   padding: 14px;
   border-bottom: 1px solid #dfe5ec
}

.ag-media-nav {
   padding: 10px;
   display: grid;
   gap: 5px
}

.ag-media-nav-btn {
   border: 1px solid transparent;
   background: transparent;
   color: #667085;
   border-radius: 8px;
   padding: 9px 10px;
   display: grid;
   grid-template-columns: 24px minmax(0, 1fr)auto;
   gap: 8px;
   align-items: center;
   text-align: left;
   font-weight: 750
}

.ag-media-nav-btn:hover {
   background: #f8fafc;
   border-color: #dfe5ec;
   color: #151c24
}

.ag-media-nav-btn.active {
   background: #eaf2ff;
   border-color: #cfe0fb;
   color: #2367c9
}

.ag-media-count {
   color: #98a2b3;
   font-size: 11px
}

.ag-media-sidebar-foot {
   margin-top: auto;
   padding: 12px;
   border-top: 1px solid #dfe5ec
}

.ag-media-note {
   background: #f8fafc;
   border: 1px solid #dfe5ec;
   border-radius: 8px;
   padding: 10px;
   color: #667085;
   line-height: 1.45;
   font-size: 12px
}

.ag-media-tabs {
   background: #fff;
   border-bottom: 1px solid #dfe5ec;
   display: flex;
   gap: 3px;
   padding: 0 14px;
   min-height: 46px
}

.ag-media-tab {
   border: 0;
   border-bottom: 2px solid transparent;
   background: transparent;
   padding: 13px 12px 11px;
   color: #667085;
   font-weight: 850
}

.ag-media-tab.active {
   color: #2367c9;
   border-bottom-color: #2367c9
}

.ag-media-filterbar {
   background: #fff;
   border-bottom: 1px solid #dfe5ec;
   padding: 10px 14px;
   display: grid;
   grid-template-columns: minmax(0, 1fr)auto auto;
   gap: 9px;
   align-items: center
}

.ag-media-search {
   border: 1px solid #dfe5ec;
   background: #f8fafc;
   border-radius: 7px;
   display: grid;
   grid-template-columns: 28px minmax(0, 1fr);
   align-items: center;
   padding: 0 9px;
   color: #667085
}

.ag-media-search input {
   border: 0;
   background: transparent;
   outline: 0;
   padding: 9px 0;
   min-width: 0
}

.ag-media-select {
   min-height: 36px;
   border: 1px solid #dfe5ec;
   border-radius: 7px;
   background: #f8fafc;
   color: #151c24;
   padding: 0 9px
}

.ag-media-main-scroll {
   min-height: 0;
   overflow: auto;
   padding: 14px
}

.ag-media-grid {
   display: grid;
   grid-template-columns: repeat(4, minmax(0, 1fr));
   gap: 10px
}

.ag-media-card {
   border: 1px solid #dfe5ec;
   background: #fff;
   border-radius: 8px;
   overflow: hidden;
   text-align: left;
   min-width: 0;
   transition: border-color .15s, box-shadow .15s, transform .15s;
   position: relative
}

.ag-media-card:hover {
   border-color: #2367c9;
   transform: translateY(-1px);
   box-shadow: 0 8px 24px rgba(21, 28, 36, .08)
}

.ag-media-card.selected {
   border-color: #2367c9;
   box-shadow: 0 0 0 3px rgba(35, 103, 201, .12)
}

.ag-media-thumb {
   aspect-ratio: 4/3;
   background: #e7edf4;
   display: grid;
   place-items: center;
   color: #fff;
   position: relative;
   overflow: hidden
}

.ag-media-thumb.portrait {
   aspect-ratio: 3/4
}

.ag-media-thumb img,
.ag-media-preview img {
   width: 100%;
   height: 100%;
   object-fit: cover
}

.ag-media-thumb i {
   font-size: 28px;
   text-shadow: 0 8px 22px rgba(0, 0, 0, .25)
}

.ag-media-type-pill {
   position: absolute;
   top: 7px;
   left: 7px;
   border-radius: 999px;
   background: rgba(255, 255, 255, .92);
   color: #1f2937;
   padding: 4px 7px;
   font-size: 10px;
   font-weight: 850
}

.ag-media-picked {
   position: absolute;
   top: 7px;
   right: 7px;
   width: 24px;
   height: 24px;
   border-radius: 50%;
   display: none;
   place-items: center;
   background: #2367c9;
   color: #fff
}

.ag-media-card.selected .ag-media-picked {
   display: grid
}

.ag-media-card-body {
   padding: 9px;
   display: grid;
   gap: 4px
}

.ag-media-card-body strong,
.ag-media-card-body small {
   white-space: nowrap;
   overflow: hidden;
   text-overflow: ellipsis
}

.ag-media-card-body small {
   color: #667085;
   font-size: 11px
}

.ag-media-pager {
   display: flex;
   justify-content: center;
   gap: 6px;
   padding: 14px 0 4px;
   flex-wrap: wrap
}

.ag-media-upload-layout {
   display: grid;
   grid-template-columns: minmax(0, 1fr)320px;
   gap: 12px;
   align-items: start
}

.ag-media-upload-card,
.ag-media-meta-card,
.ag-media-after-card {
   background: #fff;
   border: 1px solid #dfe5ec;
   border-radius: 8px;
   padding: 14px;
   box-shadow: 0 1px 2px rgba(21, 28, 36, .04)
}

.ag-media-type-grid {
   display: grid;
   grid-template-columns: repeat(4, minmax(0, 1fr));
   gap: 8px;
   margin-bottom: 12px
}

.ag-media-type-card {
   border: 1px solid #dfe5ec;
   background: #f8fafc;
   border-radius: 8px;
   padding: 12px 9px;
   text-align: center;
   color: #667085;
   font-weight: 850
}

.ag-media-type-card i {
   display: block;
   font-size: 21px;
   margin-bottom: 7px;
   color: #2367c9
}

.ag-media-type-card.active {
   border-color: #2367c9;
   background: #eaf2ff;
   color: #2367c9
}

.ag-media-dropzone {
   border: 2px dashed #c7d0dc;
   background: #f8fafc;
   border-radius: 10px;
   min-height: 220px;
   display: grid;
   place-items: center;
   text-align: center;
   padding: 24px;
   color: #667085
}

.ag-media-dropzone.drag {
   border-color: #2367c9;
   background: #eaf2ff
}

.ag-media-dropzone strong {
   color: #151c24;
   display: block;
   margin-bottom: 4px
}

.ag-media-dropzone i {
   font-size: 34px;
   color: #2367c9;
   margin-bottom: 10px
}

.ag-media-file-preview {
   width: 100%;
   display: none;
   grid-template-columns: 150px minmax(0, 1fr);
   gap: 12px;
   align-items: center
}

.ag-media-file-preview.show {
   display: grid
}

.ag-media-file-art {
   height: 120px;
   border-radius: 8px;
   background: linear-gradient(135deg, #1d4ed8, #0891b2);
   display: grid;
   place-items: center;
   color: #fff;
   overflow: hidden
}

.ag-media-file-art img {
   width: 100%;
   height: 100%;
   object-fit: cover
}

.ag-media-progress {
   height: 7px;
   background: #e5e7eb;
   border-radius: 999px;
   overflow: hidden;
   margin-top: 10px
}

.ag-media-progress span {
   display: block;
   width: 0;
   height: 100%;
   background: #2367c9;
   transition: width .35s
}

/* Animated sweep used when there's no real byte-level progress to report
   (a plain fetch-based multipart POST gives no upload-progress events). */
.ag-media-progress.is-indeterminate span {
   width: 40% !important;
   transition: none;
   animation: ag-media-progress-sweep 1.1s ease-in-out infinite
}

@keyframes ag-media-progress-sweep {
   0% {
      margin-left: -40%
   }

   100% {
      margin-left: 100%
   }
}

.ag-media-fields {
   display: grid;
   gap: 10px
}

.ag-media-fields label {
   display: grid;
   gap: 5px;
   color: #667085;
   font-size: 11px;
   font-weight: 850
}

.ag-media-fields input,
.ag-media-fields textarea {
   width: 100%;
   border: 1px solid #dfe5ec;
   background: #f8fafc;
   border-radius: 7px;
   padding: 9px;
   outline: 0;
   color: #151c24
}

.ag-media-fields textarea {
   min-height: 86px;
   resize: vertical
}

.ag-media-cover-zone {
   border: 1px dashed #c7d0dc;
   background: #f8fafc;
   border-radius: 8px;
   min-height: 150px;
   display: grid;
   place-items: center;
   text-align: center;
   color: #667085;
   overflow: hidden
}

.ag-media-cover-zone img {
   width: 100%;
   height: 180px;
   object-fit: cover
}

.ag-media-file-preview.hero {
   grid-template-columns: 1fr
}

.ag-media-file-preview.hero .ag-media-file-art {
   width: 100%;
   height: 320px
}

.ag-media-mobilecrop {
   display: flex;
   align-items: flex-start;
   gap: 8px;
   border: 1px solid #dfe5ec;
   background: #f8fafc;
   border-radius: 8px;
   padding: 10px;
   margin-top: 10px;
   cursor: pointer
}

.ag-media-mobilecrop input {
   margin-top: 3px
}

.ag-media-mobilecrop strong {
   display: block
}

.ag-media-mobilecrop em {
   display: block;
   font-style: normal;
   color: #667085;
   font-size: 11px;
   margin-top: 2px
}

.ag-media-destinations {
   display: grid;
   gap: 8px
}

.ag-media-destinations label {
   border: 1px solid #dfe5ec;
   background: #f8fafc;
   border-radius: 8px;
   padding: 10px;
   display: grid;
   grid-template-columns: 20px minmax(0, 1fr);
   gap: 8px;
   align-items: start
}

.ag-media-destinations strong {
   display: block
}

.ag-media-destinations span span,
.ag-media-detail-desc {
   color: #667085;
   font-size: 11px;
   line-height: 1.4
}

.ag-media-details-scroll {
   min-height: 0;
   overflow: auto;
   padding: 12px;
   display: grid;
   gap: 12px;
   align-content: start
}

.ag-media-preview {
   border: 1px solid #dfe5ec;
   background: #f8fafc;
   border-radius: 8px;
   min-height: 188px;
   overflow: hidden;
   display: grid;
   place-items: center;
   color: #667085
}

.ag-media-preview i {
   font-size: 34px
}

.ag-media-detail-title {
   font-size: 15px;
   font-weight: 850;
   margin-bottom: 4px
}

.ag-media-info-list {
   display: grid;
   gap: 7px
}

.ag-media-info-list div {
   display: flex;
   justify-content: space-between;
   gap: 12px;
   border-bottom: 1px solid #dfe5ec;
   padding-bottom: 7px;
   color: #667085
}

.ag-media-info-list strong {
   color: #151c24;
   font-weight: 800
}

.ag-media-embed {
   overflow: auto
}

.ag-media-embed .ag-media-app {
   height: auto;
   min-height: 100vh;
   display: block
}

.ag-media-embed .ag-media-topbar {
   min-height: 52px;
   position: sticky;
   top: 0;
   z-index: 5
}

.ag-media-embed .ag-media-brand-sub {
   display: none
}

.ag-media-embed .ag-media-embed-head {
   display: flex;
   align-items: stretch;
   gap: 12px;
   background: #fff;
   border-bottom: 1px solid #dfe5ec;
   min-height: 0
}

.ag-media-embed .ag-media-embed-head .ag-media-inline-types {
   flex: 1 1 auto;
   min-width: 0;
   border-bottom: 0
}

.ag-media-embed .ag-media-tabs--embed {
   flex: 0 0 auto;
   align-self: center;
   border-bottom: 0;
   padding: 0 12px 0 0;
   min-height: 0;
   gap: 4px
}

.ag-media-embed .ag-media-filterbar--embed-full {
   width: 100%;
   grid-template-columns: minmax(0, 1fr) auto auto
}

.ag-media-embed .ag-media-content.is-upload .ag-media-filterbar--embed-full {
   display: none
}

.ag-media-embed .ag-media-workspace {
   display: grid;
   grid-template-columns: minmax(0, 1fr);
   grid-template-rows: auto minmax(0, 1fr);
   min-height: calc(100vh - 52px)
}

.ag-media-inline-types {
   background: #fff;
   border-bottom: 1px solid #dfe5ec;
   display: flex;
   gap: 6px;
   overflow-x: auto;
   overscroll-behavior-x: contain;
   padding: 8px 12px;
   scrollbar-width: thin
}

.ag-media-inline-types .ag-media-nav-btn {
   flex: 0 0 auto;
   display: inline-flex;
   min-width: max-content;
   grid-template-columns: none;
   padding: 8px 10px;
   white-space: nowrap
}

.ag-media-inline-types .ag-media-nav-btn i {
   width: 18px;
   text-align: center
}

.ag-media-inline-types .ag-media-count {
   border-left: 1px solid #dfe5ec;
   padding-left: 8px
}

.ag-media-embed .ag-media-content,
.ag-media-embed .ag-media-main-scroll {
   min-height: 0
}

.ag-media-embed .ag-media-main-scroll {
   max-height: none;
   overflow: visible
}

.ag-media-embed .ag-media-grid {
   grid-template-columns: repeat(auto-fill, minmax(175px, 1fr))
}

.ag-media-embed .ag-media-upload-layout {
   grid-template-columns: minmax(0, 1fr) minmax(280px, 340px)
}

.ag-media-embed .ag-media-type-grid {
   display: flex;
   gap: 8px;
   overflow-x: auto;
   padding-bottom: 4px;
   scrollbar-width: thin
}

.ag-media-embed .ag-media-type-card {
   flex: 0 0 132px
}

.ag-media-embed .ag-media-after-card {
   margin-bottom: 16px
}

/* ──────────────────────────────────────────────────────────────
   16. NEWS EDITOR STUDIO LAYOUT
   Base (desktop) rules for the three-column article editor shell.
   The responsive overrides for these same class names already exist
   below, in the @media(max-width:1100px)/(max-width:720px) blocks —
   this section only supplies what was missing: the un-mediaqueried
   defaults those overrides assume.
   ────────────────────────────────────────────────────────────── */
.news-editor {
   display: flex;
   flex-direction: column;
   gap: 16px
}

.news-editor-topbar {
   display: flex;
   align-items: center;
   justify-content: space-between;
   gap: 12px;
   background: #fff;
   padding: 10px;
}

.news-editor-actions {
   display: flex;
   align-items: center;
   gap: 8px
}

.news-editor-layout {
   display: grid;
   grid-template-columns: 220px minmax(0, 1fr) 300px;
   gap: 0;
   align-items: start
}

/* Left column: applied-blocks panel + block palette, merged into one
   continuous card (same treatment as the right column's .news-editor-meta —
   one background, sections divided by a border line, not floating boxes). */
.news-editor-blocks {
   display: flex;
   flex-direction: column;
   position: sticky;
   top: 16px;
   background: var(--bg-surface);
   border: .5px solid var(--border-color);
   border-radius: var(--radius-lg);
   overflow: hidden;
   height: 100%;
}

.news-applied {
   border-bottom: .5px solid var(--border-color)
}

.news-panel-toggle {
   width: 100%;
   display: flex;
   align-items: center;
   justify-content: space-between;
   gap: 8px;
   padding: 10px 12px;
   background: none;
   border: none;
   cursor: pointer;
   font-size: 12.5px;
   font-weight: 700;
   color: var(--text-main)
}

.news-panel-toggle i.fa-chevron-down {
   color: var(--text-muted);
   font-size: 11px
}

.news-applied-list {
   padding: 0 8px 8px;
   max-height: 220px;
   overflow-y: auto
}

.news-empty-small {
   font-size: 12px;
   color: var(--text-muted);
   padding: 6px 4px 10px
}

.news-widget-search {
   padding: 10px;
   border-bottom: .5px solid var(--border-color)
}

.news-widget-search input {
   width: 100%;
   border: 1px solid var(--border-color);
   border-radius: var(--radius-sm);
   padding: 6px 10px;
   font-size: 12.5px;
   background: var(--bg-surface-alt);
   color: var(--text-main)
}

.news-widget-scroll {
   max-height: 440px;
   overflow-y: auto;
   padding: 8px
}

.news-widget-group {
   font-size: 10.5px;
   font-weight: 700;
   text-transform: uppercase;
   letter-spacing: .06em;
   color: var(--text-light);
   padding: 10px 6px 4px
}

.news-widget-item {
   width: 100%;
   display: flex;
   align-items: center;
   gap: 10px;
   padding: 7px 8px;
   border: none;
   background: none;
   border-radius: var(--radius-sm);
   font-size: 13px;
   color: var(--text-main);
   cursor: pointer;
   text-align: left
}

.news-widget-item:hover {
   background: var(--bg-surface-alt)
}

.news-widget-item[hidden] {
   display: none
}

.news-widget-item span {
   width: 26px;
   height: 26px;
   flex-shrink: 0;
   text-align: center;
   color: var(--text-muted);
   font-weight: 700;
   font-size: 12px;
   background: #eef2ff;
   color: #1a6fc4;
   display: grid;
   place-items: center;
}

/* Center column */
.news-editor-main {
   min-width: 0
}

.news-editor-row {
   display: flex;
   align-items: center;
   gap: 10px;
   margin-bottom: 10px
}

.news-editor-row label {
   font-size: 12.5px;
   font-weight: 600;
   color: var(--text-muted);
   flex-shrink: 0;
   width: 64px
}

.news-editor-accent-row label {
   color: var(--primary)
}

.news-editor-toolbar {
   display: flex;
   align-items: center;
   gap: 4px;
   flex-wrap: wrap;
   padding: 6px 0 0
}

.news-editor-toolbar button {
   border: none;
   background: none;
   padding: 6px 10px;
   border-radius: var(--radius-sm);
   font-size: 12.5px;
   color: var(--text-main);
   cursor: pointer;
   display: flex;
   align-items: center;
   gap: 6px
}

.news-editor-toolbar button:hover:not([disabled]) {
   background: var(--bg-surface)
}

.news-editor-toolbar button[disabled] {
   opacity: .35;
   cursor: not-allowed
}

/* Cap reading width on wide viewports (1800px+ this app is often run at)
   — a block editor's text column stays comfortable to read/write in even
   though .news-editor-main itself still fills the grid's flexible center
   column, so the page card/tags don't stretch edge-to-edge. */
.news-editor-page,
.news-tags-row {
   /* max-width: 920px; */
   margin-left: auto;
   margin-right: auto
}

/* One unified center card, same border/radius language as the left/right
   panels — so all three columns read as one page, not three disconnected
   boxes. Two zones inside it, no gap between them: a white "fields" header
   (Category/Subtitle/Title/Slug + toolbar) flowing directly into a gray
   "page mat" zone, matching the left/right panels' white so the header
   band feels continuous across the whole layout. */
.news-editor-page {
   border: .5px solid var(--border-color);
   border-top: none;
   border-radius: 0 0 var(--radius-lg) var(--radius-lg);
   overflow: hidden;
   margin-bottom: 16px
}

.news-editor-fields {
   background: var(--bg-surface);
   padding: 14px 16px 4px
}

.news-editor-fields .news-editor-row {
   margin-bottom: 10px
}

/* Gray "page mat": generous padding around the canvas so the white page
   floats centered on it — the Microsoft Word canvas-on-desktop look. */
.news-editor-canvas-wrap {
   background: var(--bg-surface-alt);
   padding: 32px
}

.news-editor-canvas {
   background: var(--bg-surface);
   border: .5px solid var(--border-color);
   border-radius: var(--radius-md);
   box-shadow: 0 1px 3px rgba(0, 0, 0, .06);
   padding: 32px 40px;
   min-height: 320px;
   max-width: 760px;
   margin: 0 auto
}

.news-editor-footer {
   display: flex;
   justify-content: flex-end;
   max-width: 760px;
   margin: 0 auto;
   padding: 8px 0 0;
   font-size: 12px;
   color: var(--text-muted)
}

/* Flat bar pinned to the bottom of the screen while scrolling — not
   another floating rounded card like .news-editor-page, just a plain
   divided strip, the same "always there, no fuss" idea as a toolbar. */
.news-tags-row {
   position: sticky;
   bottom: 0;
   z-index: 5;
   margin-top: 16px;
   background: var(--bg-surface);
   border-top: .5px solid var(--border-color);
   padding: 12px 16px
}

.news-tags-row label {
   display: block;
   font-size: 12.5px;
   font-weight: 600;
   color: var(--text-muted);
   margin-bottom: 6px
}

/* Sits outside the per-page pane (see editor.php) so switching pages
   never hides it — the shared tab strip must survive its own tab
   switching. Visually capped to the page card directly below it: same
   white background, rounded top corners, no bottom margin, so the two
   read as one continuous card even though they're separate elements. */
.news-serial-tabbar {
   display: flex;
   align-items: center;
   gap: 4px;
   margin: 0 auto;
   padding: 6px 16px 0;
   background: var(--bg-surface);
   border: .5px solid var(--border-color);
   border-bottom: 1px solid var(--border-color);
   border-radius: var(--radius-lg) var(--radius-lg) 0 0;
   overflow-x: auto
}

.news-serial-tab {
   display: flex;
   align-items: center;
   gap: 6px;
   padding: 8px 12px;
   border: none;
   background: none;
   font-size: 12.5px;
   font-weight: 600;
   color: var(--text-muted);
   cursor: pointer;
   white-space: nowrap;
   border-bottom: 2px solid transparent;
   margin-bottom: -1px
}

.news-serial-tab:hover {
   color: var(--text-main)
}

.news-serial-tab.active {
   color: var(--primary);
   border-bottom-color: var(--primary)
}

.news-serial-tab-close {
   margin-left: 2px;
   color: var(--text-light);
   font-size: 13px
}

.news-serial-tab-close:hover {
   color: var(--danger)
}

.news-serial-add-btn {
   width: 26px;
   height: 26px;
   border-radius: var(--radius-sm);
   border: 1px dashed var(--border-color);
   background: none;
   color: var(--text-muted);
   cursor: pointer;
   flex-shrink: 0;
   display: flex;
   align-items: center;
   justify-content: center;
   margin-bottom: 6px
}

.news-serial-add-btn:hover {
   border-color: var(--primary);
   color: var(--primary)
}

.news-serial-page-title {
   flex: 1;
   border: 1px solid var(--border-color);
   border-radius: var(--radius-sm);
   padding: 6px 10px;
   font-size: 13px
}

/* Right column: one continuous card of collapsible metadata sections,
   divided by border lines rather than each section being its own
   floating card — a merged panel reads as one coherent sidebar instead
   of a stack of unrelated boxes. */
.news-editor-meta {
   display: flex;
   flex-direction: column;
   position: sticky;
   top: 16px;
   background: var(--bg-surface);
   border: .5px solid var(--border-color);
   border-radius: var(--radius-lg);
   overflow: hidden
}

.news-meta-section {
   border-bottom: .5px solid var(--border-color)
}

.news-meta-section:last-child {
   border-bottom: none
}

.news-meta-head {
   width: 100%;
   display: flex;
   align-items: center;
   justify-content: space-between;
   gap: 8px;
   padding: 12px 14px;
   background: none;
   border: none;
   cursor: pointer;
   font-size: 13px;
   font-weight: 700;
   color: var(--text-main)
}

.news-meta-head i.fa-chevron-down {
   color: var(--text-muted);
   font-size: 11px
}

.news-meta-body {
   padding: 0 14px 14px;
   display: flex;
   flex-direction: column;
   gap: 10px
}

.news-meta-body[hidden] {
   display: none
}

.news-meta-body label {
   font-size: 12px;
   font-weight: 600;
   color: var(--text-muted)
}

/* .news-check {
   display: flex;
   align-items: center;
   gap: 8px;
   font-size: 13px;
   font-weight: 500;
   color: var(--text-main);
   padding: 6px 0;
   cursor: pointer
} */

.news-check input[type="checkbox"] {
   width: 16px;
   height: 16px;
   cursor: pointer;
   accent-color: var(--primary)
}

.news-featured-drop {
   display: flex;
   flex-direction: column;
   align-items: center;
   justify-content: center;
   gap: 6px;
   width: 100%;
   border: 2px dashed var(--border-color);
   border-radius: var(--radius-md);
   background: var(--bg-surface-alt);
   padding: 20px 10px;
   cursor: pointer;
   color: var(--text-muted);
   font-size: 12.5px;
   text-align: center
}

.news-featured-drop img {
   width: 100%;
   max-height: 140px;
   object-fit: cover;
   border-radius: 8px
}

.news-featured-drop strong {
   font-size: 12px;
   font-weight: 600
}

.news-featured-drop:hover {
   border-color: var(--primary);
   color: var(--text-main)
}

/* ──────────────────────────────────────────────────────────────
   17. NEWS CONTENT-TYPE SELECTOR
   Base (desktop) rules — same situation as §16: the responsive
   overrides for these class names already exist below, the base
   rules didn't.
   ────────────────────────────────────────────────────────────── */
.news-selector-shell {
   display: grid;
   grid-template-columns: minmax(0, 1fr) 300px;
   gap: 20px;
   align-items: start
}

.news-selector-main {
   display: flex;
   flex-direction: column;
   gap: 20px
}

.news-selector-topbar {
   display: flex;
   align-items: center;
   justify-content: space-between;
   gap: 12px
}

.news-selector-brand {
   display: flex;
   align-items: center
}

.news-back-btn {
   color: var(--text-muted);
   display: flex;
   align-items: center
}

.news-back-btn:hover {
   color: var(--text-main)
}

.news-selector-mark {
   width: 40px;
   height: 40px;
   border-radius: var(--radius-md);
   background: var(--primary);
   color: var(--text-white);
   display: flex;
   align-items: center;
   justify-content: center;
   font-weight: 700;
   font-size: 16px;
   flex-shrink: 0;
   margin-right: 12px
}

.news-selector-brand-title {
   font-weight: 700;
   font-size: 14px;
   color: var(--text-main)
}

.news-selector-brand-sub {
   font-size: 12px;
   color: var(--text-muted)
}

.news-selector-hero {
   flex: 1;
   display: flex;
   align-items: center;
   justify-content: center;
   background:
      radial-gradient(circle at 50% 0%, rgba(37, 99, 235, .07), transparent 60%),
      var(--bg-surface);
   border: .5px solid var(--border-color);
   border-radius: var(--radius-xl);
   padding: 64px 24px;
   min-height: 400px
}

.news-selector-hero-inner {
   max-width: 780px;
   width: 100%;
   text-align: center;
   margin: 0 auto
}

.news-selector-spark {
   width: 84px;
   height: 84px;
   margin: 0 auto 22px;
   border-radius: var(--radius-full);
   background: conic-gradient(from 45deg, #2563eb, #7c3aed, #d97706, #0d9488, #2563eb);
   display: flex;
   align-items: center;
   justify-content: center;
   position: relative;
   box-shadow: 0 8px 28px rgba(37, 99, 235, .22)
}

.news-selector-spark::before {
   content: '';
   position: absolute;
   inset: 4px;
   border-radius: inherit;
   background: var(--bg-surface)
}

.news-selector-spark i {
   position: relative;
   color: var(--primary);
   font-size: 28px
}

.news-selector-hero h1 {
   font-size: 36px;
   font-weight: 800;
   letter-spacing: -.01em;
   margin: 0 0 10px;
   color: var(--text-main)
}

.news-selector-hero p {
   font-size: 14.5px;
   color: var(--text-muted);
   margin: 0 0 34px
}

.news-create-grid {
   display: grid;
   grid-template-columns: repeat(4, minmax(0, 1fr));
   gap: 12px;
   text-align: left
}

.news-create-card {
   display: flex;
   flex-direction: column;
   gap: 12px;
   padding: 22px;
   border: 1px solid var(--border-color);
   border-radius: var(--radius-lg);
   background: var(--bg-surface);
   cursor: pointer;
   transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
   text-align: left;
   min-height: 172px
}

.news-create-card:hover:not(.disabled) {
   border-color: var(--primary);
   box-shadow: var(--shadow-md);
   transform: translateY(-2px)
}

.news-create-card.active {
   border-color: var(--primary);
   box-shadow: 0 0 0 3px var(--primary-light)
}

.news-create-card.disabled {
   cursor: not-allowed;
   opacity: .55
}

.news-create-icon {
   width: 42px;
   height: 42px;
   border-radius: var(--radius-md);
   display: flex;
   align-items: center;
   justify-content: center;
   font-size: 17px;
   color: #fff
}

.news-create-icon.blue {
   background: #2563eb
}

.news-create-icon.amber {
   background: #d97706
}

.news-create-icon.violet {
   background: #7c3aed
}

.news-create-icon.teal {
   background: #0d9488
}

.news-create-title {
   display: block;
   font-weight: 700;
   font-size: 14.5px;
   color: var(--text-main);
   margin-bottom: 4px
}

.news-create-desc {
   display: block;
   font-size: 12.5px;
   color: var(--text-muted);
   line-height: 1.55
}

.news-create-status {
   display: flex;
   align-items: center;
   gap: 5px;
   font-size: 11px;
   font-weight: 600;
   color: var(--success);
   margin-top: auto
}

.news-create-card.disabled .news-create-status {
   color: var(--text-light)
}

.news-chat-composer {
   background: var(--bg-surface);
   border: .5px solid var(--border-color);
   border-radius: var(--radius-xl);
   padding: 16px 20px;
   box-shadow: var(--shadow-sm)
}

.news-prompt-row {
   display: flex;
   align-items: center;
   gap: 10px
}

.news-prompt-icon {
   width: 32px;
   height: 32px;
   border-radius: var(--radius-md);
   background: var(--bg-surface-alt);
   display: flex;
   align-items: center;
   justify-content: center;
   color: var(--text-muted);
   flex-shrink: 0
}

.news-prompt-input {
   flex: 1;
   border: none;
   resize: none;
   background: none;
   font-size: 13.5px;
   font-family: var(--font-sans);
   padding: 6px 0;
   min-height: 20px;
   max-height: 120px;
   color: var(--text-main)
}

.news-prompt-input:focus {
   outline: none
}

.news-send-btn {
   width: 34px;
   height: 34px;
   border-radius: var(--radius-full);
   background: var(--primary);
   color: var(--text-white);
   border: none;
   display: flex;
   align-items: center;
   justify-content: center;
   cursor: pointer;
   flex-shrink: 0
}

.news-send-btn:hover {
   background: var(--primary-hover)
}

.news-composer-hint {
   font-size: 11.5px;
   color: var(--text-light);
   padding: 10px 2px 0
}

.news-history {
   display: flex;
   flex-direction: column;
   background: var(--bg-surface);
   border: .5px solid var(--border-color);
   border-radius: var(--radius-xl);
   padding: 16px;
   min-height: 360px
}

.news-history-head {
   display: flex;
   align-items: center;
   justify-content: space-between;
   margin-bottom: 4px
}

.news-history-title {
   font-weight: 700;
   font-size: 13px;
   color: var(--text-main)
}

.news-history-empty {
   flex: 1;
   display: flex;
   flex-direction: column;
   align-items: center;
   justify-content: center;
   text-align: center;
   gap: 10px;
   color: var(--text-muted);
   font-size: 12.5px;
   padding: 20px 10px
}

.news-history-empty i {
   font-size: 22px;
   color: var(--text-light)
}

@media(max-width:1100px) {
   .news-selector-shell {
      grid-template-columns: 1fr
   }

   .news-history {
      display: none
   }

   .news-create-grid {
      grid-template-columns: repeat(2, minmax(0, 1fr))
   }

   .news-editor-layout {
      grid-template-columns: 180px minmax(0, 1fr)
   }

   .news-editor-meta {
      display: none
   }

   .ag-media-workspace {
      grid-template-columns: 190px minmax(0, 1fr)
   }

   .ag-media-details {
      display: none
   }

   .ag-media-grid {
      grid-template-columns: repeat(3, minmax(0, 1fr))
   }

   .ag-media-upload-layout {
      grid-template-columns: 1fr
   }

   .ag-media-embed .ag-media-upload-layout {
      grid-template-columns: 1fr
   }
}

@media(max-width:720px) {
   .news-selector-shell {
      display: block;
      padding: 12px
   }

   .news-selector-main {
      display: block
   }

   .news-selector-hero h1 {
      font-size: 38px
   }

   .news-create-grid {
      grid-template-columns: 1fr;
      margin-top: 30px
   }

   .news-editor {
      height: auto;
      overflow: visible
   }

   .news-editor-layout {
      display: block
   }

   .news-editor-blocks {
      display: none
   }

   .news-editor-topbar {
      height: auto;
      align-items: flex-start;
      flex-wrap: wrap;
      padding: 10px
   }

   .ag-media-page {
      overflow: auto
   }

   .ag-media-app {
      height: auto;
      min-height: 100vh;
      display: block
   }

   .ag-media-workspace {
      display: block
   }

   .ag-media-sidebar {
      display: none
   }

   .ag-media-filterbar {
      grid-template-columns: 1fr
   }

   .ag-media-grid {
      grid-template-columns: repeat(2, minmax(0, 1fr))
   }

   .ag-media-type-grid {
      grid-template-columns: repeat(2, minmax(0, 1fr))
   }

   .ag-media-embed .ag-media-topbar {
      align-items: flex-start;
      height: auto;
      flex-wrap: wrap;
      padding: 8px 10px
   }

   .ag-media-embed .ag-media-actions {
      width: 100%;
      justify-content: flex-end
   }

   .ag-media-embed .ag-media-filterbar,
   .ag-media-embed .ag-media-filterbar--embed-full {
      grid-template-columns: 1fr
   }

   .ag-media-embed .ag-media-embed-head {
      flex-direction: column;
      align-items: stretch
   }

   .ag-media-embed .ag-media-tabs--embed {
      justify-content: flex-end;
      padding: 0 12px 8px
   }
}

/* ══════════════════════════════════════════════════════════
   News editor — real responsive stacking, not the block-palette/
   meta-sidebar display:none above. Hiding Publish/Writer/Article Flags/
   Featured Image/Excerpt entirely on a tablet made them unreachable, not
   responsive — this overrides that (later in the cascade wins) so
   everything stays usable, just stacked into one column.
══════════════════════════════════════════════════════════ */
/* Hidden on desktop — the sidebar is always visible there, no toggle
   needed. Declared before the media query below so its display:inline-flex
   can actually win at narrow widths instead of losing a same-specificity,
   later-wins tie. */
.news-blocks-toggle-btn {
   display: none
}

/* Hidden unconditionally, same reasoning as the toggle button above: with
   no rule outside the media query, this <div> defaulted to the UA
   stylesheet's display:block, and as a direct child of .news-editor-layout
   (display:grid) an unstyled block-level sibling becomes an implicit grid
   item — it silently ate the first grid-template-columns track at every
   width, shoving .news-editor-blocks/.news-editor-main/.news-editor-meta
   each one column late. */
.news-blocks-backdrop {
   display: none
}

@media (max-width: 1100px) {
   .news-editor-layout {
      display: flex;
      flex-direction: column
   }

   /* .news-editor-blocks is handled separately below — a slide-in drawer,
      not stacked full-width, since it was pushing the actual content (the
      thing the user opened the editor to reach) below a whole screen's
      worth of block-palette buttons first. */
   .news-editor-meta {
      display: flex;
      flex-direction: column;
      position: static;
      top: auto;
      width: 100%
   }

   .news-widget-scroll {
      max-height: 260px
   }

   .news-blocks-toggle-btn {
      display: inline-flex
   }

   .news-editor-blocks {
      position: fixed;
      top: 0;
      bottom: 0;
      left: 0;
      z-index: 1200;
      width: 300px;
      max-width: 85vw;
      height: 100vh;
      border-radius: 0;
      transform: translateX(-100%);
      transition: transform .22s ease;
      box-shadow: var(--shadow-xl)
   }

   .news-editor-blocks.show {
      transform: translateX(0)
   }

   .news-blocks-backdrop {
      display: none;
      position: fixed;
      inset: 0;
      background: rgba(15, 23, 42, .45);
      z-index: 1100
   }

   .news-blocks-backdrop.show {
      display: block
   }
}

@media (max-width: 720px) {
   .news-editor-topbar {
      flex-wrap: wrap;
      height: auto;
      padding: 10px
   }

   .news-editor-fields {
      padding: 10px 12px 4px
   }

   .news-editor-canvas-wrap {
      padding: 16px
   }

   .news-editor-canvas {
      padding: 16px 18px
   }

   .news-editor-row {
      flex-wrap: wrap
   }

   .news-editor-row label {
      width: 100%
   }

   .news-serial-tabbar {
      padding: 6px 12px 0
   }
}

/* ══════════════════════════════════════════════════════════
   Upload Page — 3-column Screen 1 layout
══════════════════════════════════════════════════════════ */

.ag-upload-3col-wrap {
   padding: 20px;
   max-width: 1400px;
   margin: 0 auto
}

.ag-upload-3col {
   display: grid;
   grid-template-columns: 300px minmax(0, 1fr) 280px;
   gap: 16px;
   align-items: start
}

.ag-upload-col {
   background: #fff;
   border: 1px solid #dfe5ec;
   border-radius: 10px;
   padding: 16px;
   box-shadow: 0 1px 3px rgba(21, 28, 36, .05)
}

.ag-upload-col-head {
   font-size: 12px;
   font-weight: 850;
   color: #667085;
   text-transform: uppercase;
   letter-spacing: .5px;
   margin-bottom: 10px;
   display: flex;
   align-items: center;
   gap: 6px
}

.ag-upload-col-head i {
   color: #2367c9
}

.ag-upload-col-sub {
   font-weight: 400;
   text-transform: none;
   letter-spacing: 0;
   font-size: 11px;
   margin-left: 4px;
   color: #9aa5b1
}

/* ── Column 1: Featured image dropzone ── */

.ag-featured-dropzone {
   border: 2px dashed #c7d0dc;
   background: #f8fafc;
   border-radius: 10px;
   min-height: 260px;
   display: flex;
   align-items: center;
   justify-content: center;
   text-align: center;
   cursor: pointer;
   overflow: hidden;
   position: relative;
   transition: border-color .2s, background .2s
}

.ag-featured-dropzone:hover,
.ag-featured-dropzone.drag {
   border-color: #2367c9;
   background: #eaf2ff
}

.ag-featured-prompt {
   display: flex;
   flex-direction: column;
   align-items: center;
   gap: 6px;
   padding: 24px;
   color: #667085
}

.ag-featured-prompt i {
   font-size: 32px;
   color: #2367c9
}

.ag-featured-prompt strong {
   color: #151c24
}

.ag-featured-prompt span {
   font-size: 11px
}

.ag-featured-preview {
   display: none;
   width: 100%;
   height: 100%
}

.ag-featured-preview.show {
   display: block
}

.ag-featured-preview img {
   width: 100%;
   height: auto;
   display: block;
   max-height: 420px;
   object-fit: contain;
   background: #0a0a0a
}

.ag-featured-actions {
   display: flex;
   flex-direction: column;
   gap: 8px;
   margin-top: 10px
}

.ag-featured-actions-row {
   display: flex;
   gap: 8px
}

/* ── Inline crop overlay ── */

.ag-crop-overlay {
   margin-top: 10px;
   border: 1px solid #dfe5ec;
   border-radius: 10px;
   overflow: hidden;
   background: #0a0a0a
}

.ag-crop-stage {
   position: relative;
   width: 100%;
   /* height controlled by JS to match image */
   overflow: hidden;
   min-height: 200px;
   cursor: grab
}

.ag-crop-stage.dragging {
   cursor: grabbing
}

.ag-crop-frame {
   position: relative;
   width: 100%;
   height: 100%;
   overflow: hidden
}

.ag-crop-frame img {
   position: absolute;
   transform-origin: center center;
   user-select: none;
   max-width: none
}

/* semi-transparent masks around the 4:5 aperture */
.ag-crop-mask {
   position: absolute;
   background: rgba(0, 0, 0, .55);
   pointer-events: none;
   z-index: 2
}

.ag-crop-mask--top {
   top: 0;
   left: 0;
   right: 0
}

.ag-crop-mask--bottom {
   bottom: 0;
   left: 0;
   right: 0
}

.ag-crop-mask--left {
   left: 0
}

.ag-crop-mask--right {
   right: 0
}

.ag-crop-border {
   position: absolute;
   z-index: 3;
   pointer-events: none;
   border: 2px solid rgba(255, 255, 255, .7);
   outline: 1px solid rgba(0, 0, 0, .3)
}

.ag-crop-controls {
   display: flex;
   align-items: center;
   gap: 10px;
   padding: 10px 14px;
   background: #18202b
}

.ag-crop-controls i {
   color: #9aa5b1;
   font-size: 13px
}

.ag-crop-controls input[type=range] {
   flex: 1;
   accent-color: #2367c9
}

/* ── Crop aspect-ratio switch ── */

.ag-crop-ratio-switch {
   display: flex;
   gap: 6px
}

.ag-crop-ratio-btn {
   flex: 1;
   padding: 6px 8px;
   border: 1px solid rgba(15, 23, 42, .18);
   border-radius: 6px;
   background: var(--bg-surface);
   color: var(--text-muted);
   font: 600 11.5px var(--font-sans, sans-serif);
   cursor: pointer;
   transition: background .15s, color .15s, border-color .15s
}

.ag-crop-ratio-btn:hover {
   border-color: var(--primary);
   color: var(--text-main)
}

.ag-crop-ratio-btn.active {
   background: var(--primary);
   border-color: var(--primary);
   color: #fff
}

/* ── Column 3: Content file preview ── */

.ag-upload-col--preview {
   transition: opacity .2s
}

.ag-content-preview {
   border: 1px solid #dfe5ec;
   border-radius: 8px;
   overflow: hidden;
   background: #f1f5f9;
   display: grid;
   place-items: center;
   min-height: 160px
}

.ag-content-preview video,
.ag-content-preview audio {
   width: 100%;
   display: block
}

.ag-content-preview img {
   width: 100%;
   height: auto;
   display: block
}

.ag-content-preview img.is-landscape {
   height: 200px;
   object-fit: cover
}

.ag-content-preview i {
   font-size: 36px;
   color: #9aa5b1
}

.ag-content-preview-meta {
   margin-top: 8px;
   font-size: 11px;
   color: #667085;
   line-height: 1.5
}

/* ── Column 2: Content file dropzone ── */

.ag-content-dropzone {
   border: 2px dashed #c7d0dc;
   background: #f8fafc;
   border-radius: 10px;
   min-height: 100px;
   display: flex;
   align-items: center;
   justify-content: center;
   text-align: center;
   cursor: pointer;
   padding: 16px;
   transition: border-color .2s, background .2s
}

.ag-content-dropzone:hover,
.ag-content-dropzone.drag {
   border-color: #2367c9;
   background: #eaf2ff
}

.ag-content-prompt {
   display: flex;
   flex-direction: column;
   align-items: center;
   gap: 5px;
   color: #667085
}

.ag-content-prompt i {
   font-size: 24px;
   color: #2367c9
}

.ag-content-prompt strong {
   color: #151c24;
   font-size: 13px
}

.ag-content-prompt span {
   font-size: 11px
}

/* ── Column 2: Styled file-picker button row (replaces old dropzone) ── */

.ag-content-file-row {
   display: flex;
   align-items: center;
   gap: 8px;
   padding: 8px 0;
   flex-wrap: wrap
}

.ag-content-file-btn {
   flex-shrink: 0;
   white-space: nowrap
}

.ag-content-file-name {
   flex: 1;
   font-size: 12.5px;
   color: #5a6474;
   overflow: hidden;
   text-overflow: ellipsis;
   white-space: nowrap;
   min-width: 0
}

.ag-content-file-clear {
   flex-shrink: 0;
   color: #9aa5b1;
   padding: 4px 7px
}

.ag-content-file-clear:hover {
   color: #c02626
}

/* ══════════════════════════════════════════════════════════
   Upload Page — Screen 2 (Read-only Review)
══════════════════════════════════════════════════════════ */

.ag-review-screen {
   padding: 20px;
   max-width: 1000px;
   margin: 0 auto
}

.ag-review-grid {
   display: grid;
   grid-template-columns: minmax(0, 1fr) 320px;
   gap: 20px;
   align-items: start
}

.ag-review-meta {
   background: #fff;
   border: 1px solid #dfe5ec;
   border-radius: 10px;
   padding: 24px;
   box-shadow: 0 1px 3px rgba(21, 28, 36, .05)
}

.ag-review-success-badge {
   display: inline-flex;
   align-items: center;
   gap: 7px;
   background: #ecfdf5;
   color: #065f46;
   border: 1px solid #a7f3d0;
   border-radius: 999px;
   padding: 5px 14px;
   font-size: 12px;
   font-weight: 800;
   margin-bottom: 14px
}

.ag-review-success-badge i {
   font-size: 14px
}

.ag-review-title {
   font-size: 20px;
   font-weight: 850;
   color: #151c24;
   margin: 0 0 16px;
   line-height: 1.3
}

.ag-review-info-list .ag-review-info-row {
   display: flex;
   justify-content: space-between;
   gap: 12px;
   padding: 8px 0;
   border-bottom: 1px solid #f1f5f9;
   font-size: 13px;
   color: #667085
}

.ag-review-info-list .ag-review-info-row:last-child {
   border-bottom: 0
}

.ag-review-info-label {
   font-weight: 700;
   min-width: 80px
}

.ag-review-info-value {
   color: #151c24;
   text-align: right;
   word-break: break-word
}

.ag-review-tags {
   display: flex;
   flex-wrap: wrap;
   gap: 5px;
   justify-content: flex-end
}

.ag-review-tag {
   background: #eaf2ff;
   color: #2367c9;
   border-radius: 999px;
   padding: 2px 9px;
   font-size: 11px;
   font-weight: 700
}

.ag-review-actions {
   display: flex;
   gap: 8px;
   margin-top: 20px;
   flex-wrap: wrap
}

/* Review: right column stacked previews */

.ag-review-previews {
   display: grid;
   gap: 14px
}

.ag-review-preview-block {
   background: #fff;
   border: 1px solid #dfe5ec;
   border-radius: 10px;
   overflow: hidden;
   box-shadow: 0 1px 3px rgba(21, 28, 36, .05)
}

.ag-review-preview-label {
   font-size: 11px;
   font-weight: 850;
   color: #667085;
   text-transform: uppercase;
   letter-spacing: .5px;
   padding: 9px 12px;
   border-bottom: 1px solid #f1f5f9
}

.ag-review-preview-box {
   display: grid;
   place-items: center;
   min-height: 120px;
   background: #f1f5f9;
   overflow: hidden
}

.ag-review-preview-box video,
.ag-review-preview-box audio {
   width: 100%;
   display: block
}

.ag-review-preview-box img {
   width: 100%;
   display: block
}

/* Portrait 4:5 featured preview — height auto, constrained */
.ag-review-preview-box--portrait img {
   height: auto;
   max-height: 380px;
   object-fit: contain;
   background: #0a0a0a
}

.ag-review-preview-box i {
   font-size: 36px;
   color: #9aa5b1
}

/* ══════════════════════════════════════════════════════════
   Picker modal — 2-column upload grid
══════════════════════════════════════════════════════════ */

.ag-picker-upload-grid {
   display: grid;
   grid-template-columns: minmax(320px, 400px) minmax(0, 1fr);
   gap: 20px;
   align-items: start;
   padding: 14px
}

.ag-picker-upload-featured,
.ag-picker-upload-right {
   display: grid;
   gap: 10px
}

.ag-featured-dropzone--compact {
   min-height: 340px
}

/* ══════════════════════════════════════════════════════════
   Responsive overrides
══════════════════════════════════════════════════════════ */

@media (max-width: 1100px) {
   .ag-upload-3col {
      grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
   }

   .ag-upload-col--preview {
      grid-column: 1 / -1;
   }
}

@media (max-width: 720px) {
   .ag-upload-3col {
      grid-template-columns: 1fr;
   }

   .ag-review-grid {
      grid-template-columns: 1fr;
   }

   .ag-picker-upload-grid {
      grid-template-columns: 1fr;
   }
}