@import url('https://fonts.googleapis.com/css2?family=Kanit:wght@300;400;500;600;700;800&display=swap');

:root {
    --bg: #f3f6f8;
    --surface: #ffffff;
    --surface-soft: #f8fafb;
    --ink: #142127;
    --muted: #687782;
    --line: #dce3e8;
    --primary: #087568;
    --primary-dark: #065f56;
    --accent: #a15c16;
    --success: #0f7a3b;
    --danger: #b42318;
    --shadow: 0 16px 38px rgba(15, 23, 42, 0.08);
    --soft-shadow: 0 6px 18px rgba(15, 23, 42, 0.05);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    color: var(--ink);
    background: var(--bg);
    font-family: "Kanit", Tahoma, Arial, sans-serif;
    line-height: 1.5;
    cursor: url("cursor-arrow.svg") 7 5, auto;
}

a {
    color: inherit;
}

a,
button,
.button,
select,
summary,
input[type="checkbox"],
input[type="radio"],
input[type="submit"],
input[type="button"] {
    cursor: url("cursor-pointer.svg") 13 5, pointer;
}

input,
textarea {
    cursor: text;
}

.sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: 260px;
    padding: 24px;
    background: linear-gradient(180deg, #10252c 0%, #0d2026 100%);
    color: #fff;
    box-shadow: 8px 0 28px rgba(15, 23, 42, 0.14);
}

.menu-toggle,
.sidebar-backdrop {
    display: none;
}

.brand {
    display: flex;
    gap: 12px;
    align-items: center;
    margin-bottom: 32px;
}

.brand-mark {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border-radius: 10px;
    background: var(--primary);
    font-weight: 700;
    box-shadow: inset 0 -10px 20px rgba(0, 0, 0, 0.14);
}

.brand small {
    display: block;
    color: #a9b8bd;
}

nav {
    display: grid;
    gap: 8px;
}

.nav-title {
    margin: 12px 0 2px;
    color: #91a1a7;
    font-size: 12px;
    font-weight: 700;
}

nav a {
    padding: 10px 12px;
    border-radius: 8px;
    color: #d7e2e5;
    text-decoration: none;
    font-size: 14px;
    transition: background 0.15s ease, color 0.15s ease;
}

nav a.active,
nav a:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.main {
    margin-left: 260px;
    padding: 34px 38px;
}

.page-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 22px;
}

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

h1 {
    margin-bottom: 0;
    font-size: 30px;
    line-height: 1.2;
}

h2 {
    font-size: 18px;
    margin-bottom: 16px;
}

.eyebrow {
    margin-bottom: 6px;
    color: var(--accent);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0;
    text-transform: uppercase;
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    padding: 0 13px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    color: var(--ink);
    font: inherit;
    text-decoration: none;
    cursor: pointer;
    font-size: 14px;
    font-weight: 700;
    transition: background 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}

.button:hover {
    border-color: #b8c2cc;
    transform: translateY(-1px);
}

.button.primary {
    border-color: var(--primary);
    background: var(--primary);
    color: #fff;
}

.button.primary:hover {
    background: var(--primary-dark);
}

.button.danger {
    border-color: #f3c4bf;
    background: #fff5f4;
    color: var(--danger);
}

.button.small {
    min-height: 32px;
    padding: 0 10px;
    font-size: 12px;
}

.user-box {
    position: absolute;
    right: 24px;
    bottom: 24px;
    left: 24px;
    display: grid;
    gap: 4px;
    padding-top: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.14);
}

.user-box span {
    color: #a9b8bd;
    font-size: 13px;
}

.user-box a {
    color: #fff;
    font-size: 13px;
}

.theme-switcher {
    margin-top: 20px;
    padding-top: 14px;
    border-top: 1px solid rgba(255, 255, 255, 0.14);
}

.theme-switcher label {
    color: #a9b8bd;
}

.theme-switcher select {
    min-height: 36px;
    border-color: rgba(255, 255, 255, 0.14);
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
}

.theme-switcher option {
    color: #111827;
}

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

.metric,
.panel,
.form-panel,
.table-wrap {
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--surface);
    box-shadow: var(--soft-shadow);
}

.metric {
    padding: 18px;
}

.metric span {
    color: var(--muted);
    font-size: 14px;
}

.metric strong {
    display: block;
    margin-top: 8px;
    font-size: 32px;
}

.grid {
    display: grid;
    gap: 16px;
    margin-bottom: 16px;
}

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

.grid.two.master-grid {
    grid-template-columns: minmax(240px, 320px) minmax(720px, 1fr);
    align-items: start;
}

.detail-grid {
    grid-template-columns: 1.05fr 0.95fr;
}

.panel,
.form-panel {
    padding: 20px;
}

.lead-card {
    max-width: 1180px;
    padding: 0;
    overflow: hidden;
}

