:root {
  --bg: #0f172a;
  --panel: #111827;
  --panel-2: #182338;
  --line: rgba(255, 255, 255, 0.12);
  --text: #f8fafc;
  --muted: #a7b0c2;
  --brand: #49d2a6;
  --accent: #6ea8ff;
  --warning: #f4bf50;
  --brand-ink: #052017;
  --glow-left: rgba(73, 210, 166, 0.18);
  --glow-right: rgba(110, 168, 255, 0.16);
  --panel-fill-1: rgba(255,255,255,0.08);
  --panel-fill-2: rgba(255,255,255,0.04);
  --sidebar-fill-1: rgba(255,255,255,0.08);
  --sidebar-fill-2: rgba(255,255,255,0.025);
  --sidebar-base: #0a101f;
  --topbar-bg: rgba(15, 23, 42, 0.84);
  --surface-soft: rgba(255,255,255,0.05);
  --surface-strong: rgba(255,255,255,0.08);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at top left, var(--glow-left), transparent 32rem),
    radial-gradient(circle at top right, var(--glow-right), transparent 30rem),
    var(--bg);
  color: var(--text);
}

body[data-theme="civic"] {
  --bg: #0f172a;
  --panel: #111827;
  --panel-2: #182338;
  --line: rgba(255, 255, 255, 0.12);
  --text: #f8fafc;
  --muted: #a7b0c2;
  --brand: #49d2a6;
  --accent: #6ea8ff;
  --warning: #f4bf50;
  --brand-ink: #052017;
  --glow-left: rgba(73, 210, 166, 0.18);
  --glow-right: rgba(110, 168, 255, 0.16);
  --panel-fill-1: rgba(255,255,255,0.08);
  --panel-fill-2: rgba(255,255,255,0.04);
  --sidebar-fill-1: rgba(255,255,255,0.08);
  --sidebar-fill-2: rgba(255,255,255,0.025);
  --sidebar-base: #0a101f;
  --topbar-bg: rgba(15, 23, 42, 0.84);
  --surface-soft: rgba(255,255,255,0.05);
  --surface-strong: rgba(255,255,255,0.08);
}

body[data-theme="emerald"] {
  --bg: #061714;
  --panel: #0b2620;
  --panel-2: #114034;
  --line: rgba(120, 244, 194, 0.24);
  --text: #f1fff8;
  --muted: #abd8c7;
  --brand: #3cf1b0;
  --accent: #27d7c6;
  --warning: #ffd76a;
  --brand-ink: #03241b;
  --glow-left: rgba(48, 241, 170, 0.32);
  --glow-right: rgba(39, 215, 198, 0.24);
  --panel-fill-1: rgba(21, 90, 72, 0.64);
  --panel-fill-2: rgba(10, 39, 34, 0.84);
  --sidebar-fill-1: rgba(42, 127, 103, 0.44);
  --sidebar-fill-2: rgba(10, 39, 34, 0.9);
  --sidebar-base: #07211b;
  --topbar-bg: rgba(7, 33, 27, 0.88);
  --surface-soft: rgba(103, 232, 181, 0.08);
  --surface-strong: rgba(103, 232, 181, 0.14);
}

body[data-theme="royal"] {
  --bg: #121127;
  --panel: #1d1b3d;
  --panel-2: #2d2a63;
  --line: rgba(174, 182, 255, 0.25);
  --text: #f7f7ff;
  --muted: #c3c8ef;
  --brand: #8ee7c0;
  --accent: #8f78ff;
  --warning: #ffcf6a;
  --brand-ink: #112019;
  --glow-left: rgba(143, 120, 255, 0.28);
  --glow-right: rgba(92, 142, 255, 0.26);
  --panel-fill-1: rgba(58, 46, 120, 0.64);
  --panel-fill-2: rgba(25, 22, 61, 0.86);
  --sidebar-fill-1: rgba(69, 60, 140, 0.48);
  --sidebar-fill-2: rgba(25, 22, 61, 0.92);
  --sidebar-base: #171432;
  --topbar-bg: rgba(23, 20, 50, 0.9);
  --surface-soft: rgba(143, 120, 255, 0.09);
  --surface-strong: rgba(143, 120, 255, 0.15);
}

body[data-theme="graphite"] {
  --bg: #141414;
  --panel: #222426;
  --panel-2: #35393d;
  --line: rgba(234, 240, 244, 0.18);
  --text: #fafcfd;
  --muted: #c2ccd1;
  --brand: #7df0d8;
  --accent: #8fbfff;
  --warning: #ffc96b;
  --brand-ink: #0a1f1a;
  --glow-left: rgba(125, 240, 216, 0.12);
  --glow-right: rgba(143, 191, 255, 0.16);
  --panel-fill-1: rgba(67, 72, 77, 0.62);
  --panel-fill-2: rgba(27, 31, 34, 0.88);
  --sidebar-fill-1: rgba(67, 72, 77, 0.42);
  --sidebar-fill-2: rgba(27, 31, 34, 0.94);
  --sidebar-base: #151718;
  --topbar-bg: rgba(21, 23, 24, 0.92);
  --surface-soft: rgba(125, 240, 216, 0.05);
  --surface-strong: rgba(125, 240, 216, 0.1);
}

body[data-theme="sunrise"] {
  --bg: #2a1020;
  --panel: #46203a;
  --panel-2: #6c3453;
  --line: rgba(255, 214, 170, 0.22);
  --text: #fff8f2;
  --muted: #f2d2c0;
  --brand: #ffb86b;
  --accent: #ff7f73;
  --warning: #ffe07a;
  --brand-ink: #331300;
  --glow-left: rgba(255, 184, 107, 0.25);
  --glow-right: rgba(255, 127, 115, 0.22);
  --panel-fill-1: rgba(121, 63, 88, 0.58);
  --panel-fill-2: rgba(49, 19, 39, 0.88);
  --sidebar-fill-1: rgba(121, 63, 88, 0.36);
  --sidebar-fill-2: rgba(49, 19, 39, 0.94);
  --sidebar-base: #24101d;
  --topbar-bg: rgba(36, 16, 29, 0.92);
  --surface-soft: rgba(255, 184, 107, 0.07);
  --surface-strong: rgba(255, 184, 107, 0.12);
}

body[data-theme="terracotta"] {
  --bg: #211510;
  --panel: #3a241c;
  --panel-2: #5b3727;
  --line: rgba(255, 200, 168, 0.2);
  --text: #fff7f3;
  --muted: #dfc2b8;
  --brand: #ff9f68;
  --accent: #ffcf91;
  --warning: #ffe07a;
  --brand-ink: #2c1003;
  --glow-left: rgba(255, 159, 104, 0.22);
  --glow-right: rgba(255, 207, 145, 0.18);
  --panel-fill-1: rgba(104, 63, 44, 0.58);
  --panel-fill-2: rgba(41, 23, 18, 0.88);
  --sidebar-fill-1: rgba(104, 63, 44, 0.38);
  --sidebar-fill-2: rgba(41, 23, 18, 0.94);
  --sidebar-base: #1f1410;
  --topbar-bg: rgba(31, 20, 16, 0.92);
  --surface-soft: rgba(255, 159, 104, 0.06);
  --surface-strong: rgba(255, 159, 104, 0.11);
}

body[data-theme="forest"] {
  --bg: #09140d;
  --panel: #11281a;
  --panel-2: #1b442a;
  --line: rgba(168, 240, 193, 0.2);
  --text: #f4fff8;
  --muted: #bdd7c7;
  --brand: #75e0a1;
  --accent: #4ed0b2;
  --warning: #f3dc77;
  --brand-ink: #082114;
  --glow-left: rgba(117, 224, 161, 0.22);
  --glow-right: rgba(78, 208, 178, 0.18);
  --panel-fill-1: rgba(34, 86, 52, 0.58);
  --panel-fill-2: rgba(13, 28, 19, 0.9);
  --sidebar-fill-1: rgba(34, 86, 52, 0.36);
  --sidebar-fill-2: rgba(13, 28, 19, 0.94);
  --sidebar-base: #0c1710;
  --topbar-bg: rgba(12, 23, 16, 0.92);
  --surface-soft: rgba(117, 224, 161, 0.06);
  --surface-strong: rgba(117, 224, 161, 0.11);
}

body[data-theme="ocean"] {
  --bg: #081625;
  --panel: #10263c;
  --panel-2: #183e60;
  --line: rgba(170, 220, 255, 0.2);
  --text: #f5fbff;
  --muted: #bfd2e5;
  --brand: #5fd5ff;
  --accent: #6da8ff;
  --warning: #f8da74;
  --brand-ink: #052030;
  --glow-left: rgba(95, 213, 255, 0.22);
  --glow-right: rgba(109, 168, 255, 0.18);
  --panel-fill-1: rgba(31, 80, 121, 0.58);
  --panel-fill-2: rgba(11, 26, 42, 0.9);
  --sidebar-fill-1: rgba(31, 80, 121, 0.36);
  --sidebar-fill-2: rgba(11, 26, 42, 0.94);
  --sidebar-base: #0a1622;
  --topbar-bg: rgba(10, 22, 34, 0.92);
  --surface-soft: rgba(95, 213, 255, 0.06);
  --surface-strong: rgba(95, 213, 255, 0.12);
}

body[data-theme="lavender"] {
  --bg: #171126;
  --panel: #2b2142;
  --panel-2: #473068;
  --line: rgba(220, 198, 255, 0.2);
  --text: #fdf8ff;
  --muted: #d8c9e7;
  --brand: #cfa3ff;
  --accent: #88b2ff;
  --warning: #ffd878;
  --brand-ink: #231239;
  --glow-left: rgba(207, 163, 255, 0.22);
  --glow-right: rgba(136, 178, 255, 0.18);
  --panel-fill-1: rgba(80, 58, 121, 0.58);
  --panel-fill-2: rgba(24, 17, 39, 0.9);
  --sidebar-fill-1: rgba(80, 58, 121, 0.36);
  --sidebar-fill-2: rgba(24, 17, 39, 0.94);
  --sidebar-base: #171122;
  --topbar-bg: rgba(23, 17, 34, 0.92);
  --surface-soft: rgba(207, 163, 255, 0.06);
  --surface-strong: rgba(207, 163, 255, 0.12);
}

body[data-theme="sand"] {
  --bg: #1d1a16;
  --panel: #2d281f;
  --panel-2: #433a2e;
  --line: rgba(255, 234, 201, 0.18);
  --text: #fffdf8;
  --muted: #d7cebd;
  --brand: #e9c987;
  --accent: #9ec8c0;
  --warning: #ffd779;
  --brand-ink: #28200f;
  --glow-left: rgba(233, 201, 135, 0.18);
  --glow-right: rgba(158, 200, 192, 0.14);
  --panel-fill-1: rgba(84, 73, 57, 0.56);
  --panel-fill-2: rgba(30, 26, 21, 0.9);
  --sidebar-fill-1: rgba(84, 73, 57, 0.34);
  --sidebar-fill-2: rgba(30, 26, 21, 0.94);
  --sidebar-base: #191713;
  --topbar-bg: rgba(25, 23, 19, 0.92);
  --surface-soft: rgba(233, 201, 135, 0.05);
  --surface-strong: rgba(233, 201, 135, 0.1);
}

body[data-theme="berry"] {
  --bg: #1f1020;
  --panel: #351934;
  --panel-2: #5a2956;
  --line: rgba(255, 187, 225, 0.22);
  --text: #fff8fd;
  --muted: #e5c3d7;
  --brand: #ff8bd2;
  --accent: #ffb17e;
  --warning: #ffe07a;
  --brand-ink: #311022;
  --glow-left: rgba(255, 139, 210, 0.22);
  --glow-right: rgba(255, 177, 126, 0.18);
  --panel-fill-1: rgba(102, 46, 94, 0.6);
  --panel-fill-2: rgba(33, 16, 32, 0.9);
  --sidebar-fill-1: rgba(102, 46, 94, 0.36);
  --sidebar-fill-2: rgba(33, 16, 32, 0.94);
  --sidebar-base: #1a0f1a;
  --topbar-bg: rgba(26, 15, 26, 0.92);
  --surface-soft: rgba(255, 139, 210, 0.06);
  --surface-strong: rgba(255, 139, 210, 0.11);
}

body[data-theme="steel"] {
  --bg: #111720;
  --panel: #202b37;
  --panel-2: #304253;
  --line: rgba(201, 220, 236, 0.2);
  --text: #f7fbff;
  --muted: #c0cedb;
  --brand: #91c6ff;
  --accent: #7de0d4;
  --warning: #ffdb79;
  --brand-ink: #102131;
  --glow-left: rgba(145, 198, 255, 0.18);
  --glow-right: rgba(125, 224, 212, 0.14);
  --panel-fill-1: rgba(53, 78, 102, 0.58);
  --panel-fill-2: rgba(18, 25, 34, 0.9);
  --sidebar-fill-1: rgba(53, 78, 102, 0.36);
  --sidebar-fill-2: rgba(18, 25, 34, 0.94);
  --sidebar-base: #111821;
  --topbar-bg: rgba(17, 24, 33, 0.92);
  --surface-soft: rgba(145, 198, 255, 0.05);
  --surface-strong: rgba(145, 198, 255, 0.1);
}

body[data-theme="amber"] {
  --bg: #23170a;
  --panel: #3b2810;
  --panel-2: #634214;
  --line: rgba(255, 225, 169, 0.22);
  --text: #fffaf0;
  --muted: #ead5a9;
  --brand: #ffbf47;
  --accent: #ffd978;
  --warning: #ffe78f;
  --brand-ink: #362100;
  --glow-left: rgba(255, 191, 71, 0.22);
  --glow-right: rgba(255, 217, 120, 0.18);
  --panel-fill-1: rgba(104, 72, 23, 0.58);
  --panel-fill-2: rgba(37, 24, 10, 0.9);
  --sidebar-fill-1: rgba(104, 72, 23, 0.36);
  --sidebar-fill-2: rgba(37, 24, 10, 0.94);
  --sidebar-base: #1f1408;
  --topbar-bg: rgba(31, 20, 8, 0.92);
  --surface-soft: rgba(255, 191, 71, 0.06);
  --surface-strong: rgba(255, 191, 71, 0.12);
}

body[data-theme="midnight"] {
  --bg: #090b12;
  --panel: #121724;
  --panel-2: #1a2234;
  --line: rgba(156, 179, 214, 0.16);
  --text: #f5f8ff;
  --muted: #b4bfd4;
  --brand: #79b8ff;
  --accent: #82ffd9;
  --warning: #ffdc7a;
  --brand-ink: #0d1a2a;
  --glow-left: rgba(121, 184, 255, 0.16);
  --glow-right: rgba(130, 255, 217, 0.14);
  --panel-fill-1: rgba(29, 39, 59, 0.58);
  --panel-fill-2: rgba(10, 13, 20, 0.92);
  --sidebar-fill-1: rgba(29, 39, 59, 0.34);
  --sidebar-fill-2: rgba(10, 13, 20, 0.96);
  --sidebar-base: #090c13;
  --topbar-bg: rgba(9, 12, 19, 0.94);
  --surface-soft: rgba(121, 184, 255, 0.05);
  --surface-strong: rgba(121, 184, 255, 0.1);
}

body[data-theme="plum"] {
  --bg: #1b0f1d;
  --panel: #311636;
  --panel-2: #55255e;
  --line: rgba(223, 180, 255, 0.22);
  --text: #fff8ff;
  --muted: #ddc3e5;
  --brand: #d28bff;
  --accent: #8d9dff;
  --warning: #ffd77a;
  --brand-ink: #2a1130;
  --glow-left: rgba(210, 139, 255, 0.22);
  --glow-right: rgba(141, 157, 255, 0.18);
  --panel-fill-1: rgba(92, 41, 104, 0.6);
  --panel-fill-2: rgba(28, 15, 32, 0.9);
  --sidebar-fill-1: rgba(92, 41, 104, 0.36);
  --sidebar-fill-2: rgba(28, 15, 32, 0.94);
  --sidebar-base: #180d1b;
  --topbar-bg: rgba(24, 13, 27, 0.92);
  --surface-soft: rgba(210, 139, 255, 0.06);
  --surface-strong: rgba(210, 139, 255, 0.12);
}

body[data-theme="ice"] {
  --bg: #0f1720;
  --panel: #1c2b37;
  --panel-2: #29404d;
  --line: rgba(203, 244, 255, 0.24);
  --text: #f4fdff;
  --muted: #bed7df;
  --brand: #8beeff;
  --accent: #9ecfff;
  --warning: #ffe17e;
  --brand-ink: #06232b;
  --glow-left: rgba(139, 238, 255, 0.22);
  --glow-right: rgba(158, 207, 255, 0.18);
  --panel-fill-1: rgba(46, 79, 90, 0.58);
  --panel-fill-2: rgba(17, 24, 32, 0.9);
  --sidebar-fill-1: rgba(46, 79, 90, 0.36);
  --sidebar-fill-2: rgba(17, 24, 32, 0.94);
  --sidebar-base: #10161d;
  --topbar-bg: rgba(16, 22, 29, 0.92);
  --surface-soft: rgba(139, 238, 255, 0.06);
  --surface-strong: rgba(139, 238, 255, 0.12);
}

body[data-theme="pearl"] {
  --bg: #f6f8fc;
  --panel: #ffffff;
  --panel-2: #edf2fb;
  --line: rgba(49, 72, 108, 0.14);
  --text: #132238;
  --muted: #62718a;
  --brand: #4f8cff;
  --accent: #7ab7ff;
  --warning: #f2b84b;
  --brand-ink: #eff5ff;
  --glow-left: rgba(79, 140, 255, 0.14);
  --glow-right: rgba(122, 183, 255, 0.12);
  --panel-fill-1: rgba(255,255,255,0.92);
  --panel-fill-2: rgba(237,242,251,0.96);
  --sidebar-fill-1: rgba(255,255,255,0.9);
  --sidebar-fill-2: rgba(241,245,252,0.98);
  --sidebar-base: #eef3fb;
  --topbar-bg: rgba(246, 248, 252, 0.9);
  --surface-soft: rgba(79, 140, 255, 0.05);
  --surface-strong: rgba(79, 140, 255, 0.1);
}

body[data-theme="mint"] {
  --bg: #f2fbf8;
  --panel: #ffffff;
  --panel-2: #e8f7f2;
  --line: rgba(45, 105, 89, 0.14);
  --text: #17302b;
  --muted: #5b7a73;
  --brand: #2ec6a0;
  --accent: #60d7c6;
  --warning: #eab95b;
  --brand-ink: #eafff8;
  --glow-left: rgba(46, 198, 160, 0.12);
  --glow-right: rgba(96, 215, 198, 0.11);
  --panel-fill-1: rgba(255,255,255,0.92);
  --panel-fill-2: rgba(232,247,242,0.96);
  --sidebar-fill-1: rgba(255,255,255,0.9);
  --sidebar-fill-2: rgba(238,250,246,0.98);
  --sidebar-base: #ebf7f2;
  --topbar-bg: rgba(242, 251, 248, 0.92);
  --surface-soft: rgba(46, 198, 160, 0.05);
  --surface-strong: rgba(46, 198, 160, 0.1);
}

body[data-theme="sky"] {
  --bg: #f3f8ff;
  --panel: #ffffff;
  --panel-2: #eaf2ff;
  --line: rgba(64, 102, 160, 0.14);
  --text: #16243a;
  --muted: #647892;
  --brand: #5d99ff;
  --accent: #7fd4ff;
  --warning: #f0ba56;
  --brand-ink: #eef4ff;
  --glow-left: rgba(93, 153, 255, 0.13);
  --glow-right: rgba(127, 212, 255, 0.12);
  --panel-fill-1: rgba(255,255,255,0.92);
  --panel-fill-2: rgba(234,242,255,0.96);
  --sidebar-fill-1: rgba(255,255,255,0.9);
  --sidebar-fill-2: rgba(239,245,255,0.98);
  --sidebar-base: #edf4ff;
  --topbar-bg: rgba(243, 248, 255, 0.92);
  --surface-soft: rgba(93, 153, 255, 0.05);
  --surface-strong: rgba(93, 153, 255, 0.1);
}

body[data-theme="linen"] {
  --bg: #faf7f1;
  --panel: #fffdf8;
  --panel-2: #f5efe4;
  --line: rgba(116, 95, 64, 0.14);
  --text: #2e261b;
  --muted: #766a59;
  --brand: #c89b5c;
  --accent: #9ebcb4;
  --warning: #dfaa46;
  --brand-ink: #fff9ef;
  --glow-left: rgba(200, 155, 92, 0.11);
  --glow-right: rgba(158, 188, 180, 0.1);
  --panel-fill-1: rgba(255,253,248,0.92);
  --panel-fill-2: rgba(245,239,228,0.96);
  --sidebar-fill-1: rgba(255,253,248,0.9);
  --sidebar-fill-2: rgba(250,246,239,0.98);
  --sidebar-base: #f6f1e8;
  --topbar-bg: rgba(250, 247, 241, 0.92);
  --surface-soft: rgba(200, 155, 92, 0.05);
  --surface-strong: rgba(200, 155, 92, 0.1);
}

