@import url("https://fonts.googleapis.com/css2?family=Kantumruy+Pro:wght@400;500;600;700;800;900&display=swap");

:root {
    color-scheme: light;
    --bg: #f5f8fc;
    --bg-2: #eef4fb;
    --surface: rgba(255, 255, 255, 0.94);
    --surface-soft: #f7faff;
    --text: #0f172a;
    --muted: #667085;
    --line: #d9e4f1;
    --accent: #14b8a6;
    --accent-2: #3b82f6;
    --accent-3: #f59e0b;
    --danger: #ef4444;
    --radius: 16px;
    --shadow: 0 12px 28px rgba(15, 23, 42, 0.06);
    --blur: blur(14px);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body {
    margin: 0;
    min-height: 100vh;
    overflow-x: hidden;
    color: var(--text);
    font-family: "Kantumruy Pro", "Khmer OS Battambang", "Khmer OS Siemreap", "Khmer OS", "Leelawadee UI", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    background:
        radial-gradient(circle at top right, rgba(59, 130, 246, 0.08), transparent 38%),
        radial-gradient(circle at bottom left, rgba(20, 184, 166, 0.08), transparent 36%),
        linear-gradient(180deg, var(--bg), var(--bg-2));
    background-attachment: fixed;
}

a {
    color: inherit;
    text-decoration: none;
}

button,
.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 0 18px;
    border: 1px solid transparent;
    border-radius: 12px;
    background: linear-gradient(135deg, #19b8aa, #0f9488);
    color: #fff;
    font: inherit;
    font-weight: 700;
    line-height: 1.2;
    text-align: center;
    white-space: normal;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
    box-shadow: 0 10px 24px rgba(20, 184, 166, 0.16);
}

.button:hover,
button:hover {
    transform: translateY(-1px);
}

.menu-button {
    display: none;
}

.button-secondary {
    background: var(--surface);
    border-color: var(--line);
    color: var(--text);
    box-shadow: none;
}

.button-danger {
    background: linear-gradient(135deg, var(--danger), #b91c1c);
}

.icon-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    min-height: 38px;
    padding: 0;
    border-radius: 10px;
    background: var(--surface-soft);
    border: 1px solid var(--line);
    color: var(--text);
    box-shadow: none;
    font-size: 22px;
    line-height: 1;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 20;
    display: flex;
    align-items: center;
    gap: 16px;
    min-height: 68px;
    padding: 0 24px;
    backdrop-filter: var(--blur);
    background: rgba(255, 255, 255, 0.88);
    border-bottom: 1px solid var(--line);
}

.brand {
    font-size: 20px;
    font-weight: 800;
    letter-spacing: 0.02em;
}

.global-search {
    display: grid;
    grid-template-columns: minmax(180px, 460px) auto;
    justify-content: center;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.global-search input {
    min-height: 40px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.98);
}

.global-search button {
    min-height: 40px;
    border-radius: 999px;
    box-shadow: none;
}

.site-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    justify-content: flex-end;
    margin-left: auto;
}

.header-user {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--surface);
}

.header-user strong,
.header-user span {
    display: block;
    line-height: 1.2;
}

.header-user strong {
    font-size: 14px;
}

.header-user span {
    color: var(--muted);
    font-size: 12px;
}

.page {
    width: min(1320px, calc(100% - 32px));
    margin: 22px auto;
}

.page-dashboard {
    width: 100%;
    margin: 0;
    padding: 0;
    height: calc(100vh - 68px);
    overflow: hidden;
}

.page-auth,
.page-error {
    min-height: calc(100vh - 68px - 22px);
}

.page-auth {
    display: grid;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 100vh;
    margin: 0;
    padding: 28px;
}

.panel {
    background: var(--surface);
    backdrop-filter: var(--blur);
    -webkit-backdrop-filter: var(--blur);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.eyebrow {
    margin: 0 0 10px;
    color: var(--accent);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

h1,
h2,
p {
    margin-top: 0;
}

h1 {
    margin-bottom: 10px;
    font-size: clamp(30px, 3vw, 42px);
    line-height: 1.05;
}

h2 {
    font-size: 22px;
    margin-bottom: 0;
}

p {
    color: var(--muted);
    line-height: 1.6;
}

.panel-subtitle {
    margin: 0;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.55;
}

.auth-body {
    background: #eef7fd;
}

.auth-shell {
    display: grid;
    width: min(100%, 960px);
    grid-template-columns: minmax(360px, 1.08fr) minmax(340px, 0.92fr);
    gap: 0;
    justify-content: center;
    align-items: stretch;
    border: 1px solid #d5e1ec;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 26px 70px rgba(24, 58, 94, 0.12);
    overflow: hidden;
}

.auth-visual-panel {
    position: relative;
    display: block;
    min-height: 520px;
    border: 0;
    border-radius: 0;
    background: #dcecf7;
    box-shadow: none;
    overflow: hidden;
}

.auth-visual-panel img {
    display: block;
    width: 100%;
    height: 100%;
    min-height: inherit;
    object-fit: cover;
}

.auth-image-caption {
    position: absolute;
    left: 22px;
    right: 22px;
    bottom: 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    min-height: 46px;
    padding: 0 16px;
    border-radius: 8px;
    color: #fff;
    background: rgba(11, 92, 154, 0.86);
    box-shadow: 0 14px 34px rgba(15, 23, 42, 0.16);
}

.auth-image-caption span,
.auth-image-caption strong {
    font-size: 13px;
    line-height: 1.2;
}

.auth-image-caption span {
    font-weight: 700;
}

.auth-image-caption strong {
    font-weight: 900;
}

.auth-card {
    display: grid;
    align-content: center;
    min-height: 520px;
    padding: 52px 48px;
    border: 0;
    border-radius: 0;
    background: #fff;
    box-shadow: none;
}

.auth-card-header {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 14px;
    margin-bottom: 20px;
}

.auth-card-header h2 {
    margin: 0;
    font-size: 24px;
    line-height: 1.1;
}

.auth-card h1 {
    max-width: 270px;
    margin-bottom: 0;
    font-size: 32px;
    line-height: 1.05;
}

.auth-card .panel-subtitle {
    display: none;
}

.auth-lock-icon {
    display: inline-grid;
    place-items: center;
    width: 46px;
    height: 46px;
    flex: 0 0 auto;
    border: 0;
    border-radius: 10px;
    color: #fff;
    background: #0875bd;
    box-shadow: 0 12px 24px rgba(8, 117, 189, 0.22);
}

.auth-lock-icon svg {
    width: 21px;
    height: 21px;
}

.auth-form {
    display: grid;
    gap: 14px;
    margin-top: 14px;
}

.field {
    display: grid;
    gap: 8px;
}

label {
    font-size: 13px;
    font-weight: 900;
    color: #1d3557;
}

input {
    width: 100%;
    min-height: 42px;
    padding: 0 15px;
    border: 1px solid #c8d8e9;
    border-radius: 8px;
    color: var(--text);
    background: #edf5ff;
    font: inherit;
}

input::placeholder {
    color: var(--muted);
}

input:focus {
    outline: none;
    border-color: #0875bd;
    box-shadow: 0 0 0 3px rgba(8, 117, 189, 0.14);
}

select {
    width: 100%;
    min-height: 48px;
    padding: 0 14px;
    border: 1px solid var(--line);
    border-radius: 12px;
    color: var(--text);
    background: var(--surface);
    font: inherit;
}

select:focus {
    outline: none;
    border-color: rgba(20, 184, 166, 0.65);
    box-shadow: 0 0 0 3px rgba(20, 184, 166, 0.16);
}

.field-note {
    color: var(--muted);
    font-size: 12px;
    line-height: 1.4;
}

.auth-submit {
    width: 100%;
    min-height: 48px;
    margin-top: 14px;
    border-radius: 8px;
    background: #0875bd;
    box-shadow: 0 14px 26px rgba(8, 117, 189, 0.2);
}

.mfa-setup-box {
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
    justify-items: center;
    margin-top: 18px;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: #f8fbff;
    text-align: center;
}

.mfa-setup-box img {
    width: min(270px, 100%);
    height: auto;
    aspect-ratio: 1;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    image-rendering: pixelated;
}

.mfa-setup-box h2 {
    margin: 0 0 12px;
    font-size: 16px;
}

.mfa-setup-box p {
    margin: 0 0 10px;
    font-size: 13px;
}

.mfa-setup-box code {
    display: block;
    overflow-wrap: anywhere;
    padding: 8px 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
    color: var(--text);
    background: var(--surface);
    font-size: 13px;
}

.mfa-qr-panel,
.mfa-manual-panel {
    width: 100%;
}

.mfa-manual-panel .field-note {
    display: block;
    margin-top: 8px;
}

.auth-links {
    display: flex;
    justify-content: center;
    margin-top: 16px;
    color: var(--accent);
    font-size: 14px;
    font-weight: 800;
}

.auth-links a:hover {
    text-decoration: underline;
}

.auth-hint,
.alert-box,
.sidebar-note,
.feature-item {
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--surface-soft);
}

.alert-box {
    padding: 12px 14px;
    margin-top: 18px;
    color: #fecaca;
    border-color: rgba(239, 68, 68, 0.28);
    background: rgba(239, 68, 68, 0.08);
}

.alert-success {
    color: #064e3b;
    border-color: rgba(15, 159, 143, 0.22);
    background: rgba(15, 159, 143, 0.08);
}

.auth-hint {
    margin-top: 18px;
    padding: 14px;
}

.auth-aside {
    display: grid;
    align-content: start;
    gap: 18px;
}

.auth-image-panel {
    min-height: 420px;
    padding: 0;
    overflow: hidden;
}

.auth-image-panel img {
    display: block;
    width: 100%;
    height: 100%;
    min-height: inherit;
    object-fit: cover;
}

.feature-list {
    display: grid;
    gap: 12px;
}

.feature-item {
    padding: 14px;
}

.feature-item strong {
    display: block;
    margin-bottom: 6px;
    color: var(--text);
}

.feature-item span {
    color: var(--muted);
    font-size: 14px;
    line-height: 1.55;
}

.app-shell {
    display: grid;
    grid-template-columns: minmax(248px, 268px) minmax(0, 1fr);
    gap: 18px;
    align-items: stretch;
    height: 100%;
    overflow: hidden;
}

.app-sidebar {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 16px;
    min-width: 0;
    min-height: 100%;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.sidebar-backdrop {
    display: none;
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--line);
}

.sidebar-close-button {
    display: none;
    margin-left: auto;
}

.avatar {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--accent), #0f766e);
    color: #fff;
    font-weight: 800;
}

