/* FORM_VERSION: 20260529_175206_archive_tab_bold */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

body.dash-page {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

body.dash-page :where(button, a, [role="button"], label[for], input, select, textarea) {
    -webkit-tap-highlight-color: transparent;
}

/* Uploaded File Item Styles */
.uploaded-file-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    border-radius: 8px;
    margin: 5px 0;
    background: var(--baize-blue-message-bg);
    border: 1px solid var(--baize-blue-message-border);
    box-shadow: var(--baize-blue-message-shadow);
}

/* Hide files after the first one by default */
.uploaded-file-item.file-hidden {
    display: none;
}

/* Show More Files Button */
.show-more-files-btn {
    transition: all 0.3s ease;
}

.show-more-files-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    background: rgba(31, 78, 121, 0.2) !important;
    border-color: rgba(31, 78, 121, 0.3) !important;
}

.show-more-files-btn:active {
    transform: translateY(0);
}

.hidden {
    display: none !important;
}

/* Dashboard design tokens and shared layout variables */
:root {
    --app-font-sans: 'PingFang SC', 'Source Han Sans CN', 'Noto Sans CJK SC', 'Microsoft YaHei UI', 'Microsoft YaHei', 'SF Pro Display', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --desktop-focus-nav-height: 56px;
    --desktop-focus-history-width: clamp(280px, 24vw, 360px);
    --baize-archive-radius: 20px;
    --baize-blue-button-bg: linear-gradient(145deg, #1f4e79 0%, #2f6f9f 48%, #4a8db8 100%);
    --baize-blue-button-hover-bg: linear-gradient(145deg, #2b628f 0%, #3e7fae 48%, #63a3ca 100%);
    --baize-blue-button-active-bg: linear-gradient(145deg, #1b4268 0%, #2b628f 100%);
    --baize-blue-button-text: #ffffff;
    --baize-blue-button-border: rgba(31, 78, 121, 0.42);
    --baize-blue-button-shadow: 0 5px 15px rgba(31, 78, 121, 0.26), inset 0 1px 0 rgba(255, 255, 255, 0.28);
    --baize-blue-button-hover-shadow: 0 8px 20px rgba(31, 78, 121, 0.34), inset 0 1px 0 rgba(255, 255, 255, 0.34);
    --baize-blue-soft-bg: linear-gradient(135deg, rgba(31, 78, 121, 0.11) 0%, rgba(45, 106, 149, 0.18) 100%);
    --baize-blue-soft-hover-bg: linear-gradient(135deg, rgba(31, 78, 121, 0.18) 0%, rgba(45, 106, 149, 0.26) 100%);
    --baize-blue-message-bg: linear-gradient(145deg, rgba(31, 78, 121, 0.12) 0%, rgba(74, 141, 184, 0.18) 100%);
    --baize-blue-message-border: rgba(31, 78, 121, 0.24);
    --baize-blue-message-shadow: 0 8px 24px rgba(31, 78, 121, 0.16), inset 0 1px 0 rgba(255, 255, 255, 0.55);
    --archive-air-bg-top: #eaf4f8;
    --archive-air-bg-bottom: #dfeaf1;
    --archive-air-surface: rgba(248, 252, 254, 0.86);
    --archive-air-surface-strong: rgba(253, 254, 255, 0.94);
    --archive-air-surface-soft: rgba(235, 246, 251, 0.74);
    --archive-air-border: rgba(160, 184, 199, 0.38);
    --archive-air-border-strong: rgba(127, 160, 181, 0.46);
    --archive-air-text: #273b4a;
    --archive-air-blue: #416f91;
    --archive-air-blue-deep: #315f82;
    --archive-air-shell-shadow: 0 22px 60px rgba(49, 95, 130, 0.16);
    --archive-air-card-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.76), 0 14px 32px rgba(64, 101, 127, 0.12);
}

body {
    font-family: var(--app-font-sans);
    background-image: url('https://xcnd.net/img/stars3.jpg?v=20260528_114157');
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    min-height: 100vh;
    color: #2c3e50;
    font-weight: 400;
    letter-spacing: 0.3px;
    transition: all 0.3s ease;
    overflow-x: hidden;
}

body,
body h1,
body h2,
body h3,
body h4,
body h5,
body h6,
body p,
body label,
body a,
body button,
body input,
body select,
body textarea,
body option,
body li,
body dt,
body dd,
body th,
body td,
body figcaption,
body summary {
    font-family: var(--app-font-sans);
}

button,
input,
select,
textarea {
    font-family: var(--app-font-sans);
}

/* Chat History Button and Panel */
.chat-history-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.76), rgba(237, 247, 255, 0.5));
    border: 1px solid rgba(42, 91, 126, 0.18);
    border-radius: 10px;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0;
    margin-right: 15px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72), 0 8px 18px rgba(15, 42, 64, 0.08);
    -webkit-backdrop-filter: blur(14px) saturate(150%);
    backdrop-filter: blur(14px) saturate(150%);
    transition: all 0.3s ease;
    color: #12263a;
}

.chat-history-btn:hover {
    border-color: rgba(31, 111, 160, 0.32);
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.86), rgba(219, 239, 251, 0.64));
    transform: translateY(-1px);
    color: #0a5e91;
}

/* Chat History Panel */
.chat-history-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(12, 32, 48, 0.18);
    -webkit-backdrop-filter: blur(18px) saturate(155%);
    backdrop-filter: blur(18px) saturate(155%);
    z-index: 9998;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    pointer-events: none;
}

.chat-history-overlay.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.chat-history-panel {
    position: absolute;
    top: 12px;
    left: 12px;
    width: min(86vw, 380px);
    height: calc(100dvh - 24px);
    color: #12263a;
    border-radius: 24px;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.72),
        0 24px 54px rgba(31, 78, 121, 0.2);
    -webkit-backdrop-filter: blur(22px) saturate(165%);
    backdrop-filter: blur(22px) saturate(165%);
    transform: translateX(calc(-100% - 24px));
    transition: transform 0.3s ease;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    background:
        linear-gradient(145deg, rgba(255, 255, 255, 0.84), rgba(238, 248, 255, 0.6)),
        rgba(255, 255, 255, 0.66);
    border: 1px solid rgba(255, 255, 255, 0.68);
}

.chat-history-overlay.active .chat-history-panel {
    transform: translateX(0);
}

.chat-history-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 20px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.46), rgba(221, 240, 250, 0.24));
    font-weight: 800;
    font-size: 1.12rem;
    letter-spacing: 0;
    flex-shrink: 0;
    border-bottom: 1px solid rgba(31, 78, 121, 0.12);
    color: #12263a;
}

.membership-due-section {
    margin: 12px 12px 0;
    padding: 12px 14px;
    border: 1px solid rgba(31, 78, 121, 0.12);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.52);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    color: #12263a;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.68),
        0 8px 18px rgba(31, 78, 121, 0.07);
    -webkit-backdrop-filter: blur(12px) saturate(140%);
    backdrop-filter: blur(12px) saturate(140%);
}

.membership-due-label {
    font-size: 0.85rem;
    color: rgba(18, 38, 58, 0.62);
}

.membership-due-value {
    font-size: 1.05rem;
    font-weight: 800;
    letter-spacing: 0;
    color: #123c5b;
}

.membership-due-section {
    border: 1px solid rgba(31, 78, 121, 0.12);
    background: rgba(255, 255, 255, 0.52);
    color: #12263a;
}

.membership-renew-btn {
    margin: 10px 12px 0;
    width: calc(100% - 24px);
    background: linear-gradient(135deg, rgba(31, 78, 121, 0.82), rgba(74, 141, 184, 0.66));
    border: 1px solid rgba(31, 111, 160, 0.34);
    color: #ffffff;
    font-size: 0.9rem;
    font-weight: 800;
    padding: 10px 12px;
    border-radius: 15px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.3s ease;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.32),
        0 12px 24px rgba(31, 111, 160, 0.18);
    -webkit-backdrop-filter: blur(12px) saturate(145%);
    backdrop-filter: blur(12px) saturate(145%);
}

.membership-renew-btn:hover {
    background: linear-gradient(135deg, rgba(25, 69, 108, 0.88), rgba(61, 128, 173, 0.74));
    transform: translateY(-1px);
}

.membership-renew-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.membership-renew-btn {
    background: linear-gradient(135deg, rgba(31, 78, 121, 0.82), rgba(74, 141, 184, 0.66));
    border-color: rgba(31, 111, 160, 0.34);
    color: #ffffff;
}

.membership-renew-btn:hover {
    background: linear-gradient(135deg, rgba(25, 69, 108, 0.88), rgba(61, 128, 173, 0.74));
    border-color: rgba(31, 111, 160, 0.4);
}

.chat-filter-container {
    padding: 10px 12px;
    border-bottom: 1px solid rgba(31, 78, 121, 0.1);
}

.chat-filter-btn {
    width: 100%;
    background: rgba(255, 255, 255, 0.54);
    border: 1px solid rgba(31, 78, 121, 0.14);
    color: #123c5b;
    font-size: 0.9rem;
    font-weight: 800;
    cursor: pointer;
    padding: 10px 12px;
    transition: all 0.3s ease;
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.7),
        0 8px 18px rgba(31, 78, 121, 0.08);
    -webkit-backdrop-filter: blur(12px) saturate(145%);
    backdrop-filter: blur(12px) saturate(145%);
}

.chat-filter-btn:hover {
    background: rgba(255, 255, 255, 0.76);
    border-color: rgba(31, 111, 160, 0.22);
    transform: translateY(-1px);
}

.chat-filter-btn.active {
    background: linear-gradient(135deg, rgba(31, 78, 121, 0.78), rgba(74, 141, 184, 0.62));
    border-color: rgba(31, 111, 160, 0.34);
    color: #ffffff;
}

.chat-history-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 14px;
    border: 1px solid rgba(31, 78, 121, 0.14);
    background: rgba(255, 255, 255, 0.58);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.7),
        0 8px 18px rgba(31, 78, 121, 0.12);
    -webkit-backdrop-filter: blur(12px) saturate(145%);
    backdrop-filter: blur(12px) saturate(145%);
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0;
    transition: all 0.3s ease;
    color: #12263a;
}

.chat-history-close:hover {
    transform: translateY(-1px);
    background: rgba(255, 255, 255, 0.76);
    color: #0f5f8a;
}

.chat-history-list {
    flex: 1;
    overflow-y: auto;
    min-height: 0;
    padding: 10px 12px 12px;
}

.chat-history-empty {
    margin: 10px 0;
    padding: 20px;
    text-align: center;
    color: rgba(18, 38, 58, 0.58);
    font-weight: 700;
    border: 1px solid rgba(31, 78, 121, 0.12);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.5);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.68),
        0 8px 18px rgba(31, 78, 121, 0.07);
}

.chat-history-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    margin: 0 0 8px;
    padding: 12px 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.5);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.68),
        0 8px 18px rgba(31, 78, 121, 0.07);
    -webkit-backdrop-filter: blur(12px) saturate(140%);
    backdrop-filter: blur(12px) saturate(140%);
    position: relative;
    color: #12263a;
    border: 1px solid rgba(31, 78, 121, 0.12);
}

.chat-history-item-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    ;
}

.chat-history-item:hover {
    border-color: rgba(31, 111, 160, 0.22);
    transform: translateX(2px);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.74),
        0 10px 22px rgba(31, 111, 160, 0.12);
    background: rgba(255, 255, 255, 0.76);
}

.chat-history-item.active {
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.82),
        0 10px 22px rgba(31, 111, 160, 0.16);
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.84), rgba(201, 231, 248, 0.78));
    border-color: rgba(31, 111, 160, 0.38);
}

.chat-history-item.chat-history-item--menu-open {
    z-index: 10020;
}

.chat-history-item-menu {
    position: relative;
    margin-left: 10px;
    z-index: 2;
}

.chat-history-menu-btn {
    background: rgba(255, 255, 255, 0.52);
    border: 1px solid rgba(31, 78, 121, 0.12);
    color: #123c5b;
    cursor: pointer;
    padding: 5px;
    border-radius: 12px;
    transition: all 0.3s ease;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.64);
}

.chat-history-menu-btn:hover {
    background: rgba(255, 255, 255, 0.76);
    color: #0f5f8a;
    transform: translateY(-1px);
}

.chat-history-menu-btn {
    color: #123c5b;
}

.chat-history-menu-btn:hover {
    background: rgba(255, 255, 255, 0.76);
    color: #0f5f8a;
}

.chat-history-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background:
        linear-gradient(145deg, rgba(255, 255, 255, 0.86), rgba(238, 248, 255, 0.62)),
        rgba(255, 255, 255, 0.7);
    border: 1px solid rgba(31, 78, 121, 0.14);
    border-radius: 16px;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.72),
        0 14px 30px rgba(31, 78, 121, 0.14);
    -webkit-backdrop-filter: blur(18px) saturate(160%);
    backdrop-filter: blur(18px) saturate(160%);
    z-index: 10000;
    min-width: 148px;
    padding: 6px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
}

.chat-history-dropdown.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    z-index: 10030;
}

.chat-history-dropdown {
    background:
        linear-gradient(145deg, rgba(255, 255, 255, 0.86), rgba(238, 248, 255, 0.62)),
        rgba(255, 255, 255, 0.7);
    border: 1px solid rgba(31, 78, 121, 0.14);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.72),
        0 14px 30px rgba(31, 78, 121, 0.14);
}

.chat-history-dropdown-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    color: #12263a;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    font-weight: 400;
    border-radius: 12px;
}

.chat-history-dropdown-item:last-child {
    border-bottom: 0;
}

.chat-history-dropdown-item:hover {
    background: rgba(255, 255, 255, 0.72);
    color: #0f5f8a;
}

.chat-history-dropdown-item.danger:hover {
    background: rgba(255, 243, 245, 0.78);
    color: #dc3545;
}

.chat-history-dropdown-item {
    color: #12263a;
}

.chat-history-dropdown-item:hover {
    background: rgba(255, 255, 255, 0.72);
}

.chat-history-dropdown-item.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

.chat-history-dropdown-item.disabled:hover {
    background: none;
}

.chat-rename-input {
    width: 100%;
    border-radius: 12px;
    padding: 8px 10px;
    font-size: 0.9rem;
    font-family: inherit;
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid rgba(31, 78, 121, 0.16);
    color: #12263a;
}

.chat-rename-input:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(31, 111, 160, 0.13);
    border-color: #1f4e79;
}

.chat-title {
    font-weight: 400;
    font-size: 0.95rem;
    margin-bottom: 5px;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    ;
}

.chat-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.chat-date {
    font-size: 0.8rem;
    color: rgba(18, 38, 58, 0.58);
    font-weight: 400;
}

.chat-customer-name {
    font-size: 0.75rem;
    font-weight: 400;
    padding: 2px 8px;
    border-radius: 10px;
    color: #1f4e79;
    background: rgba(31, 78, 121, 0.1);
    border: 1px solid rgba(31, 78, 121, 0.3);
}

.chat-history-list::-webkit-scrollbar {
    width: 8px;
}

.chat-history-list::-webkit-scrollbar-track {
    border-radius: 999px;
    background: transparent;
}

.chat-history-list::-webkit-scrollbar-thumb {
    border-radius: 999px;
    background: rgba(31, 78, 121, 0.24);
}

/* Navigation Styles */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    backdrop-filter: blur(20px);
    z-index: 1000;
    padding: 4px 16px;
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.95) 0%, rgba(248, 249, 250, 0.98) 100%);
    border-bottom: 1px solid rgba(52, 73, 94, 0.2);
}

.navbar-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1600px;
    margin: 0 auto;
}

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

.nav-register-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    border-radius: 16px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.76), rgba(237, 247, 255, 0.5));
    border: 1px solid rgba(42, 91, 126, 0.18);
    color: #12263a;
    text-decoration: none;
    font-size: 0.78rem;
    font-weight: 600;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72), 0 8px 18px rgba(15, 42, 64, 0.08);
    -webkit-backdrop-filter: blur(14px) saturate(150%);
    backdrop-filter: blur(14px) saturate(150%);
    transition: all 0.3s ease;
}

.nav-register-btn:hover {
    color: #0a5e91;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.86), rgba(219, 239, 251, 0.64));
    border-color: rgba(31, 111, 160, 0.32);
    transform: translateY(-1px);
}

.nav-register-btn {
    color: #12263a;
}

.nav-register-btn:hover {
    color: #0a5e91;
}

.focus-mode-btn {
    display: none;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 16px;
    background: rgba(235, 214, 152, 0.12);
    border: 1px solid rgba(235, 214, 152, 0.35);
    color: #EBD698;
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.focus-mode-btn:hover {
    background: rgba(235, 214, 152, 0.25);
    border-color: rgba(235, 214, 152, 0.6);
}

.focus-mode-btn.is-active {
    background: linear-gradient(135deg, #EBD698 0%, #C29049 100%);
    border-color: rgba(235, 214, 152, 0.8);
    color: #000000;
    box-shadow: 0 4px 14px rgba(235, 214, 152, 0.35);
}

.focus-mode-btn {
    background: rgba(52, 73, 94, 0.1);
    border-color: rgba(52, 73, 94, 0.3);
    color: #2c3e50;
}

.focus-mode-btn:hover {
    background: rgba(52, 73, 94, 0.2);
    border-color: rgba(52, 73, 94, 0.5);
}

.focus-mode-btn.is-active {
    background: var(--baize-blue-button-bg);
    border-color: var(--baize-blue-button-border);
    color: var(--baize-blue-button-text);
    box-shadow: var(--baize-blue-button-shadow);
}

.logo-section {
    display: flex;
    align-items: center;
    gap: 15px;
}

.logo-section img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 2px solid rgba(52, 152, 219, 0.5);
    transition: all 0.3s ease;
}

.brand-text {
    font-size: 0.95rem;
    font-weight: 600;
    color: #EBD698;
}

.brand-text-main {
    font-size: inherit;
}

.brand-text-expired .brand-text-main {
    font-size: 0.82rem;
}

.membership-expired-tip {
    margin-left: 10px;
    color: #ffb3a8;
    font-size: 0.82rem;
    font-weight: 600;
}

.membership-expired-renew-link {
    color: #ffd18f;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.membership-expired-renew-link:hover {
    color: #ffe3ba;
}

.brand-text {
    color: #2c3e50;
}

.membership-expired-tip {
    color: #b42318;
}

.membership-expired-renew-link {
    color: #0f4c81;
}

.membership-expired-renew-link:hover {
    color: #0b3a63;
}

.mobile-menu-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.76), rgba(237, 247, 255, 0.5));
    border: 1px solid rgba(42, 91, 126, 0.18);
    border-radius: 10px;
    font-size: 1.05rem;
    cursor: pointer;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72), 0 8px 18px rgba(15, 42, 64, 0.08);
    -webkit-backdrop-filter: blur(14px) saturate(150%);
    backdrop-filter: blur(14px) saturate(150%);
    transition: all 0.3s ease;
    color: #12263a;
}

/* Tablet layout sizing for report selector */
@media (max-width: 900px) and (min-width: 601px) {
    .hexagon-container {
    height: 350px;
    --hex-radius: 120px;
}

    .hexagon-shape {
    width: 95px;
    height: 95px;
}

    .hexagon-content span {
    font-size: 12.5px;
}

    .report-circle {
    width: 85px;
    height: 85px;
}

    .report-circle label span {
    font-size: 12.5px;
}
}

/* Tablet & Desktop: keep nav compact */
@media (min-width: 601px) {
    .navbar {
    padding: 4px 12px;
}

    .logo-section {
    gap: 10px;
}

    .logo-section img {
    width: 30px;
    height: 30px;
}

    .brand-text {
    font-size: 0.9rem;
}

    .mobile-menu-btn {
    font-size: 1rem;
}
}

@media (max-width: 600px) {
    .nav-register-btn {
    padding: 6px 8px;
}

    .nav-register-btn span {
    display: none;
}

    .membership-expired-tip {
    margin-left: 6px;
    font-size: 0.75rem;
}

    .brand-text-expired .brand-text-main {
    font-size: 0.75rem;
}
}

/* dashboard.php mobile three-page shell */
.dash-mobile-topbar,
.dash-mobile-bottom-nav,
.dash-mobile-customer-btn {
    display: none;
}

.dash-page .dash-qr-logo-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
    cursor: pointer;
    line-height: 0;
}

.dash-page .dash-qr-logo {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    border: 3px solid rgba(194, 144, 73, 0.9);
    box-shadow:
        0 0 0 4px rgba(235, 214, 152, 0.22),
        0 0 24px rgba(194, 144, 73, 0.34);
    transition: all 0.3s ease;
}

.dash-page .dash-qr-logo-button:hover .dash-qr-logo,
.dash-page .dash-qr-logo-button:focus-visible .dash-qr-logo {
    border-color: rgba(194, 144, 73, 0.95);
    box-shadow:
        0 0 0 4px rgba(235, 214, 152, 0.28),
        0 0 28px rgba(194, 144, 73, 0.4),
        0 10px 24px rgba(15, 42, 64, 0.12);
    transform: translateY(-1px);
}

.dash-page .dash-qr-logo-button:focus-visible {
    outline: 2px solid rgba(194, 144, 73, 0.52);
    outline-offset: 4px;
}

.dash-page .dash-qr-brand-card {
    text-align: center;
    margin-bottom: 20px;
}

.dash-page .dash-language-switcher {
    display: none;
}

.dash-page .dash-language-select {
    width: auto;
    display: inline-block;
    min-width: 150px;
}

.dash-page .dash-qr-card__title {
    margin-bottom: 10px;
    font-weight: 600;
}

.dash-page .dash-qr-card--blue .dash-qr-card__title i {
    color: #57c0ea;
}

.dash-page .dash-qr-card--pink .dash-qr-card__title i {
    color: #eb5f86;
}

.dash-page .dash-qr-help-card,
.dash-page .dash-qr-pager {
    display: none;
}