body[data-theme="blush"] {
  --bg: #fff5f7;
  --panel: #ffffff;
  --panel-2: #fdebf0;
  --line: rgba(154, 86, 115, 0.14);
  --text: #301b24;
  --muted: #806574;
  --brand: #e77aa3;
  --accent: #f4b6c9;
  --warning: #e8b058;
  --brand-ink: #fff0f5;
  --glow-left: rgba(231, 122, 163, 0.11);
  --glow-right: rgba(244, 182, 201, 0.1);
  --panel-fill-1: rgba(255,255,255,0.92);
  --panel-fill-2: rgba(253,235,240,0.96);
  --sidebar-fill-1: rgba(255,255,255,0.9);
  --sidebar-fill-2: rgba(255,245,247,0.98);
  --sidebar-base: #fff1f4;
  --topbar-bg: rgba(255, 245, 247, 0.92);
  --surface-soft: rgba(231, 122, 163, 0.05);
  --surface-strong: rgba(231, 122, 163, 0.1);
}

body[data-theme="lemon"] {
  --bg: #fffbea;
  --panel: #ffffff;
  --panel-2: #fff3c9;
  --line: rgba(144, 119, 42, 0.14);
  --text: #33290f;
  --muted: #7e7149;
  --brand: #e0b400;
  --accent: #ffd95b;
  --warning: #d6942b;
  --brand-ink: #fff9d9;
  --glow-left: rgba(224, 180, 0, 0.1);
  --glow-right: rgba(255, 217, 91, 0.1);
  --panel-fill-1: rgba(255,255,255,0.92);
  --panel-fill-2: rgba(255,243,201,0.96);
  --sidebar-fill-1: rgba(255,255,255,0.9);
  --sidebar-fill-2: rgba(255,249,227,0.98);
  --sidebar-base: #fff6d8;
  --topbar-bg: rgba(255, 251, 234, 0.92);
  --surface-soft: rgba(224, 180, 0, 0.05);
  --surface-strong: rgba(224, 180, 0, 0.1);
}

body[data-theme="pearl"] .field input,
body[data-theme="pearl"] .field select,
body[data-theme="pearl"] .field textarea,
body[data-theme="pearl"] .table-input,
body[data-theme="pearl"] .ai-command-input,
body[data-theme="pearl"] .ai-field-grid.editable input,
body[data-theme="pearl"] .ai-field-grid.editable textarea,
body[data-theme="pearl"] .assistant-form input,
body[data-theme="pearl"] .public-login-form input[type="email"],
body[data-theme="pearl"] .public-login-form input[type="password"],
body[data-theme="pearl"] .auth-form__field input,
body[data-theme="mint"] .field input,
body[data-theme="mint"] .field select,
body[data-theme="mint"] .field textarea,
body[data-theme="mint"] .table-input,
body[data-theme="mint"] .ai-command-input,
body[data-theme="mint"] .ai-field-grid.editable input,
body[data-theme="mint"] .ai-field-grid.editable textarea,
body[data-theme="mint"] .assistant-form input,
body[data-theme="mint"] .public-login-form input[type="email"],
body[data-theme="mint"] .public-login-form input[type="password"],
body[data-theme="mint"] .auth-form__field input,
body[data-theme="sky"] .field input,
body[data-theme="sky"] .field select,
body[data-theme="sky"] .field textarea,
body[data-theme="sky"] .table-input,
body[data-theme="sky"] .ai-command-input,
body[data-theme="sky"] .ai-field-grid.editable input,
body[data-theme="sky"] .ai-field-grid.editable textarea,
body[data-theme="sky"] .assistant-form input,
body[data-theme="sky"] .public-login-form input[type="email"],
body[data-theme="sky"] .public-login-form input[type="password"],
body[data-theme="sky"] .auth-form__field input,
body[data-theme="linen"] .field input,
body[data-theme="linen"] .field select,
body[data-theme="linen"] .field textarea,
body[data-theme="linen"] .table-input,
body[data-theme="linen"] .ai-command-input,
body[data-theme="linen"] .ai-field-grid.editable input,
body[data-theme="linen"] .ai-field-grid.editable textarea,
body[data-theme="linen"] .assistant-form input,
body[data-theme="linen"] .public-login-form input[type="email"],
body[data-theme="linen"] .public-login-form input[type="password"],
body[data-theme="linen"] .auth-form__field input,
body[data-theme="blush"] .field input,
body[data-theme="blush"] .field select,
body[data-theme="blush"] .field textarea,
body[data-theme="blush"] .table-input,
body[data-theme="blush"] .ai-command-input,
body[data-theme="blush"] .ai-field-grid.editable input,
body[data-theme="blush"] .ai-field-grid.editable textarea,
body[data-theme="blush"] .assistant-form input,
body[data-theme="blush"] .public-login-form input[type="email"],
body[data-theme="blush"] .public-login-form input[type="password"],
body[data-theme="blush"] .auth-form__field input,
body[data-theme="lemon"] .field input,
body[data-theme="lemon"] .field select,
body[data-theme="lemon"] .field textarea,
body[data-theme="lemon"] .table-input,
body[data-theme="lemon"] .ai-command-input,
body[data-theme="lemon"] .ai-field-grid.editable input,
body[data-theme="lemon"] .ai-field-grid.editable textarea,
body[data-theme="lemon"] .assistant-form input,
body[data-theme="lemon"] .public-login-form input[type="email"],
body[data-theme="lemon"] .public-login-form input[type="password"],
body[data-theme="lemon"] .auth-form__field input {
  background: rgba(255, 255, 255, 0.96);
  color: #1f2d3d;
  border-color: rgba(60, 76, 96, 0.18);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

body[data-theme="pearl"] .field input::placeholder,
body[data-theme="pearl"] .field textarea::placeholder,
body[data-theme="pearl"] .table-input::placeholder,
body[data-theme="pearl"] .ai-command-input::placeholder,
body[data-theme="pearl"] .ai-field-grid.editable input::placeholder,
body[data-theme="pearl"] .ai-field-grid.editable textarea::placeholder,
body[data-theme="mint"] .field input::placeholder,
body[data-theme="mint"] .field textarea::placeholder,
body[data-theme="mint"] .table-input::placeholder,
body[data-theme="mint"] .ai-command-input::placeholder,
body[data-theme="mint"] .ai-field-grid.editable input::placeholder,
body[data-theme="mint"] .ai-field-grid.editable textarea::placeholder,
body[data-theme="sky"] .field input::placeholder,
body[data-theme="sky"] .field textarea::placeholder,
body[data-theme="sky"] .table-input::placeholder,
body[data-theme="sky"] .ai-command-input::placeholder,
body[data-theme="sky"] .ai-field-grid.editable input::placeholder,
body[data-theme="sky"] .ai-field-grid.editable textarea::placeholder,
body[data-theme="linen"] .field input::placeholder,
body[data-theme="linen"] .field textarea::placeholder,
body[data-theme="linen"] .table-input::placeholder,
body[data-theme="linen"] .ai-command-input::placeholder,
body[data-theme="linen"] .ai-field-grid.editable input::placeholder,
body[data-theme="linen"] .ai-field-grid.editable textarea::placeholder,
body[data-theme="blush"] .field input::placeholder,
body[data-theme="blush"] .field textarea::placeholder,
body[data-theme="blush"] .table-input::placeholder,
body[data-theme="blush"] .ai-command-input::placeholder,
body[data-theme="blush"] .ai-field-grid.editable input::placeholder,
body[data-theme="blush"] .ai-field-grid.editable textarea::placeholder,
body[data-theme="lemon"] .field input::placeholder,
body[data-theme="lemon"] .field textarea::placeholder,
body[data-theme="lemon"] .table-input::placeholder,
body[data-theme="lemon"] .ai-command-input::placeholder,
body[data-theme="lemon"] .ai-field-grid.editable input::placeholder,
body[data-theme="lemon"] .ai-field-grid.editable textarea::placeholder {
  color: rgba(47, 61, 77, 0.58);
}

body[data-theme="pearl"] .finance-preview-wrap,
body[data-theme="mint"] .finance-preview-wrap,
body[data-theme="sky"] .finance-preview-wrap,
body[data-theme="linen"] .finance-preview-wrap,
body[data-theme="blush"] .finance-preview-wrap,
body[data-theme="lemon"] .finance-preview-wrap {
  background: rgba(255, 255, 255, 0.8);
}

body:is([data-theme="pearl"], [data-theme="mint"], [data-theme="sky"], [data-theme="linen"], [data-theme="blush"], [data-theme="lemon"]) {
  color-scheme: light;
  --input-bg: #ffffff;
  --input-text: #101827;
  --input-muted: rgba(34, 45, 62, 0.58);
  --table-head-bg: rgba(226, 232, 240, 0.96);
  --table-sticky-bg: rgba(236, 241, 248, 0.98);
  --table-row-alert-bg: rgba(255, 228, 230, 0.78);
  --sticky-actions-bg: linear-gradient(180deg, rgba(255, 255, 255, 0), rgba(248, 250, 252, 0.97) 32%);
}

body:is([data-theme="pearl"], [data-theme="mint"], [data-theme="sky"], [data-theme="linen"], [data-theme="blush"], [data-theme="lemon"]) .admin-table th {
  color: #334155;
  background: var(--table-head-bg);
}

body:is([data-theme="pearl"], [data-theme="mint"], [data-theme="sky"], [data-theme="linen"], [data-theme="blush"], [data-theme="lemon"]) .admin-table td {
  color: #172033;
}

body:is([data-theme="pearl"], [data-theme="mint"], [data-theme="sky"], [data-theme="linen"], [data-theme="blush"], [data-theme="lemon"]) .finance-preview-table td:first-child,
body:is([data-theme="pearl"], [data-theme="mint"], [data-theme="sky"], [data-theme="linen"], [data-theme="blush"], [data-theme="lemon"]) .finance-preview-table th:first-child,
body:is([data-theme="pearl"], [data-theme="mint"], [data-theme="sky"], [data-theme="linen"], [data-theme="blush"], [data-theme="lemon"]) .finance-preview-table thead th {
  color: #263246;
  background: var(--table-sticky-bg);
}

body:is([data-theme="pearl"], [data-theme="mint"], [data-theme="sky"], [data-theme="linen"], [data-theme="blush"], [data-theme="lemon"]) .finance-row-alert {
  background: var(--table-row-alert-bg);
}

body:is([data-theme="pearl"], [data-theme="mint"], [data-theme="sky"], [data-theme="linen"], [data-theme="blush"], [data-theme="lemon"]) .sticky-form-actions {
  background: var(--sticky-actions-bg);
}

body:is([data-theme="pearl"], [data-theme="mint"], [data-theme="sky"], [data-theme="linen"], [data-theme="blush"], [data-theme="lemon"]) .finance-code-kind-legal_entity {
  color: #164e80;
  background: rgba(96, 165, 250, 0.18);
}

body:is([data-theme="pearl"], [data-theme="mint"], [data-theme="sky"], [data-theme="linen"], [data-theme="blush"], [data-theme="lemon"]) .finance-code-kind-individual {
  color: #166534;
  background: rgba(34, 197, 94, 0.16);
}

body:is([data-theme="pearl"], [data-theme="mint"], [data-theme="sky"], [data-theme="linen"], [data-theme="blush"], [data-theme="lemon"]) .finance-code-kind-invalid,
body:is([data-theme="pearl"], [data-theme="mint"], [data-theme="sky"], [data-theme="linen"], [data-theme="blush"], [data-theme="lemon"]) .finance-code-kind-unknown {
  color: #92400e;
  background: rgba(245, 158, 11, 0.16);
}

a { color: inherit; }

.app-shell {
  width: min(1120px, calc(100vw - 32px));
  margin: 0 auto;
  padding: 24px 0 48px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 0 34px;
}

.brand {
  font-size: 24px;
  font-weight: 800;
  text-decoration: none;
  letter-spacing: 0;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.user-pill, .range {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 12px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.05);
}

.ghost-button, .primary-button {
  border: 0;
  border-radius: 8px;
  min-height: 42px;
  padding: 10px 16px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.ghost-button {
  color: var(--text);
  background: rgba(255, 255, 255, 0.08);
}

.primary-button {
  width: 100%;
  background: var(--brand);
  color: var(--brand-ink);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 28px;
  align-items: end;
  padding: 46px 0 34px;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--brand);
  text-transform: uppercase;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

h1, h2, p { margin-top: 0; }

h1 {
  max-width: 760px;
  margin-bottom: 14px;
  font-size: clamp(42px, 8vw, 88px);
  line-height: 0.95;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 0;
  font-size: 28px;
}

.hero-copy {
  max-width: 620px;
  color: var(--muted);
  font-size: 18px;
}

.hero-card, .panel, .stat-card, .auth-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(180deg, var(--panel-fill-1), var(--panel-fill-2));
  box-shadow: 0 24px 70px rgba(0,0,0,0.25);
}

.hero-card {
  display: grid;
  gap: 6px;
  padding: 20px;
}

.hero-card small, .stat-card span, .auth-copy p {
  color: var(--muted);
}

.pulse {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--brand);
  box-shadow: 0 0 0 8px rgba(73, 210, 166, 0.14);
}

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

.stat-card {
  display: grid;
  gap: 8px;
  min-height: 142px;
  padding: 18px;
}

.stat-card strong {
  font-size: 38px;
}

.stat-card em {
  color: var(--brand);
  font-style: normal;
  font-weight: 800;
}

.panel {
  margin-top: 16px;
  padding: 22px;
}

.panel-heading {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: start;
}

.chart {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 10px;
  height: 280px;
  align-items: end;
  padding-top: 28px;
}

.bar-wrap {
  display: grid;
  grid-template-rows: 1fr auto;
  gap: 8px;
  height: 100%;
  color: var(--muted);
  text-align: center;
}

.bar {
  align-self: end;
  min-height: 12px;
  border-radius: 6px 6px 2px 2px;
  background: linear-gradient(180deg, var(--accent), var(--brand));
}

.auth-screen {
  min-height: calc(100vh - 140px);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 420px);
  gap: 40px;
  align-items: center;
}

.auth-copy h1 {
  font-size: clamp(46px, 7vw, 78px);
}

.auth-card {
  padding: 24px;
}

.auth-screen-kep {
  align-items: start;
}

.auth-dual-card {
  display: grid;
  gap: 18px;
}

.auth-card-block {
  display: grid;
  gap: 14px;
  padding: 4px 0;
}

.auth-card-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.auth-card-head span,
.auth-kep-hint p {
  color: var(--muted);
}

.auth-kep-block {
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.auth-kep-hint {
  display: grid;
  gap: 6px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255,255,255,0.04);
}

.auth-kep-button {
  width: 100%;
}

.auth-form {
  display: grid;
  gap: 16px;
}

.auth-form label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-weight: 700;
}

.auth-form input[type="email"],
.auth-form input[type="password"] {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  background: rgba(255,255,255,0.08);
  color: var(--text);
  font: inherit;
}

.flash {
  margin-bottom: 16px;
  border-radius: 8px;
  padding: 12px 14px;
}

.flash.alert { background: rgba(244, 63, 94, 0.18); }
.flash.notice { background: rgba(73, 210, 166, 0.16); }

.public-site-shell {
  min-height: 100vh;
  padding: 18px;
}

.public-topbar {
  position: sticky;
  top: 12px;
  z-index: 20;
  display: grid;
  grid-template-columns: auto auto;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
  width: min(1180px, 100%);
  margin: 0 auto 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: rgba(15, 23, 42, 0.76);
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.24);
  backdrop-filter: blur(18px);
}

.public-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-weight: 900;
  text-decoration: none;
}

.public-brand span {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  color: #052017;
  background: var(--brand);
}

.public-nav {
  display: flex;
  justify-content: center;
  gap: 8px;
  min-width: 0;
}

.public-nav a {
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 9px 12px;
  color: var(--muted);
  font-weight: 800;
  text-decoration: none;
}

.public-nav a:hover {
  border-color: var(--line);
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
}

.public-login-dropdown {
  position: relative;
}

.public-login-dropdown summary {
  list-style: none;
  border-radius: 999px;
  min-height: 40px;
  padding: 10px 16px;
  color: #052017;
  background: var(--brand);
  font-weight: 900;
  cursor: pointer;
}

.public-login-dropdown summary::-webkit-details-marker {
  display: none;
}

.public-login-panel {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: min(360px, calc(100vw - 36px));
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  color: var(--text);
  background: rgba(17, 24, 39, 0.96);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.38);
}

.public-login-panel > strong {
  display: block;
  margin-bottom: 4px;
  font-size: 18px;
}

.public-login-panel > span {
  display: block;
  margin-bottom: 14px;
  color: var(--muted);
  line-height: 1.45;
}

.public-login-form {
  display: grid;
  gap: 12px;
}

.public-login-form label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-weight: 800;
}

.public-login-form input[type="email"],
.public-login-form input[type="password"] {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.07);
  font: inherit;
}

.public-content {
  width: min(1180px, 100%);
  margin: 0 auto;
}

@media (max-width: 780px) {
  .hero, .auth-screen, .stats-grid {
    grid-template-columns: 1fr;
  }

  .chart {
    gap: 6px;
  }
}

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
  gap: 16px;
  align-items: start;
}

.chart-value {
  font-size: 32px;
  color: var(--brand);
}

.segmented {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 18px;
}

.segmented button {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 12px;
  color: var(--muted);
  background: rgba(255,255,255,0.05);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.segmented button.active {
  color: #052017;
  background: var(--brand);
  border-color: transparent;
}

.bar {
  position: relative;
  transition: height 260ms ease;
}

.bar::after {
  content: attr(data-value);
  position: absolute;
  top: -24px;
  left: 50%;
  transform: translateX(-50%);
  color: var(--muted);
  font-size: 12px;
  opacity: 0;
  transition: opacity 160ms ease;
}

.bar-wrap:hover .bar::after {
  opacity: 1;
}

.news-panel {
  min-height: 430px;
}

.news-status {
  margin: 12px 0;
  color: var(--muted);
  font-size: 14px;
}

.news-list {
  display: grid;
  gap: 10px;
}

.news-item {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: rgba(255,255,255,0.045);
}

.news-item span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 5px;
}

.news-item a {
  display: block;
  color: var(--text);
  font-weight: 750;
  text-decoration: none;
}

.news-item a:hover {
  color: var(--brand);
}

@media (max-width: 900px) {
  .dashboard-grid {
    grid-template-columns: 1fr;
  }
}

.dashboard-hero-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-top: 22px;
}

.hero-stat-card {
  display: grid;
  gap: 7px;
  min-height: 126px;
  padding: 18px;
  border: 1px solid rgba(5, 7, 11, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.28);
  backdrop-filter: blur(14px);
  text-align: left;
  box-shadow: 0 18px 44px rgba(33, 38, 80, 0.12);
}

.hero-stat-card span {
  color: rgba(5, 7, 11, 0.64);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.hero-stat-card strong {
  color: #030509;
  font-size: clamp(28px, 3vw, 40px);
  line-height: 1;
}

.hero-stat-card em {
  color: rgba(5, 7, 11, 0.7);
  font-style: normal;
  font-weight: 700;
}

.analytics-stats-grid {
  margin-top: 18px;
}

.analytics-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.analytics-ops-grid {
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
}

.analytics-panel {
  min-height: 100%;
}

.panel-copy {
  max-width: 60ch;
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.6;
}

.analytics-chart {
  grid-template-columns: repeat(6, 1fr);
}

.analytics-chart.compact {
  height: 260px;
  gap: 16px;
  align-items: stretch;
}

.chart-bar {
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto auto;
  gap: 10px;
  min-width: 0;
}

.chart-bar-track {
  position: relative;
  display: flex;
  align-items: end;
  height: 100%;
  min-height: 150px;
  border-radius: 10px;
  padding: 10px;
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid var(--line);
}

.chart-bar-fill {
  width: 100%;
  min-height: 10px;
  border-radius: 8px 8px 4px 4px;
  background: linear-gradient(180deg, var(--accent), var(--brand));
  box-shadow: 0 8px 20px rgba(73, 210, 166, 0.2);
}

.chart-bar strong {
  font-size: 15px;
  line-height: 1.2;
  color: var(--text);
}

.chart-bar span {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.3;
  word-break: break-word;
}

.quality-stack {
  display: grid;
  gap: 14px;
  margin-top: 12px;
}

.quality-row {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(150px, 2fr) auto;
  gap: 14px;
  align-items: center;
}

.quality-row strong,
.mini-panel h3,
.finance-card strong,
.watchlist-item strong {
  color: var(--text);
}

.quality-row span,
.mini-panel span,
.finance-card span,
.watchlist-item span,
.watchlist-item em {
  color: var(--muted);
}

.quality-row em {
  color: var(--brand);
  font-style: normal;
  font-weight: 800;
}

.quality-meter {
  position: relative;
  height: 12px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
}

.quality-meter i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), var(--brand));
}

