:root {
  --bg: #edf3f0;
  --panel: rgba(255, 255, 255, 0.94);
  --panel-solid: #ffffff;
  --ink: #15231e;
  --muted: #6f7d77;
  --line: #d9e5df;
  --green-950: #061f19;
  --green-900: #082f26;
  --green-800: #0a4938;
  --green-700: #0b5d46;
  --green-600: #0e7659;
  --green-500: #15956d;
  --green-100: #e0f3eb;
  --green-50: #f1faf6;
  --teal: #0d6b78;
  --gold: #d0aa5a;
  --cream: #fff9e8;
  --danger: #c94444;
  --warning: #c37b16;
  --info: #2f6db2;
  --shadow: 0 20px 60px rgba(7, 45, 34, 0.10);
  --shadow-soft: 0 8px 24px rgba(7, 45, 34, 0.08);
  --radius-xl: 24px;
  --radius-lg: 18px;
  --radius-md: 13px;
  --sidebar-w: 282px;
  --topbar-h: 72px;
}

* { box-sizing: border-box; }
html, body { min-height: 100%; }
body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 85% 4%, rgba(21, 149, 109, .13), transparent 26%),
    radial-gradient(circle at 20% 90%, rgba(13, 107, 120, .08), transparent 24%),
    var(--bg);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 14px;
}
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }

.app-shell { min-height: 100vh; display: grid; grid-template-columns: var(--sidebar-w) 1fr; }
.sidebar {
  position: fixed; inset: 0 auto 0 0; width: var(--sidebar-w); z-index: 40;
  display: flex; flex-direction: column; padding: 22px 18px 18px;
  color: #eef8f4;
  background:
    linear-gradient(180deg, rgba(255,255,255,.025), transparent 30%),
    linear-gradient(160deg, var(--green-900), var(--green-950));
  box-shadow: 16px 0 42px rgba(4, 31, 24, .16);
  overflow-y: auto;
}
.sidebar::after {
  content: ""; position: absolute; width: 230px; height: 230px; border: 1px solid rgba(255,255,255,.05);
  border-radius: 50%; right: -140px; top: 65px; box-shadow: 0 0 0 36px rgba(255,255,255,.015), 0 0 0 72px rgba(255,255,255,.012);
  pointer-events: none;
}
.brand { display: flex; align-items: center; gap: 12px; padding: 2px 8px 20px; position: relative; z-index: 2; }
.brand-mark {
  width: 43px; height: 43px; border-radius: 14px; display: grid; place-items: center; position: relative;
  font-weight: 900; font-size: 20px; color: white; background: linear-gradient(145deg, #17a274, #0b5d46);
  box-shadow: 0 8px 20px rgba(8, 117, 84, .38); border: 1px solid rgba(255,255,255,.18);
}
.brand-mark .leaf { position: absolute; font-size: 8px; top: 4px; right: 7px; transform: rotate(35deg); color: #d8ed85; }
.brand strong { display: block; font-size: 21px; letter-spacing: -.5px; line-height: 1; }
.brand small { display: block; color: #a5c3b8; margin-top: 4px; letter-spacing: .4px; }
.product-label { margin: 3px 12px 16px; font-size: 10px; font-weight: 700; letter-spacing: 1.5px; color: #83a89b; }
.nav-list { display: grid; gap: 7px; position: relative; z-index: 2; }
.nav-item {
  width: 100%; border: 0; color: #b9d0c7; background: transparent; display: grid;
  grid-template-columns: 34px 1fr auto; align-items: center; gap: 7px; padding: 12px 13px; border-radius: 13px;
  text-align: left; font-weight: 650; transition: .22s ease;
}
.nav-item:hover { background: rgba(255,255,255,.06); color: white; transform: translateX(2px); }
.nav-item.active { color: white; background: linear-gradient(90deg, rgba(21,149,109,.32), rgba(21,149,109,.13)); box-shadow: inset 3px 0 0 #53d1a5; }
.nav-icon { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 9px; background: rgba(255,255,255,.055); font-size: 16px; }
.nav-item.active .nav-icon { background: #15956d; box-shadow: 0 7px 16px rgba(21,149,109,.3); }
.nav-badge { min-width: 25px; padding: 3px 7px; border-radius: 999px; text-align: center; font-size: 10px; color: #d6ece3; background: rgba(255,255,255,.09); }
.sidebar-spacer { flex: 1; min-height: 26px; }
.quality-card { display: flex; align-items: center; gap: 12px; margin: 0 5px 12px; padding: 14px; border: 1px solid rgba(255,255,255,.08); border-radius: 16px; background: rgba(255,255,255,.045); backdrop-filter: blur(12px); }
.quality-card strong, .sidebar-footer strong { display: block; font-size: 12px; }
.quality-card small, .sidebar-footer small { display: block; color: #8fb3a6; margin-top: 3px; font-size: 10px; }
.quality-ring { width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; position: relative; font-size: 16px; font-weight: 800; background: conic-gradient(#4fd5a7 var(--score, 0%), rgba(255,255,255,.08) 0); }
.quality-ring::before { content: ""; position: absolute; inset: 5px; border-radius: 50%; background: var(--green-950); }
.quality-ring span, .quality-ring small { position: relative; z-index: 1; display: inline; color: white; margin: 0; }
.quality-ring small { font-size: 8px; margin-left: 1px; }
.sidebar-footer { display: flex; align-items: center; gap: 10px; margin: 0 8px; padding-top: 14px; border-top: 1px solid rgba(255,255,255,.08); }
.security-dot { width: 9px; height: 9px; border-radius: 50%; background: #54dcae; box-shadow: 0 0 0 5px rgba(84,220,174,.11); }

.main-area { grid-column: 2; min-width: 0; }
.topbar {
  height: var(--topbar-h); position: sticky; top: 0; z-index: 30; display: flex; align-items: center; justify-content: space-between;
  padding: 0 28px; border-bottom: 1px solid rgba(187, 205, 197, .72); background: rgba(247, 250, 248, .82); backdrop-filter: blur(18px);
}
.breadcrumb { display: flex; align-items: center; gap: 9px; color: var(--muted); font-size: 13px; }
.breadcrumb b { color: #b6c2bd; }
.breadcrumb strong { color: var(--ink); }
.topbar-actions { display: flex; align-items: center; gap: 12px; }
.save-state { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 11px; padding-right: 6px; }
.pulse-dot { width: 7px; height: 7px; border-radius: 50%; background: #28b984; box-shadow: 0 0 0 4px rgba(40,185,132,.12); }
.pulse-dot.saving { background: var(--warning); animation: pulse 1.1s infinite; }
@keyframes pulse { 50% { transform: scale(.65); opacity: .55; } }
.icon-button { position: relative; width: 38px; height: 38px; border-radius: 12px; border: 1px solid var(--line); background: rgba(255,255,255,.8); color: var(--green-800); display: grid; place-items: center; box-shadow: 0 4px 12px rgba(7,45,34,.04); }
.icon-button:hover { transform: translateY(-1px); box-shadow: var(--shadow-soft); }
.notification-dot { position: absolute; width: 7px; height: 7px; border-radius: 50%; background: #e95d5d; right: 8px; top: 7px; border: 2px solid white; }
.user-chip { display: flex; align-items: center; gap: 10px; padding: 5px 9px 5px 6px; border: 1px solid var(--line); border-radius: 14px; background: rgba(255,255,255,.8); }
.user-chip strong, .user-chip small { display: block; }
.user-chip strong { font-size: 11px; }
.user-chip small { font-size: 9px; color: var(--muted); margin-top: 2px; }
.avatar { width: 31px; height: 31px; border-radius: 10px; display: grid; place-items: center; font-size: 10px; font-weight: 800; color: white; background: linear-gradient(145deg, var(--green-600), var(--green-800)); }
.menu-toggle { display: none; }
.workspace { padding: 28px; min-height: calc(100vh - var(--topbar-h)); }

.page-heading { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; margin-bottom: 22px; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; color: var(--green-600); font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: 1.25px; margin-bottom: 7px; }
.eyebrow::before { content: ""; width: 22px; height: 2px; border-radius: 2px; background: var(--green-500); }
h1, h2, h3, p { margin-top: 0; }
h1 { font-size: clamp(25px, 3vw, 38px); letter-spacing: -1.3px; line-height: 1.08; margin-bottom: 7px; }
h2 { font-size: 20px; letter-spacing: -.4px; }
h3 { font-size: 15px; }
.subtle { color: var(--muted); line-height: 1.55; }
.heading-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.btn {
  border: 1px solid transparent; border-radius: 12px; padding: 10px 15px; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-weight: 750; font-size: 12px; transition: .18s ease; text-decoration: none;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { color: white; background: linear-gradient(135deg, var(--green-600), var(--green-800)); box-shadow: 0 9px 20px rgba(11,93,70,.22); }
.btn-primary:hover { box-shadow: 0 12px 26px rgba(11,93,70,.28); }
.btn-secondary { color: var(--green-800); background: white; border-color: var(--line); }
.btn-soft { color: var(--green-700); background: var(--green-50); border-color: #d3ebe1; }
.btn-danger { color: #a93636; background: #fff4f4; border-color: #f2d3d3; }
.btn-small { padding: 7px 10px; border-radius: 10px; font-size: 10px; }
.btn-icon { width: 34px; height: 34px; padding: 0; }

.hero-card {
  position: relative; overflow: hidden; display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(280px, .7fr); min-height: 255px;
  color: white; border-radius: 28px; padding: 28px; background:
    linear-gradient(125deg, rgba(5,40,31,.98), rgba(9,83,61,.94)),
    radial-gradient(circle at 80% 20%, rgba(86,218,170,.3), transparent 35%);
  box-shadow: 0 24px 58px rgba(6, 53, 40, .22); margin-bottom: 20px;
}
.hero-card::before { content: ""; position: absolute; width: 420px; height: 420px; border: 1px solid rgba(255,255,255,.08); border-radius: 50%; right: -140px; top: -190px; box-shadow: 0 0 0 45px rgba(255,255,255,.025), 0 0 0 90px rgba(255,255,255,.018); }
.hero-card::after { content: ""; position: absolute; inset: auto -8% -50% 42%; height: 150%; transform: rotate(-16deg); background: linear-gradient(90deg, transparent, rgba(255,255,255,.035)); }
.hero-content, .hero-progress { position: relative; z-index: 2; }
.hero-kicker { display: inline-flex; align-items: center; gap: 8px; padding: 6px 10px; border: 1px solid rgba(255,255,255,.14); border-radius: 999px; color: #bce3d3; background: rgba(255,255,255,.06); font-size: 10px; font-weight: 750; letter-spacing: .6px; }
.hero-card h2 { font-size: clamp(25px, 3vw, 37px); max-width: 670px; margin: 18px 0 8px; letter-spacing: -1.1px; }
.hero-card p { color: #b7d0c7; max-width: 650px; line-height: 1.6; }
.hero-actions { display: flex; gap: 10px; margin-top: 20px; flex-wrap: wrap; }
.hero-card .btn-primary { color: var(--green-950); background: linear-gradient(135deg, #89ecc9, #4fd5a7); }
.hero-card .btn-secondary { color: white; background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.13); backdrop-filter: blur(10px); }
.hero-progress { display: grid; place-items: center; }
.big-ring { width: 168px; height: 168px; border-radius: 50%; display: grid; place-items: center; background: conic-gradient(#60dfb4 var(--score, 0%), rgba(255,255,255,.1) 0); box-shadow: 0 0 0 12px rgba(255,255,255,.03); }
.big-ring::before { content: ""; position: absolute; width: 132px; height: 132px; border-radius: 50%; background: #073e30; box-shadow: inset 0 0 28px rgba(0,0,0,.14); }
.big-ring-content { position: relative; text-align: center; }
.big-ring-content strong { font-size: 35px; letter-spacing: -1px; }
.big-ring-content span { font-size: 13px; }
.big-ring-content small { display: block; color: #9ac7b6; margin-top: 3px; }

.stats-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 20px; }
.stat-card { position: relative; overflow: hidden; background: var(--panel); border: 1px solid rgba(208, 224, 217, .84); border-radius: var(--radius-lg); padding: 17px; box-shadow: var(--shadow-soft); }
.stat-card::after { content: ""; position: absolute; width: 90px; height: 90px; border-radius: 50%; right: -35px; top: -40px; background: var(--tint, var(--green-100)); opacity: .7; }
.stat-top { display: flex; justify-content: space-between; align-items: center; position: relative; z-index: 1; }
.stat-icon { width: 39px; height: 39px; border-radius: 12px; display: grid; place-items: center; font-size: 17px; color: var(--accent, var(--green-700)); background: var(--tint, var(--green-100)); }
.stat-trend { font-size: 9px; font-weight: 750; padding: 4px 7px; border-radius: 999px; color: var(--green-700); background: var(--green-50); }
.stat-card strong { display: block; font-size: 28px; letter-spacing: -.8px; margin-top: 13px; position: relative; z-index: 1; }
.stat-card > span { display: block; color: var(--muted); font-size: 11px; margin-top: 3px; position: relative; z-index: 1; }

.content-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(300px, .6fr); gap: 18px; }
.panel { background: var(--panel); border: 1px solid rgba(208,224,217,.84); border-radius: var(--radius-xl); box-shadow: var(--shadow-soft); overflow: hidden; }
.panel-header { display: flex; justify-content: space-between; align-items: center; gap: 15px; padding: 20px 21px 14px; }
.panel-header h2 { margin: 0; }
.panel-header p { margin: 4px 0 0; font-size: 11px; color: var(--muted); }
.panel-body { padding: 0 21px 21px; }
.progress-list { display: grid; gap: 10px; }
.progress-row { display: grid; grid-template-columns: 37px 1fr auto; align-items: center; gap: 11px; padding: 11px; border: 1px solid #e6eeea; border-radius: 14px; background: #fbfdfc; }
.code-chip { width: 35px; height: 35px; border-radius: 11px; display: grid; place-items: center; color: white; font-weight: 850; background: linear-gradient(145deg, var(--teal), var(--green-700)); }
.progress-info strong { display: block; font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.progress-info small { color: var(--muted); font-size: 9px; }
.mini-progress { height: 5px; border-radius: 99px; overflow: hidden; background: #e9f0ed; margin-top: 7px; }
.mini-progress span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--green-500), #57d2a7); }
.status-pill { display: inline-flex; align-items: center; gap: 5px; padding: 5px 8px; border-radius: 999px; font-size: 9px; font-weight: 750; white-space: nowrap; }
.status-pill.completed, .status-pill.approved { color: #08714e; background: #e3f7ee; }
.status-pill.in_progress, .status-pill.imported { color: #98600e; background: #fff4db; }
.status-pill.not_started { color: #75817c; background: #eef2f0; }
.quick-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.quick-action { border: 1px solid #e2ece7; background: #fbfdfc; border-radius: 15px; padding: 15px; text-align: left; transition: .18s ease; }
.quick-action:hover { border-color: #b9ddcf; transform: translateY(-2px); box-shadow: var(--shadow-soft); }
.quick-action .qa-icon { width: 37px; height: 37px; border-radius: 11px; display: grid; place-items: center; margin-bottom: 10px; color: var(--green-700); background: var(--green-100); }
.quick-action strong { display: block; font-size: 11px; }
.quick-action small { display: block; color: var(--muted); font-size: 9px; margin-top: 3px; line-height: 1.4; }

.form-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.form-card { position: relative; overflow: hidden; min-height: 176px; display: flex; flex-direction: column; border: 1px solid #dce8e2; background: var(--panel); border-radius: 18px; padding: 17px; transition: .2s ease; box-shadow: 0 5px 15px rgba(7,45,34,.035); }
.form-card:hover { transform: translateY(-3px); border-color: #a9d6c5; box-shadow: var(--shadow-soft); }
.form-card::after { content: attr(data-code); position: absolute; right: 9px; bottom: -20px; font-size: 92px; font-weight: 900; color: rgba(11,93,70,.035); pointer-events: none; }
.form-card-top { display: flex; justify-content: space-between; gap: 10px; }
.form-code { width: 39px; height: 39px; border-radius: 12px; display: grid; place-items: center; color: white; font-weight: 900; background: linear-gradient(145deg, var(--green-600), var(--teal)); box-shadow: 0 7px 16px rgba(11,93,70,.18); }
.form-card h3 { margin: 14px 0 6px; max-width: 88%; line-height: 1.3; }
.form-card p { color: var(--muted); font-size: 10px; line-height: 1.45; margin-bottom: 14px; }
.form-card-footer { margin-top: auto; display: flex; justify-content: space-between; align-items: center; }
.form-meta { display: flex; gap: 5px; flex-wrap: wrap; }
.meta-chip { font-size: 8px; padding: 4px 6px; border-radius: 999px; color: #557067; background: #edf4f1; }
.open-arrow { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 9px; color: var(--green-700); background: var(--green-50); }

.studio-shell { display: grid; grid-template-columns: 265px minmax(0, 1fr); min-height: calc(100vh - 128px); gap: 16px; }
.form-nav-panel { background: var(--panel); border: 1px solid var(--line); border-radius: 20px; padding: 13px; height: calc(100vh - 128px); position: sticky; top: 92px; overflow-y: auto; box-shadow: var(--shadow-soft); }
.form-nav-title { padding: 8px 9px 12px; }
.form-nav-title strong { display: block; }
.form-nav-title small { color: var(--muted); font-size: 9px; }
.form-nav-list { display: grid; gap: 5px; }
.form-nav-item { display: grid; grid-template-columns: 31px 1fr auto; align-items: center; gap: 8px; width: 100%; border: 0; border-radius: 11px; background: transparent; padding: 8px; text-align: left; color: var(--ink); }
.form-nav-item:hover { background: #f1f7f4; }
.form-nav-item.active { background: linear-gradient(90deg, #e5f5ef, #f3faf7); box-shadow: inset 3px 0 0 var(--green-500); }
.form-nav-item .mini-code { width: 29px; height: 29px; display: grid; place-items: center; border-radius: 8px; color: var(--green-700); background: #e5f2ed; font-size: 10px; font-weight: 850; }
.form-nav-item.active .mini-code { color: white; background: var(--green-600); }
.form-nav-item strong { display: block; font-size: 9px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.form-nav-item small { color: var(--muted); font-size: 8px; }
.status-dot { width: 8px; height: 8px; border-radius: 50%; background: #c8d2ce; }
.status-dot.completed, .status-dot.approved { background: #36bd88; box-shadow: 0 0 0 3px #e2f7ee; }
.status-dot.in_progress, .status-dot.imported { background: #e7a43b; box-shadow: 0 0 0 3px #fff2d9; }
.studio-main { min-width: 0; }
.studio-header { background: var(--panel); border: 1px solid var(--line); border-radius: 20px 20px 0 0; padding: 18px 20px; box-shadow: var(--shadow-soft); }
.studio-title-row { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; }
.studio-title { display: flex; align-items: flex-start; gap: 13px; }
.studio-title .form-code { width: 47px; height: 47px; border-radius: 14px; font-size: 18px; }
.studio-title h1 { font-size: 21px; margin-bottom: 4px; }
.studio-title p { font-size: 10px; color: var(--muted); margin: 0; }
.studio-toolbar { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 7px; }
.tabs { display: flex; gap: 4px; border-top: 1px solid #e4ece8; margin-top: 16px; padding-top: 11px; overflow-x: auto; }
.tab { border: 0; background: transparent; color: var(--muted); padding: 8px 11px; border-radius: 9px; font-size: 10px; font-weight: 750; white-space: nowrap; }
.tab:hover { background: #f2f6f4; }
.tab.active { color: var(--green-700); background: var(--green-50); }
.studio-content { background: var(--panel); border: 1px solid var(--line); border-top: 0; border-radius: 0 0 20px 20px; min-height: 560px; box-shadow: var(--shadow-soft); }
.metadata-strip { display: grid; grid-template-columns: repeat(5, minmax(120px, 1fr)); gap: 10px; padding: 14px 17px; background: linear-gradient(90deg, #f4f9f7, #fbfdfc); border-bottom: 1px solid var(--line); }
.field { display: grid; gap: 5px; }
.field label { font-size: 8px; text-transform: uppercase; letter-spacing: .7px; color: #72817b; font-weight: 800; }
.field input, .field select, .field textarea { width: 100%; border: 1px solid #d8e4df; border-radius: 9px; background: white; color: var(--ink); padding: 8px 9px; outline: none; font-size: 10px; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: #5ac29d; box-shadow: 0 0 0 3px rgba(90,194,157,.12); }
.table-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.table-toolbar-left, .table-toolbar-right { display: flex; gap: 7px; align-items: center; flex-wrap: wrap; }
.row-count { color: var(--muted); font-size: 9px; }
.data-grid-wrap { overflow: auto; max-height: calc(100vh - 355px); min-height: 380px; position: relative; }
.data-grid { border-collapse: separate; border-spacing: 0; min-width: 100%; table-layout: fixed; }
.data-grid th { position: sticky; top: 0; z-index: 5; min-height: 48px; padding: 9px 6px; border-right: 1px solid rgba(255,255,255,.14); border-bottom: 1px solid #a8c7bb; background: linear-gradient(180deg, #106c55, #0b5d46); color: white; font-size: 8px; line-height: 1.25; text-transform: uppercase; letter-spacing: .4px; text-align: center; }
.data-grid th:first-child, .data-grid td:first-child { position: sticky; left: 0; z-index: 6; width: 42px; min-width: 42px; max-width: 42px; }
.data-grid th:first-child { z-index: 9; }
.data-grid td { border-right: 1px solid #e2ebe7; border-bottom: 1px solid #e2ebe7; background: white; padding: 0; height: 38px; vertical-align: middle; }
.data-grid tr:nth-child(even) td { background: #fbfdfc; }
.data-grid td:first-child { background: #f0f5f3 !important; text-align: center; color: var(--muted); font-size: 9px; font-weight: 700; }
.data-grid input, .data-grid select { width: 100%; height: 37px; border: 0; background: transparent; outline: none; padding: 7px 7px; font-size: 9px; color: var(--ink); }
.data-grid input:focus, .data-grid select:focus { box-shadow: inset 0 0 0 2px #40b98e; background: #f5fffb; }
.data-grid td.computed { background: #ecf7f1 !important; }
.data-grid td.computed input { color: #0b6b4d; font-weight: 750; cursor: not-allowed; }
.data-grid td.invalid { background: #fff0f0 !important; box-shadow: inset 0 0 0 1px #e7a6a6; }
.row-actions { display: flex; justify-content: center; gap: 3px; }
.row-action { width: 24px; height: 24px; display: grid; place-items: center; border: 0; border-radius: 7px; color: #6b7974; background: transparent; font-size: 11px; }
.row-action:hover { color: var(--green-700); background: #dff1ea; }
.empty-grid { display: grid; place-items: center; min-height: 390px; padding: 30px; text-align: center; }
.empty-illustration { width: 80px; height: 80px; border-radius: 24px; display: grid; place-items: center; color: var(--green-600); background: var(--green-50); font-size: 32px; margin: 0 auto 15px; border: 1px dashed #9bd5bf; }
.empty-grid h3 { margin-bottom: 5px; }
.empty-grid p { color: var(--muted); max-width: 360px; font-size: 10px; line-height: 1.5; }

.import-zone { margin: 18px; border: 1.5px dashed #98cdb9; border-radius: 19px; min-height: 230px; display: grid; place-items: center; text-align: center; padding: 28px; background: linear-gradient(145deg, #f7fcfa, #edf8f3); transition: .2s ease; }
.import-zone.dragover { border-color: var(--green-500); background: #e5f7ef; transform: scale(.995); }
.import-icon { width: 62px; height: 62px; display: grid; place-items: center; margin: 0 auto 14px; border-radius: 18px; background: white; color: var(--green-600); font-size: 25px; box-shadow: var(--shadow-soft); }
.import-zone h3 { font-size: 16px; margin-bottom: 7px; }
.import-zone p { color: var(--muted); font-size: 10px; max-width: 470px; line-height: 1.5; }
.upload-list { display: grid; gap: 10px; padding: 0 18px 18px; }
.upload-card { display: grid; grid-template-columns: 42px 1fr auto; gap: 12px; align-items: center; padding: 12px; border: 1px solid #e0eae5; border-radius: 14px; background: white; }
.file-type { width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center; color: white; background: var(--teal); font-size: 9px; font-weight: 850; }
.upload-card strong { display: block; font-size: 10px; }
.upload-card small { display: block; color: var(--muted); font-size: 8px; margin-top: 3px; }
.detected-chips { display: flex; gap: 4px; margin-top: 6px; flex-wrap: wrap; }
.detected-chip { padding: 3px 6px; border-radius: 999px; color: var(--green-700); background: var(--green-50); font-size: 8px; font-weight: 750; }

.validation-summary { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 11px; padding: 17px; }
.validation-card { border: 1px solid #e1ebe6; border-radius: 14px; padding: 14px; background: #fbfdfc; }
.validation-card strong { display: block; font-size: 21px; }
.validation-card span { color: var(--muted); font-size: 9px; }
.validation-list { display: grid; gap: 8px; padding: 0 17px 17px; }
.validation-item { display: grid; grid-template-columns: 29px 1fr auto; align-items: center; gap: 10px; padding: 10px; border-radius: 12px; border: 1px solid #e5ece9; background: white; }
.validation-symbol { width: 29px; height: 29px; display: grid; place-items: center; border-radius: 9px; }
.validation-item.error .validation-symbol { color: #b43838; background: #ffeaea; }
.validation-item.warning .validation-symbol { color: #a86e14; background: #fff3d8; }
.validation-item.success .validation-symbol { color: #0d7a55; background: #e2f6ed; }
.validation-item strong { display: block; font-size: 10px; }
.validation-item small { color: var(--muted); font-size: 8px; }

.flipbook-preview-area { padding: 18px; display: grid; grid-template-columns: 1fr 1fr; gap: 14px; background: #dce7e2; min-height: 520px; align-items: center; }
.book-page { position: relative; aspect-ratio: 210 / 297; background: white; border-radius: 3px; padding: 22px; box-shadow: 0 15px 35px rgba(12,49,37,.18); overflow: hidden; color: #111; }
.book-page.landscape { aspect-ratio: 297 / 210; }
.book-page::after { content: "Hayleys Plantations • Confidential"; position: absolute; bottom: 8px; left: 15px; right: 15px; padding-top: 5px; border-top: 1px solid #d7dedb; color: #7b8681; font-size: 5px; }
.page-code { position: absolute; right: 14px; top: 13px; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; color: white; font-weight: 850; font-size: 9px; background: var(--teal); }
.book-page h2 { text-align: center; font-family: Georgia, serif; font-size: 16px; margin: 9px 35px 12px; }
.book-page .page-meta { display: flex; gap: 10px; justify-content: center; font-size: 5px; color: #59635f; margin-bottom: 8px; }
.page-table { width: 100%; border-collapse: collapse; table-layout: fixed; font-family: Arial, sans-serif; }
.page-table th, .page-table td { border: .5px solid #7e8783; padding: 2px; font-size: 4.2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.page-table th { background: #0d6b78; color: white; }
.page-table td.computed { background: #e8f5e9; }
.book-cover { display: grid; place-items: center; text-align: center; padding: 34px; border: 4px double #13231d; }
.cover-mark { width: 75px; height: 75px; border-radius: 26px; display: grid; place-items: center; color: white; font-size: 34px; background: linear-gradient(145deg, var(--green-500), var(--green-800)); margin-bottom: 18px; }
.book-cover h1 { font-family: Georgia, serif; font-size: 25px; line-height: 1.3; }
.book-cover .cover-estate { margin-top: 20px; font-family: Georgia, serif; font-size: 16px; }
.book-cover .cover-month { color: #59635f; margin-top: 7px; }

.flipbook-overlay { position: fixed; inset: 0; z-index: 100; background: radial-gradient(circle at 50% 20%, #38574c, #071b16 70%); display: grid; grid-template-rows: 66px 1fr 70px; color: white; }
.flipbook-overlay.hidden { display: none; }
.flipbook-topbar { display: flex; align-items: center; justify-content: space-between; padding: 0 22px; background: rgba(0,0,0,.22); border-bottom: 1px solid rgba(255,255,255,.08); backdrop-filter: blur(12px); }
.flipbook-title strong { display: block; }
.flipbook-title small { color: #abc6bc; font-size: 9px; }
.flipbook-tools { display: flex; gap: 8px; }
.flipbook-tools .icon-button { color: white; background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.12); }
.flip-stage { display: grid; place-items: center; perspective: 1800px; overflow: hidden; padding: 18px; }
.flip-spread { width: min(1100px, 94vw); height: min(680px, calc(100vh - 170px)); display: grid; grid-template-columns: 1fr 1fr; gap: 3px; position: relative; filter: drop-shadow(0 25px 32px rgba(0,0,0,.4)); }
.flip-spread .book-page { height: 100%; width: 100%; aspect-ratio: auto; border-radius: 2px; transition: transform .5s ease, opacity .5s ease; transform-origin: center left; }
.flip-spread.turning .book-page:last-child { transform: rotateY(-12deg); opacity: .65; }
.flip-spread .book-page:first-child { transform-origin: center right; }
.flip-spread.single { grid-template-columns: minmax(300px, 720px); justify-content: center; }
.flip-controls { display: flex; align-items: center; justify-content: center; gap: 14px; background: rgba(0,0,0,.16); border-top: 1px solid rgba(255,255,255,.08); }
.flip-control-btn { width: 42px; height: 42px; border: 1px solid rgba(255,255,255,.12); border-radius: 13px; color: white; background: rgba(255,255,255,.08); }
.page-counter { min-width: 115px; text-align: center; font-size: 11px; color: #c5d8d1; }

.modal-backdrop { position: fixed; inset: 0; z-index: 90; display: grid; place-items: center; padding: 18px; background: rgba(3, 24, 18, .62); backdrop-filter: blur(8px); }
.modal { width: min(720px, 96vw); max-height: 90vh; overflow: auto; background: white; border-radius: 23px; box-shadow: 0 30px 80px rgba(0,0,0,.28); }
.modal-header { display: flex; justify-content: space-between; align-items: flex-start; padding: 21px; border-bottom: 1px solid var(--line); }
.modal-header h2 { margin-bottom: 4px; }
.modal-header p { margin: 0; color: var(--muted); font-size: 10px; }
.modal-body { padding: 21px; }
.modal-footer { display: flex; justify-content: flex-end; gap: 9px; padding: 15px 21px 21px; }
.form-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 13px; }
.form-layout .full { grid-column: 1 / -1; }
.close-button { width: 34px; height: 34px; border: 1px solid var(--line); border-radius: 10px; background: #f8faf9; color: var(--muted); }

.toast-host { position: fixed; right: 20px; bottom: 20px; z-index: 120; display: grid; gap: 9px; }
.toast { width: min(360px, calc(100vw - 40px)); display: grid; grid-template-columns: 32px 1fr auto; gap: 10px; align-items: center; padding: 12px; border-radius: 14px; color: white; background: #123d31; box-shadow: 0 18px 45px rgba(0,0,0,.23); animation: toast-in .25s ease; }
.toast.error { background: #803535; }
.toast.warning { background: #805c24; }
.toast-icon { width: 30px; height: 30px; border-radius: 9px; background: rgba(255,255,255,.1); display: grid; place-items: center; }
.toast strong { display: block; font-size: 10px; }
.toast small { color: rgba(255,255,255,.72); font-size: 8px; }
.toast-close { border: 0; background: transparent; color: rgba(255,255,255,.7); }
@keyframes toast-in { from { transform: translateY(12px); opacity: 0; } }

.loading-screen { min-height: 70vh; display: grid; place-items: center; }
.loader { width: 50px; height: 50px; border: 4px solid #dcebe5; border-top-color: var(--green-600); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.hidden { display: none !important; }

@media (max-width: 1180px) {
  :root { --sidebar-w: 240px; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .form-grid { grid-template-columns: repeat(2, 1fr); }
  .content-grid { grid-template-columns: 1fr; }
  .metadata-strip { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 900px) {
  .app-shell { display: block; }
  .sidebar { transform: translateX(-105%); transition: .25s ease; }
  .sidebar.open { transform: translateX(0); }
  .main-area { margin-left: 0; }
  .menu-toggle { display: grid; }
  .breadcrumb span, .save-state, .user-chip > div:not(.avatar) { display: none; }
  .topbar { padding: 0 16px; }
  .workspace { padding: 18px; }
  .hero-card { grid-template-columns: 1fr; }
  .hero-progress { display: none; }
  .studio-shell { grid-template-columns: 1fr; }
  .form-nav-panel { position: static; height: auto; max-height: 210px; }
  .form-nav-list { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .flipbook-preview-area { grid-template-columns: 1fr; }
}
@media (max-width: 620px) {
  .page-heading { align-items: flex-start; flex-direction: column; }
  .stats-grid, .form-grid, .validation-summary, .form-layout { grid-template-columns: 1fr; }
  .hero-card { padding: 21px; min-height: 300px; }
  .hero-card h2 { font-size: 25px; }
  .metadata-strip { grid-template-columns: 1fr 1fr; }
  .studio-title-row { flex-direction: column; }
  .studio-toolbar { justify-content: flex-start; }
  .quick-actions { grid-template-columns: 1fr; }
  .flip-spread { grid-template-columns: 1fr; max-width: 530px; }
  .flip-spread .book-page:first-child { display: none; }
}

.page-continuation { text-align: center; margin: -7px 34px 6px; font-size: 5px; font-weight: 750; letter-spacing: .02em; color: #0d6b78; }

/* V2 official-output lock: live preview uses the exact server-rendered template page. */
.book-page.exact-template { padding: 0; background: #fff; overflow: hidden; }
.book-page.exact-template::after { display: none; }
.book-page.exact-template img { display: block; width: 100%; height: 100%; object-fit: contain; background: #fff; }
.official-live-preview { align-items: start; }
.official-live-preview > .book-page { width: 100%; max-height: 78vh; }
.flip-spread .book-page.exact-template img { object-fit: contain; }

/* V4 voice-command navigation */
.voice-command-trigger {
  height: 38px; display: inline-flex; align-items: center; gap: 8px; padding: 0 10px 0 8px;
  color: var(--green-800); border: 1px solid #cfe0d8; border-radius: 12px;
  background: linear-gradient(180deg, rgba(255,255,255,.96), rgba(245,250,247,.88));
  box-shadow: 0 4px 12px rgba(7,45,34,.04); font-size: 11px; font-weight: 800;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.voice-command-trigger:hover, .voice-command-trigger.active { transform: translateY(-1px); border-color: #8fc9b3; box-shadow: 0 9px 24px rgba(7,70,51,.12); }
.voice-command-trigger.active { color: white; background: linear-gradient(145deg, var(--green-600), var(--green-800)); }
.voice-command-mic { width: 25px; height: 25px; border-radius: 9px; display: grid; place-items: center; color: white; font-size: 9px; background: linear-gradient(145deg, #1bb686, #087054); box-shadow: 0 5px 12px rgba(15,135,96,.24); }
.voice-command-trigger.active .voice-command-mic { background: rgba(255,255,255,.16); box-shadow: none; }
.voice-command-trigger kbd { padding: 2px 5px; border: 1px solid #dce7e2; border-bottom-width: 2px; border-radius: 5px; color: #738078; background: #f6f9f7; font: 700 8px/1 ui-monospace, SFMono-Regular, Menlo, monospace; }
.voice-command-trigger.active kbd { color: #d9eee6; border-color: rgba(255,255,255,.2); background: rgba(255,255,255,.08); }

.voice-command-panel { position: fixed; inset: 0; z-index: 160; display: grid; place-items: start center; padding: 76px 20px 28px; overflow-y: auto; }
.voice-panel-backdrop { position: fixed; inset: 0; border: 0; background: rgba(3,25,18,.68); backdrop-filter: blur(12px); cursor: default; }
.voice-command-card { position: relative; width: min(760px, calc(100vw - 32px)); overflow: hidden; border: 1px solid rgba(255,255,255,.55); border-radius: 25px; background: rgba(255,255,255,.98); box-shadow: 0 36px 100px rgba(0,0,0,.32); animation: voice-card-in .22s ease-out; }
@keyframes voice-card-in { from { transform: translateY(-10px) scale(.985); opacity: 0; } }
.voice-command-header { position: relative; display: grid; grid-template-columns: 72px 1fr 38px; gap: 16px; align-items: center; padding: 22px 22px 20px; color: white; background: radial-gradient(circle at 12% -30%, rgba(83,209,165,.58), transparent 42%), linear-gradient(135deg, #0a5b45, #062b22 70%); }
.voice-command-header::after { content: ""; position: absolute; right: -80px; top: -110px; width: 260px; height: 260px; border: 1px solid rgba(255,255,255,.09); border-radius: 50%; box-shadow: 0 0 0 36px rgba(255,255,255,.025), 0 0 0 72px rgba(255,255,255,.018); pointer-events: none; }
.voice-command-header > * { position: relative; z-index: 1; }
.voice-command-header h2 { margin: 3px 0 5px; font-size: 24px; letter-spacing: -.45px; }
.voice-command-header p { margin: 0; max-width: 570px; color: #bdd8ce; font-size: 10px; line-height: 1.55; }
.voice-command-header p strong { color: white; }
.voice-command-header .close-button { color: white; border-color: rgba(255,255,255,.14); background: rgba(255,255,255,.08); }
.voice-kicker { color: #75dfb7; font-size: 9px; font-weight: 850; letter-spacing: 1.5px; text-transform: uppercase; }
.voice-orb { position: relative; width: 66px; height: 66px; display: grid; place-items: center; border-radius: 23px; background: linear-gradient(145deg, #1bc691, #0a7858); box-shadow: 0 12px 30px rgba(0,0,0,.23), inset 0 1px 0 rgba(255,255,255,.28); }
.voice-orb span { width: 17px; height: 24px; border: 3px solid white; border-radius: 10px; }
.voice-orb span::after { content: ""; position: absolute; left: 25px; top: 35px; width: 16px; height: 11px; border: 3px solid white; border-top: 0; border-radius: 0 0 11px 11px; }
.voice-orb i, .voice-orb b { position: absolute; inset: -7px; border: 1px solid rgba(111,235,188,.35); border-radius: 27px; opacity: 0; }
.voice-orb b { inset: -15px; border-color: rgba(111,235,188,.2); }
.voice-orb.listening i { animation: voice-ripple 1.25s infinite; }
.voice-orb.listening b { animation: voice-ripple 1.25s .3s infinite; }
@keyframes voice-ripple { 0% { transform: scale(.84); opacity: .75; } 100% { transform: scale(1.18); opacity: 0; } }

.voice-command-body { padding: 20px 22px 22px; display: grid; gap: 14px; }
.voice-status-card { display: flex; justify-content: space-between; align-items: center; gap: 18px; padding: 14px; border: 1px solid #dce9e3; border-radius: 16px; background: #f8fbf9; }
.voice-status-card > div { display: grid; grid-template-columns: 10px 1fr; column-gap: 9px; align-items: center; min-width: 0; }
.voice-status-card strong { font-size: 11px; }
.voice-status-card small { grid-column: 2; display: block; margin-top: 3px; color: var(--muted); font-size: 9px; }
.voice-status-dot { width: 9px; height: 9px; border-radius: 50%; background: #28b984; box-shadow: 0 0 0 5px rgba(40,185,132,.12); }
.voice-status-card[data-mode="listening"] { border-color: #8fd0b8; background: #eefaf5; }
.voice-status-card[data-mode="listening"] .voice-status-dot { background: #12a976; animation: pulse .85s infinite; }
.voice-status-card[data-mode="success"] { border-color: #a9dcc8; background: #f0fbf6; }
.voice-status-card[data-mode="error"] { border-color: #efc2c2; background: #fff6f6; }
.voice-status-card[data-mode="error"] .voice-status-dot { background: #d04b4b; box-shadow: 0 0 0 5px rgba(208,75,75,.1); }
.voice-listen-button { min-width: 156px; height: 42px; display: inline-flex; align-items: center; justify-content: center; gap: 9px; padding: 0 15px; border: 0; border-radius: 12px; color: white; background: linear-gradient(145deg, var(--green-600), var(--green-800)); box-shadow: 0 9px 22px rgba(9,96,70,.2); font-size: 10px; }
.voice-listen-button span { width: 23px; height: 23px; display: grid; place-items: center; border-radius: 8px; background: rgba(255,255,255,.14); font-size: 8px; }
.voice-listen-button.listening { background: linear-gradient(145deg, #b54242, #7d2828); }
.voice-transcript { display: grid; gap: 5px; padding: 13px 15px; border-left: 3px solid var(--teal); border-radius: 3px 13px 13px 3px; background: #eef7f8; }
.voice-transcript span { color: #5f7779; font-size: 8px; font-weight: 800; letter-spacing: .9px; text-transform: uppercase; }
.voice-transcript strong { overflow: hidden; color: #123d42; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.voice-command-form { display: grid; gap: 7px; }
.voice-command-form label { color: #51615a; font-size: 9px; font-weight: 800; }
.voice-command-form > div { display: grid; grid-template-columns: 1fr auto; gap: 8px; }
.voice-command-form input { min-width: 0; height: 44px; padding: 0 14px; border: 1px solid #cfded7; border-radius: 12px; outline: 0; background: white; font-size: 11px; }
.voice-command-form input:focus { border-color: #57b692; box-shadow: 0 0 0 4px rgba(36,166,117,.1); }
.voice-command-help { padding: 14px; border: 1px solid #e1ebe6; border-radius: 16px; background: #fbfdfc; }
.voice-help-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.voice-help-heading strong, .voice-help-heading small { display: block; }
.voice-help-heading strong { font-size: 10px; }
.voice-help-heading small { margin-top: 3px; color: var(--muted); font-size: 8px; }
.voice-help-heading > span { padding: 4px 8px; border-radius: 999px; color: #0d6b78; background: #e5f4f5; font-size: 8px; font-weight: 800; }
.voice-command-chips { display: flex; flex-wrap: wrap; gap: 7px; }
.voice-command-chips button { padding: 7px 10px; border: 1px solid #d8e6e0; border-radius: 999px; color: #315148; background: white; font-size: 9px; font-weight: 730; transition: .16s ease; }
.voice-command-chips button:hover { color: white; border-color: var(--green-600); background: var(--green-600); transform: translateY(-1px); }
.voice-privacy-note { display: grid; grid-template-columns: 25px 1fr; gap: 9px; align-items: start; padding: 10px 12px; border-radius: 12px; color: #6c745f; background: #fff9e8; }
.voice-privacy-note > span { width: 23px; height: 23px; display: grid; place-items: center; border-radius: 8px; color: white; background: #b68b2d; font: 850 10px Georgia, serif; }
.voice-privacy-note p { margin: 1px 0 0; font-size: 8px; line-height: 1.55; }
.voice-live-indicator { position: fixed; left: 50%; bottom: 25px; z-index: 190; transform: translateX(-50%); min-width: 300px; display: grid; grid-template-columns: 45px 1fr auto; gap: 11px; align-items: center; padding: 10px 11px; border: 1px solid rgba(255,255,255,.14); border-radius: 16px; color: white; background: rgba(5,42,32,.94); box-shadow: 0 18px 50px rgba(0,0,0,.28); backdrop-filter: blur(14px); }
.voice-live-indicator strong, .voice-live-indicator small { display: block; }
.voice-live-indicator strong { font-size: 10px; }
.voice-live-indicator small { margin-top: 2px; color: #a9cabd; font-size: 8px; }
.voice-live-indicator button { padding: 7px 10px; border: 1px solid rgba(255,255,255,.13); border-radius: 9px; color: white; background: rgba(255,255,255,.08); font-size: 8px; }
.voice-wave { height: 34px; display: flex; align-items: center; justify-content: center; gap: 3px; border-radius: 11px; background: #13946c; }
.voice-wave i { width: 3px; height: 9px; border-radius: 3px; background: white; animation: voice-bar .72s ease-in-out infinite alternate; }
.voice-wave i:nth-child(2) { animation-delay: .12s; }
.voice-wave i:nth-child(3) { animation-delay: .24s; }
.voice-wave i:nth-child(4) { animation-delay: .36s; }
@keyframes voice-bar { to { height: 23px; } }
.voice-target-pulse { animation: voice-target 1.05s ease-out; }
@keyframes voice-target { 0% { box-shadow: 0 0 0 0 rgba(21,149,109,.35); } 55% { box-shadow: 0 0 0 8px rgba(21,149,109,.08); } 100% { box-shadow: none; } }

@media (max-width: 760px) {
  .voice-command-trigger kbd { display: none; }
  .voice-command-label { display: none; }
  .voice-command-trigger { width: 38px; padding: 0; justify-content: center; }
  .voice-command-panel { padding: 15px 8px; align-items: start; }
  .voice-command-card { width: calc(100vw - 16px); border-radius: 19px; }
  .voice-command-header { grid-template-columns: 52px 1fr 34px; gap: 11px; padding: 17px 14px; }
  .voice-command-header h2 { font-size: 19px; }
  .voice-command-header p { display: none; }
  .voice-orb { width: 50px; height: 50px; border-radius: 17px; }
  .voice-orb span { width: 13px; height: 18px; border-width: 2px; }
  .voice-orb span::after { left: 19px; top: 27px; width: 12px; height: 9px; border-width: 2px; border-top: 0; }
  .voice-command-body { padding: 14px; }
  .voice-status-card { align-items: stretch; flex-direction: column; }
  .voice-listen-button { width: 100%; }
  .voice-command-form > div { grid-template-columns: 1fr; }
  .voice-command-form .btn { height: 42px; }
  .voice-live-indicator { width: calc(100vw - 24px); min-width: 0; bottom: 12px; }
}

/* V4.1: Landscape pages use the full two-page flipbook spread. */
.flip-spread.landscape-double-page {
  grid-template-columns: 1fr;
  width: min(1320px, 97vw);
  height: min(760px, calc(100vh - 170px));
  justify-content: center;
  align-items: center;
  gap: 0;
}

.flip-spread.landscape-double-page .book-page {
  grid-column: 1 / -1;
  width: 100%;
  height: 100%;
  max-width: 100%;
  margin: 0 auto;
  transform-origin: center center;
}

.flip-spread.landscape-double-page .book-page.exact-template img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.flip-spread.portrait-pair {
  grid-template-columns: 1fr 1fr;
}

.flip-control-btn:disabled {
  opacity: .35;
  cursor: not-allowed;
}

@media (max-width: 760px) {
  .flip-spread.landscape-double-page {
    width: 98vw;
    height: min(70vh, 560px);
  }
}

@media (max-width: 620px) {
  .flip-spread.landscape-double-page .book-page:first-child {
    display: block;
  }
}

/* V6: persistent hands-free voice navigation. */
.voice-command-trigger { position: relative; }
.voice-always-badge { display: none; padding: 3px 6px; border-radius: 999px; color: #072c21; background: #7be0b9; font-size: 7px; font-weight: 900; letter-spacing: .8px; }
.voice-command-trigger.hands-free-on .voice-always-badge { display: inline-flex; }
.voice-command-trigger.hands-free-on { border-color: rgba(123,224,185,.5); background: rgba(32,150,109,.22); }
.voice-command-trigger.hands-free-on .voice-command-mic { animation: hands-free-mic-pulse 1.35s ease-in-out infinite; }
@keyframes hands-free-mic-pulse { 50% { transform: scale(1.18); filter: drop-shadow(0 0 7px rgba(123,224,185,.8)); } }
.voice-listen-button.hands-free-on { background: linear-gradient(145deg, #b54242, #7d2828); }
.voice-live-indicator.waiting .voice-wave { background: #a47823; }
.voice-live-indicator.waiting .voice-wave i { animation-play-state: paused; height: 8px; }
.voice-live-indicator:not(.hidden) { animation: voice-indicator-in .2s ease-out; }
@keyframes voice-indicator-in { from { opacity: 0; transform: translate(-50%, 8px); } }
@media (max-width: 760px) {
  .voice-always-badge { display: none !important; }
}

/* V7 transparent premium forms hub */
.workspace { background:
  radial-gradient(circle at 85% 0%, rgba(133,207,177,.18), transparent 28%),
  linear-gradient(135deg, rgba(247,252,249,.96), rgba(235,247,241,.88)); }
.document-settings-grid { display:grid; grid-template-columns:1fr 1fr; gap:18px; margin-bottom:18px; }
.document-setting-card { position:relative; overflow:hidden; border:1px solid rgba(177,211,196,.62); border-radius:20px; padding:18px; background:rgba(255,255,255,.68); backdrop-filter:blur(16px); box-shadow:0 14px 38px rgba(10,69,50,.08); }
.document-setting-head { display:flex; align-items:center; justify-content:space-between; gap:12px; }
.document-setting-head>div { display:flex; align-items:center; gap:10px; }
.document-setting-head h2 { margin:0; font-size:17px; text-transform:uppercase; letter-spacing:.02em; }
.editable-badge { display:inline-flex; align-items:center; padding:5px 9px; border-radius:999px; background:rgba(212,243,230,.8); color:#08714f; font-size:10px; font-weight:800; }
.document-setting-body { display:grid; grid-template-columns:135px 1fr; gap:18px; margin-top:14px; min-height:185px; align-items:center; position:relative; }
.document-thumb { height:178px; padding:6px; border:1px solid rgba(20,72,55,.2); background:rgba(255,255,255,.72); border-radius:10px; box-shadow:0 6px 18px rgba(10,50,38,.09); z-index:2; }
.document-thumb img { width:100%; height:100%; object-fit:contain; }
.document-summary { margin:0; display:grid; gap:12px; z-index:2; }
.document-summary div { display:grid; grid-template-columns:105px 1fr; gap:12px; }
.document-summary dt { font-weight:800; color:#344a42; font-size:12px; }
.document-summary dd { margin:0; color:#203a31; font-size:12px; }
.document-note { margin:8px 0 0 153px; color:var(--muted); font-size:11px; position:relative; z-index:2; }
.setting-art { position:absolute; right:-20px; bottom:-30px; width:230px; height:210px; opacity:.22; background-repeat:no-repeat; background-position:center; background-size:contain; }
.cover-art { background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 240 210'%3E%3Cg fill='none' stroke='%23559c72' stroke-width='3'%3E%3Cpath d='M125 205c-4-70 13-127 62-181M135 162c35-2 61-18 73-48-34-2-61 13-73 48ZM146 120c-5-31 6-57 32-75 13 30 2 56-32 75ZM120 182c-31-4-54-21-66-51 33 1 56 18 66 51ZM130 144c-27-9-44-29-48-59 29 6 47 26 48 59Z'/%3E%3C/g%3E%3C/svg%3E"); }
.toc-art { background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 240 210'%3E%3Cg fill='none' stroke='%23559c72' stroke-width='3'%3E%3Cpath d='M120 55c-28-24-60-27-96-17v119c38-9 70-3 96 21V55Zm0 0c28-24 60-27 96-17v119c-38-9-70-3-96 21V55Z'/%3E%3Cpath d='M120 178c0-35 11-65 33-90m-5 48c22-1 39-11 48-31-23-1-39 9-48 31Zm-5-19c-4-21 3-39 21-51 9 20 2 38-21 51Z'/%3E%3C/g%3E%3C/svg%3E"); }
.month-editing-panel { display:flex; justify-content:space-between; align-items:center; gap:20px; border:1px solid rgba(177,211,196,.6); background:rgba(255,255,255,.6); backdrop-filter:blur(14px); padding:14px 18px; border-radius:18px 18px 0 0; }
.section-title-line { display:flex; align-items:center; gap:10px; }.section-title-line h2{margin:0;font-size:16px}.month-editing-panel p{margin:5px 0 0;color:var(--muted);font-size:11px}
.month-switcher { display:grid; grid-template-columns:auto 170px; align-items:center; gap:8px 12px; font-size:11px; font-weight:700; }.month-switcher select{border:1px solid #d3e4dc;border-radius:10px;padding:9px 12px;background:rgba(255,255,255,.9);font-weight:800}.month-switcher small{grid-column:1/3;text-align:right;color:var(--muted);font-weight:500}
.premium-form-grid { border:1px solid rgba(177,211,196,.6); border-top:0; padding:14px; border-radius:0 0 20px 20px; background:rgba(255,255,255,.42); backdrop-filter:blur(14px); }
.themed-card { background:linear-gradient(110deg,rgba(255,255,255,.9),rgba(245,251,247,.72)); border-color:rgba(158,205,185,.55); min-height:158px; }
.themed-card::before { content:""; position:absolute; right:-8px; bottom:-8px; width:155px; height:105px; opacity:.17; background-size:contain; background-position:right bottom; background-repeat:no-repeat; pointer-events:none; }
.themed-card h3,.themed-card p,.themed-card .form-card-footer,.themed-card .form-card-top{position:relative;z-index:2}
.form-a::before,.form-b::before,.form-h::before{background-image:linear-gradient(165deg,transparent 30%,rgba(55,147,92,.35)),url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 160 100'%3E%3Cpath d='M0 92c35-45 80-53 160-60M0 99c48-31 101-40 160-43M20 85c28-31 58-43 92-46' fill='none' stroke='%230b7754' stroke-width='3'/%3E%3C/svg%3E")}
.form-c::before,.form-d::before,.form-k::before{background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 160 100'%3E%3Cg fill='none' stroke='%230b7754' stroke-width='3'%3E%3Ccircle cx='103' cy='23' r='10'/%3E%3Cpath d='M100 34 85 58l13 34m3-55 25 20m-41 2-19 28m43-38 18 40M35 91c12-22 25-34 42-39'/%3E%3C/g%3E%3C/svg%3E")}
.form-e::before{background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 160 100'%3E%3Cg fill='none' stroke='%230b7754' stroke-width='3'%3E%3Ccircle cx='55' cy='32' r='12'/%3E%3Ccircle cx='105' cy='32' r='12'/%3E%3Cpath d='M32 92c1-31 12-47 23-47s22 16 23 47m4 0c1-31 12-47 23-47s22 16 23 47'/%3E%3C/g%3E%3C/svg%3E")}
.form-f::before{background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 160 100'%3E%3Cg fill='none' stroke='%230b7754' stroke-width='3'%3E%3Cpath d='M25 68h91l14 15H33Z M58 68V39h38l18 29M68 39V24h30v15'/%3E%3Ccircle cx='55' cy='82' r='13'/%3E%3Ccircle cx='119' cy='82' r='10'/%3E%3C/g%3E%3C/svg%3E")}
.form-g::before,.form-i::before{background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 160 100'%3E%3Cg fill='none' stroke='%230b7754' stroke-width='3'%3E%3Crect x='42' y='10' width='72' height='82' rx='6'/%3E%3Cpath d='M58 31h40M58 47h40M58 63h25m20 1 9 9 18-23'/%3E%3C/g%3E%3C/svg%3E")}
.form-j::before{background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 160 100'%3E%3Cg fill='none' stroke='%230b7754' stroke-width='3'%3E%3Ccircle cx='68' cy='53' r='36'/%3E%3Cpath d='M68 17v36l31 19M68 53 38 76M111 82h35m-15 0V48'/%3E%3C/g%3E%3C/svg%3E")}
.form-l::before,.form-m::before,.form-n::before{background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 160 100'%3E%3Cg fill='none' stroke='%230b7754' stroke-width='3'%3E%3Cellipse cx='55' cy='72' rx='25' ry='9'/%3E%3Cpath d='M30 55c0 5 11 9 25 9s25-4 25-9m-50-13c0 5 11 9 25 9s25-4 25-9M30 42v30m50-30v30'/%3E%3Cpath d='M118 20v62m-23 0h46M102 35h32l-16-15Z'/%3E%3C/g%3E%3C/svg%3E")}
.modal-wide{max-width:920px}.modal-xl{max-width:1180px}.modal-section-title{margin:22px 0 10px}.staff-editor{display:grid;gap:8px}.staff-row{display:grid;grid-template-columns:55px 1.4fr 1fr 1fr;gap:8px;align-items:center}.staff-row input,.toc-editor input,.toc-editor select{border:1px solid #d7e5df;border-radius:8px;padding:9px;background:white}.toc-editor{display:grid;gap:7px}.toc-editor-head,.toc-editor-row{display:grid;grid-template-columns:55px 2.3fr 1fr 130px;gap:8px;align-items:center}.toc-editor-head{font-weight:800;color:#466055;font-size:11px;padding:0 4px}.toc-editor-row strong{text-align:center}
.flip-stage { grid-template-columns:auto 1fr; gap:18px; }
.flip-form-nav { display:flex; flex-direction:column; gap:6px; padding:12px 9px; border:1px solid rgba(255,255,255,.17); border-radius:15px; background:rgba(5,35,27,.58); backdrop-filter:blur(12px); box-shadow:0 12px 25px rgba(0,0,0,.2); max-height:calc(100vh - 190px); overflow:auto; }
.flip-form-nav strong { font-size:11px;text-align:center;margin-bottom:3px;color:#d9eee5; }
.flip-form-nav button { width:38px;height:32px;border-radius:9px;border:1px solid rgba(255,255,255,.22);background:rgba(255,255,255,.07);color:white;font-weight:800;cursor:pointer;transition:.18s; }
.flip-form-nav button:hover,.flip-form-nav button.active { background:#9bd665;color:#123c2d;border-color:#c9f2a7;transform:translateX(2px); }
@media(max-width:1000px){.document-settings-grid{grid-template-columns:1fr}.flip-form-nav{display:none}.flip-stage{grid-template-columns:1fr}.month-editing-panel{align-items:flex-start;flex-direction:column}.month-switcher{width:100%;grid-template-columns:100px 1fr}.document-setting-body{grid-template-columns:110px 1fr}.document-thumb{height:150px}.document-note{margin-left:128px}}

/* V8 — production implementation of the approved reference design */
:root {
  --sidebar-w: 244px;
  --topbar-h: 62px;
  --reference-green: #006d4f;
  --reference-deep: #003e30;
  --reference-mint: #eaf6f0;
}

body {
  background: #eef5f1;
}

.sidebar {
  padding: 18px 14px 16px;
  background:
    linear-gradient(180deg, rgba(0, 63, 48, .2), rgba(0, 26, 20, .64)),
    url('/saduai/mdbooklet/assets/art/sidebar-tea.svg') center bottom / 100% auto no-repeat,
    linear-gradient(160deg, #004d3b, #00291f 78%);
  box-shadow: 12px 0 34px rgba(0, 45, 33, .16);
}
.sidebar::after { opacity: .55; }
.brand { padding: 2px 8px 16px; }
.brand-mark { width: 42px; height: 42px; border-radius: 13px; }
.brand strong { font-size: 19px; }
.product-label { margin: 4px 10px 14px; font-size: 9px; letter-spacing: 1.55px; color: #9fc3b6; }
.nav-item { padding: 10px 10px; border-radius: 11px; font-size: 12px; }
.nav-icon { width: 29px; height: 29px; border-radius: 8px; }
.nav-item.active { background: linear-gradient(90deg, rgba(21, 171, 120, .46), rgba(4, 104, 74, .28)); box-shadow: inset 3px 0 0 #5be0ae, 0 8px 22px rgba(0,0,0,.08); }
.quality-card { background: rgba(2, 58, 44, .62); border-color: rgba(166, 230, 204, .17); }
.sidebar-footer { background: rgba(0, 45, 34, .18); border-radius: 12px; padding: 12px 8px 0; }

.topbar {
  padding: 0 26px;
  background: rgba(249, 252, 250, .88);
  border-bottom-color: rgba(180, 211, 197, .55);
  box-shadow: 0 8px 24px rgba(14, 77, 57, .035);
}
.workspace {
  padding: 20px 24px 24px;
  background:
    radial-gradient(circle at 78% 2%, rgba(123, 198, 166, .12), transparent 25%),
    linear-gradient(145deg, #f7fbf9 0%, #edf6f1 55%, #f4faf7 100%);
}

.forms-overview-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin: -2px 0 14px;
}
.forms-overview-heading p {
  margin: 0;
  color: #657870;
  font-size: 11px;
  line-height: 1.5;
}
.forms-overview-heading .heading-actions { gap: 9px; }
.forms-overview-heading .btn { padding: 9px 14px; border-radius: 10px; }

.reference-document-grid {
  gap: 14px;
  margin-bottom: 14px;
}
.document-setting-card {
  min-height: 258px;
  padding: 14px 15px 13px;
  border-radius: 14px;
  border: 1px solid rgba(164, 201, 184, .52);
  background: linear-gradient(118deg, rgba(255,255,255,.92), rgba(247,252,249,.76));
  box-shadow: 0 8px 24px rgba(9, 67, 48, .055);
}
.document-setting-card::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(90deg, rgba(255,255,255,.25), transparent 55%);
}
.document-setting-head { position: relative; z-index: 3; }
.document-setting-head h2 { font-size: 14px; letter-spacing: .01em; }
.document-setting-head .btn { background: rgba(255,255,255,.68); backdrop-filter: blur(9px); }
.editable-badge { padding: 4px 8px; font-size: 9px; background: rgba(224, 246, 236, .92); }
.document-setting-body {
  grid-template-columns: 122px 1fr;
  gap: 18px;
  min-height: 168px;
  margin-top: 11px;
}
.document-thumb {
  width: 118px;
  height: 166px;
  padding: 5px;
  border-radius: 7px;
  background: rgba(255,255,255,.88);
  border-color: rgba(51, 96, 79, .25);
  box-shadow: 0 5px 13px rgba(0, 63, 45, .075);
}
.document-summary { gap: 15px; max-width: 365px; }
.document-summary div { grid-template-columns: 102px minmax(0,1fr); gap: 13px; }
.document-summary dt { font-size: 11px; color: #243d34; }
.document-summary dd { font-size: 11px; color: #1c332b; }
.document-note { margin: 4px 0 0 140px; font-size: 10px; }
.setting-art { right: -8px; bottom: -16px; width: 280px; height: 210px; opacity: .72; }
.cover-art { background-image: url('/saduai/mdbooklet/assets/art/cover-leaves.svg'); }
.toc-art { width: 330px; background-image: url('/saduai/mdbooklet/assets/art/toc-book.svg'); }
.cover-setting-card { background: linear-gradient(110deg, rgba(255,255,255,.94) 0%, rgba(251,254,252,.84) 60%, rgba(234,246,237,.68) 100%); }
.toc-setting-card { background: linear-gradient(110deg, rgba(255,255,255,.94) 0%, rgba(251,254,252,.84) 52%, rgba(229,242,233,.7) 100%); }

.reference-month-panel {
  border-radius: 13px 13px 0 0;
  padding: 13px 16px 11px;
  background: rgba(255,255,255,.72);
  border-color: rgba(166, 203, 186, .52);
  box-shadow: 0 5px 18px rgba(8, 66, 48, .035);
}
.section-title-line h2 { font-size: 14px; text-transform: uppercase; letter-spacing: .02em; }
.month-editing-panel p { font-size: 10px; }
.month-switcher { grid-template-columns: auto 165px auto; gap: 7px 10px; }
.month-switcher select { padding: 8px 11px; border-radius: 9px; }
.month-switcher small { grid-column: 3; text-align: left; white-space: nowrap; }

.reference-form-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  padding: 10px;
  border-radius: 0 0 14px 14px;
  background: rgba(255,255,255,.48);
  border-color: rgba(166, 203, 186, .52);
}
.reference-form-grid .form-card {
  min-height: 116px;
  padding: 12px 12px 10px;
  border-radius: 12px;
  border-color: rgba(169, 204, 188, .46);
  background: linear-gradient(116deg, rgba(255,255,255,.94), rgba(248,252,249,.82));
  box-shadow: 0 4px 12px rgba(6, 59, 42, .04);
}
.reference-form-grid .form-card:hover {
  transform: translateY(-2px);
  border-color: rgba(62, 151, 111, .55);
  box-shadow: 0 12px 25px rgba(4, 69, 48, .10);
}
.reference-form-grid .form-card::after { display: none; }
.reference-form-grid .form-card-top { align-items: flex-start; }
.reference-form-grid .form-code {
  width: 31px;
  height: 31px;
  border-radius: 9px;
  font-size: 13px;
  background: linear-gradient(145deg, #08775a, #005c47);
  box-shadow: 0 5px 12px rgba(0, 95, 69, .18);
}
.reference-form-grid .status-pill { padding: 4px 7px; font-size: 8px; }
.reference-form-grid .form-card-content { position: relative; z-index: 3; min-height: 34px; padding: 2px 40px 0 42px; margin-top: -29px; display: flex; align-items: flex-start; }
.reference-form-grid .form-card h3 {
  margin: 0;
  max-width: 100%;
  font-size: 11px;
  line-height: 1.28;
  text-align: left;
  color: #0e201a;
}
.reference-form-grid .form-card-footer { position: relative; z-index: 3; margin-top: auto; align-items: flex-end; }
.reference-form-grid .form-meta { gap: 4px; max-width: calc(100% - 34px); align-items: center; }
.reference-form-grid .meta-chip { font-size: 7px; padding: 3px 5px; background: rgba(236, 245, 240, .88); }
.reference-form-grid .row-count-compact { display: block; flex-basis: 100%; color: #657a70; font-size: 8px; margin-top: 5px; }
.reference-form-grid .open-arrow { width: 28px; height: 28px; border-radius: 8px; background: rgba(255,255,255,.82); border: 1px solid rgba(166, 204, 187, .55); box-shadow: 0 4px 9px rgba(0, 70, 49, .05); }
.reference-form-grid .themed-card::before {
  right: -4px;
  bottom: -5px;
  width: 145px;
  height: 90px;
  opacity: .62;
  background-position: right bottom;
  filter: saturate(.84);
}
.reference-form-grid .form-a::before { background-image: url('/saduai/mdbooklet/assets/art/leaf-sprout.svg'), url('/saduai/mdbooklet/assets/art/tea-fields.svg'); }
.reference-form-grid .form-b::before { background-image: url('/saduai/mdbooklet/assets/art/tea-fields.svg'); }
.reference-form-grid .form-c::before,
.reference-form-grid .form-d::before { background-image: url('/saduai/mdbooklet/assets/art/tea-picker.svg'); }
.reference-form-grid .form-e::before { background-image: url('/saduai/mdbooklet/assets/art/labour-team.svg'); }
.reference-form-grid .form-f::before { background-image: url('/saduai/mdbooklet/assets/art/tractor.svg'); }
.reference-form-grid .form-g::before { background-image: url('/saduai/mdbooklet/assets/art/document-check.svg'); }
.reference-form-grid .form-h::before { background-image: url('/saduai/mdbooklet/assets/art/growth-chart.svg'), url('/saduai/mdbooklet/assets/art/tea-fields.svg'); }
.reference-form-grid .form-i::before { background-image: url('/saduai/mdbooklet/assets/art/clipboard.svg'); }
.reference-form-grid .form-j::before { background-image: url('/saduai/mdbooklet/assets/art/pie-chart.svg'); }
.reference-form-grid .form-k::before { background-image: url('/saduai/mdbooklet/assets/art/worker-chart.svg'); }
.reference-form-grid .form-l::before { background-image: url('/saduai/mdbooklet/assets/art/calculator-coins.svg'); }
.reference-form-grid .form-m::before { background-image: url('/saduai/mdbooklet/assets/art/coins-leaves.svg'); }
.reference-form-grid .form-n::before { background-image: url('/saduai/mdbooklet/assets/art/break-even.svg'); }

/* Keep data-entry and other operational views untouched by the compact forms-hub rules. */
.studio-shell .form-card { min-height: initial; }

@media (max-width: 1500px) {
  .reference-form-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 1240px) {
  :root { --sidebar-w: 226px; }
  .reference-document-grid { grid-template-columns: 1fr; }
  .reference-form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .month-switcher { grid-template-columns: 90px 1fr; width: 100%; }
  .month-switcher small { grid-column: 1 / -1; }
}
@media (max-width: 760px) {
  .forms-overview-heading { align-items: flex-start; flex-direction: column; }
  .reference-form-grid { grid-template-columns: 1fr; }
  .document-setting-body { grid-template-columns: 100px 1fr; }
  .document-thumb { width: 96px; height: 138px; }
  .document-note { margin-left: 114px; }
}

/* ========================================================================== 
   V9 secure login + user-supplied visual backgrounds
   ========================================================================== */
.auth-pending { visibility: hidden; }
.login-screen { position: fixed; inset: 0; z-index: 1000; display: grid; place-items: center; padding: 24px; overflow: auto; background: #082f26 url('/saduai/mdbooklet/assets/backgrounds/login-bg.png?v=20260730-080820') center/cover no-repeat; }
.login-screen.hidden { display: none; }
.login-veil { position: absolute; inset: 0; background: linear-gradient(105deg, rgba(3,36,29,.94) 0%, rgba(3,48,37,.78) 40%, rgba(4,45,35,.28) 100%); backdrop-filter: blur(2px); }
.login-card { position: relative; width: min(460px, 94vw); margin-left: min(8vw, 120px); justify-self: start; padding: 34px; border: 1px solid rgba(255,255,255,.34); border-radius: 26px; color: #10231c; background: rgba(255,255,255,.91); box-shadow: 0 30px 90px rgba(0,24,18,.38); backdrop-filter: blur(22px); }
.login-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 34px; }
.login-brand-mark { width: 50px; height: 50px; display: grid; place-items: center; border-radius: 16px; color: white; font-size: 24px; font-weight: 900; background: linear-gradient(145deg,#12a979,#046748); box-shadow: 0 12px 28px rgba(4,103,72,.28); }
.login-brand strong { display: block; font-size: 22px; line-height: 1; }
.login-brand span { display: block; margin-top: 4px; color: #497066; font-size: 12px; }
.login-copy > span { color: #087454; font-size: 10px; font-weight: 850; letter-spacing: 1.7px; text-transform: uppercase; }
.login-copy h1 { max-width: 360px; margin: 10px 0 10px; font-size: 31px; line-height: 1.08; letter-spacing: -.8px; }
.login-copy p { margin: 0 0 25px; color: #587069; font-size: 12px; line-height: 1.65; }
.login-form { display: grid; gap: 16px; }
.login-form label { display: grid; gap: 7px; }
.login-form label > span { color: #35574d; font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .7px; }
.login-form input { width: 100%; height: 48px; padding: 0 14px; border: 1px solid #cbded7; border-radius: 13px; outline: none; color: #10231c; background: rgba(255,255,255,.88); font-size: 14px; }
.login-form input:focus { border-color: #1a9b70; box-shadow: 0 0 0 4px rgba(26,155,112,.12); }
.password-field { position: relative; }
.password-field input { padding-right: 65px; }
.password-field button { position: absolute; right: 8px; top: 7px; bottom: 7px; padding: 0 11px; border: 0; border-radius: 9px; color: #087454; background: #e7f5ef; font-size: 10px; font-weight: 800; }
.login-error { min-height: 18px; margin: -6px 0 -2px; color: #b33c3c; font-size: 10px; font-weight: 700; }
.login-submit { height: 51px; display: flex; align-items: center; justify-content: space-between; padding: 0 18px; border: 0; border-radius: 14px; color: white; background: linear-gradient(135deg,#0a7957,#04553e); box-shadow: 0 13px 28px rgba(4,85,62,.24); font-size: 13px; font-weight: 850; cursor: pointer; }
.login-submit:disabled { opacity: .6; cursor: wait; }
.login-submit b { font-size: 21px; }
.login-security { margin-top: 22px; color: #668078; font-size: 9px; text-align: center; }
.login-security span { color: #16a674; }
.logout-button { flex: 0 0 auto; }

/* Visual surfaces remain readable because content is protected by a white veil. */
.hero-card { isolation: isolate; overflow: hidden; background: rgba(8,76,58,.94); }
.hero-card::before { content: ''; position: absolute; inset: 0; z-index: -2; background: url('/saduai/mdbooklet/assets/backgrounds/command-center-bg.png') center/cover no-repeat; opacity: .66; }
.hero-card::after { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgba(4,54,42,.97) 0%, rgba(4,66,50,.88) 49%, rgba(6,73,55,.42) 100%); }

.document-setting-card { position: relative; isolation: isolate; overflow: hidden; background-color: rgba(255,255,255,.88); }
.document-setting-card::before { content: ''; position: absolute; inset: 0; z-index: -2; background-position: right center; background-repeat: no-repeat; background-size: cover; opacity: .58; }
.document-setting-card::after { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgba(255,255,255,.99) 0%, rgba(255,255,255,.94) 54%, rgba(255,255,255,.52) 100%); }
.cover-setting-card::before { background-image: url('/saduai/mdbooklet/assets/backgrounds/cover-bg.png'); background-size: 52% auto; background-position: 95% 55%; }
.toc-setting-card::before { background-image: url('/saduai/mdbooklet/assets/backgrounds/toc-bg.png'); }
.cover-setting-card .setting-art, .toc-setting-card .setting-art { display: none; }

.reference-form-grid .form-card { min-height: 130px; position: relative; isolation: isolate; overflow: hidden; border-color: rgba(188,212,202,.68); background-color: rgba(255,255,255,.86); box-shadow: 0 9px 28px rgba(27,72,58,.07); backdrop-filter: blur(8px); }
.reference-form-grid .form-card::before { content: ''; position: absolute; inset: 0; z-index: -2; background-position: right center; background-size: cover; background-repeat: no-repeat; opacity: .72; transition: transform .28s ease, opacity .28s ease; }
.reference-form-grid .form-card::after { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgba(255,255,255,.99) 0%, rgba(255,255,255,.95) 48%, rgba(255,255,255,.48) 100%); }
.reference-form-grid .form-card:hover::before { transform: scale(1.035); opacity: .82; }
.reference-form-grid .form-card > * { position: relative; z-index: 1; }
.reference-form-grid .form-card-content { width: 70%; }
.reference-form-grid .form-card-content h3 { text-align: left; }
.reference-form-grid .form-card-footer { align-items: flex-end; }
.reference-form-grid .form-a::before { background-image: url('/saduai/mdbooklet/assets/backgrounds/form-a.png'); }
.reference-form-grid .form-b::before { background-image: url('/saduai/mdbooklet/assets/backgrounds/form-b.png'); }
.reference-form-grid .form-c::before { background-image: url('/saduai/mdbooklet/assets/backgrounds/form-c.png'); }
.reference-form-grid .form-d::before { background-image: url('/saduai/mdbooklet/assets/backgrounds/form-d.png'); }
.reference-form-grid .form-e::before { background-image: url('/saduai/mdbooklet/assets/backgrounds/form-e.png'); }
.reference-form-grid .form-f::before { background-image: url('/saduai/mdbooklet/assets/backgrounds/form-f.png'); }
.reference-form-grid .form-g::before { background-image: url('/saduai/mdbooklet/assets/backgrounds/form-g.png'); }
.reference-form-grid .form-h::before { background-image: url('/saduai/mdbooklet/assets/backgrounds/form-h.png'); }
.reference-form-grid .form-i::before { background-image: url('/saduai/mdbooklet/assets/backgrounds/form-i.png'); }
.reference-form-grid .form-j::before { background-image: url('/saduai/mdbooklet/assets/backgrounds/form-j.png'); }
.reference-form-grid .form-k::before { background-image: url('/saduai/mdbooklet/assets/backgrounds/form-k.png'); }
.reference-form-grid .form-l::before { background-image: url('/saduai/mdbooklet/assets/backgrounds/form-l.png'); }
.reference-form-grid .form-m::before { background-image: url('/saduai/mdbooklet/assets/backgrounds/form-m.png'); }
.reference-form-grid .form-n::before { background-image: url('/saduai/mdbooklet/assets/backgrounds/form-n.png'); }

@media (max-width: 760px) {
  .login-card { margin: 0; justify-self: center; padding: 25px; }
  .login-copy h1 { font-size: 26px; }
  .reference-form-grid .form-card-content { width: 78%; }
}

/* BEGIN LOGIN RIGHT IMAGE LAYOUT */

/* Split the login screen into a left login panel and right image panel */
.login-screen {
    position: fixed !important;
    inset: 0 !important;
    z-index: 1000 !important;

    display: grid !important;
    grid-template-columns: max(430px, 32vw) minmax(0, 1fr) !important;
    place-items: stretch !important;

    min-height: 100vh !important;
    padding: 0 !important;
    overflow: hidden !important;

    background: #063b30 !important;
}

/* Complete image on the right side */
.login-screen::before {
    content: "" !important;
    position: absolute !important;

    top: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    left: max(430px, 32vw) !important;

    z-index: 0 !important;

    background-color: #edf3ee !important;
    background-image: url('/saduai/mdbooklet/assets/backgrounds/login-bg.png?v=20260730-080820') !important;
    background-repeat: no-repeat !important;
    background-position: center center !important;

    /* Displays the complete image without cropping */
    background-size: contain !important;
}

/* Dark background only behind the login section */
.login-veil {
    position: absolute !important;
    top: 0 !important;
    bottom: 0 !important;
    left: 0 !important;
    right: auto !important;

    width: max(430px, 32vw) !important;
    z-index: 1 !important;

    background:
        radial-gradient(
            circle at 30% 28%,
            rgba(17, 119, 87, 0.36),
            transparent 45%
        ),
        linear-gradient(
            145deg,
            rgba(2, 61, 47, 0.98),
            rgba(3, 43, 35, 0.98)
        ) !important;

    backdrop-filter: none !important;
}

/* Keep the login card centred inside the left section */
.login-card {
    position: relative !important;
    grid-column: 1 !important;

    align-self: center !important;
    justify-self: center !important;

    width: min(390px, calc(100% - 56px)) !important;
    margin: 0 !important;
    padding: 34px !important;

    z-index: 3 !important;

    background: rgba(255, 255, 255, 0.95) !important;
    border: 1px solid rgba(255, 255, 255, 0.45) !important;
    box-shadow: 0 28px 75px rgba(0, 25, 19, 0.42) !important;
    backdrop-filter: blur(18px) !important;
}

/* Soft separation between the two sections */
.login-screen::after {
    content: "" !important;
    position: absolute !important;

    top: 0 !important;
    bottom: 0 !important;
    left: max(430px, 32vw) !important;

    width: 70px !important;
    transform: translateX(-100%) !important;

    z-index: 2 !important;
    pointer-events: none !important;

    background: linear-gradient(
        90deg,
        rgba(3, 43, 35, 0.75),
        rgba(3, 43, 35, 0)
    ) !important;
}

/* Tablet and mobile layout */
@media (max-width: 900px) {
    .login-screen {
        display: grid !important;
        grid-template-columns: 1fr !important;
        place-items: center !important;
        padding: 22px !important;

        background:
            linear-gradient(
                rgba(3, 48, 38, 0.62),
                rgba(3, 48, 38, 0.62)
            ),
            url('/saduai/mdbooklet/assets/backgrounds/login-bg.png?v=20260730-080820')
            center / cover no-repeat !important;
    }

    .login-screen::before,
    .login-screen::after {
        display: none !important;
    }

    .login-veil {
        position: absolute !important;
        inset: 0 !important;
        width: 100% !important;
        background: rgba(2, 45, 35, 0.42) !important;
    }

    .login-card {
        grid-column: 1 !important;
        width: min(420px, 94vw) !important;
        padding: 26px !important;
    }
}

/* END LOGIN RIGHT IMAGE LAYOUT */

/* BEGIN FULL FORM BACKGROUND UPGRADE */

/* ==========================================================
   FORMS A-N LIST PAGE — FULL CARD BACKGROUNDS
   ========================================================== */

.reference-form-grid .form-card {
    position: relative !important;
    isolation: isolate !important;
    overflow: hidden !important;
    background: rgba(255, 255, 255, 0.24) !important;
}

/*
Fixes the old thumbnail dimensions.

The previous design kept the pseudo-element at approximately
145px × 90px. These rules force it to cover the complete card.
*/
.reference-form-grid .form-card::before {
    content: "" !important;
    position: absolute !important;

    inset: 0 !important;
    top: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    left: 0 !important;

    width: auto !important;
    height: auto !important;

    z-index: -2 !important;
    display: block !important;

    background-size: cover !important;
    background-position: center center !important;
    background-repeat: no-repeat !important;

    opacity: 0.50 !important;
    filter: none !important;

    pointer-events: none !important;
}

/* White readability layer over the card image */
.reference-form-grid .form-card::after {
    content: "" !important;
    position: absolute !important;
    inset: 0 !important;

    z-index: -1 !important;
    display: block !important;

    background: linear-gradient(
        90deg,
        rgba(255, 255, 255, 0.90) 0%,
        rgba(255, 255, 255, 0.72) 48%,
        rgba(255, 255, 255, 0.48) 100%
    ) !important;

    pointer-events: none !important;
}

.reference-form-grid .form-card > * {
    position: relative !important;
    z-index: 2 !important;
}

.reference-form-grid .form-card-content {
    width: 82% !important;
}

/* Make labels readable above the images */
.reference-form-grid .meta-chip {
    background: rgba(244, 250, 247, 0.86) !important;
    backdrop-filter: blur(3px) !important;
}

.reference-form-grid .status-pill {
    backdrop-filter: blur(4px) !important;
}

.reference-form-grid .open-arrow {
    background: rgba(255, 255, 255, 0.88) !important;
    backdrop-filter: blur(4px) !important;
}


/* ==========================================================
   INDIVIDUAL FORM PAGE — FULL-PAGE WATERMARK
   ========================================================== */

.studio-shell.form-page-shell {
    position: relative !important;
    isolation: isolate !important;
    overflow: hidden !important;

    border-radius: 20px !important;
    padding: 0 !important;

    background: transparent !important;
}

/* Active Form A-N image behind the complete page */
.studio-shell.form-page-shell::before {
    content: "" !important;
    position: absolute !important;
    inset: 0 !important;

    z-index: -2 !important;

    background-size: cover !important;
    background-position: center center !important;
    background-repeat: no-repeat !important;

    /* 50% transparency */
    opacity: 0.50 !important;

    pointer-events: none !important;
}

/* Light veil protecting table readability */
.studio-shell.form-page-shell::after {
    content: "" !important;
    position: absolute !important;
    inset: 0 !important;

    z-index: -1 !important;

    background: rgba(244, 250, 247, 0.48) !important;

    pointer-events: none !important;
}


/* ==========================================================
   FORM A-N PAGE IMAGE MAPPING
   ========================================================== */

.studio-shell.form-page-shell.form-a::before {
    background-image:
        url('/saduai/mdbooklet/assets/backgrounds/form-a.png?v=full-bg-1');
}

.studio-shell.form-page-shell.form-b::before {
    background-image:
        url('/saduai/mdbooklet/assets/backgrounds/form-b.png?v=full-bg-1');
}

.studio-shell.form-page-shell.form-c::before {
    background-image:
        url('/saduai/mdbooklet/assets/backgrounds/form-c.png?v=full-bg-1');
}

.studio-shell.form-page-shell.form-d::before {
    background-image:
        url('/saduai/mdbooklet/assets/backgrounds/form-d.png?v=full-bg-1');
}

.studio-shell.form-page-shell.form-e::before {
    background-image:
        url('/saduai/mdbooklet/assets/backgrounds/form-e.png?v=full-bg-1');
}

.studio-shell.form-page-shell.form-f::before {
    background-image:
        url('/saduai/mdbooklet/assets/backgrounds/form-f.png?v=full-bg-1');
}

.studio-shell.form-page-shell.form-g::before {
    background-image:
        url('/saduai/mdbooklet/assets/backgrounds/form-g.png?v=full-bg-1');
}

.studio-shell.form-page-shell.form-h::before {
    background-image:
        url('/saduai/mdbooklet/assets/backgrounds/form-h.png?v=full-bg-1');
}

.studio-shell.form-page-shell.form-i::before {
    background-image:
        url('/saduai/mdbooklet/assets/backgrounds/form-i.png?v=full-bg-1');
}

.studio-shell.form-page-shell.form-j::before {
    background-image:
        url('/saduai/mdbooklet/assets/backgrounds/form-j.png?v=full-bg-1');
}

.studio-shell.form-page-shell.form-k::before {
    background-image:
        url('/saduai/mdbooklet/assets/backgrounds/form-k.png?v=full-bg-1');
}

.studio-shell.form-page-shell.form-l::before {
    background-image:
        url('/saduai/mdbooklet/assets/backgrounds/form-l.png?v=full-bg-1');
}

.studio-shell.form-page-shell.form-m::before {
    background-image:
        url('/saduai/mdbooklet/assets/backgrounds/form-m.png?v=full-bg-1');
}

.studio-shell.form-page-shell.form-n::before {
    background-image:
        url('/saduai/mdbooklet/assets/backgrounds/form-n.png?v=full-bg-1');
}


/* ==========================================================
   TRANSPARENT CONTENT PANELS
   ========================================================== */

.form-page-shell .form-nav-panel,
.form-page-shell .studio-header,
.form-page-shell .studio-content {
    background: rgba(255, 255, 255, 0.78) !important;
    backdrop-filter: blur(2px) !important;
}

.form-page-shell .metadata-strip {
    background: rgba(247, 251, 249, 0.76) !important;
}

.form-page-shell .table-toolbar {
    background: rgba(255, 255, 255, 0.72) !important;
}

.form-page-shell .data-grid-wrap {
    background: rgba(255, 255, 255, 0.34) !important;
}

/* Table data stays readable while showing the watermark */
.form-page-shell .data-grid td {
    background: rgba(255, 255, 255, 0.82) !important;
}

.form-page-shell .data-grid tr:nth-child(even) td {
    background: rgba(249, 252, 250, 0.78) !important;
}

.form-page-shell .data-grid td.computed {
    background: rgba(232, 247, 239, 0.84) !important;
}

.form-page-shell .data-grid td:first-child {
    background: rgba(240, 246, 243, 0.88) !important;
}

.form-page-shell .field input,
.form-page-shell .field select,
.form-page-shell .field textarea {
    background: rgba(255, 255, 255, 0.88) !important;
}

.form-page-shell .form-nav-item {
    background: rgba(255, 255, 255, 0.40) !important;
}

.form-page-shell .form-nav-item.active {
    background: rgba(226, 246, 238, 0.90) !important;
}


/* ==========================================================
   RESPONSIVE VIEW
   ========================================================== */

@media (max-width: 900px) {
    .studio-shell.form-page-shell::before {
        background-size: cover !important;
        opacity: 0.34 !important;
    }

    .reference-form-grid .form-card::before {
        opacity: 0.44 !important;
    }
}

/* END FULL FORM BACKGROUND UPGRADE */

/* BEGIN LOGIN HIDDEN STATE FIX */

#loginScreen.hidden,
.login-screen.hidden,
#loginScreen.login-screen.hidden {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

#app:not(.auth-pending) {
    visibility: visible !important;
    opacity: 1 !important;
    pointer-events: auto !important;
}

/* END LOGIN HIDDEN STATE FIX */

/* BEGIN FULL WORKSPACE WATERMARK PATCH */

/* ==========================================================
   FULL FORM PAGE WATERMARK ACROSS ALL SECTIONS
   ========================================================== */

.studio-shell.form-page-shell {
    position: relative !important;
    isolation: isolate !important;
    overflow: hidden !important;
    min-height: calc(100vh - 120px) !important;
    border-radius: 18px !important;
    background: transparent !important;
}

/* full background image */
.studio-shell.form-page-shell::before {
    content: "" !important;
    position: absolute !important;
    inset: 0 !important;
    z-index: -2 !important;
    pointer-events: none !important;

    background-size: cover !important;
    background-position: center center !important;
    background-repeat: no-repeat !important;

    /* watermark strength */
    opacity: 0.22 !important;
}

/* soft white readability layer */
.studio-shell.form-page-shell::after {
    content: "" !important;
    position: absolute !important;
    inset: 0 !important;
    z-index: -1 !important;
    pointer-events: none !important;

    background:
        linear-gradient(
            180deg,
            rgba(248, 252, 249, 0.74) 0%,
            rgba(248, 252, 249, 0.62) 55%,
            rgba(248, 252, 249, 0.58) 100%
        ) !important;
}

/* ==========================================================
   APPLY FORM IMAGE TO FULL PAGE
   ========================================================== */

.studio-shell.form-page-shell.form-a::before {
    background-image: url('/saduai/mdbooklet/assets/backgrounds/form-a.png?v=workspace-1');
}
.studio-shell.form-page-shell.form-b::before {
    background-image: url('/saduai/mdbooklet/assets/backgrounds/form-b.png?v=workspace-1');
}
.studio-shell.form-page-shell.form-c::before {
    background-image: url('/saduai/mdbooklet/assets/backgrounds/form-c.png?v=workspace-1');
}
.studio-shell.form-page-shell.form-d::before {
    background-image: url('/saduai/mdbooklet/assets/backgrounds/form-d.png?v=workspace-1');
}
.studio-shell.form-page-shell.form-e::before {
    background-image: url('/saduai/mdbooklet/assets/backgrounds/form-e.png?v=workspace-1');
}
.studio-shell.form-page-shell.form-f::before {
    background-image: url('/saduai/mdbooklet/assets/backgrounds/form-f.png?v=workspace-1');
}
.studio-shell.form-page-shell.form-g::before {
    background-image: url('/saduai/mdbooklet/assets/backgrounds/form-g.png?v=workspace-1');
}
.studio-shell.form-page-shell.form-h::before {
    background-image: url('/saduai/mdbooklet/assets/backgrounds/form-h.png?v=workspace-1');
}
.studio-shell.form-page-shell.form-i::before {
    background-image: url('/saduai/mdbooklet/assets/backgrounds/form-i.png?v=workspace-1');
}
.studio-shell.form-page-shell.form-j::before {
    background-image: url('/saduai/mdbooklet/assets/backgrounds/form-j.png?v=workspace-1');
}
.studio-shell.form-page-shell.form-k::before {
    background-image: url('/saduai/mdbooklet/assets/backgrounds/form-k.png?v=workspace-1');
}
.studio-shell.form-page-shell.form-l::before {
    background-image: url('/saduai/mdbooklet/assets/backgrounds/form-l.png?v=workspace-1');
}
.studio-shell.form-page-shell.form-m::before {
    background-image: url('/saduai/mdbooklet/assets/backgrounds/form-m.png?v=workspace-1');
}
.studio-shell.form-page-shell.form-n::before {
    background-image: url('/saduai/mdbooklet/assets/backgrounds/form-n.png?v=workspace-1');
}

/* ==========================================================
   MAKE ALL INNER SECTIONS TRANSPARENT / GLASSY
   ========================================================== */

.form-page-shell .form-nav-panel,
.form-page-shell .booklet-sections,
.form-page-shell .studio-sidebar,
.form-page-shell .studio-header,
.form-page-shell .studio-content,
.form-page-shell .studio-main,
.form-page-shell .metadata-strip,
.form-page-shell .tabs-strip,
.form-page-shell .filters-panel,
.form-page-shell .table-toolbar,
.form-page-shell .data-grid-wrap,
.form-page-shell .sheet-wrap,
.form-page-shell .table-card,
.form-page-shell .panel,
.form-page-shell .card {
    background: rgba(255, 255, 255, 0.60) !important;
    backdrop-filter: blur(3px) !important;
}

/* left menu section items */
.form-page-shell .form-nav-item,
.form-page-shell .section-item,
.form-page-shell .booklet-section-item {
    background: rgba(255, 255, 255, 0.48) !important;
    backdrop-filter: blur(2px) !important;
}

.form-page-shell .form-nav-item.active,
.form-page-shell .section-item.active,
.form-page-shell .booklet-section-item.active {
    background: rgba(226, 246, 238, 0.88) !important;
    border-color: rgba(34, 128, 94, 0.30) !important;
}

/* inputs and filters */
.form-page-shell input,
.form-page-shell select,
.form-page-shell textarea {
    background: rgba(255, 255, 255, 0.82) !important;
}

/* table */
.form-page-shell .data-grid,
.form-page-shell table {
    background: rgba(255, 255, 255, 0.35) !important;
}

.form-page-shell .data-grid th,
.form-page-shell table th {
    background: rgba(16, 108, 79, 0.90) !important;
}

.form-page-shell .data-grid td,
.form-page-shell table td {
    background: rgba(255, 255, 255, 0.72) !important;
}

.form-page-shell .data-grid tr:nth-child(even) td,
.form-page-shell table tr:nth-child(even) td {
    background: rgba(248, 252, 249, 0.66) !important;
}

.form-page-shell .data-grid td.computed {
    background: rgba(227, 245, 236, 0.82) !important;
}

/* remove solid blocks that hide the watermark */
.form-page-shell .studio-content,
.form-page-shell .data-grid-wrap,
.form-page-shell .sheet-wrap,
.form-page-shell .table-card {
    box-shadow: none !important;
}

/* ==========================================================
   MOBILE
   ========================================================== */

@media (max-width: 900px) {
    .studio-shell.form-page-shell {
        min-height: auto !important;
    }

    .studio-shell.form-page-shell::before {
        background-size: cover !important;
        background-position: center center !important;
        opacity: 0.16 !important;
    }

    .form-page-shell .form-nav-panel,
    .form-page-shell .studio-header,
    .form-page-shell .studio-content,
    .form-page-shell .data-grid-wrap {
        background: rgba(255, 255, 255, 0.72) !important;
    }
}

/* END FULL WORKSPACE WATERMARK PATCH */

/* BEGIN DATA INPUT WATERMARK FIX */

/* ==========================================================
   ACTIVE FORM IMAGE VARIABLES
   ========================================================== */

.form-page-shell.form-a {
    --active-form-watermark:
        url('/saduai/mdbooklet/assets/backgrounds/form-a.png?v=data-watermark-2');
}

.form-page-shell.form-b {
    --active-form-watermark:
        url('/saduai/mdbooklet/assets/backgrounds/form-b.png?v=data-watermark-2');
}

.form-page-shell.form-c {
    --active-form-watermark:
        url('/saduai/mdbooklet/assets/backgrounds/form-c.png?v=data-watermark-2');
}

.form-page-shell.form-d {
    --active-form-watermark:
        url('/saduai/mdbooklet/assets/backgrounds/form-d.png?v=data-watermark-2');
}

.form-page-shell.form-e {
    --active-form-watermark:
        url('/saduai/mdbooklet/assets/backgrounds/form-e.png?v=data-watermark-2');
}

.form-page-shell.form-f {
    --active-form-watermark:
        url('/saduai/mdbooklet/assets/backgrounds/form-f.png?v=data-watermark-2');
}

.form-page-shell.form-g {
    --active-form-watermark:
        url('/saduai/mdbooklet/assets/backgrounds/form-g.png?v=data-watermark-2');
}

.form-page-shell.form-h {
    --active-form-watermark:
        url('/saduai/mdbooklet/assets/backgrounds/form-h.png?v=data-watermark-2');
}

.form-page-shell.form-i {
    --active-form-watermark:
        url('/saduai/mdbooklet/assets/backgrounds/form-i.png?v=data-watermark-2');
}

.form-page-shell.form-j {
    --active-form-watermark:
        url('/saduai/mdbooklet/assets/backgrounds/form-j.png?v=data-watermark-2');
}

.form-page-shell.form-k {
    --active-form-watermark:
        url('/saduai/mdbooklet/assets/backgrounds/form-k.png?v=data-watermark-2');
}

.form-page-shell.form-l {
    --active-form-watermark:
        url('/saduai/mdbooklet/assets/backgrounds/form-l.png?v=data-watermark-2');
}

.form-page-shell.form-m {
    --active-form-watermark:
        url('/saduai/mdbooklet/assets/backgrounds/form-m.png?v=data-watermark-2');
}

.form-page-shell.form-n {
    --active-form-watermark:
        url('/saduai/mdbooklet/assets/backgrounds/form-n.png?v=data-watermark-2');
}


/* ==========================================================
   REMOVE OLD IMAGE BELOW THE TABLE
   ========================================================== */

.studio-shell.form-page-shell::before,
.studio-shell.form-page-shell::after {
    content: none !important;
    display: none !important;
}


/* ==========================================================
   COMPLETE DATA INPUT SECTION WATERMARK
   ========================================================== */

.form-page-shell .studio-main {
    background-image:
        linear-gradient(
            rgba(246, 251, 248, 0.68),
            rgba(246, 251, 248, 0.68)
        ),
        var(--active-form-watermark) !important;

    background-size:
        100% 100%,
        cover !important;

    background-position:
        center,
        center !important;

    background-repeat:
        no-repeat,
        no-repeat !important;

    border-radius: 20px !important;
    overflow: hidden !important;
}


/* ==========================================================
   LEFT BOOKLET SECTIONS WATERMARK
   ========================================================== */

.form-page-shell .form-nav-panel {
    background-image:
        linear-gradient(
            rgba(255, 255, 255, 0.80),
            rgba(255, 255, 255, 0.80)
        ),
        var(--active-form-watermark) !important;

    background-size:
        100% 100%,
        cover !important;

    background-position:
        center,
        center !important;

    background-repeat:
        no-repeat,
        no-repeat !important;
}


/* ==========================================================
   HEADER AND DATA CONTENT
   ========================================================== */

.form-page-shell .studio-header {
    background: rgba(255, 255, 255, 0.64) !important;
    backdrop-filter: blur(3px) !important;
}

.form-page-shell .studio-content {
    background-image:
        linear-gradient(
            rgba(255, 255, 255, 0.58),
            rgba(255, 255, 255, 0.58)
        ),
        var(--active-form-watermark) !important;

    background-size:
        100% 100%,
        cover !important;

    background-position:
        center,
        center !important;

    background-repeat:
        no-repeat,
        no-repeat !important;

    border-color: rgba(44, 112, 88, 0.18) !important;
}


/* ==========================================================
   METADATA AND TOOLBAR
   ========================================================== */

.form-page-shell .metadata-strip {
    background: rgba(248, 252, 250, 0.62) !important;
    backdrop-filter: blur(2px) !important;
}

.form-page-shell .table-toolbar {
    background: rgba(255, 255, 255, 0.55) !important;
    backdrop-filter: blur(2px) !important;
}


/* ==========================================================
   IMAGE DIRECTLY BEHIND DATA TABLE
   ========================================================== */

.form-page-shell .data-grid-wrap {
    background-image:
        linear-gradient(
            rgba(255, 255, 255, 0.48),
            rgba(255, 255, 255, 0.48)
        ),
        var(--active-form-watermark) !important;

    background-size:
        100% 100%,
        cover !important;

    background-position:
        center,
        center !important;

    background-repeat:
        no-repeat,
        no-repeat !important;
}


/* ==========================================================
   TRANSPARENT TABLE CELLS
   ========================================================== */

.form-page-shell .data-grid {
    background: transparent !important;
}

.form-page-shell .data-grid td {
    background: rgba(255, 255, 255, 0.70) !important;
}

.form-page-shell .data-grid tr:nth-child(even) td {
    background: rgba(248, 252, 250, 0.66) !important;
}

.form-page-shell .data-grid td:first-child {
    background: rgba(237, 245, 241, 0.78) !important;
}

.form-page-shell .data-grid td.computed {
    background: rgba(224, 244, 235, 0.76) !important;
}


/* Inputs remain readable but allow the watermark to show */
.form-page-shell .data-grid input,
.form-page-shell .data-grid select {
    background: rgba(255, 255, 255, 0.10) !important;
    color: #17382f !important;
}

.form-page-shell .data-grid input:focus,
.form-page-shell .data-grid select:focus {
    background: rgba(255, 255, 255, 0.90) !important;
}


/* Keep headings strong and readable */
.form-page-shell .data-grid th {
    background: rgba(0, 104, 73, 0.94) !important;
    color: #ffffff !important;
}


/* ==========================================================
   NAVIGATION ITEMS
   ========================================================== */

.form-page-shell .form-nav-item {
    background: rgba(255, 255, 255, 0.56) !important;
    backdrop-filter: blur(2px) !important;
}

.form-page-shell .form-nav-item.active {
    background: rgba(221, 245, 235, 0.90) !important;
}


/* ==========================================================
   OTHER FORM TABS
   ========================================================== */

.form-page-shell .import-zone,
.form-page-shell .upload-card,
.form-page-shell .validation-card,
.form-page-shell .validation-list,
.form-page-shell .preview-stage,
.form-page-shell .empty-grid {
    background: rgba(255, 255, 255, 0.66) !important;
    backdrop-filter: blur(2px) !important;
}


/* ==========================================================
   SMALLER SCREENS
   ========================================================== */

@media (max-width: 900px) {
    .form-page-shell .studio-main,
    .form-page-shell .studio-content,
    .form-page-shell .data-grid-wrap {
        background-size:
            100% 100%,
            cover !important;

        background-position:
            center,
            center !important;
    }

    .form-page-shell .data-grid td {
        background: rgba(255, 255, 255, 0.78) !important;
    }
}

/* END DATA INPUT WATERMARK FIX */

/* BEGIN VISIBLE DATA WATERMARK */

/* Active image for each form */
.form-page-shell.form-a { --visible-watermark: url('/saduai/mdbooklet/assets/backgrounds/form-a.png?v=wm-visible-1'); }
.form-page-shell.form-b { --visible-watermark: url('/saduai/mdbooklet/assets/backgrounds/form-b.png?v=wm-visible-1'); }
.form-page-shell.form-c { --visible-watermark: url('/saduai/mdbooklet/assets/backgrounds/form-c.png?v=wm-visible-1'); }
.form-page-shell.form-d { --visible-watermark: url('/saduai/mdbooklet/assets/backgrounds/form-d.png?v=wm-visible-1'); }
.form-page-shell.form-e { --visible-watermark: url('/saduai/mdbooklet/assets/backgrounds/form-e.png?v=wm-visible-1'); }
.form-page-shell.form-f { --visible-watermark: url('/saduai/mdbooklet/assets/backgrounds/form-f.png?v=wm-visible-1'); }
.form-page-shell.form-g { --visible-watermark: url('/saduai/mdbooklet/assets/backgrounds/form-g.png?v=wm-visible-1'); }
.form-page-shell.form-h { --visible-watermark: url('/saduai/mdbooklet/assets/backgrounds/form-h.png?v=wm-visible-1'); }
.form-page-shell.form-i { --visible-watermark: url('/saduai/mdbooklet/assets/backgrounds/form-i.png?v=wm-visible-1'); }
.form-page-shell.form-j { --visible-watermark: url('/saduai/mdbooklet/assets/backgrounds/form-j.png?v=wm-visible-1'); }
.form-page-shell.form-k { --visible-watermark: url('/saduai/mdbooklet/assets/backgrounds/form-k.png?v=wm-visible-1'); }
.form-page-shell.form-l { --visible-watermark: url('/saduai/mdbooklet/assets/backgrounds/form-l.png?v=wm-visible-1'); }
.form-page-shell.form-m { --visible-watermark: url('/saduai/mdbooklet/assets/backgrounds/form-m.png?v=wm-visible-1'); }
.form-page-shell.form-n { --visible-watermark: url('/saduai/mdbooklet/assets/backgrounds/form-n.png?v=wm-visible-1'); }

/* Main data workspace */
.form-page-shell .studio-main {
    position: relative !important;
    isolation: isolate !important;
    overflow: hidden !important;
    background: rgba(246, 251, 248, 0.30) !important;
}

/* One visible image layer covering header, metadata and table */
.form-page-shell .studio-main::before {
    content: "" !important;
    position: absolute !important;
    inset: 0 !important;
    z-index: 0 !important;
    pointer-events: none !important;

    background-image: var(--visible-watermark) !important;
    background-repeat: no-repeat !important;
    background-position: center center !important;
    background-size: cover !important;

    /* Watermark visibility */
    opacity: 0.23 !important;
    filter: saturate(0.90) contrast(0.95) !important;
}

/* Keep all application content above the watermark */
.form-page-shell .studio-main > * {
    position: relative !important;
    z-index: 1 !important;
}

/* Header allows the watermark to show softly */
.form-page-shell .studio-header {
    background: rgba(255, 255, 255, 0.58) !important;
    backdrop-filter: blur(1px) !important;
}

/* Main data section */
.form-page-shell .studio-content {
    background: rgba(255, 255, 255, 0.30) !important;
    backdrop-filter: none !important;
}

/* Metadata fields */
.form-page-shell .metadata-strip {
    background: rgba(250, 253, 251, 0.52) !important;
    backdrop-filter: blur(1px) !important;
}

/* Toolbar */
.form-page-shell .table-toolbar {
    background: rgba(255, 255, 255, 0.48) !important;
}

/* Table container remains transparent */
.form-page-shell .data-grid-wrap,
.form-page-shell .sheet-wrap,
.form-page-shell .table-card {
    background: rgba(255, 255, 255, 0.16) !important;
    backdrop-filter: none !important;
}

/* Remove duplicate background images from inner containers */
.form-page-shell .studio-content,
.form-page-shell .data-grid-wrap,
.form-page-shell .form-nav-panel {
    background-image: none !important;
}

/* Table itself */
.form-page-shell .data-grid,
.form-page-shell table {
    background: transparent !important;
}

/* Readable cells with watermark still visible */
.form-page-shell .data-grid td,
.form-page-shell table td {
    background: rgba(255, 255, 255, 0.64) !important;
}

.form-page-shell .data-grid tr:nth-child(even) td,
.form-page-shell table tr:nth-child(even) td {
    background: rgba(247, 251, 249, 0.58) !important;
}

.form-page-shell .data-grid td.computed {
    background: rgba(222, 243, 233, 0.68) !important;
}

/* Inputs remain easy to use */
.form-page-shell input,
.form-page-shell select,
.form-page-shell textarea {
    background: rgba(255, 255, 255, 0.72) !important;
    color: #173b31 !important;
}

.form-page-shell input:focus,
.form-page-shell select:focus,
.form-page-shell textarea:focus {
    background: rgba(255, 255, 255, 0.96) !important;
}

/* Keep table headings strong */
.form-page-shell .data-grid th,
.form-page-shell table th {
    background: rgba(0, 100, 72, 0.94) !important;
    color: white !important;
}

/* Left booklet-section panel also receives a subtle watermark */
.form-page-shell .form-nav-panel {
    position: relative !important;
    isolation: isolate !important;
    overflow: hidden !important;
    background: rgba(255, 255, 255, 0.56) !important;
}

.form-page-shell .form-nav-panel::before {
    content: "" !important;
    position: absolute !important;
    inset: 0 !important;
    z-index: 0 !important;
    pointer-events: none !important;

    background-image: var(--visible-watermark) !important;
    background-position: center !important;
    background-size: cover !important;
    background-repeat: no-repeat !important;
    opacity: 0.12 !important;
}

.form-page-shell .form-nav-panel > * {
    position: relative !important;
    z-index: 1 !important;
}

.form-page-shell .form-nav-item {
    background: rgba(255, 255, 255, 0.56) !important;
}

.form-page-shell .form-nav-item.active {
    background: rgba(219, 245, 234, 0.88) !important;
}

/* Ensure older outer-shell backgrounds do not create an image below the table */
.studio-shell.form-page-shell::before,
.studio-shell.form-page-shell::after {
    content: none !important;
    display: none !important;
}

@media (max-width: 900px) {
    .form-page-shell .studio-main::before {
        opacity: 0.16 !important;
        background-size: cover !important;
    }

    .form-page-shell .data-grid td,
    .form-page-shell table td {
        background: rgba(255, 255, 255, 0.74) !important;
    }
}

/* END VISIBLE DATA WATERMARK */

/* BEGIN BOOKLET SECTIONS SCROLLBAR */

/* Fixed-height Booklet sections panel */
.form-page-shell .form-nav-panel {
    display: block !important;
    position: sticky !important;
    top: 92px !important;

    height: calc(100vh - 125px) !important;
    max-height: calc(100vh - 125px) !important;
    min-height: 420px !important;

    overflow-y: scroll !important;
    overflow-x: hidden !important;
    overscroll-behavior: contain !important;
    scrollbar-gutter: stable !important;

    padding-right: 8px !important;

    scrollbar-width: thin !important;
    scrollbar-color: rgba(0, 108, 78, 0.72)
                     rgba(222, 239, 232, 0.65) !important;
}

/* Keep Booklet sections heading visible while scrolling */
.form-page-shell .form-nav-title {
    position: sticky !important;
    top: -1px !important;
    z-index: 20 !important;

    margin: -4px -3px 8px -3px !important;
    padding: 7px 5px 11px 5px !important;

    background: rgba(255, 255, 255, 0.94) !important;
    backdrop-filter: blur(8px) !important;
    border-bottom: 1px solid rgba(0, 108, 78, 0.13) !important;
}

/* Chrome, Edge and Safari scrollbar */
.form-page-shell .form-nav-panel::-webkit-scrollbar {
    width: 10px !important;
}

.form-page-shell .form-nav-panel::-webkit-scrollbar-track {
    background: rgba(222, 239, 232, 0.65) !important;
    border-radius: 20px !important;
}

.form-page-shell .form-nav-panel::-webkit-scrollbar-thumb {
    background: rgba(0, 108, 78, 0.72) !important;
    border: 2px solid rgba(222, 239, 232, 0.85) !important;
    border-radius: 20px !important;
}

.form-page-shell .form-nav-panel::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 82, 59, 0.90) !important;
}

/* Slightly reduce spacing so all section items remain neat */
.form-page-shell .form-nav-item {
    margin-bottom: 5px !important;
}

/* Mobile and smaller screens */
@media (max-width: 900px) {
    .form-page-shell .form-nav-panel {
        position: relative !important;
        top: auto !important;

        height: 280px !important;
        min-height: 280px !important;
        max-height: 280px !important;

        overflow-y: scroll !important;
    }
}

/* END BOOKLET SECTIONS SCROLLBAR */

/* BEGIN BOOKLET HISTORY STYLES */

.history-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 22px;

    padding: 18px 22px !important;
    margin-bottom: 16px;
}

.history-summary > div {
    display: flex;
    align-items: baseline;
    gap: 10px;
}

.history-summary strong {
    font-size: 28px;
    color: #087556;
}

.history-summary span,
.history-summary p {
    color: #61716b;
    margin: 0;
}

.history-grid {
    display: grid;
    gap: 12px;
}

.history-booklet-card {
    display: grid;
    grid-template-columns:
        82px
        minmax(0, 1fr)
        auto;

    align-items: center;
    gap: 18px;

    padding: 16px;

    border:
        1px solid
        rgba(12, 98, 73, 0.14);

    border-radius: 16px;

    background:
        rgba(255, 255, 255, 0.90);

    box-shadow:
        0 8px 24px
        rgba(17, 60, 47, 0.06);
}

.history-booklet-card.current {
    border-color:
        rgba(7, 130, 91, 0.48);

    box-shadow:
        0 0 0 2px
        rgba(7, 130, 91, 0.08),
        0 10px 28px
        rgba(17, 60, 47, 0.08);
}

.history-month-tile {
    display: grid;
    place-items: center;

    min-height: 72px;

    border-radius: 14px;

    color: #ffffff;

    background:
        linear-gradient(
            145deg,
            #087b5b,
            #04523f
        );
}

.history-month-tile strong {
    font-size: 18px;
    letter-spacing: 0.08em;
}

.history-month-tile span {
    font-size: 12px;
    opacity: 0.86;
}

.history-booklet-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
}

.history-kicker {
    display: block;

    margin-bottom: 3px;

    color: #087556;

    font-size: 9px;
    font-weight: 800;

    letter-spacing: 0.13em;
}

.history-booklet-heading h3 {
    margin: 0;

    font-size: 16px;
    color: #173c31;
}

.history-booklet-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 18px;

    margin-top: 10px;
}

.history-booklet-meta span {
    display: grid;
    gap: 2px;

    color: #60716b;
    font-size: 11px;
}

.history-booklet-meta b {
    color: #28483e;

    font-size: 9px;

    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.history-booklet-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;

    min-width: 128px;
}

.history-booklet-actions .btn {
    justify-content: center;
    text-align: center;
}

@media (max-width: 900px) {
    .history-summary,
    .history-booklet-heading {
        align-items: flex-start;
        flex-direction: column;
    }

    .history-booklet-card {
        grid-template-columns:
            68px
            minmax(0, 1fr);
    }

    .history-booklet-actions {
        grid-column: 1 / -1;
        flex-direction: row;
    }
}

/* END BOOKLET HISTORY STYLES */

/* BEGIN ESTATE DIVISION MASTER STYLES */
.metadata-strip select[data-meta-key="form_division"] {
  font-weight: 700;
  color: #17483a;
  background: rgba(255,255,255,.86) !important;
}
.metadata-strip input:disabled {
  color: #557068;
  background: rgba(239,247,243,.78) !important;
  cursor: not-allowed;
}
/* END ESTATE DIVISION MASTER STYLES */

/* BEGIN FULL-WIDTH FLIPBOOK VIEWER */

/* Use almost the complete browser width for landscape official pages. */
.flipbook-overlay {
    grid-template-rows: 48px minmax(0, 1fr) 48px !important;
}

.flipbook-topbar {
    min-height: 48px !important;
    padding: 0 14px !important;
}

.flipbook-title strong {
    font-size: 11px !important;
}

.flipbook-title small {
    font-size: 8px !important;
}

.flip-stage {
    position: relative !important;
    display: block !important;
    min-width: 0 !important;
    min-height: 0 !important;
    padding: 6px 8px 28px 72px !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    perspective: none !important;
    scrollbar-gutter: stable !important;
}

/* Keep form shortcuts visible without taking width away from the page. */
.flip-form-nav {
    position: fixed !important;
    left: 10px !important;
    top: 50% !important;
    z-index: 6 !important;
    transform: translateY(-50%) !important;
    max-height: calc(100dvh - 120px) !important;
}

.flip-spread.landscape-double-page {
    display: block !important;
    width: calc(100vw - 92px) !important;
    height: auto !important;
    max-width: none !important;
    max-height: none !important;
    aspect-ratio: 792 / 612 !important;
    margin: 0 auto !important;
    filter: drop-shadow(0 18px 28px rgba(0, 0, 0, .42)) !important;
}

.flip-spread.landscape-double-page .book-page,
.flip-spread.landscape-double-page .book-page.exact-template {
    display: block !important;
    width: 100% !important;
    height: auto !important;
    max-width: none !important;
    max-height: none !important;
    aspect-ratio: 792 / 612 !important;
    margin: 0 !important;
}

.flip-spread.landscape-double-page .book-page.exact-template img {
    display: block !important;
    width: 100% !important;
    height: auto !important;
    aspect-ratio: 792 / 612 !important;
    object-fit: contain !important;
}

.flip-controls {
    min-height: 48px !important;
}

.flip-control-btn {
    width: 36px !important;
    height: 36px !important;
}

@media (max-width: 1000px) {
    .flip-stage {
        padding-left: 6px !important;
    }

    .flip-spread.landscape-double-page {
        width: calc(100vw - 14px) !important;
    }
}

/* END FULL-WIDTH FLIPBOOK VIEWER */

/* BEGIN FIT-ONE-SCREEN FLIPBOOK */

/*
   Fit every official page or spread inside one browser screen.
   Portrait pages retain their real portrait proportions instead of being
   stretched across a wide white card. Landscape reports use the largest size
   that still keeps the complete page visible without vertical scrolling.
*/
.flipbook-overlay {
    grid-template-rows: 48px minmax(0, 1fr) 48px !important;
}

.flip-stage {
    position: relative !important;
    display: grid !important;
    place-items: center !important;
    min-width: 0 !important;
    min-height: 0 !important;
    padding: 6px 72px !important;
    overflow: hidden !important;
    perspective: none !important;
}

.flip-form-nav {
    position: fixed !important;
    left: 10px !important;
    top: 50% !important;
    z-index: 6 !important;
    transform: translateY(-50%) !important;
    max-height: calc(100dvh - 118px) !important;
}

.flip-spread {
    margin: 0 auto !important;
    max-width: none !important;
    max-height: none !important;
    height: auto !important;
    filter: drop-shadow(0 16px 24px rgba(0, 0, 0, .38)) !important;
}

/* One portrait page: cover and final quote page. */
.flip-spread.single.portrait-single {
    display: grid !important;
    grid-template-columns: 1fr !important;
    width: min(
        calc(100vw - 110px),
        calc((100dvh - 108px) * 0.7071)
    ) !important;
    aspect-ratio: 595.32 / 841.92 !important;
    justify-content: center !important;
    align-items: center !important;
    gap: 0 !important;
}

/* Two approved portrait pages displayed as a complete open spread. */
.flip-spread.portrait-pair {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    width: min(
        calc(100vw - 110px),
        calc((100dvh - 108px) * 1.4142)
    ) !important;
    aspect-ratio: 1190.64 / 841.92 !important;
    gap: 3px !important;
}

/* One landscape report, maximised but completely visible in one screen. */
.flip-spread.landscape-double-page {
    display: grid !important;
    grid-template-columns: 1fr !important;
    width: min(
        calc(100vw - 110px),
        calc((100dvh - 108px) * 1.29412)
    ) !important;
    aspect-ratio: 792 / 612 !important;
    justify-content: center !important;
    align-items: center !important;
    gap: 0 !important;
}

.flip-spread.single.portrait-single .book-page,
.flip-spread.portrait-pair .book-page,
.flip-spread.landscape-double-page .book-page,
.flip-spread .book-page.exact-template {
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    min-width: 0 !important;
    min-height: 0 !important;
    max-width: none !important;
    max-height: none !important;
    margin: 0 !important;
    padding: 0 !important;
    background: #fff !important;
    overflow: hidden !important;
}

.flip-spread.single.portrait-single .book-page,
.flip-spread.single.portrait-single .book-page.exact-template,
.flip-spread.single.portrait-single .book-page.exact-template img {
    aspect-ratio: 595.32 / 841.92 !important;
}

.flip-spread.portrait-pair .book-page,
.flip-spread.portrait-pair .book-page.exact-template,
.flip-spread.portrait-pair .book-page.exact-template img {
    aspect-ratio: 595.32 / 841.92 !important;
}

.flip-spread.landscape-double-page .book-page,
.flip-spread.landscape-double-page .book-page.exact-template,
.flip-spread.landscape-double-page .book-page.exact-template img {
    aspect-ratio: 792 / 612 !important;
}

.flip-spread .book-page.exact-template img {
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    object-fit: contain !important;
    object-position: center center !important;
    background: #fff !important;
}

.flip-controls {
    min-height: 48px !important;
}

@media (max-width: 1000px) {
    .flip-stage {
        padding-inline: 8px !important;
    }

    .flip-form-nav {
        display: none !important;
    }

    .flip-spread.single.portrait-single {
        width: min(
            calc(100vw - 16px),
            calc((100dvh - 108px) * 0.7071)
        ) !important;
    }

    .flip-spread.portrait-pair {
        width: min(
            calc(100vw - 16px),
            calc((100dvh - 108px) * 1.4142)
        ) !important;
    }

    .flip-spread.landscape-double-page {
        width: min(
            calc(100vw - 16px),
            calc((100dvh - 108px) * 1.29412)
        ) !important;
    }
}

/* END FIT-ONE-SCREEN FLIPBOOK */

/* BEGIN FLIPBOOK ZOOM PAN STYLES */

.flipbook-overlay {
    position: fixed !important;
}

.flip-zoom-toolbar {
    position: absolute;
    top: 55px;
    right: 14px;
    z-index: 80;

    display: inline-flex;
    align-items: center;
    gap: 5px;

    padding: 5px;

    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 12px;

    background: rgba(5, 39, 31, 0.88);
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.28);
    backdrop-filter: blur(10px);

    user-select: none;
    -webkit-user-select: none;
}

.flip-zoom-btn {
    display: inline-grid;
    place-items: center;

    min-width: 34px;
    height: 34px;
    padding: 0 9px;

    border: 1px solid rgba(255, 255, 255, 0.20);
    border-radius: 9px;

    color: #ffffff;
    background: rgba(255, 255, 255, 0.10);

    font: 700 18px/1 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    cursor: pointer;
}

.flip-zoom-btn:hover,
.flip-zoom-btn:focus-visible,
.flip-zoom-reset.is-active {
    border-color: rgba(172, 235, 83, 0.78);
    background: rgba(172, 235, 83, 0.20);
    outline: none;
}

.flip-zoom-btn:disabled {
    opacity: 0.38;
    cursor: not-allowed;
}

.flip-zoom-reset {
    min-width: 44px;
    font-size: 12px;
    letter-spacing: 0.03em;
}

.flip-zoom-value {
    min-width: 54px;
    color: #ffffff;
    font: 700 12px/1 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    text-align: center;
}

.flipbook-overlay .flip-stage {
    touch-action: none !important;
    overscroll-behavior: none !important;
}

.flipbook-overlay .flip-stage.is-zoomed {
    cursor: grab;
}

.flipbook-overlay .flip-stage.is-dragging {
    cursor: grabbing;
}

.flipbook-overlay .flip-spread {
    will-change: transform;
    transition: transform 140ms ease-out;
}

.flipbook-overlay .flip-spread.flip-zoom-interacting {
    transition: none !important;
}

@media (max-width: 700px) {
    .flip-zoom-toolbar {
        top: 51px;
        right: 7px;
        gap: 3px;
        padding: 4px;
    }

    .flip-zoom-btn {
        min-width: 32px;
        height: 32px;
        padding-inline: 7px;
    }

    .flip-zoom-value {
        min-width: 48px;
    }
}

/* END FLIPBOOK ZOOM PAN STYLES */

/* BEGIN BOTTOM ADDITIONAL ROW STYLES */

.form-page-shell .additional-row-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;

    min-height: 74px;
    margin: 10px 10px 18px;
    padding: 14px 16px;

    border: 1px dashed rgba(0, 112, 81, 0.48);
    border-radius: 14px;

    background:
        linear-gradient(
            135deg,
            rgba(232, 248, 240, 0.92),
            rgba(255, 255, 255, 0.88)
        );

    box-shadow:
        0 8px 20px
        rgba(16, 72, 55, 0.07);

    backdrop-filter: blur(4px);
}

.form-page-shell .additional-row-copy {
    display: grid;
    gap: 3px;
    min-width: 0;
}

.form-page-shell .additional-row-copy strong {
    color: #075f46;
    font-size: 13px;
    font-weight: 800;
}

.form-page-shell .additional-row-copy span {
    color: #526b62;
    font-size: 11px;
    line-height: 1.45;
}

.form-page-shell .additional-row-button {
    flex: 0 0 auto;
    min-width: 176px;
    justify-content: center;
}

.form-page-shell .additional-row-button span {
    font-size: 17px;
    line-height: 1;
}

@media (max-width: 760px) {
    .form-page-shell .additional-row-footer {
        align-items: stretch;
        flex-direction: column;
    }

    .form-page-shell .additional-row-button {
        width: 100%;
        min-width: 0;
    }
}

/* END BOTTOM ADDITIONAL ROW STYLES */

/* BEGIN FINAL VERIFIED FLIPBOOK STYLES */
.flipbook-title small { max-width: 760px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.final-data-note { font-size: 10px; color: #5f756c; }
/* END FINAL VERIFIED FLIPBOOK STYLES */

/* BEGIN SMART NEXT-MONTH BOOKLET */
.master-lock-badge{font-size:11px;margin-right:4px}.field-locked input,.field-locked select{background:rgba(8,47,38,.06)!important;color:#42534e!important;cursor:not-allowed}.carry-forward-banner{display:flex;align-items:center;justify-content:space-between;gap:18px;margin:0 0 12px;padding:12px 15px;border:1px solid rgba(8,47,38,.14);border-radius:14px;background:rgba(255,255,255,.72);backdrop-filter:blur(10px)}.carry-forward-banner>div{display:grid;gap:4px}.carry-forward-banner strong{font-size:12px;color:#0b3d31}.carry-forward-banner small{font-size:10px;line-height:1.45;color:#5f6f69}.carry-forward-banner>span{white-space:nowrap;padding:5px 9px;border-radius:999px;background:#e6f3ec;color:#175d47;font-size:9px;font-weight:800;text-transform:uppercase;letter-spacing:.05em}.carry-forward-banner.blank>span{background:#edf0ef;color:#56645f}.master-locked-cell{background:rgba(8,47,38,.035)}.master-locked-cell input{font-weight:700;color:#21463a}.smart-month-modal .modal-body{display:grid;gap:18px}.carry-choice{display:grid;gap:10px;padding-top:4px}.carry-choice h3{margin:0;font-size:13px;color:#123e32}.carry-option{display:flex;gap:11px;align-items:flex-start;padding:13px;border:1px solid #d7e2de;border-radius:13px;background:#fff;cursor:pointer;transition:.18s ease}.carry-option.selected{border-color:#2f7a60;box-shadow:0 0 0 3px rgba(47,122,96,.10);background:#f7fcf9}.carry-option input{margin-top:3px}.carry-option span{display:grid;gap:3px}.carry-option b{font-size:11px;color:#173d32}.carry-option small{font-size:9.5px;line-height:1.45;color:#65736e}.carry-preview{display:grid;gap:3px;padding:11px 12px;border-radius:11px;background:#eef5f1;color:#24493d}.carry-preview strong{font-size:10.5px}.carry-preview small{font-size:9px;line-height:1.45}.carry-safety{display:flex;gap:10px;align-items:flex-start;padding:12px;border-radius:12px;background:#fff8e7;border:1px solid #f1dfad}.carry-safety>span{display:grid;place-items:center;min-width:22px;height:22px;border-radius:50%;background:#1c6c50;color:#fff;font-size:11px}.carry-safety p{margin:0;font-size:9.5px;line-height:1.5;color:#665a3b}.spinner-dot{display:inline-block;width:8px;height:8px;border-radius:50%;background:#2f7a60;animation:smartPulse 1s infinite alternate}@keyframes smartPulse{to{opacity:.25;transform:scale(.7)}}
/* END SMART NEXT-MONTH BOOKLET */

/* BEGIN FINANCE-STYLE MESSAGE BOX */
.message-unread-badge {
  position: absolute;
  right: -5px;
  top: -6px;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: #d94747;
  color: #fff;
  border: 2px solid #fff;
  font-size: 9px;
  font-weight: 900;
  line-height: 1;
  box-shadow: 0 5px 14px rgba(217, 71, 71, .35);
}
.message-unread-badge.hidden,
#messageCenterNavBadge.hidden { display: none !important; }
.icon-button.has-unread-messages { color: #0c7253; background: #e6f6f0; }
.message-center-backdrop { padding: 12px; }
.message-center-modal {
  width: min(1120px, 97vw);
  height: min(760px, 92vh);
  max-height: 92vh;
  overflow: hidden;
  display: grid;
  grid-template-rows: auto 1fr;
}
.message-center-header { background: linear-gradient(135deg, #072f26, #0b5d47); color: #fff; }
.message-center-header p { color: rgba(255,255,255,.72); }
.message-center-header .close-button { color: #fff; background: rgba(255,255,255,.10); }
.message-center-kicker { display:block; margin-bottom:5px; color:#6ee0b8; font-size:9px; font-weight:900; letter-spacing:.13em; text-transform:uppercase; }
.message-center-layout { min-height: 0; display: grid; grid-template-columns: 285px 1fr; background: #f4f8f6; }
.message-estate-list { min-height:0; border-right:1px solid #dce7e2; background:#fff; display:grid; grid-template-rows:auto 1fr; }
.message-estate-list-head { display:flex; align-items:center; justify-content:space-between; padding:15px 16px; border-bottom:1px solid #e5ece9; }
.message-estate-list-head button { width:30px; height:30px; border:0; border-radius:9px; background:#edf6f2; color:#0c7253; cursor:pointer; }
.message-estate-scroll { min-height:0; overflow:auto; padding:8px; }
.message-estate-item { width:100%; border:0; background:transparent; border-radius:12px; padding:11px; display:flex; align-items:center; justify-content:space-between; gap:9px; text-align:left; cursor:pointer; color:#16352b; }
.message-estate-item:hover { background:#f1f7f4; }
.message-estate-item.active { background:linear-gradient(90deg,#dff4ec,#f2faf7); box-shadow:inset 3px 0 0 #15956d; }
.message-estate-item span { min-width:0; display:block; }
.message-estate-item strong { display:block; font-size:11px; }
.message-estate-item small { display:block; margin-top:3px; color:#71847c; font-size:8px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.message-estate-item b { flex:0 0 auto; min-width:20px; height:20px; padding:0 5px; display:grid; place-items:center; border-radius:999px; background:#d94747; color:#fff; font-size:8px; }
.message-empty-small { padding:18px; color:#7a8b84; font-size:10px; text-align:center; }
.message-thread-panel { min-width:0; min-height:0; display:grid; grid-template-rows:auto 1fr auto; }
.message-thread-toolbar { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:12px 17px; border-bottom:1px solid #dce7e2; background:rgba(255,255,255,.88); }
.message-thread-toolbar strong { display:block; font-size:12px; color:#153b2f; }
.message-thread-toolbar small { display:block; margin-top:2px; color:#74867e; font-size:9px; }
.btn-small { padding:8px 11px !important; font-size:9px !important; }
.message-thread { min-height:0; overflow:auto; padding:22px; display:flex; flex-direction:column; gap:11px; background:radial-gradient(circle at top right,rgba(21,149,109,.07),transparent 34%),#f5f9f7; }
.message-bubble { max-width:min(72%,680px); padding:11px 13px; border-radius:15px; box-shadow:0 7px 22px rgba(15,52,40,.07); }
.message-bubble.mine { align-self:flex-end; background:linear-gradient(135deg,#0f7c5a,#15956d); color:#fff; border-bottom-right-radius:5px; }
.message-bubble.theirs { align-self:flex-start; background:#fff; color:#193a30; border:1px solid #e0ebe6; border-bottom-left-radius:5px; }
.message-bubble-meta { display:flex; align-items:center; justify-content:space-between; gap:18px; margin-bottom:5px; }
.message-bubble-meta strong { font-size:9px; }
.message-bubble-meta span { font-size:8px; opacity:.72; white-space:nowrap; }
.message-bubble p { margin:0; font-size:11px; line-height:1.55; white-space:pre-wrap; overflow-wrap:anywhere; }
.message-bubble > small { display:block; margin-top:6px; font-size:8px; opacity:.68; }
.message-empty { margin:auto; text-align:center; color:#6e8179; }
.message-empty span { width:54px; height:54px; margin:0 auto 10px; display:grid; place-items:center; border-radius:16px; background:#e5f4ee; color:#0b7655; font-size:22px; }
.message-empty strong { display:block; color:#25493d; }
.message-empty p { margin:4px 0 0; font-size:10px; }
.message-compose { padding:14px 16px 16px; border-top:1px solid #dce7e2; background:#fff; }
.message-compose textarea { width:100%; resize:none; border:1px solid #cadbd4; border-radius:13px; padding:12px 13px; outline:none; font:inherit; color:#17382d; background:#fbfdfc; }
.message-compose textarea:focus { border-color:#15956d; box-shadow:0 0 0 3px rgba(21,149,109,.12); }
.message-compose-footer { display:flex; align-items:center; justify-content:space-between; gap:12px; margin-top:9px; }
.message-compose-footer small { color:#788a82; font-size:8px; }
@media (max-width: 820px) {
  .message-center-modal { width:98vw; height:94vh; }
  .message-center-layout { grid-template-columns:1fr; grid-template-rows:190px 1fr; }
  .message-estate-list { border-right:0; border-bottom:1px solid #dce7e2; }
  .message-estate-scroll { display:flex; gap:7px; overflow-x:auto; overflow-y:hidden; }
  .message-estate-item { min-width:180px; }
  .message-bubble { max-width:88%; }
}

.message-identity-selector {
  margin:10px 0 0;
  padding:0;
  border:0;
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:8px;
}
.message-identity-selector legend {
  grid-column:1/-1;
  margin:0 0 2px;
  color:#536c62;
  font-size:9px;
  font-weight:800;
  letter-spacing:.08em;
  text-transform:uppercase;
}
.message-identity-option {
  position:relative;
  display:flex;
  align-items:center;
  gap:9px;
  min-height:48px;
  padding:9px 10px;
  border:1px solid #ceddd7;
  border-radius:12px;
  background:#fbfdfc;
  cursor:pointer;
  transition:.18s ease;
}
.message-identity-option:hover { border-color:#7eb9a5; background:#f5fbf8; }
.message-identity-option.selected {
  border-color:#13835f;
  background:#edf8f4;
  box-shadow:0 0 0 2px rgba(19,131,95,.09);
}
.message-identity-option input { accent-color:#0d7b58; }
.message-identity-option span { display:flex; flex-direction:column; gap:2px; min-width:0; }
.message-identity-option b { color:#183d31; font-size:10px; }
.message-identity-option small { color:#71837b; font-size:8px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.message-anonymous-notice {
  display:flex;
  align-items:flex-start;
  gap:7px;
  margin:8px 0 0;
  color:#6c7e76;
  font-size:8px;
  line-height:1.45;
}
.message-anonymous-notice span {
  flex:0 0 auto;
  width:16px;
  height:16px;
  display:grid;
  place-items:center;
  border-radius:50%;
  background:#e9f2ee;
  color:#236a51;
  font-weight:800;
}
.message-bubble-meta em {
  margin-right:auto;
  padding:2px 5px;
  border-radius:999px;
  background:rgba(255,255,255,.18);
  color:inherit;
  font-size:7px;
  font-style:normal;
  font-weight:800;
  letter-spacing:.04em;
  text-transform:uppercase;
}
.message-bubble.theirs .message-bubble-meta em { background:#e8f2ee; color:#356351; }
@media (max-width: 620px) {
  .message-identity-selector { grid-template-columns:1fr; }
}

/* END FINANCE-STYLE MESSAGE BOX */

/* PHOTO + VOICE MESSAGE EXTENSIONS */
.message-attachments {
  display: grid;
  gap: 8px;
  margin-top: 9px;
}
.message-photo-attachment {
  position: relative;
  display: block;
  width: min(360px, 100%);
  overflow: hidden;
  border-radius: 12px;
  background: rgba(255,255,255,.15);
  text-decoration: none;
  color: inherit;
}
.message-photo-attachment img {
  display: block;
  width: 100%;
  max-height: 260px;
  object-fit: cover;
  background: #edf3f0;
}
.message-photo-attachment span {
  display: block;
  padding: 6px 9px;
  font-size: 8px;
  opacity: .78;
}
.message-bubble.theirs .message-photo-attachment {
  border: 1px solid #dfeae5;
  background: #f4f8f6;
}
.message-voice-attachment {
  width: min(390px, 100%);
  padding: 9px 10px;
  border-radius: 12px;
  background: rgba(255,255,255,.14);
}
.message-bubble.theirs .message-voice-attachment {
  border: 1px solid #dfeae5;
  background: #f4f8f6;
}
.message-voice-attachment > div {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 7px;
}
.message-voice-attachment > div > span {
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(255,255,255,.2);
}
.message-bubble.theirs .message-voice-attachment > div > span {
  background: #dff1e9;
  color: #0c7756;
}
.message-voice-attachment strong { font-size: 9px; }
.message-voice-attachment small { margin-left: auto; font-size: 8px; opacity: .72; }
.message-voice-attachment audio { width: 100%; height: 34px; }

.message-attachment-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 9px;
}
.message-attachment-toolbar button {
  min-width: 126px;
  min-height: 42px;
  padding: 7px 10px;
  border: 1px solid #ceddd7;
  border-radius: 11px;
  background: #f7fbf9;
  color: #183e31;
  display: grid;
  grid-template-columns: 25px 1fr;
  grid-template-rows: auto auto;
  column-gap: 7px;
  text-align: left;
  cursor: pointer;
}
.message-attachment-toolbar button:hover:not(:disabled) {
  border-color: #15956d;
  background: #edf8f4;
}
.message-attachment-toolbar button:disabled { opacity: .48; cursor: not-allowed; }
.message-attachment-toolbar button > span {
  grid-row: 1 / 3;
  width: 25px;
  height: 25px;
  display: grid;
  place-items: center;
  align-self: center;
  border-radius: 8px;
  background: #def1e9;
  color: #0b7655;
  font-size: 13px;
}
.message-attachment-toolbar button b { font-size: 9px; }
.message-attachment-toolbar button small { color: #71847c; font-size: 7px; }
.message-draft-attachments {
  margin-top: 9px;
  padding: 9px;
  border: 1px solid #d8e5df;
  border-radius: 12px;
  background: #f8fbfa;
}
.message-draft-photo-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 7px;
}
.message-draft-photo {
  position: relative;
  min-height: 76px;
  overflow: hidden;
  border-radius: 10px;
  background: #eaf1ee;
}
.message-draft-photo img { width: 100%; height: 100%; min-height: 76px; object-fit: cover; display: block; }
.message-draft-photo button {
  position: absolute;
  right: 4px;
  top: 4px;
  width: 22px;
  height: 22px;
  border: 0;
  border-radius: 50%;
  background: rgba(19,39,32,.78);
  color: white;
  cursor: pointer;
}
.message-draft-voice {
  display: grid;
  grid-template-columns: minmax(135px, auto) 1fr auto;
  align-items: center;
  gap: 9px;
}
.message-draft-voice > div { display: flex; align-items: center; gap: 6px; }
.message-draft-voice > div span {
  width: 25px;
  height: 25px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #dff1e9;
  color: #0c7756;
}
.message-draft-voice strong { font-size: 9px; }
.message-draft-voice small { color: #6f8179; font-size: 8px; }
.message-draft-voice audio { width: 100%; height: 34px; }
.message-draft-voice > button {
  border: 0;
  border-radius: 8px;
  padding: 7px 9px;
  background: #f4e9e9;
  color: #9b3535;
  font-size: 8px;
  cursor: pointer;
}
.message-recording-live {
  display: flex;
  align-items: center;
  gap: 8px;
}
.message-recording-live strong { font-size: 9px; color: #9b3535; }
.message-recording-live b { margin-right: auto; font-size: 10px; color: #173c30; }
.message-recording-live button {
  border: 0;
  border-radius: 8px;
  padding: 7px 9px;
  background: #e7f4ef;
  color: #0c7454;
  font-size: 8px;
  cursor: pointer;
}
.message-recording-live button:last-child { background: #f4e9e9; color: #9b3535; }
.message-recording-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #d94747;
  box-shadow: 0 0 0 0 rgba(217,71,71,.45);
  animation: messageRecordingPulse 1.2s infinite;
}
@keyframes messageRecordingPulse {
  70% { box-shadow: 0 0 0 8px rgba(217,71,71,0); }
  100% { box-shadow: 0 0 0 0 rgba(217,71,71,0); }
}
@media (max-width: 700px) {
  .message-draft-photo-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .message-draft-voice { grid-template-columns: 1fr; }
  .message-attachment-toolbar button { flex: 1 1 140px; }
}

/* BOOKLET_VISIBLE_TITLE_CAPITALIZATION
   Capitalizes visible system controls only.
   User-entered data, filenames and table data remain unchanged.
*/
button,
.btn,
.button,
.nav-item,
.nav-link,
.menu-item,
.sidebar-item,
.sidebar a,
.sidebar button,
.tab-button,
.quick-action,
.action-button,
.page-title,
.section-title,
.card-title,
.panel-title,
.modal-title,
.form-title,
.form-label,
label,
legend,
th,
summary,
input::placeholder,
textarea::placeholder {
    text-transform: capitalize;
}

/* BEGIN QUICK AUDIT CENTER */
.audit-scope-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 16px;
  padding: 16px 18px;
  border: 1px solid #dce8e2;
  border-radius: 16px;
  background: #f7fbf9;
}

.audit-scope-banner div {
  display: grid;
  gap: 3px;
}

.audit-scope-banner span,
.audit-scope-banner small {
  color: #60756b;
}

.audit-scope-banner strong {
  color: #173f30;
  font-size: 1.05rem;
}

.audit-filter-bar {
  display: grid;
  grid-template-columns: repeat(5, minmax(140px, 1fr)) auto;
  gap: 12px;
  align-items: end;
  padding: 16px;
  margin-bottom: 16px;
  border: 1px solid #e2ebe7;
  border-radius: 16px;
  background: #ffffff;
}

.audit-filter-field {
  display: grid;
  gap: 6px;
}

.audit-filter-field span {
  color: #4e655a;
  font-size: 0.78rem;
  font-weight: 750;
}

.audit-filter-field select,
.audit-filter-field input {
  width: 100%;
  min-height: 42px;
  padding: 9px 11px;
  border: 1px solid #cedbd5;
  border-radius: 10px;
  background: #ffffff;
  color: #1f342b;
}

.audit-apply-button {
  min-height: 42px;
}

.audit-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 16px;
}

.audit-summary-card {
  display: grid;
  gap: 5px;
  min-height: 128px;
  padding: 18px;
  border: 1px solid #e1eae5;
  border-radius: 16px;
  background: #ffffff;
  box-shadow: 0 8px 26px rgba(37, 72, 57, 0.06);
}

.audit-summary-card span,
.audit-summary-card small {
  color: #61766c;
}

.audit-summary-card strong {
  color: #173f30;
  font-size: 1.65rem;
  line-height: 1.15;
}

.audit-table-panel {
  overflow: hidden;
}

.audit-table-wrap {
  overflow-x: auto;
}

.audit-table {
  width: 100%;
  min-width: 980px;
  border-collapse: collapse;
}

.audit-table th,
.audit-table td {
  padding: 13px 14px;
  border-bottom: 1px solid #e8efeb;
  text-align: left;
  vertical-align: top;
}

.audit-table th {
  background: #f5f9f7;
  color: #425c50;
  font-size: 0.76rem;
  letter-spacing: 0.02em;
}

.audit-table td {
  color: #243a30;
}

.audit-table td strong,
.audit-table td small {
  display: block;
}

.audit-table td small {
  margin-top: 3px;
  color: #73877d;
}

.audit-stage-pill,
.audit-result {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 9px;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 750;
  white-space: nowrap;
}

.audit-stage-pill {
  background: #eaf4ef;
  color: #1f664a;
}

.audit-result.success {
  background: #e5f6ed;
  color: #137246;
}

.audit-result.failed {
  background: #fdeaea;
  color: #a52f2f;
}

.audit-empty {
  padding: 34px !important;
  color: #71837a !important;
  text-align: center !important;
}

.audit-error {
  color: #a52f2f !important;
}

@media (max-width: 1180px) {
  .audit-filter-bar {
    grid-template-columns: repeat(3, minmax(150px, 1fr));
  }
}

@media (max-width: 760px) {
  .audit-scope-banner {
    align-items: flex-start;
    flex-direction: column;
  }

  .audit-filter-bar,
  .audit-summary-grid {
    grid-template-columns: 1fr;
  }
}
/* END QUICK AUDIT CENTER */

/* BEGIN FULL VALIDATION AND BOOKLET VERSIONS */
.vv-workflow-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 16px;
  padding: 16px 18px;
  border: 1px solid #dce9e2;
  border-radius: 16px;
  background: #f6fbf8;
}

.vv-workflow-bar.locked {
  border-color: #cfd9d4;
  background: #f1f4f2;
}

.vv-workflow-bar > div:first-child {
  display: grid;
  gap: 3px;
}

.vv-workflow-bar span,
.vv-workflow-bar small {
  color: #60766b;
}

.vv-workflow-bar strong {
  color: #173f30;
  font-size: 1.08rem;
}

.vv-workflow-actions,
.vv-row-actions,
.vv-current-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.vv-alert {
  display: grid;
  gap: 4px;
  margin-bottom: 16px;
  padding: 14px 16px;
  border: 1px solid #dbe7e1;
  border-radius: 14px;
  background: #f8fbf9;
}

.vv-alert.warning {
  border-color: #f0d9a6;
  background: #fff8e8;
  color: #815b12;
}

.vv-alert.error {
  border-color: #efcaca;
  background: #fff0f0;
  color: #9c2e2e;
}

.vv-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 16px;
}

.vv-summary-card {
  display: grid;
  gap: 5px;
  min-height: 128px;
  padding: 18px;
  border: 1px solid #e1ebe6;
  border-radius: 16px;
  background: #ffffff;
  box-shadow: 0 8px 24px rgba(34, 73, 56, 0.06);
}

.vv-summary-card span,
.vv-summary-card small {
  color: #65796f;
}

.vv-summary-card strong {
  color: #173f30;
  font-size: 1.7rem;
  line-height: 1.15;
}

.vv-summary-card.success {
  border-top: 4px solid #37a575;
}

.vv-summary-card.warning {
  border-top: 4px solid #d9a23c;
}

.vv-summary-card.error {
  border-top: 4px solid #d45b5b;
}

.vv-summary-card.neutral {
  border-top: 4px solid #78958a;
}

.vv-form-panel,
.vv-issue-panel,
.vv-version-panel {
  margin-bottom: 16px;
  overflow: hidden;
}

.vv-form-results {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  padding: 16px;
}

.vv-form-result {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  min-height: 72px;
  padding: 12px;
  border: 1px solid #e0eae5;
  border-radius: 13px;
  background: #ffffff;
  color: #21372d;
  text-align: left;
}

button.vv-form-result {
  width: 100%;
  cursor: pointer;
}

.vv-form-result:hover {
  border-color: #7fbaa0;
  box-shadow: 0 5px 16px rgba(32, 83, 59, 0.08);
}

.vv-form-result small,
.vv-version-note,
.vv-control-item span {
  color: #71847b;
}

.vv-form-result strong,
.vv-form-result small {
  display: block;
}

.vv-form-code {
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: #e6f4ed;
  color: #0b7050;
  font-weight: 800;
}

.vv-result-pill,
.vv-severity,
.vv-current-badge,
.vv-milestone {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 9px;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 750;
  white-space: nowrap;
}

.vv-result-pill.success,
.vv-severity.success,
.vv-current-badge.current {
  background: #e2f5ea;
  color: #126b43;
}

.vv-result-pill.warning,
.vv-severity.warning,
.vv-current-badge.stale {
  background: #fff1d8;
  color: #8c5f0f;
}

.vv-result-pill.error,
.vv-severity.error {
  background: #fde6e6;
  color: #9c2f2f;
}

.vv-result-pill.neutral,
.vv-current-badge.saved,
.vv-milestone {
  background: #edf3f0;
  color: #4f6a5d;
}

.vv-table-wrap {
  overflow-x: auto;
}

.vv-table {
  width: 100%;
  min-width: 980px;
  border-collapse: collapse;
}

.vv-table th,
.vv-table td {
  padding: 13px 14px;
  border-bottom: 1px solid #e8efeb;
  text-align: left;
  vertical-align: top;
}

.vv-table th {
  background: #f5f9f7;
  color: #435d50;
  font-size: 0.76rem;
  letter-spacing: 0.02em;
}

.vv-table td {
  color: #243a30;
}

.vv-table td strong,
.vv-table td small {
  display: block;
}

.vv-table td small {
  margin-top: 4px;
  color: #75887e;
}

.vv-table tr.reviewed {
  opacity: 0.72;
  background: #fafcfb;
}

.vv-table-empty {
  padding: 34px !important;
  color: #71837a !important;
  text-align: center !important;
}

.vv-empty-state {
  display: grid;
  justify-items: center;
  gap: 10px;
  padding: 52px 24px;
  border: 1px solid #dfe9e4;
  border-radius: 18px;
  background: #ffffff;
  text-align: center;
}

.vv-empty-state p {
  max-width: 650px;
  color: #667b70;
}

.vv-empty-icon {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: #e0f5ea;
  color: #0f7652;
  font-size: 1.8rem;
  font-weight: 800;
}

.vv-current-version-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(300px, 0.8fr);
  gap: 16px;
  margin-bottom: 16px;
}

.vv-current-version-card,
.vv-version-control-card {
  min-height: 280px;
  padding: 22px;
  border: 1px solid #dce8e2;
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 8px 26px rgba(36, 73, 57, 0.06);
}

.vv-current-version-card {
  color: #ffffff;
  background: linear-gradient(135deg, #0c6549, #073f31);
}

.vv-current-version-card h2,
.vv-current-version-card p {
  color: #ffffff;
}

.vv-version-label {
  color: #bdeed9;
  font-size: 0.82rem;
  font-weight: 750;
  letter-spacing: 0.03em;
}

.vv-version-number {
  margin: 12px 0 6px;
  font-size: 2rem;
  font-weight: 850;
}

.vv-current-tags {
  margin: 16px 0;
}

.vv-current-tags span {
  padding: 6px 10px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  font-size: 0.78rem;
}

.vv-version-control-card {
  display: grid;
  align-content: start;
  gap: 10px;
}

.vv-control-item {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 0;
  border-bottom: 1px solid #e8efeb;
}

.vv-control-item strong {
  color: #1d4736;
  text-align: right;
}

.vv-modal-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}

.vv-modal-summary > div {
  display: grid;
  gap: 4px;
  padding: 13px;
  border: 1px solid #e0eae5;
  border-radius: 12px;
  background: #f8fbf9;
}

.vv-modal-summary span {
  color: #71847b;
  font-size: 0.78rem;
}

.vv-modal-summary strong {
  color: #1d4736;
}

.vv-version-note {
  padding: 12px 14px;
  border-radius: 12px;
  background: #f5f9f7;
}

@media (max-width: 1180px) {
  .vv-summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .vv-current-version-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .vv-workflow-bar {
    align-items: flex-start;
    flex-direction: column;
  }

  .vv-summary-grid,
  .vv-form-results,
  .vv-modal-summary {
    grid-template-columns: 1fr;
  }
}
/* END FULL VALIDATION AND BOOKLET VERSIONS */

/* BEGIN BOOKLET HELP CENTER AND READABLE DATA */

.help-quick-button {
  font-weight: 900 !important;
  font-size: 14px !important;
  color: #0b624b !important;
  background: #eef9f4 !important;
  border-color: #cce8dc !important;
}

.help-workflow-banner {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  margin-bottom: 18px;
  padding: 18px;
  border: 1px solid rgba(12, 105, 79, .17);
  border-radius: 20px;
  background: linear-gradient(135deg, rgba(7, 94, 70, .97), rgba(8, 47, 38, .96));
  color: white;
  box-shadow: 0 18px 40px rgba(6, 52, 40, .16);
}

.help-workflow-icon,
.help-card-icon {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 15px;
  background: #5be0b1;
  color: #073d2f;
  font-weight: 900;
  font-size: 22px;
}

.help-workflow-banner div:nth-child(2) {
  display: grid;
  gap: 5px;
}

.help-workflow-banner span {
  font-size: 10px;
  font-weight: 850;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #9bf0cf;
}

.help-workflow-banner strong {
  font-size: 13px;
  line-height: 1.55;
}

.help-quick-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.help-step-card {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 12px;
  align-items: center;
  min-height: 112px;
  padding: 15px;
  border: 1px solid #dce9e3;
  border-radius: 17px;
  background: rgba(255, 255, 255, .94);
  color: #112f26;
  text-align: left;
  cursor: pointer;
  box-shadow: 0 10px 25px rgba(17, 61, 48, .06);
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}

.help-step-card:hover,
.help-step-card:focus-visible {
  transform: translateY(-2px);
  border-color: #75c9aa;
  box-shadow: 0 15px 32px rgba(17, 61, 48, .11);
  outline: none;
}

.help-step-card > span:nth-child(2) {
  display: grid;
  gap: 5px;
}

.help-step-card strong {
  font-size: 12px;
}

.help-step-card small {
  color: #65756f;
  font-size: 9.5px;
  line-height: 1.45;
}

.help-step-card > i {
  font-style: normal;
  color: #0b7958;
  font-weight: 900;
}

.help-step-number {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 11px;
  background: #e0f6ed;
  color: #08704f;
  font-size: 12px;
  font-weight: 900;
}

.help-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.help-detail-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 13px;
  padding: 18px;
  border: 1px solid #dfeae5;
  border-radius: 19px;
  background: rgba(255, 255, 255, .94);
  box-shadow: 0 12px 28px rgba(18, 58, 46, .07);
}

.help-detail-card > ul,
.help-detail-card > button,
.help-detail-card > .help-choice-row,
.help-detail-card > .help-action-row {
  grid-column: 1 / -1;
}

.help-detail-card h2 {
  margin: 0 0 5px;
  font-size: 15px;
}

.help-detail-card p {
  margin: 0;
  color: #687771;
  font-size: 10px;
  line-height: 1.55;
}

.help-detail-card ul {
  display: grid;
  gap: 7px;
  margin: 0;
  padding: 0 0 0 18px;
  color: #3f514a;
  font-size: 10px;
  line-height: 1.45;
}

.help-readable-card {
  border-color: #9bd8c1;
  background: linear-gradient(145deg, rgba(247, 255, 251, .98), rgba(234, 249, 242, .96));
}

.help-choice-row,
.help-action-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
}

.help-choice-row span {
  padding: 7px 9px;
  border-radius: 9px;
  background: #edf6f2;
  color: #204b3d;
  font-size: 9px;
  font-weight: 800;
}

.help-choice-row b {
  color: #0b7958;
}

.help-shortcuts-panel {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 16px;
  padding: 13px;
  border: 1px solid #dce9e3;
  border-radius: 16px;
  background: rgba(246, 251, 248, .94);
}

.help-shortcuts-panel > div {
  display: grid;
  gap: 5px;
  padding: 9px;
}

.help-shortcuts-panel span {
  color: #718078;
  font-size: 8px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .06em;
}

.help-shortcuts-panel strong {
  font-size: 9.5px;
}

.help-shortcuts-panel kbd,
.help-detail-card kbd,
.help-welcome-modal kbd,
.help-screen-tip-modal kbd {
  display: inline-grid;
  place-items: center;
  min-width: 24px;
  min-height: 22px;
  padding: 2px 6px;
  border: 1px solid #cfdcd6;
  border-bottom-width: 2px;
  border-radius: 6px;
  background: white;
  color: #173d31;
  font: 800 9px/1 system-ui, sans-serif;
  box-shadow: 0 2px 0 rgba(11, 79, 59, .08);
}

.help-welcome-backdrop {
  z-index: 5000;
}

.help-welcome-modal {
  width: min(720px, calc(100vw - 30px));
  overflow: hidden;
}

.help-welcome-hero {
  display: grid;
  justify-items: center;
  gap: 7px;
  padding: 26px 28px 22px;
  text-align: center;
  color: white;
  background: linear-gradient(145deg, #0b6a50, #073c30);
}

.help-welcome-mark {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border-radius: 17px;
  background: #5be0b1;
  color: #073c30;
  font-size: 25px;
  font-weight: 950;
}

.help-welcome-hero > span {
  color: #9ff0d1;
  font-size: 9px;
  font-weight: 850;
  text-transform: uppercase;
  letter-spacing: .1em;
}

.help-welcome-hero h2 {
  margin: 0;
  font-size: 24px;
}

.help-welcome-hero p {
  max-width: 570px;
  margin: 0;
  color: #d9eee6;
  font-size: 11px;
  line-height: 1.55;
}

.help-welcome-body {
  display: grid;
  gap: 10px;
  padding: 20px;
}

.help-welcome-note {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 11px;
  align-items: start;
  padding: 12px;
  border: 1px solid #e0ebe6;
  border-radius: 13px;
  background: #fbfdfc;
}

.help-welcome-note > span,
.help-screen-steps > div > span {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 9px;
  background: #def5eb;
  color: #086d4f;
  font-size: 10px;
  font-weight: 900;
}

.help-welcome-note div {
  display: grid;
  gap: 4px;
}

.help-welcome-note strong {
  font-size: 11px;
}

.help-welcome-note small {
  color: #66766f;
  font-size: 9.5px;
  line-height: 1.45;
}

.help-welcome-actions {
  flex-wrap: wrap;
}

.help-tour-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: rgba(3, 20, 15, .70);
  pointer-events: auto;
}

.help-tour-popover {
  position: fixed;
  z-index: 10003;
  display: grid;
  gap: 11px;
  padding: 18px;
  border: 1px solid rgba(91, 224, 177, .45);
  border-radius: 17px;
  background: white;
  color: #13332a;
  box-shadow: 0 24px 70px rgba(0, 0, 0, .35);
}

.help-tour-popover h2 {
  margin: 0;
  font-size: 18px;
}

.help-tour-popover p {
  margin: 0;
  color: #5f7069;
  font-size: 11px;
  line-height: 1.55;
}

.help-tour-progress {
  display: grid;
  gap: 7px;
}

.help-tour-progress > span {
  color: #0b7455;
  font-size: 9px;
  font-weight: 850;
  text-transform: uppercase;
  letter-spacing: .08em;
}

.help-tour-progress > i {
  height: 5px;
  overflow: hidden;
  border-radius: 999px;
  background: #e3eee9;
}

.help-tour-progress > i > b {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: #25a87a;
  transition: width .2s ease;
}

.help-tour-actions {
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  gap: 7px;
  align-items: center;
}

.help-tour-highlight {
  position: relative !important;
  z-index: 10002 !important;
  outline: 4px solid #62e3b5 !important;
  outline-offset: 4px !important;
  box-shadow: 0 0 0 10px rgba(98, 227, 181, .20), 0 18px 42px rgba(0, 0, 0, .28) !important;
}

.help-screen-steps {
  display: grid;
  gap: 10px;
}

.help-screen-steps > div {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px;
  align-items: center;
  padding: 11px;
  border: 1px solid #e0ebe6;
  border-radius: 12px;
  background: #fbfdfc;
}

.help-screen-steps p {
  margin: 0;
  color: #465951;
  font-size: 10px;
  line-height: 1.5;
}

/* Native Table Controls */
.table-view-controls {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px;
  margin-right: 4px;
  padding: 4px;
  border: 1px solid #cfe2da;
  border-radius: 10px;
  background: rgba(246, 252, 249, .96);
}

.native-data-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 28px;
  padding: 4px 8px;
  border-radius: 7px;
  background: #dff5eb;
  color: #0a674c;
  font-size: 8px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.table-view-button {
  display: grid;
  place-items: center;
  min-width: 29px;
  height: 29px;
  padding: 0 8px;
  border: 1px solid #cbded6;
  border-radius: 7px;
  background: white;
  color: #143d31;
  font-size: 13px;
  font-weight: 900;
  cursor: pointer;
}

.table-view-button:hover,
.table-view-button:focus-visible {
  border-color: #36a77e;
  background: #eaf8f2;
  outline: none;
}

.table-view-text {
  font-size: 8.5px;
  white-space: nowrap;
}

.table-view-help {
  border-radius: 50%;
  color: #0a6a4e;
}

.table-zoom-value {
  min-width: 42px;
  color: #0b624b;
  font-size: 9px;
  font-weight: 900;
  text-align: center;
}

/* Use Native HTML Text Instead Of Image-Like Tiny Rows */
.form-page-shell .data-grid-wrap {
  border-top: 1px solid #cadbd4 !important;
  background: #ffffff !important;
  scrollbar-gutter: stable both-edges !important;
}

.form-page-shell .data-grid {
  zoom: var(--table-zoom, 1);
  background: white !important;
}

.form-page-shell .data-grid th {
  min-height: 52px !important;
  padding: 10px 8px !important;
  color: #ffffff !important;
  font-size: 10px !important;
  line-height: 1.35 !important;
  letter-spacing: .25px !important;
  white-space: normal !important;
  overflow-wrap: anywhere !important;
  text-shadow: 0 1px 1px rgba(0, 0, 0, .18);
}

.form-page-shell .data-grid td {
  height: 42px !important;
  border-right-color: #cfded7 !important;
  border-bottom-color: #cfded7 !important;
  color: #10261f !important;
}

.form-page-shell .data-grid input,
.form-page-shell .data-grid select {
  height: 41px !important;
  padding: 8px 9px !important;
  color: #10261f !important;
  font-size: 11px !important;
  font-weight: 620 !important;
  line-height: 1.25 !important;
}

.form-page-shell .data-grid input::placeholder {
  color: #7b8c85 !important;
}

.form-page-shell .data-grid td:first-child {
  color: #27483d !important;
  font-size: 10px !important;
  font-weight: 900 !important;
}

.form-page-shell .data-grid td.computed input {
  color: #075b43 !important;
  font-weight: 850 !important;
}

.form-page-shell.data-reading-mode .studio-main::before {
  opacity: .025 !important;
}

.form-page-shell.data-reading-mode .studio-content,
.form-page-shell.data-reading-mode .metadata-strip,
.form-page-shell.data-reading-mode .table-toolbar {
  background: rgba(255, 255, 255, .96) !important;
  backdrop-filter: none !important;
}

.form-page-shell.data-reading-mode .data-grid td,
.form-page-shell.data-reading-mode table td {
  background: rgba(255, 255, 255, .99) !important;
}

.form-page-shell.data-reading-mode .data-grid tr:nth-child(even) td,
.form-page-shell.data-reading-mode table tr:nth-child(even) td {
  background: rgba(246, 251, 248, .99) !important;
}

.form-page-shell.data-reading-mode .data-grid td.computed {
  background: #e7f6ef !important;
}

.form-page-shell.data-watermark-mode .studio-main::before {
  opacity: .12 !important;
}

.form-page-shell.data-watermark-mode .data-grid td,
.form-page-shell.data-watermark-mode table td {
  background: rgba(255, 255, 255, .88) !important;
}

.form-page-shell.data-watermark-mode .data-grid tr:nth-child(even) td,
.form-page-shell.data-watermark-mode table tr:nth-child(even) td {
  background: rgba(246, 251, 248, .86) !important;
}

body.booklet-table-fullscreen {
  overflow: hidden !important;
}

body.booklet-table-fullscreen .sidebar,
body.booklet-table-fullscreen .topbar {
  display: none !important;
}

body.booklet-table-fullscreen .main-area {
  width: 100vw !important;
  margin: 0 !important;
}

body.booklet-table-fullscreen .workspace {
  min-height: 100vh !important;
  padding: 0 !important;
}

body.booklet-table-fullscreen .studio-shell.form-page-shell {
  display: block !important;
  min-height: 100vh !important;
  margin: 0 !important;
}

body.booklet-table-fullscreen .form-nav-panel {
  display: none !important;
}

body.booklet-table-fullscreen .form-page-shell .studio-main {
  position: fixed !important;
  inset: 0 !important;
  z-index: 9990 !important;
  width: 100vw !important;
  height: 100vh !important;
  overflow: hidden !important;
  border-radius: 0 !important;
  background: white !important;
}

body.booklet-table-fullscreen .form-page-shell .studio-header {
  border-radius: 0 !important;
  padding: 13px 18px !important;
}

body.booklet-table-fullscreen .form-page-shell .studio-content {
  height: calc(100vh - 132px) !important;
  min-height: 0 !important;
  border-radius: 0 !important;
}

body.booklet-table-fullscreen .form-page-shell .data-grid-wrap {
  max-height: calc(100vh - 266px) !important;
  min-height: calc(100vh - 266px) !important;
}

@supports not (zoom: 1) {
  .form-page-shell .data-grid {
    transform: scale(var(--table-zoom, 1));
    transform-origin: top left;
  }
}

@media (max-width: 1050px) {
  .help-quick-grid,
  .help-shortcuts-panel {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .help-workflow-banner,
  .help-detail-card {
    grid-template-columns: 1fr;
  }

  .help-quick-grid,
  .help-detail-grid,
  .help-shortcuts-panel {
    grid-template-columns: 1fr;
  }

  .help-workflow-icon,
  .help-card-icon {
    width: 42px;
    height: 42px;
  }

  .table-view-controls {
    width: 100%;
  }

  .table-view-text {
    flex: 1;
  }
}

/* END BOOKLET HELP CENTER AND READABLE DATA */


/* =========================================================
   FREE SELF-HOSTED ONLINE FLIPBOOK
   ========================================================= */

.free-online-flipbook-panel {
  margin-top: 18px;
}

.free-badge {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  color: #15442f;
  background: #d8eadf;
  font-weight: 800;
  font-size: 11px;
  letter-spacing: .08em;
}

.free-online-flipbook-state {
  display: grid;
  gap: 14px;
}

.free-online-status-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.free-online-url {
  padding: 12px 14px;
  border-radius: 9px;
  overflow-wrap: anywhere;
  color: #23483b;
  background: #edf4f0;
  border: 1px solid #d4e2dc;
  font-family:
    ui-monospace,
    SFMono-Regular,
    Consolas,
    monospace;
  font-size: 12px;
}

.free-online-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.free-online-loading,
.free-online-error {
  padding: 18px;
  border-radius: 9px;
  background: #f4f7f5;
}

.free-online-error {
  color: #a43232;
  background: #fff1f1;
}