.form-section {
    padding: 22px 24px;
    border-bottom: 1px solid var(--line);
}

.form-section:last-of-type {
    border-bottom: 0;
}

.section-title {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 18px;
}

.section-title span {
    display: grid;
    flex: 0 0 auto;
    place-items: center;
    width: 30px;
    height: 30px;
    border-radius: 8px;
    background: #e7f5f3;
    color: var(--primary-dark);
    font-size: 13px;
    font-weight: 800;
}

.section-title h2 {
    margin-bottom: 2px;
    font-size: 17px;
}

.section-title p {
    margin-bottom: 0;
    color: var(--muted);
    font-size: 13px;
}

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

.note-field {
    margin-top: 14px;
}

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

.status-list div,
.follow-list a {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
}

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

.follow-list a {
    display: grid;
    color: var(--ink);
    text-decoration: none;
}

.follow-list span,
.muted {
    color: var(--muted);
}

.filters,
.form-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(130px, 1fr)) auto;
    gap: 10px;
    margin-bottom: 16px;
}

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

.tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 18px;
    padding: 4px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.75);
    box-shadow: var(--soft-shadow);
    width: fit-content;
}

.tabs a {
    padding: 9px 12px;
    border: 1px solid transparent;
    border-radius: 8px;
    background: transparent;
    color: var(--ink);
    text-decoration: none;
    font-size: 14px;
}

.tabs a.active {
    border-color: var(--primary);
    background: #e7f5f3;
    color: var(--primary-dark);
    font-weight: 700;
}

.row-actions {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
    white-space: nowrap;
}

td.row-actions {
    display: table-cell;
    width: 1%;
    text-align: right;
    white-space: nowrap;
}

td.row-actions form {
    display: inline-flex;
    margin: 0 0 0 6px;
    vertical-align: middle;
}

td.row-actions .button {
    vertical-align: middle;
}

.login-hint {
    margin: 16px 0 0;
    color: var(--muted);
    font-size: 13px;
}

input,
select,
textarea {
    width: 100%;
    min-height: 42px;
    padding: 9px 11px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    color: var(--ink);
    font: inherit;
    font-size: 14px;
}

input:focus,
select:focus,
textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.12);
    outline: none;
}

textarea {
    resize: vertical;
}

label {
    display: grid;
    gap: 6px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
}

label input,
label select,
label textarea {
    color: var(--ink);
    font-weight: 400;
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 0;
    padding: 18px 24px;
    border-top: 1px solid var(--line);
    background: var(--surface-soft);
}

.table-wrap {
    overflow: auto;
}

.data-tools {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) auto auto auto;
    gap: 12px;
    align-items: center;
    padding: 14px 16px;
    border-bottom: 1px solid var(--line);
}

.data-tools label,
.data-tools span {
    margin: 0;
    color: var(--muted);
    font-size: 13px;
    font-weight: 600;
}

.data-search {
    display: flex;
    align-items: center;
    gap: 10px;
}

.data-search input {
    min-width: 220px;
}

.data-page-size {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

.data-page-size select {
    min-height: 36px;
    width: auto;
    min-width: 76px;
    padding-right: 32px;
}

.data-summary {
    justify-self: end;
    white-space: nowrap;
}

.data-pager {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    white-space: nowrap;
}

.data-pager span {
    color: var(--ink);
    font-size: 13px;
    font-weight: 700;
}

.data-pager button:disabled {
    opacity: 0.42;
    cursor: not-allowed;
    transform: none;
}

.data-empty {
    padding: 22px 16px;
    color: var(--muted);
    text-align: center;
    font-weight: 600;
}

.master-list {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--surface);
    box-shadow: var(--soft-shadow);
}

.master-list-head,
.master-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 150px;
    gap: 12px;
    align-items: center;
    padding: 10px 12px;
}

.master-list.has-parent .master-list-head,
.master-list.has-parent .master-row {
    grid-template-columns: minmax(0, 1fr) minmax(180px, 240px) 150px;
}

.users-grid {
    grid-template-columns: minmax(260px, 320px) minmax(0, 1fr);
    align-items: start;
}

.users-list .master-list-head,
.users-list .master-row {
    grid-template-columns: minmax(105px, 0.8fr) minmax(130px, 0.9fr) minmax(130px, 0.8fr) minmax(135px, 0.9fr) minmax(82px, 0.55fr) minmax(130px, 0.8fr) 132px;
    gap: 8px;
}

.users-list {
    overflow-x: auto;
}

.users-list .master-list-head,
.users-list .master-row {
    min-width: 820px;
}

.users-list .row-actions {
    justify-content: flex-end;
}

.users-list .button.small {
    padding: 0 8px;
}

.lead-count {
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
}

.region-checks,
.mini-checks {
    display: grid;
    gap: 8px;
}