@media (max-width: 768px) {
    body.dash-page {
    --dash-mobile-topbar-height: calc(46px + env(safe-area-inset-top, 0px));
    --dash-mobile-bottom-nav-height: calc(72px + env(safe-area-inset-bottom, 0px));
    --dash-mobile-keyboard-offset: 0px;
    --dash-mobile-chat-input-height: 58px;
    --dash-mobile-chat-reply-clearance: 40px;
    --dash-blue: #1f4e79;
    --dash-blue-soft: var(--baize-blue-soft-bg);
    --dash-pink: #eb5f86;
    --dash-text: #111827;
    --dash-muted: #6b7280;
    --dash-card: #ffffff;
    --dash-bg: #f5f7fb;
    --dash-line: #e5e9f2;
    height: var(--dash-mobile-layout-height, 100vh);
    min-height: var(--dash-mobile-layout-height, 100vh);
    overflow: hidden;
    background-image: url('https://xcnd.net/img/stars3.jpg?v=20260528_114157');
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    color: var(--dash-text);
}

    body.dash-page .chat-topbar {
    display: none;
}

    body.dash-page .dash-mobile-topbar__chat-actions .chat-action-label {
    display: none;
}

    body.dash-page.dash-membership-expired {
    --dash-mobile-topbar-height: calc(58px + env(safe-area-inset-top, 0px));
}

    body.dash-page .dashboard-loading-screen {
    z-index: 6000;
}

    body.dash-page .navbar,
body.dash-page .footer,
body.dash-page .archive-focus-btn,
body.dash-page .focus-mode-btn,
body.dash-page .hero-buttons {
    display: none !important;
}

    body.dash-page .dash-mobile-topbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 2500;
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr) auto 32px;
    align-items: center;
    min-height: var(--dash-mobile-topbar-height);
    padding: calc(env(safe-area-inset-top, 0px) + 3px) 12px 3px 12px;
    background: rgba(255, 255, 255, 0.98);
    border-bottom: 1px solid rgba(17, 24, 39, 0.08);
    box-shadow: 0 7px 20px rgba(15, 23, 42, 0.07);
}

    body.dash-page .dash-mobile-topbar__button {
    width: 32px;
    height: 32px;
    border: 1px solid rgba(42, 91, 126, 0.18);
    border-radius: 10px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.76), rgba(237, 247, 255, 0.5));
    color: #12263a;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72), 0 8px 18px rgba(15, 42, 64, 0.08);
    -webkit-backdrop-filter: blur(14px) saturate(150%);
    backdrop-filter: blur(14px) saturate(150%);
    font-size: 18px;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

    body.dash-page .dash-mobile-topbar__button:last-child {
    grid-column: 4;
    justify-self: end;
}

    body.dash-page .dash-mobile-topbar__title {
    min-width: 0;
    text-align: left;
    color: #050505;
    font-size: clamp(0.82rem, 3.3vw, 0.94rem);
    font-weight: 600;
    letter-spacing: 0;
    padding-left: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

    body.dash-page .dash-mobile-topbar__welcome {
    display: block;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
}

    body.dash-page .dash-mobile-topbar__title--expired {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 2px;
    line-height: 1.08;
}

    body.dash-page .dash-mobile-expired-tip {
    display: block;
    color: #b42318;
    font-size: clamp(0.62rem, 2.45vw, 0.72rem);
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

    body.dash-page .dash-mobile-expired-renew-link {
    color: #0f4c81;
    text-decoration: underline;
    text-underline-offset: 2px;
}

    body.dash-page .dash-mobile-topbar__chat-actions {
    display: none;
    align-items: center;
    justify-content: flex-end;
    min-width: 0;
    margin-right: 3px;
}

    body.dash-page[data-dash-mobile-page="chat"] .dash-mobile-topbar__chat-actions {
    display: flex;
}

    body.dash-page .dash-mobile-topbar__chat-actions .button-area {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
    margin: 0;
    padding: 0;
    background: transparent !important;
}

    body.dash-page .dash-mobile-topbar__chat-actions .chat-action-icon-btn {
    width: 32px;
    height: 32px;
    min-width: 32px;
    margin: 0;
    padding: 0;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #111;
    background: rgba(255, 255, 255, 0.74);
    border: 1px solid rgba(226, 232, 240, 0.92);
    box-shadow: 0 6px 16px rgba(15, 23, 42, 0.08);
    font-size: 15px;
    line-height: 1;
}

    body.dash-page .dash-mobile-register-btn {
    grid-column: 3;
    justify-self: end;
    display: none;
    align-items: center;
    justify-content: center;
    gap: 4px;
    min-height: 32px;
    padding: 0 9px;
    border: 1px solid rgba(42, 91, 126, 0.18);
    border-radius: 12px;
    color: #12263a;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.76), rgba(237, 247, 255, 0.5));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72), 0 8px 18px rgba(15, 42, 64, 0.08);
    -webkit-backdrop-filter: blur(14px) saturate(150%);
    backdrop-filter: blur(14px) saturate(150%);
    text-decoration: none;
    font-size: clamp(0.68rem, 2.8vw, 0.78rem);
    font-weight: 800;
    line-height: 1;
    white-space: nowrap;
}

    body.dash-page[data-dash-mobile-page="qr"] .dash-mobile-register-btn,
body.dash-page[data-dash-mobile-page="archive"] .dash-mobile-register-btn {
    display: inline-flex;
}

    body.dash-page .dash-mobile-register-btn i {
    font-size: 0.92em;
}

    body.dash-page .main-content {
    height: var(--dash-mobile-layout-height, 100vh);
    max-width: none;
    width: 100%;
    margin: 0;
    padding: var(--dash-mobile-topbar-height) 0 var(--dash-mobile-bottom-nav-height) !important;
    overflow: hidden;
    display: block;
    background: transparent;
}

    body.dash-page .desktop-layout-container {
    display: none;
    height: 100%;
    min-height: 0;
    width: 100%;
    overflow: hidden;
}

    body.dash-page[data-dash-mobile-page="archive"] .desktop-layout-container,
body.dash-page[data-dash-mobile-page="chat"] .desktop-layout-container {
    display: block;
}

    body.dash-page .dash-mobile-page {
    display: none !important;
}

    body.dash-page[data-dash-mobile-page="qr"] .dash-mobile-page-qr,
body.dash-page[data-dash-mobile-page="archive"] .dash-mobile-page-archive,
body.dash-page[data-dash-mobile-page="chat"] .dash-mobile-page-chat {
    display: flex !important;
}

    body.dash-page .hero-section,
body.dash-page #health_forms_data,
body.dash-page #xcbz {
    width: 100%;
    max-width: none;
    height: 100%;
    max-height: none;
    min-height: 0;
    margin: 0;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    backdrop-filter: none;
    color: var(--dash-text);
    background: transparent;
}

    body.dash-page .hero-section {
    flex-direction: column;
    gap: 12px;
    padding: 14px 7px 14px;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
}

    body.dash-page[data-dash-mobile-page="qr"] .hero-section {
    padding-left: 21px;
    padding-right: 21px;
    justify-content: flex-start;
    overflow-y: auto !important;
    overscroll-behavior-y: contain;
    touch-action: pan-y;
    scroll-padding-bottom: calc(var(--dash-mobile-bottom-nav-height) + 24px);
    padding-bottom: calc(24px + env(safe-area-inset-bottom, 0px));
}

    body.dash-page[data-dash-mobile-page="qr"] .hero-section > * {
    flex: 0 0 auto;
}

    body.dash-page .dash-qr-brand-card,
body.dash-page .dash-qr-card,
body.dash-page .dash-qr-help-card,
body.dash-page .dash-customer-select-card,
body.dash-page #health_forms_data > .tab-content.active,
body.dash-page #health_forms_data > .action-buttons,
body.dash-page .chat-container {
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid rgba(226, 232, 240, 0.95);
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
}

    body.dash-page[data-dash-mobile-page="qr"] .dash-qr-brand-card,
body.dash-page[data-dash-mobile-page="qr"] .dash-qr-card,
body.dash-page[data-dash-mobile-page="qr"] .dash-qr-help-card {
    background: rgba(255, 255, 255, 0.40);
}

    body.dash-page .dash-qr-brand-card {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: clamp(12px, 4vw, 24px);
    min-height: 62px;
    margin: 0;
    padding: 10px 20px;
    border-radius: 18px;
}

    body.dash-page .dash-qr-logo {
    width: 31.2px !important;
    height: 31.2px !important;
    flex: 0 0 31.2px;
    border: 1.5px solid rgba(194, 144, 73, 0.9);
    box-shadow:
        0 0 0 3px rgba(235, 214, 152, 0.2),
        0 0 14px rgba(194, 144, 73, 0.28),
        0 6px 14px rgba(15, 23, 42, 0.1);
}

    body.dash-page .dash-qr-brand-content {
    flex: 0 1 auto;
    display: grid;
    justify-items: center;
    min-width: 0;
    padding-left: 0;
}

    body.dash-page .hero-title {
    margin: 0 0 10px;
    color: #111;
    width: max-content;
    max-width: 100%;
    font-size: clamp(0.78rem, 3.4vw, 0.94rem);
    font-weight: 800;
    line-height: 1.1;
    text-align: center;
    letter-spacing: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

    body.dash-page .dash-language-select {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

    body.dash-page .dash-language-switcher {
    display: inline-grid;
    grid-template-columns: repeat(3, max-content);
    justify-self: center;
    width: max-content;
    max-width: 100%;
    overflow: hidden;
    border-radius: 7px;
    background: #f1f3f7;
    border: 1px solid #e5e7eb;
}

    body.dash-page .dash-language-option {
    min-width: 0;
    min-height: 28px;
    padding: 0 10px;
    border: 0;
    border-right: 1px solid rgba(17, 24, 39, 0.08);
    background: transparent;
    color: #111;
    font-size: clamp(0.62rem, 2.6vw, 0.76rem);
    font-weight: 700;
    letter-spacing: 0;
    cursor: pointer;
}

    body.dash-page .dash-language-option:last-child {
    border-right: 0;
}

    body.dash-page .dash-language-option.active {
    color: #fff;
    background: var(--baize-blue-button-bg);
    box-shadow: var(--baize-blue-button-shadow);
}

    body.dash-page .qr-container.dash-qr-card-list {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: 100%;
    grid-template-columns: none;
    gap: 0;
    margin: 0;
    width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    scroll-padding-left: 0;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

    body.dash-page .qr-container.dash-qr-card-list::-webkit-scrollbar {
    display: none;
}

    body.dash-page .dash-qr-page {
    width: 100%;
    min-width: 0;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px;
    scroll-snap-align: start;
    scroll-snap-stop: always;
}

    body.dash-page .qr-item.dash-qr-card {
    width: 100%;
    min-width: 0;
    padding: 10px 5px;
    border-radius: 18px;
    text-align: center;
    scroll-snap-align: none;
}

    body.dash-page .dash-qr-card__title {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 34px;
    margin: 0;
    color: #0b0f18;
    font-size: clamp(0.78rem, 3.4vw, 0.94rem);
    font-weight: 800;
    line-height: 1.15;
}

    body.dash-page .dash-qr-card__title i {
    flex: 0 0 auto;
    font-size: 0.92em;
}

    body.dash-page .dash-qr-card__title span {
    min-width: 0;
    overflow-wrap: anywhere;
}

    body.dash-page .dash-qr-card--blue .dash-qr-card__title i {
    color: #57c0ea;
}

    body.dash-page .dash-qr-card--pink .dash-qr-card__title i {
    color: var(--dash-pink);
}

    body.dash-page .dash-qr-card--green .dash-qr-card__title i {
    color: #16a34a;
}

    body.dash-page .dash-qr-card__divider {
    display: none;
}

    body.dash-page .dash-qr-card__image-link {
    display: block;
    width: 70%;
    max-width: 132px;
    margin: 0 auto;
    padding: 4px;
    border-radius: 13px;
    border: 1px solid rgba(255, 255, 255, 0.58);
    background: rgba(255, 255, 255, 0.34);
    box-shadow:
            0 14px 32px rgba(15, 23, 42, 0.12),
            inset 0 1px 0 rgba(255, 255, 255, 0.82),
            inset 0 -1px 0 rgba(255, 255, 255, 0.24);
    backdrop-filter: blur(16px) saturate(170%);
    -webkit-backdrop-filter: blur(16px) saturate(170%);
}

    body.dash-page .qr-item img {
    display: block;
    width: 100%;
    max-width: none;
    height: auto;
    margin: 0 auto;
    border-radius: 8px;
}

    body.dash-page .dash-qr-pager {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin: 0;
}

    body.dash-page[data-dash-mobile-page="qr"] .dash-qr-pager {
    display: none;
}

    body.dash-page .dash-qr-pager span {
    width: 32px;
    height: 8px;
    border-radius: 999px;
    background: #d7dce4;
}

    body.dash-page .dash-qr-pager span.active {
    width: 48px;
    background: var(--baize-blue-button-bg);
}

    body.dash-page .dash-qr-help-card {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    margin: 0 4px;
    padding: 18px;
    border-radius: 16px;
    text-align: center;
}

    body.dash-page .dash-qr-help-card > div {
    width: 100%;
}

    body.dash-page .dash-qr-help-section + .dash-qr-help-section {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid rgba(31, 78, 121, 0.14);
}

    body.dash-page .dash-qr-help-card strong {
    display: block;
    margin-bottom: 6px;
    color: #0f172a !important;
    font-size: 1.05rem;
    font-weight: 800;
}

    body.dash-page .dash-qr-help-card p {
    margin: 0;
    color: #1f2937 !important;
    font-size: 0.88rem;
    font-weight: 600;
    line-height: 1.4;
    text-shadow: none;
}

    body.dash-page .dash-qr-expired-notice {
    display: grid;
    gap: 10px;
    justify-items: center;
    width: 100%;
    margin: 12px auto 0;
    padding: 13px 12px;
    border: 1px solid rgba(31, 111, 160, 0.18);
    border-radius: 16px;
    color: #12263a;
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.86), rgba(235, 246, 252, 0.72));
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.78),
        0 14px 28px rgba(31, 78, 121, 0.12);
    -webkit-backdrop-filter: blur(16px) saturate(155%);
    backdrop-filter: blur(16px) saturate(155%);
}

    body.dash-page .dash-meeting-poster {
    display: none;
    width: min(100%, 280px);
    max-width: 100%;
    margin: 12px auto 0;
    border-radius: 14px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.72);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.78),
        0 14px 28px rgba(31, 78, 121, 0.14);
}

    body.dash-page .dash-meeting-poster img {
    display: block;
    width: 100%;
    max-width: 100%;
    height: auto;
    border-radius: 14px;
}

    body.dash-page .dash-qr-expired-notice__text {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    max-width: 100%;
    color: #123c5b;
    font-size: clamp(0.78rem, 3.2vw, 0.9rem);
    font-weight: 800;
    line-height: 1.35;
}

    body.dash-page .dash-qr-expired-notice__text i {
    flex: 0 0 auto;
    color: #1f6fa0;
}

    body.dash-page .dash-qr-renew-btn {
    position: relative;
    isolation: isolate;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 40px;
    min-width: min(100%, 168px);
    padding: 0 18px;
    border: 1px solid rgba(220, 38, 38, 0.36);
    border-radius: 999px;
    color: #ffffff;
    background: linear-gradient(135deg, rgba(168, 39, 54, 0.9), rgba(224, 86, 94, 0.78));
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.34),
        0 10px 24px rgba(220, 38, 38, 0.2);
    font-family: var(--app-font-sans);
    font-size: clamp(0.82rem, 3.3vw, 0.94rem);
    font-weight: 850;
    cursor: pointer;
    overflow: visible;
    animation: dashQrRenewButtonLift 2.2s ease-in-out infinite;
}

    body.dash-page .dash-qr-renew-btn::before {
    content: '';
    position: absolute;
    inset: -7px;
    z-index: -1;
    border-radius: inherit;
    background: radial-gradient(circle, rgba(248, 113, 113, 0.42) 0%, rgba(248, 113, 113, 0) 68%);
    opacity: 0.75;
    animation: dashQrRenewGlow 1.7s ease-in-out infinite;
}

    body.dash-page .dash-qr-renew-btn:hover {
    transform: translateY(-1px);
    background: linear-gradient(135deg, rgba(153, 27, 27, 0.94), rgba(220, 38, 38, 0.84));
}

@keyframes dashQrRenewGlow {
    0%,
    100% {
        opacity: 0.45;
        transform: scale(0.96);
    }

    50% {
        opacity: 1;
        transform: scale(1.08);
    }
}

@keyframes dashQrRenewButtonLift {
    0%,
    100% {
        box-shadow:
            inset 0 1px 0 rgba(255, 255, 255, 0.34),
            0 10px 24px rgba(220, 38, 38, 0.2);
    }

    50% {
        box-shadow:
            inset 0 1px 0 rgba(255, 255, 255, 0.42),
            0 14px 30px rgba(220, 38, 38, 0.32);
    }
}

    body.dash-page #health_forms_data {
    flex-direction: column;
    gap: 0;
    padding: 10px 5px 10px;
    overflow: hidden;
}

    body.dash-page #health_forms_data .archive-section-header {
    display: none;
}

    body.dash-page .dash-customer-select-card {
    flex: 0 0 auto;
    margin: 0 4px 10px;
    padding: 12px;
    border: 1px solid rgba(255, 255, 255, 0.62);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.34);
    box-shadow: 0 14px 30px rgba(15, 42, 64, 0.11);
    -webkit-backdrop-filter: blur(18px) saturate(160%);
    backdrop-filter: blur(18px) saturate(160%);
}

    body.dash-page .dash-customer-select-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 48px 48px;
    gap: 10px;
    align-items: center;
}

    body.dash-page .dash-customer-select-row .form-group {
    margin: 0;
}

    body.dash-page .form-select {
    min-height: 44px;
    border: 1.5px solid #b7bfcb;
    border-radius: 7px;
    color: #111827;
    background-color: #fff;
    font-size: clamp(0.8rem, 3.3vw, 0.9rem);
    padding: 0 28px 0 10px;
    box-shadow: none;
}

    body.dash-page .dash-customer-select-row .form-select {
    min-height: 48px;
    border: 1px solid rgba(42, 91, 126, 0.2);
    border-radius: 16px;
    color: #12263a;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.76), rgba(237, 247, 255, 0.5));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72), 0 10px 24px rgba(15, 42, 64, 0.08);
    -webkit-backdrop-filter: blur(16px) saturate(155%);
    backdrop-filter: blur(16px) saturate(155%);
}

    body.dash-page .dash-customer-select-row .form-select:focus {
    border-color: rgba(22, 113, 166, 0.44);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.78), 0 0 0 3px rgba(21, 106, 156, 0.12), 0 12px 26px rgba(15, 42, 64, 0.1);
    outline: none;
}

    body.dash-page .dash-mobile-customer-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border: 1px solid rgba(255, 255, 255, 0.64);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.54);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72), 0 12px 24px rgba(15, 42, 64, 0.1);
    -webkit-backdrop-filter: blur(16px) saturate(155%);
    backdrop-filter: blur(16px) saturate(155%);
    font-size: 20px;
    cursor: pointer;
    transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}

    body.dash-page .dash-mobile-customer-btn:active {
    transform: scale(0.96);
}

    body.dash-page .dash-mobile-customer-btn > i {
    font-size: 18px;
    line-height: 1;
}

    body.dash-page .dash-mobile-customer-btn--add {
    color: #0a5e91;
    border-color: rgba(31, 111, 160, 0.25);
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.82), rgba(220, 239, 251, 0.56));
}

    body.dash-page .dash-mobile-customer-btn--delete {
    color: #d8172a;
    border-color: rgba(239, 35, 47, 0.3);
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.84), rgba(255, 230, 235, 0.58));
}

    body.dash-page #health_forms_data > .tab-container:not(.action-buttons) {
    flex: 0 0 auto;
    display: flex;
    flex-wrap: nowrap;
    justify-content: flex-start;
    gap: 8px;
    margin: 0 4px 5px;
    padding: 4px 8px;
    max-width: calc(100% - 8px);
    overflow-x: scroll;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-x;
    overscroll-behavior-x: contain;
    scroll-snap-type: none;
    scroll-padding-left: 0;
    direction: ltr;
    border: 1px solid rgba(255, 255, 255, 0.62);
    border-radius: 18px;
    scrollbar-width: none;
    background: rgba(255, 255, 255, 0.34);
    box-shadow: 0 14px 30px rgba(15, 42, 64, 0.1);
    -webkit-backdrop-filter: blur(18px) saturate(160%);
    backdrop-filter: blur(18px) saturate(160%);
}

    body.dash-page #health_forms_data > .tab-container:not(.action-buttons)::-webkit-scrollbar {
    display: none;
}

    body.dash-page #health_forms_data > .tab-container:not(.action-buttons) .tab-button {
    flex: 0 0 auto;
    min-width: 86px;
    min-height: 42px;
    padding: 0 12px;
    position: relative;
    border: 1px solid rgba(42, 91, 126, 0.18);
    border-radius: 14px;
    color: #334155;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.78), rgba(237, 247, 255, 0.48));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72), 0 8px 18px rgba(15, 42, 64, 0.07);
    font-size: clamp(0.68rem, 2.8vw, 0.78rem);
    font-weight: 700 !important;
    white-space: nowrap;
    scroll-snap-align: none;
    gap: 4px;
    min-inline-size: max-content;
    -webkit-backdrop-filter: blur(14px) saturate(150%);
    backdrop-filter: blur(14px) saturate(150%);
    transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease, background 160ms ease;
}

    body.dash-page #health_forms_data > .tab-container:not(.action-buttons) .tab-button:active {
    transform: scale(0.97);
}

    body.dash-page #health_forms_data > .tab-container:not(.action-buttons) .tab-button i {
    font-size: 0.95em;
    margin-right: 3px;
}

    body.dash-page #health_forms_data > .tab-container:not(.action-buttons) .tab-button:first-child {
    border-top-left-radius: 14px;
    border-bottom-left-radius: 14px;
    margin-left: 0;
}

    body.dash-page #health_forms_data > .tab-container:not(.action-buttons) .tab-button:last-child {
    border-right: 1px solid rgba(42, 91, 126, 0.18);
    border-top-right-radius: 14px;
    border-bottom-right-radius: 14px;
}

    body.dash-page #health_forms_data > .tab-container:not(.action-buttons) .tab-button.active,
    body.dash-page #health_forms_data > .tab-container:not(.action-buttons) .tab-button:active {
    color: #0a5e91 !important;
    border-color: rgba(31, 111, 160, 0.25);
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.82), rgba(220, 239, 251, 0.56)) !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72), 0 12px 24px rgba(15, 42, 64, 0.1);
    -webkit-backdrop-filter: blur(16px) saturate(155%);
    backdrop-filter: blur(16px) saturate(155%);
    text-shadow: none;
}

    body.dash-page #health_forms_data > .tab-container:not(.action-buttons) .tab-button.active i,
    body.dash-page #health_forms_data > .tab-container:not(.action-buttons) .tab-button:active i {
    color: #0a5e91 !important;
}

    body.dash-page #health_forms_data > .tab-container:not(.action-buttons) .tab-button:first-child.active {
    min-width: 104px;
    border-right: 1px solid rgba(31, 111, 160, 0.36);
}

    body.dash-page #health_forms_data > .tab-content {
    display: none;
}

    body.dash-page #health_forms_data > .tab-content.active {
    display: flex;
    flex: 1 1 auto;
    min-height: 0;
    margin: 0 4px;
    padding: 7px 7px;
    border-radius: 0 0 12px 12px;
    overflow: hidden;
}

    body.dash-page #health_forms_data > .archive-textarea-tab.active {
    flex-direction: column;
    border-radius: 14px;
}

    body.dash-page #health_forms_data .form-textarea {
    flex: 1 1 auto;
    width: 100%;
    min-height: 0;
    height: 100%;
    resize: none;
    border: 0;
    border-radius: inherit;
    color: #111;
    background: transparent;
    box-shadow: none;
    font-size: clamp(0.82rem, 3.3vw, 0.96rem);
    line-height: 1.58;
    padding: 0;
}

    body.dash-page #health_forms_data .form-textarea::placeholder {
    color: #7b828e;
    opacity: 1;
}

    body.dash-page #tab-analysis.active {
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

    body.dash-page #tab-analysis.active .medical-report-panel {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100%;
    min-height: 100%;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    overflow: visible;
}

    body.dash-page #tab-analysis .medical-report-content-shell {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    min-height: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

    body.dash-page #tab-analysis .medical-report-content-shell .report-tab-content .form-textarea {
    flex: 1 1 auto;
    min-height: 0;
    padding: 8px 2px 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

    body.dash-page #tab-analysis .medical-report-content-shell .report-tab-content[style*="display: block"] {
    flex: 1 1 auto;
    display: flex !important;
    flex-direction: column;
    min-height: 0;
}

    body.dash-page #tab-analysis .medical-report-content-shell .report-tab-content[style*="display: block"] > .w3-center {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

    body.dash-page #tab-analysis .report-tab-nav {
    display: flex;
    flex-wrap: nowrap;
    gap: 6px;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-x;
    scrollbar-width: none;
    padding: 0 2px 8px;
    margin: 0 0 10px;
}

    body.dash-page #tab-analysis .report-tab-nav::-webkit-scrollbar {
    display: none;
}

    body.dash-page #tab-analysis .report-tab-nav .report-tab-button {
    flex: 0 0 auto;
    min-width: 68px;
    min-height: 34px;
    padding: 0 9px;
    border-radius: 9px;
    font-size: 0.72rem;
    white-space: nowrap;
}

    body.dash-page #tab-analysis .report-tab-nav .report-tab-icon {
    font-size: 0.92em;
    margin-right: 3px;
}

    body.dash-page .health-form-qr-container {
    margin: 0 auto 10px;
    padding: 10px;
    border-radius: 12px;
    border: 0;
    background: rgba(255, 255, 255, 0.97);
    box-shadow: none;
}

    body.dash-page #health_forms_data > .action-buttons {
    flex: 0 0 auto;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin: 5px 4px 0 !important;
    padding: 8px;
    border: 1px solid rgba(255, 255, 255, 0.62);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.34);
    box-shadow: 0 14px 30px rgba(15, 42, 64, 0.1);
    -webkit-backdrop-filter: blur(18px) saturate(160%);
    backdrop-filter: blur(18px) saturate(160%);
}

    body.dash-page #health_forms_data > .action-buttons .tab-button {
    width: 100%;
    min-width: 0 !important;
    max-width: 100%;
    min-height: 46px;
    border: 1px solid rgba(42, 91, 126, 0.18);
    border-radius: 16px;
    padding: 0 8px;
    color: #12263a;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.78), rgba(237, 247, 255, 0.5));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72), 0 8px 18px rgba(15, 42, 64, 0.07);
    font-size: clamp(0.78rem, 3.2vw, 0.92rem);
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    gap: 5px;
    justify-content: center;
    -webkit-backdrop-filter: blur(14px) saturate(150%);
    backdrop-filter: blur(14px) saturate(150%);
}

    body.dash-page #health_forms_data > .action-buttons .tab-button i {
    flex: 0 0 auto;
    font-size: 0.95em;
}

    /* dash archive connected mobile workspace */
    body.dash-page[data-dash-mobile-page="archive"] #health_forms_data {
    padding: 0;
    background: rgba(255, 255, 255, 0.96);
}

    body.dash-page[data-dash-mobile-page="archive"] #health_forms_data > .tab-content.active {
    margin: 0 !important;
    max-width: none;
    width: 100%;
    border-left: 0;
    border-right: 0;
    border-radius: 0;
    box-shadow: none;
    background: rgba(255, 255, 255, 0.97);
}

    body.dash-page[data-dash-mobile-page="archive"] .dash-customer-select-card {
    margin-bottom: 5px;
    padding: 10px 8px;
    border: 1px solid rgba(255, 255, 255, 0.62);
}

    body.dash-page[data-dash-mobile-page="archive"] #health_forms_data > .tab-container:not(.action-buttons) {
    padding: 4px 8px;
}

    body.dash-page[data-dash-mobile-page="archive"] #health_forms_data > .tab-container:not(.action-buttons) .tab-button:first-child,
body.dash-page[data-dash-mobile-page="archive"] #health_forms_data > .tab-container:not(.action-buttons) .tab-button:last-child {
    border-radius: 14px;
}

    body.dash-page[data-dash-mobile-page="archive"] #health_forms_data > .tab-content.active {
    padding: 6px 8px;
    border-top: 0;
    border-bottom: 1px solid var(--dash-line);
}

    body.dash-page[data-dash-mobile-page="archive"] #tab-health-form.qr-visible {
    justify-content: center;
    align-items: center;
}

    body.dash-page[data-dash-mobile-page="archive"] #tab-health-form.qr-visible #health-form-qr-container {
    margin: auto;
}

    body.dash-page[data-dash-mobile-page="archive"] #tab-health-form {
    position: relative;
    --health-form-fullscreen-button-gap: 18px;
    --health-form-fullscreen-font-size: inherit;
}

    body.dash-page[data-dash-mobile-page="archive"] #tab-health-form:not(.qr-visible) > #health-form {
    padding-top: 0;
    padding-right: 58px;
}

    body.dash-page[data-dash-mobile-page="archive"] #tab-health-form:not(.qr-visible) .health-form-fullscreen-toggle {
    position: absolute;
    top: 14px;
    right: var(--health-form-fullscreen-button-gap);
    z-index: 4;
    display: inline-flex;
    width: 34px;
    height: 34px;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(31, 78, 121, 0.16);
    border-radius: 999px;
    color: #0a5e91;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.86), rgba(220, 239, 251, 0.7));
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.74),
        0 8px 18px rgba(15, 42, 64, 0.12);
    -webkit-backdrop-filter: blur(14px) saturate(150%);
    backdrop-filter: blur(14px) saturate(150%);
}

    body.dash-page[data-dash-mobile-page="archive"] #tab-health-form .health-form-font-toggle {
    position: absolute;
    right: var(--health-form-fullscreen-button-gap);
    z-index: 4;
    display: none;
    width: 34px;
    height: 34px;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(31, 78, 121, 0.16);
    border-radius: 999px;
    color: #0a5e91;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.86), rgba(220, 239, 251, 0.7));
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.74),
        0 8px 18px rgba(15, 42, 64, 0.12);
    -webkit-backdrop-filter: blur(14px) saturate(150%);
    backdrop-filter: blur(14px) saturate(150%);
}

    body.dash-page[data-dash-mobile-page="archive"] #tab-health-form.qr-visible .health-form-fullscreen-toggle {
    display: none;
}

    body.dash-page[data-dash-mobile-page="archive"] #tab-health-form.qr-visible .health-form-font-toggle {
    display: none;
}

    body.dash-page.dash-health-form-expanded {
    overflow: hidden;
}

    body.dash-page.dash-health-form-expanded #health_forms_data > #tab-health-form.tab-content.active {
    position: fixed;
    inset: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
    z-index: 10060;
    display: flex !important;
    flex-direction: column;
    width: auto;
    max-width: none;
    min-height: 0;
    margin: 0 !important;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: #fff;
    box-shadow: none;
    overflow: hidden;
}

    body.dash-page.dash-health-form-expanded #tab-health-form #health-form-qr-container {
    display: none !important;
}

    body.dash-page.dash-health-form-expanded #tab-health-form > #health-form {
    display: block !important;
    flex: 1 1 auto;
    min-height: 0;
    height: 100%;
    padding: 52px 58px 16px 16px;
    border: 0;
    border-radius: 0;
    background: #fff;
    box-shadow: none;
    font-size: var(--health-form-fullscreen-font-size);
    resize: none;
}

    body.dash-page.dash-health-form-expanded #tab-health-form .health-form-fullscreen-toggle {
    top: 24px;
    right: var(--health-form-fullscreen-button-gap);
}

    body.dash-page.dash-health-form-expanded #tab-health-form .health-form-font-toggle {
    display: inline-flex;
}

    body.dash-page.dash-health-form-expanded #tab-health-form .health-form-font-increase {
    top: 66px;
}

    body.dash-page.dash-health-form-expanded #tab-health-form .health-form-font-decrease {
    top: 108px;
}