.avatar-sm {
    width: 34px;
    height: 34px;
    border-radius: 12px;
    font-size: 14px;
}

.sidebar-avatar {
    width: 44px;
    height: 44px;
    border-radius: 16px;
    background: linear-gradient(135deg, #0f766e, #0891b2);
    color: #fff;
    font-size: 20px;
    font-weight: 900;
    letter-spacing: 0;
    box-shadow: 0 10px 24px rgba(8, 145, 178, 0.24);
}

.sidebar-brand-copy {
    min-width: 0;
}

.sidebar-brand strong,
.sidebar-brand span {
    display: block;
    line-height: 1.2;
}

.sidebar-brand strong {
    color: var(--text);
    font-size: 16px;
    font-weight: 800;
}

.sidebar-brand span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 600;
}

.sidebar-nav {
    display: grid;
    gap: 6px;
}

.sidebar-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 42px;
    padding: 9px 11px;
    min-width: 0;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #f9fbfe;
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
    transition: color 0.18s ease, border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

.sidebar-link:hover {
    color: var(--text);
    border-color: var(--line);
    background: var(--surface);
    box-shadow: 0 6px 16px rgba(15, 23, 42, 0.04);
}

.sidebar-link-main {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.sidebar-link-icon {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 10px;
    color: #64748b;
    background: #f1f6fb;
}

.sidebar-link-icon svg {
    width: 17px;
    height: 17px;
}

.sidebar-link-label {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sidebar-link.active {
    border-color: rgba(20, 184, 166, 0.24);
    background: #ecfbf8;
    color: #0f766e;
    box-shadow: 0 8px 18px rgba(20, 184, 166, 0.06);
}

.sidebar-link.active .sidebar-link-icon {
    color: #0f766e;
    background: #dff7f2;
}

.sidebar-badge {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 22px;
    min-width: 44px;
    padding: 3px 8px;
    border-radius: 999px;
    background: #f1f6fb;
    color: #475467;
    font-size: 10px;
    font-weight: 800;
    line-height: 1;
    white-space: nowrap;
    border: 1px solid transparent;
}

.sidebar-link.active .sidebar-badge {
    color: #0f766e;
    background: #dff7f2;
    border-color: rgba(20, 184, 166, 0.14);
}

.sidebar-note {
    padding: 12px;
    color: var(--text);
    font-size: 12px;
    line-height: 1.35;
    margin-top: auto;
}

.workspace {
    display: grid;
    align-content: start;
    gap: 16px;
    min-width: 0;
    min-height: 0;
    overflow-y: auto;
    padding: 16px 16px 16px 0;
}

.report-workspace {
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.workspace-topbar {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    padding: 24px 26px;
    align-self: start;
}

.workspace-topbar h1 {
    font-size: clamp(32px, 3vw, 44px);
}

.pajay-hero {
    min-height: auto;
}

.workspace-copy {
    max-width: 60ch;
}

.workspace-meta {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 10px;
}

.meta-pill {
    padding: 10px 14px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--surface-soft);
    color: var(--text);
    font-size: 13px;
    font-weight: 600;
}

.stat-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}

.stat-card {
    padding: 18px;
    border-radius: var(--radius);
    border: 1px solid var(--line);
    background: var(--surface);
}

.stat-card span {
    display: block;
    margin-bottom: 14px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.stat-card strong {
    display: block;
    color: var(--text);
    font-size: 30px;
    line-height: 1;
    font-weight: 800;
}

.stat-card a {
    display: block;
    margin-top: 12px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 600;
    line-height: 1.35;
}

.accent-teal {
    border-top: 3px solid var(--accent);
}

.accent-blue {
    border-top: 3px solid var(--accent-2);
}

.accent-amber {
    border-top: 3px solid var(--accent-3);
}

.dashboard-grid {
    display: grid;
    grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
    gap: 16px;
}

.dashboard-grid-single {
    grid-template-columns: 1fr;
}

.dashboard-hero {
    align-items: center;
}

.dashboard-actions {
    align-items: stretch;
}

.dashboard-actions .button {
    flex: 1 1 160px;
}

.dashboard-table-wrap .data-table {
    min-width: 480px;
}

.dashboard-donate-lists {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.mini-list {
    display: grid;
    gap: 8px;
    min-width: 0;
}

.mini-list-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 34px;
}

.mini-list-heading strong {
    color: var(--text);
    font-size: 14px;
    font-weight: 800;
}

.mini-list-heading a {
    color: var(--accent);
    font-size: 12px;
    font-weight: 800;
}

.mini-list-row {
    display: grid;
    gap: 4px;
    min-height: 54px;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--surface-soft);
}

.mini-list-row span,
.mini-list-row small {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.mini-list-row span {
    color: var(--text);
    font-size: 14px;
    font-weight: 800;
}

.mini-list-row small {
    color: var(--muted);
    font-size: 12px;
    font-weight: 600;
}

.section-heading {
    margin-bottom: 18px;
}

.dashboard-grid>.panel,
#pajay-data {
    padding: 22px;
}

.pajay-controls,
.add-card {
    padding: 18px 22px;
}

.pajay-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.search-form {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) auto auto;
    gap: 10px;
    align-items: center;
    flex: 1 1 0;
    min-width: 0;
}

.pajay-form {
    margin-top: 16px;
}

.pajay-form .modal-body {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(160px, 1fr)) auto;
    gap: 12px;
    align-items: end;
}

.form-action button {
    width: 100%;
}

.pajay-controls .action-row {
    margin-left: auto;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.table-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 14px;
}

.result-note {
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
}

.table-meta {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px 14px;
    text-align: right;
}

.table-meta .result-note strong {
    color: var(--text);
}

.table-form {
    margin: 0;
}

.modal {
    position: fixed;
    inset: 0;
    z-index: 60;
    display: grid;
    place-items: center;
    padding: 18px;
}

.modal[hidden] {
    display: none;
}

.modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.46);
    backdrop-filter: blur(6px);
}

.modal-dialog {
    position: relative;
    z-index: 1;
    width: min(100%, 520px);
    padding: 22px;
}

.modal-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--line);
}

.modal-body {
    display: grid;
    gap: 14px;
    padding-top: 18px;
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid var(--line);
}

.action-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.action-row .button,
.action-row button {
    white-space: nowrap;
}

.month-button-row {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 10px;
}

.month-button {
    width: 100%;
}

.month-button.active {
    border-color: rgba(15, 159, 143, 0.42);
    background: rgba(20, 184, 166, 0.15);
    color: var(--accent);
}