.mini-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 12px;
}

.mini-panel {
  display: grid;
  gap: 14px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.035);
}

.mini-panel h3 {
  margin: 0;
  font-size: 17px;
}

.purpose-list {
  display: grid;
  gap: 10px;
}

.purpose-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: baseline;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.purpose-row:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.document-status-grid-wide {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.finance-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 12px;
}

.finance-card {
  display: grid;
  gap: 8px;
  min-height: 126px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
}

.finance-card strong {
  font-size: clamp(24px, 2.6vw, 36px);
  line-height: 1.1;
}

.recommendation-list {
  display: grid;
  gap: 12px;
  margin-top: 12px;
}

.recommendation-card {
  display: grid;
  gap: 10px;
  padding: 16px;
  border: 1px solid var(--line);
  border-left: 4px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
}

.recommendation-card.high {
  border-left-color: #f4bf50;
}

.recommendation-card.medium {
  border-left-color: #6ea8ff;
}

.recommendation-card.low {
  border-left-color: #49d2a6;
}

.recommendation-card p,
.recommendation-card em {
  margin: 0;
  line-height: 1.55;
}

.recommendation-card p {
  color: var(--text);
}

.recommendation-card em {
  color: var(--muted);
  font-style: normal;
}

.recommendation-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: start;
}

.recommendation-head strong {
  font-size: 17px;
}

.recommendation-head span {
  color: var(--brand);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
  white-space: nowrap;
}

.watchlist {
  display: grid;
  gap: 12px;
  margin-top: 12px;
}

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

.quality-issue-card {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 16px;
  background: rgba(255, 255, 255, 0.04);
  display: grid;
  gap: 10px;
}

.quality-issue-card.warning {
  border-color: rgba(255, 186, 73, 0.42);
  background: linear-gradient(180deg, rgba(255, 186, 73, 0.1), rgba(255, 255, 255, 0.04));
}

.quality-issue-card.ok {
  border-color: rgba(73, 210, 166, 0.4);
  background: linear-gradient(180deg, rgba(73, 210, 166, 0.1), rgba(255, 255, 255, 0.04));
}

.quality-issue-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: baseline;
}

.quality-issue-card strong {
  font-size: 28px;
  line-height: 1;
}

.quality-issue-card p {
  margin: 0;
  color: var(--muted);
}

.quality-queue {
  display: grid;
  gap: 12px;
}

.quality-queue-item {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 16px;
  background: rgba(255, 255, 255, 0.04);
  display: grid;
  gap: 12px;
  text-decoration: none;
}

.quality-queue-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: start;
}

.quality-queue-head > div {
  display: grid;
  gap: 6px;
}

.quality-score-pill {
  border-radius: 999px;
  padding: 8px 12px;
  background: rgba(255, 186, 73, 0.14);
  color: #ffcf75;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
  white-space: nowrap;
}

.quality-flags {
  margin: 0;
  padding-left: 18px;
  display: grid;
  gap: 6px;
  color: var(--muted);
}

.watchlist-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 0.9fr);
  gap: 14px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  text-decoration: none;
}

.watchlist-item div {
  display: grid;
  gap: 6px;
}

.watchlist-item ul {
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
  display: grid;
  gap: 6px;
}

@media (max-width: 980px) {
  .dashboard-hero-stats,
  .analytics-stats-grid,
  .mini-grid,
  .finance-grid,
  .document-status-grid-wide,
  .quality-overview-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .quality-row,
  .watchlist-item,
  .quality-queue-head {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .dashboard-hero-stats,
  .analytics-stats-grid,
  .mini-grid,
  .finance-grid,
  .document-status-grid-wide,
  .quality-overview-grid {
    grid-template-columns: 1fr;
  }

  .recommendation-head {
    flex-direction: column;
  }
}

.diia-dashboard-hero {
  position: relative;
  overflow: hidden;
  min-height: 500px;
  margin: 0 0 18px;
  border-radius: 8px;
  color: #05070b;
  background:
    linear-gradient(115deg, #88efad 0%, #9fd9f4 43%, #8e7ce6 72%, #d06db7 100%);
}

.diia-hero-inner {
  width: min(920px, calc(100% - 36px));
  margin: 0 auto;
  padding: clamp(34px, 6vw, 64px) 0 38px;
  text-align: center;
}

.diia-hero-topline {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 22px;
  font-weight: 800;
}

.diia-hero-topline span,
.diia-hero-topline time {
  border: 1px solid rgba(5, 7, 11, 0.14);
  border-radius: 999px;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.25);
  backdrop-filter: blur(14px);
}

.diia-dashboard-hero h1 {
  max-width: none;
  margin: 0 auto 14px;
  color: #030509;
  font-size: clamp(44px, 7.5vw, 86px);
  line-height: 1.02;
  font-weight: 900;
}

.diia-hero-copy {
  max-width: 680px;
  margin: 0 auto 24px;
  color: rgba(5, 7, 11, 0.72);
  font-size: clamp(16px, 2vw, 20px);
  font-weight: 650;
}

.diia-mode-switch {
  display: inline-flex;
  gap: 6px;
  min-height: 58px;
  margin-bottom: 20px;
  padding: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.36);
  backdrop-filter: blur(18px);
}

.diia-mode-switch button {
  border: 0;
  border-radius: 999px;
  min-width: 142px;
  min-height: 46px;
  padding: 10px 18px;
  color: #05070b;
  background: transparent;
  font: inherit;
  font-weight: 850;
  cursor: pointer;
}

.diia-mode-switch button.active {
  color: #fff;
  background: #05070b;
}

.diia-mode-switch.public-only a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 178px;
  min-height: 46px;
  border-radius: 999px;
  padding: 10px 18px;
  color: rgba(5, 7, 11, 0.78);
  background: rgba(255, 255, 255, 0.18);
  font-weight: 850;
  text-decoration: none;
}

.diia-search-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 54px;
  gap: 8px;
  align-items: center;
  width: min(820px, 100%);
  min-height: 66px;
  margin: 0 auto;
  border-radius: 999px;
  padding: 6px 8px 6px 28px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 22px 70px rgba(33, 38, 80, 0.18);
}

.diia-search-form:has(.diia-command-file:not(.is-hidden)) {
  border-radius: 28px;
}

.diia-search-form input {
  min-width: 0;
  border: 0;
  outline: 0;
  color: #20232a;
  background: transparent;
  font: inherit;
  font-size: clamp(17px, 2.5vw, 23px);
  font-weight: 600;
}

.diia-search-form input::placeholder {
  color: rgba(5, 7, 11, 0.62);
}

.diia-search-form button[type="submit"] {
  display: inline-grid;
  place-items: center;
  width: 50px;
  height: 50px;
  border: 0;
  border-radius: 50%;
  color: #fff;
  background: #05070b;
  font: inherit;
  font-size: 28px;
  font-weight: 900;
  cursor: pointer;
}

.diia-example {
  margin: 14px auto 0;
  color: rgba(5, 7, 11, 0.74);
  font-weight: 650;
}

.diia-example button {
  border: 0;
  padding: 0;
  color: #05070b;
  background: transparent;
  font: inherit;
  font-weight: 850;
  text-decoration: underline;
  cursor: pointer;
}

.diia-command-file {
  display: grid;
  gap: 5px;
  grid-column: 1 / -1;
  width: 100%;
  margin: 4px 0 0;
  border: 1px solid rgba(255, 255, 255, 0.56);
  border-radius: 18px;
  padding: 14px 18px 15px;
  color: rgba(5, 7, 11, 0.72);
  background: rgba(255, 255, 255, 0.5);
  box-shadow: 0 16px 44px rgba(33, 38, 80, 0.12);
  backdrop-filter: blur(14px);
  cursor: pointer;
  text-align: left;
  transition: transform 160ms ease, background 160ms ease, border-color 160ms ease;
}

.diia-command-file:hover {
  transform: translateY(-1px);
  border-color: rgba(5, 7, 11, 0.2);
  background: rgba(255, 255, 255, 0.68);
}

.diia-command-file.is-hidden {
  display: none;
}

.diia-command-file span {
  color: rgba(5, 7, 11, 0.62);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.diia-command-file strong {
  color: #05070b;
  font-weight: 850;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.diia-command-file em {
  color: rgba(5, 7, 11, 0.66);
  font-style: normal;
  font-weight: 650;
}

.diia-command-file input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.diia-chat-panel {
  display: none;
  width: min(820px, 100%);
  margin: 18px auto 0;
  border: 1px solid rgba(5, 7, 11, 0.14);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 24px 80px rgba(33, 38, 80, 0.18);
  backdrop-filter: blur(18px);
  text-align: left;
}

.diia-chat-panel.open {
  display: block;
}

.diia-chat-header {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
  padding: 16px 18px;
  border-bottom: 1px solid rgba(5, 7, 11, 0.1);
}

.diia-chat-header span {
  display: block;
  color: rgba(5, 7, 11, 0.55);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.diia-chat-header strong {
  display: block;
  color: #05070b;
  font-size: 18px;
}

.diia-chat-header button {
  border: 1px solid rgba(5, 7, 11, 0.14);
  border-radius: 999px;
  min-height: 36px;
  padding: 8px 12px;
  color: #05070b;
  background: rgba(255, 255, 255, 0.55);
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.diia-chat-messages {
  display: grid;
  gap: 12px;
  max-height: min(360px, 45vh);
  overflow: auto;
  padding: 18px;
  overscroll-behavior: contain;
}

.diia-chat-message {
  max-width: min(680px, 92%);
  border-radius: 8px;
  padding: 12px 14px;
  color: #0b1220;
  background: rgba(5, 7, 11, 0.07);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  line-height: 1.5;
}

.diia-chat-message.user {
  justify-self: end;
  color: #fff;
  background: #05070b;
}

.diia-chat-message.bot {
  justify-self: start;
}

.diia-chat-message a {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  margin-top: 8px;
  border-radius: 999px;
  padding: 7px 12px;
  color: #fff;
  background: #05070b;
  font-weight: 850;
  text-decoration: none;
}

.diia-command-card {
  display: grid;
  gap: 12px;
  width: min(100%, 640px);
}

.diia-command-card strong {
  font-size: 18px;
  line-height: 1.3;
}

.diia-command-card p {
  margin: 0;
  color: rgba(11, 18, 32, 0.82);
}

.diia-command-warnings {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.diia-command-warnings span {
  border: 1px solid rgba(227, 179, 65, 0.45);
  border-radius: 999px;
  padding: 7px 10px;
  color: #7a4e00;
  background: rgba(255, 231, 170, 0.6);
  font-size: 13px;
  font-weight: 700;
}

.diia-command-fields {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
}

.diia-command-fields div {
  border: 1px solid rgba(5, 7, 11, 0.12);
  border-radius: 8px;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.65);
}

.diia-command-fields span {
  display: block;
  margin-bottom: 6px;
  color: rgba(5, 7, 11, 0.55);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.diia-command-fields strong {
  font-size: 14px;
  line-height: 1.45;
}

.diia-command-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.diia-command-execute,
.diia-command-open {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  border-radius: 999px;
  padding: 10px 16px;
  font-weight: 850;
  text-decoration: none;
}

.diia-command-execute {
  border: none;
  color: #fff;
  background: #05070b;
  cursor: pointer;
}

.diia-command-execute:disabled {
  opacity: 0.62;
  cursor: progress;
}

.diia-command-open {
  border: 1px solid rgba(5, 7, 11, 0.14);
  color: #05070b;
  background: rgba(255, 255, 255, 0.6);
}

.diia-suggestion-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.diia-suggestion-row button {
  border: 1px solid rgba(5, 7, 11, 0.14);
  border-radius: 999px;
  min-height: 36px;
  padding: 8px 12px;
  color: #05070b;
  background: rgba(255, 255, 255, 0.6);
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

@media (max-width: 720px) {
  .public-site-shell {
    padding: 10px;
  }

  .public-topbar {
    position: relative;
    top: 0;
    grid-template-columns: 1fr auto;
  }

  .diia-dashboard-hero {
    min-height: 0;
    margin: 0 -8px 16px;
  }

  .diia-hero-inner {
    width: calc(100% - 24px);
    padding: 24px 0;
  }

  .diia-hero-topline {
    align-items: flex-start;
    margin-bottom: 18px;
  }

  .diia-dashboard-hero h1 {
    font-size: clamp(38px, 14vw, 58px);
  }

  .diia-mode-switch {
    width: 100%;
  }

  .diia-mode-switch button {
    flex: 1;
    min-width: 0;
  }

  .diia-search-form {
    grid-template-columns: minmax(0, 1fr) 48px;
    min-height: 58px;
    padding-left: 18px;
  }

  .diia-search-form button[type="submit"] {
    width: 44px;
    height: 44px;
  }

  .diia-chat-header {
    align-items: flex-start;
  }

  .diia-chat-messages {
    max-height: 320px;
    padding: 14px;
  }
}

.live-hero {
  min-height: 520px;
  align-items: center;
}

.hero-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 24px;
}

.primary-link,
.secondary-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  border-radius: 8px;
  padding: 10px 16px;
  font-weight: 800;
  text-decoration: none;
}

.primary-link {
  background: var(--brand);
  color: var(--brand-ink);
}

.secondary-link {
  border: 1px solid var(--line);
  color: var(--text);
  background: rgba(255,255,255,0.06);
}

.command-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.12), rgba(255,255,255,0.04)),
    var(--panel);
  box-shadow: 0 30px 90px rgba(0,0,0,0.35);
}

.command-header,
.signal-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.command-header time,
.signal-row span {
  color: var(--muted);
}

.radar {
  position: relative;
  height: 180px;
  margin: 20px 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    radial-gradient(circle, rgba(73,210,166,0.18) 0 2px, transparent 3px),
    linear-gradient(90deg, rgba(255,255,255,0.06) 1px, transparent 1px),
    linear-gradient(rgba(255,255,255,0.06) 1px, transparent 1px);
  background-size: 100% 100%, 32px 32px, 32px 32px;
  overflow: hidden;
}

.radar::after {
  content: "";
  position: absolute;
  inset: 50% auto auto 50%;
  width: 150px;
  height: 150px;
  transform-origin: 0 0;
  background: linear-gradient(45deg, rgba(73,210,166,0.35), transparent 60%);
  animation: sweep 5s linear infinite;
}

.radar span {
  position: absolute;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--brand);
  box-shadow: 0 0 22px var(--brand);
}

.radar span:nth-child(1) { left: 28%; top: 38%; }
.radar span:nth-child(2) { left: 68%; top: 48%; }
.radar span:nth-child(3) { left: 48%; top: 68%; }

@keyframes sweep {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.signal-row {
  border-top: 1px solid var(--line);
  padding: 12px 0 0;
  margin-top: 12px;
}

.signal-row strong {
  color: var(--brand);
}

.tone-green { background: linear-gradient(180deg, rgba(73,210,166,0.16), rgba(255,255,255,0.04)); }
.tone-blue { background: linear-gradient(180deg, rgba(110,168,255,0.16), rgba(255,255,255,0.04)); }
.tone-violet { background: linear-gradient(180deg, rgba(171,127,255,0.16), rgba(255,255,255,0.04)); }
.tone-amber { background: linear-gradient(180deg, rgba(244,191,80,0.16), rgba(255,255,255,0.04)); }

.panel-copy {
  margin: 8px 0 0;
  color: var(--muted);
}

.sparkline {
  width: 100%;
  height: 110px;
  margin-top: 18px;
}

.sparkline polyline {
  fill: none;
  stroke: var(--brand);
  stroke-width: 4;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: drop-shadow(0 0 10px rgba(73,210,166,0.45));
  transition: all 220ms ease;
}

.analytics-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 16px;
}

.analytics-summary span {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.045);
  font-weight: 750;
}

.analytics-summary strong {
  display: block;
  margin-bottom: 3px;
  color: var(--text);
  font-size: 24px;
}

.live-status-panel {
  min-height: 430px;
}

.status-breakdown {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}

.status-row {
  display: grid;
  gap: 8px;
}

.status-row > div:first-child {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
}

.status-row strong {
  color: var(--text);
}

.status-meter {
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
}

.status-meter i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--brand), var(--accent));
}

.document-status-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 22px;
}

.document-status-grid span {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.045);
  overflow-wrap: anywhere;
}

.document-status-grid strong {
  display: block;
  color: var(--brand);
  font-size: 22px;
}

.ticker {
  width: 100%;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  margin: 16px 0;
  background: rgba(255,255,255,0.05);
}

.ticker div {
  display: inline-flex;
  gap: 28px;
  white-space: nowrap;
  padding: 10px 12px;
  color: var(--muted);
  animation: ticker 28s linear infinite;
}

.ticker span::before {
  content: "•";
  color: var(--brand);
  margin-right: 10px;
}

@keyframes ticker {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

.featured-news {
  display: block;
  border: 1px solid rgba(73,210,166,0.28);
  border-radius: 8px;
  padding: 16px;
  text-decoration: none;
  background: linear-gradient(135deg, rgba(73,210,166,0.14), rgba(110,168,255,0.08));
}

.featured-news span,
.timeline-item time,
.timeline-item span {
  display: block;
  color: var(--muted);
  font-size: 13px;
}

.featured-news strong {
  display: block;
  margin-top: 6px;
  font-size: 20px;
  line-height: 1.25;
}

.news-list.loading {
  opacity: 0.55;
}

.operations-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.55fr);
  gap: 16px;
  margin-top: 16px;
}

.timeline {
  display: grid;
  gap: 12px;
  margin-top: 20px;
}

.timeline-item {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 14px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255,255,255,0.045);
}

.timeline-item strong {
  display: block;
  margin-bottom: 4px;
}

.stack-list {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}

.stack-list span {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: rgba(255,255,255,0.05);
  color: var(--muted);
  font-weight: 800;
}

.recent-case-list {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}

.recent-case-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.045);
  text-decoration: none;
}

.recent-case-item:hover {
  border-color: rgba(73, 210, 166, 0.45);
  background: rgba(73, 210, 166, 0.08);
}

.recent-case-item strong,
.recent-case-item span {
  display: block;
}

.recent-case-item span {
  margin-top: 4px;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.recent-case-item em {
  border-radius: 999px;
  padding: 7px 10px;
  color: #052017;
  background: var(--brand);
  font-style: normal;
  font-weight: 900;
}

.public-analytics-note {
  display: grid;
  gap: 10px;
  margin-top: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  background: rgba(255, 255, 255, 0.045);
}

.public-analytics-note span {
  color: var(--muted);
  line-height: 1.5;
}

.public-analytics-note a {
  justify-self: start;
  border-radius: 999px;
  padding: 9px 13px;
  color: #052017;
  background: var(--brand);
  font-weight: 900;
  text-decoration: none;
}

@media (max-width: 900px) {
  .operations-grid {
    grid-template-columns: 1fr;
  }

  .analytics-summary,
  .document-status-grid {
    grid-template-columns: 1fr;
  }

  .live-hero {
    min-height: auto;
  }
}


/* Workspace shell redesign */
.workspace-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 172px minmax(0, 1fr);
  align-items: start;
}

.workspace-sidebar {
  position: relative;
  top: auto;
  min-height: auto;
  height: auto;
  align-self: start;
  padding: 22px 16px;
  border-right: 1px solid var(--line);
  background:
    linear-gradient(180deg, var(--sidebar-fill-1), var(--sidebar-fill-2)),
    var(--sidebar-base);
  display: flex;
  flex-direction: column;
  gap: 26px;
  overflow: visible;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.sidebar-brand span,
.user-cell > span {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 8px;
  background: var(--brand);
  color: #052017;
  font-weight: 900;
}

.sidebar-brand strong {
  font-size: 24px;
}

.sidebar-nav {
  display: grid;
  gap: 8px;
  min-height: 0;
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 44px;
  padding: 10px 12px;
  border-radius: 8px;
  color: var(--muted);
  text-decoration: none;
  font-weight: 750;
}

.sidebar-link span {
  color: rgba(248, 250, 252, 0.42);
  font-size: 12px;
  font-weight: 900;
}

.sidebar-link.active,
.sidebar-link:hover {
  color: var(--text);
  background: var(--surface-strong);
}

.sidebar-link.active span {
  color: var(--brand);
}

.sidebar-link.disabled {
  opacity: 0.45;
  cursor: default;
}

.sidebar-foot {
  display: none;
  margin-top: auto;
  gap: 10px;
  align-items: center;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
}

.sidebar-foot small {
  display: block;
  color: var(--muted);
  margin-top: 2px;
}

.status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--brand);
  box-shadow: 0 0 0 7px rgba(73, 210, 166, 0.14);
}