.region-checks label,
.mini-checks label {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 0;
    font-size: 13px;
}

.region-checks input,
.mini-checks input {
    width: auto;
    min-height: 0;
}

.mini-checks {
    max-height: 110px;
    overflow: auto;
    padding: 8px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.68);
}

.import-grid {
    grid-template-columns: minmax(260px, 340px) minmax(0, 1fr);
    align-items: start;
}

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

.template-table div {
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface-soft);
}

.template-table code {
    font-size: 13px;
}

.master-list-head {
    border-bottom: 1px solid var(--line);
    background: #f8fafc;
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
}

.master-row {
    border-bottom: 1px solid var(--line);
}

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

.master-row:hover {
    background: #fbfdff;
}

.master-row input,
.master-row select {
    min-height: 36px;
}

.master-empty {
    padding: 18px;
}

table {
    width: 100%;
    border-collapse: collapse;
    min-width: 640px;
}

th.sortable {
    position: relative;
    padding-right: 24px;
    cursor: url("cursor-pointer.svg") 13 5, pointer;
    user-select: none;
}

th.sortable::after {
    content: "↕";
    position: absolute;
    right: 8px;
    color: var(--muted);
    font-size: 12px;
    opacity: 0.55;
}

th.sortable.sort-asc::after {
    content: "↑";
    color: var(--primary);
    opacity: 1;
}

th.sortable.sort-desc::after {
    content: "↓";
    color: var(--primary);
    opacity: 1;
}

.master-grid table {
    min-width: 0;
    table-layout: fixed;
}

.master-grid th:last-child,
.master-grid td:last-child {
    width: 150px;
}

.master-grid td input,
.master-grid td select {
    min-height: 36px;
}

th,
td {
    padding: 10px 12px;
    border-bottom: 1px solid var(--line);
    text-align: left;
    vertical-align: middle;
}

th:last-child,
td:last-child {
    width: 1%;
    white-space: nowrap;
}

th {
    background: #f8fafc;
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
}

tbody tr:hover {
    background: #fbfdff;
}

td span {
    display: block;
    color: var(--muted);
    font-size: 13px;
}

.pill {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 0 10px;
    border-radius: 999px;
    background: #e7f5f3;
    color: var(--primary-dark);
    font-size: 13px;
    font-weight: 700;
}

.alert {
    margin-bottom: 16px;
    padding: 12px 14px;
    border-radius: 10px;
    background: #eef7ee;
    color: var(--success);
}

.alert.info {
    background: #eef6ff;
    color: #175cd3;
}

.alert.danger {
    background: #fff0ee;
    color: var(--danger);
}

.form-help {
    margin: 10px 0 0;
    color: var(--muted);
    font-size: 13px;
}

.lead-filters {
    grid-template-columns: repeat(4, minmax(150px, 1fr));
}

.compact-filters {
    grid-template-columns: minmax(220px, 420px) auto;
    align-items: end;
    justify-content: start;
}

.district-picker {
    margin-bottom: 16px;
}

.district-picker .filters {
    margin-bottom: 0;
}

.compact-form {
    align-self: start;
    position: sticky;
    top: 20px;
}

.compact-form .form-actions,
.call-form .form-actions {
    padding: 0;
    border-top: 0;
    background: transparent;
    margin-top: 16px;
}

.compact-form h2 {
    margin-bottom: 14px;
    font-size: 17px;
}

.compact-form label + label {
    margin-top: 12px;
}

.empty-state {
    max-width: 760px;
}

.detail-list {
    display: grid;
    gap: 12px;
    margin: 0;
}

.detail-list div {
    display: grid;
    grid-template-columns: 140px 1fr;
    gap: 12px;
}

.detail-list dt {
    color: var(--muted);
}

.detail-list dd {
    margin: 0;
}

.note-box {
    margin: 18px 0 0;
    padding: 12px;
    border-radius: 8px;
    background: #f7fafb;
}

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

.timeline {
    display: grid;
    gap: 12px;
}

.timeline article {
    padding-left: 14px;
    border-left: 3px solid var(--primary);
}

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

.empty {
    color: var(--muted);
    text-align: center;
}

.setup-page {
    display: grid;
    min-height: 100vh;
    place-items: center;
    padding: 24px;
}

.setup-card {
    width: min(520px, 100%);
    padding: 28px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    box-shadow: var(--shadow);
}

.check-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 18px;
}

.check-row input {
    width: auto;
    min-height: auto;
}

body.theme-classic {
    --bg: #eef2f6;
    --surface: #ffffff;
    --surface-soft: #f8fafb;
    --ink: #17212b;
    --muted: #667085;
    --line: #d8dee6;
    --primary: #0f766e;
    --primary-dark: #115e59;
    --accent: #b45309;
}