.tabs-container {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
    padding: 12px 0;
}

.tab-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 32px;
    padding: 0 16px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    color: var(--text);
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
}

.tab-button:hover {
    border-color: var(--accent);
    background: rgba(20, 184, 166, 0.08);
}

.tab-button.active {
    border-color: var(--accent);
    background: var(--accent);
    color: white;
    box-shadow: 0 4px 12px rgba(20, 184, 166, 0.2);
}

.year-tabs-panel {
    align-self: flex-start;
    width: auto;
    max-width: 100%;
    padding: 10px;
}

.year-tabs-panel .tabs-container {
    padding: 0;
}

.thomtean-workspace .workspace-topbar {
    padding: 18px 20px;
}

.thomtean-workspace .workspace-topbar h1 {
    font-size: 32px;
}

.thomtean-workspace .pajay-controls,
.thomtean-workspace #pajay-data {
    padding: 18px;
}

.thomtean-workspace .pajay-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.thomtean-workspace .search-form {
    flex: 1 1 0;
    grid-template-columns: minmax(0, 1fr) auto auto;
    min-width: 0;
}

.thomtean-workspace .month-filter-form {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 0 0 auto;
    min-width: 0;
}

.thomtean-workspace .month-filter-form select {
    width: 170px;
    min-height: 38px;
}

.thomtean-toolbar .button-secondary {
    white-space: nowrap;
}

.thomtean-workspace .data-table th,
.thomtean-workspace .data-table td {
    padding: 12px 14px;
}

.thomtean-workspace .data-table th {
    font-size: 11px;
}

.thomtean-workspace .status-pill {
    min-height: 26px;
    font-size: 12px;
}

.thomtean-workspace .table-action {
    min-height: 32px;
}

.table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-x;
    max-width: 100%;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--surface);
}

.table-wrap::-webkit-scrollbar {
    height: 8px;
}

.table-wrap::-webkit-scrollbar-thumb {
    border-radius: 999px;
    background: #cbd5e1;
}

.table-wrap::-webkit-scrollbar-track {
    background: transparent;
}