.workspace-main {
  min-width: 0;
}

.mobile-menu-button,
.mobile-menu-backdrop {
  display: none;
}

.mobile-topbar-left {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.workspace-topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  min-height: 74px;
  padding: 14px 32px;
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
  border-bottom: 1px solid var(--line);
  background: var(--topbar-bg);
  backdrop-filter: blur(16px);
}

.workspace-topbar strong {
  display: block;
  margin-top: 2px;
  font-size: 20px;
}

.topbar-kicker {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.workspace-content {
  width: min(1480px, calc(100% - 6px));
  margin: 0 auto;
  padding: 18px 0 48px;
}

.workspace-content-wide {
  width: min(1920px, calc(100% - 4px));
}

.auth-shell {
  width: min(1120px, calc(100vw - 32px));
}

.workspace-content > .hero {
  padding-top: 18px;
}

.flash {
  width: min(1280px, calc(100% - 28px));
  margin: 16px auto 0;
  padding: 12px 14px;
  border-radius: 8px;
  border: 1px solid var(--line);
}

.flash.alert {
  background: rgba(244, 80, 80, 0.12);
  color: #fecaca;
}

.flash.notice {
  background: rgba(73, 210, 166, 0.12);
  color: #b7f7df;
}

/* Admin redesign */
.admin-page {
  width: 100%;
  margin: 0;
}

.admin-page.narrow {
  max-width: 920px;
}

.admin-titlebar {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: flex-end;
  margin-bottom: 18px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(73,210,166,0.12), rgba(110,168,255,0.08)),
    rgba(255,255,255,0.045);
}

.admin-titlebar h1 {
  margin-bottom: 8px;
  max-width: 760px;
  font-size: clamp(34px, 5vw, 62px);
  line-height: 0.98;
}

.admin-titlebar p:not(.eyebrow) {
  margin: 0;
  color: var(--muted);
  max-width: 680px;
}

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

.admin-metrics article {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255,255,255,0.055);
}

.admin-metrics span {
  color: var(--muted);
}

.admin-metrics strong {
  display: block;
  margin-top: 8px;
  font-size: 34px;
}

.admin-table-wrap,
.admin-form {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255,255,255,0.055);
  box-shadow: 0 24px 70px rgba(0,0,0,0.18);
}

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

.admin-table {
  width: 100%;
  min-width: 860px;
  border-collapse: collapse;
}

.admin-table th,
.admin-table td {
  padding: 16px;
  text-align: left;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}

.admin-table th {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

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

.user-cell {
  display: flex;
  align-items: center;
  gap: 12px;
}

.user-cell small {
  display: block;
  color: var(--muted);
  margin-top: 3px;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-height: 30px;
  padding: 0.35rem 0.65rem;
  border-radius: 999px;
  background: rgba(255,255,255,0.08);
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
}

.status-pill.is-admin,
.status-pill.status-active {
  background: rgba(73,210,166,0.14);
  color: #9cf4d7;
}

.status-pill.status-suspended {
  background: rgba(244,80,80,0.14);
  color: #fecaca;
}

.permission-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.permission-chips span {
  padding: 0.35rem 0.55rem;
  border-radius: 999px;
  background: rgba(255,255,255,0.07);
  color: rgba(248,250,252,0.42);
  font-size: 0.78rem;
  font-weight: 750;
}

.permission-chips span.enabled {
  background: rgba(110,168,255,0.16);
  color: #bdd5ff;
}

.table-action,
.primary-link,
.secondary-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  border-radius: 8px;
  padding: 10px 14px;
  font-weight: 850;
  text-decoration: none;
  white-space: nowrap;
}

.primary-link,
.primary-button {
  background: var(--brand);
  color: var(--brand-ink);
}

.secondary-link,
.table-action {
  border: 1px solid var(--line);
  color: var(--text);
  background: rgba(255,255,255,0.055);
}

.admin-form {
  padding: 22px;
}

.form-section {
  padding: 20px 0;
  border-top: 1px solid var(--line);
}

.form-section:first-child {
  padding-top: 0;
  border-top: 0;
}

.form-section-head {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 14px;
  margin-bottom: 16px;
}

.form-section-head > span {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 8px;
  background: rgba(73,210,166,0.14);
  color: var(--brand);
  font-weight: 900;
}

.form-section-head h2 {
  font-size: 24px;
  margin: 0 0 4px;
}

.form-section-head p {
  color: var(--muted);
  margin: 0;
}

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

.field {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-weight: 800;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  color: var(--text);
  background: rgba(6, 12, 25, 0.62);
  font: inherit;
  outline: none;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: rgba(73,210,166,0.66);
  box-shadow: 0 0 0 4px rgba(73,210,166,0.1);
}

.field-hint {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
  font-weight: 600;
}

.checkbox-field {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255,255,255,0.03);
}

.checkbox-box {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  padding-top: 2px;
}

.checkbox-field input[type="checkbox"] {
  width: 18px;
  height: 18px;
  min-height: 18px;
  margin: 0;
  accent-color: var(--brand);
}

.checkbox-copy {
  display: grid;
  gap: 4px;
}

.checkbox-copy > span {
  color: var(--text);
  font-weight: 800;
}

.inline-note {
  display: grid;
  gap: 6px;
  margin: 4px 0 16px;
  padding: 14px 16px;
  border: 1px dashed rgba(73, 210, 166, 0.35);
  border-radius: 10px;
  background: rgba(73, 210, 166, 0.06);
}

.inline-note span {
  color: var(--muted);
}

.land-filter-form .form-actions,
.tenant-row-actions {
  margin-top: 14px;
}

.tenant-list {
  display: grid;
  gap: 16px;
}

.tenant-row,
.compact-panel {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
}

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

.land-summary-grid .compact-panel {
  display: grid;
  gap: 8px;
  min-height: 132px;
}

.land-summary-grid .compact-panel strong {
  font-size: 34px;
}

.land-summary-grid .compact-panel p {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.land-filter-grid .field-span-2,
.land-form-grid .field-span-2 {
  grid-column: span 2;
}

.land-form {
  display: grid;
  gap: 16px;
}

.land-form .panel {
  margin-top: 0;
}

.land-form-grid {
  align-items: start;
}

.land-form-actions {
  margin-top: 4px;
}

.tenant-row {
  display: grid;
  gap: 16px;
}

.tenant-accordion {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.025);
  overflow: hidden;
}

.tenant-accordion[open] {
  background: rgba(255, 255, 255, 0.04);
}

.tenant-accordion-summary {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  list-style: none;
  padding: 16px 18px;
  cursor: pointer;
}

.tenant-accordion-summary::-webkit-details-marker {
  display: none;
}

.tenant-summary-copy {
  min-width: 0;
}

.tenant-summary-copy strong,
.tenant-summary-copy span {
  display: block;
}

.tenant-summary-copy strong {
  font-size: 18px;
  line-height: 1.35;
}

.tenant-summary-copy span {
  margin-top: 6px;
  color: var(--muted);
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.tenant-accordion-toggle {
  flex: 0 0 auto;
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 12px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
  font-size: 13px;
  font-weight: 800;
}

.tenant-accordion-body {
  display: grid;
  gap: 16px;
  padding: 0 18px 18px;
  border-top: 1px solid var(--line);
}

.tenant-row-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: start;
}

.tenant-row-head strong {
  font-size: 18px;
}

.tenant-row-actions {
  display: flex;
  justify-content: flex-end;
}

.land-registry-wrap {
  margin-top: 8px;
  overflow-x: auto;
}

.land-registry-table {
  width: 100%;
  min-width: 0;
  table-layout: fixed;
}

.land-registry-table td {
  vertical-align: top;
  padding: 12px 8px;
}

.land-cell-order {
  white-space: nowrap;
  font-weight: 800;
  min-width: 52px;
}

.land-cell-primary,
.land-cell-metrics,
.land-cell-tenants {
  min-width: 0;
}

.land-cell-primary strong,
.land-cell-metrics strong,
.land-cell-tenants strong {
  display: block;
  margin-bottom: 5px;
  font-size: 15px;
  line-height: 1.28;
  overflow-wrap: anywhere;
}

.cadastral-link {
  color: var(--text);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color 0.18s ease, border-color 0.18s ease;
}

.cadastral-link:hover {
  color: var(--brand);
  border-color: rgba(73, 210, 166, 0.55);
}

.land-cell-primary span,
.land-cell-metrics span,
.land-cell-tenants span,
.land-cell-tenants em {
  display: block;
  color: var(--muted);
  line-height: 1.4;
  font-size: 12px;
}

.land-cell-tenants em {
  margin-top: 6px;
  font-style: normal;
}

.land-cell-ngo {
  min-width: 84px;
}

.land-cell-ngo div {
  display: grid;
  gap: 2px;
}

.land-cell-ngo div + div {
  margin-top: 5px;
}

.land-page .admin-table th:nth-child(1),
.land-page .admin-table td:nth-child(1) {
  width: 56px;
}

.land-page .admin-table th:nth-child(2),
.land-page .admin-table td:nth-child(2) {
  width: 18%;
}

.land-page .admin-table th:nth-child(3),
.land-page .admin-table td:nth-child(3) {
  width: 16%;
}

.land-page .admin-table th:nth-child(4),
.land-page .admin-table td:nth-child(4) {
  width: 13%;
}

.land-page .admin-table th:nth-child(5),
.land-page .admin-table td:nth-child(5) {
  width: 10%;
}

.land-page .admin-table th:nth-child(6),
.land-page .admin-table td:nth-child(6) {
  width: 10%;
}

.land-page .admin-table th:nth-child(7),
.land-page .admin-table td:nth-child(7) {
  width: 88px;
}

.land-cell-ngo span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.land-cell-ngo strong {
  font-size: 13px;
}

.land-cell-metrics span,
.land-cell-metrics em {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.land-cell-metrics span {
  -webkit-line-clamp: 5;
}

.land-cell-metrics em {
  -webkit-line-clamp: 3;
}

.land-cell-primary span {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}

.table-action-stack {
  min-width: 88px;
}

.table-action-stack .table-action {
  min-height: 32px;
  padding: 6px 7px;
  font-size: 12px;
}

.land-cell-status {
  white-space: nowrap;
}

.export-columns-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 16px;
}

.compact-panel {
  display: grid;
  gap: 10px;
}

.warning-note {
  margin-bottom: 16px;
  border-color: rgba(251, 191, 36, 0.28);
  background: rgba(245, 158, 11, 0.08);
}

.ngo-source-note {
  color: var(--muted);
}

.ngo-year-card input[readonly],
.ngo-year-card input:disabled {
  opacity: 0.72;
  cursor: not-allowed;
  background: color-mix(in srgb, var(--surface) 86%, black 14%);
}

.inline-record-link {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.16);
}

.inline-record-link:hover {
  color: var(--brand);
  border-bottom-color: color-mix(in srgb, var(--brand) 55%, transparent);
}

.compact-panel strong {
  font-size: 18px;
}

.signature-list {
  display: grid;
  gap: 14px;
}

.signature-card {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
}

.signature-card-head {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: flex-start;
  margin-bottom: 12px;
}

.signature-meta-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 16px;
}

.signature-meta-grid p,
.signature-note {
  margin: 0;
  color: var(--muted);
}

.showcase-page {
  display: grid;
  gap: 22px;
}

.showcase-hero {
  display: grid;
  gap: 20px;
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background:
    radial-gradient(circle at top left, rgba(73, 210, 166, 0.16), transparent 34%),
    linear-gradient(135deg, rgba(16, 28, 56, 0.96), rgba(27, 35, 68, 0.94));
}

.showcase-hero-copy h1 {
  margin: 0 0 12px;
  font-size: clamp(38px, 5vw, 68px);
  line-height: 0.95;
}

.showcase-hero-copy > p:last-child {
  max-width: 860px;
  margin: 0;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.55;
}

.showcase-mode-switch {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}

.showcase-mode-pill {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 10px 16px;
  background: rgba(255,255,255,0.05);
  color: var(--text);
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.showcase-mode-pill.active {
  background: var(--brand);
  color: #071d14;
  border-color: transparent;
}

.showcase-metric-band {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
}

.showcase-metric-card {
  display: grid;
  gap: 8px;
  min-height: 132px;
  padding: 18px;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 12px;
  background: rgba(8, 15, 30, 0.45);
}

.showcase-metric-card span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.showcase-metric-card strong {
  font-size: clamp(28px, 3vw, 44px);
  line-height: 1;
}

.showcase-metric-card small {
  color: var(--muted);
  line-height: 1.45;
}

.showcase-scene-stage {
  display: grid;
}

.showcase-scene-panel {
  display: none;
  grid-template-columns: minmax(0, 1.3fr) minmax(280px, 0.7fr);
  gap: 18px;
}

.showcase-scene-panel.active {
  display: grid;
}

.showcase-scene-copy,
.showcase-scene-visual,
.showcase-launchpad {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255,255,255,0.03);
}

.showcase-scene-copy {
  padding: 24px;
}

.showcase-scene-copy h2 {
  margin: 0 0 10px;
  font-size: 36px;
}

.showcase-scene-copy > p:last-of-type {
  margin: 0 0 18px;
  color: var(--muted);
  line-height: 1.6;
}

.showcase-scene-points {
  display: grid;
  gap: 12px;
}

.showcase-scene-points article {
  display: grid;
  grid-template-columns: 54px 1fr;
  gap: 12px;
  padding: 14px 0;
  border-top: 1px solid rgba(255,255,255,0.08);
}

.showcase-scene-points article:first-child {
  border-top: 0;
  padding-top: 0;
}

.showcase-scene-points span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  border-radius: 10px;
  background: rgba(73,210,166,0.14);
  color: var(--brand);
  font-weight: 900;
}

.showcase-scene-points p {
  margin: 0;
  color: var(--text);
  line-height: 1.55;
}

.showcase-scene-actions {
  margin-top: 18px;
}

.showcase-scene-visual {
  padding: 20px;
}

.showcase-visual-stack {
  display: grid;
  gap: 12px;
  height: 100%;
}

.showcase-visual-stack article {
  display: grid;
  gap: 6px;
  padding: 16px;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 10px;
  background: rgba(6, 12, 25, 0.44);
}

.showcase-visual-stack span,
.showcase-launch-card span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.showcase-visual-stack strong,
.showcase-launch-card strong {
  font-size: 20px;
  line-height: 1.2;
}

.showcase-visual-stack small,
.showcase-launch-card small {
  color: var(--muted);
  line-height: 1.45;
}

.showcase-launchpad {
  padding: 22px;
}

.showcase-launch-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.showcase-launch-card {
  display: grid;
  gap: 8px;
  min-height: 150px;
  padding: 18px;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 10px;
  background: rgba(8, 15, 30, 0.38);
  color: var(--text);
  text-decoration: none;
}

.showcase-launch-card:hover {
  border-color: rgba(73,210,166,0.32);
  transform: translateY(-1px);
}

.metric-link {
  text-decoration: none;
  color: inherit;
}

.metric-link article {
  transition: border-color 0.16s ease, transform 0.16s ease;
}

.metric-link:hover article {
  border-color: rgba(73,210,166,0.32);
  transform: translateY(-1px);
}

.metric-link small {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  line-height: 1.45;
}

.audit-filter-form {
  padding: 0;
}

.table-action-stack,
.table-status-stack {
  display: grid;
  gap: 8px;
}

.danger-action {
  border-color: rgba(255, 107, 107, 0.35);
  color: #fecaca;
}

.status-alert {
  color: #fbbf24;
  line-height: 1.35;
}

@media (max-width: 1180px) {
  .showcase-metric-band {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .showcase-launch-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.panel-heading > .primary-button {
  width: auto;
  flex: 0 0 auto;
  white-space: nowrap;
}

.import-forecast-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}

.import-forecast-grid article {
  min-height: 96px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.045);
}

.import-forecast-grid span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.import-forecast-grid strong {
  display: block;
  margin-top: 10px;
  color: var(--text);
  font-size: clamp(26px, 3vw, 38px);
  line-height: 1;
}

.import-forecast-grid .forecast-ok strong {
  color: var(--brand);
}

.import-forecast-grid .forecast-warning {
  border-color: rgba(244, 191, 80, 0.5);
  background: rgba(244, 191, 80, 0.12);
}

.import-forecast-errors {
  display: grid;
  gap: 8px;
  margin-bottom: 16px;
  padding: 12px;
  border: 1px solid rgba(244, 80, 80, 0.34);
  border-radius: 8px;
  background: rgba(244, 80, 80, 0.12);
}

.import-forecast-errors p {
  margin: 0;
  color: var(--text);
}

.import-skipped-details {
  margin-bottom: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.035);
}

.import-skipped-details summary {
  cursor: pointer;
  padding: 13px 14px;
  color: var(--text);
  font-weight: 900;
}

.import-skipped-wrap {
  margin: 0 12px 12px;
  box-shadow: none;
}

.import-skipped-table {
  min-width: 780px;
}

.import-skipped-table th,
.import-skipped-table td {
  padding: 11px 12px;
  vertical-align: top;
}

.import-skipped-table th:first-child,
.import-skipped-table td:first-child {
  width: 90px;
}

body[data-theme="pearl"] .field input,
body[data-theme="pearl"] .field select,
body[data-theme="pearl"] .field textarea,
body[data-theme="pearl"] .table-input,
body[data-theme="mint"] .field input,
body[data-theme="mint"] .field select,
body[data-theme="mint"] .field textarea,
body[data-theme="mint"] .table-input,
body[data-theme="sky"] .field input,
body[data-theme="sky"] .field select,
body[data-theme="sky"] .field textarea,
body[data-theme="sky"] .table-input,
body[data-theme="linen"] .field input,
body[data-theme="linen"] .field select,
body[data-theme="linen"] .field textarea,
body[data-theme="linen"] .table-input,
body[data-theme="blush"] .field input,
body[data-theme="blush"] .field select,
body[data-theme="blush"] .field textarea,
body[data-theme="blush"] .table-input,
body[data-theme="lemon"] .field input,
body[data-theme="lemon"] .field select,
body[data-theme="lemon"] .field textarea,
body[data-theme="lemon"] .table-input {
  color: #172033 !important;
  background: rgba(255, 255, 255, 0.96) !important;
  border-color: rgba(60, 76, 96, 0.26) !important;
}

body[data-theme="pearl"] .field input::placeholder,
body[data-theme="pearl"] .field textarea::placeholder,
body[data-theme="pearl"] .table-input::placeholder,
body[data-theme="mint"] .field input::placeholder,
body[data-theme="mint"] .field textarea::placeholder,
body[data-theme="mint"] .table-input::placeholder,
body[data-theme="sky"] .field input::placeholder,
body[data-theme="sky"] .field textarea::placeholder,
body[data-theme="sky"] .table-input::placeholder,
body[data-theme="linen"] .field input::placeholder,
body[data-theme="linen"] .field textarea::placeholder,
body[data-theme="linen"] .table-input::placeholder,
body[data-theme="blush"] .field input::placeholder,
body[data-theme="blush"] .field textarea::placeholder,
body[data-theme="blush"] .table-input::placeholder,
body[data-theme="lemon"] .field input::placeholder,
body[data-theme="lemon"] .field textarea::placeholder,
body[data-theme="lemon"] .table-input::placeholder {
  color: rgba(23, 32, 51, 0.56) !important;
}

.sidebar-foot {
  display: none !important;
}

@media (max-height: 880px) and (min-width: 921px) {
  .workspace-sidebar {
    padding: 14px 12px;
    gap: 12px;
  }

  .sidebar-brand span,
  .user-cell > span {
    width: 36px;
    height: 36px;
  }

  .sidebar-brand strong {
    font-size: 20px;
  }

  .sidebar-link {
    min-height: 36px;
    padding: 7px 10px;
    gap: 10px;
  }

  .sidebar-subnav {
    margin-left: 18px;
    padding-left: 10px;
  }

  .sidebar-subnav a {
    min-height: 28px;
    padding: 4px 8px;
  }
}

@media (min-width: 921px) {
  .workspace-sidebar {
    position: relative !important;
    top: auto !important;
    height: auto !important;
    min-height: auto !important;
    overflow: visible !important;
  }
}