@media (min-width: 700px) and (max-width: 1024px) {
    body.dash-page[data-dash-mobile-page="archive"] #tab-health-form {
        --health-form-fullscreen-button-gap: 42px;
    }

    body.dash-page[data-dash-mobile-page="archive"] #tab-health-form:not(.qr-visible) > #health-form {
        padding-right: 84px;
    }

    body.dash-page.dash-health-form-expanded #tab-health-form > #health-form {
        padding-right: 84px;
    }
}

    body.dash-page[data-dash-mobile-page="archive"] #health_forms_data > .action-buttons {
    padding: 8px;
}

    body.dash-page #analyse-form-button {
    color: #fff !important;
    border-color: rgba(31, 111, 160, 0.36);
    background: linear-gradient(135deg, rgba(31, 78, 121, 0.82), rgba(74, 141, 184, 0.64)) !important;
    box-shadow: 0 8px 18px rgba(15, 42, 64, 0.07);
    text-shadow: none;
    -webkit-backdrop-filter: blur(14px) saturate(150%);
    backdrop-filter: blur(14px) saturate(150%);
}

    body.dash-page #analyse-form-button i {
    color: #fff !important;
}

    body.dash-page #save-button {
    color: #12263a;
    border-color: rgba(42, 91, 126, 0.18);
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.82), rgba(237, 247, 255, 0.54));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72), 0 8px 18px rgba(15, 42, 64, 0.07);
}

    body.dash-page #xcbz {
    flex-direction: column;
    padding: 0;
    overflow: hidden;
}

    body.dash-page .chat-container {
    flex: 1 1 auto;
    width: 100%;
    height: 100%;
    max-height: none;
    min-height: 0;
    border-radius: 0;
    border: 0;
    box-shadow: none;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    filter: none;
    transform: none;
    contain: none;
    will-change: auto;
}

    body.dash-page .chat-messages {
    flex: 1 1 auto;
    height: auto;
    min-height: 0 !important;
    max-height: none !important;
    padding: 16px 0 calc(var(--dash-mobile-chat-input-height) + var(--dash-mobile-chat-reply-clearance));
    background: #fff;
}

    body.dash-page .message.user-message {
    padding-left: 0.25rem;
    padding-right: 0.25rem;
}

    body.dash-page .input-area {
    flex: 0 0 auto;
    position: fixed;
    left: 0;
    right: 0;
    bottom: var(--dash-mobile-bottom-nav-height);
    z-index: 2520;
    min-height: var(--dash-mobile-chat-input-height);
    padding: 6px 0 0;
    background: transparent;
    border-top: 0;
    box-shadow: none;
}

    body.dash-page[data-dash-mobile-page="chat"].dash-mobile-chat-input-focused .input-area {
    bottom: var(--dash-mobile-chat-input-bottom, 0px);
}

    body.dash-page .input-container {
    min-height: 52px;
    border: 1px solid var(--dash-line);
    border-radius: 0;
    background: #f8fafc;
}

    body.dash-page .message-input {
    color: #111;
    background: transparent;
}

    body.dash-page .send-btn {
    flex: 0 0 38px;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: 1px solid var(--baize-blue-button-border);
    background: var(--baize-blue-button-bg);
    color: var(--baize-blue-button-text);
    box-shadow: var(--baize-blue-button-shadow);
    font-size: 1.2rem;
    font-weight: 700;
}

    body.dash-page[data-dash-mobile-page="chat"] .dash-mobile-topbar__button,
body.dash-page[data-dash-mobile-page="chat"] .dash-mobile-topbar__chat-actions .chat-action-icon-btn,
body.dash-page[data-dash-mobile-page="chat"] .chat-mode-toggle,
body.dash-page[data-dash-mobile-page="chat"] .message-btn,
body.dash-page[data-dash-mobile-page="chat"] .chat-history-close,
body.dash-page[data-dash-mobile-page="chat"] .chat-history-menu-btn {
    border: 1px solid rgba(42, 91, 126, 0.18);
    color: #12263a;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.76), rgba(237, 247, 255, 0.5));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72), 0 8px 18px rgba(15, 42, 64, 0.08);
    -webkit-backdrop-filter: blur(14px) saturate(150%);
    backdrop-filter: blur(14px) saturate(150%);
}

    body.dash-page[data-dash-mobile-page="chat"] .send-btn {
    border-color: rgba(31, 111, 160, 0.36);
    background: linear-gradient(135deg, rgba(31, 78, 121, 0.82), rgba(74, 141, 184, 0.64));
    color: #fff;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.3), 0 9px 20px rgba(31, 111, 160, 0.18);
    -webkit-backdrop-filter: blur(14px) saturate(150%);
    backdrop-filter: blur(14px) saturate(150%);
}

    body.dash-page[data-dash-mobile-page="chat"] .chat-mode-menu {
    border: 1px solid rgba(255, 255, 255, 0.68);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.78);
    box-shadow: 0 18px 34px rgba(15, 42, 64, 0.13);
    -webkit-backdrop-filter: blur(18px) saturate(160%);
    backdrop-filter: blur(18px) saturate(160%);
}

    body.dash-page[data-dash-mobile-page="chat"] .chat-filter-btn,
body.dash-page[data-dash-mobile-page="chat"] .membership-renew-btn {
    border: 1px solid rgba(42, 91, 126, 0.18);
    color: #12263a;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.78), rgba(237, 247, 255, 0.5));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72), 0 8px 18px rgba(15, 42, 64, 0.08);
    -webkit-backdrop-filter: blur(14px) saturate(150%);
    backdrop-filter: blur(14px) saturate(150%);
}

    body.dash-page .dash-mobile-bottom-nav {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 2500;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    min-height: var(--dash-mobile-bottom-nav-height);
    padding: 7px 22px calc(env(safe-area-inset-bottom, 0px) + 7px);
    gap: 8px;
    background: rgba(255, 255, 255, 0.98);
    border-top: 1px solid rgba(17, 24, 39, 0.08);
    box-shadow: 0 -8px 20px rgba(15, 23, 42, 0.07);
}

    body.dash-page[data-dash-mobile-page="chat"].dash-mobile-chat-input-focused .dash-mobile-bottom-nav {
    display: none !important;
}

    body.dash-page[data-dash-mobile-page="archive"].dash-mobile-archive-editor-focused .dash-mobile-bottom-nav {
    display: none !important;
}

    body.dash-page[data-dash-mobile-page="archive"].dash-mobile-archive-editor-focused .main-content {
    padding-bottom: 0 !important;
}

    body.dash-page .dash-mobile-bottom-nav__item {
    min-width: 0;
    min-height: 50px;
    border: 0;
    border-radius: 14px;
    background: transparent;
    color: #3f3f46;
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    font-size: 0.76rem;
    font-weight: 700;
    letter-spacing: 0;
    cursor: pointer;
}

    body.dash-page .dash-mobile-bottom-nav__item i {
    font-size: 22px;
    line-height: 1;
}

    body.dash-page .dash-mobile-bottom-nav__logo {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid var(--baize-blue-button-border);
    box-shadow: 0 4px 10px rgba(31, 78, 121, 0.14);
}

    body.dash-page .dash-mobile-bottom-nav__item span {
    max-width: 100%;
    overflow-wrap: anywhere;
    line-height: 1.15;
}

    body.dash-page .dash-mobile-bottom-nav__item.active {
    color: var(--dash-blue);
    background: var(--baize-blue-soft-bg);
    box-shadow: 0 7px 16px rgba(31, 78, 121, 0.12);
}

    body.dash-page .mobile-menu-overlay,
body.dash-page .chat-history-overlay {
    z-index: 5000;
}

    body.dash-page .mobile-menu-overlay.active,
body.dash-page .chat-history-overlay.active {
    z-index: 14000;
}

    body.dash-page .chat-history-overlay {
    top: 0;
}
}

@media (max-width: 430px) {
    body.dash-page .dash-qr-brand-card {
    gap: 14px;
    padding: 9px 18px;
}

    body.dash-page .dash-qr-logo {
    width: 28.8px !important;
    height: 28.8px !important;
    flex-basis: 28.8px;
}

    body.dash-page .dash-mobile-bottom-nav {
    padding-left: 14px;
    padding-right: 14px;
    gap: 6px;
}

    body.dash-page .dash-customer-select-row {
    grid-template-columns: minmax(0, 1fr) 42px 42px;
    gap: 7px;
}

    body.dash-page .dash-mobile-customer-btn {
    width: 42px;
    height: 42px;
}
}

@media (max-width: 360px) {
    body.dash-page .qr-container.dash-qr-card-list {
    grid-auto-columns: 100%;
    grid-template-columns: none;
}

    body.dash-page .dash-mobile-topbar {
    grid-template-columns: 32px minmax(0, 1fr) auto 32px;
    padding-left: 10px;
    padding-right: 10px;
}

    body.dash-page .dash-mobile-topbar__button {
    width: 30px;
    height: 30px;
    font-size: 17px;
}
}

/* Mobile Menu Styles */
.mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(12, 32, 48, 0.18);
    -webkit-backdrop-filter: blur(18px) saturate(155%);
    backdrop-filter: blur(18px) saturate(155%);
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    pointer-events: none;
}

.mobile-menu-overlay.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.mobile-menu {
    position: absolute;
    top: 12px;
    right: 12px;
    width: min(86vw, 360px);
    height: calc(100dvh - 24px);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    color: #12263a;
    border-radius: 24px;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.72),
        0 24px 54px rgba(31, 78, 121, 0.2);
    -webkit-backdrop-filter: blur(22px) saturate(165%);
    backdrop-filter: blur(22px) saturate(165%);
    transform: translateX(calc(100% + 24px));
    transition: transform 0.3s ease;
    background:
        linear-gradient(145deg, rgba(255, 255, 255, 0.84), rgba(238, 248, 255, 0.6)),
        rgba(255, 255, 255, 0.66);
    border: 1px solid rgba(255, 255, 255, 0.68);
}

.mobile-menu-overlay.active .mobile-menu {
    transform: translateX(0);
}

.mobile-menu-header {
    flex: 0 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 20px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.46), rgba(221, 240, 250, 0.24));
    font-weight: 800;
    font-size: 1.12rem;
    letter-spacing: 0;
    border-bottom: 1px solid rgba(31, 78, 121, 0.12);
    color: #12263a;
}

.mobile-menu-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 14px;
    border: 1px solid rgba(31, 78, 121, 0.14);
    background: rgba(255, 255, 255, 0.58);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.7),
        0 8px 18px rgba(31, 78, 121, 0.12);
    -webkit-backdrop-filter: blur(12px) saturate(145%);
    backdrop-filter: blur(12px) saturate(145%);
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0;
    transition: all 0.3s ease;
    color: #12263a;
}

.mobile-menu-close:hover {
    transform: translateY(-1px);
    background: rgba(255, 255, 255, 0.76);
    color: #0f5f8a;
}

.mobile-menu-content {
    flex: 1 1 auto;
    min-height: 0;
    padding: 12px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.mobile-menu-content::-webkit-scrollbar {
    width: 8px;
}

.mobile-menu-content::-webkit-scrollbar-thumb {
    border-radius: 999px;
    background: rgba(31, 78, 121, 0.24);
}

.mobile-menu-item {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 48px;
    margin: 0 0 8px;
    padding: 12px 14px;
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 750;
    transition: all 0.3s ease;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.5);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.68),
        0 8px 18px rgba(31, 78, 121, 0.07);
    -webkit-backdrop-filter: blur(12px) saturate(140%);
    backdrop-filter: blur(12px) saturate(140%);
    color: #12263a;
    border: 1px solid rgba(31, 78, 121, 0.12);
}

.mobile-menu-item:hover {
    border-color: rgba(31, 111, 160, 0.22);
    transform: translateX(-2px);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.74),
        0 10px 22px rgba(31, 111, 160, 0.12);
    background: rgba(255, 255, 255, 0.76);
    color: #0f5f8a;
}

.mobile-menu-item i {
    width: 20px;
    text-align: center;
    color: #1f6fa0;
    font-size: 1.02em;
}

.mobile-menu-item[href*="logout"],
.mobile-menu-item:last-child {
    color: #9f1628;
    border-color: rgba(220, 53, 69, 0.14);
    background: rgba(255, 255, 255, 0.5);
}

.mobile-menu-item[href*="logout"] i,
.mobile-menu-item:last-child i {
    color: #dc3545;
}

.mobile-menu-item[href*="logout"]:hover,
.mobile-menu-item:last-child:hover {
    color: #b91c2f;
    border-color: rgba(220, 53, 69, 0.22);
    background: rgba(255, 243, 245, 0.72);
}

@media (max-width: 430px) {
    .mobile-menu {
    top: 10px;
    right: 10px;
    width: calc(100vw - 20px);
    height: calc(100dvh - 20px);
    border-radius: 22px;
}

    .mobile-menu-content {
    padding: 10px;
}

    .mobile-menu-item {
    min-height: 46px;
    padding: 11px 13px;
    font-size: 0.9rem;
}
}

/* Prevent body scroll when menu is open */
body.mobile-menu-open {
    overflow: hidden;
}

/* Main Content */
.main-content {
    margin-top: 40px;
    padding: 2px;
}

.hero-section {
    text-align: center;
    padding: 20px 20px;
    border-radius: 20px;
    margin: 20px auto;
    max-width: 1600px;
    background: transparent;
    border-color: transparent;
}

.hero-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 20px;
    color: rgb(233, 226, 207);
}

.qr-container {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin: 30px 0;
    flex-wrap: wrap;
}

@media (min-width: 769px) {
    .qr-container.dash-qr-card-list {
    width: 100%;
    max-width: none;
    margin: 30px auto;
    justify-content: center;
    align-items: stretch;
    flex-wrap: nowrap;
}

    .qr-container.dash-qr-card-list .dash-qr-page {
    display: grid;
    grid-template-columns: repeat(2, 190px);
    justify-content: center;
    align-items: flex-start;
    gap: 30px;
    width: 100%;
    margin: 0 auto;
}

    .qr-container.dash-qr-card-list .dash-qr-card {
    width: 190px;
    min-width: 190px;
    justify-self: center;
}
}

.qr-item {
    text-align: center;
}

.qr-item img {
    border-radius: 10px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
    transition: all 0.3s ease;
    width: 140px;
    height: 140px;
}

.qr-item img:hover {
    transform: scale(1.05);
    box-shadow: 0 12px 40px rgba(235, 214, 152, 0.4);
}

.hero-buttons {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
    margin-top: 30px;
}

.hero-btn {
    background: linear-gradient(145deg, #f0f0f0 0%, #c0c0c0 15%, #a8a8a8 30%, #888888 50%, #a8a8a8 70%, #c0c0c0 85%, #f0f0f0 100%);
    border: 2px solid #999999;
    padding: 15px 20px;
    border-radius: var(--baize-archive-radius);
    color: #333;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow:
        0 8px 16px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.8),
        inset 0 -1px 0 rgba(0, 0, 0, 0.2);
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.8);
    font-size: 1rem;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    width: calc(50% - 20px);
    min-width: 250px;
    max-width: 350px;
    text-align: center;
    justify-content: center;
    margin: 5px;
    position: relative;
    overflow: hidden;
    cursor: pointer;
}

/* 光泽动画效果 */
.hero-btn:before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    transition: left 0.5s;
}

.hero-btn:hover:before {
    left: 100%;
}

.hero-btn:hover {
    background: linear-gradient(145deg, #f8f8f8 0%, #d0d0d0 15%, #b8b8b8 30%, #989898 50%, #b8b8b8 70%, #d0d0d0 85%, #f8f8f8 100%);
    transform: translateY(-2px);
    box-shadow:
        0 12px 25px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.9),
        inset 0 -1px 0 rgba(0, 0, 0, 0.3);
}

.hero-btn:active {
    transform: translateY(1px);
    box-shadow:
        0 4px 8px rgba(0, 0, 0, 0.2),
        inset 0 2px 4px rgba(0, 0, 0, 0.2);
}

.hero-btn {
    background: linear-gradient(145deg, #f0f0f0 0%, #c0c0c0 15%, #a8a8a8 30%, #888888 50%, #a8a8a8 70%, #c0c0c0 85%, #f0f0f0 100%);
    border: 2px solid #999999;
    color: #333;
    box-shadow:
        0 8px 16px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.8),
        inset 0 -1px 0 rgba(0, 0, 0, 0.2);
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.8);
}

.hero-btn:hover {
    background: linear-gradient(145deg, #f8f8f8 0%, #d0d0d0 15%, #b8b8b8 30%, #989898 50%, #b8b8b8 70%, #d0d0d0 85%, #f8f8f8 100%);
    box-shadow:
        0 12px 25px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.9),
        inset 0 -1px 0 rgba(0, 0, 0, 0.3);
}

/* Section Styles */
.section {
    backdrop-filter: blur(20px);
    border-radius: var(--baize-archive-radius);
    margin: 30px auto;
    max-width: 1200px;
    padding: 30px;
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.95) 0%, rgba(248, 249, 250, 0.98) 100%);
    border: 1px solid rgba(52, 73, 94, 0.2);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1);
}

.section-title {
    font-size: 1.5rem;
    font-weight: 600;
    text-align: center;
    margin-bottom: 30px;
    color: #EBD698;
}

.archive-section-header {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 10px;
}

.archive-section-title {
    margin-bottom: 0;
    width: 100%;
    padding: 0 88px;
    text-align: center;
}

.archive-focus-btn {
    display: none;
    position: absolute;
    top: 50%;
    right: 0;
    transform: translateY(-50%);
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-width: 42px;
    padding: 6px 10px;
}

.archive-focus-btn i {
    font-size: 0.95rem;
    line-height: 1;
}

.section-title {
    color: #2c3e50;
}

/* Form Styles */
.form-group {
    margin-bottom: 7px;
}

#health_forms_data > .form-group {
    margin-bottom: 4px;
}

.form-input,
.form-select,
.form-textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid rgba(235, 214, 152, 0.3);
    border-radius: 10px;
    background: rgba(20, 20, 20, 0.8);
    color: #EBD698;
    font-size: 1rem;
    font-family: var(--app-font-sans);
    transition: all 0.3s ease;
}

.form-textarea {
    font-family: inherit;
    background: rgba(255, 255, 255, 0.9);
    color: #2c3e50;
    border: 2px solid rgba(52, 73, 94, 0.2);
}

.form-select {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid rgba(235, 214, 152, 0.3);
    border-radius: 10px;
    background: rgba(20, 20, 20, 0.8);
    color: #EBD698;
    font-size: 1rem;
    transition: all 0.3s ease;
}

#service-select,
#service-select option {
    font-family: var(--app-font-sans);
}

.form-select {
    background: rgba(255, 255, 255, 0.9);
    color: #2c3e50;
    border: 2px solid rgba(52, 73, 94, 0.2);
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    outline: none;
    border-color: #EBD698;
    box-shadow: 0 0 0 3px rgba(235, 214, 152, 0.2);
}

.form-input,
.form-select,
.form-textarea {
    background: rgba(255, 255, 255, 0.9);
    color: #2c3e50;
    border: 2px solid rgba(52, 73, 94, 0.2);
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    border-color: #1f4e79;
    box-shadow: 0 0 0 3px rgba(31, 78, 121, 0.2);
}

.tab-container {
    display: flex;
    flex-wrap: wrap;
    gap: 0;
    margin-bottom: 5px;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    padding: 8px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(235, 214, 152, 0.2);
}

.tab-button {
    background: transparent;
    border: none;
    border-radius: 15px;
    padding: 12px 16px;
    color: #EBD698;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
    font-size: 0.9rem;
    flex-basis: calc(50% - 5px);
    box-sizing: border-box;
    text-align: center;
}

.tab-button.active {
    background: linear-gradient(135deg, #EBD698 0%, #C29049 100%);
    color: #000000;
    box-shadow: 0 4px 15px rgba(235, 214, 152, 0.4);
}

.tab-button:hover {
    filter: brightness(0.7);
    text-decoration: none;
}

@media (hover: none) {
    .tab-button:hover {
    filter: none;
}
}

.tab-button:active,
.tab-button:focus {
    filter: none;
    outline: none;
}

.tab-button {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: #2c3e50;
}

.tab-button.active {
    background: var(--baize-blue-button-bg);
    color: var(--baize-blue-button-text);
    border: 1px solid var(--baize-blue-button-border);
    box-shadow: var(--baize-blue-button-shadow);
}

.tab-button::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 3px;
    background: linear-gradient(90deg, #EBD698, #C29049);
    border-radius: 3px 3px 0 0;
    transform: translateX(-50%);
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.tab-button:hover::before {
    width: 0;
}

.tab-button::before {
    background: linear-gradient(90deg, rgba(38, 54, 70, 0.22), rgba(255, 255, 255, 0.8), rgba(38, 54, 70, 0.18));
}

.tab-content {
    display: none;
    padding: 2px;
}

.tab-content.active {
    display: block;
}

.archive-textarea-tab {
    padding: 0 2px 2px;
}

.archive-textarea-tab .form-textarea {
    min-height: 340px;
    margin: 0;
    padding: 14px 16px;
    border: 1px solid rgba(31, 78, 121, 0.16);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.76);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.82),
        inset 0 -10px 24px rgba(31, 78, 121, 0.04);
    color: #1f2d3d;
    line-height: 1.65;
}

.health-form-qr-container {
    display: none;
    text-align: center;
    padding: 20px;
    border: 0;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.97);
    box-shadow: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.health-form-qr-title {
    margin-bottom: 10px;
    font-weight: 600;
}

.health-form-qr-image {
    width: 140px;
    height: 140px;
    border-radius: 10px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
}

.health-form-fullscreen-toggle {
    display: none;
}

.health-form-font-toggle {
    display: none;
}

/* Button Styles */
.btn {
    background: linear-gradient(135deg, #EBD698 0%, #C29049 100%);
    border: none;
    padding: 12px 24px;
    border-radius: var(--baize-archive-radius);
    color: #000000;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(235, 214, 152, 0.4);
    font-size: 1rem;
    margin: 5px;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(235, 214, 152, 0.6);
    background: linear-gradient(135deg, #C29049 0%, #B8860B 100%);
}

.btn.btn-danger {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
    color: #ffffff;
}

.btn.btn-danger:hover {
    background: linear-gradient(135deg, #c82333 0%, #bd2130 100%);
    box-shadow: 0 8px 25px rgba(220, 53, 69, 0.4);
}

.btn {
    background: var(--baize-blue-button-bg);
    color: var(--baize-blue-button-text);
    border: 1px solid var(--baize-blue-button-border);
    box-shadow: var(--baize-blue-button-shadow);
}

.btn:hover {
    background: var(--baize-blue-button-hover-bg);
    color: var(--baize-blue-button-text);
    box-shadow: var(--baize-blue-button-hover-shadow);
}

.chat-wrapper {
    width: 100%;
    display: flex;
    flex-direction: column;
    margin: 10px auto;
    max-width: 1600px;
}

/* Chat Styles */
.chat-container {
    width: 100%;
    max-width: 100%;
    display: flex;
    flex-direction: column;
    backdrop-filter: blur(20px);
    border-radius: 20px;
    overflow: hidden;
    transition: all 0.3s ease;
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.95) 0%, rgba(248, 249, 250, 0.98) 100%);
    border: 1px solid rgba(52, 73, 94, 0.3);
    box-shadow:
        0 20px 60px rgba(0, 0, 0, 0.1),
        0 0 0 1px rgba(52, 73, 94, 0.2),
        inset 0 1px 0 rgba(52, 73, 94, 0.05);
}

.chat-topbar {
    flex: 0 0 auto;
    min-height: 60px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 12px 16px;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.72), rgba(237, 247, 255, 0.5)),
        rgba(255, 255, 255, 0.42);
    border-bottom: 1px solid rgba(31, 78, 121, 0.12);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.76),
        0 8px 18px rgba(31, 78, 121, 0.06);
    -webkit-backdrop-filter: blur(16px) saturate(150%);
    backdrop-filter: blur(16px) saturate(150%);
}

.chat-topbar__identity {
    display: inline-flex;
    align-items: center;
    min-width: 0;
    gap: 10px;
    color: #12263a;
}

.chat-topbar__logo {
    width: 38px;
    height: 38px;
    flex: 0 0 38px;
    object-fit: cover;
    border-radius: 50%;
    border: 1px solid rgba(31, 78, 121, 0.16);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.72),
        0 8px 18px rgba(31, 78, 121, 0.12);
    background: rgba(255, 255, 255, 0.62);
}

.chat-topbar__title {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 1.04rem;
    font-weight: 850;
    letter-spacing: 0;
}

.chat-topbar__actions {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    min-width: 0;
}

.chat-topbar__actions .button-area {
    padding: 0;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    background: transparent;
}

.chat-topbar__actions .chat-action-icon-btn,
.chat-topbar__actions .focus-mode-btn {
    min-height: 40px;
    min-width: 40px;
    margin: 0;
    padding: 0 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: 1px solid rgba(42, 91, 126, 0.18);
    border-radius: 16px;
    color: #12263a;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.78), rgba(237, 247, 255, 0.54));
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.76),
        0 8px 18px rgba(15, 42, 64, 0.08);
    -webkit-backdrop-filter: blur(14px) saturate(150%);
    backdrop-filter: blur(14px) saturate(150%);
    font-size: 0.92rem;
    font-weight: 800;
}

.chat-topbar__actions .chat-action-icon-btn:hover,
.chat-topbar__actions .focus-mode-btn:hover {
    color: #0a5e91;
    border-color: rgba(31, 111, 160, 0.32);
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.88), rgba(219, 239, 251, 0.66));
    transform: translateY(-1px);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.8),
        0 12px 24px rgba(15, 42, 64, 0.12);
}

#desktop-archive-focus-toggle {
    min-height: 40px;
    min-width: 40px;
    margin: 0;
    padding: 0 14px;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: 1px solid rgba(42, 91, 126, 0.18);
    border-radius: 16px;
    color: #12263a;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.78), rgba(237, 247, 255, 0.54));
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.76),
        0 8px 18px rgba(15, 42, 64, 0.08);
    -webkit-backdrop-filter: blur(14px) saturate(150%);
    backdrop-filter: blur(14px) saturate(150%);
    font-size: 0.92rem;
    font-weight: 800;
}

#desktop-archive-focus-toggle:hover {
    color: #0a5e91;
    border-color: rgba(31, 111, 160, 0.32);
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.88), rgba(219, 239, 251, 0.66));
    transform: translateY(calc(-50% - 1px));
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.8),
        0 12px 24px rgba(15, 42, 64, 0.12);
}

.chat-topbar__actions .focus-mode-btn.is-active,
#desktop-archive-focus-toggle.is-active {
    background: var(--baize-blue-button-bg);
    border-color: var(--baize-blue-button-border);
    color: var(--baize-blue-button-text);
    box-shadow: var(--baize-blue-button-shadow);
}

.chat-action-label {
    display: inline-block;
    white-space: nowrap;
}

.chat-messages {
    flex: 1;
    padding: 1rem 0rem;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    max-height: 550px;
    min-height: 550px;
}