.scroller-sm {
    scrollbar-width: thin;
    scrollbar-color: #cbd5e1 transparent;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th,
.data-table td {
    padding: 14px 16px;
    border-bottom: 1px solid var(--line);
    text-align: left;
    vertical-align: middle;
    white-space: nowrap;
}

.data-table th {
    background: var(--surface-soft);
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.data-table tbody tr:hover td {
    background: rgba(20, 184, 166, 0.05);
}

.report-table th,
.report-table td {
    text-align: center;
    white-space: nowrap;
}

.report-table th:nth-child(1),
.report-table td:nth-child(1),
.report-table th:nth-child(2),
.report-table td:nth-child(2) {
    text-align: left;
}

.report-table th:nth-child(1),
.report-table td:nth-child(1) {
    width: 64px;
}

.report-table th:nth-child(2),
.report-table td:nth-child(2) {
    width: 220px;
    min-width: 220px;
}

.report-table th:nth-child(3),
.report-table td:nth-child(3) {
    width: 92px;
}

.report-table th:nth-child(4),
.report-table td:nth-child(4) {
    width: 180px;
    min-width: 180px;
}

.report-table th:nth-child(n + 5),
.report-table td:nth-child(n + 5) {
    width: 74px;
    min-width: 68px;
}

.report-table tfoot th {
    background: var(--surface-soft);
    color: var(--muted);
    border-top: 1px solid var(--line);
    border-bottom: 0;
    font-weight: 800;
}

.report-table tfoot th:first-child {
    border-bottom-left-radius: 12px;
}

.report-table tfoot th:last-child {
    border-bottom-right-radius: 12px;
}

.status-pill {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 0 10px;
    border: 1px solid #bfe9df;
    border-radius: 999px;
    background: rgba(20, 184, 166, 0.15);
    color: var(--accent);
    font-size: 13px;
    font-weight: 800;
}

.table-action {
    min-height: 34px;
    padding: 0 14px;
    border-radius: 10px;
    font-size: 13px;
}

.table-action-icon {
    width: 38px;
    height: 34px;
    min-width: 38px;
    min-height: 34px;
    padding: 0;
    border-radius: 10px;
}

.table-action-icon svg {
    width: 16px;
    height: 16px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.table-action-icon.button-danger {
    box-shadow: 0 8px 18px rgba(239, 68, 68, 0.14);
}

.empty-mini {
    padding: 24px 16px;
    text-align: center;
    color: var(--muted);
}

.empty-state {
    padding: 28px;
}

#pajay-data {
    scroll-margin-top: 18px;
}

.report-workspace #pajay-data {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 0;
}

.report-workspace .table-wrap {
    flex: 1 1 auto;
    min-height: 0;
    overflow: auto;
}

.report-workspace .report-table {
    min-width: max-content;
}

.report-table {
    table-layout: fixed;
}

.report-workspace .report-table thead th {
    position: sticky;
    top: 0;
    z-index: 2;
}

@media (max-width: 1100px) {

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

    .auth-shell {
        width: min(100%, 820px);
        grid-template-columns: minmax(320px, 1fr) minmax(320px, 0.9fr);
    }

    .auth-card,
    .auth-visual-panel {
        min-height: 500px;
    }

    .stat-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 760px) {
    /* Mobile shell */
    body.sidebar-open {
        overflow: hidden;
    }

    body {
        background: var(--bg);
    }

    .app-shell {
        display: block;
    }

    .page {
        width: 100%;
        margin: 0;
    }

    .page-auth {
        display: block;
    }

    .page-dashboard {
        height: auto;
        overflow: visible;
    }

    .page-auth,
    .page-error {
        min-height: auto;
    }

    /* Header */
    .site-header {
        grid-template-columns: auto minmax(0, 1fr) auto;
        min-height: 56px;
        padding: 8px 12px;
        gap: 10px;
        background: rgba(255, 255, 255, 0.96);
        -webkit-backdrop-filter: blur(18px);
        backdrop-filter: blur(18px);
    }

    .global-search {
        display: none;
    }

    .brand {
        font-size: 18px;
        justify-self: center;
    }

    .menu-button {
        display: inline-flex;
        width: 40px;
        height: 40px;
        min-height: 40px;
        font-size: 18px;
    }

    .header-user {
        display: none;
    }

    .site-actions {
        align-items: center;
        gap: 8px;
        flex-wrap: nowrap;
        justify-content: flex-end;
    }

    .site-actions .button-secondary {
        min-height: 38px;
        padding: 0 12px;
        font-size: 13px;
    }

    /* Sidebar */
    .sidebar-close-button {
        display: inline-flex;
        width: 36px;
        height: 36px;
        min-height: 36px;
        font-size: 18px;
    }

    .sidebar-nav {
        grid-template-columns: 1fr;
    }

    .app-sidebar {
        position: fixed;
        top: 56px;
        left: 0;
        z-index: 40;
        display: flex;
        flex-direction: column;
        gap: 10px;
        width: min(82vw, 288px);
        max-width: 288px;
        height: calc(100vh - 56px);
        min-height: unset;
        padding: 12px;
        background: rgba(255, 255, 255, 0.98);
        -webkit-backdrop-filter: blur(18px);
        backdrop-filter: blur(18px);
        transform: translateX(-105%);
        transition: transform 0.24s ease;
        border-radius: 0 16px 16px 0;
        box-shadow: 0 20px 36px rgba(15, 23, 42, 0.10);
        overflow-y: auto;
        overflow-x: hidden;
    }

    body.sidebar-open .app-sidebar {
        transform: translateX(0);
    }

    .sidebar-backdrop {
        position: fixed;
        inset: 56px 0 0 0;
        z-index: 35;
        display: block;
        background: rgba(15, 23, 42, 0.18);
        -webkit-backdrop-filter: blur(4px);
        backdrop-filter: blur(4px);
    }

    .sidebar-backdrop[hidden] {
        display: none;
    }

    .sidebar-brand {
        gap: 8px;
        padding-bottom: 8px;
    }

    .sidebar-avatar {
        width: 36px;
        height: 36px;
        border-radius: 14px;
        font-size: 16px;
    }

    .sidebar-brand strong {
        font-size: 14px;
    }

    .sidebar-brand span {
        font-size: 10px;
    }

    .sidebar-nav {
        gap: 5px;
    }

    .sidebar-link {
        min-height: 38px;
        padding: 7px 8px;
        gap: 6px;
        border-radius: 10px;
        font-size: 11px;
    }

    .sidebar-link-main {
        gap: 6px;
    }

    .sidebar-link-icon {
        width: 22px;
        height: 22px;
        border-radius: 7px;
    }

    .sidebar-link-icon svg {
        width: 13px;
        height: 13px;
    }

    .sidebar-badge {
        min-height: 18px;
        padding: 2px 5px;
        font-size: 8px;
        letter-spacing: 0.01em;
    }

    .sidebar-note {
        display: none !important;
    }

    /* Panels and cards */
    .auth-card,
    .auth-aside,
    .panel:not(.app-sidebar) {
        padding: 12px;
        border-radius: 14px;
        box-shadow: 0 8px 20px rgba(15, 23, 42, 0.05);
    }

    .dashboard-grid > .panel,
    #pajay-data,
    .pajay-controls,
    .add-card {
        padding: 12px;
    }

    /* Workspace */
    .workspace {
        overflow: visible;
        padding: 8px;
        gap: 8px;
        min-width: 0;
    }

    .report-workspace {
        overflow: visible;
    }

    .workspace-topbar {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
        padding: 12px;
    }

    .workspace-copy {
        max-width: 100%;
    }

    .workspace-meta {
        width: 100%;
        justify-content: flex-start;
        gap: 6px;
    }

    .meta-pill {
        min-height: 30px;
        padding: 6px 10px;
        font-size: 11px;
    }

    .workspace-topbar h1 {
        font-size: 24px;
        line-height: 1.08;
    }

    .dashboard-workspace {
        gap: 10px;
    }

    .dashboard-hero {
        display: grid;
        grid-template-columns: 1fr;
    }

    .dashboard-hero .panel-subtitle {
        margin-bottom: 0;
        font-size: 13px;
    }

    .dashboard-stat-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
    }

    .dashboard-stat-grid .stat-card {
        min-height: 96px;
        padding: 12px;
        border-radius: 14px;
    }

    .dashboard-stat-grid .stat-card span {
        margin-bottom: 10px;
        font-size: 10px;
        line-height: 1.25;
    }

    .dashboard-stat-grid .stat-card strong {
        font-size: 21px;
        line-height: 1.05;
        overflow-wrap: anywhere;
    }

    .dashboard-stat-grid .stat-card a {
        margin-top: 8px;
        font-size: 11px;
    }

    .dashboard-grid {
        gap: 10px;
    }

    .dashboard-actions {
        grid-template-columns: repeat(2, 1fr);
    }

    .dashboard-actions .button {
        width: 100%;
        min-height: 38px;
        padding: 0 10px;
        font-size: 12px;
        white-space: normal;
    }

    .dashboard-table-wrap .data-table {
        min-width: 440px;
    }

    .dashboard-donate-lists {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .mini-list-row {
        min-height: 48px;
        padding: 9px 10px;
    }

    .section-heading,
    .table-heading {
        align-items: flex-start;
        flex-direction: column;
        gap: 6px;
    }

    .eyebrow {
        margin-bottom: 6px;
        font-size: 11px;
    }

    h2 {
        font-size: 18px;
    }

    p {
        line-height: 1.5;
    }

    .result-note {
        font-size: 12px;
    }

    /* Controls */
    .pajay-controls {
        display: grid;
        gap: 8px;
    }

    .search-form {
        display: grid;
        grid-template-columns: 1fr;
        gap: 8px;
        width: 100%;
        min-width: 0;
    }

    .pajay-controls .search-form {
        grid-template-columns: minmax(0, 1fr) minmax(78px, auto);
        align-items: center;
    }

    .search-form input[type="search"],
    .search-form input[type="text"],
    .search-form select {
        width: 100%;
        min-width: 0;
    }

    .search-form button[type="submit"],
    .search-form .button {
        width: 100%;
    }

    .pajay-controls .search-form input[type="search"] {
        min-height: 40px;
    }

    .pajay-controls .search-form button[type="submit"] {
        min-height: 40px;
        padding: 0 12px;
        font-size: 12px;
    }

    .pajay-controls .search-form .button-secondary {
        grid-column: 1 / -1;
        min-height: 38px;
        font-size: 12px;
    }

    .action-row {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
        width: 100%;
        margin-left: 0;
    }

    .pajay-controls .action-row {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .pajay-controls .action-row > :last-child {
        grid-column: 1 / -1;
    }

    .action-row > * {
        min-width: 0;
    }

    .action-row .button,
    .action-row .button-secondary,
    .action-row .button-danger,
    .action-row button {
        width: 100%;
        justify-content: center;
        text-align: center;
        white-space: normal;
    }

    .pajay-controls .action-row .button,
    .pajay-controls .action-row .button-secondary,
    .pajay-controls .action-row .button-danger,
    .pajay-controls .action-row button {
        min-height: 38px;
        padding: 0 10px;
        font-size: 12px;
    }

    .table-action {
        min-height: 36px;
        padding: 0 12px;
        border-radius: 10px;
        font-size: 12px;
        white-space: nowrap;
    }

    .thomtean-workspace .pajay-controls,
    .thomtean-workspace .search-form {
        width: 100%;
    }

    .thomtean-workspace .pajay-controls {
        gap: 8px;
    }

    .thomtean-workspace .thomtean-search-form {
        grid-template-columns: minmax(0, 1fr) minmax(78px, auto);
        align-items: center;
    }

    .thomtean-workspace .thomtean-search-form input[type="search"] {
        min-height: 40px;
    }

    .thomtean-workspace .thomtean-search-form button[type="submit"] {
        min-height: 40px;
        padding: 0 12px;
        font-size: 12px;
    }

    .thomtean-workspace .thomtean-search-form .button-secondary {
        grid-column: 1 / -1;
        min-height: 38px;
        font-size: 12px;
    }

    .thomtean-workspace .month-filter-form {
        width: 100%;
    }

    .thomtean-workspace .month-filter-form select {
        width: 100%;
        min-height: 40px;
        font-size: 12px;
    }

    .thomtean-workspace .action-row {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .thomtean-workspace .pajay-controls > .action-row > :last-child {
        grid-column: 1 / -1;
    }

    .thomtean-workspace .action-row .button,
    .thomtean-workspace .action-row .button-secondary,
    .thomtean-workspace .action-row .button-danger,
    .thomtean-workspace .action-row button {
        min-height: 38px;
        padding: 0 10px;
        font-size: 12px;
    }

    /* Forms */
    .form-grid {
        grid-template-columns: 1fr;
    }

    .pajay-form .modal-body {
        grid-template-columns: 1fr;
    }

    .field {
        gap: 6px;
    }

    label {
        font-size: 13px;
    }

    input,
    select {
        min-height: 44px;
        padding: 0 12px;
        border-radius: 12px;
        font-size: 14px;
    }

    /* Buttons and touch targets */
    button,
    .button {
        min-height: 40px;
        padding: 0 14px;
        border-radius: 12px;
        font-size: 13px;
    }

    .button-secondary,
    .button-danger {
        border-radius: 12px;
    }
    }

    .month-button-row {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 8px;
    }

    .month-button-row .button,
    .month-button-row button {
        min-height: 38px;
        padding: 0 10px;
        font-size: 12px;
    }

    /* Modals */
    .modal {
        padding: 12px;
    }

    .modal-dialog {
        width: min(100%, calc(100vw - 24px));
        padding: 14px;
    }

    .modal-header {
        gap: 12px;
        padding-bottom: 12px;
    }

    .modal-body {
        gap: 12px;
        padding-top: 14px;
    }

    .modal-actions {
        flex-direction: column;
        gap: 8px;
        margin-top: 16px;
        padding-top: 12px;
    }

    .modal-actions button {
        width: 100%;
    }

    /* Tables */
    .table-wrap {
        border-radius: 12px;
        overflow-x: auto;
        overflow-y: hidden;
    }

    .data-table th,
    .data-table td {
        padding: 10px 12px;
        font-size: 13px;
        white-space: nowrap;
    }

    .data-table th {
        font-size: 10px;
        letter-spacing: 0.05em;
    }

    .data-table {
        min-width: 520px;
    }

    .report-table-wrap {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .report-table {
        min-width: 1180px;
    }

    .report-table th,
    .report-table td {
        font-size: 12px;
    }

    .report-table th:nth-child(2),
    .report-table td:nth-child(2) {
        min-width: 180px;
    }

    .report-table th:nth-child(4),
    .report-table td:nth-child(4) {
        min-width: 140px;
    }

    .status-pill {
        min-height: 24px;
        padding: 0 8px;
        font-size: 11px;
    }

    .empty-mini {
        padding: 20px 14px;
    }

    .empty-state {
        padding: 22px;
    }

    /* Grids */
    .stat-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }

    .stat-card {
        padding: 14px;
    }

    .stat-card strong {
        font-size: 24px;
    }

    /* Auth */
    .page-auth {
        min-height: 100vh;
        padding: 16px;
    }

    .auth-shell {
        grid-template-columns: 1fr;
        gap: 0;
        overflow: hidden;
    }

    .auth-visual-panel {
        min-height: 220px;
        order: 2;
    }

    .auth-card {
        min-height: auto;
        order: 1;
        padding: 22px;
    }

    .auth-card-header {
        margin-bottom: 14px;
    }

    .auth-card h1 {
        font-size: 28px;
    }

    .auth-image-caption {
        left: 14px;
        right: 14px;
        bottom: 14px;
    }

    .auth-form {
        gap: 12px;
        margin-top: 18px;
    }

    .mfa-setup-box {
        grid-template-columns: 1fr;
        justify-items: center;
        text-align: center;
    }

    .auth-hint {
        padding: 12px;
    }

    .feature-item {
        padding: 12px;
    }

    .feature-item span {
        font-size: 13px;
    }

    .panel-subtitle {
        font-size: 13px;
        line-height: 1.45;
    }

    .empty-state {
        display: grid;
        gap: 10px;
    }

    .empty-state .button {
        width: 100%;
    }
}

@media (min-width: 641px) and (max-width: 760px) {
    .page-auth {
        display: grid;
        align-items: center;
        padding: 18px;
    }

    .auth-shell {
        width: min(100%, 920px);
        grid-template-columns: minmax(300px, 1fr) minmax(300px, 0.9fr);
    }

    .auth-visual-panel {
        order: 1;
        min-height: 430px;
    }

    .auth-card {
        order: 2;
        min-height: 430px;
        padding: 30px;
    }

    .auth-card h1 {
        font-size: 28px;
    }
}

/* Final phone layout pass: page-owned responsive rules */
@media (max-width: 760px) {
    .data-workspace {
        gap: 10px;
        padding: 8px;
    }

    .data-toolbar {
        display: grid;
        grid-template-columns: 1fr;
        gap: 8px;
        padding: 12px;
        overflow: hidden;
    }

    .data-toolbar .search-form {
        display: grid;
        grid-template-columns: minmax(0, 1fr) 82px;
        gap: 8px;
        width: 100%;
    }

    .data-toolbar .search-form input[type="search"] {
        min-width: 0;
        min-height: 40px;
        padding: 0 12px;
        font-size: 13px;
    }

    .data-toolbar .search-form button[type="submit"] {
        width: 82px;
        min-height: 40px;
        padding: 0 10px;
        font-size: 12px;
        white-space: nowrap;
    }

    .data-toolbar .search-form .button-secondary {
        grid-column: 1 / -1;
        width: 100%;
        min-height: 38px;
        font-size: 12px;
    }

    .data-toolbar .month-filter-form {
        width: 100%;
    }

    .data-toolbar .month-filter-form select {
        width: 100%;
        min-height: 40px;
        font-size: 12px;
    }

    .data-toolbar > .action-row {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
        width: 100%;
        margin: 0;
    }

    .data-toolbar > .action-row > * {
        min-width: 0;
    }

    .data-toolbar > .action-row > :last-child {
        grid-column: 1 / -1;
    }

    .data-toolbar > .action-row .button,
    .data-toolbar > .action-row .button-secondary,
    .data-toolbar > .action-row .button-danger,
    .data-toolbar > .action-row button {
        width: 100%;
        min-height: 38px;
        padding: 0 10px;
        font-size: 12px;
        white-space: nowrap;
    }

    .donate-workspace .data-toolbar > .action-row,
    .donate-thomtean-workspace .data-toolbar > .action-row {
        grid-template-columns: 1fr;
    }

    .donate-workspace .data-toolbar > .action-row > :last-child,
    .donate-thomtean-workspace .data-toolbar > .action-row > :last-child {
        grid-column: auto;
    }

    .data-table-wrap {
        max-width: 100%;
        overflow-x: auto;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
    }

    .data-workspace .data-table th,
    .data-workspace .data-table td {
        padding: 10px 12px;
        white-space: nowrap;
    }

    .pajay-workspace .data-table {
        min-width: 560px;
    }

    .donate-workspace .data-table,
    .donate-thomtean-workspace .data-table {
        min-width: 460px;
    }

    .donate-workspace .data-table th,
    .donate-workspace .data-table td,
    .donate-thomtean-workspace .data-table th,
    .donate-thomtean-workspace .data-table td {
        padding: 7px 8px;
        font-size: 12px;
    }

    .donate-workspace .data-table th:nth-child(1),
    .donate-workspace .data-table td:nth-child(1),
    .donate-thomtean-workspace .data-table th:nth-child(1),
    .donate-thomtean-workspace .data-table td:nth-child(1) {
        width: 36px;
        min-width: 36px;
    }

    .donate-workspace .data-table th:nth-child(2),
    .donate-workspace .data-table td:nth-child(2),
    .donate-thomtean-workspace .data-table th:nth-child(2),
    .donate-thomtean-workspace .data-table td:nth-child(2) {
        width: 88px;
        min-width: 88px;
    }

    .donate-workspace .data-table th:nth-child(3),
    .donate-workspace .data-table td:nth-child(3),
    .donate-thomtean-workspace .data-table th:nth-child(3),
    .donate-thomtean-workspace .data-table td:nth-child(3) {
        width: 98px;
        min-width: 98px;
    }

    .donate-workspace .data-table th:nth-child(4),
    .donate-workspace .data-table td:nth-child(4),
    .donate-thomtean-workspace .data-table th:nth-child(4),
    .donate-thomtean-workspace .data-table td:nth-child(4) {
        width: 96px;
        min-width: 96px;
    }

    .donate-workspace .data-table th:nth-child(5),
    .donate-workspace .data-table td:nth-child(5),
    .donate-thomtean-workspace .data-table th:nth-child(5),
    .donate-thomtean-workspace .data-table td:nth-child(5) {
        width: 76px;
        min-width: 76px;
    }

    .donate-workspace .table-action,
    .donate-thomtean-workspace .table-action {
        min-height: 32px;
        padding: 0 10px;
        font-size: 12px;
    }

    .thomtean-workspace .thomtean-table-wrap {
        overflow-x: auto;
        overflow-y: hidden;
        border: 1px solid var(--line);
        border-radius: 12px;
        background: var(--surface);
        -webkit-overflow-scrolling: touch;
    }

    .thomtean-workspace .data-table {
        display: table;
        width: 100%;
        min-width: 720px;
        border-collapse: collapse;
        border-spacing: 0;
    }

    .thomtean-workspace .data-table thead {
        display: table-header-group;
    }

    .thomtean-workspace .data-table tbody {
        display: table-row-group;
    }

    .thomtean-workspace .data-table tr {
        display: table-row;
    }

    .thomtean-workspace .data-table th,
    .thomtean-workspace .data-table td {
        display: table-cell;
        white-space: nowrap;
    }

    .thomtean-workspace .data-table td::before {
        content: none;
    }

    .thomtean-workspace .data-table td[data-label="Action"] .action-row {
        display: flex;
        flex-wrap: nowrap;
        gap: 8px;
        min-width: 0;
    }

    .thomtean-workspace .data-table td[data-label="Action"] .table-action {
        min-width: 88px;
        width: auto;
    }

    .thomtean-workspace .data-table tfoot {
        display: table-footer-group;
        margin-top: 0;
    }

    .thomtean-workspace .data-table tfoot tr {
        display: table-row;
        padding: 0;
        border: 0;
        border-radius: 0;
        background: transparent;
    }

    .thomtean-workspace .data-table tfoot th {
        display: table-cell;
        padding: 10px 12px;
        border-top: 1px solid var(--line);
        background: var(--surface-soft);
    }

    .thomtean-workspace .data-table tfoot th:first-child,
    .thomtean-workspace .data-table tfoot th:nth-child(3) {
        display: table-cell;
        color: var(--text);
        font-size: 13px;
    }
}

@media (max-width: 420px) {
    .site-header {
        padding: 8px;
        gap: 6px;
    }

    .brand {
        font-size: 16px;
    }

    .site-actions .button-secondary {
        min-height: 36px;
        padding: 0 10px;
        font-size: 12px;
    }

    .workspace {
        padding: 6px;
    }

    .stat-grid {
        grid-template-columns: 1fr;
    }

    .dashboard-stat-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .dashboard-actions {
        grid-template-columns: repeat(2, 1fr);
    }

    .data-table {
        min-width: 500px;
    }

    .dashboard-table-wrap .data-table {
        min-width: 420px;
    }

    .pajay-workspace .data-table {
        min-width: 520px;
    }

    .donate-workspace .data-table,
    .donate-thomtean-workspace .data-table {
        min-width: 460px;
    }

    .thomtean-workspace .data-table {
        min-width: 640px;
    }

    .empty-state {
        padding: 20px;
    }
    .data-workspace {
        padding: 6px;
    }

    .data-toolbar {
        padding: 10px;
    }

    .data-toolbar .search-form {
        grid-template-columns: 1fr;
    }

    .data-toolbar .search-form button[type="submit"] {
        width: 100%;
    }

    .data-toolbar > .action-row {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .donate-thomtean-workspace .data-toolbar {
        gap: 6px;
    }

    .donate-thomtean-workspace .data-toolbar .search-form {
        grid-template-columns: minmax(0, 1fr) 84px;
        gap: 6px;
    }

    .donate-thomtean-workspace .data-toolbar .search-form button[type="submit"] {
        width: 100%;
        min-width: 0;
        padding: 0 8px;
        font-size: 11px;
        white-space: nowrap;
    }

    .donate-thomtean-workspace .data-toolbar .search-form .button-secondary {
        display: none;
    }

    .donate-thomtean-workspace .data-toolbar > .action-row {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 6px;
    }

    .donate-thomtean-workspace .data-toolbar > .action-row > :last-child {
        grid-column: auto;
    }

    .donate-thomtean-workspace .data-toolbar > .action-row .button,
    .donate-thomtean-workspace .data-toolbar > .action-row .button-secondary,
    .donate-thomtean-workspace .data-toolbar > .action-row .button-danger,
    .donate-thomtean-workspace .data-toolbar > .action-row button {
        min-height: 36px;
        padding: 0 8px;
        font-size: 11px;
        white-space: nowrap;
    }
}

/* Responsive and Visual Polish Fixes */
@media (max-width: 760px) {
    .table-wrap {
        margin: 0 -12px;
        border-radius: 0;
        border-left: none;
        border-right: none;
        width: calc(100% + 24px);
    }
    .data-table th, .data-table td {
        padding: 14px 16px;
    }
    .dashboard-actions .button {
        padding: 0 4px;
        font-size: 11px;
    }
    .stat-card strong {
        font-size: 20px;
    }
}

/* Pajay phone layout */
@media (max-width: 640px) {
    .page-dashboard,
    .app-shell,
    .pajay-workspace,
    .pajay-workspace .data-toolbar,
    .pajay-workspace #pajay-data {
        width: 100%;
        max-width: 100%;
        min-width: 0;
    }

    .pajay-workspace .data-toolbar {
        display: grid;
        grid-template-columns: 1fr;
        gap: 8px;
        border-radius: 12px;
        overflow: hidden;
    }

    .pajay-workspace .data-toolbar > *,
    .pajay-workspace .data-toolbar .search-form > *,
    .pajay-workspace .data-toolbar > .action-row > * {
        min-width: 0;
        max-width: 100%;
    }

    .pajay-workspace .data-toolbar .search-form {
        display: grid;
        grid-template-columns: minmax(0, 1fr) minmax(70px, 76px) !important;
        gap: 8px;
        width: 100%;
        max-width: 100%;
        overflow: hidden;
    }

    .pajay-workspace .data-toolbar .search-form input[type="search"] {
        width: 100%;
        min-width: 0;
        min-height: 40px;
    }

    .pajay-workspace .data-toolbar .search-form button[type="submit"] {
        display: inline-flex;
        width: 100%;
        min-height: 40px;
        padding: 0 8px;
        font-size: 12px;
        white-space: nowrap;
    }

    .pajay-workspace .data-toolbar .search-form .button-secondary {
        grid-column: 1 / -1;
        width: 100%;
    }

    .pajay-workspace .data-toolbar > .action-row {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
        width: 100%;
        max-width: 100%;
        margin: 0;
        overflow: hidden;
    }

    .pajay-workspace .data-toolbar > .action-row > :last-child {
        grid-column: 1 / -1;
    }

    .pajay-workspace .data-toolbar > .action-row .button,
    .pajay-workspace .data-toolbar > .action-row .button-secondary,
    .pajay-workspace .data-toolbar > .action-row button {
        width: 100%;
        min-height: 40px;
        padding: 0 6px;
        font-size: 10px;
        line-height: 1.15;
        white-space: normal;
    }

    .pajay-workspace #pajay-data {
        padding: 12px;
        border-radius: 12px;
    }

    .pajay-workspace .data-table-wrap {
        width: 100%;
        max-width: 100%;
        margin: 0;
        overflow-x: auto;
        overflow-y: hidden;
        border: 1px solid var(--line);
        border-radius: 12px;
        background: var(--surface);
        -webkit-overflow-scrolling: touch;
        touch-action: pan-x;
        scrollbar-width: thin;
        scrollbar-color: #94a3b8 #e2e8f0;
    }

    .pajay-workspace .data-table-wrap::-webkit-scrollbar {
        height: 10px;
    }

    .pajay-workspace .data-table-wrap::-webkit-scrollbar-thumb {
        border-radius: 999px;
        background: #94a3b8;
    }

    .pajay-workspace .data-table-wrap::-webkit-scrollbar-track {
        background: #e2e8f0;
    }

    .pajay-workspace .data-table {
        display: table;
        width: 100%;
        min-width: 680px;
        border-collapse: collapse;
        border-spacing: 0;
    }

    .pajay-workspace .data-table thead {
        display: table-header-group;
    }

    .pajay-workspace .data-table tbody {
        display: table-row-group;
    }

    .pajay-workspace .data-table tr {
        display: table-row;
    }

    .pajay-workspace .data-table th,
    .pajay-workspace .data-table td {
        display: table-cell;
        padding: 12px 14px;
        white-space: nowrap;
    }

    .pajay-workspace .data-table th {
        font-size: 11px;
    }

    .pajay-workspace .data-table td::before {
        content: none;
    }

    .pajay-workspace .data-table td[data-label="Action"] {
        min-width: 150px;
    }

    .pajay-workspace .data-table td[data-label="Action"] .action-row {
        display: flex;
        flex-wrap: nowrap;
        gap: 8px;
    }

    .pajay-workspace .data-table td[data-label="Action"] .table-action {
        width: auto;
        min-height: 36px;
        padding: 0 10px;
        font-size: 12px;
    }

    .pajay-workspace .data-table .empty-mini {
        display: block;
        padding: 18px 12px;
        text-align: center;
    }

    .pajay-workspace .data-table .empty-mini::before {
        content: none;
    }

    .pajay-workspace .data-table tfoot {
        display: table-footer-group;
        margin-top: 0;
    }

    .pajay-workspace .data-table tfoot tr {
        display: table-row;
        padding: 0;
        background: transparent;
    }

    .pajay-workspace .data-table tfoot th {
        display: table-cell;
        padding: 10px 12px;
        border-top: 1px solid var(--line);
        background: var(--surface-soft);
        font-size: 13px;
    }

    .pajay-workspace .data-table tfoot th:first-child {
        color: var(--muted);
    }

    .pajay-workspace .data-table tfoot th:nth-child(3) {
        color: var(--text);
        font-weight: 800;
    }
}

/* Shared phone fit for every data page */
@media (max-width: 640px) {
    .data-workspace,
    .report-workspace,
    .data-workspace .data-toolbar,
    .report-workspace .pajay-controls,
    .data-workspace #pajay-data,
    .report-workspace #pajay-data {
        width: 100%;
        max-width: 100%;
        min-width: 0;
    }

    .data-workspace .data-toolbar,
    .report-workspace .pajay-controls {
        display: grid;
        grid-template-columns: 1fr;
        gap: 8px;
        padding: 10px;
        overflow: hidden;
    }

    .data-workspace .data-toolbar > *,
    .report-workspace .pajay-controls > *,
    .data-workspace .data-toolbar .search-form > *,
    .report-workspace .pajay-controls .search-form > *,
    .data-workspace .data-toolbar > .action-row > * {
        min-width: 0;
        max-width: 100%;
    }

    .data-workspace .data-toolbar .search-form,
    .report-workspace .pajay-controls .search-form {
        display: grid;
        grid-template-columns: minmax(0, 1fr) minmax(70px, 76px) !important;
        gap: 8px;
        width: 100%;
        max-width: 100%;
        overflow: hidden;
    }

    .data-workspace .data-toolbar .search-form input[type="search"],
    .report-workspace .pajay-controls .search-form input[type="search"] {
        width: 100%;
        min-width: 0;
        min-height: 40px;
        padding: 0 10px;
        font-size: 12px;
    }

    .data-workspace .data-toolbar .search-form button[type="submit"],
    .report-workspace .pajay-controls .search-form button[type="submit"] {
        width: 100%;
        min-width: 0;
        min-height: 40px;
        padding: 0 8px;
        font-size: 12px;
        white-space: nowrap;
    }

    .data-workspace .data-toolbar .search-form .button-secondary,
    .report-workspace .pajay-controls .search-form .button-secondary {
        grid-column: 1 / -1;
        width: 100%;
    }

    .data-workspace .data-toolbar .month-filter-form {
        width: 100%;
        min-width: 0;
    }

    .data-workspace .data-toolbar .month-filter-form select {
        width: 100%;
        min-width: 0;
        min-height: 40px;
        font-size: 12px;
    }

    .data-workspace .data-toolbar > .action-row {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
        width: 100%;
        max-width: 100%;
        margin: 0;
        overflow: hidden;
    }

    .data-workspace .data-toolbar > .action-row > :last-child {
        grid-column: 1 / -1;
    }

    .data-workspace .data-toolbar > .action-row .button,
    .data-workspace .data-toolbar > .action-row .button-secondary,
    .data-workspace .data-toolbar > .action-row .button-danger,
    .data-workspace .data-toolbar > .action-row button {
        width: 100%;
        min-width: 0;
        min-height: 40px;
        padding: 0 6px;
        font-size: 10px;
        line-height: 1.15;
        white-space: normal;
    }

    .data-workspace .data-table-wrap,
    .report-workspace .report-table-wrap {
        width: 100%;
        max-width: 100%;
        margin: 0;
        overflow-x: auto;
        overflow-y: hidden;
        border: 1px solid var(--line);
        border-radius: 12px;
        background: var(--surface);
        -webkit-overflow-scrolling: touch;
        touch-action: pan-x;
        scrollbar-width: thin;
        scrollbar-color: #94a3b8 #e2e8f0;
    }

    .data-workspace .data-table-wrap::-webkit-scrollbar,
    .report-workspace .report-table-wrap::-webkit-scrollbar {
        height: 10px;
    }

    .data-workspace .data-table-wrap::-webkit-scrollbar-thumb,
    .report-workspace .report-table-wrap::-webkit-scrollbar-thumb {
        border-radius: 999px;
        background: #94a3b8;
    }

    .data-workspace .data-table-wrap::-webkit-scrollbar-track,
    .report-workspace .report-table-wrap::-webkit-scrollbar-track {
        background: #e2e8f0;
    }

    .data-workspace .data-table,
    .report-workspace .report-table {
        display: table;
        width: 100%;
        border-collapse: collapse;
        border-spacing: 0;
    }

    .pajay-workspace .data-table {
        min-width: 680px;
    }

    .thomtean-workspace .data-table {
        min-width: 720px;
    }

    .donate-workspace .data-table {
        min-width: 620px;
    }

    .donate-thomtean-workspace .data-table {
        min-width: 430px;
    }

    .report-workspace .report-table {
        min-width: 1180px;
    }

    .data-workspace .data-table thead,
    .report-workspace .report-table thead {
        display: table-header-group;
    }

    .data-workspace .data-table tbody,
    .report-workspace .report-table tbody {
        display: table-row-group;
    }

    .data-workspace .data-table tfoot,
    .report-workspace .report-table tfoot {
        display: table-footer-group;
    }

    .data-workspace .data-table tr,
    .report-workspace .report-table tr {
        display: table-row;
    }

    .data-workspace .data-table th,
    .data-workspace .data-table td,
    .report-workspace .report-table th,
    .report-workspace .report-table td {
        display: table-cell;
        padding: 10px 12px;
        white-space: nowrap;
    }

    .data-workspace .data-table td::before,
    .report-workspace .report-table td::before {
        content: none;
    }

    .data-workspace .data-table td[data-label="Action"] .action-row {
        display: flex;
        flex-wrap: nowrap;
        gap: 8px;
        width: auto;
    }

    .data-workspace .data-table td[data-label="Action"] .table-action {
        width: auto;
        min-width: 76px;
        min-height: 34px;
        padding: 0 10px;
        font-size: 12px;
        white-space: nowrap;
    }
}