body.theme-classic .sidebar {
    background: #12232a;
}

body.theme-executive {
    --bg: #f5f7f9;
    --surface: #ffffff;
    --surface-soft: #f8fafb;
    --ink: #142127;
    --muted: #687782;
    --line: #dce3e8;
    --primary: #087568;
    --primary-dark: #065f56;
    --accent: #a15c16;
}

body.theme-executive .sidebar {
    background: linear-gradient(180deg, #10252c 0%, #0d2026 100%);
}

body.theme-tailwind {
    --bg: #f8fafc;
    --surface: #ffffff;
    --surface-soft: #f1f5f9;
    --ink: #0f172a;
    --muted: #64748b;
    --line: #e2e8f0;
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --accent: #7c3aed;
    --success: #16a34a;
    --danger: #dc2626;
    --soft-shadow: 0 18px 45px rgba(15, 23, 42, 0.08);
}

body.theme-tailwind .sidebar {
    background: linear-gradient(180deg, #0f172a 0%, #111827 100%);
}

body.theme-tailwind .brand-mark {
    background: linear-gradient(135deg, #2563eb, #7c3aed);
}

body.theme-tailwind nav a.active,
body.theme-tailwind nav a:hover {
    background: rgba(59, 130, 246, 0.18);
}

body.theme-tailwind .button.primary {
    border-color: #2563eb;
    background: #2563eb;
}

body.theme-tailwind .button.primary:hover {
    background: #1d4ed8;
}

body.theme-tailwind .tabs a.active,
body.theme-tailwind .pill,
body.theme-tailwind .section-title span {
    background: #dbeafe;
    color: #1d4ed8;
}

body.theme-tailwind input:focus,
body.theme-tailwind select:focus,
body.theme-tailwind textarea:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.14);
}

body.theme-antd {
    --bg: #f5f5f5;
    --surface: #ffffff;
    --surface-soft: #fafafa;
    --ink: #262626;
    --muted: #8c8c8c;
    --line: #f0f0f0;
    --primary: #1677ff;
    --primary-dark: #0958d9;
    --accent: #1677ff;
    --success: #52c41a;
    --danger: #ff4d4f;
    --shadow: 0 6px 16px rgba(0, 0, 0, 0.08);
    --soft-shadow: 0 1px 2px rgba(0, 0, 0, 0.03), 0 3px 6px -4px rgba(0, 0, 0, 0.12), 0 6px 16px rgba(0, 0, 0, 0.08);
    font-family: Arial, Tahoma, sans-serif;
}

body.theme-antd .sidebar {
    background: #001529;
    box-shadow: none;
}

body.theme-antd .brand-mark {
    border-radius: 8px;
    background: #1677ff;
    box-shadow: none;
}

body.theme-antd nav a {
    border-radius: 6px;
    color: rgba(255, 255, 255, 0.75);
}

body.theme-antd nav a.active,
body.theme-antd nav a:hover {
    background: #1677ff;
    color: #fff;
}

body.theme-antd .main {
    padding: 28px 32px;
}

body.theme-antd h1 {
    font-size: 28px;
    font-weight: 700;
}

body.theme-antd .eyebrow {
    color: #1677ff;
}

body.theme-antd .metric,
body.theme-antd .panel,
body.theme-antd .form-panel,
body.theme-antd .table-wrap,
body.theme-antd .master-list {
    border-color: #f0f0f0;
    border-radius: 8px;
    box-shadow: var(--soft-shadow);
}

body.theme-antd .lead-card {
    border-radius: 8px;
}

body.theme-antd .form-section {
    padding: 24px;
}

body.theme-antd .section-title span {
    border-radius: 50%;
    background: #e6f4ff;
    color: #0958d9;
}

body.theme-antd input,
body.theme-antd select,
body.theme-antd textarea {
    min-height: 40px;
    border-color: #d9d9d9;
    border-radius: 6px;
    background: #fff;
}

body.theme-antd input:hover,
body.theme-antd select:hover,
body.theme-antd textarea:hover {
    border-color: #4096ff;
}

body.theme-antd input:focus,
body.theme-antd select:focus,
body.theme-antd textarea:focus {
    border-color: #1677ff;
    box-shadow: 0 0 0 2px rgba(5, 145, 255, 0.12);
}

body.theme-antd .button {
    min-height: 38px;
    border-radius: 6px;
    box-shadow: 0 2px 0 rgba(0, 0, 0, 0.02);
}

body.theme-antd .button:hover {
    border-color: #4096ff;
    color: #1677ff;
    transform: none;
}

body.theme-antd .button.primary {
    border-color: #1677ff;
    background: #1677ff;
    color: #fff;
}

body.theme-antd .button.primary:hover {
    border-color: #4096ff;
    background: #4096ff;
    color: #fff;
}

body.theme-antd .button.danger {
    border-color: #ffccc7;
    background: #fff2f0;
    color: #cf1322;
}

body.theme-antd .tabs {
    padding: 3px;
    border-radius: 8px;
    background: #fff;
}

body.theme-antd .tabs a {
    border-radius: 6px;
}

body.theme-antd .tabs a.active {
    border-color: #1677ff;
    background: #e6f4ff;
    color: #0958d9;
}

body.theme-antd .master-list-head,
body.theme-antd th {
    background: #fafafa;
    color: #595959;
}

body.theme-antd tbody tr:hover,
body.theme-antd .master-row:hover {
    background: #f5faff;
}

body.theme-antd .form-actions {
    background: #fafafa;
}

body.theme-antd .pill {
    background: #e6f4ff;
    color: #0958d9;
}

body.theme-antd .alert.success {
    background: #f6ffed;
    color: #389e0d;
}

body.theme-antd .alert.info {
    background: #e6f4ff;
    color: #0958d9;
}

body.theme-aqua {
    --bg: #eef7ff;
    --surface: rgba(255, 255, 255, 0.82);
    --surface-soft: rgba(246, 251, 255, 0.88);
    --ink: #12345f;
    --muted: #6f8096;
    --line: rgba(184, 216, 244, 0.74);
    --primary: #1588df;
    --primary-dark: #0d67bd;
    --accent: #1d7fc0;
    --success: #12905f;
    --danger: #d14343;
    --shadow: 0 20px 50px rgba(70, 136, 198, 0.20);
    --soft-shadow: 0 12px 28px rgba(91, 147, 196, 0.16);
    min-height: 100vh;
    background:
        radial-gradient(circle at 92% 12%, rgba(89, 180, 239, 0.20), transparent 22%),
        radial-gradient(circle at 3% 88%, rgba(89, 180, 239, 0.18), transparent 18%),
        linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(227, 244, 255, 0.82) 46%, rgba(255, 255, 255, 0.94)),
        repeating-linear-gradient(112deg, rgba(40, 147, 218, 0.05) 0 2px, transparent 2px 70px);
    color: var(--ink);
}