body[data-theme="aurora"] {
  --bg: #101629;
  --panel: #171f38;
  --panel-2: #22315a;
  --line: rgba(156, 214, 255, 0.18);
  --text: #f6fbff;
  --muted: #becbe4;
  --brand: #58f0c0;
  --accent: #8d7dff;
  --warning: #ffd56b;
  --brand-ink: #09231f;
  --glow-left: rgba(88, 240, 192, 0.18);
  --glow-right: rgba(141, 125, 255, 0.2);
  --panel-fill-1: rgba(42, 61, 112, 0.56);
  --panel-fill-2: rgba(18, 24, 45, 0.9);
  --sidebar-fill-1: rgba(42, 61, 112, 0.34);
  --sidebar-fill-2: rgba(18, 24, 45, 0.95);
  --sidebar-base: #0f1527;
  --topbar-bg: rgba(15, 21, 39, 0.92);
  --surface-soft: rgba(88, 240, 192, 0.06);
  --surface-strong: rgba(88, 240, 192, 0.11);
}

body[data-theme="copper"] {
  --bg: #241612;
  --panel: #38211a;
  --panel-2: #593228;
  --line: rgba(255, 197, 163, 0.2);
  --text: #fff8f5;
  --muted: #dec4bb;
  --brand: #ff9e72;
  --accent: #ffce98;
  --warning: #ffe27b;
  --brand-ink: #2f1308;
  --glow-left: rgba(255, 158, 114, 0.18);
  --glow-right: rgba(255, 206, 152, 0.16);
  --panel-fill-1: rgba(102, 61, 49, 0.56);
  --panel-fill-2: rgba(33, 19, 16, 0.9);
  --sidebar-fill-1: rgba(102, 61, 49, 0.34);
  --sidebar-fill-2: rgba(33, 19, 16, 0.95);
  --sidebar-base: #211410;
  --topbar-bg: rgba(33, 20, 16, 0.92);
  --surface-soft: rgba(255, 158, 114, 0.06);
  --surface-strong: rgba(255, 158, 114, 0.11);
}

body[data-theme="indigo"] {
  --bg: #10142e;
  --panel: #1a2147;
  --panel-2: #29346c;
  --line: rgba(166, 182, 255, 0.2);
  --text: #f7f9ff;
  --muted: #c1cae6;
  --brand: #7c8dff;
  --accent: #9eb6ff;
  --warning: #ffd773;
  --brand-ink: #111736;
  --glow-left: rgba(124, 141, 255, 0.2);
  --glow-right: rgba(158, 182, 255, 0.16);
  --panel-fill-1: rgba(49, 62, 124, 0.56);
  --panel-fill-2: rgba(17, 22, 49, 0.9);
  --sidebar-fill-1: rgba(49, 62, 124, 0.34);
  --sidebar-fill-2: rgba(17, 22, 49, 0.95);
  --sidebar-base: #0f1430;
  --topbar-bg: rgba(15, 20, 48, 0.92);
  --surface-soft: rgba(124, 141, 255, 0.07);
  --surface-strong: rgba(124, 141, 255, 0.12);
}

body[data-theme="sage"] {
  --bg: #17221d;
  --panel: #223129;
  --panel-2: #31483c;
  --line: rgba(190, 233, 211, 0.18);
  --text: #f7fdf9;
  --muted: #c3d6cb;
  --brand: #9bd3ba;
  --accent: #d7f1e4;
  --warning: #f0d983;
  --brand-ink: #112018;
  --glow-left: rgba(155, 211, 186, 0.18);
  --glow-right: rgba(215, 241, 228, 0.12);
  --panel-fill-1: rgba(59, 87, 73, 0.54);
  --panel-fill-2: rgba(23, 34, 29, 0.9);
  --sidebar-fill-1: rgba(59, 87, 73, 0.32);
  --sidebar-fill-2: rgba(23, 34, 29, 0.95);
  --sidebar-base: #141d19;
  --topbar-bg: rgba(20, 29, 25, 0.92);
  --surface-soft: rgba(155, 211, 186, 0.06);
  --surface-strong: rgba(155, 211, 186, 0.11);
}

body[data-theme="rose"] {
  --bg: #2b1520;
  --panel: #40202f;
  --panel-2: #632f47;
  --line: rgba(255, 196, 215, 0.2);
  --text: #fff8fb;
  --muted: #e4c7d3;
  --brand: #ff9fbc;
  --accent: #ffd1de;
  --warning: #ffe180;
  --brand-ink: #30111e;
  --glow-left: rgba(255, 159, 188, 0.18);
  --glow-right: rgba(255, 209, 222, 0.14);
  --panel-fill-1: rgba(104, 52, 73, 0.56);
  --panel-fill-2: rgba(40, 20, 30, 0.9);
  --sidebar-fill-1: rgba(104, 52, 73, 0.34);
  --sidebar-fill-2: rgba(40, 20, 30, 0.95);
  --sidebar-base: #26141d;
  --topbar-bg: rgba(38, 20, 29, 0.92);
  --surface-soft: rgba(255, 159, 188, 0.06);
  --surface-strong: rgba(255, 159, 188, 0.11);
}

body[data-theme="slate"] {
  --bg: #111821;
  --panel: #1b2632;
  --panel-2: #2b3c4f;
  --line: rgba(197, 212, 229, 0.18);
  --text: #f8fbff;
  --muted: #c1ceda;
  --brand: #90a6c9;
  --accent: #c8d6eb;
  --warning: #ffda7a;
  --brand-ink: #121b25;
  --glow-left: rgba(144, 166, 201, 0.16);
  --glow-right: rgba(200, 214, 235, 0.12);
  --panel-fill-1: rgba(50, 71, 95, 0.56);
  --panel-fill-2: rgba(18, 25, 34, 0.9);
  --sidebar-fill-1: rgba(50, 71, 95, 0.34);
  --sidebar-fill-2: rgba(18, 25, 34, 0.95);
  --sidebar-base: #10161d;
  --topbar-bg: rgba(16, 22, 29, 0.92);
  --surface-soft: rgba(144, 166, 201, 0.06);
  --surface-strong: rgba(144, 166, 201, 0.11);
}

body[data-theme="coral"] {
  --bg: #2a1314;
  --panel: #442022;
  --panel-2: #6a3032;
  --line: rgba(255, 198, 191, 0.2);
  --text: #fff9f8;
  --muted: #e4c9c4;
  --brand: #ff8a72;
  --accent: #ffd06c;
  --warning: #ffe69a;
  --brand-ink: #30110e;
  --glow-left: rgba(255, 138, 114, 0.2);
  --glow-right: rgba(255, 208, 108, 0.14);
  --panel-fill-1: rgba(106, 48, 50, 0.56);
  --panel-fill-2: rgba(42, 19, 20, 0.9);
  --sidebar-fill-1: rgba(106, 48, 50, 0.34);
  --sidebar-fill-2: rgba(42, 19, 20, 0.95);
  --sidebar-base: #221112;
  --topbar-bg: rgba(34, 17, 18, 0.92);
  --surface-soft: rgba(255, 138, 114, 0.06);
  --surface-strong: rgba(255, 138, 114, 0.11);
}

body[data-theme="moss"] {
  --bg: #101712;
  --panel: #1a2a1c;
  --panel-2: #28402b;
  --line: rgba(187, 231, 179, 0.18);
  --text: #f7fff5;
  --muted: #c1d7bf;
  --brand: #8bd16f;
  --accent: #d5cb74;
  --warning: #f1dc85;
  --brand-ink: #13210f;
  --glow-left: rgba(139, 209, 111, 0.18);
  --glow-right: rgba(213, 203, 116, 0.12);
  --panel-fill-1: rgba(53, 87, 57, 0.56);
  --panel-fill-2: rgba(18, 25, 19, 0.9);
  --sidebar-fill-1: rgba(53, 87, 57, 0.34);
  --sidebar-fill-2: rgba(18, 25, 19, 0.95);
  --sidebar-base: #101612;
  --topbar-bg: rgba(16, 22, 18, 0.92);
  --surface-soft: rgba(139, 209, 111, 0.05);
  --surface-strong: rgba(139, 209, 111, 0.11);
}

body[data-theme="ruby"] {
  --bg: #241017;
  --panel: #3b1a25;
  --panel-2: #5b2738;
  --line: rgba(255, 188, 205, 0.2);
  --text: #fff8fb;
  --muted: #e3c8d1;
  --brand: #ff6f96;
  --accent: #ffb36b;
  --warning: #ffe28c;
  --brand-ink: #320f1a;
  --glow-left: rgba(255, 111, 150, 0.2);
  --glow-right: rgba(255, 179, 107, 0.14);
  --panel-fill-1: rgba(91, 39, 56, 0.56);
  --panel-fill-2: rgba(36, 16, 23, 0.9);
  --sidebar-fill-1: rgba(91, 39, 56, 0.34);
  --sidebar-fill-2: rgba(36, 16, 23, 0.95);
  --sidebar-base: #1d0d12;
  --topbar-bg: rgba(29, 13, 18, 0.92);
  --surface-soft: rgba(255, 111, 150, 0.06);
  --surface-strong: rgba(255, 111, 150, 0.11);
}

body[data-theme="denim"] {
  --bg: #0f1623;
  --panel: #182437;
  --panel-2: #263956;
  --line: rgba(186, 205, 238, 0.18);
  --text: #f8fbff;
  --muted: #c2cbda;
  --brand: #7ba4ff;
  --accent: #6fd0d6;
  --warning: #ffd36c;
  --brand-ink: #0f1730;
  --glow-left: rgba(123, 164, 255, 0.18);
  --glow-right: rgba(111, 208, 214, 0.14);
  --panel-fill-1: rgba(50, 74, 112, 0.56);
  --panel-fill-2: rgba(15, 22, 35, 0.9);
  --sidebar-fill-1: rgba(50, 74, 112, 0.34);
  --sidebar-fill-2: rgba(15, 22, 35, 0.95);
  --sidebar-base: #0d1420;
  --topbar-bg: rgba(13, 20, 32, 0.92);
  --surface-soft: rgba(123, 164, 255, 0.06);
  --surface-strong: rgba(123, 164, 255, 0.11);
}

body[data-theme="orchid"] {
  --bg: #1f1225;
  --panel: #31193d;
  --panel-2: #4b2860;
  --line: rgba(224, 188, 255, 0.2);
  --text: #fef8ff;
  --muted: #dcc8e6;
  --brand: #c98cff;
  --accent: #88c6ff;
  --warning: #ffd778;
  --brand-ink: #271031;
  --glow-left: rgba(201, 140, 255, 0.18);
  --glow-right: rgba(136, 198, 255, 0.14);
  --panel-fill-1: rgba(75, 40, 96, 0.56);
  --panel-fill-2: rgba(31, 18, 37, 0.9);
  --sidebar-fill-1: rgba(75, 40, 96, 0.34);
  --sidebar-fill-2: rgba(31, 18, 37, 0.95);
  --sidebar-base: #180f1e;
  --topbar-bg: rgba(24, 15, 30, 0.92);
  --surface-soft: rgba(201, 140, 255, 0.06);
  --surface-strong: rgba(201, 140, 255, 0.11);
}

body[data-theme="citrus"] {
  --bg: #1c180b;
  --panel: #2d2611;
  --panel-2: #463915;
  --line: rgba(255, 233, 171, 0.18);
  --text: #fffdf5;
  --muted: #ddd2b5;
  --brand: #f5c94c;
  --accent: #9dd27b;
  --warning: #ffe58e;
  --brand-ink: #2c2107;
  --glow-left: rgba(245, 201, 76, 0.18);
  --glow-right: rgba(157, 210, 123, 0.12);
  --panel-fill-1: rgba(70, 57, 21, 0.56);
  --panel-fill-2: rgba(28, 24, 11, 0.9);
  --sidebar-fill-1: rgba(70, 57, 21, 0.34);
  --sidebar-fill-2: rgba(28, 24, 11, 0.95);
  --sidebar-base: #191608;
  --topbar-bg: rgba(25, 22, 8, 0.92);
  --surface-soft: rgba(245, 201, 76, 0.06);
  --surface-strong: rgba(245, 201, 76, 0.11);
}

body[data-theme="arctic"] {
  --bg: #edf7fb;
  --panel: #ffffff;
  --panel-2: #e3f1f8;
  --line: rgba(73, 116, 132, 0.14);
  --text: #17313a;
  --muted: #64808b;
  --brand: #50bfd8;
  --accent: #7f9fff;
  --warning: #efbb57;
  --brand-ink: #effbff;
  --glow-left: rgba(80, 191, 216, 0.1);
  --glow-right: rgba(127, 159, 255, 0.08);
  --panel-fill-1: rgba(255,255,255,0.92);
  --panel-fill-2: rgba(227,241,248,0.96);
  --sidebar-fill-1: rgba(255,255,255,0.9);
  --sidebar-fill-2: rgba(237,247,251,0.98);
  --sidebar-base: #e8f3f8;
  --topbar-bg: rgba(237, 247, 251, 0.92);
  --surface-soft: rgba(80, 191, 216, 0.05);
  --surface-strong: rgba(80, 191, 216, 0.1);
}

body[data-theme="teal"] {
  --bg: #082326;
  --panel: #10343a;
  --panel-2: #164952;
  --line: rgba(130, 240, 236, 0.22);
  --text: #f2ffff;
  --muted: #b8d9d9;
  --brand: #2fd3c6;
  --accent: #77e7f2;
  --warning: #f5cf67;
  --brand-ink: #052021;
  --glow-left: rgba(47, 211, 198, 0.22);
  --glow-right: rgba(119, 231, 242, 0.18);
  --panel-fill-1: rgba(28, 101, 107, 0.56);
  --panel-fill-2: rgba(10, 35, 38, 0.9);
  --sidebar-fill-1: rgba(28, 101, 107, 0.36);
  --sidebar-fill-2: rgba(10, 35, 38, 0.94);
  --sidebar-base: #0a2023;
  --topbar-bg: rgba(10, 32, 35, 0.92);
  --surface-soft: rgba(47, 211, 198, 0.06);
  --surface-strong: rgba(47, 211, 198, 0.11);
}

body[data-theme="violet"] {
  --bg: #1b122c;
  --panel: #2d2146;
  --panel-2: #46306a;
  --line: rgba(213, 188, 255, 0.22);
  --text: #fcf8ff;
  --muted: #d5cae7;
  --brand: #a977ff;
  --accent: #7bb1ff;
  --warning: #ffd678;
  --brand-ink: #1f1333;
  --glow-left: rgba(169, 119, 255, 0.22);
  --glow-right: rgba(123, 177, 255, 0.18);
  --panel-fill-1: rgba(80, 59, 121, 0.58);
  --panel-fill-2: rgba(28, 19, 44, 0.9);
  --sidebar-fill-1: rgba(80, 59, 121, 0.36);
  --sidebar-fill-2: rgba(28, 19, 44, 0.94);
  --sidebar-base: #190f29;
  --topbar-bg: rgba(25, 15, 41, 0.92);
  --surface-soft: rgba(169, 119, 255, 0.06);
  --surface-strong: rgba(169, 119, 255, 0.12);
}

body[data-theme="ember"] {
  --bg: #24140f;
  --panel: #3b241d;
  --panel-2: #5f3929;
  --line: rgba(255, 203, 169, 0.22);
  --text: #fff9f5;
  --muted: #e0c7bb;
  --brand: #ff8c52;
  --accent: #ffd17f;
  --warning: #ffe28f;
  --brand-ink: #2e1408;
  --glow-left: rgba(255, 140, 82, 0.22);
  --glow-right: rgba(255, 209, 127, 0.18);
  --panel-fill-1: rgba(106, 62, 44, 0.58);
  --panel-fill-2: rgba(37, 22, 17, 0.9);
  --sidebar-fill-1: rgba(106, 62, 44, 0.36);
  --sidebar-fill-2: rgba(37, 22, 17, 0.94);
  --sidebar-base: #21130e;
  --topbar-bg: rgba(33, 19, 14, 0.92);
  --surface-soft: rgba(255, 140, 82, 0.06);
  --surface-strong: rgba(255, 140, 82, 0.12);
}

body[data-theme="pine"] {
  --bg: #0d1b15;
  --panel: #163126;
  --panel-2: #22493a;
  --line: rgba(176, 235, 198, 0.2);
  --text: #f5fff8;
  --muted: #c1d8cb;
  --brand: #53c78b;
  --accent: #99d9a4;
  --warning: #ecd06e;
  --brand-ink: #082015;
  --glow-left: rgba(83, 199, 139, 0.22);
  --glow-right: rgba(153, 217, 164, 0.16);
  --panel-fill-1: rgba(37, 89, 67, 0.58);
  --panel-fill-2: rgba(14, 29, 22, 0.9);
  --sidebar-fill-1: rgba(37, 89, 67, 0.36);
  --sidebar-fill-2: rgba(14, 29, 22, 0.94);
  --sidebar-base: #0c1712;
  --topbar-bg: rgba(12, 23, 18, 0.92);
  --surface-soft: rgba(83, 199, 139, 0.06);
  --surface-strong: rgba(83, 199, 139, 0.11);
}

body[data-theme="cloud"] {
  --bg: #eef3f8;
  --panel: #ffffff;
  --panel-2: #dde6f0;
  --line: rgba(78, 106, 141, 0.16);
  --text: #1f2937;
  --muted: #5d6d84;
  --brand: #7a9ec7;
  --accent: #b9c7da;
  --warning: #d4a03e;
  --brand-ink: #f3f8ff;
  --glow-left: rgba(122, 158, 199, 0.16);
  --glow-right: rgba(185, 199, 218, 0.18);
  --panel-fill-1: rgba(255, 255, 255, 0.96);
  --panel-fill-2: rgba(244, 248, 252, 0.98);
  --sidebar-fill-1: rgba(255, 255, 255, 0.86);
  --sidebar-fill-2: rgba(237, 243, 248, 0.96);
  --sidebar-base: #eef3f8;
  --topbar-bg: rgba(238, 243, 248, 0.92);
  --surface-soft: rgba(122, 158, 199, 0.06);
  --surface-strong: rgba(122, 158, 199, 0.12);
}

body[data-theme="gold"] {
  --bg: #2a210c;
  --panel: #433419;
  --panel-2: #5f4a1d;
  --line: rgba(255, 226, 146, 0.2);
  --text: #fffdf4;
  --muted: #e6dcc0;
  --brand: #e7b84f;
  --accent: #ffe08a;
  --warning: #ffec9a;
  --brand-ink: #2d2208;
  --glow-left: rgba(231, 184, 79, 0.22);
  --glow-right: rgba(255, 224, 138, 0.18);
  --panel-fill-1: rgba(96, 74, 29, 0.58);
  --panel-fill-2: rgba(43, 34, 13, 0.9);
  --sidebar-fill-1: rgba(96, 74, 29, 0.36);
  --sidebar-fill-2: rgba(43, 34, 13, 0.94);
  --sidebar-base: #241d0d;
  --topbar-bg: rgba(36, 29, 13, 0.92);
  --surface-soft: rgba(231, 184, 79, 0.06);
  --surface-strong: rgba(231, 184, 79, 0.12);
}

.theme-preview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
}

.theme-preview-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 14px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, var(--panel-fill-1), var(--panel-fill-2));
  cursor: pointer;
  transition: transform 120ms ease, border-color 120ms ease, box-shadow 120ms ease;
}

.theme-preview-card:hover {
  transform: translateY(-1px);
  border-color: var(--accent);
}

.theme-preview-card.selected {
  border-color: var(--brand);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--brand) 42%, transparent);
}

.theme-preview-radio {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.theme-preview-swatch {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 8px;
  padding: 10px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--theme-bg), color-mix(in srgb, var(--theme-bg) 78%, #ffffff 22%));
  min-height: 72px;
}

.theme-preview-swatch span {
  display: block;
  border-radius: 10px;
  min-height: 52px;
}

.theme-preview-swatch span:nth-child(1) {
  background: color-mix(in srgb, var(--theme-bg) 72%, black 28%);
}

.theme-preview-swatch span:nth-child(2) {
  background: var(--theme-a);
}

.theme-preview-swatch span:nth-child(3) {
  background: var(--theme-b);
}

.theme-preview-card strong {
  font-size: 15px;
}

.theme-preview-card small {
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.theme-quick-form.theme-quick-form-compact {
  display: block !important;
  width: 100% !important;
  max-width: none !important;
}

.theme-preview-grid-compact {
  display: grid;
  width: 100%;
  max-width: none;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)) !important;
  gap: 10px;
  align-items: stretch;
}

.theme-preview-grid-force {
  display: grid !important;
  width: 100% !important;
  max-width: none !important;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)) !important;
}

.theme-preview-card-compact {
  display: grid;
  width: 100%;
  min-width: 0;
  gap: 6px;
  padding: 10px;
  border-radius: 14px;
}

.theme-preview-swatch-compact {
  padding: 7px;
  min-height: 54px;
}