/* Clean icon actions */
.data-table td[data-label="Action"] {
    width: 1%;
}

.data-table td[data-label="Action"] .action-row {
    align-items: center;
    justify-content: flex-start;
}

.table-form {
    display: inline-flex;
}

.table-action-icon,
.data-workspace .data-table td[data-label="Action"] .table-action-icon {
    width: 38px;
    min-width: 38px;
    height: 34px;
    min-height: 34px;
    padding: 0;
}

@media (max-width: 640px) {
    .data-workspace .data-table td[data-label="Action"] .table-action-icon {
        width: 38px;
        min-width: 38px;
        height: 34px;
        min-height: 34px;
        padding: 0;
    }
}

/* Compact data density */
.data-workspace,
.report-workspace {
    gap: 12px;
}

.data-workspace #pajay-data,
.report-workspace #pajay-data {
    padding: 18px;
}

.data-workspace .data-toolbar,
.report-workspace .pajay-controls {
    padding: 14px 18px;
}

.data-table th,
.data-table td {
    padding: 10px 12px;
    font-size: 13px;
}

.data-table th {
    font-size: 10px;
}

.status-pill {
    min-height: 24px;
    padding: 0 8px;
    font-size: 11px;
}

.table-heading {
    margin-bottom: 14px;
}

.table-heading h2 {
    font-size: 20px;
}