/* Message layout with proper spacing from edges */
.message {
    display: flex;
    align-items: flex-start;
    animation: slideIn 0.5s ease-out;
    width: 100%;
    position: relative;
    gap: 12px;
}

.message.user-message {
    flex-direction: row;
    padding-left: 0.5rem;
    padding-right: 0.5rem;
}

.message.bot-message {
    flex-direction: row;
    padding-right: 0.5rem;
    padding-left: 0.5rem;
    position: relative;
}

/* AI message avatar positioned at top-left corner outside the message */
.ai-avatar-external {
    position: absolute;
    top: -8px;
    left: 8px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    flex-shrink: 0;
    overflow: hidden;
    font-weight: bold;
    z-index: 10;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(248, 249, 250, 0.9) 100%);
    color: #2c3e50;
    border: 2px solid rgba(52, 73, 94, 0.3);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.ai-avatar-external img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

@media (min-width: 769px) {
    .bot-message .ai-avatar-external {
        display: none;
    }
}

.message-content {
    flex: 1;
    padding: 25px 12px;
    border-radius: 16px;
    position: relative;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
    word-wrap: break-word;
    overflow-x: hidden;
    max-width: 100%;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    font-smooth: always;
    text-rendering: optimizeLegibility;
    font-feature-settings: "liga" 1, "kern" 1;
    font-variant-ligatures: common-ligatures;
    border: 1px solid rgba(235, 214, 152, 0.2);
    line-height: 1.7;
    font-weight: 400;
    padding-bottom: 35px;
}

.user-message .message-content {
    background: var(--baize-blue-message-bg);
    color: #2c3e50;
    border-bottom-right-radius: 4px;
    box-shadow: var(--baize-blue-message-shadow);
    font-weight: 500;
    border: 1px solid var(--baize-blue-message-border);
}

.bot-message .message-content {
    border-bottom-left-radius: 4px;
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.98) 0%, rgba(248, 249, 250, 0.95) 100%);
    color: #2c3e50;
    border: 1px solid rgba(52, 73, 94, 0.2);
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(52, 73, 94, 0.05);
}

.message-content a {
    color: #2f6f9f;
    font-size: 0.82em;
    font-weight: 500;
    text-decoration-line: underline;
    text-decoration-thickness: 1px;
    text-decoration-color: rgba(47, 111, 159, 0.52);
    text-underline-offset: 3px;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.message-content a:hover,
.message-content a:focus-visible {
    color: #1f4e79;
    text-decoration-color: rgba(31, 78, 121, 0.72);
}

.stream-word-fade {
    display: inline-block;
    position: relative;
    animation: streamWordFade 0.58s cubic-bezier(0.2, 0.82, 0.2, 1) both;
    animation-delay: var(--word-fade-delay, 0ms);
    will-change: opacity, filter, top;
    text-shadow: 0 0 12px rgba(31, 78, 121, 0.14);
}

@keyframes streamWordFade {
    0% {
        opacity: 0;
        filter: blur(6px);
        top: 0.42em;
    }
    52% {
        opacity: 0.78;
        filter: blur(1.8px);
        top: 0.08em;
    }
    100% {
        opacity: 1;
        filter: blur(0);
        top: 0;
    }
}

@media (prefers-reduced-motion: reduce) {
    .stream-word-fade {
    animation: none;
    text-shadow: none;
}
}

.input-area {
    padding: 1rem;
    background: rgba(255, 255, 255, 0.3);
    border-top: 1px solid rgba(52, 73, 94, 0.2);
}

.input-container {
    display: flex;
    gap: 12px;
    align-items: center;
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.95) 0%, rgba(248, 249, 250, 0.9) 100%);
    border-radius: var(--baize-archive-radius);
    padding: 10px 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(31, 78, 121, 0.3);
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.input-container:focus-within {
    border-color: #1f4e79;
    box-shadow:
        0 8px 32px rgba(31, 78, 121, 0.2),
        0 0 0 1px rgba(31, 78, 121, 0.1);
}

.message-input {
    flex: 1;
    border: none;
    outline: none;
    resize: none;
    font-size: 1rem;
    line-height: 1.6;
    max-height: 120px;
    min-height: 24px;
    font-family: var(--app-font-sans);
    background: transparent;
    font-weight: 400;
    letter-spacing: 0.3px;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    box-shadow: none;
    color: #2c3e50;
}

.message-input::placeholder {
    font-weight: 300;
    color: rgba(44, 62, 80, 0.6);
}

.send-btn {
    background: var(--baize-blue-button-bg);
    border: 1px solid var(--baize-blue-button-border);
    width: 38px;
    height: 38px;
    border-radius: 50%;
    color: var(--baize-blue-button-text);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    font-size: 1.2rem;
    font-weight: bold;
    box-shadow: var(--baize-blue-button-shadow);
}

.send-btn:hover {
    transform: scale(1.1);
    box-shadow: var(--baize-blue-button-hover-shadow);
    background: var(--baize-blue-button-hover-bg);
}

.send-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
    background: #808080;
}

/* Button area under input */
.button-area {
    padding: 0.5rem 1rem;
    display: flex;
    justify-content: center;
    gap: 12px;
    background: rgba(255, 255, 255, 0.2);
}

/* Message Buttons */
.message-buttons {
    position: absolute;
    bottom: 5px;
    right: 5px;
    display: flex;
    gap: 5px;
    opacity: 1;
    transition: opacity 0.3s ease;
}

.message-content:hover .message-buttons {
    opacity: 1;
}

.message-btn {
    border-radius: 50%;
    padding: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(52, 73, 94, 0.1);
    border: 1px solid rgba(52, 73, 94, 0.2);
    color: #2c3e50;
}

.message-btn:hover {
    background: rgba(235, 214, 152, 0.4);
    transform: scale(1.1);
}

/* --- NEW STYLES FOR EDIT FUNCTIONALITY --- */
.edit-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    z-index: 10001;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    box-sizing: border-box;
}

.edit-modal-window {
    border-radius: 16px;
    padding: 20px;
    width: 100%;
    max-width: 900px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.7);
    display: flex;
    flex-direction: column;
    max-height: 90vh;
    min-height: 400px;
    box-sizing: border-box;
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.98) 0%, rgba(248, 249, 250, 0.95) 100%);
    color: #2c3e50;
    border: 1px solid rgba(52, 73, 94, 0.2);
}

.edit-modal-editor {
    flex: 1;
    overflow-y: auto;
    border: 1px solid rgba(235, 214, 152, 0.3);
    padding: 15px;
    border-radius: 8px;
    min-height: 300px;
    outline: none;
    font-family: var(--app-font-sans);
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.7;
    letter-spacing: 0.3px;
    box-sizing: border-box;
    resize: vertical;
    border-color: rgba(52, 73, 94, 0.2);
    background: rgba(255, 255, 255, 0.5);
}

.edit-modal-actions {
    display: flex;
    justify-content: flex-end;
    padding-top: 15px;
    gap: 10px;
    ;
}

.edit-modal-action-btn {
    padding: 8px 12px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s ease, transform 0.1s ease;
    color: white;
    ;
}

.edit-modal-action-btn:hover {
    transform: translateY(-1px);
    ;
}

/* Specific styles for the Save button (typically green) */
.edit-modal-save-btn {
    background-color: #4CAF50;
    ;
}

.edit-modal-save-btn:hover {
    background-color: #45a049;
    ;
}

/* Specific styles for the Cancel button (red with 'X' icon) */
.edit-modal-cancel-btn {
    background-color: #f44336;
    ;
}

.edit-modal-cancel-btn:hover {
    background-color: #da190b;
    ;
}

/* Styling for the Font Awesome icons inside the buttons */
.edit-modal-action-btn i {
    font-size: 1em;
    margin: 0;
    ;
}

.edit-modal-save-btn {
    background: var(--baize-blue-button-bg);
    color: var(--baize-blue-button-text);
    border: 1px solid var(--baize-blue-button-border);
    box-shadow: var(--baize-blue-button-shadow);
}

.edit-modal-save-btn:hover {
    background: var(--baize-blue-button-hover-bg);
    color: var(--baize-blue-button-text);
    box-shadow: var(--baize-blue-button-hover-shadow);
}

/* --- END NEW STYLES --- */

/* Footer */
.footer {
    text-align: center;
    padding: 20px;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.8);
}

.registration-section,
.section.registration-section {
    position: fixed;
    inset: 0;
    z-index: 5400;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100dvh;
    max-width: none;
    min-height: 100dvh;
    margin: 0;
    padding: 0;
    border-radius: 0;
    text-align: center;
    overflow: hidden;
    border: 0;
    background:
        radial-gradient(circle at 50% 12%, rgba(210, 224, 233, 0.58), transparent 44%),
        linear-gradient(180deg, rgba(132, 150, 162, 0.92), rgba(176, 188, 196, 0.88));
    box-shadow: none;
}

body.registration-modal-open {
    overflow: hidden;
}

.registration-section__backdrop {
    position: absolute;
    inset: 0;
    border-radius: 0;
    background:
        radial-gradient(circle at 50% 12%, rgba(255, 255, 255, 0.88), transparent 42%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.82), rgba(247, 251, 253, 0.78));
    -webkit-backdrop-filter: blur(18px) saturate(135%);
    backdrop-filter: blur(18px) saturate(135%);
    overflow: hidden;
}

.registration-section__dialog {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    max-width: none;
    max-height: none;
    padding: max(24px, env(safe-area-inset-top)) clamp(18px, 5vw, 54px) max(24px, env(safe-area-inset-bottom));
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    overflow-y: auto;
    overscroll-behavior: contain;
}

.registration-section__close {
    position: absolute;
    top: max(18px, env(safe-area-inset-top));
    right: clamp(18px, 4vw, 46px);
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border: 1px solid rgba(42, 91, 126, 0.18);
    border-radius: 12px;
    color: #12263a;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.76), rgba(237, 247, 255, 0.5));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72), 0 8px 18px rgba(15, 42, 64, 0.08);
    cursor: pointer;
}

.registration-section__intro {
    width: min(100%, 560px);
    margin: 0 auto 18px;
    text-align: center;
}

.registration-section__intro h4 {
    margin: 0 42px 12px;
    color: #12263a;
    font-size: clamp(1.45rem, 3vw, 2.15rem);
    font-weight: 800;
    letter-spacing: 0;
}

.registration-section__intro p {
    max-width: 520px;
    margin: 0 auto;
    color: #456176;
    font-size: 0.94rem;
    line-height: 1.65;
}

.registration-section__card {
    width: 100%;
    max-width: 460px;
    margin: 0 auto;
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
}

.registration-section__panel {
    margin-top: 0;
}

body.dash-page .registration-section .signup-pay-card {
    padding: 22px;
    border: 1px solid rgba(255, 255, 255, 0.58);
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.66);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.74), 0 18px 36px rgba(15, 42, 64, 0.12);
    -webkit-backdrop-filter: blur(18px) saturate(155%);
    backdrop-filter: blur(18px) saturate(155%);
}

body.dash-page .registration-section .signup-pay-title {
    color: #12263a;
    font-weight: 800;
}

body.dash-page .registration-section .signup-pay-desc {
    color: #456176;
}

body.dash-page .registration-section .signup-pay-input {
    border: 1px solid rgba(42, 91, 126, 0.2);
    border-radius: 16px;
    color: #12263a;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.8), rgba(237, 247, 255, 0.54));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72), 0 8px 18px rgba(15, 42, 64, 0.06);
}

body.dash-page .registration-section .signup-pay-button {
    border: 1px solid rgba(15, 66, 108, 0.42);
    border-radius: 16px;
    color: #fff;
    background: linear-gradient(135deg, rgba(12, 57, 96, 0.94), rgba(31, 96, 143, 0.78));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.26), 0 12px 24px rgba(15, 66, 108, 0.2);
    text-shadow: none;
}

body.dash-page .registration-section .signup-pay-status {
    border: 1px solid rgba(42, 91, 126, 0.14);
    color: #27445f;
    background: rgba(237, 247, 255, 0.56);
}

body.dash-page .registration-section .signup-pay-update {
    color: #0a5e91;
}

@media (max-width: 768px) {
    .registration-section,
.section.registration-section {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100dvh;
    max-width: none;
    min-height: 100dvh;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
}

    .registration-section__dialog {
    width: 100%;
    justify-content: flex-start;
    padding: max(64px, calc(env(safe-area-inset-top) + 48px)) 20px max(7px, calc(env(safe-area-inset-bottom) + 5px));
}

    .registration-section__backdrop {
    inset: 0;
    border-radius: 0;
}

    body.dash-page .registration-section .signup-pay-card {
    padding-bottom: 7px;
}

    .registration-section__intro h4 {
    font-size: clamp(1.6rem, 7vw, 2rem);
}

    .registration-section__intro p {
    font-size: 1rem;
}
}

@media (max-width: 520px) {
    .registration-section,
.section.registration-section {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100dvh;
    max-width: none;
    min-height: 100dvh;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
}

    .registration-section__dialog {
    width: 100%;
    justify-content: flex-start;
    padding: max(54px, calc(env(safe-area-inset-top) + 40px)) 14px max(5px, calc(env(safe-area-inset-bottom) + 4px));
}

    .registration-section__backdrop {
    inset: 0;
    border-radius: 0;
}

    .registration-section__close {
    top: max(14px, env(safe-area-inset-top));
    right: 14px;
    width: 40px;
    height: 40px;
}

}

/* Mobile responsiveness */
@media (max-width: 768px) {

    .edit-modal-overlay {
    padding: 10px;
}

    .edit-modal-window {
    max-height: 95vh;
    min-height: 300px;
    max-width: 100%;
}

    .edit-modal-editor {
    min-height: 250px;
}

    .hero-section img[alt="星辰.白泽"] {
    width: 84px !important;
    height: 84px !important;
}

    .chat-history-panel {
    top: 10px;
    left: 10px;
    width: calc(100vw - 20px);
    height: calc(100dvh - 20px);
    border-radius: 22px;
}

    /* Reduces the QR code images to 70% of their container's width */
    .qr-item img {
    width: 62%;
    height: auto;
}

    .navbar {
    padding: 2px 8px;
}

    .brand-text {
    font-size: 0.85rem;
}

    .logo-section img {
    width: 28px;
    height: 28px;
}

    .mobile-menu-btn {
    display: inline-flex;
}

    .hero-title {
    font-size: 1.3rem;
}

    .hero-section {
    width: 95%;
    margin: 40px auto;
}

    .hero-buttons {
    flex-direction: row;
    flex-wrap: wrap;
}

    .hero-btn {
    width: calc(50% - 10px);
    min-width: 200px;
    padding: 12px 15px;
    font-size: 0.9rem;
}

    .section-title {
    font-size: 1.2rem;
}

    .qr-container {
    flex-direction: row;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

    .qr-item {
    width: 45%;
    min-width: 140px;
}

    .section {
    padding: 7px;
    margin: 80px auto;
    max-width: 95%;
}

    .chat-wrapper {
    margin: 20px auto;
    max-width: 95%;
}

    .chat-messages {
    max-height: 495px;
    min-height: 495px;
    ;
}

    #health_forms_data,
#xcbz {
    scroll-margin-top: 80px;
}

    .delete-confirm-modal {
    width: 95%;
    margin: 20px;
}

    .delete-confirm-content {
    padding: 20px;
}

    .delete-confirm-actions {
    flex-direction: column;
    gap: 10px;
}

    .delete-confirm-cancel-btn,
.delete-confirm-delete-btn {
    width: 100%;
    justify-content: center;
}

    /* 极小屏幕垂直排列 */
    @media (max-width: 400px) {
        .qr-container {
    flex-direction: row;
}
    }
}

/* Scrollbar Styles */
.chat-messages::-webkit-scrollbar {
    width: 6px;
}

.chat-messages::-webkit-scrollbar-track {
    border-radius: 3px;
    background: rgba(255, 255, 255, 0.4);
}

.chat-messages::-webkit-scrollbar-thumb {
    border-radius: 3px;
    background: rgba(52, 73, 94, 0.4);
}

/* Animations */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Markdown Styles */
.message-content h1,
.message-content h2,
.message-content h3,
.message-content h4,
.message-content h5,
.message-content h6 {
    margin: 16px 0 8px 0;
    font-weight: 600;
    color: inherit;
}

.message-content p {
    margin: 8px 0;
    line-height: 1.7;
}

.message-content ul,
.message-content ol {
    margin: 8px 0;
    padding-left: 20px;
    line-height: 1.7;
}

.message-content blockquote {
    padding-left: 16px;
    margin: 12px 0;
    font-style: italic;
    border-radius: 0 8px 8px 0;
    padding: 12px 16px;
    border-left: 4px solid #3498db;
    background: rgba(52, 152, 219, 0.05);
}

.message-content code {
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'SF Mono', 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 0.9em;
    background: rgba(52, 73, 94, 0.1);
    border: 1px solid rgba(52, 73, 94, 0.2);
}

.message-content pre {
    border-radius: 8px;
    padding: 16px;
    margin: 12px 0;
    overflow-x: auto;
    font-family: 'SF Mono', 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    background: rgba(248, 249, 250, 0.95);
    border: 1px solid rgba(52, 73, 94, 0.2);
}

.message-content table {
    border-collapse: collapse;
    width: 100%;
    margin: 12px 0;
    font-size: 0.9em;
    border-radius: 8px;
    overflow: hidden;
    table-layout: fixed;
    border: 1px solid rgba(52, 73, 94, 0.2);
}

.message-content th,
.message-content td {
    padding: 6px 8px;
    text-align: left;
    word-wrap: break-word;
    word-break: break-word;
    hyphens: auto;
    overflow-wrap: break-word;
    max-width: 0;
    border: 1px solid rgba(52, 73, 94, 0.15);
}

.message-content th {
    font-weight: 600;
    background: rgba(52, 73, 94, 0.1);
}

.message-content .table-list {
    margin: 4px 0;
    padding-left: 18px;
}

.message-content .table-list li {
    margin: 2px 0;
    line-height: 1.5;
}

/* Mobile adjustments - column-based font sizes for mobile only */
@media (max-width: 768px) {
    .message-content table {
    font-size: 0.88em;
}

    .message-content table:has(th:nth-child(3)) {
    font-size: 0.88em;
}

    .message-content table:has(th:nth-child(3)) th,
.message-content table:has(th:nth-child(3)) td {
    padding: 6px 8px;
}

    .message-content table:has(th:nth-child(5)) {
    font-size: 0.77em;
}

    .message-content table:has(th:nth-child(5)) th,
.message-content table:has(th:nth-child(5)) td {
    padding: 5px 6px;
}

    .message-content table:has(th:nth-child(7)) {
    font-size: 0.66em;
}

    .message-content table:has(th:nth-child(7)) th,
.message-content table:has(th:nth-child(7)) td {
    padding: 4px 5px;
}
}

/* 为应用了 .btn-danger 的 tab-button 添加特定样式 */
.tab-button.btn-danger {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
    color: #ffffff;
    border-color: rgba(220, 53, 69, 0.5);
}

/* 危险按钮的悬停效果 */
.tab-button.btn-danger:hover {
    background: linear-gradient(135deg, #c82333 0%, #bd2130 100%);
    box-shadow: 0 8px 25px rgba(220, 53, 69, 0.4);
}

/* Make all hero section text match h1 color in light mode */
.hero-section p,
.qr-container,
.qr-container p,
.qr-item p {
    color: rgb(250, 249, 248) !important;
}

@media (min-width: 1200px) {
    .desktop-layout-container {
    display: flex;
    gap: 30px;
    align-items: stretch;
    max-width: 1800px;
    margin: 30px auto;
    padding: 0 20px;
    width: 100%;
}

    body.dash-page .desktop-layout-container > #health_forms_data {
    flex: 1 1 50%;
    margin: 0;
    min-width: 0;
    display: flex;
    flex-direction: column;
    border-color: var(--archive-air-border);
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.95) 0%, rgba(248, 249, 250, 0.98) 100%);
    box-shadow: var(--archive-air-shell-shadow);
}

    .desktop-layout-container>.chat-wrapper {
    flex: 1 1 50%;
    display: flex;
    flex-direction: column;
    margin: 0;
    max-width: none;
    min-width: 0;
    min-height: 0;
}

    .chat-wrapper .section-title {
    margin-bottom: 30px;
}

    .chat-wrapper .chat-container {
    max-width: 100%;
    width: 100%;
    height: 100%;
    flex: 1 1 auto;
    min-height: 0;
    overflow: hidden;
}

    .desktop-layout-container > .chat-wrapper .chat-messages {
    flex: 1 1 0;
    max-height: none;
    min-height: 0;
    overflow-y: auto;
}

    #health_forms_data,
#xcbz {
    scroll-margin-top: 100px;
}

    .button-area {
    margin-bottom: 15px;
}

    .hero-title {
    font-size: 3.5rem;
}

    /* Ensure mobile menu button is always visible on desktop too */
    .mobile-menu-btn {
    display: inline-flex !important;
}

    .focus-mode-btn {
    display: inline-flex;
}

    .archive-focus-btn {
    display: inline-flex;
}

    body.dash-page .navbar .chat-history-btn,
body.dash-page .navbar .nav-register-btn,
body.dash-page .navbar .mobile-menu-btn {
    background: rgba(52, 73, 94, 0.1);
    border-color: rgba(52, 73, 94, 0.3);
    color: #2c3e50;
}

    body.dash-page .navbar .chat-history-btn:hover,
body.dash-page .navbar .nav-register-btn:hover,
body.dash-page .navbar .mobile-menu-btn:hover {
    background: rgba(52, 73, 94, 0.2);
    border-color: rgba(52, 73, 94, 0.5);
    color: #2c3e50;
}

    body.desktop-chat-focus {
    overflow: hidden;
}

    body.desktop-chat-focus .main-content {
    margin-top: 0;
    min-height: 100vh;
    padding: calc(var(--desktop-focus-nav-height) + 16px) 20px 20px;
}

    body.desktop-chat-focus .hero-section,
body.desktop-chat-focus #health_forms_data,
body.desktop-chat-focus .registration-section,
body.desktop-chat-focus .footer {
    display: none !important;
}

    body.desktop-chat-focus .desktop-layout-container {
    display: block;
    max-width: none;
    margin: 0;
    padding: 0 0 0 calc(var(--desktop-focus-history-width) + 24px);
    width: 100%;
}

    body.desktop-chat-focus .desktop-layout-container > .chat-wrapper,
body.desktop-chat-focus .chat-wrapper {
    width: 100%;
    max-width: none;
    margin: 0;
}

    body.desktop-chat-focus .chat-wrapper .chat-container {
    width: 100%;
    height: calc(100vh - var(--desktop-focus-nav-height) - 36px);
    max-height: calc(100vh - var(--desktop-focus-nav-height) - 36px);
    border-radius: 24px;
}

    body.desktop-chat-focus .chat-messages {
    min-height: 0;
    max-height: none;
}

    body.desktop-chat-focus .chat-history-btn,
body.desktop-chat-focus .chat-history-close {
    display: none;
}

    body.desktop-chat-focus .chat-history-overlay {
    top: calc(var(--desktop-focus-nav-height) + 16px);
    left: 20px;
    right: auto;
    bottom: 20px;
    width: var(--desktop-focus-history-width);
    background: transparent;
    backdrop-filter: none;
    opacity: 1;
    visibility: visible;
    z-index: 950;
    pointer-events: none;
}

    body.desktop-chat-focus .chat-history-panel {
    position: relative;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    transform: none;
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.68);
    pointer-events: auto;
    border-color: rgba(255, 255, 255, 0.68);
    box-shadow:
            inset 0 1px 0 rgba(255, 255, 255, 0.72),
            0 24px 54px rgba(31, 78, 121, 0.18);
}

    body.desktop-archive-focus {
    overflow: hidden;
}

    body.desktop-archive-focus .main-content {
    margin-top: 0;
    min-height: 100vh;
    padding: calc(var(--desktop-focus-nav-height) + 16px) 20px 20px;
}

    body.desktop-archive-focus .hero-section,
body.desktop-archive-focus .desktop-layout-container > .chat-wrapper,
body.desktop-archive-focus .registration-section,
body.desktop-archive-focus .footer {
    display: none !important;
}

    body.desktop-archive-focus .desktop-layout-container {
    display: flex;
    justify-content: center;
    align-items: stretch;
    max-width: none;
    margin: 0;
    padding: 0;
    width: 100%;
}

    body.desktop-archive-focus #health_forms_data {
    width: min(1560px, calc(100vw - 120px));
    max-width: none;
    height: calc(100vh - var(--desktop-focus-nav-height) - 36px);
    max-height: calc(100vh - var(--desktop-focus-nav-height) - 36px);
    margin: 0 auto;
    border-color: var(--archive-air-border);
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.95) 0%, rgba(248, 249, 250, 0.98) 100%);
    box-shadow: var(--archive-air-shell-shadow);
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 20px 24px;
    box-sizing: border-box;
    overflow: hidden;
}

    body.desktop-archive-focus #health_forms_data .archive-section-header,
body.desktop-archive-focus #health_forms_data > .form-group,
body.desktop-archive-focus #health_forms_data > .tab-container,
body.desktop-archive-focus #health_forms_data > .action-buttons {
    flex: 0 0 auto;
    margin-bottom: 0;
}

    body.desktop-archive-focus #health_forms_data .archive-section-title {
    font-size: 1.35rem;
}

    body.desktop-archive-focus #health_forms_data > .form-group {
    margin-bottom: 0;
}

    body.desktop-archive-focus #health_forms_data > .tab-container:not(.action-buttons) {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 6px;
    padding: 6px;
    overflow: hidden;
}

    body.desktop-archive-focus #health_forms_data > .tab-container:not(.action-buttons) .tab-button {
    flex: 1 1 0;
    min-width: 0;
    max-width: none;
    padding: 10px 8px;
    font-size: 0.82rem;
    white-space: nowrap;
}

    body.desktop-archive-focus #health_forms_data > .tab-content.active {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    min-height: 0;
    padding: 0;
    overflow: hidden;
}

    body.desktop-archive-focus #tab-health-form.qr-visible {
    justify-content: center;
    align-items: center;
}

    body.desktop-archive-focus #tab-health-form.qr-visible #health-form-qr-container {
    display: flex;
    margin: auto;
    padding: 20px;
}

    body.desktop-archive-focus #health_forms_data > .tab-content.active > .form-textarea,
body.desktop-archive-focus #tab-analysis .report-tab-content[style*="display: block"] .form-textarea {
    flex: 1 1 auto;
    min-height: 0;
    height: auto !important;
    resize: none !important;
}

    body.desktop-archive-focus #tab-analysis.tab-content.active {
    gap: 8px;
}

    body.desktop-archive-focus #tab-analysis > .tab-container {
    flex: 0 0 auto;
    margin-bottom: 0;
    padding: 6px;
}

    body.desktop-archive-focus #tab-analysis > .tab-container .report-tab-button {
    flex: 1 1 calc(16.666% - 6px);
    flex-basis: calc(16.666% - 6px);
    max-width: calc(16.666% - 6px);
    padding: 10px 12px;
}

    body.desktop-archive-focus #tab-analysis .report-tab-content[style*="display: block"] {
    display: flex !important;
    flex: 1 1 auto;
    flex-direction: column;
    min-height: 0;
    overflow: hidden;
}

    body.desktop-archive-focus #tab-analysis .report-tab-content[style*="display: block"] > .w3-center {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    min-height: 0;
}

    body.desktop-archive-focus #tab-analysis .report-tab-content[style*="display: block"] .upload-container {
    flex: 0 0 auto;
    margin-top: 8px;
}

    body.desktop-archive-focus #tab-analysis #upload-status:empty,
