/* ==========================================================================
   fYLAB · Function Y — Cutting Edge
   Ceramic Daylight (#f3f2ee) · Graphite Obsidian (#11141b) · Sovereign Cobalt (#1742c6)
   ========================================================================== */

@font-face {
  font-family: "Manrope";
  src: url("../brand/fonts/manrope-regular.ttf") format("truetype");
  font-weight: 400 500;
  font-display: swap;
}

@font-face {
  font-family: "Manrope";
  src: url("../brand/fonts/manrope-bold.ttf") format("truetype");
  font-weight: 600 800;
  font-display: swap;
}

@font-face {
  font-family: "IBM Plex Mono";
  src: url("../brand/fonts/ibm-plex-mono.ttf") format("truetype");
  font-weight: 400 500;
  font-display: swap;
}

:root {
  --ink: #11141b;
  --muted: #646d7a;
  --paper: #f3f2ee;
  --panel: #ffffff;
  --chrome: #11141b;
  --chrome-light: #9ca4b2;
  --canvas: #e9e7e0;
  --line: rgba(17, 20, 27, 0.11);
  --line-strong: rgba(17, 20, 27, 0.24);
  --focus: #1742c6;
  --cobalt: #1742c6;
  --cobalt-bright: #3b82f6;
  --cobalt-soft: rgba(23, 66, 198, 0.08);
  --body: "Manrope", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --display: "Manrope", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Consolas, monospace;
  --gjs-primary-color: #f3f2ee;
  --gjs-secondary-color: #11141b;
  --gjs-tertiary-color: #1742c6;
  --gjs-quaternary-color: #3b82f6;
  --gjs-font-color: #262d38;
  --gjs-font-color-active: #11141b;
}

body {
  font-family: var(--body);
  -webkit-font-smoothing: antialiased;
}

button,
input,
select,
textarea {
  border-radius: 3px;
}

.primary,
.studio-tabs button[aria-pressed="true"],
.template-filters button[aria-pressed="true"],
.template-format {
  background: var(--ink) !important;
  border-color: var(--ink) !important;
  color: #ffffff !important;
  border-radius: 3px;
  font-weight: 500;
}

.primary:hover {
  background: var(--cobalt) !important;
  border-color: var(--cobalt) !important;
}

.secondary {
  background: #ffffff;
  border-color: var(--line-strong);
  color: var(--ink);
}

.secondary:hover {
  background: var(--paper);
  border-color: var(--ink);
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--cobalt);
  box-shadow: 0 0 0 2px var(--cobalt-soft);
}

/* ==========================================================================
   LOGIN GATE — Function Y · Cutting Edge Architectural Plate
   ========================================================================== */
.login-shell {
  grid-template-columns: 1.05fr 1fr;
}

.login-art {
  background:
    linear-gradient(to right, rgba(255, 255, 255, 0.032) 1px, transparent 1px) 0 0 / 48px 48px,
    linear-gradient(to bottom, rgba(255, 255, 255, 0.032) 1px, transparent 1px) 0 0 / 48px 48px,
    radial-gradient(circle at 72% 38%, rgba(23, 66, 198, 0.16) 0%, transparent 52%),
    var(--chrome);
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  padding: 38px 48px;
}

.login-art::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 2px;
  background: linear-gradient(90deg, var(--cobalt) 0%, var(--cobalt-bright) 42%, transparent 100%);
}

.login-logo {
  width: 136px !important;
  height: auto !important;
  left: 0 !important;
  top: 0 !important;
  margin: 0 !important;
  z-index: 2;
}

.fy-axis-stage {
  position: relative;
  width: min(360px, 78%);
  aspect-ratio: 1;
  margin: auto;
  display: grid;
  place-items: center;
}

.fy-axis-svg {
  width: 100%;
  height: 100%;
  overflow: visible;
}

.login-brand-foot {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.login-brand-foot .fy-kicker {
  font: 500 11px/1 var(--mono);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--cobalt-bright);
}