body.theme-aqua::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background:
        radial-gradient(circle at 34% 8%, rgba(255, 255, 255, 0.86) 0 22px, transparent 23px),
        radial-gradient(circle at 74% 13%, rgba(255, 255, 255, 0.74) 0 11px, transparent 12px),
        linear-gradient(160deg, transparent 0 18%, rgba(126, 199, 242, 0.15) 18.5%, transparent 24%),
        linear-gradient(18deg, transparent 0 58%, rgba(126, 199, 242, 0.14) 58.5%, transparent 66%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.40), transparent 44%);
}

body.theme-aqua .dashboard-shell {
    position: relative;
}

body.theme-aqua .dashboard-shell::before {
    content: "";
    position: absolute;
    top: -26px;
    right: 4%;
    width: 430px;
    height: 130px;
    z-index: -1;
    opacity: 0.55;
    background:
        radial-gradient(circle at 8% 52%, rgba(75, 170, 232, 0.28) 0 7px, transparent 8px),
        radial-gradient(circle at 74% 35%, rgba(75, 170, 232, 0.22) 0 5px, transparent 6px),
        linear-gradient(172deg, transparent 0 36%, rgba(68, 169, 230, 0.24) 37%, transparent 42%),
        linear-gradient(176deg, transparent 0 52%, rgba(68, 169, 230, 0.18) 53%, transparent 58%);
    border-radius: 999px;
}

body.theme-aqua .sidebar {
    border-right: 1px solid rgba(255, 255, 255, 0.76);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.80), rgba(216, 239, 255, 0.72)),
        linear-gradient(135deg, rgba(30, 144, 223, 0.13), transparent 54%);
    color: #173968;
    box-shadow: 10px 0 30px rgba(91, 147, 196, 0.14);
    backdrop-filter: blur(18px);
}

body.theme-aqua .brand-mark {
    border: 1px solid rgba(255, 255, 255, 0.38);
    background: linear-gradient(145deg, #1aa7f2, #126ad6);
    color: #fff;
    box-shadow: 0 10px 24px rgba(12, 100, 193, 0.35);
}

body.theme-aqua nav a {
    color: #23486c;
    font-weight: 600;
}

body.theme-aqua nav a.active,
body.theme-aqua nav a:hover {
    background: rgba(255, 255, 255, 0.78);
    color: #0b6fc9;
    box-shadow: 0 8px 18px rgba(70, 136, 198, 0.12);
}

body.theme-aqua .nav-title,
body.theme-aqua .brand small,
body.theme-aqua .user-box span {
    color: #6f8096;
}

body.theme-aqua .user-box {
    border-top-color: rgba(80, 147, 202, 0.20);
}

body.theme-aqua .user-box a {
    color: #0b6fc9;
}

body.theme-aqua .page-head {
    align-items: flex-end;
}

body.theme-aqua .eyebrow {
    color: #5f6d82;
}

body.theme-aqua h1 {
    color: #173968;
    font-size: 34px;
    font-weight: 800;
    letter-spacing: 0;
}

body.theme-aqua .dashboard-head {
    margin-bottom: 28px;
}

body.theme-aqua .dashboard-head .eyebrow {
    margin-bottom: 4px;
    color: #5e6878;
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
}

body.theme-aqua .dashboard-add {
    min-height: 48px;
    padding: 0 22px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.78);
    color: #1580cd;
    font-size: 16px;
    box-shadow: 0 12px 28px rgba(61, 132, 190, 0.20), inset 0 1px 0 rgba(255,255,255,0.9);
}