body.desktop-archive-focus #tab-analysis #uploaded-files-list:empty {
    display: none;
}

    body.desktop-archive-focus #tab-analysis #upload-status {
    flex: 0 0 auto;
    margin-top: 4px;
}

    body.desktop-archive-focus #tab-analysis #uploaded-files-list {
    flex: 0 0 auto;
    max-height: clamp(48px, 9vh, 96px);
    overflow-y: auto;
    padding-right: 4px;
}

    body.desktop-archive-focus #health_forms_data .action-buttons {
    margin-top: 5px !important;
    padding: 6px;
    position: static;
    background: linear-gradient(145deg, rgba(0, 0, 0, 0.96) 0%, rgba(20, 20, 20, 0.98) 100%);
    box-shadow: 0 -12px 30px rgba(0, 0, 0, 0.25);
}

    body.desktop-archive-focus #health_forms_data .action-buttons .tab-button {
    flex: 1 1 calc(25% - 6px) !important;
    flex-basis: calc(25% - 6px) !important;
    max-width: calc(25% - 6px);
    padding: 10px 12px;
}

    body.desktop-archive-focus #health_forms_data .action-buttons {
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.96) 0%, rgba(248, 249, 250, 0.98) 100%);
    box-shadow: 0 -12px 30px rgba(52, 73, 94, 0.12);
}
}

@media (min-width: 1200px) and (max-width: 1360px) {
    .navbar .focus-mode-btn-label {
    display: none;
}

    .focus-mode-btn {
    padding: 6px 10px;
}
}

/* 删除确认弹窗样式 */
.delete-confirm-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(circle at 50% 30%, rgba(220, 53, 69, 0.16), transparent 42%),
        rgba(12, 32, 48, 0.2);
    -webkit-backdrop-filter: blur(18px) saturate(155%);
    backdrop-filter: blur(18px) saturate(155%);
    z-index: 10002;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 16px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.delete-confirm-overlay.active {
    opacity: 1;
    visibility: visible;
}

.delete-confirm-modal {
    background:
        linear-gradient(145deg, rgba(255, 255, 255, 0.86), rgba(255, 243, 245, 0.64)),
        rgba(255, 255, 255, 0.68);
    border: 1px solid rgba(220, 53, 69, 0.28);
    border-radius: 24px;
    padding: 0;
    width: min(92vw, 500px);
    max-width: 500px;
    color: #12263a;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.76),
        0 24px 54px rgba(137, 25, 39, 0.18),
        0 12px 30px rgba(15, 42, 64, 0.12);
    -webkit-backdrop-filter: blur(22px) saturate(165%);
    backdrop-filter: blur(22px) saturate(165%);
    transform: scale(0.9) translateY(-20px);
    transition: all 0.3s ease;
    overflow: hidden;
}

.delete-confirm-overlay.active .delete-confirm-modal {
    transform: scale(1) translateY(0);
}

.delete-confirm-modal {
    background:
        linear-gradient(145deg, rgba(255, 255, 255, 0.88), rgba(255, 243, 245, 0.66)),
        rgba(255, 255, 255, 0.7);
    border: 1px solid rgba(220, 53, 69, 0.28);
}

.delete-confirm-header {
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.42), rgba(255, 225, 230, 0.34)),
        rgba(220, 53, 69, 0.08);
    color: #9f1628;
    padding: 22px 24px 18px;
    text-align: center;
    border-bottom: 1px solid rgba(220, 53, 69, 0.16);
}

.delete-warning-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    margin-bottom: 12px;
    border-radius: 18px;
    color: #ffffff;
    background: linear-gradient(135deg, #dc3545 0%, #b91c2f 100%);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.34),
        0 12px 24px rgba(220, 53, 69, 0.26);
    font-size: 1.55rem;
    animation: pulse 2s infinite;
}

.delete-confirm-header h3 {
    margin: 0;
    color: #12263a;
    font-size: 1.26rem;
    font-weight: 800;
    letter-spacing: 0;
}

.delete-confirm-content {
    padding: 24px;
    line-height: 1.6;
    color: rgba(18, 38, 58, 0.9);
}

.delete-confirm-content p {
    margin: 0 0 15px 0;
}

.delete-confirm-content strong {
    color: #9f1628;
    font-weight: 800;
}

.delete-warning-text {
    color: #b91c2f;
    font-weight: 750;
    margin-top: 20px !important;
}

.delete-items-list {
    background: rgba(255, 255, 255, 0.54);
    border: 1px solid rgba(220, 53, 69, 0.16);
    border-left: 4px solid #dc3545;
    padding: 14px 18px;
    margin: 15px 0 25px 0;
    border-radius: 16px;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.68),
        0 8px 18px rgba(137, 25, 39, 0.08);
}

.delete-items-list li {
    margin: 5px 0;
    color: rgba(18, 38, 58, 0.86);
}

.delete-confirm-checkbox {
    margin-top: 25px;
    padding: 18px;
    border-radius: 18px;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.72),
        0 8px 18px rgba(31, 78, 121, 0.07);
    background: rgba(255, 255, 255, 0.58);
    border: 1px solid rgba(220, 53, 69, 0.15);
}

/* 自定义复选框样式 */
.checkbox-container {
    display: flex;
    align-items: flex-start;
    cursor: pointer;
    font-size: 0.95rem;
    line-height: 1.5;
    gap: 12px;
}

.checkbox-container input[type="checkbox"] {
    display: none;
}

.checkmark {
    width: 22px;
    height: 22px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    flex-shrink: 0;
    margin-top: 2px;
    background: rgba(255, 255, 255, 0.68);
    border: 2px solid rgba(220, 53, 69, 0.34);
}

.checkbox-container input[type="checkbox"]:checked+.checkmark {
    background: #dc3545;
    border-color: #dc3545;
}

.checkbox-container input[type="checkbox"]:checked+.checkmark::after {
    content: '✓';
    color: white;
    font-weight: bold;
    font-size: 14px;
}

.delete-confirm-actions {
    padding: 18px 24px 22px;
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    border-top: 1px solid rgba(220, 53, 69, 0.12);
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.38), rgba(255, 238, 241, 0.22));
}

.delete-confirm-cancel-btn,
.delete-confirm-delete-btn {
    padding: 12px 20px;
    border: 1px solid rgba(255, 255, 255, 0.58);
    border-radius: 16px;
    font-size: 1rem;
    font-weight: 800;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.delete-confirm-cancel-btn {
    background: rgba(255, 255, 255, 0.58);
    color: #425466;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.72),
        0 9px 20px rgba(31, 78, 121, 0.09);
    -webkit-backdrop-filter: blur(12px) saturate(145%);
    backdrop-filter: blur(12px) saturate(145%);
}

.delete-confirm-cancel-btn:hover {
    background: rgba(255, 255, 255, 0.76);
    transform: translateY(-1px);
}

.delete-confirm-delete-btn {
    background: rgba(148, 163, 184, 0.24);
    color: rgba(18, 38, 58, 0.45);
    border-color: rgba(148, 163, 184, 0.28);
    cursor: not-allowed;
    transition: all 0.3s ease;
}

.delete-confirm-delete-btn.enabled {
    background: linear-gradient(135deg, #dc3545 0%, #b91c2f 100%);
    border-color: rgba(220, 53, 69, 0.42);
    color: white;
    cursor: pointer;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.32),
        0 12px 24px rgba(220, 53, 69, 0.24);
}

.delete-confirm-delete-btn.enabled:hover {
    background: linear-gradient(135deg, #c82333 0%, #a41527 100%);
    transform: translateY(-1px);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.32),
        0 14px 28px rgba(220, 53, 69, 0.28);
}

/* 震动动画 */
@keyframes shake {

    0%,
    100% {
        transform: translateX(0);
    }

    25% {
        transform: translateX(-5px);
    }

    75% {
        transform: translateX(5px);
    }
}

.shake {
    animation: shake 0.5s ease-in-out;
}

/* 脉冲动画 */
@keyframes pulse {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.1);
    }

    100% {
        transform: scale(1);
    }
}

.upload-container {
    margin-top: 10px;
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.upload-btn {
    background: linear-gradient(135deg, rgba(235, 214, 152, 0.1) 0%, rgba(195, 144, 73, 0.1) 100%);
    border: 1px solid rgba(235, 214, 152, 0.3);
    border-radius: 20px;
    padding: 8px 16px;
    color: #EBD698;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.upload-btn:hover {
    background: linear-gradient(135deg, rgba(235, 214, 152, 0.2) 0%, rgba(195, 144, 73, 0.2) 100%);
    transform: translateY(-2px);
}

.upload-btn {
    background: var(--baize-blue-button-bg);
    border: 1px solid var(--baize-blue-button-border);
    color: var(--baize-blue-button-text);
    box-shadow: var(--baize-blue-button-shadow);
}

.upload-btn:hover {
    background: var(--baize-blue-button-hover-bg);
    box-shadow: var(--baize-blue-button-hover-shadow);
}

.file-input-hidden {
    display: none;
}

.upload-status {
    display: block;
    width: 100%;
    margin: 5px 0;
    padding: 5px 10px;
    border-radius: 10px;
    background: var(--baize-blue-message-bg);
    border: 1px solid var(--baize-blue-message-border);
    box-shadow: var(--baize-blue-message-shadow);
    color: #12263a;
    font-size: 0.7rem;
    font-weight: 650;
    line-height: 1.35;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.upload-status.success {
    background: var(--baize-blue-message-bg);
    color: #12263a;
    border-color: var(--baize-blue-message-border);
}

.upload-status.error {
    background: rgba(255, 244, 244, 0.88);
    color: #9f1d2f;
    border: 1px solid rgba(220, 38, 38, 0.18);
}

.upload-status.uploading {
    background: var(--baize-blue-message-bg);
    color: #12263a;
    border-color: var(--baize-blue-message-border);
}

.uploaded-files-list {
    margin-top: 10px;
    font-size: 0.85rem;
}

.uploaded-files-list.is-expanded {
    max-height: clamp(160px, 28vh, 280px);
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    padding-right: 3px;
}

.uploaded-files-list.is-expanded::-webkit-scrollbar {
    width: 5px;
}

.uploaded-files-list.is-expanded::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.38);
    border-radius: 999px;
}

.uploaded-files-list.is-expanded::-webkit-scrollbar-thumb {
    background: rgba(31, 78, 121, 0.38);
    border-radius: 999px;
}

.uploaded-file-item {
    padding: 5px 10px;
    background: rgba(235, 214, 152, 0.1);
    border-radius: 10px;
    margin: 5px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

@media (max-width: 768px) {
    .uploaded-files-list.is-expanded {
    max-height: clamp(140px, 24vh, 230px);
}

    .uploaded-file-item {
    padding: 4px 8px;
    margin: 4px 0;
}
}

.uploaded-file-item {
    background: var(--baize-blue-message-bg);
    border: 1px solid var(--baize-blue-message-border);
    box-shadow: var(--baize-blue-message-shadow);
}

.file-remove-btn {
    background: none;
    border: none;
    color: #dc3545;
    cursor: pointer;
    padding: 2px 6px;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.file-remove-btn:hover {
    background: rgba(220, 53, 69, 0.2);
}

/* Report Tab Styles - Use same styling as main tab buttons */
/* Container for report tabs - flat bottom corners */
.tab-container:has(.report-tab-button) {
    border-radius: 15px 15px 0 0;
}

.report-tab-button {
    flex: 1 1 calc(16.66% - 5px);
    min-width: 0;
    white-space: nowrap;
    font-size: 0.85rem;
    border-radius: 15px 15px 0 0 !important;
}

/* Mobile adjustments for report tabs */
@media (max-width: 600px) {
    .tab-container:has(.report-tab-button) {
    border-radius: 15px 15px 0 0;
}
    .report-tab-button {
    flex: 1 1 calc(16.66% - 2px);
    font-size: 0.65rem;
    padding: 6px 2px;
    min-width: 0;
    border-radius: 15px 15px 0 0 !important;
    margin: 1px;
}
}

/* Extra small mobile devices */
@media (max-width: 400px) {
    .tab-container:has(.report-tab-button) {
    border-radius: 15px 15px 0 0;
}
    .report-tab-button {
    flex: 1 1 calc(16.66% - 2px);
    font-size: 0.6rem;
    padding: 5px 1px;
    min-width: 0;
    border-radius: 15px 15px 0 0 !important;
    margin: 1px;
}
}

/* Action buttons container - 2 buttons per line */
.action-buttons {
    flex-wrap: wrap !important;
}

/* Action buttons - 2 buttons per line */
.action-buttons .tab-button {
    flex: 1 1 calc(50% - 5px) !important;
    flex-basis: calc(50% - 5px) !important;
    font-size: 0.9rem;
    padding: 10px 8px;
    min-width: 0;
    white-space: nowrap;
    max-width: calc(50% - 5px);
}

.action-buttons .tab-button.save-button-success {
    color: #28a745;
}

@media (max-width: 768px) {
    .action-buttons .tab-button {
    font-size: 0.9rem;
    padding: 12px 16px;
    flex: 1 1 calc(50% - 3px) !important;
    flex-basis: calc(50% - 3px) !important;
    max-width: calc(50% - 3px);
}
}

@media (max-width: 600px) {
    .action-buttons .tab-button {
    font-size: 0.9rem;
    padding: 12px 16px;
    flex: 1 1 calc(50% - 2px) !important;
    flex-basis: calc(50% - 2px) !important;
    max-width: calc(50% - 2px);
}
}

@media (max-width: 400px) {
    .action-buttons .tab-button {
    font-size: 0.9rem;
    padding: 12px 16px;
    flex: 1 1 calc(50% - 1px) !important;
    flex-basis: calc(50% - 1px) !important;
    max-width: calc(50% - 1px);
}
}

/* Make copy and clear chat buttons 30% smaller on desktop */
@media (min-width: 769px) {
    #desktop-archive-focus-toggle,
    #desktop-focus-toggle,
    #copy-all-button,
#clear-button {
    font-size: 0.8em;
    padding: 0.35em 0.8em;
}
}

/* Add Customer Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.modal-content {
    border-radius: 15px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.8);
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 50%, #f8f9fa 100%);
    border: 1px solid rgba(31, 78, 121, 0.2);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    border-bottom: 1px solid rgba(31, 78, 121, 0.2);
}

.modal-header h3 {
    margin: 0;
    font-size: 1.3rem;
    font-weight: 600;
    color: #2c3e50;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.8rem;
    cursor: pointer;
    line-height: 1;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #2c3e50;
}

.modal-close:hover {
    transform: scale(1.1);
    color: #1f4e79;
}

.modal-body {
    padding: 25px;
}

.renewal-pay-hint {
    font-size: 0.85rem;
    color: rgba(235, 214, 152, 0.75);
    margin-bottom: 12px;
}

.renewal-pay-status {
    border: 1px solid rgba(235, 214, 152, 0.25);
    background: rgba(0, 0, 0, 0.35);
    color: #EBD698;
    padding: 12px;
    border-radius: 10px;
    min-height: 90px;
    white-space: pre-line;
    font-size: 0.85rem;
    line-height: 1.5;
}

.renewal-update-label {
    margin-top: 12px;
    font-size: 0.85rem;
    color: rgba(235, 214, 152, 0.75);
}

.renewal-update-status {
    min-height: 70px;
}

.renewal-qr-section {
    margin-top: 18px;
    text-align: center;
    display: none;
}

.renewal-qr-title {
    color: #8B5A2B;
    font-weight: 600;
    margin-bottom: 10px;
}

.renewal-qr-image {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 180px;
    height: 180px;
    border-radius: 12px;
    background: #ffffff;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.25);
    padding: 8px;
}

.renewal-qr-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.renewal-qr-hint {
    margin-top: 10px;
    color: #9ca3af;
    font-size: 0.85rem;
}

.renewal-pay-hint {
    color: #6c7a89;
}

.renewal-pay-status {
    background: rgba(52, 73, 94, 0.08);
    border-color: rgba(52, 73, 94, 0.2);
    color: #2c3e50;
}

.renewal-update-label {
    color: #6c7a89;
}

.form-row {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
}

.form-group {
    flex: 1;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    font-size: 0.9rem;
    color: #2c3e50;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 10px 12px;
    border-radius: 8px;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    border: 1px solid rgba(31, 78, 121, 0.3);
    background: rgba(255, 255, 255, 0.8);
    color: #2c3e50;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #1f4e79;
    box-shadow: 0 0 0 2px rgba(31, 78, 121, 0.2);
}

.personal-settings-textarea {
    width: 100%;
    min-height: 120px;
    padding: 10px 12px;
    border: 1px solid rgba(235, 214, 152, 0.3);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.05);
    color: #EBD698;
    font-size: 0.9rem;
    line-height: 1.55;
    resize: vertical;
    transition: all 0.3s ease;
}

.personal-settings-textarea:focus {
    outline: none;
    border-color: #EBD698;
    box-shadow: 0 0 0 2px rgba(235, 214, 152, 0.2);
}

.personal-settings-textarea {
    border: 1px solid rgba(31, 78, 121, 0.3);
    background: rgba(255, 255, 255, 0.8);
    color: #2c3e50;
}

.personal-settings-textarea:focus {
    border-color: #1f4e79;
    box-shadow: 0 0 0 2px rgba(31, 78, 121, 0.2);
}

/* Personal settings modal - modern glass style matching the archive page */
#personal-settings-modal {
    background: rgba(12, 32, 48, 0.18);
    -webkit-backdrop-filter: blur(18px) saturate(155%);
    backdrop-filter: blur(18px) saturate(155%);
    padding: 16px;
}

#personal-settings-modal .modal-content {
    width: min(92vw, 680px);
    max-height: min(88vh, 820px);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    color: #12263a;
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.68);
    background:
        linear-gradient(145deg, rgba(255, 255, 255, 0.84), rgba(238, 248, 255, 0.6)),
        rgba(255, 255, 255, 0.66);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.72),
        0 24px 54px rgba(31, 78, 121, 0.2);
    -webkit-backdrop-filter: blur(22px) saturate(165%);
    backdrop-filter: blur(22px) saturate(165%);
}

#personal-settings-modal .modal-header {
    flex-shrink: 0;
    padding: 18px 22px;
    border-bottom: 1px solid rgba(31, 78, 121, 0.12);
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.46), rgba(221, 240, 250, 0.24));
}

#personal-settings-modal .modal-header h3 {
    margin: 0;
    color: #12263a;
    font-size: 1.2rem;
    font-weight: 800;
    letter-spacing: 0;
    display: inline-flex;
    align-items: center;
    gap: 9px;
}

#personal-settings-modal .modal-header h3 i {
    color: #1f6fa0;
}

#personal-settings-modal .modal-close {
    width: 40px;
    height: 40px;
    border-radius: 14px;
    color: #12263a;
    border: 1px solid rgba(31, 78, 121, 0.14);
    background: rgba(255, 255, 255, 0.58);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.7),
        0 8px 18px rgba(31, 78, 121, 0.12);
    -webkit-backdrop-filter: blur(12px) saturate(145%);
    backdrop-filter: blur(12px) saturate(145%);
}

#personal-settings-modal .modal-close:hover {
    color: #0f5f8a;
    background: rgba(255, 255, 255, 0.76);
    transform: translateY(-1px);
}

#personal-settings-modal .modal-body {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    padding: 22px;
}

#personal-settings-modal .modal-body::-webkit-scrollbar {
    width: 8px;
}

#personal-settings-modal .modal-body::-webkit-scrollbar-thumb {
    border-radius: 999px;
    background: rgba(31, 78, 121, 0.24);
}

#personal-settings-modal .form-group {
    margin-bottom: 18px;
}

#personal-settings-modal .form-group label {
    color: rgba(18, 38, 58, 0.84);
    font-size: 0.9rem;
    font-weight: 750;
    margin-bottom: 8px;
}

#personal-settings-modal .form-group label i {
    color: #1f6fa0;
    margin-right: 5px;
}

#personal-settings-modal .form-group input[type="text"],
#personal-settings-modal .form-group input[type="password"],
#personal-settings-modal .personal-settings-textarea {
    width: 100%;
    color: #12263a;
    border: 1px solid rgba(31, 78, 121, 0.16);
    border-radius: 15px;
    background: rgba(255, 255, 255, 0.68);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.7),
        0 7px 16px rgba(31, 78, 121, 0.07);
    -webkit-backdrop-filter: blur(12px) saturate(140%);
    backdrop-filter: blur(12px) saturate(140%);
}

#personal-settings-modal .form-group input[type="text"],
#personal-settings-modal .form-group input[type="password"] {
    min-height: 44px;
    padding: 10px 12px;
}

#personal-settings-modal .personal-settings-textarea {
    padding: 12px 14px;
    line-height: 1.58;
}

#personal-settings-modal .form-group input:focus,
#personal-settings-modal .personal-settings-textarea:focus {
    border-color: rgba(31, 111, 160, 0.54);
    background: rgba(255, 255, 255, 0.86);
    box-shadow:
        0 0 0 3px rgba(31, 111, 160, 0.13),
        0 10px 22px rgba(31, 78, 121, 0.1);
}

#personal-settings-modal .personal-settings-hint {
    margin: 7px 0 0;
    color: rgba(18, 38, 58, 0.58);
    font-size: 0.78rem;
    line-height: 1.45;
}

#personal-settings-modal .personal-settings-divider {
    margin: 18px 0;
    border: 0;
    border-top: 1px solid rgba(31, 78, 121, 0.1);
}

#personal-settings-modal .personal-settings-media-row {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
    margin-top: 10px;
}

#personal-settings-modal .personal-settings-media-control {
    flex: 1 1 180px;
    min-width: 0;
}

#personal-settings-modal .personal-settings-file-input {
    display: none;
}

#personal-settings-modal .personal-settings-preview {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    color: rgba(31, 78, 121, 0.38);
    border: 1px solid rgba(31, 78, 121, 0.16);
    background: rgba(255, 255, 255, 0.62);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.72),
        0 9px 22px rgba(31, 78, 121, 0.1);
    -webkit-backdrop-filter: blur(12px) saturate(140%);
    backdrop-filter: blur(12px) saturate(140%);
}

#personal-settings-modal .personal-settings-preview--avatar {
    width: 82px;
    height: 82px;
    border-radius: 50%;
}

#personal-settings-modal .personal-settings-preview--qr {
    width: 150px;
    height: 150px;
    border-radius: 18px;
}

#personal-settings-modal .personal-settings-preview img {
    width: 100%;
    height: 100%;
}

#personal-settings-modal .personal-settings-preview--avatar img {
    object-fit: cover;
}

#personal-settings-modal .personal-settings-preview--qr img {
    object-fit: contain;
    padding: 8px;
    background: #fff;
}

#personal-settings-modal #logo-placeholder {
    font-size: 38px;
}

#personal-settings-modal #payment-qr-placeholder,
#personal-settings-modal #contact-qr-placeholder {
    font-size: 52px;
}

#personal-settings-modal .personal-settings-file-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 7px;
}

#personal-settings-modal .hero-btn {
    width: auto;
    min-width: 0;
    max-width: none;
    margin: 0;
    text-shadow: none;
    overflow: hidden;
}

#personal-settings-modal .hero-btn::before {
    display: none;
}

#personal-settings-modal .personal-settings-upload-btn,
#personal-settings-modal .personal-settings-footer-btn {
    min-height: 42px;
    padding: 9px 14px;
    border-radius: 15px;
    border: 1px solid rgba(31, 78, 121, 0.14);
    color: #123c5b;
    background: rgba(255, 255, 255, 0.58);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.72),
        0 9px 20px rgba(31, 78, 121, 0.1);
    -webkit-backdrop-filter: blur(12px) saturate(145%);
    backdrop-filter: blur(12px) saturate(145%);
    font-size: 0.86rem;
    font-weight: 800;
}

#personal-settings-modal .personal-settings-upload-btn:hover,
#personal-settings-modal .personal-settings-cancel-btn:hover {
    background: rgba(255, 255, 255, 0.76);
    transform: translateY(-1px);
}

#personal-settings-modal .personal-settings-remove-btn {
    min-width: 42px;
    min-height: 38px;
    padding: 8px 10px;
    border-radius: 14px;
    border: 1px solid rgba(220, 53, 69, 0.24);
    color: #dc3545;
    background: rgba(255, 255, 255, 0.58);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.7),
        0 8px 18px rgba(220, 53, 69, 0.1);
    font-size: 0.88rem;
}

#personal-settings-modal .personal-settings-remove-btn:hover {
    color: #ffffff;
    background: linear-gradient(135deg, rgba(220, 53, 69, 0.9), rgba(185, 28, 47, 0.82));
    transform: translateY(-1px);
}

#personal-settings-modal .modal-footer {
    flex-shrink: 0;
    gap: 12px;
    padding: 16px 22px 18px;
    border-top: 1px solid rgba(31, 78, 121, 0.1);
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.34), rgba(238, 248, 255, 0.2));
}

#personal-settings-modal .personal-settings-save-btn {
    color: #ffffff;
    border-color: rgba(31, 111, 160, 0.34);
    background: linear-gradient(135deg, rgba(31, 78, 121, 0.82), rgba(74, 141, 184, 0.66));
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.32),
        0 12px 24px rgba(31, 111, 160, 0.2);
}

#personal-settings-modal .personal-settings-save-btn:hover {
    background: linear-gradient(135deg, rgba(25, 69, 108, 0.88), rgba(61, 128, 173, 0.74));
    transform: translateY(-1px);
}

@media (max-width: 600px) {
    #personal-settings-modal {
    padding: 10px;
    align-items: center;
}

    #personal-settings-modal .modal-content {
    width: calc(100vw - 20px);
    max-height: calc(100dvh - 24px);
    border-radius: 22px;
}

    #personal-settings-modal .modal-header {
    padding: 15px 16px;
}

    #personal-settings-modal .modal-header h3 {
    font-size: 1.08rem;
}

    #personal-settings-modal .modal-body {
    padding: 16px;
}

    #personal-settings-modal .personal-settings-media-row {
    gap: 12px;
}

    #personal-settings-modal .personal-settings-preview--qr {
    width: 128px;
    height: 128px;
}

    #personal-settings-modal .modal-footer {
    padding: 14px 16px 16px;
}
}

.modal-footer {
    padding: 20px 25px;
    border-top: 1px solid rgba(235, 214, 152, 0.2);
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

/* Center align header title and footer buttons for report analysis modal */
#report-analysis-modal .modal-header {
    position: relative;
    justify-content: center;
}

#report-analysis-modal .modal-header h3 {
    width: 100%;
    text-align: center;
}