.theme-preview-swatch-compact span {
  min-height: 34px;
  border-radius: 8px;
}

.theme-preview-card-compact strong {
  font-size: 13px;
  line-height: 1.2;
}

.theme-preview-card-compact small {
  display: none;
}

.theme-preview-card-compact.selected {
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--brand) 52%, transparent), 0 10px 24px rgba(0, 0, 0, 0.12);
}

@media (max-width: 1520px) {
  .workspace-shell {
    grid-template-columns: 156px minmax(0, 1fr);
  }

  .workspace-sidebar {
    padding: 18px 12px;
    gap: 18px;
  }

  .workspace-content {
    width: min(100%, calc(100% - 4px));
    padding: 18px 0 42px;
  }

  .workspace-content-wide {
    width: min(100%, calc(100% - 2px));
  }

  .admin-titlebar {
    padding: 20px;
  }

  .admin-titlebar h1 {
    max-width: none;
    font-size: clamp(28px, 3.4vw, 42px);
  }

  .document-actions,
  .form-actions,
  .land-form-actions,
  .section-heading {
    flex-wrap: wrap;
  }

  .document-actions .primary-link,
  .document-actions .secondary-link,
  .form-actions .primary-button,
  .form-actions .secondary-link,
  .form-actions .secondary-button {
    flex: 1 1 220px;
    justify-content: center;
  }

  .detail-grid,
  .security-policy-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .document-layout,
  .builder-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .document-workbench {
    grid-template-columns: 1fr;
  }

  .land-registry-table {
    min-width: 860px;
  }

  .land-page .admin-table th,
  .land-page .admin-table td {
    padding: 12px 9px;
  }

  .land-page .admin-table th:nth-child(2),
  .land-page .admin-table td:nth-child(2) {
    width: 18%;
  }

  .land-page .admin-table th:nth-child(3),
  .land-page .admin-table td:nth-child(3) {
    width: 17%;
  }

  .land-page .admin-table th:nth-child(4),
  .land-page .admin-table td:nth-child(4) {
    width: 13%;
  }

  .land-page .admin-table th:nth-child(5),
  .land-page .admin-table td:nth-child(5) {
    width: 9%;
  }

  .land-page .admin-table th:nth-child(6),
  .land-page .admin-table td:nth-child(6) {
    width: 10%;
  }

  .land-page .admin-table th:nth-child(7),
  .land-page .admin-table td:nth-child(7) {
    width: 88px;
  }
}

@media (max-width: 1280px) {
  .workspace-shell {
    grid-template-columns: 144px minmax(0, 1fr);
  }

  .workspace-sidebar {
    padding: 14px 10px;
    gap: 14px;
  }

  .sidebar-link {
    padding: 9px 10px;
    gap: 10px;
  }

  .sidebar-subnav {
    margin-left: 14px;
    padding-left: 10px;
  }

  .workspace-content {
    width: min(100%, calc(100% - 4px));
  }

  .detail-grid,
  .security-policy-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .land-page .admin-table th,
  .land-page .admin-table td {
    padding: 8px 6px;
  }

  .land-page .admin-table th:nth-child(2),
  .land-page .admin-table td:nth-child(2) {
    width: 17%;
  }

  .land-page .admin-table th:nth-child(3),
  .land-page .admin-table td:nth-child(3) {
    width: 16%;
  }

  .land-page .admin-table th:nth-child(4),
  .land-page .admin-table td:nth-child(4) {
    width: 12%;
  }

  .land-page .admin-table th:nth-child(6),
  .land-page .admin-table td:nth-child(6) {
    width: 8%;
  }

  .land-page .admin-table th:nth-child(7),
  .land-page .admin-table td:nth-child(7) {
    width: 78px;
  }

  .table-action-stack {
    min-width: 78px;
  }

  .table-action-stack .table-action {
    min-height: 30px;
    padding: 5px 6px;
    font-size: 11px;
  }
}

@media (max-width: 1366px) {
  .workspace-shell {
    grid-template-columns: 148px minmax(0, 1fr);
  }

  .sidebar-link {
    min-height: 36px;
    padding: 7px 8px;
    gap: 8px;
    font-size: 13px;
  }

  .sidebar-subnav {
    margin-left: 18px;
    padding-left: 10px;
  }

  .workspace-topbar {
    padding: 12px 18px;
    gap: 12px;
  }

  .topbar-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 10px;
  }

  .workspace-content,
  .workspace-content-wide {
    width: min(100%, calc(100% - 2px));
    padding: 12px 0 36px;
  }

  .admin-titlebar {
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
    padding: 18px;
  }

  .land-summary-grid,
  .finance-preview-page .land-summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .sticky-form-actions {
    position: sticky;
    bottom: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
  }

  .theme-preview-grid-compact,
  .theme-preview-grid-force {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }
}

@media (max-width: 1320px) {
  .import-forecast-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .panel-heading > .primary-button {
    width: 100%;
  }

  .import-forecast-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 920px) {
  .showcase-scene-panel,
  .showcase-metric-band {
    grid-template-columns: 1fr;
  }

  .showcase-launch-grid {
    grid-template-columns: 1fr;
  }

  .showcase-hero-copy h1 {
    font-size: 42px;
  }
}

.toggle-card,
.permission-card {
  display: flex;
  align-items: center;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: rgba(6, 12, 25, 0.34);
}

.toggle-card input,
.permission-card input {
  width: 18px;
  height: 18px;
  accent-color: var(--brand);
}

.toggle-card small {
  display: block;
  color: var(--muted);
  margin-top: 4px;
}

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

.permission-card {
  font-weight: 800;
}

.form-actions {
  display: flex;
  gap: 12px;
  align-items: center;
  padding-top: 4px;
}

.theme-quick-form {
  display: flex;
  gap: 14px;
  align-items: end;
  flex-wrap: wrap;
}

.theme-quick-field {
  flex: 1 1 320px;
  max-width: 540px;
}

.theme-quick-actions {
  display: flex;
  align-items: center;
}

.theme-apply-button {
  width: auto;
  min-width: 190px;
}

.admin-form .primary-button {
  width: auto;
  border: 0;
  min-height: 44px;
  padding: 10px 16px;
  border-radius: 8px;
  font: inherit;
  font-weight: 850;
  cursor: pointer;
}

.form-errors {
  margin-bottom: 18px;
  padding: 14px;
  border-radius: 8px;
  border: 1px solid rgba(244,80,80,0.28);
  background: rgba(244,80,80,0.1);
  color: #fecaca;
}

@media (max-width: 920px) {
  .workspace-shell {
    grid-template-columns: 1fr;
  }

  .workspace-sidebar {
    position: static;
    height: auto;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .sidebar-nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .workspace-topbar,
  .admin-titlebar,
  .form-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .theme-quick-form {
    align-items: stretch;
    flex-direction: column;
  }

  .theme-preview-grid-compact {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  .theme-quick-field {
    max-width: none;
  }

  .theme-quick-actions,
  .theme-apply-button {
    width: 100%;
  }

  .workspace-content {
    width: min(100% - 28px, 1180px);
  }

  .admin-metrics,
  .form-grid,
  .permission-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .theme-preview-grid-compact {
    grid-template-columns: 1fr !important;
  }
}

.sidebar-group {
  display: grid;
  gap: 8px;
}

.sidebar-subnav {
  display: grid;
  gap: 4px;
  margin-left: 28px;
  padding-left: 14px;
  border-left: 1px solid var(--line);
}

.sidebar-subnav a {
  min-height: 34px;
  display: flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 8px;
  color: var(--muted);
  text-decoration: none;
  font-weight: 750;
}

.sidebar-subnav a.active,
.sidebar-subnav a:hover {
  color: var(--text);
  background: rgba(255,255,255,0.075);
}

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

.settings-tile {
  min-height: 168px;
  display: grid;
  align-content: space-between;
  gap: 10px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  text-decoration: none;
  background: rgba(255,255,255,0.055);
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}

.settings-tile:hover {
  transform: translateY(-3px);
  border-color: rgba(73,210,166,0.46);
  background: rgba(255,255,255,0.085);
}

.settings-tile span,
.settings-tile small {
  color: var(--muted);
}

.settings-tile strong {
  font-size: 42px;
}

.settings-orbit {
  position: relative;
  width: 150px;
  height: 150px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: rgba(6, 12, 25, 0.42);
  overflow: hidden;
}

.settings-orbit::before {
  content: "";
  position: absolute;
  inset: 18px;
  border: 1px dashed rgba(73,210,166,0.44);
  border-radius: 50%;
  animation: sweep 12s linear infinite;
}

.settings-orbit span {
  position: absolute;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--brand);
  box-shadow: 0 0 18px rgba(73,210,166,0.8);
}

.settings-orbit span:nth-child(1) { left: 34px; top: 38px; }
.settings-orbit span:nth-child(2) { right: 28px; top: 62px; background: var(--accent); }
.settings-orbit span:nth-child(3) { left: 70px; bottom: 28px; background: var(--warning); }
.settings-orbit strong { position: relative; font-size: 40px; }

.audit-rail {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}

.audit-rail article {
  display: grid;
  grid-template-columns: 70px 1fr;
  gap: 14px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255,255,255,0.045);
}

.audit-rail time,
.audit-rail span {
  color: var(--muted);
}

.audit-rail strong,
.audit-rail span {
  display: block;
}

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

.access-module {
  min-height: 260px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.08), rgba(255,255,255,0.035)),
    rgba(255,255,255,0.035);
  transition: transform 180ms ease, border-color 180ms ease;
}

.access-module:hover {
  transform: translateY(-3px);
  border-color: rgba(110,168,255,0.52);
}

.access-module-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: start;
}

.access-module-head span {
  display: inline-flex;
  margin-bottom: 8px;
  padding: 0.3rem 0.55rem;
  border-radius: 999px;
  background: rgba(73,210,166,0.12);
  color: #9cf4d7;
  font-size: 0.78rem;
  font-weight: 800;
}

.access-module-head strong {
  font-size: 34px;
  color: var(--brand);
}

.access-module p {
  color: var(--muted);
  min-height: 58px;
}

.progress-track {
  height: 10px;
  border-radius: 999px;
  background: rgba(255,255,255,0.08);
  overflow: hidden;
  margin: 18px 0;
}

.progress-track span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--brand), var(--accent));
}

.access-permissions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.access-permissions button {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.45rem 0.7rem;
  color: var(--text);
  background: rgba(255,255,255,0.06);
  font: inherit;
  font-size: 0.84rem;
  font-weight: 800;
  cursor: pointer;
}

.access-permissions button:hover {
  border-color: rgba(73,210,166,0.55);
  background: rgba(73,210,166,0.12);
}

@media (max-width: 920px) {
  .settings-grid,
  .access-board {
    grid-template-columns: 1fr;
  }

  .settings-orbit {
    width: 118px;
    height: 118px;
  }
}

.tetris-layout {
  display: grid;
  grid-template-columns: 330px minmax(260px, 0.7fr);
  gap: 16px;
  align-items: start;
}

.tetris-stage {
  position: relative;
  width: 330px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(255,255,255,0.08), rgba(255,255,255,0.035));
  box-shadow: 0 24px 70px rgba(0,0,0,0.22);
}

.tetris-stage canvas,
.next-box canvas {
  display: block;
  border-radius: 8px;
  image-rendering: pixelated;
}

.tetris-overlay {
  position: absolute;
  inset: 14px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: rgba(6, 12, 25, 0.72);
  backdrop-filter: blur(8px);
}

.tetris-overlay.hidden {
  display: none;
}

.tetris-overlay strong {
  font-size: 28px;
}

.tetris-panel {
  display: grid;
  gap: 14px;
}

.tetris-score-card,
.tetris-panel-grid article,
.next-box {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255,255,255,0.055);
  padding: 16px;
}

.tetris-score-card span,
.tetris-panel-grid span,
.next-box span {
  display: block;
  color: var(--muted);
  font-weight: 800;
}

.tetris-score-card strong {
  display: block;
  font-size: 46px;
  margin-top: 8px;
}

.tetris-panel-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.tetris-panel-grid strong {
  display: block;
  font-size: 34px;
  margin-top: 8px;
}

.next-box canvas {
  margin-top: 12px;
  border: 1px solid var(--line);
}

.tetris-actions,
.touch-pad {
  display: grid;
  gap: 10px;
}

.tetris-actions {
  grid-template-columns: 1fr 1fr 1fr;
}

.secondary-button,
.touch-pad button {
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  background: rgba(255,255,255,0.065);
  font: inherit;
  font-weight: 850;
  cursor: pointer;
}

.touch-pad {
  grid-template-columns: repeat(4, 1fr);
}

.touch-pad button {
  font-size: 22px;
}

@media (max-width: 820px) {
  .tetris-layout {
    grid-template-columns: 1fr;
  }

  .tetris-stage {
    width: 100%;
    max-width: 330px;
  }

  .tetris-actions {
    grid-template-columns: 1fr;
  }
}

.sky-layout {
  display: grid;
  grid-template-columns: minmax(0, 900px) minmax(260px, 0.45fr);
  gap: 16px;
  align-items: start;
}

.sky-stage {
  position: relative;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: linear-gradient(180deg, rgba(255,255,255,0.08), rgba(255,255,255,0.035));
  box-shadow: 0 24px 70px rgba(0,0,0,0.22);
}

.sky-stage canvas {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 8px;
}

.sky-overlay {
  position: absolute;
  inset: 12px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 10px;
  border-radius: 8px;
  background: rgba(6, 12, 25, 0.72);
  backdrop-filter: blur(8px);
  text-align: center;
}

.sky-overlay.hidden {
  display: none;
}

.sky-overlay strong {
  font-size: 34px;
}

.sky-overlay span {
  color: var(--muted);
}

.sky-score-card,
.sky-stats article,
.boss-meter,
.sky-log {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255,255,255,0.055);
  padding: 16px;
}

.sky-score-card span,
.sky-stats span,
.boss-meter span {
  color: var(--muted);
  font-weight: 800;
}

.sky-score-card strong {
  display: block;
  font-size: 46px;
  margin-top: 8px;
}

.sky-panel {
  display: grid;
  gap: 14px;
}

.sky-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.sky-stats strong {
  display: block;
  margin-top: 8px;
  font-size: 26px;
}

.boss-meter div {
  height: 12px;
  margin-top: 10px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(255,255,255,0.08);
}

.boss-meter i {
  display: block;
  height: 100%;
  width: 0%;
  border-radius: inherit;
  background: linear-gradient(90deg, #ff6b6b, #c084fc);
}

.sky-actions {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 10px;
}

.sky-log {
  display: grid;
  gap: 8px;
  min-height: 150px;
}

.sky-log span {
  display: block;
  color: var(--muted);
  font-size: 0.9rem;
}

@media (max-width: 980px) {
  .sky-layout {
    grid-template-columns: 1fr;
  }

  .sky-actions {
    grid-template-columns: 1fr;
  }
}

.notification-bell {
  position: relative;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255,255,255,0.06);
}

.notification-bell::before {
  content: "";
  position: absolute;
  inset: 12px;
  border-radius: 50% 50% 45% 45%;
  border: 2px solid var(--text);
  border-bottom-width: 4px;
}

.notification-bell > span {
  position: absolute;
  right: -5px;
  top: -5px;
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #ff6b6b;
  color: #fff;
  font-size: 11px;
  font-weight: 900;
}

.notification-menu {
  position: absolute;
  right: 0;
  top: 48px;
  width: 230px;
  display: none;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #101827;
  box-shadow: 0 20px 50px rgba(0,0,0,0.35);
}

.notification-bell:hover .notification-menu {
  display: grid;
}

.notification-menu small {
  color: var(--muted);
}

.workflow-strip,
.case-board,
.profile-grid,
.settings-grid {
  display: grid;
  gap: 14px;
}

.workflow-strip {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  margin-bottom: 16px;
}

.workflow-strip article,
.case-card,
.document-list article,
.ocr-preview,
.audit-table article,
.profile-grid article,
.builder-card,
.builder-preview,
.showcase-road article {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255,255,255,0.055);
  padding: 16px;
}

.workflow-strip span,
.workflow-strip em,
.case-card p,
.case-card small,
.document-list span,
.document-list em,
.ocr-preview p,
.audit-table span,
.audit-table em,
.profile-grid span,
.builder-preview span,
.showcase-road p {
  color: var(--muted);
}

.workflow-strip em {
  display: block;
  margin-top: 8px;
  font-size: 28px;
  font-style: normal;
  color: var(--brand);
  font-weight: 900;
}

.case-board {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.module-page > .panel + .case-board,
.module-page > .panel + .document-list,
.module-page > .panel + .profile-grid {
  margin-top: 18px;
}

.case-head,
.case-foot {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.case-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.case-card code {
  display: block;
  color: #bdd5ff;
  margin: 12px 0;
}

.case-foot button,
.ocr-actions button {
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  background: rgba(255,255,255,0.065);
  padding: 9px 12px;
  font-weight: 850;
}

.document-layout,
.builder-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.48fr);
  gap: 16px;
}

.document-workbench {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  align-items: start;
}

.document-workbench > * {
  min-width: 0;
}

.document-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.module-page .admin-titlebar h1 {
  font-size: clamp(28px, 4vw, 46px);
  line-height: 1.05;
}

.document-viewer {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255,255,255,0.055);
  padding: 16px;
}

.section-heading {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: start;
  margin-bottom: 14px;
}

.section-heading h2 {
  margin: 0;
}

.status-pill {
  border: 1px solid rgba(73, 210, 166, 0.35);
  border-radius: 999px;
  padding: 6px 10px;
  color: var(--brand);
  background: rgba(73, 210, 166, 0.1);
  font-size: 12px;
  font-weight: 850;
}

.document-frame {
  display: block;
  width: 100%;
  height: min(76vh, 860px);
  min-height: 560px;
  border: 0;
  border-radius: 6px;
  background: #f8fafc;
}

.document-image {
  display: block;
  width: 100%;
  max-height: 76vh;
  object-fit: contain;
  border-radius: 6px;
  background: #f8fafc;
}

.document-empty-state {
  display: grid;
  place-items: center;
  min-height: 280px;
  gap: 12px;
  text-align: center;
}

.ocr-text {
  width: 100%;
  max-height: min(76vh, 860px);
  min-height: 560px;
  overflow: auto;
  margin: 0;
  padding: 18px;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 6px;
  background: rgba(3, 7, 18, 0.55);
  color: #e8eefb;
  font-family: "Consolas", "Liberation Mono", ui-monospace, SFMono-Regular, monospace;
  font-size: 13px;
  line-height: 1.55;
  white-space: pre-wrap;
  word-break: break-word;
}

.document-edit-form {
  display: grid;
  gap: 14px;
}

.ocr-editor {
  width: 100%;
  max-height: min(76vh, 860px);
  min-height: 560px;
  overflow: auto;
  margin: 0;
  padding: 18px;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 6px;
  background: rgba(3, 7, 18, 0.55);
  color: #e8eefb;
  font-family: "Consolas", "Liberation Mono", ui-monospace, SFMono-Regular, monospace;
  font-size: 13px;
  line-height: 1.55;
  white-space: pre-wrap;
  resize: vertical;
  outline: none;
}

.ocr-editor:focus {
  border-color: rgba(73,210,166,0.66);
  box-shadow: 0 0 0 4px rgba(73,210,166,0.1);
}

.document-link-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: end;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(6, 12, 25, 0.34);
}

.document-link-panel .primary-button {
  width: auto;
}

.signature-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 16px;
}

.signature-grid > * {
  min-width: 0;
}

.signature-form {
  display: grid;
  gap: 14px;
}

.signature-form-grid,
.signature-meta-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.signature-help-copy p,
.signature-note {
  color: var(--muted);
}

.signature-list {
  display: grid;
  gap: 12px;
}

.signature-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(6, 12, 25, 0.34);
  padding: 14px;
}

.signature-card-head,
.signature-actions {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: start;
  flex-wrap: wrap;
}

.signature-card-empty p {
  color: var(--muted);
}

.ai-action-layout,
.ai-context-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(300px, 0.65fr);
  gap: 16px;
}

.ai-command-form {
  display: grid;
  gap: 14px;
}

.ai-command-input {
  width: 100%;
  min-height: 170px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  color: var(--text);
  background: rgba(6, 12, 25, 0.62);
  font: inherit;
  line-height: 1.55;
  resize: vertical;
  outline: none;
}

.ai-command-input:focus {
  border-color: rgba(73,210,166,0.66);
  box-shadow: 0 0 0 4px rgba(73,210,166,0.1);
}

.ai-file-drop {
  display: grid;
  gap: 6px;
  border: 1px dashed rgba(73,210,166,0.42);
  border-radius: 8px;
  padding: 14px;
  background: rgba(73,210,166,0.08);
  color: var(--muted);
}