.table-action-icon,
.data-workspace .data-table td[data-label="Action"] .table-action-icon {
    width: 34px;
    min-width: 34px;
    height: 32px;
    min-height: 32px;
}

.table-action-icon svg {
    width: 15px;
    height: 15px;
}

.report-table th:nth-child(2),
.report-table td:nth-child(2) {
    width: 180px;
    min-width: 180px;
}

.report-table th:nth-child(4),
.report-table td:nth-child(4) {
    width: 150px;
    min-width: 150px;
}

@media (max-width: 640px) {
    .data-workspace #pajay-data,
    .report-workspace #pajay-data {
        padding: 10px;
    }

    .data-workspace .data-toolbar,
    .report-workspace .pajay-controls {
        padding: 10px;
    }

    .data-workspace .data-table th,
    .data-workspace .data-table td,
    .report-workspace .report-table th,
    .report-workspace .report-table td,
    .pajay-workspace .data-table th,
    .pajay-workspace .data-table td {
        padding: 8px 10px;
        font-size: 12px;
    }

    .data-workspace .data-table th,
    .report-workspace .report-table th,
    .pajay-workspace .data-table th {
        font-size: 10px;
    }

    .status-pill {
        min-height: 22px;
        padding: 0 7px;
        font-size: 10px;
    }

    .table-heading h2 {
        font-size: 18px;
    }

    .table-action-icon,
    .data-workspace .data-table td[data-label="Action"] .table-action-icon {
        width: 34px;
        min-width: 34px;
        height: 32px;
        min-height: 32px;
        padding: 0;
    }
}