#report-analysis-modal .modal-header .modal-close {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
}

#report-analysis-modal .modal-footer {
    justify-content: center;
}

#renewal-pay-modal .modal-footer {
    justify-content: center;
}

.modal-footer {
    border-top: 1px solid rgba(31, 78, 121, 0.2);
}

.btn-secondary {
    background: rgba(108, 117, 125, 0.1);
    color: #6c757d;
    border: 1px solid rgba(108, 117, 125, 0.3);
}

.btn-primary {
    background: var(--baize-blue-button-bg);
    color: var(--baize-blue-button-text);
    border: 1px solid var(--baize-blue-button-border);
    box-shadow: var(--baize-blue-button-shadow);
}

.btn-primary:hover {
    transform: translateY(-2px);
    background: var(--baize-blue-button-hover-bg);
    color: var(--baize-blue-button-text);
    box-shadow: var(--baize-blue-button-hover-shadow);
}

/* Add customer modal - modern glass style matching the archive page */
#add-customer-modal {
    background: rgba(12, 32, 48, 0.18);
    -webkit-backdrop-filter: blur(18px) saturate(155%);
    backdrop-filter: blur(18px) saturate(155%);
    padding: 16px;
}

#add-customer-modal .modal-content {
    width: min(92vw, 660px);
    max-height: min(88vh, 780px);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    color: #12263a;
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.68);
    background:
        linear-gradient(145deg, rgba(255, 255, 255, 0.82), rgba(238, 248, 255, 0.58)),
        rgba(255, 255, 255, 0.62);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.72),
        0 24px 54px rgba(31, 78, 121, 0.2);
    -webkit-backdrop-filter: blur(22px) saturate(165%);
    backdrop-filter: blur(22px) saturate(165%);
}

#add-customer-modal .modal-header {
    flex-shrink: 0;
    padding: 18px 22px;
    border-bottom: 1px solid rgba(31, 78, 121, 0.12);
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.46), rgba(221, 240, 250, 0.24));
}

#add-customer-modal .modal-header h3 {
    margin: 0;
    color: #12263a;
    font-size: 1.2rem;
    font-weight: 800;
    letter-spacing: 0;
    display: inline-flex;
    align-items: center;
    gap: 9px;
}

#add-customer-modal .modal-header h3 i {
    color: #1f6fa0;
}

#add-customer-modal .modal-close {
    width: 40px;
    height: 40px;
    border-radius: 14px;
    color: #12263a;
    border: 1px solid rgba(31, 78, 121, 0.14);
    background: rgba(255, 255, 255, 0.58);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.7),
        0 8px 18px rgba(31, 78, 121, 0.12);
    -webkit-backdrop-filter: blur(12px) saturate(145%);
    backdrop-filter: blur(12px) saturate(145%);
}

#add-customer-modal .modal-close:hover {
    color: #0f5f8a;
    background: rgba(255, 255, 255, 0.76);
    transform: translateY(-1px);
}

#add-customer-modal .modal-body {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    padding: 22px;
}

#add-customer-modal .modal-body::-webkit-scrollbar {
    width: 8px;
}

#add-customer-modal .modal-body::-webkit-scrollbar-thumb {
    border-radius: 999px;
    background: rgba(31, 78, 121, 0.24);
}

#add-customer-modal .form-row {
    gap: 14px;
    margin-bottom: 14px;
    align-items: flex-start;
}

#add-customer-modal .form-group {
    margin-bottom: 18px;
}

#add-customer-modal .form-group label {
    color: rgba(18, 38, 58, 0.84);
    font-size: 0.88rem;
    font-weight: 750;
    margin-bottom: 7px;
}

#add-customer-modal .form-group input,
#add-customer-modal .form-group select {
    min-height: 44px;
    color: #12263a;
    border: 1px solid rgba(31, 78, 121, 0.16);
    border-radius: 15px;
    background: rgba(255, 255, 255, 0.68);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.7),
        0 7px 16px rgba(31, 78, 121, 0.07);
    -webkit-backdrop-filter: blur(12px) saturate(140%);
    backdrop-filter: blur(12px) saturate(140%);
}

#add-customer-modal .form-group input:focus,
#add-customer-modal .form-group select:focus {
    border-color: rgba(31, 111, 160, 0.54);
    background: rgba(255, 255, 255, 0.86);
    box-shadow:
        0 0 0 3px rgba(31, 111, 160, 0.13),
        0 10px 22px rgba(31, 78, 121, 0.1);
}

#add-customer-modal .slider-field {
    border: 1px solid rgba(31, 78, 121, 0.14);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.58);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.72),
        0 8px 18px rgba(31, 78, 121, 0.08);
}

#add-customer-modal .slider-value {
    color: #123c5b;
}

#add-customer-modal .slider-hint,
#add-customer-modal .slider-range {
    color: rgba(18, 38, 58, 0.58);
}

#add-customer-modal .slider-control {
    --slider-start: #1f6fa0;
    --slider-end: #62a6cb;
    --slider-track: rgba(31, 78, 121, 0.14);
}

#add-customer-modal .slider-text-entry {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    min-height: 36px;
    padding: 4px 9px 4px 10px;
    border: 1px solid rgba(31, 78, 121, 0.14);
    border-radius: 13px;
    background: rgba(255, 255, 255, 0.66);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.74),
        0 6px 14px rgba(31, 78, 121, 0.07);
}

#add-customer-modal .form-group input.slider-text-input {
    width: 74px;
    min-height: 28px;
    padding: 0;
    color: #123c5b;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    font-size: 1rem;
    font-weight: 800;
    line-height: 1.2;
    text-align: right;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
}

#add-customer-modal .form-group input.slider-text-input:focus {
    border: 0;
    background: transparent;
    box-shadow: none;
    outline: none;
}

#add-customer-modal .form-group input.slider-text-input::-webkit-outer-spin-button,
#add-customer-modal .form-group input.slider-text-input::-webkit-inner-spin-button {
    margin: 0;
}

#add-customer-modal .slider-text-unit {
    color: rgba(18, 38, 58, 0.58);
    font-size: 0.78rem;
    font-weight: 750;
}

#add-customer-modal .slider-field.is-disabled .slider-text-entry {
    opacity: 0.72;
}

#add-customer-modal .modal-footer {
    flex-shrink: 0;
    gap: 12px;
    padding: 16px 22px 18px;
    border-top: 1px solid rgba(31, 78, 121, 0.1);
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.34), rgba(238, 248, 255, 0.2));
}

#add-customer-modal .modal-footer .btn {
    min-width: 108px;
    min-height: 44px;
    margin: 0;
    border-radius: 16px;
    font-weight: 800;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.48),
        0 9px 20px rgba(31, 78, 121, 0.12);
}

#add-customer-modal .modal-footer .btn-secondary {
    color: #425466;
    border: 1px solid rgba(31, 78, 121, 0.13);
    background: rgba(255, 255, 255, 0.56);
}

#add-customer-modal .modal-footer .btn-primary {
    color: #ffffff;
    border: 1px solid rgba(31, 111, 160, 0.34);
    background: linear-gradient(135deg, rgba(31, 78, 121, 0.82), rgba(74, 141, 184, 0.66));
}

#add-customer-modal .modal-footer .btn:hover {
    transform: translateY(-1px);
}

@media (max-width: 600px) {
    #add-customer-modal {
    padding: 10px;
    align-items: center;
}

    #add-customer-modal .modal-content {
    width: calc(100vw - 20px);
    max-height: calc(100dvh - 24px);
    border-radius: 22px;
}

    #add-customer-modal .modal-header {
    padding: 15px 16px;
}

    #add-customer-modal .modal-header h3 {
    font-size: 1.08rem;
}

    #add-customer-modal .modal-body {
    padding: 16px;
}

    #add-customer-modal .form-row {
    gap: 0;
    margin-bottom: 0;
}

    #add-customer-modal .form-group {
    margin-bottom: 14px;
}

    #add-customer-modal .form-group:has(.slider-field) {
    width: 100%;
    align-self: stretch;
    flex: 0 0 auto;
}

    #add-customer-modal .form-group:has(.slider-field) .slider-field,
#add-customer-modal .form-group:has(.slider-field) .slider-control {
    width: 100%;
}

    #add-customer-modal .modal-footer {
    padding: 14px 16px 16px;
}

    #add-customer-modal .modal-footer .btn {
    flex: 1;
    min-width: 0;
}
}

/* Password Modal Specific Styles */
#password-modal .modal-content {
    max-width: 450px;
}

#password-modal .form-group {
    margin-bottom: 20px;
}

#password-modal .form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    font-size: 14px;
    color: #1f4e79;
}

#password-modal .form-group input[type="password"] {
    width: 100%;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.3s ease;
    border: 2px solid rgba(31, 78, 121, 0.3);
    background: rgba(31, 78, 121, 0.1);
    color: #333;
}

#password-modal .form-group input[type="password"]:focus {
    outline: none;
    border-color: #1f4e79;
    background: rgba(31, 78, 121, 0.15);
    box-shadow: 0 0 0 3px rgba(31, 78, 121, 0.1);
}

#password-modal .form-group input[type="password"]::placeholder {
    color: rgba(51, 51, 51, 0.5);
}

/* Mobile responsive for modal */
@media (max-width: 600px) {
    .modal-content {
    width: 95%;
    margin: 10px;
}
    
    .form-row {
    flex-direction: column;
    gap: 10px;
}
    
    .modal-header,
.modal-body,
.modal-footer {
    padding: 15px;
}

    #password-modal .modal-content {
    max-width: none;
    width: 95%;
}

    /* Personal settings modal - stack buttons vertically in mobile */
    #personal-settings-modal .modal-footer {
    flex-direction: column-reverse;
    gap: 10px;
}

    #personal-settings-modal .modal-footer .hero-btn {
    width: 100% !important;
    max-width: none !important;
    margin: 0;
}
}

.report-tab-content {
    display: none;
    padding: 0;
    ;
}

.report-tab-content.active {
    display: block;
}

/* Ensure textareas in report tabs attach to the tab buttons */
.report-tab-content .form-textarea {
    border-top: none;
    border-top-left-radius: 0;
    border-top-right-radius: 0;
    margin-top: 0;
}

/* Upload button alignment within report tabs */
.report-tab-content .upload-container {
    display: flex;
    align-items: stretch;
    justify-content: center;
    gap: 10px;
    flex-wrap: nowrap;
    margin-top: 10px;
    width: 100%;
}

.report-tab-content .upload-container .tab-button {
    flex: 1 1 33%;
    min-width: 0;
    padding: 12px 16px;
    white-space: nowrap;
}

.report-tab-content .upload-btn {
    flex-shrink: 0;
}

/* Integrated medical report panel */
.medical-report-panel {
    --report-panel-radius: 22px;
    --report-panel-pad: 14px;
    --report-tab-gap: 10px;
    --report-tab-inner-gap: 6px;
    --report-tab-font-size: 0.92rem;
    --report-tab-icon-size: 1rem;
    --report-control-font-size: 0.84rem;
    --report-tab-min-width: 118px;
    --report-content-pad: 9px;
    --report-content-min-height: 296px;
    --report-control-gap: 10px;
    --report-shell-gap: 5px;
    display: flex;
    flex-direction: column;
    gap: 0;
    padding: var(--report-panel-pad);
    border-radius: var(--report-panel-radius);
    border: 1px solid rgba(31, 78, 121, 0.18);
    background:
        radial-gradient(circle at 16% 8%, rgba(255, 255, 255, 0.9) 0%, rgba(255, 255, 255, 0) 34%),
        linear-gradient(145deg, rgba(255, 255, 255, 0.86) 0%, rgba(235, 246, 252, 0.72) 52%, rgba(222, 239, 249, 0.86) 100%);
    box-shadow:
        0 18px 48px rgba(31, 78, 121, 0.16),
        inset 0 1px 0 rgba(255, 255, 255, 0.76),
        inset 0 -1px 0 rgba(31, 78, 121, 0.08);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    overflow: hidden;
}

.report-tab-nav {
    flex-wrap: nowrap;
    justify-content: space-between;
    align-items: stretch;
    gap: var(--report-tab-gap);
    width: 100%;
    margin: 0;
    padding: 0 2px 0;
    border: 0;
    border-radius: calc(var(--report-panel-radius) - 6px) calc(var(--report-panel-radius) - 6px) 0 0;
    background: transparent;
    backdrop-filter: none;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: thin;
    scrollbar-color: rgba(31, 78, 121, 0.28) transparent;
    scroll-snap-type: x proximity;
    -webkit-overflow-scrolling: touch;
}

.report-tab-nav::-webkit-scrollbar {
    height: 6px;
}

.report-tab-nav::-webkit-scrollbar-track {
    background: transparent;
}

.report-tab-nav::-webkit-scrollbar-thumb {
    background: rgba(31, 78, 121, 0.24);
    border-radius: 999px;
}

.report-tab-nav .report-tab-button {
    position: relative;
    flex: 1 1 0;
    min-width: 0;
    min-height: 58px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--report-tab-inner-gap);
    padding: 12px 14px 18px;
    border-radius: calc(var(--report-panel-radius) - 8px) calc(var(--report-panel-radius) - 8px) 0 0 !important;
    border: 1px solid rgba(31, 78, 121, 0.08);
    background: rgba(31, 78, 121, 0.08);
    color: rgba(31, 48, 66, 0.86);
    font-size: var(--report-tab-font-size);
    font-weight: 650;
    letter-spacing: 0;
    white-space: nowrap;
    scroll-snap-align: start;
    box-shadow: none;
    transform: translateY(0);
    transition:
        background 0.22s ease,
        border-color 0.22s ease,
        color 0.22s ease,
        box-shadow 0.22s ease,
        transform 0.22s ease;
}

.report-tab-nav .report-tab-button::before {
    display: none;
}

.report-tab-nav .report-tab-button::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: 3px;
    width: 0;
    height: 4px;
    border-radius: 999px;
    background: linear-gradient(90deg, #2f6f9f 0%, #6caed3 100%);
    transform: translateX(-50%);
    transition: width 0.22s ease;
}

.report-tab-button .report-tab-icon {
    flex: 0 0 auto;
    font-size: var(--report-tab-icon-size);
    color: rgba(31, 78, 121, 0.72);
    text-shadow: 0 2px 8px rgba(31, 78, 121, 0.18);
}

.report-tab-button .report-tab-label {
    overflow: hidden;
    text-overflow: ellipsis;
}

.report-tab-nav .report-tab-button:hover {
    filter: none;
    color: #1f4e79;
    background: rgba(31, 78, 121, 0.13);
}

.report-tab-nav .report-tab-button.active {
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.9) 0%, rgba(238, 248, 252, 0.88) 100%);
    border-color: rgba(31, 78, 121, 0.16);
    border-bottom-color: rgba(255, 255, 255, 0.76);
    color: #1f4e79;
    box-shadow:
        0 12px 26px rgba(31, 78, 121, 0.13),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
    transform: translateY(1px);
}

.report-tab-nav .report-tab-button.active::after {
    width: min(64px, 46%);
}

.report-tab-nav .report-tab-button.active .report-tab-icon {
    color: #2f6f9f;
}

.medical-report-content-shell {
    --report-shell-gap: 5px;
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
    gap: 0;
    padding: 0 2px;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

.medical-report-content-shell .report-tab-content {
    min-height: 0;
}

.medical-report-content-shell .report-tab-content[style*="display: block"] {
    display: flex !important;
    flex-direction: column;
}

.medical-report-content-shell .report-tab-content[style*="display: block"] > .w3-center {
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.medical-report-textarea-frame {
    position: relative;
    display: flex;
    flex: 1 1 auto;
    min-height: 0;
}

.medical-report-content-shell .report-tab-content .form-textarea {
    flex: 1 1 auto;
    width: 100%;
    min-height: var(--report-content-min-height);
    margin: 0;
    padding: 14px 16px;
    border: 1px solid rgba(31, 78, 121, 0.16);
    border-top-color: transparent;
    border-radius: calc(var(--report-panel-radius) - 10px);
    border-top-left-radius: 0;
    border-top-right-radius: 0;
    background: rgba(255, 255, 255, 0.76);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.82),
        inset 0 -10px 24px rgba(31, 78, 121, 0.04);
    color: #1f2d3d;
    line-height: 1.65;
}

.medical-report-fullscreen-toggle {
    display: none;
}

body.dash-page[data-dash-mobile-page="archive"] #tab-analysis .medical-report-textarea-frame {
    --medical-report-fullscreen-button-gap: 18px;
    --medical-report-fullscreen-font-size: inherit;
}

body.dash-page[data-dash-mobile-page="archive"] #tab-analysis .medical-report-fullscreen-toggle,
body.dash-page[data-dash-mobile-page="archive"] #tab-analysis .medical-report-font-toggle {
    position: absolute;
    right: var(--medical-report-fullscreen-button-gap);
    z-index: 4;
    width: 34px;
    height: 34px;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(31, 78, 121, 0.16);
    border-radius: 999px;
    color: #0a5e91;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.86), rgba(220, 239, 251, 0.7));
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.74),
        0 8px 18px rgba(15, 42, 64, 0.12);
    -webkit-backdrop-filter: blur(14px) saturate(150%);
    backdrop-filter: blur(14px) saturate(150%);
}

body.dash-page[data-dash-mobile-page="archive"] #tab-analysis .medical-report-fullscreen-toggle {
    top: 14px;
    display: inline-flex;
}

body.dash-page[data-dash-mobile-page="archive"] #tab-analysis .medical-report-font-toggle {
    display: none;
}

@media (min-width: 1025px) {
    body.dash-page #tab-analysis .medical-report-fullscreen-toggle,
    body.dash-page #tab-analysis .medical-report-font-toggle {
        display: none !important;
    }
}

body.desktop-archive-focus #tab-analysis .medical-report-fullscreen-toggle,
body.desktop-archive-focus #tab-analysis .medical-report-font-toggle {
    display: none !important;
}

body.dash-page[data-dash-mobile-page="archive"] #tab-analysis .medical-report-textarea-frame > .form-textarea {
    padding-right: 58px;
}

body.dash-page.dash-medical-report-expanded {
    overflow: hidden;
}

body.dash-page.dash-medical-report-expanded .dash-mobile-topbar,
body.dash-page.dash-medical-report-expanded .dash-mobile-bottom-nav,
body.dash-page.dash-medical-report-expanded .dash-customer-select-card,
body.dash-page.dash-medical-report-expanded #health_forms_data > .tab-container:not(.action-buttons),
body.dash-page.dash-medical-report-expanded #health_forms_data > .action-buttons {
    display: none !important;
}

body.dash-page.dash-medical-report-expanded .medical-report-textarea-frame.is-medical-report-fullscreen {
    position: fixed;
    inset: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
    z-index: 20000;
    display: flex;
    width: auto;
    max-width: none;
    min-height: 0;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: #fff;
    box-shadow: none;
    overflow: hidden;
}

body.dash-page.dash-medical-report-expanded .medical-report-textarea-frame.is-medical-report-fullscreen > .form-textarea {
    display: block !important;
    flex: 1 1 auto;
    width: 100%;
    min-height: 0;
    height: 100%;
    padding: 52px 58px 24px 20px;
    border: 0;
    border-radius: 0;
    background: #fff;
    box-shadow: none;
    font-size: var(--medical-report-fullscreen-font-size);
    resize: none !important;
}

body.dash-page.dash-medical-report-expanded .medical-report-textarea-frame.is-medical-report-fullscreen .medical-report-fullscreen-toggle {
    top: 24px;
    right: var(--medical-report-fullscreen-button-gap);
}

body.dash-page.dash-medical-report-expanded .medical-report-textarea-frame.is-medical-report-fullscreen .medical-report-font-toggle {
    display: inline-flex;
}

body.dash-page.dash-medical-report-expanded .medical-report-textarea-frame.is-medical-report-fullscreen .medical-report-font-increase {
    top: 66px;
}

body.dash-page.dash-medical-report-expanded .medical-report-textarea-frame.is-medical-report-fullscreen .medical-report-font-decrease {
    top: 108px;
}

body.dash-page.dash-medical-report-expanded #tab-analysis .medical-report-textarea-frame.is-medical-report-fullscreen > .form-textarea {
    display: block !important;
    flex: 1 1 auto;
    width: 100%;
    min-height: 0;
    height: 100%;
    padding: 52px 58px 24px 20px !important;
    border: 0;
    border-radius: 0;
    background: #fff;
    box-shadow: none;
    font-size: var(--medical-report-fullscreen-font-size);
    resize: none !important;
}

body.dash-page.dash-medical-report-expanded #tab-analysis .medical-report-textarea-frame.is-medical-report-fullscreen .medical-report-font-toggle {
    display: inline-flex !important;
}

body.dash-page.dash-medical-report-expanded #tab-analysis .medical-report-textarea-frame.is-medical-report-fullscreen .medical-report-font-increase {
    top: 66px;
}

body.dash-page.dash-medical-report-expanded #tab-analysis .medical-report-textarea-frame.is-medical-report-fullscreen .medical-report-font-decrease {
    top: 108px;
}

@media (min-width: 700px) and (max-width: 1024px) {
    body.dash-page[data-dash-mobile-page="archive"] #tab-analysis .medical-report-textarea-frame {
        --medical-report-fullscreen-button-gap: 42px;
    }

    body.dash-page[data-dash-mobile-page="archive"] #tab-analysis .medical-report-textarea-frame > .form-textarea {
        padding-right: 84px;
    }

    body.dash-page.dash-medical-report-expanded .medical-report-textarea-frame.is-medical-report-fullscreen > .form-textarea {
        padding-right: 84px;
    }

    body.dash-page.dash-medical-report-expanded #tab-analysis .medical-report-textarea-frame.is-medical-report-fullscreen > .form-textarea {
        padding-right: 84px !important;
    }
}

.medical-report-content-shell .upload-container {
    margin-top: var(--report-control-gap);
    gap: var(--report-control-gap);
    padding: 0;
    border: 0;
    background: transparent;
    backdrop-filter: none;
}

.medical-report-content-shell .upload-container .tab-button {
    border: 1px solid rgba(31, 78, 121, 0.16);
    border-radius: calc(var(--report-panel-radius) - 10px);
    background: rgba(255, 255, 255, 0.66);
    color: #27445f;
    font-size: var(--report-control-font-size);
    box-shadow: 0 6px 16px rgba(31, 78, 121, 0.08);
}

.medical-report-content-shell .upload-container .tab-button:hover {
    filter: none;
    background: rgba(238, 247, 250, 0.95);
    color: #1f4e79;
    transform: translateY(-1px);
}

.medical-report-panel #upload-status:not(:empty),
.medical-report-panel #uploaded-files-list:not(:empty) {
    margin-top: 1px;
}

.medical-report-panel[data-report-layout="wide"] {
    --report-panel-pad: 16px;
    --report-tab-gap: 12px;
    --report-tab-inner-gap: 7px;
    --report-tab-font-size: 0.96rem;
    --report-tab-icon-size: 1.08rem;
    --report-control-font-size: 0.88rem;
    --report-content-pad: 10px;
    --report-content-min-height: 340px;
    --report-control-gap: 12px;
}

.medical-report-panel[data-report-layout="medium"] {
    --report-panel-pad: 14px;
    --report-tab-gap: 9px;
    --report-tab-inner-gap: 6px;
    --report-tab-font-size: 0.9rem;
    --report-tab-icon-size: 1rem;
    --report-control-font-size: 0.83rem;
    --report-content-pad: 9px;
    --report-content-min-height: 296px;
}

.medical-report-panel[data-report-layout="compact"] {
    --report-panel-pad: 12px;
    --report-tab-gap: 7px;
    --report-tab-inner-gap: 5px;
    --report-tab-font-size: 0.82rem;
    --report-tab-icon-size: 0.9rem;
    --report-control-font-size: 0.76rem;
    --report-content-pad: 7px;
    --report-content-min-height: 244px;
}

.medical-report-panel[data-report-layout="compact"] .report-tab-nav .report-tab-button {
    padding: 10px 8px 16px;
}

.medical-report-panel[data-report-layout="narrow"] {
    --report-panel-pad: 10px;
    --report-tab-gap: 8px;
    --report-tab-inner-gap: 5px;
    --report-tab-font-size: 0.78rem;
    --report-tab-icon-size: 0.86rem;
    --report-control-font-size: 0.72rem;
    --report-tab-min-width: 104px;
    --report-content-pad: 6px;
    --report-content-min-height: 218px;
    --report-control-gap: 8px;
}

.medical-report-panel[data-report-layout="narrow"] .report-tab-nav {
    justify-content: flex-start;
    padding-bottom: 4px;
    scroll-snap-type: x mandatory;
}

.medical-report-panel[data-report-layout="narrow"] .report-tab-nav .report-tab-button {
    flex: 0 0 var(--report-tab-min-width);
    min-height: 48px;
    padding: 9px 10px 14px;
}

.medical-report-panel[data-report-layout="narrow"] .upload-container {
    flex-wrap: wrap;
}

.medical-report-panel[data-report-layout="narrow"] .upload-container .tab-button {
    flex: 1 1 calc(50% - var(--report-control-gap));
}

.medical-report-panel[data-report-height="short"] {
    --report-panel-pad: 9px;
    --report-content-pad: 6px;
    --report-content-min-height: 178px;
    --report-control-gap: 7px;
}

.medical-report-panel[data-report-height="short"] .report-tab-nav .report-tab-button {
    min-height: 44px;
    padding-top: 8px;
    padding-bottom: 12px;
}

@media (min-width: 390px) and (max-width: 900px) {
    body.dash-page #tab-analysis .report-tab-nav,
    body.dash-page #tab-analysis .medical-report-panel[data-report-layout="narrow"] .report-tab-nav {
        justify-content: stretch;
        gap: clamp(4px, 1.1vw, 8px);
        width: 100%;
        overflow-x: hidden !important;
        scroll-snap-type: none !important;
        padding-left: 0;
        padding-right: 0;
    }

    body.dash-page #tab-analysis .report-tab-nav .report-tab-button,
    body.dash-page #tab-analysis .medical-report-panel[data-report-layout="narrow"] .report-tab-nav .report-tab-button {
        flex: 1 1 0 !important;
        width: auto;
        min-width: 0 !important;
        max-width: none !important;
        min-height: 44px;
        padding-left: clamp(3px, 0.9vw, 10px);
        padding-right: clamp(3px, 0.9vw, 10px);
    }
}

.medical-report-panel[data-report-height="short"] .medical-report-content-shell .form-textarea {
    line-height: 1.5;
    padding-top: 14px;
    padding-bottom: 14px;
}

body.desktop-archive-focus #tab-analysis .medical-report-panel {
    flex: 1 1 auto;
    min-height: 0;
}

body.desktop-archive-focus #tab-analysis .medical-report-content-shell {
    flex: 1 1 auto;
    min-height: 0;
}

body.desktop-archive-focus #tab-analysis .medical-report-content-shell .report-tab-content[style*="display: block"] {
    flex: 1 1 auto;
    min-height: 0;
}

body.desktop-archive-focus #tab-analysis .medical-report-content-shell .report-tab-content[style*="display: block"] > .w3-center {
    flex: 1 1 auto;
}