body.theme-aqua .metric {
    position: relative;
    overflow: hidden;
    min-height: 120px;
    border: 0;
    border-radius: 16px;
    background: linear-gradient(120deg, #0c7de7 0%, #43c6ee 100%);
    color: #fff;
    box-shadow: 0 18px 36px rgba(25, 133, 221, 0.28);
}

body.theme-aqua .aqua-metrics {
    grid-template-columns: repeat(4, minmax(220px, 1fr));
    gap: 28px;
    margin-bottom: 28px;
}

body.theme-aqua .aqua-card {
    min-height: 118px;
    padding: 22px 28px;
    border-radius: 18px;
}

body.theme-aqua .metric::after {
    content: "";
    position: absolute;
    right: -4px;
    top: -10px;
    width: 142px;
    height: 142px;
    border: 20px solid rgba(255, 255, 255, 0.48);
    border-radius: 50%;
    box-shadow: inset 0 0 24px rgba(255,255,255,0.65), 0 10px 22px rgba(11, 105, 197, 0.18);
}

body.theme-aqua .aqua-card i {
    position: absolute;
    right: 42px;
    top: 32px;
    z-index: 2;
    display: grid;
    place-items: center;
    width: 62px;
    height: 62px;
    border-radius: 50%;
    background: linear-gradient(145deg, #f6fdff, #d3efff);
    color: #168be1;
    font-style: normal;
    font-size: 30px;
    font-weight: 700;
    box-shadow: 0 12px 28px rgba(8, 100, 190, 0.28);
}

body.theme-aqua .metric span,
body.theme-aqua .metric strong {
    position: relative;
    z-index: 1;
    color: #fff;
}

body.theme-aqua .metric strong {
    font-size: 42px;
    text-shadow: 0 4px 14px rgba(0, 75, 145, 0.28);
}

body.theme-aqua .metric span {
    font-size: 19px;
    font-weight: 400;
}

body.theme-aqua .panel,
body.theme-aqua .form-panel,
body.theme-aqua .table-wrap,
body.theme-aqua .master-list,
body.theme-aqua .setup-card {
    border-color: rgba(255, 255, 255, 0.78);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.74);
    box-shadow: var(--soft-shadow);
    backdrop-filter: blur(16px);
}

body.theme-aqua .dashboard-panels {
    gap: 26px;
    margin-bottom: 26px;
}

body.theme-aqua .aqua-panel {
    min-height: 330px;
    padding: 26px 30px;
    border-radius: 20px;
}

body.theme-aqua .aqua-panel h2 {
    margin-bottom: 22px;
    color: #111827;
    font-size: 22px;
    font-weight: 700;
}

body.theme-aqua .lead-card {
    border-radius: 20px;
}

body.theme-aqua .form-section {
    border-color: rgba(184, 216, 244, 0.58);
}

body.theme-aqua .section-title span {
    border: 1px solid rgba(255, 255, 255, 0.85);
    background: linear-gradient(145deg, #dff4ff, #f8fdff);
    color: #0876cc;
    box-shadow: 0 10px 20px rgba(25, 137, 222, 0.16);
}

body.theme-aqua input,
body.theme-aqua select,
body.theme-aqua textarea {
    border-color: rgba(180, 211, 239, 0.92);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.90);
    color: #1f3552;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.65);
}

body.theme-aqua input:hover,
body.theme-aqua select:hover,
body.theme-aqua textarea:hover {
    border-color: #86c8f3;
}

body.theme-aqua input:focus,
body.theme-aqua select:focus,
body.theme-aqua textarea:focus {
    border-color: #1688df;
    box-shadow: 0 0 0 4px rgba(22, 136, 223, 0.14);
}

body.theme-aqua .button {
    border-color: rgba(184, 216, 244, 0.90);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.78);
    color: #1267ad;
    box-shadow: 0 10px 20px rgba(68, 132, 191, 0.12);
}

