/* RCorp Command Center — desktop-first, mobile-app aesthetic.
   Persistent left sidebar on desktop (≥1024px), drawer + bottom tabs on mobile.
   Brand tokens match rodriguezcorporation.com. Type: Inter + Cormorant Garamond. */

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:wght@500;600;700&family=Inter:wght@400;500;600;700&display=swap');

/* Canonical RCorp brand tokens — matched to rodriguezcorporation.com. */
:root {
  --rc-navy:      #1A2F4B;
  --rc-navy-2:    #0F2540;
  --rc-navy-3:    #243B5E;
  --rc-gold:      #C9A961;
  --rc-gold-2:    #E5CD9A;
  --rc-gold-deep: #8C7338;
  --rc-cream:     #FAF7F0;
  --rc-paper:     #FFFFFF;
  --rc-line:      #E8E2D7;
  --rc-line-2:    #D6CEBC;

  --ink:        #14181F;
  --ink-2:      #3A3F49;
  --ink-3:      #6B7280;
  --ink-4:      #98A2B3;

  --ok:         #16A34A;
  --warn:       #D97706;
  --bad:        #DC2626;
  --info:       #0EA5E9;

  --rad:        14px;
  --rad-sm:     10px;
  --rad-lg:     20px;
  --shadow-1:   0 1px 0 rgba(20,24,31,0.04), 0 2px 8px rgba(20,24,31,0.05);
  --shadow-2:   0 4px 16px rgba(20,24,31,0.08), 0 1px 0 rgba(20,24,31,0.05);
  --shadow-hi:  0 8px 32px rgba(20,24,31,0.12);

  --sidebar-w:  260px;
  --safe-bottom: env(safe-area-inset-bottom, 0);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; -webkit-text-size-adjust: 100%; }
img, svg { max-width: 100%; display: block; }

body {
  font: 15px/1.55 'Inter', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  color: var(--ink);
  background: var(--rc-cream);
  min-height: 100vh;
}
body.has-shell { padding-bottom: calc(64px + var(--safe-bottom)); }
@media (min-width: 1024px) { body.has-shell { padding-bottom: 0; } }

a { color: var(--info); text-decoration: none; }
a:hover { text-decoration: underline; }
code, .mono { font-family: 'SF Mono', ui-monospace, Menlo, Consolas, monospace; font-size: 12.5px; }
.serif { font-family: 'Cormorant Garamond', Georgia, serif; }
h1, h2, h3 { margin: 0 0 8px; font-family: 'Cormorant Garamond', Georgia, serif; font-weight: 600; letter-spacing: -0.01em; color: var(--rc-navy); }
h1 { font-size: 28px; line-height: 1.15; }
h2 { font-size: 18px; line-height: 1.2; }
h3 { font-size: 16px; line-height: 1.3; }
@media (min-width: 1024px) {
  h1 { font-size: 30px; }
  h2 { font-size: 20px; }
}
p  { margin: 0 0 12px; color: var(--ink-2); }
hr.div { border: 0; border-top: 1px solid var(--rc-line); margin: 16px 0; }