.ai-file-drop span {
  color: var(--accent);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.ai-file-drop strong {
  color: var(--text);
}

.ai-file-drop input {
  margin-top: 6px;
  color: var(--muted);
}

.ai-guard-panel ul {
  display: grid;
  gap: 10px;
  margin: 14px 0 0;
  padding-left: 18px;
  color: var(--muted);
}

.ai-proposal-panel {
  margin-top: 16px;
}

.ai-warnings {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 14px 0;
}

.ai-warnings span {
  border: 1px solid rgba(244,191,80,0.28);
  border-radius: 999px;
  padding: 7px 10px;
  color: #fde68a;
  background: rgba(244,191,80,0.1);
  font-size: 13px;
  font-weight: 800;
}

.ai-field-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 14px 0;
}

.ai-field-grid article {
  min-height: 84px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: rgba(6, 12, 25, 0.34);
}

.ai-field-grid.editable label {
  display: grid;
  gap: 7px;
  min-height: 84px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: rgba(6, 12, 25, 0.34);
}

.ai-field-grid.editable input,
.ai-field-grid.editable textarea {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  padding: 10px 11px;
  color: var(--text);
  background: rgba(6, 12, 25, 0.58);
  font: inherit;
  line-height: 1.45;
  outline: none;
}

.ai-field-grid.editable textarea {
  resize: vertical;
}

.ai-field-grid.editable input:focus,
.ai-field-grid.editable textarea:focus {
  border-color: rgba(73,210,166,0.62);
  box-shadow: 0 0 0 3px rgba(73,210,166,0.1);
}

.ai-field-grid span,
.mini-list span {
  display: block;
  color: var(--muted);
  font-size: 13px;
}

.ai-field-grid strong {
  display: block;
  margin-top: 7px;
  white-space: pre-wrap;
  word-break: break-word;
}

.mini-list {
  display: grid;
  gap: 10px;
}

.mini-list a {
  display: grid;
  gap: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: rgba(6, 12, 25, 0.34);
  text-decoration: none;
}

.document-meta {
  margin-top: 16px;
}

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

@media (max-width: 920px) {
  .document-workbench,
  .signature-grid,
  .meta-grid {
    grid-template-columns: 1fr;
  }

  .auth-card-head {
    flex-direction: column;
    align-items: start;
  }

  .document-actions {
    justify-content: stretch;
  }

  .document-actions .primary-link,
  .document-actions .secondary-link {
    width: 100%;
  }

  .document-frame,
  .ocr-text,
  .ocr-editor {
    min-height: 420px;
  }

  .document-link-panel {
    grid-template-columns: 1fr;
  }

  .signature-form-grid,
  .signature-meta-grid {
    grid-template-columns: 1fr;
  }

  .ai-action-layout,
  .ai-context-grid,
  .ai-field-grid {
    grid-template-columns: 1fr;
  }

  .document-link-panel .primary-button {
    width: 100%;
  }
}

.document-list {
  display: grid;
  gap: 12px;
}

.ocr-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.audit-table {
  display: grid;
  gap: 10px;
}

.audit-table article {
  display: grid;
  grid-template-columns: 70px 1fr 180px 1fr;
  gap: 14px;
  align-items: center;
}

.risk-high { border-color: rgba(255,107,107,0.5) !important; }
.risk-medium { border-color: rgba(244,191,80,0.5) !important; }

.profile-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.profile-grid strong {
  display: block;
  margin-top: 8px;
  font-size: 24px;
}

.builder-card {
  display: grid;
  gap: 14px;
}

.builder-preview {
  display: grid;
  align-content: start;
  gap: 10px;
}

.builder-preview span {
  display: block;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
}

.showcase-road {
  display: grid;
  gap: 14px;
}

.showcase-road article {
  display: grid;
  grid-template-columns: 70px 1fr;
  gap: 16px;
}

.showcase-road span {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border-radius: 8px;
  background: rgba(73,210,166,0.14);
  color: var(--brand);
  font-weight: 900;
}

.compact {
  width: auto;
}

@media (max-width: 920px) {
  .workflow-strip,
  .case-board,
  .document-layout,
  .builder-layout,
  .profile-grid {
    grid-template-columns: 1fr;
  }

  .audit-table article {
    grid-template-columns: 1fr;
  }
}

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

.detail-grid article {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255,255,255,0.055);
  padding: 16px;
}

.contract-card {
  position: relative;
  display: grid;
  align-content: start;
  gap: 8px;
  min-height: 120px;
}

.contract-expired-card {
  position: relative;
  border-color: rgba(244, 80, 80, 0.42) !important;
  background: rgba(244, 80, 80, 0.08) !important;
}

.contract-expiring-card {
  position: relative;
  border-color: rgba(245, 196, 76, 0.42) !important;
  background: rgba(245, 196, 76, 0.08) !important;
}

.contract-card-mark {
  position: absolute;
  top: 10px;
  right: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 999px;
  pointer-events: none;
  font-size: 15px;
  font-weight: 900;
  line-height: 1;
  color: #fee2e2;
  background: rgba(220, 38, 38, 0.28);
  border: 1px solid rgba(248, 113, 113, 0.5);
}

.contract-card-mark-warning {
  color: #fef3c7;
  background: rgba(245, 158, 11, 0.24);
  border-color: rgba(251, 191, 36, 0.42);
}

.contract-badge {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.2;
}

.contract-badge-expired {
  color: #fecaca;
  background: rgba(220, 38, 38, 0.16);
  border: 1px solid rgba(248, 113, 113, 0.32);
}

.contract-badge-warning {
  color: #fde68a;
  background: rgba(245, 158, 11, 0.14);
  border: 1px solid rgba(251, 191, 36, 0.32);
}

.detail-grid span {
  display: block;
  color: var(--muted);
  margin-bottom: 8px;
}

.detail-grid strong {
  display: block;
  min-width: 0;
  overflow-wrap: anywhere;
}

.detail-grid .public-token {
  font-size: 13px;
  line-height: 1.35;
  letter-spacing: 0;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.audit-table-wide article {
  grid-template-columns: 96px 1.2fr 220px 1fr 120px;
}

.security-checks,
.security-policy-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin: 18px 0;
}

.security-checks article,
.security-policy-grid article {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255,255,255,0.055);
  padding: 16px;
}

.security-policy-grid article.active-status-card {
  border-color: rgba(73, 210, 166, 0.52);
  box-shadow: inset 0 0 0 1px rgba(73, 210, 166, 0.2);
  background: linear-gradient(180deg, rgba(73, 210, 166, 0.12), rgba(255,255,255,0.055));
}

.security-checks article > span {
  display: inline-flex;
  margin-bottom: 10px;
  border-radius: 999px;
  padding: 5px 9px;
  background: rgba(83, 215, 180, 0.14);
  color: var(--brand);
  font-size: 12px;
  font-weight: 900;
}

.security-checks p,
.security-policy-grid p {
  color: var(--muted);
}

.land-map-panel {
  display: grid;
  gap: 16px;
}

.land-map-notes {
  margin: 0;
}

.land-map-frame {
  width: 100%;
  min-height: 380px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
}

.land-map-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

@media (max-width: 920px) {
  .security-checks,
  .security-policy-grid {
    grid-template-columns: 1fr;
  }
}

.field textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  color: var(--text);
  background: rgba(6, 12, 25, 0.62);
  font: inherit;
  outline: none;
}

@media (max-width: 920px) {
  .detail-grid {
    grid-template-columns: 1fr;
  }
}


/* Mobile adaptation pass */
html {
  -webkit-text-size-adjust: 100%;
}

button,
a,
input,
select,
textarea {
  touch-action: manipulation;
}

.admin-table-wrap {
  -webkit-overflow-scrolling: touch;
}

.sky-stage,
.tetris-stage,
.sky-stage canvas,
.tetris-stage canvas,
.touch-pad,
.sky-touch-pad {
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}

.sky-touch-pad {
  display: none;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-template-areas:
    ". up ."
    "left down right";
  gap: 10px;
}

.sky-touch-pad button {
  min-height: 58px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  background: rgba(255,255,255,0.075);
  font: inherit;
  font-size: 24px;
  font-weight: 900;
}

.sky-touch-pad button:active,
.touch-pad button:active {
  background: rgba(73,210,166,0.2);
  border-color: rgba(73,210,166,0.55);
  transform: translateY(1px);
}

.sky-touch-pad .up { grid-area: up; }
.sky-touch-pad .left { grid-area: left; }
.sky-touch-pad .right { grid-area: right; }
.sky-touch-pad .down { grid-area: down; }

@media (max-width: 920px) {
  body {
    overflow-x: hidden;
  }

  .workspace-sidebar {
    padding: 14px;
    gap: 14px;
  }

  .sidebar-brand span {
    width: 36px;
    height: 36px;
  }

  .sidebar-brand strong {
    font-size: 20px;
  }

  .sidebar-nav {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 6px;
    scroll-snap-type: x mandatory;
  }

  .sidebar-link {
    flex: 0 0 auto;
    min-width: 168px;
    scroll-snap-align: start;
  }

  .sidebar-group {
    flex: 0 0 240px;
  }

  .sidebar-subnav {
    margin-left: 10px;
    max-height: 150px;
    overflow-y: auto;
  }

  .sidebar-foot {
    display: none;
  }

  .workspace-topbar {
    position: sticky;
    min-height: auto;
    padding: 12px 14px;
    align-items: flex-start;
  }

  .topbar-actions {
    width: 100%;
    justify-content: space-between;
  }

  .user-pill {
    max-width: 58vw;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .workspace-content {
    width: min(100% - 20px, 1180px);
    padding: 14px 0 40px;
  }

  .admin-titlebar {
    padding: 18px;
  }

  .admin-titlebar h1,
  h1 {
    font-size: clamp(32px, 13vw, 48px);
    line-height: 1;
  }

  .admin-titlebar p:not(.eyebrow),
  .hero-copy {
    font-size: 15px;
  }

  .stats-grid,
  .settings-grid,
  .admin-metrics,
  .workflow-strip,
  .case-board,
  .document-layout,
  .builder-layout,
  .profile-grid,
  .detail-grid,
  .dashboard-grid,
  .operations-grid {
    grid-template-columns: 1fr !important;
  }

  .admin-table {
    min-width: 760px;
  }

  .form-grid,
  .permission-grid {
    grid-template-columns: 1fr;
  }

  .notification-menu {
    right: -8px;
    width: min(260px, 86vw);
  }
}

@media (max-width: 760px) {
  .sky-layout,
  .tetris-layout {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .sky-stage {
    padding: 8px;
    width: 100%;
  }

  .sky-stage canvas {
    aspect-ratio: 900 / 560;
    height: auto;
  }

  .sky-overlay {
    inset: 8px;
  }

  .sky-overlay strong {
    font-size: 24px;
  }

  .sky-panel {
    gap: 10px;
  }

  .sky-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .sky-stats article,
  .boss-meter,
  .sky-log,
  .tetris-panel-grid article,
  .next-box {
    padding: 12px;
  }

  .sky-stats strong,
  .tetris-panel-grid strong {
    font-size: 24px;
  }

  .sky-actions,
  .tetris-actions {
    grid-template-columns: 1fr 1fr 1fr;
    gap: 8px;
  }

  .sky-actions button,
  .tetris-actions button {
    min-height: 48px;
    padding: 8px;
  }

  .sky-touch-pad {
    display: grid;
  }

  .tetris-stage {
    width: 100%;
    max-width: 360px;
    justify-self: center;
    padding: 10px;
  }

  .tetris-stage canvas {
    width: 100%;
    height: auto;
    aspect-ratio: 1 / 2;
  }

  .touch-pad {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
  }

  .touch-pad button {
    min-height: 58px;
    font-size: 24px;
  }

  .next-box canvas {
    width: 96px;
    height: 96px;
  }

  .sky-log {
    min-height: auto;
    max-height: 110px;
    overflow-y: auto;
  }

  .showcase-road article,
  .audit-table article {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 430px) {
  .workspace-content {
    width: min(100% - 14px, 1180px);
  }

  .admin-titlebar {
    padding: 14px;
  }

  .sky-stats {
    grid-template-columns: 1fr 1fr;
  }

  .sky-actions,
  .tetris-actions {
    grid-template-columns: 1fr;
  }

  .sky-touch-pad button,
  .touch-pad button {
    min-height: 54px;
  }
}

/* Real phone layout and touch controls */
@media (max-width: 820px) {
  body {
    background: #0f172a;
  }

  .app-shell,
  .auth-shell {
    width: min(100% - 18px, 1120px);
    padding-top: 12px;
  }

  .topbar {
    position: sticky;
    top: 0;
    z-index: 40;
    margin: 0 -9px 12px;
    padding: 10px 9px;
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(14px);
  }

  body.mobile-menu-locked {
    overflow: hidden;
  }

  .workspace-shell {
    display: block;
  }

  .workspace-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 70;
    width: min(310px, 86vw);
    height: 100dvh;
    padding: 18px 14px;
    border-right: 0;
    border-bottom: 0;
    transform: translateX(-104%);
    transition: transform 180ms ease;
    background: rgba(15, 23, 42, 0.97);
    backdrop-filter: blur(16px);
    overflow-y: auto;
    box-shadow: 24px 0 80px rgba(0, 0, 0, 0.38);
  }

  .workspace-shell.mobile-menu-open .workspace-sidebar {
    transform: translateX(0);
  }

  .mobile-menu-backdrop {
    position: fixed;
    inset: 0;
    z-index: 60;
    border: 0;
    padding: 0;
    background: rgba(2, 6, 23, 0.58);
    opacity: 0;
    pointer-events: none;
    transition: opacity 180ms ease;
  }

  .workspace-shell.mobile-menu-open .mobile-menu-backdrop {
    display: block;
    opacity: 1;
    pointer-events: auto;
  }

  .mobile-menu-button {
    flex: 0 0 auto;
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    gap: 4px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.07);
    color: var(--text);
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
  }

  .mobile-menu-button span {
    display: block;
    width: 18px;
    height: 2px;
    border-radius: 99px;
    background: currentColor;
  }

  .mobile-topbar-left {
    width: 100%;
  }

  .mobile-topbar-left > div {
    min-width: 0;
  }

  .mobile-topbar-left strong {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .sidebar-brand {
    margin-bottom: 14px;
  }

  .sidebar-nav {
    display: grid;
    gap: 8px;
    overflow: visible;
    padding: 0;
  }

  .sidebar-link,
  .sidebar-group {
    width: 100%;
  }

  .sidebar-link {
    min-width: 0;
    white-space: nowrap;
    padding: 10px 12px;
  }

  .sidebar-group {
    min-width: 0;
  }

  .sidebar-subnav {
    max-height: none;
    overflow: visible;
  }

  .workspace-topbar {
    position: sticky;
    top: 0;
    z-index: 45;
    min-height: 58px;
    padding: 8px 10px;
    align-items: center;
    flex-direction: row;
    gap: 8px;
  }

  .workspace-content {
    width: min(100% - 18px, 1180px);
    padding: 10px 0 34px;
  }

  .topbar-actions {
    width: auto;
    margin-left: auto;
    justify-content: flex-end;
    gap: 6px;
  }

  .notification-bell {
    display: none;
  }

  .user-pill {
    display: none;
  }

  .topbar-actions .ghost-button {
    min-height: 38px;
    padding: 8px 10px;
  }

  .admin-titlebar {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    padding: 16px;
  }

  .admin-titlebar h1,
  h1 {
    font-size: clamp(30px, 10vw, 42px);
    line-height: 1.03;
  }

  .admin-titlebar p:not(.eyebrow) {
    font-size: 14px;
    line-height: 1.45;
  }

  .admin-titlebar .tetris-score-card,
  .admin-titlebar .sky-score-card {
    width: 100%;
  }

  .admin-table-wrap,
  .table-wrap {
    overflow-x: auto;
    margin-inline: -9px;
    padding-inline: 9px;
  }

  .admin-table {
    min-width: 680px;
  }

  .form-grid,
  .permission-grid,
  .document-layout,
  .case-board,
  .settings-grid,
  .profile-grid,
  .dashboard-grid,
  .operations-grid,
  .detail-grid {
    grid-template-columns: 1fr !important;
  }

  input,
  select,
  textarea,
  button {
    font-size: 16px;
  }
}

@media (max-width: 820px) {
  .sky-page,
  .tetris-page {
    margin-inline: -3px;
  }

  .sky-layout,
  .tetris-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .sky-stage,
  .tetris-stage {
    justify-self: stretch;
    width: 100%;
    border-radius: 8px;
    touch-action: none;
    -webkit-user-select: none;
    user-select: none;
  }

  .sky-stage {
    padding: 6px;
  }

  .sky-stage canvas {
    display: block;
    width: 100%;
    max-height: 58vh;
    aspect-ratio: 900 / 560;
    object-fit: contain;
    touch-action: none;
  }

  .tetris-stage {
    width: min(100%, 330px);
    margin: 0 auto;
    padding: 8px;
  }

  .tetris-stage canvas {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 1 / 2;
    touch-action: none;
  }

  .sky-panel,
  .tetris-panel {
    display: grid;
    gap: 10px;
  }

  .sky-actions,
  .tetris-actions {
    position: sticky;
    top: 0;
    z-index: 20;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    padding: 8px 0;
    background: rgba(15, 23, 42, 0.92);
  }

  .sky-actions button,
  .tetris-actions button,
  .sky-touch-pad button,
  .touch-pad button {
    min-height: 54px;
    border-radius: 8px;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
  }

  .sky-touch-pad,
  .touch-pad {
    display: grid;
    gap: 8px;
    touch-action: none;
  }

  .sky-touch-pad {
    grid-template-areas:
      ". up ."
      "left down right";
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .touch-pad {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .sky-touch-pad button,
  .touch-pad button {
    border: 1px solid rgba(73, 210, 166, 0.42);
    background: rgba(73, 210, 166, 0.13);
    color: var(--text);
    font-size: 24px;
    font-weight: 900;
  }

  .sky-touch-pad button:active,
  .touch-pad button:active {
    transform: translateY(1px) scale(0.98);
    background: rgba(73, 210, 166, 0.28);
  }

  .sky-log {
    display: none;
  }
}

@media (max-width: 460px) {
  .workspace-content {
    width: min(100% - 12px, 1180px);
  }

  .admin-titlebar {
    padding: 12px;
  }

  .sky-stats,
  .tetris-panel-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .sky-actions,
  .tetris-actions {
    grid-template-columns: 1fr 1fr;
  }

  .sky-actions .secondary-button:last-child,
  .tetris-actions .secondary-button:last-child {
    grid-column: 1 / -1;
  }

  .sky-stage canvas {
    max-height: 48vh;
  }

  .next-box {
    display: none;
  }
}

/* AI assistant widget */
.assistant-widget {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 55;
}

.assistant-fab {
  width: 58px;
  height: 58px;
  border: 1px solid rgba(73, 210, 166, 0.48);
  border-radius: 999px;
  background: linear-gradient(135deg, var(--brand), var(--accent));
  color: #03131a;
  font-weight: 950;
  cursor: pointer;
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.32);
}

.assistant-panel {
  position: absolute;
  right: 0;
  bottom: 72px;
  width: min(380px, calc(100vw - 28px));
  display: none;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  background: rgba(15, 23, 42, 0.98);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.42);
}

.assistant-panel.open {
  display: block;
}

.assistant-panel header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.05);
}

.assistant-panel header span {
  display: block;
  color: var(--brand);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.assistant-panel header strong {
  display: block;
  margin-top: 2px;
}

.assistant-panel header button {
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.07);
  color: var(--text);
  font-size: 22px;
  cursor: pointer;
}

.assistant-messages {
  height: 320px;
  display: grid;
  align-content: start;
  gap: 10px;
  overflow-y: auto;
  padding: 14px;
}

.assistant-message {
  max-width: 88%;
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 14px;
  line-height: 1.45;
}

.assistant-message.bot {
  justify-self: start;
  background: rgba(255, 255, 255, 0.075);
  color: var(--text);
}

.assistant-message.user {
  justify-self: end;
  background: rgba(73, 210, 166, 0.18);
  color: #d7fff0;
}

.assistant-suggestion-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.assistant-suggestion-row button {
  min-height: 32px;
  border: 1px solid rgba(110, 168, 255, 0.34);
  border-radius: 999px;
  padding: 6px 10px;
  background: rgba(110, 168, 255, 0.12);
  color: var(--text);
  font: inherit;
  font-size: 12px;
  cursor: pointer;
}

.assistant-form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  padding: 12px;
  border-top: 1px solid var(--line);
}

.assistant-form input {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  font: inherit;
}

.assistant-form button {
  border: 0;
  border-radius: 8px;
  padding: 10px 12px;
  background: var(--brand);
  color: #052017;
  font: inherit;
  font-weight: 850;
  cursor: pointer;
}