/* Keep row actions on one line */
.data-table td[data-label="Action"] {
    min-width: 86px;
}

.data-table td[data-label="Action"] .action-row {
    display: inline-flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 8px;
    width: auto;
}

.data-table td[data-label="Action"] .table-form {
    display: inline-flex;
    width: auto;
    margin: 0;
}

@media (max-width: 640px) {
    .data-workspace .data-table td[data-label="Action"] .action-row,
    .pajay-workspace .data-table td[data-label="Action"] .action-row,
    .thomtean-workspace .data-table td[data-label="Action"] .action-row {
        display: inline-flex;
        flex-wrap: nowrap;
        gap: 8px;
        width: auto;
    }
}

/* Desktop: scroll data rows inside the table card, not the whole page */
@media (min-width: 761px) {
    .data-workspace {
        display: flex;
        flex-direction: column;
        align-content: stretch;
        overflow: hidden;
    }

    .data-workspace > .data-toolbar,
    .data-workspace > .alert-box {
        flex: 0 0 auto;
    }

    .data-workspace #pajay-data {
        display: flex;
        flex: 1 1 auto;
        flex-direction: column;
        min-height: 0;
        overflow: hidden;
    }

    .data-workspace .section-heading {
        flex: 0 0 auto;
    }

    .data-workspace .data-table-wrap {
        flex: 1 1 auto;
        min-height: 0;
        overflow: auto;
    }

    .data-workspace .data-table thead th {
        position: sticky;
        top: 0;
        z-index: 2;
    }
}