.muted    { color: var(--ink-4); }
.small    { font-size: 13px; }
.tiny     { font-size: 11px; letter-spacing: 0.04em; text-transform: uppercase; color: var(--ink-4); font-weight: 600; }
.text-c   { text-align: center; }
.r        { text-align: right; }
.wrap     { word-break: break-word; white-space: normal; }
.clip     { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

@media (max-width: 1023px) { .desktop-only { display: none !important; } }
@media (min-width: 1024px)  { .mobile-only  { display: none !important; } }

/* ============================================================================
   SHELL — sidebar (desktop) + main
============================================================================ */
.shell { display: block; }
@media (min-width: 1024px) {
  .shell { display: grid; grid-template-columns: var(--sidebar-w) 1fr; min-height: 100vh; }
}

/* ============================================================================
   SIDEBAR (desktop) — persistent navigation rail
============================================================================ */
.sidebar {
  background: var(--rc-navy);
  color: #E2E8F0;
  padding: 18px 14px;
  position: sticky; top: 0; height: 100vh;
  overflow-y: auto;
  display: flex; flex-direction: column;
  border-right: 1px solid #1F2A44;
}

.rail-brand {
  display: flex; align-items: center; gap: 10px;
  padding: 4px 8px 18px;
  color: #fff; text-decoration: none !important;
  border-bottom: 1px solid #1F2A44;
  margin-bottom: 14px;
}
.rail-brand:hover { text-decoration: none; }
.rc-tile-rail {
  width: 36px; height: 36px; border-radius: 9px;
  background: var(--rc-gold); color: var(--rc-navy);
  font-family: 'Cormorant Garamond', Georgia, serif; font-weight: 700; font-size: 15px;
  display: grid; place-items: center;
}
/* Sunburst sigil in the dark sidebar — sized + tinted to stay legible on navy */
.rc-logo-rail { width: 40px; height: 32px; object-fit: contain; filter: brightness(1.1); }
/* Mobile topbar sigil */
.rc-logo-topbar { width: 36px; height: 28px; object-fit: contain; filter: brightness(1.1); }
/* Login-card sigil */
.rc-logo-big { width: 96px; height: 78px; object-fit: contain; margin: 0 auto 14px; display: block; }
.rail-title { font-family: 'Cormorant Garamond'; font-weight: 600; font-size: 16px; letter-spacing: -0.01em; color: #fff; }
.rail-title .accent { color: var(--rc-gold-2); }

.rail-group { margin-bottom: 18px; }
.rail-group.rail-bottom { margin-top: auto; padding-top: 18px; border-top: 1px solid #1F2A44; }
.rail-label {
  font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.1em;
  color: #6B7A98; font-weight: 700; padding: 0 8px 6px;
}

.rail-link {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 10px; border-radius: 8px;
  color: #C7D2E5; text-decoration: none !important;
  font-size: 13.5px; font-weight: 500;
  margin: 1px 0; min-height: 36px;
  transition: background 0.12s, color 0.12s;
}
.rail-link:hover { background: #131D34; color: #fff; }
.rail-link.active { background: var(--rc-navy-3); color: #fff; box-shadow: inset 3px 0 0 var(--rc-gold); }
.rail-link.danger { color: #FCA5A5; }
.rail-link.danger:hover { background: #2A1818; color: #fff; }
.rail-ic { width: 22px; font-size: 16px; text-align: center; line-height: 1; }
.rail-ic-img {
  width: 24px; height: 24px; border-radius: 6px;
  display: grid; place-items: center; overflow: hidden;
  padding: 2px;
}
.rail-ic-img .logo-img { width: 18px; height: 18px; }
.rail-name { flex: 1; }
.rail-pill {
  background: var(--rc-gold); color: var(--rc-navy);
  font-size: 11px; font-weight: 700; padding: 1px 7px; border-radius: 999px;
  min-width: 18px; text-align: center;
}
.rail-pill.bad { background: var(--bad); color: #fff; }
.rail-pill.warn { background: var(--warn); color: #fff; }

.rail-user {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 10px; margin-bottom: 4px;
}
.rail-avatar {
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--rc-gold); color: var(--rc-navy);
  display: grid; place-items: center;
  font-family: 'Cormorant Garamond'; font-weight: 700; font-size: 14px;
}
.rail-who { display: flex; flex-direction: column; line-height: 1.2; }
.rail-who .rail-name { color: #fff; font-size: 13px; font-weight: 600; }
.rail-who .rail-email { color: #6B7A98; font-size: 11px; }

/* Drawer (mobile) uses same .rail-* classes but inverts colors for parchment background */
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0;
  width: min(86%, 320px);
  background: var(--rc-navy); color: #E2E8F0;
  z-index: 100; transform: translateX(100%); transition: transform 0.25s ease-out;
  padding: 16px 14px; overflow-y: auto;
  box-shadow: -8px 0 24px rgba(0,0,0,0.2);
}
.drawer.open { transform: translateX(0); }
.drawer .close {
  position: absolute; top: 12px; right: 12px;
  width: 36px; height: 36px; border-radius: 10px;
  background: transparent; border: 1px solid rgba(255,255,255,0.18); color: #fff; cursor: pointer;
}
.drawer-bg {
  position: fixed; inset: 0; background: rgba(11,18,32,0.6);
  z-index: 90; display: none; opacity: 0; transition: opacity 0.2s;
}
.drawer-bg.open { display: block; opacity: 1; }

/* ============================================================================
   MAIN COLUMN
============================================================================ */
.main { min-width: 0; }   /* prevents grid blowout */

main.wrap {
  max-width: 1200px;
  margin: 0;
  padding: 16px;
}
@media (min-width: 1024px) {
  main.wrap { padding: 28px 36px 48px; max-width: none; }
}

section { margin-bottom: 22px; }
section h2 { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
section h2 .count {
  display: inline-block; background: var(--rc-line); color: var(--ink-3);
  font-family: 'Inter', sans-serif; font-size: 11.5px; font-weight: 700;
  padding: 2px 8px; border-radius: 999px;
}

/* ============================================================================
   MOBILE TOP BAR + BOTTOM NAV
============================================================================ */
.topbar {
  position: sticky; top: 0; z-index: 50;
  background: var(--rc-navy); color: #fff;
  padding: 12px 16px;
  display: flex; align-items: center; justify-content: space-between;
  border-bottom: 2px solid var(--rc-gold);
}
.topbar .brand { display: flex; align-items: center; gap: 8px; }
.topbar .brand a { color: #fff; display: flex; align-items: center; gap: 8px; text-decoration: none; }
.topbar .brand .rc-tile { background: var(--rc-gold); color: var(--rc-navy); font-family: 'Cormorant Garamond'; font-weight: 700; width: 32px; height: 32px; border-radius: 8px; display: grid; place-items: center; font-size: 13px; }
.topbar .brand .title { font-family: 'Cormorant Garamond'; font-weight: 600; font-size: 16px; }
.topbar .brand .title .accent { color: var(--rc-gold-2); }
.icon-btn {
  width: 40px; height: 40px; display: grid; place-items: center;
  background: transparent; border: 1px solid rgba(255,255,255,0.15);
  border-radius: 10px; color: #fff; cursor: pointer; font-size: 18px;
}

.bottom-nav {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 80;
  background: rgba(255,255,255,0.96); backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-top: 1px solid var(--rc-line);
  padding-bottom: var(--safe-bottom);
  display: flex; justify-content: space-around;
}
.bottom-nav a {
  flex: 1; padding: 8px 4px; text-align: center;
  color: var(--ink-3); text-decoration: none;
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  font-size: 10px; font-weight: 600; letter-spacing: 0.02em;
  min-height: 56px; justify-content: center;
}
.bottom-nav a .ic { font-size: 22px; line-height: 1; }
.bottom-nav a.active { color: var(--rc-navy); }

/* ============================================================================
   FLASHES + TOAST
============================================================================ */
.flashes { padding: 12px 16px 0; max-width: 1200px; }
@media (min-width: 1024px) { .flashes { padding: 24px 36px 0; max-width: none; } }
.flash { padding: 11px 16px; border-radius: var(--rad); margin-bottom: 8px; font-size: 14px; font-weight: 500; box-shadow: var(--shadow-1); border: 1px solid; }
.flash.ok    { background: #DCFCE7; color: #15803D; border-color: #BBF7D0; }
.flash.error { background: #FEE2E2; color: #B91C1C; border-color: #FECACA; }
.flash.warn  { background: #FEF3C7; color: #B45309; border-color: #FDE68A; }

.toast {
  position: fixed; bottom: 80px; left: 50%; transform: translateX(-50%) translateY(20px);
  background: var(--rc-navy); color: #fff;
  padding: 10px 18px; border-radius: 999px; font-size: 13px; font-weight: 600;
  z-index: 200; opacity: 0; pointer-events: none;
  transition: opacity 0.2s, transform 0.2s;
  box-shadow: var(--shadow-hi);
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
@media (min-width: 1024px) { .toast { bottom: 24px; } }

/* ============================================================================
   GREETING / HERO BLOCKS
============================================================================ */
.greeting { padding: 4px 0 18px; }
.greeting .salutation { font-family: 'Cormorant Garamond'; font-size: 26px; font-weight: 600; color: var(--rc-navy); letter-spacing: -0.01em; }
.greeting .subline { color: var(--ink-3); font-size: 13.5px; margin-top: 2px; }
@media (min-width: 1024px) {
  .greeting .salutation { font-size: 32px; }
}

.org-hero {
  position: relative;
  background: linear-gradient(135deg, var(--org-color, var(--rc-navy)) 0%, color-mix(in srgb, var(--org-color, var(--rc-navy)) 70%, #000) 100%);
  color: #fff; border-radius: var(--rad-lg);
  padding: 22px; margin-bottom: 22px;
  box-shadow: var(--shadow-2); overflow: hidden;
}
.org-hero::after {
  content: ''; position: absolute; top: -40%; right: -10%; width: 240px; height: 240px;
  background: radial-gradient(circle, rgba(255,255,255,0.12) 0%, transparent 60%);
  pointer-events: none;
}
.org-hero .org-icon { font-size: 36px; margin-bottom: 8px; }
.org-hero h1 { color: #fff; font-size: 26px; margin: 0 0 4px; }
.org-hero .org-sub { color: rgba(255,255,255,0.8); font-size: 12px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; margin-bottom: 12px; }
.org-hero .org-desc { color: rgba(255,255,255,0.92); font-size: 14.5px; line-height: 1.55; max-width: 64ch; margin-bottom: 16px; }
.org-hero .org-actions { display: flex; flex-wrap: wrap; gap: 8px; }
@media (min-width: 1024px) {
  .org-hero { padding: 32px 36px; }
  .org-hero h1 { font-size: 32px; }
}

/* ============================================================================
   ORG PILLS GRID (Home)
============================================================================ */
.org-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 10px; margin-bottom: 22px; }
.org-pill {
  background: var(--rc-paper); border: 1px solid var(--rc-line);
  border-radius: var(--rad); padding: 14px 14px;
  text-decoration: none; box-shadow: var(--shadow-1);
  display: flex; flex-direction: column; gap: 6px;
  transition: transform 0.1s, box-shadow 0.15s, border-color 0.15s;
  position: relative; overflow: hidden;
}
.org-pill::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px; background: var(--org-color, var(--rc-navy)); }
.org-pill:hover { box-shadow: var(--shadow-2); text-decoration: none; transform: translateY(-2px); border-color: var(--rc-line-2); }
.org-pill .icon { font-size: 24px; line-height: 1; }
.org-pill .name { font-family: 'Cormorant Garamond'; font-weight: 600; color: var(--rc-navy); font-size: 16px; }
.org-pill .desc { color: var(--ink-3); font-size: 12px; line-height: 1.45; }
.org-pill .meta { display: flex; gap: 6px; margin-top: 4px; font-size: 11px; color: var(--ink-4); }
.org-pill .meta .dot { color: var(--rc-line-2); }

/* ============================================================================
   CARDS
============================================================================ */
.card {
  background: var(--rc-paper); border: 1px solid var(--rc-line);
  border-radius: var(--rad); padding: 18px;
  box-shadow: var(--shadow-1); margin-bottom: 12px;
}
.card.compact { padding: 12px 16px; }
.card.center { text-align: center; }
.card-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.card-head h2 { margin: 0; font-size: 15px; }
.card-head .meta { color: var(--ink-4); font-size: 12px; }

/* Card grids */
.grid-2, .grid-3, .grid-4 { display: grid; gap: 12px; grid-template-columns: 1fr; }
@media (min-width: 720px) {
  .grid-2 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .grid-4 { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 1280px) {
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
  .grid-4 { grid-template-columns: repeat(4, 1fr); }
}

/* ============================================================================
   ITEM CARDS
============================================================================ */
.item {
  background: var(--rc-paper); border: 1px solid var(--rc-line);
  border-radius: var(--rad); padding: 16px;
  display: flex; flex-direction: column; gap: 10px;
  position: relative;
  transition: border-color 0.12s, box-shadow 0.15s, transform 0.08s;
}
.item:hover { border-color: var(--rc-line-2); box-shadow: var(--shadow-2); }
.item.fav::after { content: '★'; position: absolute; top: 12px; right: 14px; color: var(--rc-gold); font-size: 14px; }
.item .item-top { display: flex; align-items: flex-start; gap: 12px; }
.item .item-icon {
  flex: 0 0 44px; width: 44px; height: 44px; border-radius: 10px;
  background: var(--rc-cream); display: grid; place-items: center;
  font-size: 18px; color: var(--rc-navy);
  overflow: hidden;
}
.item .item-icon .logo-img { width: 32px; height: 32px; object-fit: contain; }

/* Reusable icon helper — render_icon() outputs <img class="logo-img logo-{sm|md|lg}"> */
.logo-img { object-fit: contain; display: block; }
.logo-sm { width: 22px; height: 22px; }
.logo-md { width: 32px; height: 32px; }
.logo-lg { width: 72px; height: 72px; }
.emoji   { display: inline-block; line-height: 1; }
.emoji-sm { font-size: 18px; }
.emoji-md { font-size: 24px; }
.emoji-lg { font-size: 40px; }
.item .item-meta { flex: 1; min-width: 0; }
.item .item-label { font-family: 'Inter'; font-weight: 600; color: var(--rc-navy); font-size: 14.5px; line-height: 1.3; margin-bottom: 2px; }
.item .item-sub { color: var(--ink-4); font-size: 11px; letter-spacing: 0.04em; text-transform: uppercase; font-weight: 600; }
.item .item-desc { color: var(--ink-2); font-size: 13.5px; line-height: 1.5; margin: 4px 0 0; }
.item .item-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }

.item .when-pill {
  display: inline-block; padding: 3px 10px; border-radius: 999px;
  font-size: 11px; font-weight: 700; letter-spacing: 0.04em; flex-shrink: 0;
}
.when-pill.today { background: #FEE2E2; color: #991B1B; }
.when-pill.soon  { background: #FEF3C7; color: #92400E; }
.when-pill.later { background: var(--rc-cream); color: var(--ink-2); border: 1px solid var(--rc-line); }
.when-pill.past  { background: #F1F5F9; color: var(--ink-4); }

.item .pw-row { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.item .pw-row .field {
  flex: 1; min-width: 0; background: var(--rc-cream); padding: 8px 10px;
  border-radius: 8px; font-family: 'SF Mono', monospace; font-size: 13px;
  color: var(--rc-navy);
  overflow-wrap: anywhere;
}
.item .pw-row .pw-mask { letter-spacing: 2px; }

/* ============================================================================
   BUTTONS
============================================================================ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 9px 14px; border-radius: 9px; min-height: 36px;
  background: var(--rc-paper); color: var(--ink); border: 1px solid var(--rc-line-2);
  font: 600 13px/1 'Inter', sans-serif; cursor: pointer;
  text-decoration: none !important; transition: background 0.1s, transform 0.05s, border-color 0.1s;
}
.btn:hover { background: var(--rc-cream); border-color: #B8AB8C; }
.btn:active { transform: scale(0.98); }
.btn.small { padding: 5px 11px; min-height: 30px; font-size: 12px; border-radius: 7px; }
.btn.primary { background: var(--rc-navy); color: #fff; border-color: var(--rc-navy); }
.btn.primary:hover { background: var(--rc-navy-2); border-color: var(--rc-navy-2); }
.btn.gold { background: var(--rc-gold); color: var(--rc-navy); border-color: var(--rc-gold); font-weight: 700; }
.btn.gold:hover { background: var(--rc-gold-2); border-color: var(--rc-gold-2); }
.btn.ghost { background: transparent; border-color: transparent; color: var(--ink-2); }
.btn.ghost:hover { background: var(--rc-cream); color: var(--ink); }
.btn.ok   { background: var(--ok);   color: #fff; border-color: var(--ok); }
.btn.warn { background: var(--warn); color: #fff; border-color: var(--warn); }
.btn.bad  { background: var(--bad);  color: #fff; border-color: var(--bad); }

/* ============================================================================
   PILLS / TAGS / FILTERS
============================================================================ */
.pill {
  display: inline-block; padding: 3px 10px; border-radius: 999px;
  font-size: 11px; font-weight: 700; letter-spacing: 0.04em;
  background: var(--rc-cream); color: var(--ink-3); text-transform: uppercase;
}
.pill.ok    { background: #DCFCE7; color: #15803D; }
.pill.warn  { background: #FEF3C7; color: #92400E; }
.pill.bad   { background: #FEE2E2; color: #991B1B; }
.pill.info  { background: #DBEAFE; color: #1E40AF; }
.pill.muted { background: #F1F5F9; color: var(--ink-4); }
.pill.gold  { background: #FEF3C7; color: var(--rc-navy); }
.pill.gone  { background: #F1F5F9; color: var(--ink-4); }

.filter-row { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 14px; }
.filter-row .chip {
  padding: 7px 13px; border-radius: 999px;
  background: var(--rc-paper); border: 1px solid var(--rc-line);
  font-size: 12.5px; font-weight: 600; color: var(--ink-2);
  text-decoration: none; min-height: 32px; display: inline-flex; align-items: center; gap: 4px;
}
.filter-row .chip:hover { background: var(--rc-cream); text-decoration: none; }
.filter-row .chip.active { background: var(--rc-navy); color: #fff; border-color: var(--rc-navy); }

/* ============================================================================
   STATS STRIP
============================================================================ */
.stat-strip { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-bottom: 18px; }
@media (min-width: 720px) { .stat-strip { grid-template-columns: repeat(4, 1fr); } }
.stat-tile {
  background: var(--rc-paper); border: 1px solid var(--rc-line); border-radius: var(--rad);
  padding: 14px 16px; box-shadow: var(--shadow-1);
}
.stat-tile .num { font: 700 26px/1 'Cormorant Garamond', Georgia, serif; color: var(--rc-navy); letter-spacing: -0.02em; }
.stat-tile .lbl { font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--ink-4); font-weight: 700; margin-top: 4px; }
.stat-tile.ok   .num { color: var(--ok); }
.stat-tile.warn .num { color: var(--warn); }
.stat-tile.bad  .num { color: var(--bad); }
.stat-tile.gold .num { color: var(--rc-gold); }

/* ============================================================================
   QUICK ACTIONS GRID
============================================================================ */
.quick-actions { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
@media (min-width: 720px) { .quick-actions { grid-template-columns: repeat(4, 1fr); } }
@media (min-width: 1280px) { .quick-actions { grid-template-columns: repeat(8, 1fr); } }
.qa {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  padding: 16px 10px; background: var(--rc-paper); border: 1px solid var(--rc-line);
  border-radius: var(--rad); text-decoration: none; color: var(--ink);
  min-height: 86px; justify-content: center; cursor: pointer;
  transition: transform 0.05s, border-color 0.1s, box-shadow 0.15s;
}
.qa:hover { border-color: var(--rc-gold); text-decoration: none; transform: translateY(-1px); box-shadow: var(--shadow-2); }
.qa .ic { font-size: 24px; }
.qa .lbl { font-size: 12.5px; font-weight: 600; text-align: center; }

/* ============================================================================
   TABLES
============================================================================ */
table.t { width: 100%; border-collapse: collapse; }
table.t th, table.t td { padding: 9px 12px; border-bottom: 1px solid var(--rc-line); text-align: left; vertical-align: top; font-size: 13px; }
table.t th { font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--ink-4); font-weight: 700; }
table.t tr:last-child td { border-bottom: 0; }
table.t tr:hover td { background: var(--rc-cream); }
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 0 -16px; padding: 0 16px; }
@media (min-width: 1024px) { .table-wrap { margin: 0; padding: 0; } }

/* ============================================================================
   KEY/VALUE
============================================================================ */
dl.kv { display: grid; grid-template-columns: 1fr; gap: 4px 12px; margin: 0; }
dl.kv dt { color: var(--ink-4); font-size: 11px; text-transform: uppercase; letter-spacing: 0.04em; padding-top: 8px; font-weight: 700; }
dl.kv dd { margin: 0; color: var(--ink); font-size: 13.5px; padding-bottom: 6px; }
@media (min-width: 720px) { dl.kv { grid-template-columns: 130px 1fr; } }

/* ============================================================================
   FORMS
============================================================================ */
.stack { display: flex; flex-direction: column; gap: 12px; }
.stack label { display: flex; flex-direction: column; gap: 4px; font-size: 12.5px; color: var(--ink-2); font-weight: 600; }
.stack input[type="text"], .stack input[type="email"], .stack input[type="password"], .stack input[type="datetime-local"], .stack input[type="date"], .stack input[type="number"], .stack input[type="url"], .stack input[type="tel"], .stack input[type="time"], .stack textarea, .stack select {
  font: 14px/1.4 'Inter', sans-serif;
  padding: 10px 12px;
  border: 1px solid var(--rc-line-2); border-radius: 9px;
  background: var(--rc-paper); color: var(--ink);
  min-height: 40px;
}
.stack textarea { min-height: 80px; resize: vertical; }
.stack input:focus, .stack textarea:focus, .stack select:focus {
  outline: none; border-color: var(--rc-gold);
  box-shadow: 0 0 0 3px rgba(197,150,26,0.18);
}
.stack .row { display: grid; grid-template-columns: 1fr; gap: 12px; }
@media (min-width: 720px) {
  .stack .row.two { grid-template-columns: 1fr 1fr; }
  .stack .row.three { grid-template-columns: repeat(3, 1fr); }
}

/* ============================================================================
   FOOTER
============================================================================ */
.footer {
  margin: 24px 0 16px; padding: 0 16px;
  color: var(--ink-4); font-size: 12px;
}
@media (min-width: 1024px) { .footer { padding: 0 36px; } }

/* ============================================================================
   LOGIN
============================================================================ */
.login-shell {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(180deg, var(--rc-cream) 0%, #F1EBDD 100%);
  padding: 24px 16px;
}
.login-card {
  background: var(--rc-paper); border-radius: var(--rad-lg);
  padding: 36px 28px; max-width: 400px; width: 100%;
  box-shadow: var(--shadow-hi); border: 1px solid var(--rc-line);
}
.login-head { text-align: center; margin-bottom: 24px; }
.login-head .lockup {
  display: flex; align-items: baseline; justify-content: center; gap: 8px; flex-wrap: wrap;
  font-family: 'Cormorant Garamond', Georgia, serif;
  margin-top: 2px;
}
.login-head .rc-wordmark { font-size: 22px; font-weight: 700; color: var(--rc-navy); letter-spacing: -0.01em; }
.login-head .rc-divider { color: var(--rc-gold); font-size: 18px; font-weight: 600; }
.login-head .rc-app { font-size: 18px; font-weight: 600; color: var(--rc-gold-deep); letter-spacing: 0.02em; }
.login-head .tagline { color: var(--ink-3); font-size: 13.5px; margin-top: 8px; }

/* ============================================================================
   COMPAT — old Ops job templates
============================================================================ */
.hero {
  display: flex; align-items: center; justify-content: space-between;
  gap: 24px; background: var(--rc-paper); border: 1px solid var(--rc-line);
  border-radius: var(--rad); padding: 20px 24px; margin-bottom: 20px;
  box-shadow: var(--shadow-1);
}
.hero h1 { margin: 0 0 4px; font-size: 22px; }
.hero p { margin: 0; color: var(--ink-3); }
.hero-meta { display: flex; align-items: center; gap: 16px; color: var(--ink-4); font-size: 12.5px; }

.stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-bottom: 20px; }
@media (min-width: 720px) { .stats { grid-template-columns: repeat(4, 1fr); } }
.stat { background: var(--rc-paper); border: 1px solid var(--rc-line); border-radius: var(--rad); padding: 14px 16px; box-shadow: var(--shadow-1); }
.stat .num { font: 700 26px/1 'Cormorant Garamond', Georgia, serif; color: var(--rc-navy); letter-spacing: -0.02em; }
.stat .lbl { font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--ink-4); font-weight: 700; margin-top: 4px; }
.stat.ok .num   { color: var(--ok); }
.stat.warn .num { color: var(--warn); }
.stat.bad .num  { color: var(--bad); }

.grid.two { display: grid; gap: 12px; grid-template-columns: 1fr; }
@media (min-width: 720px) { .grid.two { grid-template-columns: 1fr 1fr; } }

.card.wide { width: 100%; }

ul.list { list-style: none; padding: 0; margin: 0; }
ul.list li { padding: 10px 0; border-bottom: 1px dashed var(--rc-line); }
ul.list li:last-child { border-bottom: 0; }

.pill.pause, .pill.delete, .pill.login_fail, .pill.apply_fail { background: #FEF3C7; color: #92400E; }
.pill.resume, .pill.login, .pill.inventory_refresh, .pill.inventory_add, .pill.apply_ok { background: #DCFCE7; color: #15803D; }
.pill.edit_schedule, .pill.override_start, .pill.inventory_remove { background: #DBEAFE; color: #1E40AF; }

/* Utility */
.hidden { display: none !important; }