@media (max-width: 820px) {
  .assistant-widget {
    right: 12px;
    bottom: 12px;
  }

  .assistant-fab {
    width: 52px;
    height: 52px;
  }

  .assistant-panel {
    position: fixed;
    left: 10px;
    right: 10px;
    bottom: 72px;
    width: auto;
  }

  .assistant-messages {
    height: min(330px, 48vh);
  }
}

.auth-provider-hub .auth-copy,
.auth-provider-screen .auth-copy {
  max-width: 700px;
}

.auth-provider-grid-card,
.auth-provider-card {
  width: min(1040px, 100%);
}

.auth-provider-screen {
  min-height: auto;
  grid-template-columns: 1fr;
  gap: 24px;
  align-items: start;
}

.auth-provider-screen .auth-copy,
.auth-provider-screen .auth-provider-card {
  max-width: 1200px;
  width: 100%;
}

.provider-choice-grid,
.provider-entrypoint-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.provider-choice-card,
.provider-entrypoint-card {
  display: grid;
  gap: 10px;
  min-height: 180px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  text-decoration: none;
}

.provider-choice-card strong,
.provider-entrypoint-card strong {
  font-size: 22px;
}

.provider-choice-card span,
.provider-entrypoint-card span {
  color: var(--muted);
  line-height: 1.5;
}

.provider-choice-card em {
  margin-top: auto;
  color: #67f0bf;
  font-style: normal;
  font-weight: 700;
}

.provider-choice-card.featured {
  border-color: rgba(73, 210, 166, 0.4);
  background: linear-gradient(180deg, rgba(73, 210, 166, 0.14), rgba(255, 255, 255, 0.04));
}

.provider-requirements {
  margin: 0;
  padding-left: 18px;
  display: grid;
  gap: 10px;
  color: var(--text);
}

.provider-status-chip {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  margin-top: 12px;
  border-radius: 999px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.06);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.provider-status-chip.status-active,
.provider-status-chip.status-scaffold_ready {
  color: #67f0bf;
  border-color: rgba(73, 210, 166, 0.35);
}

.provider-status-chip.status-integration_required {
  color: #ffd788;
  border-color: rgba(255, 215, 136, 0.35);
}

.public-login-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}

@media (max-width: 820px) {
  .provider-choice-grid,
  .provider-entrypoint-grid,
  .public-login-actions {
    grid-template-columns: 1fr;
  }

  .auth-provider-screen {
    gap: 16px;
  }
}

.kep-read-form {
  display: grid;
  gap: 18px;
}

.kep-read-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(300px, 0.9fr);
  gap: 18px;
}

.kep-read-panel {
  display: grid;
  gap: 16px;
  align-content: start;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
}

.kep-read-panel-head {
  display: grid;
  gap: 6px;
}

.kep-read-panel-head span,
.kep-field span,
.kep-install-hint p,
.kep-install-hint li,
.kep-file-picker em,
.kep-read-actions small {
  color: var(--muted);
}

.kep-carrier-options {
  display: grid;
  gap: 12px;
}

.kep-carrier-option {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.03);
  cursor: pointer;
}

.kep-carrier-option.active {
  border-color: rgba(73, 210, 166, 0.42);
  background: rgba(73, 210, 166, 0.08);
}

.kep-carrier-option input {
  margin-top: 5px;
}

.kep-carrier-option span {
  display: grid;
  gap: 6px;
}

.kep-carrier-option strong,
.kep-file-picker strong {
  font-size: 18px;
}

.kep-carrier-option em,
.kep-file-picker em {
  font-style: normal;
  line-height: 1.45;
}

.kep-field-stack {
  display: grid;
  gap: 14px;
}

.kep-field {
  display: grid;
  gap: 8px;
  color: var(--text);
  font-weight: 700;
}

.kep-field input[type="password"] {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 11px 12px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.08);
  font: inherit;
}

.kep-file-picker {
  position: relative;
  display: grid;
  gap: 6px;
  padding: 16px;
  border: 1px dashed rgba(255, 255, 255, 0.22);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.03);
}

.kep-file-picker input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.kep-install-hint {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid rgba(255, 215, 136, 0.22);
  border-radius: 8px;
  background: rgba(255, 215, 136, 0.06);
}

.kep-hint-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.kep-hint-links a {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  border-radius: 999px;
  padding: 8px 12px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.08);
  text-decoration: none;
  font-weight: 700;
}

.kep-read-actions {
  display: grid;
  gap: 10px;
}

.kep-certificate-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.kep-certificate-grid article {
  display: grid;
  gap: 6px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.045);
}

.kep-certificate-grid article span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.kep-certificate-grid article strong {
  overflow-wrap: anywhere;
}

.kep-certificate-grid-session {
  margin-top: 4px;
}

.two-factor-setup-grid,
.backup-code-grid,
.security-action-row {
  display: grid;
  gap: 16px;
}

.two-factor-setup-grid {
  grid-template-columns: minmax(280px, 360px) minmax(0, 1fr);
  align-items: start;
}

.two-factor-qr-card,
.two-factor-verify-card,
.backup-code-panel {
  display: grid;
  gap: 12px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
}

.two-factor-qr-surface {
  display: inline-grid;
  place-items: center;
  width: fit-content;
  padding: 16px;
  border-radius: 8px;
  background: #ffffff;
}

.two-factor-qr-surface svg {
  width: 220px;
  height: 220px;
}

.two-factor-secret-label {
  margin: 0;
  color: var(--muted);
  font-weight: 700;
}

.two-factor-secret {
  display: inline-block;
  width: fit-content;
  padding: 10px 12px;
  border-radius: 8px;
  background: rgba(255,255,255,0.08);
  overflow-wrap: anywhere;
}

.backup-code-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.backup-code-grid code {
  display: block;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255,255,255,0.06);
  font-size: 15px;
  font-weight: 800;
}

.security-action-row {
  grid-template-columns: repeat(2, minmax(0, auto));
  align-items: center;
}

.session-table article {
  grid-template-columns: 96px 180px minmax(0, 1fr) minmax(180px, 240px) auto;
  align-items: center;
}

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

  .kep-read-grid,
  .kep-certificate-grid,
  .two-factor-setup-grid,
  .backup-code-grid {
    grid-template-columns: 1fr;
  }

  .security-action-row {
    grid-template-columns: 1fr;
  }

  .session-table article {
    grid-template-columns: 1fr;
  }

  .tenant-row-head {
    flex-direction: column;
  }
}

.updates-page {
  display: grid;
  gap: 1.5rem;
}

.updates-hero {
  align-items: start;
  gap: 1.5rem;
}

.updates-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.9rem;
  width: min(100%, 32rem);
}

.updates-summary article,
.update-card {
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(18, 27, 45, 0.92);
  border-radius: 1rem;
  box-shadow: 0 18px 40px rgba(5, 10, 20, 0.18);
}

.updates-summary article {
  padding: 1rem 1.1rem;
}

.updates-summary span,
.update-period {
  display: block;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #8ea2c6;
}

.updates-summary strong {
  display: block;
  margin-top: 0.35rem;
  font-size: 1.25rem;
  color: #f7f9ff;
}

.updates-roadmap {
  display: grid;
  gap: 1rem;
}

.update-card {
  padding: 1.25rem;
}

.update-card-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.9rem;
}

.update-card h2 {
  margin: 0.2rem 0 0;
  font-size: 1.35rem;
}

.update-card p {
  margin: 0 0 1rem;
  color: #c4d1ea;
  line-height: 1.6;
}

.update-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 7.5rem;
  padding: 0.45rem 0.8rem;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 700;
  white-space: nowrap;
}

.update-status.live {
  background: rgba(62, 217, 163, 0.12);
  color: #58e2b7;
  border: 1px solid rgba(88, 226, 183, 0.28);
}

.update-status.prepared {
  background: rgba(129, 160, 255, 0.12);
  color: #a9bbff;
  border: 1px solid rgba(169, 187, 255, 0.24);
}

.update-bullets {
  margin: 0;
  padding-left: 1.2rem;
  color: #eff4ff;
  display: grid;
  gap: 0.45rem;
}

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

.table-actions form {
  margin: 0;
}

.table-action.danger,
.danger-button {
  border-color: rgba(244, 63, 94, 0.36);
  color: #ffe2e8;
  background: rgba(244, 63, 94, 0.12);
}

@media (max-width: 900px) {
  .updates-summary {
    grid-template-columns: 1fr;
    width: 100%;
  }

  .update-card-head {
    flex-direction: column;
  }

  .update-status {
    min-width: 0;
  }
}

.contract-expiring-soon {
  background: rgba(255, 196, 82, 0.08);
}

.contract-expired {
  background: rgba(255, 99, 99, 0.09);
}

.contract-state-note {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.quality-badge {
  display: inline-flex;
  margin-top: 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 12px;
  font-weight: 800;
}

.quality-badge-ok {
  border-color: rgba(73, 210, 166, 0.42);
  color: #b7f4df;
  background: rgba(73, 210, 166, 0.12);
}

.quality-badge-warning {
  border-color: rgba(244, 191, 80, 0.45);
  color: #ffe4a3;
  background: rgba(244, 191, 80, 0.12);
}

.change-log-list {
  display: grid;
  gap: 14px;
}

.change-log-item {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.025);
  padding: 16px 18px;
  display: grid;
  gap: 10px;
}

.change-log-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: baseline;
}

.change-log-head span,
.change-log-meta,
.change-log-fields li span,
.change-log-raw {
  color: var(--muted);
}

.change-log-fields {
  display: grid;
  gap: 8px;
  margin: 0;
  padding-left: 18px;
}

.change-log-fields li {
  line-height: 1.5;
}

.change-log-arrow {
  display: inline-block;
  margin: 0 8px;
  color: var(--text);
}

.change-log-raw {
  margin: 0;
  white-space: pre-wrap;
  word-break: break-word;
}

.finance-row-alert {
  background: rgba(255, 99, 99, 0.08);
}

.finance-code-legal {
  color: #7dd3fc;
}

.finance-code-individual {
  color: #86efac;
}

.finance-code-invalid {
  color: #fca5a5;
}

.finance-negative-diff {
  color: #fca5a5;
  font-weight: 700;
}

.finance-positive-diff {
  color: #86efac;
  font-weight: 700;
}

.finance-preview-table .table-input {
  width: 100%;
}

.finance-preview-wrap {
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: auto;
  background: rgba(8, 12, 24, 0.32);
  max-width: 100%;
}

.finance-preview-table {
  width: 100%;
  min-width: 980px;
  table-layout: fixed;
}

.finance-preview-table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: rgba(31, 41, 55, 0.96);
  backdrop-filter: blur(8px);
}

.finance-preview-table td:first-child,
.finance-preview-table th:first-child {
  position: sticky;
  left: 0;
  z-index: 1;
  background: rgba(31, 41, 55, 0.98);
}

.finance-preview-table thead th:first-child {
  z-index: 3;
}

.finance-code-cell {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.finance-code-kind-legal_entity {
  border-color: rgba(110, 168, 255, 0.45);
  color: #cfe1ff;
  background: rgba(110, 168, 255, 0.14);
}

.finance-code-kind-individual {
  border-color: rgba(73, 210, 166, 0.4);
  color: #b7f4df;
  background: rgba(73, 210, 166, 0.12);
}

.finance-code-kind-invalid,
.finance-code-kind-unknown {
  border-color: rgba(244, 191, 80, 0.45);
  color: #ffe4a3;
  background: rgba(244, 191, 80, 0.12);
}

.finance-diff-negative {
  color: #fda4af;
  font-weight: 900;
}

.finance-diff-positive {
  color: #86efac;
  font-weight: 900;
}

.finance-purpose-text {
  max-width: 420px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  cursor: help;
}

.finance-preview-table .table-textarea {
  min-width: 0;
  min-height: 82px;
  resize: vertical;
  white-space: pre-wrap;
}

.finance-grid-table td,
.finance-grid-table th {
  vertical-align: top;
}

@media (min-width: 981px) {
  .workspace-shell {
    grid-template-columns: 208px minmax(0, 1fr);
    align-items: stretch;
  }

  .workspace-sidebar {
    position: sticky;
    top: 0;
    align-self: stretch;
    min-height: 100vh;
    height: auto;
    overflow-x: hidden;
    overflow-y: clip;
    padding-bottom: 32px;
  }

  .sidebar-nav {
    overflow: visible;
  }

  .workspace-main {
    min-width: 0;
  }
}

.finance-purpose-block {
  min-width: 0;
}

.finance-purpose-textarea {
  min-width: 0;
  min-height: 76px;
  font-size: 11px;
  line-height: 1.28;
}

.finance-preview-table .table-actions-cell {
  min-width: 94px;
  position: static;
  background: transparent;
}

.finance-preview-table thead .table-actions-cell {
  z-index: 3;
}

.finance-preview-table td {
  padding: 8px 7px;
}

.finance-preview-table th:nth-child(1),
.finance-preview-table td:nth-child(1) {
  width: 48px;
}

.finance-preview-table th:nth-child(2),
.finance-preview-table td:nth-child(2) {
  width: 158px;
}

.finance-preview-table th:nth-child(3),
.finance-preview-table td:nth-child(3) {
  width: 142px;
}

.finance-preview-table th:nth-child(4),
.finance-preview-table td:nth-child(4),
.finance-preview-table th:nth-child(5),
.finance-preview-table td:nth-child(5) {
  width: 136px;
}

.finance-preview-table th:nth-child(6),
.finance-preview-table td:nth-child(6) {
  width: 104px;
}

.finance-preview-table th:nth-child(7),
.finance-preview-table td:nth-child(7) {
  width: 148px;
}

.finance-preview-table th:nth-child(8),
.finance-preview-table td:nth-child(8) {
  width: 116px;
}

.finance-preview-page .admin-table-wrap,
.finance-report-page .admin-table-wrap {
  overflow-x: auto;
}

.finance-preview-page .table-input {
  min-height: 32px;
  padding: 6px 7px;
  border-radius: 3px;
  font-size: 12px;
}

.finance-preview-page .finance-code-kind {
  border-radius: 3px;
  padding: 4px 7px;
}

.finance-preview-page .status-pill {
  border-radius: 8px;
  white-space: normal;
  padding: 8px 10px;
  font-size: 12px;
}

.finance-preview-page .admin-titlebar {
  margin-bottom: 14px;
}

.finance-preview-page .admin-titlebar h1 {
  font-size: clamp(30px, 3.2vw, 48px);
}

.finance-preview-page .land-summary-grid {
  grid-template-columns: repeat(4, minmax(160px, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}

.finance-preview-page .compact-panel {
  min-height: 74px;
  padding: 12px 14px;
}

.finance-preview-page .compact-panel strong {
  font-size: clamp(22px, 2.2vw, 30px);
  overflow-wrap: anywhere;
}

.finance-preview-main-row td {
  border-bottom: 0;
}

.finance-preview-purpose-row td {
  padding-top: 0;
  padding-bottom: 12px;
}

.finance-preview-purpose-row td:first-child {
  position: sticky;
  left: 0;
  background: rgba(31, 41, 55, 0.98);
}

.finance-purpose-block {
  display: grid;
  gap: 6px;
}

.finance-purpose-block span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.finance-preview-purpose-row .finance-purpose-textarea {
  width: 100%;
}

.sticky-form-actions {
  position: sticky;
  bottom: 0;
  z-index: 5;
  padding-top: 16px;
  padding-bottom: 8px;
  background: linear-gradient(180deg, rgba(17, 24, 39, 0), rgba(17, 24, 39, 0.96) 32%);
}

.finance-page .compact-panel strong {
  line-height: 1.4;
}

.finance-report-page .compact-panel,
.finance-preview-page .compact-panel {
  min-height: 96px;
}

.finance-report-page .admin-titlebar h1 {
  margin-bottom: 10px;
}

.finance-report-page .admin-titlebar p strong {
  color: var(--text);
}

.finance-report-page tfoot th {
  color: var(--text);
  font-size: 15px;
  border-top: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
}

.finance-report-page .signature-card .status-pill {
  margin-left: auto;
}

.finance-report-page .security-policy-grid article p {
  margin: 8px 0 0;
}

.finance-report-page .security-policy-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.finance-code-cell .cadastral-link {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.finance-inline-link {
  display: inline-flex;
  margin-top: 6px;
}

.finance-payer-link {
  display: grid;
  gap: 6px;
  color: #dbeafe;
  text-decoration: none;
}

.finance-payer-link strong {
  color: #93c5fd;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.finance-payer-link small {
  color: #93c5fd;
  font-size: 12px;
}

.finance-payer-link-inline {
  color: #93c5fd;
  font-weight: 800;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.finance-payer-link-inline:hover {
  color: #bfdbfe;
}

@media (max-width: 1440px) {
  .workspace-content-wide {
    width: min(100%, calc(100% - 20px));
    padding-inline: 4px;
  }

  .finance-preview-table {
    min-width: 920px;
  }

  .finance-purpose-block,
  .finance-purpose-textarea,
  .finance-preview-table .table-textarea {
    min-width: 0;
  }

  .finance-preview-table td,
  .finance-preview-table th {
    padding: 9px 7px;
  }
}

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

  .finance-preview-table {
    min-width: 860px;
  }

  .finance-purpose-block,
  .finance-purpose-textarea,
  .finance-preview-table .table-textarea {
    min-width: 0;
  }

  .sticky-form-actions {
    padding-bottom: 14px;
    gap: 10px;
    flex-wrap: wrap;
  }
}

@media (max-height: 900px) and (min-width: 921px) {
  .finance-preview-page {
    gap: 14px;
  }

  .finance-preview-page .admin-titlebar {
    padding: 18px 22px;
  }

  .finance-preview-page .admin-titlebar h1 {
    font-size: clamp(30px, 3vw, 42px);
  }

  .finance-preview-page .panel {
    padding: 18px;
  }

  .finance-preview-page .panel-heading {
    margin-bottom: 10px;
  }

  .finance-preview-page .panel-heading h2 {
    font-size: 28px;
  }

  .finance-preview-page .admin-table th,
  .finance-preview-page .admin-table td {
    padding: 7px 6px;
  }

  .finance-preview-page .table-input {
    min-height: 28px;
    padding: 4px 6px;
    font-size: 12px;
  }

  .finance-preview-page .finance-purpose-textarea {
    min-height: 54px;
    max-height: 96px;
  }

  .finance-preview-page .status-pill {
    min-height: 28px;
    padding: 6px 8px;
  }
}

@media (max-width: 980px) {
  .finance-preview-page .land-summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .finance-preview-table {
    min-width: 780px;
  }
}

.admin-table-sort {
  color: inherit;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
}

.admin-table-sort:hover {
  text-decoration: underline;
}

@media (min-width: 981px) {
  .workspace-shell {
    min-height: 100vh;
    align-items: start;
  }

  .workspace-sidebar {
    position: sticky;
    top: 0;
    min-height: 100vh;
    height: 100vh;
    overflow-y: hidden !important;
    overflow-x: hidden !important;
    padding-bottom: 20px;
  }

  .sidebar-nav {
    gap: 6px;
    overflow: visible !important;
  }

  .sidebar-group {
    gap: 6px;
  }

  .sidebar-subnav {
    gap: 4px;
    margin-top: 6px;
  }

  .sidebar-link {
    padding-block: 10px;
  }

  .sidebar-subnav a {
    padding-block: 8px;
  }
}

.public-entry-shell {
  min-height: calc(100vh - 180px);
  display: grid;
  place-items: center;
  padding: 32px 20px 48px;
}

.public-entry-card {
  width: min(720px, 100%);
  padding: 32px;
  border-radius: 24px;
  background: rgba(17, 24, 39, 0.86);
  border: 1px solid rgba(148, 163, 184, 0.24);
  box-shadow: 0 24px 70px rgba(2, 6, 23, 0.28);
}

.public-entry-card h1 {
  margin: 0 0 14px;
  font-size: clamp(34px, 4vw, 54px);
  line-height: 1.02;
}

.public-entry-copy {
  margin: 0;
  max-width: 58ch;
  color: var(--muted-copy);
  font-size: 18px;
  line-height: 1.6;
}

.public-entry-actions {
  margin-top: 24px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.button-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0 20px;
  border-radius: 16px;
  background: var(--brand-accent);
  color: #061013;
  text-decoration: none;
  font-weight: 800;
  letter-spacing: 0;
}

.button-primary:hover {
  filter: brightness(1.05);
}

@media (max-width: 720px) {
  .public-entry-card {
    padding: 24px 20px;
    border-radius: 20px;
  }

  .public-entry-copy {
    font-size: 16px;
  }

  .public-entry-actions {
    flex-direction: column;
  }

  .button-primary {
    width: 100%;
  }
}