.login-brand-foot .fy-edge {
  font: 600 22px/1.1 var(--display);
  letter-spacing: -0.03em;
  color: #f5f4f0;
}

.login-side {
  background:
    linear-gradient(to right, transparent calc(50% - 0.5px), rgba(17, 20, 27, 0.04) 50%, transparent calc(50% + 0.5px)),
    linear-gradient(to bottom, transparent calc(50% - 0.5px), rgba(17, 20, 27, 0.04) 50%, transparent calc(50% + 0.5px)),
    var(--paper);
}

.login-form {
  width: 348px;
}

.mode-switch {
  display: grid;
  grid-template-columns: 1fr 1fr;
  padding: 3px;
  background: rgba(17, 20, 27, 0.06);
  border: 1px solid var(--line);
  border-radius: 3px;
  margin-bottom: 10px;
}

.mode-tab {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 36px;
  border: 0 !important;
  background: transparent !important;
  color: var(--muted) !important;
  font-size: 13px;
  font-weight: 500;
  border-radius: 2px;
  padding: 0 !important;
}

.mode-tab:hover {
  color: var(--ink) !important;
}

.mode-tab.active {
  background: var(--ink) !important;
  color: #ffffff !important;
}

/* ==========================================================================
   UNIFIED 56PX TOPBAR — Identical Across Page info (/admin/) & Mail (/mail/)
   ========================================================================== */
.topbar {
  position: relative;
  height: 56px !important;
  flex: 0 0 56px !important;
  background: var(--chrome) !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding: 0 18px !important;
  gap: 14px !important;
}

.topbar::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 2px;
  background: linear-gradient(90deg, var(--cobalt) 0%, var(--cobalt-bright) 42%, transparent 100%);
}

.brand-lockup {
  width: auto !important;
  height: 36px !important;
  padding: 0 2px !important;
  overflow: visible !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 10px;
}

.brand-lockup img {
  width: auto !important;
  height: 26px !important;
  margin: 0 !important;
  display: block;
}

.studio-divider,
.action-divider {
  height: 20px !important;
  background: rgba(255, 255, 255, 0.14) !important;
}

.top-switch {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(255, 255, 255, 0.05);
  padding: 3px;
  border-radius: 3px;
  border: 1px solid rgba(255, 255, 255, 0.09);
}

.top-tab {
  display: inline-flex;
  align-items: center;
  height: 28px;
  padding: 0 12px;
  font-size: 12.5px;
  font-weight: 500;
  color: #9ea6b2;
  border-radius: 2px;
  transition: color 0.15s, background 0.15s;
}

.top-tab:hover {
  color: #ffffff;
}

.top-tab.active {
  color: #ffffff;
  background: rgba(59, 130, 246, 0.22);
  box-shadow: inset 0 -2px 0 var(--cobalt-bright);
}

.site-context strong {
  color: #d6dce5;
  font-size: 12px;
  font-family: var(--mono);
  letter-spacing: 0.02em;
}

/* Studio Workspace & Canvas Polish */
.modulebar {
  background: #161a23 !important;
  border-right: 1px solid rgba(255, 255, 255, 0.07) !important;
}

.module-button.active {
  color: #ffffff !important;
  background: rgba(59, 130, 246, 0.16) !important;
  box-shadow: inset 2px 0 0 var(--cobalt-bright);
}

.leftbar,
.rightbar {
  background: var(--panel) !important;
  border-color: var(--line) !important;
}

.canvas-bar,
.statusbar {
  background: var(--panel) !important;
  border-color: var(--line) !important;
}

.canvas-area {
  background:
    radial-gradient(rgba(17, 20, 27, 0.085) 1px, transparent 1px) 0 0 / 24px 24px,
    var(--canvas) !important;
}

.live-dot {
  background: var(--cobalt) !important;
}

.pill {
  border-color: var(--line-strong) !important;
  color: var(--cobalt) !important;
  background: var(--cobalt-soft) !important;
}