body.desktop-archive-focus #tab-analysis .medical-report-content-shell .form-textarea {
    flex: 1 1 auto;
}

/* User Message Edit Modal Styles */
.user-edit-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.user-edit-modal-content {
    border-radius: 15px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.8);
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 50%, #f8f9fa 100%);
    border: 1px solid rgba(31, 78, 121, 0.2);
}

.user-edit-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    border-bottom: 1px solid rgba(31, 78, 121, 0.2);
}

.user-edit-modal-header h3 {
    margin: 0;
    font-size: 1.3rem;
    font-weight: 600;
    color: #2c3e50;
}

.user-edit-modal-close {
    background: none;
    border: none;
    font-size: 1.8rem;
    cursor: pointer;
    line-height: 1;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    color: #2c3e50;
}

.user-edit-modal-close:hover {
    transform: scale(1.1);
    color: #1f4e79;
}

.user-edit-modal-body {
    padding: 25px;
}

.user-edit-modal-footer {
    padding: 20px 25px;
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    border-top: 1px solid rgba(31, 78, 121, 0.2);
}

.user-edit-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 80px;
}

.user-edit-btn-secondary {
    background: rgba(108, 117, 125, 0.1);
    color: #6c757d;
    border: 1px solid rgba(108, 117, 125, 0.3);
}

.user-edit-btn-secondary:hover {
    transform: translateY(-1px);
    background: rgba(108, 117, 125, 0.2);
}

.user-edit-btn-primary {
    background: var(--baize-blue-button-bg);
    color: var(--baize-blue-button-text);
    border: 1px solid var(--baize-blue-button-border);
    box-shadow: var(--baize-blue-button-shadow);
}

.user-edit-btn-primary:hover {
    transform: translateY(-1px);
    background: var(--baize-blue-button-hover-bg);
    color: var(--baize-blue-button-text);
    box-shadow: var(--baize-blue-button-hover-shadow);
}

/* Textarea specific styling for user edit modal */
.user-edit-textarea {
    width: 100%;
    min-height: 200px;
    padding: 15px;
    border-radius: 10px;
    font-size: 1rem;
    font-family: inherit;
    line-height: 1.5;
    resize: vertical;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.9);
    color: #2c3e50;
    border: 2px solid rgba(52, 73, 94, 0.2);
}

.user-edit-textarea:focus {
    outline: none;
    border-color: #1f4e79;
    box-shadow: 0 0 0 3px rgba(31, 78, 121, 0.2);
    background: rgba(255, 255, 255, 1);
}

/* Mobile responsiveness for user edit modal */
@media (max-width: 768px) {
    .user-edit-modal-content {
    width: 95%;
    margin: 20px;
    max-height: 85vh;
}
    
    .user-edit-modal-header,
.user-edit-modal-body,
.user-edit-modal-footer {
    padding: 15px;
}
    
    .user-edit-textarea {
    min-height: 150px;
    font-size: 16px;
    ;
}
    
    .user-edit-modal-footer {
    flex-direction: column-reverse;
}
    
    .user-edit-btn {
    width: 100%;
    margin-bottom: 8px;
}
}

/* Full-screen edit modals aligned with the dashboard glass style */
.edit-modal-overlay,
.user-edit-modal-overlay {
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    display: flex;
    align-items: stretch;
    justify-content: stretch;
    padding: 0;
    background:
        radial-gradient(circle at 50% 12%, rgba(255, 255, 255, 0.88), transparent 42%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.82), rgba(247, 251, 253, 0.78));
    -webkit-backdrop-filter: blur(18px) saturate(135%);
    backdrop-filter: blur(18px) saturate(135%);
    box-sizing: border-box;
    overflow: hidden;
}

.edit-modal-overlay {
    z-index: 10001;
}

.user-edit-modal-overlay {
    z-index: 10002;
}

.edit-modal-window,
.user-edit-modal-content {
    width: 100%;
    max-width: none;
    height: 100vh;
    height: 100dvh;
    max-height: none;
    min-height: 0;
    margin: 0;
    border: 0;
    border-radius: 0;
    color: #12263a;
    background:
        linear-gradient(145deg, rgba(255, 255, 255, 0.82), rgba(238, 248, 255, 0.58)),
        rgba(255, 255, 255, 0.62);
    box-shadow: none;
    -webkit-backdrop-filter: blur(22px) saturate(165%);
    backdrop-filter: blur(22px) saturate(165%);
    box-sizing: border-box;
    overflow: hidden;
}

.edit-modal-window {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: max(16px, env(safe-area-inset-top)) clamp(14px, 2vw, 28px) max(16px, env(safe-area-inset-bottom));
}

.edit-modal-search-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 0 0 auto;
    min-width: 0;
}

.edit-modal-search-input {
    flex: 1 1 260px;
    min-width: 120px;
    max-width: min(42vw, 420px);
    min-height: 42px;
    padding: 0 14px;
    border: 1px solid rgba(31, 78, 121, 0.16);
    border-radius: 16px;
    color: #12263a;
    background: rgba(255, 255, 255, 0.68);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.7),
        0 7px 16px rgba(31, 78, 121, 0.07);
    font-size: 0.95rem;
    outline: none;
}

.edit-modal-search-input:focus {
    border-color: rgba(31, 111, 160, 0.54);
    background: rgba(255, 255, 255, 0.86);
    box-shadow:
        0 0 0 3px rgba(31, 111, 160, 0.13),
        0 10px 22px rgba(31, 78, 121, 0.1);
}

.edit-modal-search-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.edit-modal-search-count {
    min-width: 44px;
    color: rgba(18, 38, 58, 0.58);
    font-size: 0.78rem;
    font-weight: 700;
    text-align: center;
    white-space: nowrap;
}

.edit-modal-editor,
.user-edit-textarea {
    flex: 1 1 auto;
    min-height: 0;
    height: auto;
    resize: none;
    padding: 16px;
    border: 1px solid rgba(31, 78, 121, 0.16);
    border-radius: 18px;
    color: #12263a;
    background: rgba(255, 255, 255, 0.74);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.72),
        0 10px 22px rgba(31, 78, 121, 0.08);
    -webkit-backdrop-filter: blur(12px) saturate(140%);
    backdrop-filter: blur(12px) saturate(140%);
    font-family: var(--app-font-sans);
    line-height: 1.62;
    outline: none;
    box-sizing: border-box;
}

.edit-modal-editor:focus,
.user-edit-textarea:focus {
    border-color: rgba(31, 111, 160, 0.54);
    background: rgba(255, 255, 255, 0.88);
    box-shadow:
        0 0 0 3px rgba(31, 111, 160, 0.13),
        0 12px 24px rgba(31, 78, 121, 0.11);
}

.edit-modal-help-section {
    flex: 0 1 auto;
    max-height: 28vh;
    overflow: auto;
    margin: 0;
    padding: 14px;
    border: 1px solid rgba(31, 78, 121, 0.12);
    border-radius: 18px;
    color: rgba(18, 38, 58, 0.78);
    background: rgba(255, 255, 255, 0.58);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.72),
        0 8px 18px rgba(31, 78, 121, 0.08);
    font-size: 0.86rem;
    line-height: 1.58;
}

.edit-modal-help-section code {
    padding: 2px 6px;
    border-radius: 8px;
    color: #123c5b;
    background: rgba(237, 247, 255, 0.74);
}

.edit-modal-help-title {
    margin-bottom: 12px;
    color: #12263a;
    font-weight: 800;
}

.edit-modal-help-grid {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 8px 12px;
    color: rgba(18, 38, 58, 0.74);
}

.edit-modal-help-heading--large {
    font-size: 1.2em;
}

.edit-modal-help-heading--medium {
    font-size: 1.1em;
}

.edit-modal-help-heading--small {
    font-size: 1.05em;
}

.edit-modal-actions,
.user-edit-modal-footer {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    margin: 0;
    padding: 12px 0 0;
    border: 0;
    background: transparent;
}

.edit-modal-action-btn,
.user-edit-btn,
.md-format-btn {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    min-height: 42px;
    margin: 0;
    padding: 0 14px !important;
    border: 1px solid rgba(255, 255, 255, 0.64) !important;
    border-radius: 18px !important;
    background: rgba(255, 255, 255, 0.54) !important;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.72),
        0 12px 24px rgba(15, 42, 64, 0.1) !important;
    -webkit-backdrop-filter: blur(16px) saturate(155%);
    backdrop-filter: blur(16px) saturate(155%);
    color: #0a5e91 !important;
    font-family: var(--app-font-sans);
    font-size: 0.92rem;
    font-weight: 800;
    line-height: 1;
    cursor: pointer;
    text-decoration: none;
    transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease, background 160ms ease;
}

.edit-modal-action-btn span {
    display: inline;
    white-space: nowrap;
}

.edit-modal-actions .edit-modal-action-btn,
.edit-modal-search-actions .edit-modal-action-btn {
    gap: 6px;
}

.edit-modal-top-close-btn span {
    display: none;
}

.edit-modal-action-btn:hover,
.user-edit-btn:hover,
.md-format-btn:hover {
    transform: translateY(-1px);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.78),
        0 14px 28px rgba(15, 42, 64, 0.14) !important;
}

.edit-modal-action-btn--primary,
.edit-modal-save-btn,
.user-edit-btn-primary,
.md-format-btn {
    color: #0a5e91 !important;
    border-color: rgba(31, 111, 160, 0.25) !important;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.82), rgba(220, 239, 251, 0.56)) !important;
}

.edit-modal-cancel-btn {
    color: #d8172a !important;
    border-color: rgba(239, 35, 47, 0.3) !important;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.84), rgba(255, 230, 235, 0.58)) !important;
}

.edit-modal-top-close-btn {
    flex: 0 0 44px;
    margin-left: auto;
    padding: 0 !important;
}

.user-edit-btn-secondary {
    color: #425466 !important;
    border-color: rgba(31, 78, 121, 0.13) !important;
    background: rgba(255, 255, 255, 0.56) !important;
}

.edit-modal-action-btn--success {
    color: #247a55 !important;
    border-color: rgba(36, 122, 85, 0.3) !important;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.84), rgba(223, 247, 235, 0.6)) !important;
}

.edit-modal-action-btn--warning {
    color: #bc6414 !important;
    border-color: rgba(188, 100, 20, 0.3) !important;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.84), rgba(255, 238, 218, 0.62)) !important;
}

.edit-modal-action-btn--info {
    color: #117286 !important;
    border-color: rgba(17, 114, 134, 0.3) !important;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.84), rgba(218, 245, 250, 0.6)) !important;
}

.md-format-btn {
    min-height: 30px;
    min-width: 58px;
    padding: 0 10px !important;
    border-radius: 12px !important;
    font-size: 0.76rem !important;
}

.user-edit-modal-content {
    display: flex;
    flex-direction: column;
}

.user-edit-modal-header {
    flex: 0 0 auto;
    padding: max(18px, calc(env(safe-area-inset-top) + 12px)) clamp(16px, 3vw, 34px) 16px;
    border-bottom: 1px solid rgba(31, 78, 121, 0.12);
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.46), rgba(221, 240, 250, 0.24));
}

.user-edit-modal-header h3 {
    color: #12263a;
    font-size: 1.2rem;
    font-weight: 800;
}

.user-edit-modal-close {
    width: 40px;
    height: 40px;
    border: 1px solid rgba(31, 78, 121, 0.14);
    border-radius: 14px;
    color: #12263a;
    background: rgba(255, 255, 255, 0.58);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.7),
        0 8px 18px rgba(31, 78, 121, 0.12);
    -webkit-backdrop-filter: blur(12px) saturate(145%);
    backdrop-filter: blur(12px) saturate(145%);
    font-size: 1.45rem;
}

.user-edit-modal-close:hover {
    color: #0f5f8a;
    background: rgba(255, 255, 255, 0.76);
    transform: translateY(-1px);
}

.user-edit-modal-body {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
    padding: 16px clamp(16px, 3vw, 34px);
    overflow: hidden;
}

.user-edit-modal-body .form-group {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
    margin: 0;
}

.user-edit-modal-body label {
    flex: 0 0 auto;
    margin-bottom: 8px;
    color: rgba(18, 38, 58, 0.84);
    font-size: 0.88rem;
    font-weight: 750;
}

.user-edit-modal-footer {
    padding: 14px clamp(16px, 3vw, 34px) max(16px, calc(env(safe-area-inset-bottom) + 12px));
    border-top: 1px solid rgba(31, 78, 121, 0.1);
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.34), rgba(238, 248, 255, 0.2));
}

.user-edit-btn {
    min-width: 108px;
}

@media (max-width: 768px) {
    .edit-modal-window {
        gap: 10px;
        padding: max(12px, env(safe-area-inset-top)) 10px max(12px, env(safe-area-inset-bottom));
    }

    .edit-modal-search-bar {
        display: grid;
        grid-template-columns: minmax(96px, 1fr) minmax(0, 1.8fr) 42px;
        align-items: stretch;
        gap: 6px;
    }

    .edit-modal-search-input {
        order: 1;
        flex: 1 1 auto;
        width: 100%;
        min-width: 0;
        max-width: none;
        min-height: 42px;
        padding: 0 10px;
        font-size: 0.88rem;
    }

    .edit-modal-search-actions {
        order: 2;
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 6px;
        min-width: 0;
    }

    .edit-modal-search-find-btn {
        order: 1;
    }

    .edit-modal-search-next-btn {
        order: 2;
    }

    .edit-modal-search-prev-btn {
        order: 3;
    }

    .edit-modal-top-close-btn {
        order: 3;
        width: 42px !important;
        min-width: 42px;
        margin-left: 0;
    }

    .edit-modal-search-bar .edit-modal-action-btn {
        width: 100%;
        min-width: 0;
        min-height: 42px;
        padding: 0 6px !important;
        border-radius: 16px !important;
        gap: 4px;
        font-size: 0.72rem;
    }

    .edit-modal-action-btn span {
        display: inline;
        white-space: nowrap;
    }

    .edit-modal-search-count {
        display: none;
    }

    .edit-modal-help-section {
        max-height: 22vh;
        font-size: 0.82rem;
    }

    .edit-modal-actions {
        display: grid;
        grid-template-columns: repeat(4, minmax(0, 1fr));
        align-items: stretch;
        gap: 6px;
        padding-top: 8px;
    }

    .edit-modal-actions .edit-modal-action-btn {
        gap: 6px;
    }

    .user-edit-modal-footer {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        align-items: stretch;
    }

    .edit-modal-action-btn,
    .user-edit-btn {
        width: 100%;
        min-width: 0;
        margin-bottom: 0;
    }

    .user-edit-modal-content {
        width: 100%;
        height: 100dvh;
        max-height: none;
        margin: 0;
    }

    .user-edit-modal-header,
    .user-edit-modal-body,
    .user-edit-modal-footer {
        padding-left: 12px;
        padding-right: 12px;
    }

    .user-edit-textarea {
        min-height: 0;
        font-size: 16px;
    }
}

/* Mermaid Diagram Styles */
.mermaid-diagram {
    margin: 20px 0;
    padding: 15px;
    border-radius: 8px;
    overflow-x: auto;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(31, 78, 121, 0.2);
}

.mermaid-diagram .mermaid {
    background: transparent !important;
    border: none;
    font-family: inherit;
}

/* Mermaid diagram styles */
.mermaid-diagram svg {
    max-width: 100%;
    height: auto;
}

/* Share Link Modal with QR Code Styles */
.share-qr-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 10px 0;
}

.share-qr-code {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 15px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    cursor: pointer;
    transition: all 0.3s ease;
    min-height: 150px;
    min-width: 150px;
}

.share-qr-code:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(31, 78, 121, 0.4);
}

.share-qr-code img {
    display: block;
    max-width: 100%;
    height: auto;
}

/* Compact modal style */
.share-modal-compact {
    max-width: 350px !important;
}

#share-link-modal .form-input {
    width: 100%;
    padding: 10px 12px;
    border-radius: 8px;
    font-size: 12px;
    font-family: monospace;
    transition: all 0.3s ease;
    background: rgba(31, 78, 121, 0.1);
    border: 1px solid rgba(31, 78, 121, 0.3);
    color: #2c3e50;
}

#share-link-modal .form-input:focus {
    outline: none;
    border-color: rgba(31, 78, 121, 0.6);
    background: rgba(31, 78, 121, 0.15);
}

/* Mobile responsive for share modal */
@media (max-width: 600px) {
    .share-qr-code {
    min-height: 135px;
    min-width: 135px;
    padding: 12px;
}

    .share-modal-compact {
    width: 90% !important;
    max-width: 90% !important;
}

    .share-qr-container p {
    font-size: 13px;
}
}

.mermaid-diagram .node rect,
.mermaid-diagram .node circle,
.mermaid-diagram .node ellipse,
.mermaid-diagram .node polygon {
    fill: rgba(235, 214, 152, 0.1) !important;
    stroke: #EBD698 !important;
    stroke-width: 2px !important;
}

.mermaid-diagram .node .label {
    color: #EBD698 !important;
    fill: #EBD698 !important;
}

.mermaid-diagram .edgePath .path {
    stroke: #EBD698 !important;
    stroke-width: 2px !important;
}

.mermaid-diagram .arrowheadPath {
    fill: #EBD698 !important;
    stroke: #EBD698 !important;
}

.mermaid-diagram .node rect,
.mermaid-diagram .node circle,
.mermaid-diagram .node ellipse,
.mermaid-diagram .node polygon {
    fill: rgba(31, 78, 121, 0.1) !important;
    stroke: #1f4e79 !important;
    stroke-width: 2px !important;
}

.mermaid-diagram .node .label {
    color: #2c3e50 !important;
    fill: #2c3e50 !important;
}

.mermaid-diagram .edgePath .path {
    stroke: #1f4e79 !important;
    stroke-width: 2px !important;
}

.mermaid-diagram .arrowheadPath {
    fill: #1f4e79 !important;
    stroke: #1f4e79 !important;
}

/* 表单验证样式 */
.error-field {
    border: 2px solid #ff8c00 !important;
    background: rgba(255, 140, 0, 0.05) !important;
}

/* 确定按钮禁用状态 */
.btn-primary:disabled {
    background: linear-gradient(135deg, #6c757d 0%, #5a6268 100%) !important;
    opacity: 0.6 !important;
    cursor: not-allowed !important;
    transform: none !important;
    box-shadow: none !important;
}

.btn-primary:disabled:hover {
    background: linear-gradient(135deg, #6c757d 0%, #5a6268 100%) !important;
    transform: none !important;
    box-shadow: none !important;
}

.form-group {
    position: relative;
}

.form-group {
    margin-bottom: 30px;
}

/* 标题栏新增按钮样式 */
.section-header {
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(52, 73, 94, 0.2);
}

#add-customer-header-button {
    background: linear-gradient(135deg, #EBD698 0%, #C29049 100%) !important;
    color: #1a1a1a !important;
    border: none !important;
    border-radius: 8px !important;
    font-weight: 600 !important;
    transition: all 0.3s ease !important;
    box-shadow: 0 2px 8px rgba(235, 214, 152, 0.3) !important;
}

#add-customer-header-button:hover {
    background: linear-gradient(135deg, #C29049 0%, #EBD698 100%) !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 4px 12px rgba(235, 214, 152, 0.4) !important;
}

#add-customer-header-button:active {
    transform: translateY(0) !important;
}

#add-customer-header-button {
    background: var(--baize-blue-button-bg) !important;
    color: var(--baize-blue-button-text) !important;
    border: 1px solid var(--baize-blue-button-border) !important;
    box-shadow: var(--baize-blue-button-shadow) !important;
}

#add-customer-header-button:hover {
    background: var(--baize-blue-button-hover-bg) !important;
    color: var(--baize-blue-button-text) !important;
    box-shadow: var(--baize-blue-button-hover-shadow) !important;
}

/* 响应式设计 - 在小屏幕上隐藏标题栏按钮 */
@media (max-width: 768px) {
    .section-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
}

    #add-customer-header-button {
    align-self: flex-end;
    font-size: 0.8rem !important;
    padding: 6px 12px !important;
}
}

/* Analysis Status Indicators */
#analysis-status-container {
    color: #EBD698;
    background: rgba(31, 78, 121, 0.1);
    border: 1px solid rgba(31, 78, 121, 0.3);
}

#status-health-form,
#status-medical-reports {
    color: #2c3e50;
}

/* ========================================
   Report Analysis Modal - Hexagonal Layout
   ======================================== */

/* Quick Action Buttons */
.quick-action-btn {
    flex: 1;
    padding: 9px 12px;
    font-size: 13px;
    font-weight: 500;
    background: #ffffff;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #333;
}

.quick-action-btn:hover {
    background: linear-gradient(135deg, #cdefff 0%, #a8e8ff 100%);
    color: #0f3b57;
    border-color: #7fcfe6;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(127, 207, 230, 0.35);
}

.quick-action-btn i {
    margin-right: 5px;
}

/* Hexagon Container */
.hexagon-container {
    position: relative;
    width: 100%;
    height: 380px;
    margin: 30px auto;
    --hex-radius: 140px;
}

/* Center Hexagon */
.hexagon-center {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10;
}

.hexagon-center input[type="checkbox"] {
    display: none;
}

.hexagon-label {
    cursor: pointer;
    display: block;
}

.hexagon-shape {
    width: 100px;
    height: 100px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8f9fa;
    border: 3px solid #e0e0e0;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.hexagon-shape::before,
.hexagon-shape::after {
    display: none;
}

.hexagon-center input[type="checkbox"]:checked + .hexagon-label .hexagon-shape::before {
    display: none;
}

.hexagon-center input[type="checkbox"]:checked + .hexagon-label .hexagon-shape::after {
    display: none;
}

.hexagon-center input[type="checkbox"]:checked + .hexagon-label .hexagon-shape {
    background: #f1e8ff;
    border-color: #a57dff;
    box-shadow: 0 4px 12px rgba(165, 125, 255, 0.28);
}

.hexagon-label:hover .hexagon-shape {
    border-color: #7fcfe6;
    box-shadow: 0 4px 12px rgba(127, 207, 230, 0.35);
}

.hexagon-content {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #0f3b57;
    text-align: center;
    padding: 8px;
}

.hexagon-icon {
    font-size: 26px;
    margin-bottom: 8px;
    display: block;
    color: #0f3b57;
}

.hexagon-center input[type="checkbox"] + .hexagon-label .hexagon-icon {
    display: none;
}

.hexagon-content span {
    font-size: 13px;
    font-weight: 600;
    line-height: 1.3;
}

.health-label {
    display: inline-block;
}

.health-label-line {
    display: inline;
}

/* Report Circles */
.report-circle {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 90px;
    height: 90px;
    transform: translate(-50%, -50%);
}

.report-circle input[type="checkbox"] {
    display: none;
}

.report-circle label {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    background: #f8f9fa;
    border: 3px solid #e0e0e0;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.report-circle label span {
    font-size: 13px;
    font-weight: 500;
    color: #333;
}

.report-circle input[type="checkbox"]:checked + label {
    background: #f1e8ff;
    border-color: #a57dff;
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(165, 125, 255, 0.25);
}

.report-circle input[type="checkbox"]:checked + label span {
    color: #0f3b57;
}

.report-circle label:hover {
    border-color: #7fcfe6;
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 6px 16px rgba(127, 207, 230, 0.35);
}

/* Explorer Mode banner */
#explorer-mode-message {
    display: none;
    margin-top: 16px;
    padding: 12px 14px;
    background: linear-gradient(145deg, rgba(18, 58, 90, 0.92) 0%, rgba(31, 78, 121, 0.94) 48%, rgba(45, 106, 149, 0.92) 100%);
    border-radius: 10px;
    color: #ffffff;
    align-items: center;
    gap: 12px;
    text-align: left;
    position: relative;
    border: 3px solid rgba(102, 204, 255, 0.5);
    animation: explorerShine 2.5s ease-in-out infinite;
}

@keyframes explorerShine {
    0%, 100% {
        box-shadow: 0 4px 12px rgba(31, 78, 121, 0.25),
                    0 0 40px rgba(102, 204, 255, 0.4),
                    0 0 60px rgba(102, 204, 255, 0.3),
                    0 0 80px rgba(102, 204, 255, 0.2);
        border-color: rgba(102, 204, 255, 0.5);
    }
    50% {
        box-shadow: 0 4px 12px rgba(31, 78, 121, 0.25),
                    0 0 50px rgba(102, 204, 255, 0.7),
                    0 0 80px rgba(102, 204, 255, 0.5),
                    0 0 120px rgba(102, 204, 255, 0.4),
                    0 0 160px rgba(135, 206, 250, 0.3);
        border-color: rgba(135, 206, 250, 1);
    }
}

#explorer-mode-message .explorer-avatar {
    width: 54px;
    height: 54px;
    border-radius: 50%;
    border: 2px solid #ffffff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    flex-shrink: 0;
}

#explorer-mode-message .explorer-text {
    margin: 0;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.4;
}

@media (max-width: 900px) {
    #explorer-mode-message {
    padding: 10px 12px;
    gap: 10px;
}

    #explorer-mode-message .explorer-avatar {
    width: 48px;
    height: 48px;
}

    #explorer-mode-message .explorer-text {
    font-size: 13px;
}
}

@media (max-width: 600px) {
    #explorer-mode-message {
    flex-direction: row;
    align-items: flex-start;
    text-align: left;
}

    #explorer-mode-message .explorer-text {
    font-size: 12.5px;
}
}

/* Position Report Circles in a Circle Around Hexagon */
/* Report 1 - Top */
.report-1 {
    transform: translate(-50%, -50%) rotate(-90deg) translate(var(--hex-radius)) rotate(90deg);
}

/* Report 2 - Top Right */
.report-2 {
    transform: translate(-50%, -50%) rotate(-30deg) translate(var(--hex-radius)) rotate(30deg);
}

/* Report 3 - Bottom Right */
.report-3 {
    transform: translate(-50%, -50%) rotate(30deg) translate(var(--hex-radius)) rotate(-30deg);
}

/* Report 4 - Bottom */
.report-4 {
    transform: translate(-50%, -50%) rotate(90deg) translate(var(--hex-radius)) rotate(-90deg);
}

/* Report 5 - Bottom Left */
.report-5 {
    transform: translate(-50%, -50%) rotate(150deg) translate(var(--hex-radius)) rotate(-150deg);
}

/* Report 6 - Top Left */
.report-6 {
    transform: translate(-50%, -50%) rotate(210deg) translate(var(--hex-radius)) rotate(-210deg);
}

/* Responsive adjustments for smaller screens */
@media (max-width: 600px) {
    .health-label-line {
    display: block;
    line-height: 1.2;
}

    .hexagon-container {
    height: 280px;
    --hex-radius: 90px;
    margin: 20px auto;
}

    .hexagon-shape {
    width: 64px;
    height: 64px;
}

    .quick-action-btn {
    padding: 7px 9px;
    font-size: 11px;
}

    .hexagon-icon {
    font-size: 18px;
}

    .hexagon-content span {
    font-size: 11px;
}

    .report-circle {
    width: 64px;
    height: 64px;
}

    .report-circle label span {
    font-size: 11px;
}

    #selected-count {
    font-size: 11px !important;
    margin-top: 12px !important;
    margin-bottom: 10px !important;
}

    #report-analysis-modal .modal-header h3 {
    font-size: 15px;
}

    #report-analysis-modal .modal-body p {
    font-size: 12px;
}

    #report-analysis-modal .modal-footer .btn {
    font-size: 12px;
    padding: 7px 11px;
}
}