body.theme-aqua .button.primary {
    border-color: #188be3;
    background: linear-gradient(135deg, #0c7de7, #32b7eb);
    color: #fff;
    box-shadow: 0 14px 26px rgba(24, 139, 227, 0.32);
}

body.theme-aqua .button.primary:hover {
    background: linear-gradient(135deg, #0b69ca, #1ea7df);
}

body.theme-aqua .button.danger {
    border-color: rgba(255, 190, 190, 0.92);
    background: rgba(255, 245, 245, 0.86);
    color: #c93434;
}

body.theme-aqua .tabs {
    border-color: rgba(255, 255, 255, 0.76);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.70);
    backdrop-filter: blur(14px);
}

body.theme-aqua .tabs a {
    border-radius: 12px;
    color: #224567;
}

body.theme-aqua .tabs a.active {
    border-color: rgba(25, 139, 227, 0.55);
    background: rgba(220, 244, 255, 0.92);
    color: #0b6fc9;
}

body.theme-aqua .master-list-head,
body.theme-aqua th {
    background: rgba(244, 250, 255, 0.82);
    color: #61758e;
}

body.theme-aqua tbody tr:hover,
body.theme-aqua .master-row:hover,
body.theme-aqua .status-list div,
body.theme-aqua .follow-list a {
    background: rgba(255, 255, 255, 0.82);
}

body.theme-aqua .aqua-list {
    gap: 16px;
}

body.theme-aqua .aqua-list div,
body.theme-aqua .aqua-list a {
    min-height: 58px;
    padding: 13px 20px;
    border-radius: 14px;
}

body.theme-aqua .aqua-list span,
body.theme-aqua .aqua-list strong {
    font-size: 17px;
}

body.theme-aqua .aqua-list strong {
    color: #1b7fc2;
    font-weight: 700;
}

body.theme-aqua .status-list div,
body.theme-aqua .follow-list a {
    border-color: rgba(255, 255, 255, 0.86);
    border-radius: 14px;
    box-shadow: 0 8px 20px rgba(91, 147, 196, 0.10);
}

body.theme-aqua .form-actions {
    border-color: rgba(184, 216, 244, 0.58);
    background: rgba(246, 251, 255, 0.82);
}

body.theme-aqua .pill {
    background: rgba(220, 244, 255, 0.95);
    color: #0a72ca;
}

body.theme-aqua .data-tools {
    border-bottom-color: rgba(184, 216, 244, 0.58);
    background: rgba(246, 251, 255, 0.56);
}

body.theme-aqua .data-search input,
body.theme-aqua .data-page-size select {
    border-color: rgba(174, 211, 239, 0.9);
    background: rgba(255, 255, 255, 0.92);
}

body.theme-aqua .data-empty {
    color: #6f8096;
}

body.theme-aqua .alert.success {
    background: rgba(236, 253, 245, 0.86);
    color: #087443;
}

body.theme-aqua .alert.info {
    background: rgba(230, 244, 255, 0.88);
    color: #0b6fc9;
}

@media (max-width: 980px) {
    .sidebar {
        position: static;
        width: auto;
    }

    .user-box {
        position: static;
        margin-top: 22px;
    }

    .main {
        margin-left: 0;
        padding: 20px;
    }

    .metric-grid,
    .grid.two,
    .detail-grid,
    .form-grid,
    .lead-form-grid,
    .filters {
        grid-template-columns: 1fr;
    }

    .grid.two.master-grid {
        grid-template-columns: 1fr;
    }

    .users-grid {
        grid-template-columns: 1fr;
    }

    .import-grid,
    .template-table {
        grid-template-columns: 1fr;
    }

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

    body.theme-aqua .page-head {
        align-items: flex-start;
    }
}

@media (max-width: 760px) {
    body {
        font-size: 14px;
    }

    .sidebar {
        padding: 16px;
        border-bottom: 1px solid rgba(184, 216, 244, 0.65);
    }

    .brand {
        margin-bottom: 16px;
    }

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

    .sidebar nav a,
    .nav-title {
        margin: 0;
    }

    .nav-title {
        grid-column: 1 / -1;
    }

    .main {
        padding: 16px 12px 28px;
    }

    .page-head h1 {
        font-size: 28px;
        line-height: 1.18;
    }

    .metric-grid {
        grid-template-columns: 1fr;
    }

    .panel,
    .form-panel {
        padding: 16px;
    }

    .table-wrap {
        border-radius: 14px;
        overflow-x: auto;
    }

    table {
        min-width: 920px;
    }

    .master-list {
        overflow-x: auto;
    }

    .master-list-head,
    .master-row {
        min-width: 720px;
    }

    .users-list .master-list-head,
    .users-list .master-row {
        min-width: 1080px;
    }

    .form-actions {
        flex-wrap: wrap;
        justify-content: stretch;
        padding: 14px 16px;
    }

    .form-actions .button,
    .form-actions button {
        flex: 1 1 auto;
    }
}

@media (max-width: 1180px) {
    html,
    body {
        max-width: 100%;
        overflow-x: hidden;
    }

    body.nav-open {
        overflow: hidden;
    }

    .menu-toggle {
        position: fixed;
        top: 14px;
        left: 14px;
        z-index: 1200;
        display: inline-flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 5px;
        width: 48px;
        height: 48px;
        padding: 0;
        border: 1px solid rgba(145, 199, 239, 0.72);
        border-radius: 15px;
        background: rgba(255, 255, 255, 0.92);
        box-shadow: 0 14px 30px rgba(24, 105, 180, 0.18);
    }

    .menu-toggle span {
        display: block;
        width: 22px;
        height: 2px;
        margin: 0;
        border-radius: 999px;
        background: #176bb4;
        transition: transform 0.2s ease, opacity 0.2s ease;
    }

    body.nav-open .menu-toggle span:nth-child(1) {
        transform: translateY(7px) rotate(45deg);
    }

    body.nav-open .menu-toggle span:nth-child(2) {
        opacity: 0;
    }

    body.nav-open .menu-toggle span:nth-child(3) {
        transform: translateY(-7px) rotate(-45deg);
    }

    .sidebar-backdrop {
        position: fixed;
        inset: 0;
        z-index: 1050;
        display: block;
        background: rgba(15, 42, 72, 0.34);
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.2s ease;
    }

    body.nav-open .sidebar-backdrop {
        opacity: 1;
        pointer-events: auto;
    }

    .sidebar,
    body.theme-aqua .sidebar,
    body.theme-classic .sidebar,
    body.theme-executive .sidebar,
    body.theme-tailwind .sidebar,
    body.theme-antd .sidebar {
        position: fixed;
        inset: 0 auto 0 0;
        z-index: 1100;
        width: min(320px, 86vw);
        height: 100vh;
        padding: 24px 22px;
        overflow-y: auto;
        border-right: 1px solid rgba(184, 216, 244, 0.72);
        border-bottom: 0;
        transform: translateX(-110%);
        transition: transform 0.22s ease;
    }

    body.nav-open .sidebar {
        transform: translateX(0);
    }

    .brand {
        margin-bottom: 24px;
    }

    .sidebar nav {
        display: grid;
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .sidebar nav a,
    .nav-title {
        margin: 0;
    }

    .nav-title {
        grid-column: auto;
    }

    .user-box {
        position: static;
        margin-top: 28px;
    }

    .main,
    body.theme-antd .main {
        width: 100%;
        max-width: 100vw;
        margin-left: 0;
        padding: 82px 18px 30px;
    }

    .dashboard-shell,
    body.theme-aqua .dashboard-shell {
        width: 100%;
        max-width: 100%;
        overflow-x: hidden;
    }

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

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

    body.theme-aqua .aqua-metrics {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 18px;
    }

    body.theme-aqua .aqua-card {
        min-width: 0;
    }

    .grid.two,
    .grid.two.master-grid,
    .dashboard-panels,
    .detail-grid,
    .form-grid,
    .lead-form-grid,
    .filters,
    .users-grid,
    .import-grid,
    .template-table {
        grid-template-columns: 1fr;
    }

    .table-wrap,
    .master-list {
        max-width: 100%;
        overflow-x: auto;
    }

    .data-tools {
        grid-template-columns: 1fr 1fr;
    }

    .data-search {
        grid-column: 1 / -1;
    }

    .data-search input {
        width: 100%;
        min-width: 0;
    }

    .data-summary {
        justify-self: start;
    }

    .data-pager {
        justify-self: end;
    }

    table {
        min-width: 920px;
    }
}

@media (max-width: 760px) {
    .main,
    body.theme-antd .main {
        padding: 76px 12px 24px;
    }

    .menu-toggle {
        top: 12px;
        left: 12px;
        width: 44px;
        height: 44px;
        border-radius: 14px;
    }

    .metric-grid {
        grid-template-columns: 1fr;
    }

    body.theme-aqua .aqua-metrics {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    body.theme-aqua .aqua-card {
        min-height: 108px;
        padding: 18px 20px;
    }

    body.theme-aqua .aqua-card i {
        right: 24px;
        top: 25px;
        width: 54px;
        height: 54px;
        font-size: 25px;
    }

    .page-head h1 {
        font-size: 28px;
    }

    .panel,
    .form-panel {
        padding: 16px;
    }

    .data-tools {
        grid-template-columns: 1fr;
        gap: 10px;
        padding: 12px;
    }

    .data-page-size,
    .data-pager {
        justify-content: space-between;
        width: 100%;
    }

    .data-summary,
    .data-pager {
        justify-self: stretch;
    }
}