/* Phone: keep data scrolling inside the table card */
@media (max-width: 760px) {
    .data-workspace,
    .report-workspace {
        display: flex;
        flex-direction: column;
        min-height: calc(100vh - 56px);
        overflow: hidden;
    }

    .data-workspace > .data-toolbar,
    .data-workspace > .alert-box,
    .report-workspace > .pajay-controls,
    .report-workspace > .alert-box {
        flex: 0 0 auto;
    }

    .data-workspace #pajay-data,
    .report-workspace #pajay-data {
        display: flex;
        flex: 1 1 auto;
        flex-direction: column;
        min-height: 0;
        overflow: hidden;
    }

    .data-workspace .section-heading,
    .report-workspace .section-heading {
        flex: 0 0 auto;
    }

    .data-workspace .data-table-wrap,
    .report-workspace .report-table-wrap {
        flex: 1 1 auto;
        min-height: 0;
        overflow: auto;
    }

    .data-workspace .data-table thead th,
    .report-workspace .report-table thead th {
        position: sticky;
        top: 0;
        z-index: 2;
    }
}

/* Phone frozen header and controls */
@media (max-width: 760px) {
    html,
    body {
        height: 100%;
    }

    body {
        overflow: hidden;
    }

    .site-header {
        position: sticky;
        top: 0;
        z-index: 50;
    }

    .page-dashboard {
        height: calc(100dvh - 56px);
        overflow: hidden;
    }

    .app-shell {
        height: 100%;
        overflow: hidden;
    }

    .data-workspace,
    .report-workspace {
        height: 100%;
        min-height: 0;
        overflow: hidden;
    }

    .data-workspace > .data-toolbar,
    .report-workspace > .pajay-controls {
        position: sticky;
        top: 0;
        z-index: 5;
        flex: 0 0 auto;
    }

    .data-workspace #pajay-data,
    .report-workspace #pajay-data {
        flex: 1 1 auto;
        min-height: 0;
    }

    .data-workspace .data-table-wrap,
    .report-workspace .report-table-wrap {
        flex: 1 1 auto;
        min-height: 0;
        overflow: auto;
    }
}

/* Desktop modal fit */
@media (min-width: 761px) {
    .modal {
        padding: 24px;
    }

    .modal-dialog {
        width: min(calc(100vw - 48px), 760px);
        max-height: calc(100vh - 48px);
        overflow-y: auto;
        padding: 22px;
    }

    .modal-body {
        gap: 14px 12px;
    }

    .pajay-form .modal-body .field:only-child,
    .pajay-form .modal-body .field:last-child:nth-child(odd) {
        grid-column: 1 / -1;
    }

    .modal-actions {
        flex-direction: row;
        justify-content: flex-end;
        align-items: center;
    }

    .modal-actions button,
    .modal-actions .button {
        width: auto;
        min-width: 120px;
    }
}

/* Report desktop polish */
.report-year-panel {
    padding: 12px 18px;
}

.report-year-panel .tabs-container {
    padding: 0;
}

.report-workspace .table-heading {
    align-items: center;
}

.report-workspace .result-note {
    text-align: right;
}

.report-workspace .report-table {
    table-layout: auto;
    min-width: 1420px;
}

.report-table th,
.report-table td {
    vertical-align: middle;
}

.report-table th:nth-child(1),
.report-table td:nth-child(1) {
    width: 56px;
    min-width: 56px;
    text-align: center;
}

.report-table th:nth-child(2),
.report-table td:nth-child(2) {
    width: 320px;
    min-width: 320px;
    max-width: 320px;
    overflow: hidden;
    text-align: left;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.report-table th:nth-child(3),
.report-table td:nth-child(3) {
    width: 86px;
    min-width: 86px;
}

.report-table th:nth-child(4),
.report-table td:nth-child(4) {
    width: 170px;
    min-width: 170px;
}

.report-table td:nth-child(4) .status-pill {
    max-width: 150px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.report-table th:nth-child(n + 5),
.report-table td:nth-child(n + 5) {
    width: 78px;
    min-width: 78px;
}

.report-total-row td {
    position: sticky;
    top: 34px;
    z-index: 1;
    background: var(--surface-soft);
    color: var(--muted);
    font-weight: 800;
    border-bottom: 1px solid var(--line);
}

.report-total-row td:first-child {
    color: var(--text);
    text-transform: uppercase;
}

.data-total-row td {
    position: sticky;
    top: 31px;
    z-index: 1;
    background: var(--surface-soft);
    color: var(--muted);
    font-weight: 800;
    border-bottom: 1px solid var(--line);
}

.data-total-row td:first-child,
.data-total-row td:nth-child(3) {
    color: var(--text);
    text-transform: uppercase;
}

.thomtean-workspace .data-table td.pajay-zero {
    background: #fee2e2;
    color: #dc2626;
    font-weight: 800;
}

@media (max-width: 760px) {
    .table-meta {
        justify-content: flex-start;
        text-align: left;
    }

    .year-tabs-panel {
        align-self: stretch;
        width: 100%;
    }
}

@media (max-width: 760px) {
    .report-year-panel {
        padding: 10px;
    }

    .report-workspace .report-table {
        min-width: 1180px;
    }
}

/* Login screen final shape */
.auth-body .page-auth {
    display: grid;
    place-items: center;
    width: 100%;
    min-height: 100vh;
    margin: 0;
    padding: 28px;
}

.auth-body .auth-shell {
    width: min(100%, 960px);
    min-height: 520px;
    display: grid;
    grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
    gap: 0;
    border: 1px solid #d4e0ec;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 24px 58px rgba(31, 70, 112, 0.12);
    overflow: hidden;
}

.auth-body .auth-visual-panel {
    order: 1;
    min-height: 520px;
    border: 0;
    border-radius: 0;
    box-shadow: none;
}

.auth-body .auth-card {
    order: 2;
    min-height: 520px;
    padding: 0 50px;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    justify-items: center;
}

.auth-body .auth-card-header {
    align-items: center;
    gap: 14px;
    width: 100%;
    max-width: 310px;
    margin-bottom: 20px;
}

.auth-body .auth-lock-icon {
    width: 46px;
    height: 46px;
    border-radius: 10px;
    color: #fff;
    background: #0875bd;
}

.auth-body .auth-card .eyebrow {
    margin-bottom: 6px;
    color: #006bb6;
    font-size: 11px;
    letter-spacing: 0.1em;
}

.auth-body .auth-card h1 {
    max-width: 250px;
    margin: 0;
    font-size: 30px;
    line-height: 1.08;
}

.auth-body .auth-card .panel-subtitle {
    display: none;
}

.auth-body .auth-form {
    width: 100%;
    max-width: 320px;
    gap: 14px;
    margin-top: 0;
}

.auth-body .field {
    gap: 7px;
}

.auth-body .field label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: #1d3557;
}

.auth-body .field label span {
    color: #0875bd;
    font-size: 12px;
}

.auth-body .field input {
    min-height: 44px;
    border-radius: 8px;
    border-color: #bed1e5;
    background: #edf5ff;
}

.auth-remember {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 2px;
    color: #334155;
    font-size: 13px;
    font-weight: 600;
}

.auth-remember input {
    width: 14px;
    height: 14px;
    min-height: 14px;
    padding: 0;
    border-radius: 3px;
    background: #fff;
}

.auth-body .auth-submit {
    min-height: 50px;
    margin-top: 10px;
    border-radius: 9px;
    background: #0875bd;
    font-weight: 900;
}

.auth-body .auth-image-caption {
    left: 18px;
    right: 18px;
    bottom: 18px;
    min-height: 46px;
}

@media (max-width: 820px) {
    .auth-body .auth-shell {
        width: min(100%, 740px);
        grid-template-columns: minmax(0, 1fr) minmax(0, 0.9fr);
        min-height: 480px;
    }

    .auth-body .auth-visual-panel,
    .auth-body .auth-card {
        min-height: 480px;
    }

    .auth-body .auth-card {
        padding: 0 30px;
    }
}

@media (max-width: 640px) {
    .auth-body .page-auth {
        padding: 14px;
    }

    .auth-body .auth-shell {
        grid-template-columns: 1fr;
        min-height: 0;
    }

    .auth-body .auth-card {
        order: 1;
        min-height: 0;
        padding: 24px;
    }

    .auth-body .auth-visual-panel {
        order: 2;
        min-height: 260px;
    }
}