/* Report analysis modal - modern glass style aligned with dashboard */
#report-analysis-modal.report-analysis-modal {
    display: none;
    align-items: center;
    justify-content: center;
    padding: clamp(12px, 3vw, 24px);
    background:
        linear-gradient(135deg, rgba(8, 29, 46, 0.24), rgba(31, 78, 121, 0.18)),
        rgba(12, 32, 48, 0.2);
    -webkit-backdrop-filter: blur(20px) saturate(155%);
    backdrop-filter: blur(20px) saturate(155%);
}

#report-analysis-modal .report-analysis-modal__content {
    width: min(94vw, 620px);
    max-height: min(90vh, 840px);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    color: #12263a;
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.68);
    background:
        linear-gradient(145deg, rgba(255, 255, 255, 0.86), rgba(238, 248, 255, 0.62)),
        rgba(255, 255, 255, 0.68);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.74),
        0 24px 54px rgba(31, 78, 121, 0.22);
    -webkit-backdrop-filter: blur(24px) saturate(165%);
    backdrop-filter: blur(24px) saturate(165%);
}

#report-analysis-modal .report-analysis-modal__header {
    position: relative;
    flex-shrink: 0;
    justify-content: center;
    padding: 18px 58px 18px 22px;
    border-bottom: 1px solid rgba(31, 78, 121, 0.12);
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.5), rgba(221, 240, 250, 0.26));
}

#report-analysis-modal .report-analysis-modal__title {
    width: 100%;
    margin: 0;
    color: #12263a;
    font-size: 1.18rem;
    font-weight: 850;
    letter-spacing: 0;
    line-height: 1.3;
    text-align: center;
}

#report-analysis-modal .report-analysis-modal__title i {
    color: #1f6fa0;
    margin-right: 8px;
}

#report-analysis-modal .report-analysis-modal__close {
    position: absolute;
    right: 16px;
    top: 50%;
    width: 40px;
    height: 40px;
    border-radius: 14px;
    color: #12263a;
    border: 1px solid rgba(31, 78, 121, 0.14);
    background: rgba(255, 255, 255, 0.58);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.72),
        0 8px 18px rgba(31, 78, 121, 0.12);
    -webkit-backdrop-filter: blur(12px) saturate(145%);
    backdrop-filter: blur(12px) saturate(145%);
    transform: translateY(-50%);
}

#report-analysis-modal .report-analysis-modal__close:hover {
    color: #0f5f8a;
    background: rgba(255, 255, 255, 0.78);
    transform: translateY(-50%) scale(1.04);
}

#report-analysis-modal .report-analysis-modal__body {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    padding: 22px 26px 18px;
}

#report-analysis-modal .report-analysis-modal__body::-webkit-scrollbar {
    width: 8px;
}

#report-analysis-modal .report-analysis-modal__body::-webkit-scrollbar-thumb {
    border-radius: 999px;
    background: rgba(31, 78, 121, 0.24);
}

#report-analysis-modal .report-analysis-modal__quick-actions {
    display: flex;
    gap: 10px;
    margin-bottom: 18px;
}

#report-analysis-modal .quick-action-btn {
    flex: 1;
    min-height: 42px;
    padding: 9px 12px;
    color: #123c5b;
    border: 1px solid rgba(31, 78, 121, 0.14);
    border-radius: 15px;
    background: rgba(255, 255, 255, 0.58);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.72),
        0 9px 20px rgba(31, 78, 121, 0.1);
    -webkit-backdrop-filter: blur(12px) saturate(145%);
    backdrop-filter: blur(12px) saturate(145%);
    font-size: 0.84rem;
    font-weight: 800;
}

#report-analysis-modal .quick-action-btn:hover {
    color: #0f5f8a;
    border-color: rgba(31, 111, 160, 0.28);
    background: rgba(255, 255, 255, 0.78);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.78),
        0 12px 24px rgba(31, 78, 121, 0.14);
    transform: translateY(-1px);
}

#report-analysis-modal .hexagon-container {
    height: 372px;
    margin: 18px auto 10px;
    --hex-radius: 138px;
}

#report-analysis-modal .hexagon-shape,
#report-analysis-modal .report-circle label {
    border: 1px solid rgba(31, 78, 121, 0.16);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.66);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.72),
        0 10px 22px rgba(31, 78, 121, 0.1);
    -webkit-backdrop-filter: blur(12px) saturate(145%);
    backdrop-filter: blur(12px) saturate(145%);
}

#report-analysis-modal .hexagon-shape {
    width: 104px;
    height: 104px;
}

#report-analysis-modal .report-circle {
    width: 92px;
    height: 92px;
}

#report-analysis-modal .hexagon-content,
#report-analysis-modal .report-circle label span {
    color: #12263a;
}

#report-analysis-modal .hexagon-content span,
#report-analysis-modal .report-circle label span {
    font-weight: 800;
}

#report-analysis-modal .hexagon-label:hover .hexagon-shape,
#report-analysis-modal .report-circle label:hover {
    border-color: rgba(31, 111, 160, 0.34);
    background: rgba(255, 255, 255, 0.82);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.78),
        0 14px 28px rgba(31, 78, 121, 0.16);
}

#report-analysis-modal .hexagon-center input[type="checkbox"]:checked + .hexagon-label .hexagon-shape,
#report-analysis-modal .report-circle input[type="checkbox"]:checked + label {
    color: #1f4e79;
    border: 2px solid rgba(31, 78, 121, 0.72);
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.88), rgba(219, 239, 251, 0.68));
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.82),
        0 14px 28px rgba(31, 78, 121, 0.16),
        0 0 0 3px rgba(31, 78, 121, 0.08);
}

#report-analysis-modal .hexagon-center input[type="checkbox"]:checked + .hexagon-label .hexagon-content,
#report-analysis-modal .hexagon-center input[type="checkbox"]:checked + .hexagon-label .hexagon-content span,
#report-analysis-modal .report-circle input[type="checkbox"]:checked + label span {
    color: #1f4e79;
}

#report-analysis-modal .report-circle input[type="checkbox"]:checked + label {
    transform: scale(1.04);
}

#report-analysis-modal .report-analysis-modal__selected-count {
    margin: 20px 0 14px;
    color: rgba(18, 38, 58, 0.66);
    font-size: 0.84rem;
    line-height: 1.45;
    text-align: center;
}

#report-analysis-modal .report-analysis-modal__selected-count strong {
    color: #123c5b;
}

#report-analysis-modal #explorer-mode-message {
    margin-top: 14px;
    padding: 13px 15px;
    color: #ffffff;
    border: 1px solid rgba(127, 207, 230, 0.42);
    border-radius: 16px;
    background: linear-gradient(145deg, rgba(18, 58, 90, 0.88), rgba(31, 78, 121, 0.82));
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.16),
        0 14px 30px rgba(31, 78, 121, 0.2);
    -webkit-backdrop-filter: blur(14px) saturate(150%);
    backdrop-filter: blur(14px) saturate(150%);
    animation: none;
}

#report-analysis-modal .report-analysis-modal__footer {
    flex-shrink: 0;
    justify-content: center;
    gap: 12px;
    padding: 16px 22px 18px;
    border-top: 1px solid rgba(31, 78, 121, 0.1);
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.34), rgba(238, 248, 255, 0.2));
}

#report-analysis-modal .report-analysis-modal__cancel,
#report-analysis-modal .report-analysis-modal__submit {
    min-height: 42px;
    padding: 9px 16px;
    border-radius: 15px;
    font-weight: 850;
    text-shadow: none;
}

#report-analysis-modal .report-analysis-modal__cancel {
    color: #123c5b;
    border: 1px solid rgba(31, 78, 121, 0.14);
    background: rgba(255, 255, 255, 0.58);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.72),
        0 9px 20px rgba(31, 78, 121, 0.1);
}

#report-analysis-modal .report-analysis-modal__submit {
    color: #ffffff;
    border: 1px solid rgba(31, 111, 160, 0.34);
    background: var(--baize-blue-button-bg);
    box-shadow: var(--baize-blue-button-shadow);
}

#report-analysis-modal .report-analysis-modal__submit:hover:not(:disabled) {
    background: var(--baize-blue-button-hover-bg);
    box-shadow: var(--baize-blue-button-hover-shadow);
    transform: translateY(-1px);
}

#report-analysis-modal .report-analysis-modal__submit:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

@media (max-width: 600px) {
    #report-analysis-modal.report-analysis-modal {
    padding: 10px;
}

    #report-analysis-modal .report-analysis-modal__content {
    width: calc(100vw - 20px);
    max-height: calc(100dvh - 24px);
    border-radius: 22px;
}

    #report-analysis-modal .report-analysis-modal__header {
    padding: 15px 52px 15px 16px;
}

    #report-analysis-modal .report-analysis-modal__title {
    font-size: 1rem;
}

    #report-analysis-modal .report-analysis-modal__body {
    padding: 16px;
}

    #report-analysis-modal .report-analysis-modal__quick-actions {
    gap: 7px;
}

    #report-analysis-modal .quick-action-btn {
    min-height: 38px;
    padding: 7px 8px;
    font-size: 0.72rem;
}

    #report-analysis-modal .hexagon-container {
    height: 280px;
    --hex-radius: 90px;
    margin: 16px auto 8px;
}

    #report-analysis-modal .hexagon-shape,
    #report-analysis-modal .report-circle {
    width: 66px;
    height: 66px;
}

    #report-analysis-modal .hexagon-content span,
    #report-analysis-modal .report-circle label span {
    font-size: 0.72rem;
}

    #report-analysis-modal .report-analysis-modal__footer {
    padding: 14px 16px 16px;
    gap: 8px;
}
}

/* Modern glass customer selector dropdown */
body.dash-page .dash-customer-select-card {
    position: relative;
    z-index: 20;
    overflow: visible;
}

body.dash-page .dash-customer-select-card.dash-customer-select-card--dropdown-open {
    z-index: 12000;
}

body.dash-page .dash-custom-select-host {
    position: relative;
    min-width: 0;
    z-index: 12010;
}

body.dash-page .dash-custom-select {
    position: relative;
    width: 100%;
}

body.dash-page .dash-custom-select.is-open {
    z-index: 12015;
}

body.dash-page .dash-custom-select__native {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

body.dash-page .dash-custom-select__trigger {
    width: 100%;
    min-height: 48px;
    padding: 0 42px 0 16px;
    border: 1px solid rgba(42, 91, 126, 0.2);
    border-radius: 16px;
    color: #12263a;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.78), rgba(237, 247, 255, 0.52));
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.74),
        0 10px 24px rgba(15, 42, 64, 0.08);
    -webkit-backdrop-filter: blur(16px) saturate(155%);
    backdrop-filter: blur(16px) saturate(155%);
    display: flex;
    align-items: center;
    justify-content: flex-start;
    cursor: pointer;
    font-family: var(--app-font-sans);
    font-size: clamp(0.8rem, 3.3vw, 0.9rem);
    font-weight: 650;
    line-height: 1.2;
    text-align: left;
    transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

body.dash-page .dash-custom-select__trigger:hover,
body.dash-page .dash-custom-select.is-open .dash-custom-select__trigger,
body.dash-page .dash-custom-select__trigger:focus-visible {
    border-color: rgba(22, 113, 166, 0.44);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.82),
        0 0 0 3px rgba(21, 106, 156, 0.12),
        0 12px 26px rgba(15, 42, 64, 0.1);
    outline: none;
}

body.dash-page .dash-custom-select__label {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

body.dash-page .dash-custom-select__icon {
    position: absolute;
    right: 16px;
    top: 50%;
    color: rgba(18, 38, 58, 0.72);
    font-size: 0.78rem;
    transform: translateY(-50%);
    transition: transform 160ms ease;
}

body.dash-page .dash-custom-select.is-open .dash-custom-select__icon {
    transform: translateY(-50%) rotate(180deg);
}

body.dash-page .dash-custom-select__menu {
    position: absolute;
    left: 0;
    right: 0;
    top: calc(100% + 8px);
    z-index: 12020;
    max-height: var(--dash-custom-select-menu-max-height, min(420px, 58vh));
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 8px;
    border: 1px solid rgba(198, 220, 233, 0.95);
    border-radius: 18px;
    background: linear-gradient(145deg, #ffffff 0%, #eef8fd 100%);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.78),
        0 22px 46px rgba(15, 42, 64, 0.22);
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
}

body.dash-page .dash-custom-select__menu::-webkit-scrollbar {
    width: 7px;
}

body.dash-page .dash-custom-select__menu::-webkit-scrollbar-thumb {
    border-radius: 999px;
    background: rgba(31, 111, 160, 0.3);
}

body.dash-page .dash-custom-select__option {
    width: 100%;
    min-height: 42px;
    padding: 9px 11px;
    border: 1px solid transparent;
    border-radius: 13px;
    background: transparent;
    color: #12263a;
    cursor: pointer;
    display: flex;
    align-items: center;
    font-family: var(--app-font-sans);
    font-size: clamp(0.78rem, 3.1vw, 0.9rem);
    font-weight: 650;
    line-height: 1.25;
    text-align: left;
    transition: background 140ms ease, border-color 140ms ease, transform 140ms ease;
}

body.dash-page .dash-custom-select__option:hover,
body.dash-page .dash-custom-select__option:focus-visible {
    outline: none;
    border-color: rgba(31, 111, 160, 0.18);
    background: rgba(255, 255, 255, 0.58);
}

body.dash-page .dash-custom-select__option.is-selected {
    border-color: rgba(31, 111, 160, 0.34);
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.76), rgba(201, 231, 248, 0.78));
    color: #0f4264;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

body.dash-page .dash-custom-select__option.is-disabled {
    color: rgba(18, 38, 58, 0.42);
    cursor: default;
}

body.dash-page .dash-custom-select__option.is-disabled.is-selected {
    border-color: transparent;
    background: transparent;
    box-shadow: none;
}

@media (min-width: 769px) {
    body.dash-page .dash-customer-select-card {
        width: min(100%, 720px);
        margin: 0 auto 14px;
        padding: 12px;
        border: 1px solid rgba(255, 255, 255, 0.62);
        border-radius: 18px;
        background: rgba(255, 255, 255, 0.34);
        box-shadow: 0 14px 30px rgba(15, 42, 64, 0.11);
        -webkit-backdrop-filter: blur(18px) saturate(160%);
        backdrop-filter: blur(18px) saturate(160%);
    }

    body.dash-page .dash-customer-select-row {
        display: grid;
        grid-template-columns: minmax(0, 1fr) 48px 48px;
        gap: 10px;
        align-items: center;
    }

    body.dash-page .dash-customer-select-row .form-group {
        min-width: 0;
        margin: 0;
    }

    body.dash-page .dash-customer-select-row .form-select {
        min-height: 48px;
        border: 1px solid rgba(42, 91, 126, 0.2);
        border-radius: 16px;
        color: #12263a;
        background: linear-gradient(135deg, rgba(255, 255, 255, 0.76), rgba(237, 247, 255, 0.5));
        box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72), 0 10px 24px rgba(15, 42, 64, 0.08);
        -webkit-backdrop-filter: blur(16px) saturate(155%);
        backdrop-filter: blur(16px) saturate(155%);
    }

    body.dash-page .dash-customer-select-row .form-select:focus {
        border-color: rgba(22, 113, 166, 0.44);
        box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.78), 0 0 0 3px rgba(21, 106, 156, 0.12), 0 12px 26px rgba(15, 42, 64, 0.1);
        outline: none;
    }

    body.dash-page .dash-custom-select__trigger {
        border-color: rgba(42, 91, 126, 0.2);
        color: #12263a;
        background: linear-gradient(135deg, rgba(255, 255, 255, 0.78), rgba(237, 247, 255, 0.52));
        box-shadow:
            inset 0 1px 0 rgba(255, 255, 255, 0.74),
            0 10px 24px rgba(15, 42, 64, 0.08);
    }

    body.dash-page .dash-custom-select__trigger:hover,
    body.dash-page .dash-custom-select.is-open .dash-custom-select__trigger,
    body.dash-page .dash-custom-select__trigger:focus-visible {
        border-color: rgba(22, 113, 166, 0.44);
        box-shadow:
            inset 0 1px 0 rgba(255, 255, 255, 0.82),
            0 0 0 3px rgba(21, 106, 156, 0.12),
            0 12px 26px rgba(15, 42, 64, 0.1);
    }

    body.dash-page .dash-custom-select__menu {
        border-color: rgba(198, 220, 233, 0.95);
        background: linear-gradient(145deg, #ffffff 0%, #eef8fd 100%);
        box-shadow:
            inset 0 1px 0 rgba(255, 255, 255, 0.78),
            0 22px 46px rgba(15, 42, 64, 0.22);
    }

    body.dash-page .dash-custom-select__option {
        color: #12263a;
    }

    body.dash-page .dash-custom-select__option:hover,
    body.dash-page .dash-custom-select__option:focus-visible {
        border-color: rgba(31, 111, 160, 0.18);
        background: rgba(255, 255, 255, 0.58);
    }

    body.dash-page .dash-custom-select__option.is-selected {
        border-color: rgba(31, 111, 160, 0.34);
        background: linear-gradient(135deg, rgba(255, 255, 255, 0.76), rgba(201, 231, 248, 0.78));
        color: #0f4264;
    }

    body.dash-page .dash-mobile-customer-btn {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 48px;
        height: 48px;
        border: 1px solid rgba(255, 255, 255, 0.64);
        border-radius: 18px;
        background: rgba(255, 255, 255, 0.54);
        box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72), 0 12px 24px rgba(15, 42, 64, 0.1);
        -webkit-backdrop-filter: blur(16px) saturate(155%);
        backdrop-filter: blur(16px) saturate(155%);
        font-size: 20px;
        cursor: pointer;
        transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
    }

    body.dash-page .dash-mobile-customer-btn:active {
        transform: scale(0.96);
    }

    body.dash-page .dash-mobile-customer-btn > i {
        font-size: 18px;
        line-height: 1;
    }

    body.dash-page .dash-mobile-customer-btn--add {
        color: #0a5e91;
        border-color: rgba(31, 111, 160, 0.25);
        background: linear-gradient(135deg, rgba(255, 255, 255, 0.82), rgba(220, 239, 251, 0.56));
    }

    body.dash-page .dash-mobile-customer-btn--delete {
        color: #d8172a;
        border-color: rgba(239, 35, 47, 0.3);
        background: linear-gradient(135deg, rgba(255, 255, 255, 0.84), rgba(255, 230, 235, 0.58));
    }

    body.dash-page #health_forms_data > .tab-container:not(.action-buttons),
    body.dash-page #health_forms_data > .action-buttons {
        border-color: rgba(255, 255, 255, 0.62);
        background: rgba(255, 255, 255, 0.34);
        box-shadow: 0 14px 30px rgba(15, 42, 64, 0.1);
    }

    body.dash-page #health_forms_data > .tab-container:not(.action-buttons) {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 0;
        overflow: hidden;
        padding: 0;
        border-radius: 24px;
    }

    body.dash-page #health_forms_data > .tab-container:not(.action-buttons) .tab-button {
        width: 100%;
        min-width: 0;
        max-width: none;
        min-inline-size: 0;
        min-height: 58px;
        margin: 0;
        padding: 0 12px;
        color: rgba(31, 48, 66, 0.86);
        border: 1px solid rgba(31, 78, 121, 0.08);
        border-radius: 0;
        background: rgba(31, 78, 121, 0.08);
        box-shadow: none;
    }

    body.dash-page #health_forms_data > .tab-container:not(.action-buttons) .tab-button:nth-child(1),
    body.dash-page #health_forms_data > .tab-container:not(.action-buttons) .tab-button:nth-child(2),
    body.dash-page #health_forms_data > .tab-container:not(.action-buttons) .tab-button:nth-child(4),
    body.dash-page #health_forms_data > .tab-container:not(.action-buttons) .tab-button:nth-child(5) {
        border-right-width: 0;
    }

    body.dash-page #health_forms_data > .tab-container:not(.action-buttons) .tab-button:nth-child(n+4) {
        border-top-width: 0;
    }

    body.dash-page #health_forms_data > .tab-container:not(.action-buttons) .tab-button:nth-child(1) {
        border-top-left-radius: 22px;
    }

    body.dash-page #health_forms_data > .tab-container:not(.action-buttons) .tab-button:nth-child(3) {
        border-top-right-radius: 22px;
    }

    body.dash-page #health_forms_data > .tab-container:not(.action-buttons) .tab-button:nth-child(4) {
        border-bottom-left-radius: 22px;
    }

    body.dash-page #health_forms_data > .tab-container:not(.action-buttons) .tab-button:nth-child(6) {
        border-bottom-right-radius: 22px;
    }

    body.dash-page #health_forms_data > .tab-container:not(.action-buttons) .tab-button.active,
    body.dash-page #health_forms_data > .tab-container:not(.action-buttons) .tab-button:active {
        color: #0a5e91 !important;
        border-color: rgba(31, 111, 160, 0.25);
        background: linear-gradient(135deg, rgba(255, 255, 255, 0.82), rgba(220, 239, 251, 0.56)) !important;
        box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72), 0 12px 24px rgba(15, 42, 64, 0.1);
        -webkit-backdrop-filter: blur(16px) saturate(155%);
        backdrop-filter: blur(16px) saturate(155%);
        text-shadow: none;
    }

    body.dash-page #health_forms_data > .tab-container:not(.action-buttons) .tab-button.active i,
    body.dash-page #health_forms_data > .tab-container:not(.action-buttons) .tab-button:active i {
        color: #0a5e91 !important;
    }

    body.dash-page.desktop-archive-focus #health_forms_data > .tab-container:not(.action-buttons) {
        display: grid !important;
        grid-template-columns: repeat(6, minmax(0, 1fr)) !important;
        gap: 0;
        overflow: hidden;
        padding: 0;
        border-radius: 24px;
    }

    body.dash-page.desktop-archive-focus #health_forms_data > .tab-container:not(.action-buttons) .tab-button {
        flex: 1 1 0 !important;
        width: 100%;
        min-width: 0 !important;
        max-width: none !important;
        min-inline-size: 0;
        border-top-width: 1px !important;
        border-right-width: 0 !important;
        border-bottom-width: 1px !important;
        border-left-width: 1px !important;
        border-radius: 0 !important;
        white-space: nowrap;
    }

    body.dash-page.desktop-archive-focus #health_forms_data > .tab-container:not(.action-buttons) .tab-button:first-child {
        border-top-left-radius: 22px !important;
        border-bottom-left-radius: 22px !important;
    }

    body.dash-page.desktop-archive-focus #health_forms_data > .tab-container:not(.action-buttons) .tab-button:last-child {
        border-right-width: 1px !important;
        border-top-right-radius: 22px !important;
        border-bottom-right-radius: 22px !important;
    }

    body.dash-page #health_forms_data > .tab-content.active {
        border: 1px solid rgba(226, 232, 240, 0.95);
        background: rgba(255, 255, 255, 0.96);
        box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
    }

    body.dash-page #health_forms_data > #tab-analysis.tab-content.active {
        border: 0;
        background: transparent;
        box-shadow: none;
    }

    body.dash-page #health_forms_data > .archive-textarea-tab.active {
        border-radius: 18px;
    }

    body.dash-page #health_forms_data > .archive-textarea-tab.active > .form-textarea {
        border-radius: inherit;
    }

    body.dash-page #health_forms_data .form-textarea {
        color: #111;
        border-color: transparent;
        background: transparent;
        box-shadow: none;
    }

    body.dash-page #health_forms_data .form-textarea:focus {
        border-color: transparent;
        box-shadow: none;
    }

    body.dash-page #health_forms_data > .action-buttons #analyse-form-button,
    body.dash-page #health_forms_data > .action-buttons #save-button {
        flex: 1 1 calc(50% - 5px) !important;
        max-width: calc(50% - 5px);
    }

    body.dash-page #health_forms_data > .action-buttons #analyse-form-button {
        color: #fff !important;
        border-color: rgba(31, 111, 160, 0.36);
        background: linear-gradient(135deg, rgba(31, 78, 121, 0.82), rgba(74, 141, 184, 0.64)) !important;
        box-shadow: 0 8px 18px rgba(15, 42, 64, 0.07);
        text-shadow: none;
        -webkit-backdrop-filter: blur(14px) saturate(150%);
        backdrop-filter: blur(14px) saturate(150%);
    }

    body.dash-page #health_forms_data > .action-buttons #analyse-form-button i {
        color: #fff !important;
    }

    body.dash-page #save-button {
        color: #12263a;
        border-color: rgba(42, 91, 126, 0.18);
        background: linear-gradient(135deg, rgba(255, 255, 255, 0.82), rgba(237, 247, 255, 0.54));
        box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72), 0 8px 18px rgba(15, 42, 64, 0.07);
    }
}

@media (max-width: 768px) {
    body.dash-page[data-dash-mobile-page="archive"].dash-customer-dropdown-open .main-content,
    body.dash-page[data-dash-mobile-page="archive"].dash-customer-dropdown-open .desktop-layout-container,
    body.dash-page[data-dash-mobile-page="archive"].dash-customer-dropdown-open #health_forms_data {
        overflow: visible;
    }
}

body.dash-page #health_forms_data > #tab-health-form.tab-content.active,
body.dash-page #health_forms_data > #tab-customer-info.tab-content.active,
body.dash-page #health_forms_data > #tab-followup.tab-content.active,
body.dash-page #health_forms_data > #tab-human-expert-data.tab-content.active,
body.dash-page #health_forms_data > #tab-recommendations.tab-content.active {
    border-radius: 18px;
    overflow: hidden;
    background-clip: padding-box;
}

body.dash-page #health_forms_data > #tab-health-form.tab-content.active > .form-textarea,
body.dash-page #health_forms_data > #tab-customer-info.tab-content.active > .form-textarea,
body.dash-page #health_forms_data > #tab-followup.tab-content.active > .form-textarea,
body.dash-page #health_forms_data > #tab-human-expert-data.tab-content.active > .form-textarea,
body.dash-page #health_forms_data > #tab-recommendations.tab-content.active > .form-textarea {
    border-radius: inherit;
    background-clip: padding-box;
}

@media (max-width: 768px) {
    body.dash-page #health_forms_data > #tab-health-form.tab-content.active,
    body.dash-page #health_forms_data > #tab-customer-info.tab-content.active,
    body.dash-page #health_forms_data > #tab-followup.tab-content.active,
    body.dash-page #health_forms_data > #tab-human-expert-data.tab-content.active,
    body.dash-page #health_forms_data > #tab-recommendations.tab-content.active {
        border-radius: 14px;
    }
}
