@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=Plus+Jakarta+Sans:wght@500;600;700;800&display=swap');

/* ==========================================================================
   DESIGN SYSTEM & THEME VARIABLES
   ========================================================================== */
:root {
    /* Fonts */
    --font-sans: 'Inter', 'Plus Jakarta Sans', 'Geist', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-heading: 'Plus Jakarta Sans', 'Inter', 'Geist', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

    /* Light Theme Palette - clinicnote.com inspired Teal & Deep Slate */
    --primary-teal: #14b8a6;
    --primary-teal-hover: #0d9488;
    --dark-slate: #11333a;
    --bg-light-gray: #f8fafc;
    --text-dark: #1e293b;
    --text-gray: #475569;

    --bg-primary: #ffffff;
    --bg-secondary: #ffffff;
    --bg-tertiary: var(--bg-light-gray);
    --bg-muted: #f1f5f9;
    --border-color: #e2e8f0;
    --text-primary: var(--text-dark);
    --text-secondary: var(--text-gray);
    --text-muted: #64748b;

    --primary-color: var(--primary-teal);
    --primary-hover: var(--primary-teal-hover);
    --primary-light: rgba(20, 184, 166, 0.12);

    --accent-color: var(--primary-teal);
    --accent-hover: var(--primary-teal-hover);
    --accent-light: rgba(20, 184, 166, 0.12);

    --danger-color: #dc2626;
    --danger-light: #fef2f2;

    --success-color: #0f9f8f;
    --success-light: #ecfdf5;

    --warning-color: #d97706;
    --warning-light: #fffbeb;

    /* Shadows & Surfaces */
    --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 8px 24px rgba(15, 23, 42, 0.06);
    --shadow-lg: 0 18px 38px rgba(15, 23, 42, 0.08);
    --glass-bg: rgba(255, 255, 255, 0.88);
    --glass-border: rgba(226, 232, 240, 0.72);
    --glass-backdrop: blur(14px);

    --radius-sm: 18px;
    --radius-md: 24px;
    --radius-lg: 28px;
    --radius-pill: 999px;

    --transition-fast: 0.15s ease;
    --transition-normal: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

body.dark {
    /* Dark Theme Palette - teal accents on deep clinical slate */
    --primary-teal: #2dd4bf;
    --primary-teal-hover: #14b8a6;
    --dark-slate: #071a1d;
    --bg-light-gray: #102a30;
    --text-dark: #f8fafc;
    --text-gray: #cbd5e1;

    --bg-primary: #071316;
    --bg-secondary: #0b2024;
    --bg-tertiary: #102a30;
    --bg-muted: #12333a;
    --border-color: rgba(148, 163, 184, 0.18);
    --text-primary: var(--text-dark);
    --text-secondary: var(--text-gray);
    --text-muted: #94a3b8;

    --primary-color: var(--primary-teal);
    --primary-hover: var(--primary-teal-hover);
    --primary-light: rgba(45, 212, 191, 0.14);

    --accent-color: var(--primary-teal);
    --accent-hover: #5eead4;
    --accent-light: rgba(45, 212, 191, 0.12);

    --danger-color: #f87171;
    --danger-light: rgba(248, 113, 113, 0.12);

    --success-color: #12b2a1;
    --success-light: rgba(15, 159, 143, 0.12);

    --warning-color: #fbbf24;
    --warning-light: rgba(251, 191, 36, 0.12);

    --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.3);
    --shadow-md: 0 12px 30px rgba(0, 0, 0, 0.34);
    --shadow-lg: 0 20px 48px rgba(0, 0, 0, 0.42);
    --glass-bg: rgba(11, 32, 36, 0.86);
    --glass-border: rgba(148, 163, 184, 0.18);
    --glass-backdrop: blur(14px);
}

/* ==========================================================================
   GLOBAL RESET & TYPOGRAPHY
   ========================================================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-sans);
    background-color: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    transition: background-color var(--transition-normal), color var(--transition-normal);
    line-height: 1.5;
    padding-top: 96px;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    font-weight: 800;
    color: var(--text-primary);
    letter-spacing: -0.02em;
    line-height: 1.2;
}

button {
    font-family: var(--font-sans);
    cursor: pointer;
    border: none;
    outline: none;
    transition: all var(--transition-fast);
}

input,
textarea {
    font-family: var(--font-sans);
    outline: none;
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

/* Scrollbar styling */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

/* ==========================================================================
   COMMON UTILITIES
   ========================================================================== */
.hidden {
    display: none !important;
}

.text-danger-soft {
    color: var(--danger-color);
    font-size: 0.85rem;
    line-height: 1.4;
}

.field-error {
    display: block;
    min-height: 1.1em;
    margin-top: 0.35rem;
    color: var(--danger-color);
    font-size: 0.78rem;
    font-weight: 600;
    line-height: 1.35;
}

.field-error:empty {
    display: none;
}

input[aria-invalid="true"],
select[aria-invalid="true"],
textarea[aria-invalid="true"] {
    border-color: var(--danger-color) !important;
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.12) !important;
}

/* Spinner & Loading States (Senior Frontend Rule 4) */
.spinner-circle-small {
    width: 24px;
    height: 24px;
    border: 3px solid var(--border-color);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    display: inline-block;
}

.spinner-circle {
    width: 40px;
    height: 40px;
    border: 4px solid var(--border-color);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    display: inline-block;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.table-loading {
    vertical-align: middle;
    text-align: center;
    color: var(--text-secondary);
    font-weight: 500;
}

.table-error {
    vertical-align: middle;
    text-align: center;
    color: var(--danger-color);
    font-weight: 500;
}

/* ==========================================================================
   LAYOUT CONTAINERS
   ========================================================================== */
.app-container {
    display: flex;
    flex-direction: column;
    flex: 1;
    width: 100%;
}

/* App Header */
.app-header {
    min-height: 68px;
    width: 90%;
    max-width: 1200px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 50px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 0.55rem 0.75rem 0.55rem 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    box-shadow: var(--shadow-md);
}

.app-header.public-theme {
    width: 90%;
    max-width: 1200px;
    border-radius: 50px;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 18px 44px rgba(7, 19, 22, 0.22);
    color: #ffffff;
}

.app-header.internal-theme {
    width: 100%;
    max-width: none;
    min-height: 56px;
    height: 56px;
    top: 0;
    left: 0;
    transform: none;
    border-radius: 0;
    border-width: 0 0 1px;
    border-color: rgba(226, 232, 240, 0.9);
    padding: 0 clamp(1.25rem, 3vw, 2.75rem);
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    box-shadow: 0 8px 26px rgba(15, 23, 42, 0.05);
}

body.internal-header-page {
    padding-top: 56px;
}

body.public-header-page {
    padding-top: 96px;
}

body.public-header-page .landing-main {
    margin-top: -96px;
}

body.public-header-page .hero-full-video {
    min-height: 100vh;
}

body.dark .app-header.internal-theme {
    background: linear-gradient(180deg, rgba(11, 32, 36, 0.98), rgba(7, 26, 29, 0.98));
    border-color: rgba(45, 212, 191, 0.18);
    box-shadow: 0 10px 26px rgba(0, 0, 0, 0.26), inset 0 -1px 0 rgba(255, 255, 255, 0.03);
}

.app-header.internal-theme .nav-link-about {
    display: none;
}

.app-header.public-theme .header-brand-title,
.app-header.public-theme .user-name {
    color: #ffffff;
}

.app-header.public-theme .logo-subtitle,
.app-header.public-theme .header-nav-link,
.app-header.public-theme .user-role {
    color: rgba(255, 255, 255, 0.78);
}

.app-header.public-theme .header-nav-link:hover,
.app-header.public-theme .header-nav-link.active {
    background-color: rgba(255, 255, 255, 0.12);
    color: #ffffff;
}

.app-header.public-theme .lang-toggle-btn,
.app-header.public-theme .theme-toggle-btn,
.app-header.public-theme .header-link-btn {
    background-color: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.22);
    color: rgba(255, 255, 255, 0.86);
}

.app-header.public-theme .lang-toggle-btn:hover,
.app-header.public-theme .theme-toggle-btn:hover,
.app-header.public-theme .header-link-btn:hover {
    background-color: rgba(255, 255, 255, 0.16);
    border-color: rgba(255, 255, 255, 0.4);
    color: #ffffff;
}

.app-header.public-theme .user-profile {
    border-left-color: rgba(255, 255, 255, 0.22);
}

.app-header.public-theme .user-menu-trigger:hover,
.app-header.public-theme .user-profile.active .user-menu-trigger {
    background-color: rgba(255, 255, 255, 0.12);
}

.app-header.public-theme.is-scrolled {
    background: rgba(255, 255, 255, 0.86);
    border-color: rgba(226, 232, 240, 0.82);
    box-shadow: 0 18px 44px rgba(15, 23, 42, 0.12);
    color: var(--text-primary);
}

.app-header.public-theme.is-scrolled .header-brand-title,
.app-header.public-theme.is-scrolled .user-name {
    color: var(--text-primary);
}

.app-header.public-theme.is-scrolled .logo-subtitle,
.app-header.public-theme.is-scrolled .header-nav-link,
.app-header.public-theme.is-scrolled .user-role {
    color: var(--text-secondary);
}

.app-header.public-theme.is-scrolled .header-nav-link:hover,
.app-header.public-theme.is-scrolled .header-nav-link.active {
    background-color: rgba(20, 184, 166, 0.1);
    color: var(--dark-slate);
}

.app-header.public-theme.is-scrolled .lang-toggle-btn,
.app-header.public-theme.is-scrolled .theme-toggle-btn,
.app-header.public-theme.is-scrolled .header-link-btn {
    background-color: rgba(248, 250, 252, 0.9);
    border-color: var(--border-color);
    color: var(--text-secondary);
}

.app-header.public-theme.is-scrolled .lang-toggle-btn:hover,
.app-header.public-theme.is-scrolled .theme-toggle-btn:hover,
.app-header.public-theme.is-scrolled .header-link-btn:hover {
    background-color: #ffffff;
    border-color: var(--primary-teal);
    color: var(--primary-teal-hover);
}

.app-header.public-theme.is-scrolled .user-profile {
    border-left-color: var(--border-color);
}

.app-header.public-theme.is-scrolled .user-menu-trigger:hover,
.app-header.public-theme.is-scrolled .user-profile.active .user-menu-trigger {
    background-color: rgba(20, 184, 166, 0.08);
}

body.dark .app-header.public-theme.is-scrolled {
    background: rgba(11, 32, 36, 0.9);
    border-color: rgba(148, 163, 184, 0.22);
    box-shadow: 0 18px 44px rgba(0, 0, 0, 0.32);
}

body.dark .app-header.public-theme.is-scrolled .header-brand-title,
body.dark .app-header.public-theme.is-scrolled .user-name {
    color: var(--text-primary);
}

body.dark .app-header.public-theme.is-scrolled .logo-subtitle,
body.dark .app-header.public-theme.is-scrolled .header-nav-link,
body.dark .app-header.public-theme.is-scrolled .user-role {
    color: var(--text-secondary);
}

body.dark.public-header-page .app-header.public-theme .lang-toggle-btn,
body.dark.public-header-page .app-header.public-theme .theme-toggle-btn,
body.dark.public-header-page .app-header.public-theme .header-link-btn,
body.dark.public-header-page .app-header.public-theme.is-scrolled .lang-toggle-btn,
body.dark.public-header-page .app-header.public-theme.is-scrolled .theme-toggle-btn,
body.dark.public-header-page .app-header.public-theme.is-scrolled .header-link-btn {
    background-color: rgba(16, 42, 48, 0.88);
    border-color: rgba(148, 163, 184, 0.28);
    color: rgba(248, 250, 252, 0.92);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

body.dark.public-header-page .app-header.public-theme .lang-toggle-btn:hover,
body.dark.public-header-page .app-header.public-theme .theme-toggle-btn:hover,
body.dark.public-header-page .app-header.public-theme .header-link-btn:hover,
body.dark.public-header-page .app-header.public-theme.is-scrolled .lang-toggle-btn:hover,
body.dark.public-header-page .app-header.public-theme.is-scrolled .theme-toggle-btn:hover,
body.dark.public-header-page .app-header.public-theme.is-scrolled .header-link-btn:hover {
    background-color: rgba(20, 184, 166, 0.16);
    border-color: rgba(45, 212, 191, 0.48);
    color: #ffffff;
}

body.dark.public-header-page .app-header.public-theme .lang-toggle-btn .globe-icon,
body.dark.public-header-page .app-header.public-theme .theme-toggle-btn .sun-icon,
body.dark.public-header-page .app-header.public-theme .theme-toggle-btn .moon-icon {
    color: currentColor;
    opacity: 1;
}

.app-header.internal-theme .header-left-group {
    gap: 1.25rem;
    height: 100%;
    align-items: center;
}

.app-header.internal-theme .header-brand,
.app-header.internal-theme .header-actions {
    height: 100%;
    align-items: center;
}

.app-header.internal-theme .header-brand-mark {
    width: 36px;
    height: 36px;
}

.app-header.internal-theme .header-brand-title {
    color: var(--text-primary);
}

.app-header.internal-theme .logo-subtitle,
.app-header.internal-theme .user-role {
    color: var(--text-secondary);
}

.app-header.internal-theme .header-actions {
    gap: 0.65rem;
}

.app-header.internal-theme .lang-toggle-btn,
.app-header.internal-theme .theme-toggle-btn,
.app-header.internal-theme .header-link-btn {
    background-color: var(--bg-secondary);
    border-color: var(--border-color);
}

.app-header.internal-theme .lang-toggle-btn:hover,
.app-header.internal-theme .theme-toggle-btn:hover,
.app-header.internal-theme .header-link-btn:hover {
    background-color: rgba(20, 184, 166, 0.08);
    border-color: rgba(20, 184, 166, 0.42);
    color: var(--primary-teal);
}

.app-header.internal-theme .user-profile {
    border-left-color: var(--border-color);
    margin-left: 0.15rem;
}

body.dark .app-header.internal-theme .header-brand-title,
body.dark .app-header.internal-theme .user-name {
    color: #f8fafc;
}

body.dark .app-header.internal-theme .logo-subtitle,
body.dark .app-header.internal-theme .user-role {
    color: rgba(203, 213, 225, 0.82);
}

body.dark .app-header.internal-theme .lang-toggle-btn,
body.dark .app-header.internal-theme .theme-toggle-btn,
body.dark .app-header.internal-theme .header-link-btn {
    background-color: rgba(16, 42, 48, 0.82);
    border-color: rgba(148, 163, 184, 0.18);
    color: rgba(226, 232, 240, 0.9);
}

body.dark .app-header.internal-theme .lang-toggle-btn:hover,
body.dark .app-header.internal-theme .theme-toggle-btn:hover,
body.dark .app-header.internal-theme .header-link-btn:hover {
    background-color: rgba(20, 184, 166, 0.1);
    border-color: rgba(45, 212, 191, 0.42);
    color: #5eead4;
}

body.dark .app-header.internal-theme .user-profile {
    border-left-color: rgba(148, 163, 184, 0.18);
}

body.dark .app-header.internal-theme .user-menu-trigger:hover,
body.dark .app-header.internal-theme .user-profile.active .user-menu-trigger {
    background-color: rgba(20, 184, 166, 0.12);
}

.header-left-group {
    display: flex;
    align-items: center;
    gap: 40px;
    min-width: 0;
}

.header-right-group {
    margin-left: auto;
}

.header-brand,
.header-logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    gap: 0.75rem;
    min-width: 0;
}

.header-brand-mark {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: var(--primary-teal);
    flex-shrink: 0;
    object-fit: cover;
}

.header-brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1.15;
    min-width: 0;
}

.header-brand-title {
    display: block;
    color: var(--text-primary);
    font-family: var(--font-heading);
    font-size: 1.05rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.logo-icon {
    font-size: 1.75rem;
    background: var(--primary-light);
    padding: 0.4rem;
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-sm);
}

.logo-text h1 {
    font-size: 1.25rem;
    font-weight: 700;
    line-height: 1.1;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.logo-subtitle {
    font-size: 0.75rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.header-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.25rem;
    flex: 0 0 auto;
    padding: 0;
}

.header-nav-link {
    display: inline-flex;
    align-items: center;
    min-height: 38px;
    padding: 0 1rem;
    border-radius: var(--radius-pill);
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
    text-decoration: none;
    transition: background-color var(--transition-fast), color var(--transition-fast);
}

.header-nav-link:hover,
.header-nav-link.active {
    background-color: rgba(20, 184, 166, 0.09);
    color: var(--dark-slate);
}

body.dark .header-nav-link:hover,
body.dark .header-nav-link.active {
    background-color: var(--primary-light);
    color: var(--primary-teal);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-shrink: 0;
}

.header-link-btn,
.header-cta-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    padding: 0 0.95rem;
    border-radius: var(--radius-pill);
    font-size: 0.9rem;
    font-weight: 700;
    text-decoration: none;
    transition: background-color var(--transition-fast), border-color var(--transition-fast), color var(--transition-fast), box-shadow var(--transition-fast);
}

.header-link-btn {
    background-color: var(--bg-secondary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.header-link-btn:hover {
    color: var(--primary-color);
    background-color: var(--bg-tertiary);
    border-color: var(--primary-color);
}

.header-cta-btn {
    background-color: var(--primary-teal);
    color: #ffffff;
    border: 1px solid var(--primary-teal);
    box-shadow: 0 8px 20px rgba(20, 184, 166, 0.22);
}

.header-cta-btn:hover {
    background-color: var(--primary-teal-hover);
    border-color: var(--primary-teal-hover);
    color: #ffffff;
}

.btn-icon-secondary {
    background-color: var(--bg-tertiary);
    color: var(--text-secondary);
    padding: 0.5rem 1rem;
    border-radius: var(--radius-sm);
    font-weight: 500;
    font-size: 0.85rem;
    border: 1px solid var(--border-color);
}

.btn-icon-secondary:hover {
    background-color: var(--border-color);
    color: var(--text-primary);
}

.theme-toggle-btn {
    background: none;
    color: var(--text-secondary);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border-color);
    background-color: var(--bg-secondary);
}

.theme-toggle-btn:hover {
    color: var(--primary-color);
    border-color: var(--primary-color);
    box-shadow: var(--shadow-sm);
}

.lang-toggle-btn {
    background: none;
    color: var(--text-secondary);
    height: 40px;
    padding: 0 12px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    border: 1px solid var(--border-color);
    background-color: var(--bg-secondary);
    font-family: var(--font-primary);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.lang-toggle-btn:hover {
    color: var(--primary-color);
    border-color: var(--primary-color);
    box-shadow: var(--shadow-sm);
}

.header-nav-link:focus-visible,
.header-link-btn:focus-visible,
.header-cta-btn:focus-visible,
.lang-toggle-btn:focus-visible,
.theme-toggle-btn:focus-visible,
.user-menu-trigger:focus-visible {
    outline: 2px solid rgba(20, 184, 166, 0.72);
    outline-offset: 3px;
}

.lang-toggle-btn .globe-icon {
    width: 1.25rem;
    height: 1.25rem;
}

.theme-toggle-btn .sun-icon {
    display: none;
    width: 1.25rem;
    height: 1.25rem;
}

.theme-toggle-btn .moon-icon {
    display: block;
    width: 1.25rem;
    height: 1.25rem;
}

body.dark .theme-toggle-btn .sun-icon {
    display: block;
}

body.dark .theme-toggle-btn .moon-icon {
    display: none;
}

.user-profile {
    position: relative;
    border-left: 1px solid var(--border-color);
    padding-left: 1rem;
}

.user-menu-trigger {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    min-height: 42px;
    padding: 0.2rem 0.55rem 0.2rem 0.25rem;
    border: 1px solid transparent;
    border-radius: var(--radius-pill);
    background: transparent;
    color: inherit;
    cursor: pointer;
    font-family: var(--font-primary);
    transition: background-color var(--transition-fast), border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.user-menu-trigger:hover,
.user-profile.active .user-menu-trigger {
    background-color: rgba(20, 184, 166, 0.08);
    border-color: rgba(20, 184, 166, 0.22);
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.06);
}

.user-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background-color: rgba(20, 184, 166, 0.12);
    color: var(--primary-teal);
    font-size: 1.25rem;
    flex-shrink: 0;
}

.user-info {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.user-name {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-primary);
}

.user-role {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.user-dropdown-menu {
    position: absolute;
    top: 110%;
    right: 0;
    width: 248px;
    padding: 10px;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    background: #ffffff;
    box-shadow: 0 16px 34px rgba(15, 23, 42, 0.12);
    z-index: 1100;
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    pointer-events: none;
    transition: opacity var(--transition-fast), transform var(--transition-fast), visibility var(--transition-fast);
}

.user-profile.active .user-dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
}

.user-dropdown-head {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.45rem 0.45rem 0.75rem;
    border-bottom: 1px solid var(--border-color);
}

.user-dropdown-avatar {
    width: 40px;
    height: 40px;
}

.user-dropdown-copy {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.user-dropdown-name {
    color: var(--text-primary);
    font-size: 0.92rem;
    font-weight: 700;
    line-height: 1.25;
}

.user-dropdown-role {
    color: var(--text-secondary);
    font-size: 0.78rem;
    line-height: 1.25;
}

.user-profile-link {
    margin-top: 0.4rem;
    color: var(--primary-teal);
    font-size: 0.8rem;
    font-weight: 700;
    text-decoration: none;
}

.user-profile-link:hover {
    color: var(--primary-teal-hover);
}

.user-dropdown-list {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    padding-top: 0.55rem;
}

.user-dropdown-item {
    display: flex;
    width: 100%;
    align-items: center;
    gap: 0.6rem;
    min-height: 38px;
    padding: 0 0.6rem;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: var(--text-secondary);
    font-family: var(--font-primary);
    font-size: 0.88rem;
    font-weight: 600;
    text-align: left;
    text-decoration: none;
    cursor: pointer;
    transition: background-color var(--transition-fast), color var(--transition-fast);
}

.user-dropdown-item:hover {
    background-color: rgba(20, 184, 166, 0.08);
    color: var(--primary-teal-hover);
}

.user-dropdown-item .icon {
    width: 20px;
    color: currentColor;
    font-size: 1rem;
}

body.dark .user-dropdown-menu {
    background: var(--bg-secondary);
    border-color: var(--border-color);
    box-shadow: 0 14px 32px rgba(0, 0, 0, 0.32);
}

body.dark .user-dropdown-item:hover {
    background-color: rgba(20, 184, 166, 0.12);
}

/* Alert Warning Banner */
.warning-banner {
    background-color: var(--danger-light);
    border-bottom: 1px solid rgba(220, 38, 38, 0.2);
    padding: 0.6rem 2rem;
    animation: slideDown var(--transition-normal);
}

.banner-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.banner-icon {
    font-size: 1.2rem;
}

.banner-message {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--danger-color);
}

/* Main Content Area */
.app-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 2rem;
    max-width: 1600px;
    width: 100%;
    margin: 0 auto;
}

.view-section {
    display: none;
    flex-direction: column;
    gap: 2rem;
    width: 100%;
    animation: fadeIn var(--transition-normal);
}

.view-section.active {
    display: contents;
}

/* ==========================================================================
   SCREEN 1: DASHBOARD VIEW
   ========================================================================== */
.dashboard-shell {
    max-width: none;
    padding: 0;
}

.dashboard-shell .view-section {
    gap: 0;
    padding: 0;
}

.dashboard-layout-wrapper {
    display: flex;
    width: 100%;
    min-height: calc(100vh - 56px);
    background:
        linear-gradient(180deg, rgba(248, 250, 252, 0.96) 0%, #f8fafc 42%),
        radial-gradient(circle at 78% 0%, rgba(20, 184, 166, 0.08), transparent 30%);
}

.sidebar-nav {
    width: 272px;
    flex: 0 0 272px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 22px 16px;
    background: linear-gradient(180deg, #0f172a 0%, #0b2024 100%);
    color: #ffffff;
    box-shadow: inset -1px 0 0 rgba(255, 255, 255, 0.06);
}

.sidebar-scroll-area {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
    gap: 16px;
    overflow-y: auto;
    overflow-x: hidden;
    overscroll-behavior: contain;
}

.sidebar-menu {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.sidebar-section {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.sidebar-section-label {
    padding: 0 14px 4px;
    color: rgba(203, 213, 225, 0.52);
    font-size: 0.67rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.sidebar-item {
    display: flex;
    min-height: 42px;
    align-items: center;
    gap: 12px;
    padding: 0 14px;
    border-left: 3px solid transparent;
    border-radius: 0 10px 10px 0;
    color: rgba(255, 255, 255, 0.74);
    font-size: 0.9rem;
    font-weight: 700;
    text-decoration: none;
    transition: background-color var(--transition-fast), color var(--transition-fast), transform var(--transition-fast);
}

.sidebar-item:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
    transform: translateX(2px);
}

.sidebar-item.active {
    background: linear-gradient(90deg, rgba(20, 184, 166, 0.98), rgba(20, 184, 166, 0.82));
    color: #ffffff;
    border-left: 3px solid #14b8a6;
    border-radius: 0 6px 6px 0;
    box-shadow: 0 12px 26px rgba(20, 184, 166, 0.22);
}

.sidebar-icon {
    width: 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
    font-weight: 800;
}

.sidebar-icon .ti {
    font-size: 1.15rem;
    line-height: 1;
}

.sidebar-badge-soon {
    margin-left: auto;
    padding: 2px 7px;
    border-radius: 999px;
    font-size: 0.65rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    text-transform: lowercase;
    background: rgba(255, 255, 255, 0.08);
    color: white;
    white-space: nowrap;
    border: 1px solid rgba(255, 255, 255, 0.1);
    flex-shrink: 0;
}

.sidebar-item-soon {
    opacity: 0.6;
    cursor: default;
}

.sidebar-item-soon:hover {
    background: transparent;
    color: rgba(255, 255, 255, 0.74);
    transform: none;
}

.sidebar-support {
    margin-top: auto;
    position: sticky;
    bottom: 0;
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
    padding: 16px;
    border-top: 0.5px solid rgba(255, 255, 255, 0.1);
    border-radius: 0;
    background: #0f172a;
}

.support-kicker {
    color: rgba(255, 255, 255, 0.58);
    font-size: 0.78rem;
    font-weight: 700;
}

.sidebar-support strong {
    color: #ffffff;
    font-size: 0.96rem;
}

.support-btn {
    display: inline-flex;
    min-height: 36px;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: #14b8a6;
    color: #ffffff;
    font-size: 0.84rem;
    font-weight: 800;
    text-decoration: none;
}

.dashboard-back-to-top {
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 1050;
    width: 46px;
    height: 46px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(20, 184, 166, 0.28);
    border-radius: 999px;
    background: #14b8a6;
    color: #ffffff;
    font-size: 1.25rem;
    box-shadow: 0 12px 26px rgba(20, 184, 166, 0.22);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(12px) scale(0.96);
    transition: opacity var(--transition-fast), visibility var(--transition-fast), transform var(--transition-fast), background-color var(--transition-fast), box-shadow var(--transition-fast);
}

.dashboard-back-to-top.is-visible {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0) scale(1);
}

.dashboard-back-to-top:hover,
.dashboard-back-to-top:focus-visible {
    background: #0d9488;
    box-shadow: 0 16px 32px rgba(13, 148, 136, 0.28);
    transform: translateY(-2px) scale(1);
}

.dashboard-back-to-top:focus-visible {
    outline: 3px solid rgba(20, 184, 166, 0.24);
    outline-offset: 3px;
}

.dashboard-body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding: 18px 32px 28px;
    overflow-y: auto;
}

.dashboard-topbar {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1.5rem;
    margin: 0 0 4px 0;
    padding: 18px 20px;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    background: #ffffff;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
}

.dashboard-heading {
    min-width: 0;
}

.dashboard-eyebrow {
    display: inline-flex;
    margin-bottom: 0.35rem;
    color: #0d9488;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.dashboard-topbar h2 {
    margin: 0;
    color: #0f172a;
    font-size: clamp(1.35rem, 2vw, 1.75rem);
    font-weight: 800;
    letter-spacing: -0.02em;
}

.dashboard-topbar p {
    margin: 0.35rem 0 0;
    color: #64748b;
    font-size: 0.9rem;
    line-height: 1.5;
}

.dashboard-header-summary {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.6rem;
    flex-wrap: wrap;
}

.summary-pill {
    display: inline-flex;
    min-height: 34px;
    align-items: center;
    gap: 0.4rem;
    padding: 0 0.8rem;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 800;
    white-space: nowrap;
}

.summary-pill-success {
    background: #ecfdf5;
    color: #0d9488;
    border: 1px solid rgba(20, 184, 166, 0.2);
}

.summary-pill-danger {
    background: #fef2f2;
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.18);
}

.main-content-grid {
    display: grid;
    grid-template-columns: minmax(0, 2.05fr) minmax(320px, 0.95fr);
    gap: 20px;
    width: 100%;
}

.dashboard-primary-column,
.dashboard-secondary-column {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.system-alerts {
    margin-top: 0;
}

.dashboard-panel,
.chart-box,
.system-alerts,
.sessions-list-container,
.init-session-card,
.metric-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.dashboard-panel {
    padding: 24px;
}

.panel-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 20px;
}

.panel-kicker {
    display: block;
    margin-bottom: 0.3rem;
    color: #14b8a6;
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.panel-heading h3 {
    color: #0f172a;
    font-family: var(--font-heading);
    font-size: 1.05rem;
    font-weight: 800;
    letter-spacing: -0.01em;
    line-height: 1.25;
}

.panel-range {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 0 0.75rem;
    border-radius: 999px;
    background: #f1f5f9;
    color: #64748b;
    font-size: 0.78rem;
    font-weight: 800;
}

.chart-preview {
    min-height: 240px;
    height: 260px;
    display: block;
    padding: 28px 24px 18px;
    border-radius: 12px;
    background:
        linear-gradient(180deg, rgba(248, 250, 252, 0.9), rgba(255, 255, 255, 0.8)),
        repeating-linear-gradient(0deg, transparent 0 47px, rgba(226, 232, 240, 0.7) 48px);
}

.chart-preview canvas {
    width: 100% !important;
    height: 100% !important;
}

.chart-preview span {
    flex: 1;
    min-width: 22px;
    border-radius: 999px 999px 8px 8px;
    background: linear-gradient(180deg, #2dd4bf, #14b8a6);
    box-shadow: 0 8px 18px rgba(20, 184, 166, 0.18);
}

.metrics-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    width: 100%;
    margin: 0;
    justify-content: stretch;
    align-items: stretch;
}

.metric-card {
    position: relative;
    display: flex;
    min-height: 124px;
    flex-direction: column;
    justify-content: space-between;
    gap: 1rem;
    padding: 20px 18px;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    background: #ffffff;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
    overflow: hidden;
}

.metric-card::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 4px;
    background: #cbd5e1;
}

.metric-card-total::before {
    background: #1e293b;
}

.metric-card-success::before {
    background: #14b8a6;
}

.metric-card-danger::before {
    background: #ef4444;
}

.metric-card-muted::before {
    background: #64748b;
}

.metric-icon {
    position: absolute;
    top: 18px;
    right: 18px;
    float: right;
    margin-top: -2px;
    color: #0f172a;
    font-size: 20px;
    line-height: 1;
    opacity: 0.5;
}

.metric-icon-danger {
    color: #ef4444;
}

.metric-label {
    color: #64748b;
    font-size: 0.86rem;
    font-weight: 700;
    line-height: 1.35;
    padding-right: 2rem;
}

.landing-metrics .metric-value {
    font-family: var(--font-heading);
    font-size: clamp(2rem, 3vw, 2.65rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1;
}

.metric-value-dark {
    color: #0f172a;
}

.metric-value-success {
    color: #14b8a6;
}

.metric-value-danger {
    color: #ef4444;
}

.metric-value-muted {
    color: #475569;
}

.metric-trend {
    font-size: 0.78rem;
    font-weight: 800;
    line-height: 1.3;
}

.trend-up {
    color: #0d9488;
}

.trend-down {
    color: #ef4444;
}

.trend-neutral {
    color: #64748b;
}

body.dark .metric-card {
    background: var(--bg-secondary);
    border-color: var(--border-color);
    box-shadow: var(--shadow-sm);
}

body.dark .metric-label {
    color: var(--text-muted);
}

body.dark .metric-value-dark,
body.dark .metric-value-muted {
    color: var(--text-primary);
}

body.dark .dashboard-layout-wrapper {
    background:
        linear-gradient(180deg, rgba(7, 19, 22, 0.98), #071316 46%),
        radial-gradient(circle at 78% 0%, rgba(45, 212, 191, 0.08), transparent 30%);
}

body.dark .dashboard-back-to-top {
    border-color: rgba(45, 212, 191, 0.34);
    background: #14b8a6;
    color: #ffffff;
    box-shadow: 0 14px 30px rgba(0, 0, 0, 0.34);
}

body.dark .dashboard-topbar h2 {
    color: var(--text-primary);
}

body.dark .dashboard-topbar p {
    color: var(--text-muted);
}

body.dark .dashboard-topbar,
body.dark .status-row {
    background: var(--bg-secondary);
    border-color: var(--border-color);
}

body.dark .dashboard-eyebrow,
body.dark .quick-action-icon {
    color: #5eead4;
}

body.dark .summary-pill-success,
body.dark .quick-link {
    background: rgba(45, 212, 191, 0.12);
    border-color: rgba(45, 212, 191, 0.2);
    color: #5eead4;
}

body.dark .summary-pill-danger {
    background: rgba(248, 113, 113, 0.12);
    border-color: rgba(248, 113, 113, 0.22);
    color: #fca5a5;
}

body.dark .dashboard-panel,
body.dark .chart-box,
body.dark .system-alerts,
body.dark .sessions-list-container,
body.dark .init-session-card,
body.dark .metric-card {
    background: var(--bg-secondary);
    border-color: var(--border-color);
}

body.dark .panel-heading h3,
body.dark .alert-item strong,
body.dark .status-row strong,
body.dark .init-session-card .card-header h3 {
    color: var(--text-primary);
}

body.dark .metric-icon {
    color: var(--text-primary);
}

body.dark .metric-icon-danger {
    color: #ef4444;
}

body.dark .panel-range,
body.dark .alert-item {
    background: var(--bg-tertiary);
    border-color: var(--border-color);
}

body.dark .sessions-table th {
    background: var(--bg-tertiary);
}

body.dark .sessions-table tbody tr:hover {
    background-color: rgba(45, 212, 191, 0.08);
}

body.dark .btn-action-view {
    background: rgba(16, 42, 48, 0.9);
}

body.dark .alert-item p {
    color: var(--text-secondary);
}

body.dark .status-row p {
    color: var(--text-muted);
}

body.dark .chart-preview {
    background:
        linear-gradient(180deg, rgba(16, 42, 48, 0.86), rgba(11, 32, 36, 0.84)),
        repeating-linear-gradient(0deg, transparent 0 47px, rgba(148, 163, 184, 0.14) 48px);
}

.dashboard-hero {
    background: linear-gradient(135deg, var(--bg-secondary), var(--bg-tertiary));
    border-radius: var(--radius-md);
    padding: 2rem 2.25rem;
    border: 1px solid var(--border-color);
    text-align: left;
    box-shadow: var(--shadow-sm);
}

.dashboard-hero h2 {
    font-size: clamp(1.6rem, 2.2vw, 2rem);
    margin-bottom: 0.5rem;
    font-weight: 800;
    letter-spacing: -0.025em;
    background: linear-gradient(90deg, var(--text-primary), var(--primary-color));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    line-height: 1.18;
    max-width: 920px;
}

.dashboard-hero p {
    color: var(--text-secondary);
    font-size: 1rem;
    max-width: 760px;
    margin: 0;
    line-height: 1.65;
}

/* Init Session Card */
.init-session-card {
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.init-session-card .card-header {
    background-color: var(--bg-secondary);
    padding: 20px 20px 0;
    border-bottom: 1px solid var(--border-color);
    border-bottom: 0;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
}

.init-session-card .card-header h3 {
    color: #0f172a;
    font-size: 1.05rem;
    font-weight: 800;
    letter-spacing: -0.01em;
}

.init-session-card .card-body {
    padding: 16px 20px 20px;
}

.quick-action-icon {
    width: 38px;
    height: 38px;
    flex: 0 0 38px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    background: rgba(20, 184, 166, 0.12);
    color: #0d9488;
    font-size: 1.05rem;
}

.init-form {
    max-width: none;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.input-with-button {
    display: flex;
    gap: 16px;
    align-items: flex-end;
    flex-wrap: wrap;
}

.input-with-button input {
    flex: 0 1 320px;
    max-width: 320px;
    min-height: 46px;
    padding: 0.75rem 1rem;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    background-color: var(--bg-primary);
    color: var(--text-primary);
    font-size: 1rem;
    font-weight: 500;
}

.input-with-button input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px var(--primary-light);
}

.init-form .btn-primary {
    min-height: 46px;
    border-radius: 50px;
    background: #14b8a6;
    border: none;
    color: #ffffff;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 10px 22px rgba(20, 184, 166, 0.2);
    transition: all 0.2s ease;
}

#start-session-btn.btn-primary,
#start-session-btn.btn-primary:disabled {
    background: #14b8a6;
    color: #ffffff;
    border: none;
    font-weight: 600;
    cursor: pointer;
    opacity: 1;
    box-shadow: 0 4px 12px rgba(20, 184, 166, 0.16);
}

.init-form .btn-primary:hover:not(:disabled),
#start-session-btn.btn-primary:hover {
    background: #0d9488;
    border-color: transparent;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(20, 184, 166, 0.2);
}

body.dark .session-count,
body.dark .btn-clear-filters {
    background-color: var(--bg-tertiary);
}

.dashboard-secondary-column .init-session-card .card-header {
    padding: 20px 20px 0;
}

.dashboard-secondary-column .init-session-card .card-body {
    padding: 16px 20px 20px;
}

.dashboard-secondary-column .input-with-button {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
}

.dashboard-secondary-column .input-with-button input {
    flex: 1 1 auto;
    width: 100%;
    max-width: none;
}

.dashboard-secondary-column .init-form .btn-primary {
    width: 100%;
}

.status-stack {
    display: grid;
    gap: 10px;
    margin-bottom: 14px;
}

.status-row {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    background: #f8fafc;
}

.status-dot-ui {
    width: 10px;
    height: 10px;
    flex: 0 0 10px;
    margin-top: 0.35rem;
    border-radius: 50%;
    background: #14b8a6;
    box-shadow: 0 0 0 4px rgba(20, 184, 166, 0.12);
}

.status-row-warning .status-dot-ui {
    background: #f59e0b;
    box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.14);
}

.status-row strong {
    display: block;
    color: #0f172a;
    font-size: 0.86rem;
    font-weight: 800;
}

.status-row p {
    margin: 0.15rem 0 0;
    color: #64748b;
    font-size: 0.8rem;
    line-height: 1.4;
}

.quick-actions-strip {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
    margin-bottom: 14px;
}

.quick-link {
    display: inline-flex;
    min-height: 38px;
    align-items: center;
    gap: 0.5rem;
    padding: 0 12px;
    border-radius: 999px;
    background: rgba(20, 184, 166, 0.08);
    color: #0d9488;
    font-size: 0.82rem;
    font-weight: 800;
    text-decoration: none;
}

.quick-link:hover {
    background: rgba(20, 184, 166, 0.14);
    color: #0f766e;
}

.alert-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.alert-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    background: #f8fafc;
}

.alert-icon {
    width: 28px;
    height: 28px;
    flex: 0 0 28px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    font-weight: 900;
}

.alert-item strong {
    display: block;
    margin-bottom: 0.2rem;
    color: #0f172a;
    font-size: 0.9rem;
}

.alert-item p {
    margin: 0;
    color: #64748b;
    font-size: 0.82rem;
    line-height: 1.45;
}

.alert-danger .alert-icon {
    background: #fef2f2;
    color: #ef4444;
}

.alert-info .alert-icon {
    background: #eff6ff;
    color: #2563eb;
}

.alert-success .alert-icon {
    background: #ecfdf5;
    color: #0d9488;
}

/* ---- Base Button Reset ---- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    border: none;
    cursor: pointer;
    font-family: var(--font-sans);
    font-size: 0.95rem;
    font-weight: 600;
    line-height: 1;
    transition: background-color 0.2s ease, transform 0.18s ease, box-shadow 0.2s ease, color 0.2s ease;
    text-decoration: none;
    white-space: nowrap;
    user-select: none;
}

/* ---- Primary CTA Button (Hero & main actions) ---- */
.btn-primary {
    background-color: var(--primary-teal);
    color: #ffffff;
    padding: 0.82rem 1.9rem;
    font-weight: 700;
    border-radius: var(--radius-pill);
    white-space: nowrap;
    box-shadow: 0 10px 24px rgba(20, 184, 166, 0.22);
    letter-spacing: 0;
    border: 1px solid var(--primary-teal);
}

.btn-primary:hover:not(:disabled) {
    background-color: var(--primary-teal-hover);
    border-color: var(--primary-teal-hover);
    transform: translateY(-1px);
    box-shadow: 0 14px 30px rgba(20, 184, 166, 0.28);
}

.btn-primary:active:not(:disabled) {
    transform: translateY(0);
    box-shadow: var(--shadow-sm);
}

.btn-primary:disabled {
    background-color: var(--text-muted);
    opacity: 0.5;
    cursor: not-allowed;
    box-shadow: none;
}

/* ---- Outline / Text-link Button (secondary hero action) ---- */
.btn-outline {
    background: transparent;
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    padding: 0.82rem 1.25rem;
    font-weight: 600;
    border-radius: var(--radius-pill);
    position: relative;
    letter-spacing: 0;
}

.btn-outline::after {
    content: '\2192'; /* → arrow */
    display: inline-block;
    margin-left: 0.4rem;
    transition: transform 0.22s ease;
}

.btn-outline:hover {
    color: var(--primary-color);
    border-color: var(--primary-color);
    background-color: var(--primary-light);
}

.btn-outline:hover::after {
    transform: translateX(4px);
}

body.dark .btn-outline {
    color: var(--text-secondary);
}

body.dark .btn-outline:hover {
    color: var(--primary-color);
}

/* ---- Neon Tech Button (Simulator start screen) ---- */
.btn-sim-neon {
    background: var(--primary-color);
    color: #ffffff;
    border: 1px solid var(--primary-color);
    border-radius: var(--radius-sm);
    padding: 0.8rem 2rem;
    font-weight: 700;
    font-size: 0.9rem;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    box-shadow: var(--shadow-sm);
    transition: all 0.25s ease;
    cursor: pointer;
    font-family: var(--font-sans);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-sim-neon:hover {
    background: var(--primary-hover);
    border-color: var(--primary-hover);
    box-shadow: var(--shadow-md);
    transform: translateY(-1px);
}

.btn-sim-neon:active {
    transform: translateY(0);
    box-shadow: var(--shadow-sm);
}

.input-tip {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* Sessions Table */
.sessions-list-container {
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.05);
    overflow: hidden;
}

.list-header {
    padding: 1rem 1.25rem 0.9rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

.list-title-group {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-width: 240px;
}

.list-header h3 {
    font-family: var(--font-heading);
    font-size: 1.05rem;
    font-weight: 800;
    letter-spacing: -0.01em;
    color: var(--text-primary);
}

.session-count {
    font-size: 0.8rem;
    background-color: #f1f5f9;
    color: var(--text-secondary);
    padding: 0.25rem 0.6rem;
    border-radius: 999px;
    font-weight: 600;
}

.table-responsive {
    overflow-x: auto;
    width: 100%;
}

.sessions-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

.sessions-table th,
.sessions-table td {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border-color);
    vertical-align: middle;
}

.sessions-table th {
    background-color: #f8fafc;
    color: var(--text-secondary);
    font-weight: 800;
    font-size: 0.76rem;
    text-transform: uppercase;
    letter-spacing: 0.07em;
}

.sessions-table tbody tr {
    transition: background-color var(--transition-fast), box-shadow var(--transition-fast);
}

.sessions-table tbody tr:hover {
    background-color: rgba(20, 184, 166, 0.045);
    box-shadow: inset 3px 0 0 rgba(20, 184, 166, 0.42);
}

.sessions-table tbody tr:focus-within {
    background-color: var(--bg-tertiary);
    outline: 2px solid rgba(20, 184, 166, 0.24);
    outline-offset: -2px;
}

.table-loading {
    text-align: center;
    color: var(--text-secondary);
    padding: 3rem !important;
    font-style: italic;
}

/* Badges styling */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 5px 12px;
    font-size: 0.75rem;
    font-weight: 800;
    border-radius: 20px;
    text-transform: uppercase;
    border: none;
}

/* Status specific classes */
.badge-success {
    background-color: #ecfdf5;
    color: #0d9488;
    border: 1px solid rgba(20, 184, 166, 0.18);
}

.badge-danger {
    background-color: #fef2f2;
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.18);
}

.badge-processing {
    background-color: #ecfeff;
    color: #0891b2;
    border: 1px solid rgba(8, 145, 178, 0.18);
}

.badge-pending {
    background-color: var(--bg-tertiary);
    color: var(--text-muted);
    border: 1px solid var(--border-color);
}

.badge-warning {
    background-color: var(--warning-light);
    color: var(--warning-color);
    border: 1px solid rgba(217, 119, 6, 0.15);
}

.badge-soon {
    background-color: var(--bg-tertiary);
    color: var(--text-muted);
    border: 1px dashed var(--border-color);
}

/* Table Action Buttons */
.btn-action-view,
.btn-action-edit,
.btn-action-delete {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    padding: 0.38rem 0.8rem;
    font-size: 0.8rem;
    font-weight: 700;
    border-radius: 999px;
    text-decoration: none;
    transition: all var(--transition-fast);
    cursor: pointer;
}

.btn-action-delete {
    background-color: transparent;
    color: #b91c1c;
    border: 1px solid rgba(239, 68, 68, 0.24);
    margin-left: 0.4rem;
}

.btn-action-delete:hover {
    background-color: #fef2f2;
    border-color: rgba(239, 68, 68, 0.42);
    color: #991b1b;
}

.btn-action-view {
    background-color: #ffffff;
    color: #0d9488;
    border: 1px solid rgba(20, 184, 166, 0.26);
}

.btn-action-view:hover {
    background-color: rgba(20, 184, 166, 0.08);
    border-color: rgba(20, 184, 166, 0.46);
}

.btn-action-edit {
    background-color: rgba(20, 184, 166, 0.1);
    color: var(--primary-color);
    border: 1px solid rgba(20, 184, 166, 0.22);
}

.btn-action-edit:hover {
    background-color: var(--primary-color);
    color: #ffffff;
}

/* ==========================================================================
   SCREEN 2: CLINICAL EDITOR VIEW
   ========================================================================== */
.editor-subbar {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    gap: 0.85rem;
    padding: 0 0 1rem;
    border-bottom: 1px solid var(--border-color);
}

.btn-back {
    background: none;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.btn-back:hover {
    color: var(--primary-color);
}

.patient-title-area {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 1rem;
    width: 100%;
    flex-wrap: wrap;
    min-width: 0;
}

.patient-ref-tag {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.25rem;
    color: var(--text-primary);
    overflow-wrap: anywhere;
    word-break: break-word;
    min-width: 0;
}

.status-indicator {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    background-color: var(--bg-tertiary);
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.status-dot.green {
    background-color: var(--success-color);
    box-shadow: 0 0 8px var(--success-color);
}

.status-dot.blue {
    background-color: var(--accent-color);
    box-shadow: 0 0 8px var(--accent-color);
    animation: pulse 1.5s infinite;
}

.status-dot.orange {
    background-color: var(--warning-color);
    box-shadow: 0 0 8px var(--warning-color);
}

.status-dot.red {
    background-color: var(--danger-color);
    box-shadow: 0 0 8px var(--danger-color);
}

.status-text {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--text-secondary);
}

/* Workspace Panels */
.editor-workspace {
    display: flex;
    gap: 1.5rem;
    width: 100%;
}

.workspace-column {
    min-width: 0;
    /* Prevents layout distortion */
}

.left-column {
    flex: 1;
}

.right-column {
    flex: 2;
}

.panel-card {
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    height: calc(100vh - 180px);
    overflow: hidden;
}

.panel-header {
    background-color: var(--bg-tertiary);
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.panel-header h4 {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-secondary);
}

.panel-body {
    flex: 1;
    padding: 1.5rem;
    overflow-y: auto;
    position: relative;
}

.panel-body.flex-column {
    display: flex;
    flex-direction: column;
}

/* LEFT COLUMN STATES */
.audio-state-content {
    display: none;
    flex-direction: column;
    height: 100%;
    justify-content: space-between;
}

.audio-state-content.active {
    display: flex;
}

/* State 1: Idle (Dropzone) */
.drop-zone {
    flex: 1;
    border: 2px dashed var(--border-color);
    border-radius: var(--radius-md);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1.25rem;
    margin-bottom: 1.5rem;
    transition: all var(--transition-normal);
}

.drop-zone.dragover {
    border-color: var(--primary-color);
    background-color: var(--primary-light);
    transform: scale(0.99);
}

.drop-zone-icon {
    font-size: 2.25rem;
    margin-bottom: 0.5rem;
    animation: bounce 2s infinite;
}

.drop-zone-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
    color: var(--text-primary);
}

.drop-zone-or {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin: 0.5rem 0;
}

.btn-file-select {
    background-color: var(--bg-tertiary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    padding: 0.6rem 1.25rem;
    font-weight: 600;
    font-size: 0.85rem;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.btn-file-select:hover {
    background-color: var(--border-color);
}

.drop-zone-limits {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 1rem;
}

.btn-block {
    width: 100%;
}

/* Ghi âm trực tiếp (C-018) */
.record-divider {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 1rem 0 0.75rem;
    color: var(--text-muted);
    font-size: 0.8rem;
}

.record-divider::before,
.record-divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background-color: var(--border-color);
}

.record-divider-text {
    padding: 0 0.75rem;
    white-space: nowrap;
}

.btn-record {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    background-color: var(--bg-tertiary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    padding: 0.7rem 1.25rem;
    font-weight: 600;
    font-size: 0.85rem;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.btn-record:hover {
    background-color: var(--border-color);
}

.btn-record .icon {
    font-size: 1.1rem;
}

.recording-controls {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-top: 0.75rem;
}

.recording-indicator {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    background-color: var(--bg-tertiary);
}

.recording-status {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.recording-timer {
    font-family: var(--font-mono, monospace);
    font-weight: 600;
    color: var(--text-primary);
    margin-left: auto;
}

.recording-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: var(--danger-color);
    animation: recording-pulse 1.2s ease-in-out infinite;
}

@keyframes recording-pulse {

    0%,
    100% {
        opacity: 1;
        transform: scale(1);
    }

    50% {
        opacity: 0.3;
        transform: scale(0.85);
    }
}

/* State 2: Ready */
.file-ready-box {
    flex: 1;
    border: 1px solid var(--border-color);
    background-color: var(--bg-tertiary);
    border-radius: var(--radius-md);
    padding: 1.25rem;
    margin-bottom: 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
}

.file-icon {
    font-size: 2.75rem;
    background-color: var(--primary-light);
    color: var(--primary-color);
    width: 64px;
    height: 64px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-md);
}

.file-details {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.file-name {
    font-size: 1.1rem;
    font-weight: 600;
    word-break: break-all;
    color: var(--text-primary);
}

.file-size {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-top: 0.25rem;
}

.btn-danger-link {
    background: none;
    color: var(--danger-color);
    font-size: 0.875rem;
    font-weight: 600;
    text-decoration: underline;
}

.btn-danger-link:hover {
    text-decoration: none;
}

.btn-accent {
    background-color: var(--accent-color);
    color: #ffffff;
    padding: 0.75rem 1.75rem;
    font-weight: 600;
    border-radius: var(--radius-sm);
    border: 1px solid var(--accent-color);
    box-shadow: var(--shadow-sm);
}

.btn-accent:hover:not(:disabled) {
    background-color: var(--accent-hover);
    border-color: var(--accent-hover);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-accent:disabled {
    background-color: var(--text-muted);
    opacity: 0.5;
    cursor: not-allowed;
}

/* State 3: Processing */
.processing-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    padding: 2rem;
    text-align: center;
}

/* Retry đúng bước lỗi (C-020) */
.failed-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 0.75rem;
    padding: 2rem;
    border: 1px solid rgba(239, 68, 68, 0.28);
    border-radius: var(--radius-md);
    background: rgba(254, 242, 242, 0.72);
}

.failed-icon {
    font-size: 2.5rem;
    color: #ef4444;
    line-height: 1;
}

.failed-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #b91c1c;
    margin: 0;
}

.failed-stage {
    font-size: 0.9rem;
    font-weight: 600;
    color: #ef4444;
    margin: 0;
}

.failed-message {
    font-size: 0.85rem;
    color: #dc2626;
    word-break: break-word;
    margin: 0 0 0.5rem;
    line-height: 1.55;
}

#retry-stage-btn {
    background-color: #ffffff;
    border: 1px solid rgba(239, 68, 68, 0.45);
    color: #b91c1c;
    box-shadow: none;
}

#retry-stage-btn:hover:not(:disabled) {
    background-color: #fef2f2;
    border-color: #ef4444;
    color: #991b1b;
}

body.dark .failed-box {
    background: rgba(127, 29, 29, 0.18);
    border-color: rgba(248, 113, 113, 0.35);
}

body.dark .failed-title,
body.dark .failed-stage,
body.dark .failed-message {
    color: #fca5a5;
}

.processing-spinner {
    position: relative;
    width: 100px;
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.spinner-circle {
    position: absolute;
    width: 100%;
    height: 100%;
    border: 4px solid var(--border-color);
    border-top: 4px solid var(--accent-color);
    border-radius: 50%;
    animation: spin 1.5s linear infinite;
}

.spinner-percent {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.25rem;
    color: var(--text-primary);
}

.processing-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.processing-filename {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

.progress-bar-container {
    width: 100%;
    height: 8px;
    background-color: var(--border-color);
    border-radius: var(--radius-sm);
    margin-bottom: 2rem;
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent-color), var(--primary-color));
    border-radius: var(--radius-sm);
    transition: width 0.3s ease;
}

.processing-logs {
    width: 100%;
    text-align: left;
    list-style: none;
    font-size: 0.85rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    background-color: var(--bg-tertiary);
    padding: 1rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
}

.processing-logs li {
    font-weight: 500;
}

.log-done {
    color: var(--success-color);
}

.log-active {
    color: var(--accent-color);
    font-weight: 600;
}

.log-pending {
    color: var(--text-muted);
}

/* State 4: Done - Player & Transcript */
.simulated-player {
    background-color: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1rem;
    margin-bottom: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.player-controls {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.player-btn-play {
    background-color: var(--primary-color);
    color: #ffffff;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    padding-left: 2px;
}

.player-btn-play:hover {
    background-color: var(--primary-hover);
    transform: scale(1.05);
}

.player-time {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-secondary);
    font-variant-numeric: tabular-nums;
}

.player-slider {
    flex: 1;
    -webkit-appearance: none;
    appearance: none;
    height: 6px;
    border-radius: var(--radius-sm);
    background: var(--border-color);
    outline: none;
}

.player-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--primary-color);
    cursor: pointer;
    transition: transform var(--transition-fast);
}

.player-slider::-webkit-slider-thumb:hover {
    transform: scale(1.2);
}

.player-compliance-note {
    font-size: 0.725rem;
    font-weight: 500;
    border-top: 1px solid var(--border-color);
    padding-top: 0.5rem;
    margin-top: 0.25rem;
}

.transcript-viewer {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    height: calc(100% - 110px);
}

.transcript-viewer h5 {
    font-size: 0.8rem;
    color: var(--text-secondary);
    letter-spacing: 0.05em;
}

.transcript-content {
    flex: 1;
    overflow-y: auto;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 1rem;
    background-color: var(--bg-primary);
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.transcript-line {
    font-size: 0.875rem;
    line-height: 1.5;
    padding: 0.5rem;
    border-radius: var(--radius-sm);
    border: 1px solid transparent;
}

.transcript-line.highlight {
    background-color: var(--primary-light);
    border-color: var(--border-color);
    box-shadow: var(--shadow-sm);
}

.timestamp-btn {
    background-color: var(--bg-tertiary);
    color: var(--accent-color);
    font-weight: 600;
    font-size: 0.75rem;
    padding: 0.1rem 0.4rem;
    border-radius: 4px;
    margin-right: 0.4rem;
    border: 1px solid var(--border-color);
}

.timestamp-btn:hover {
    background-color: var(--accent-light);
    border-color: var(--accent-color);
}

.speaker-label {
    font-weight: 600;
    color: var(--text-primary);
}

/* C-065: segment có confidence thấp (Deepgram) -> viền cảnh báo + hover xem % (title). */
.transcript-line.line-confidence-low {
    border-color: var(--warning-color);
    background-color: var(--warning-light);
}

/* ==========================================================================
   RIGHT COLUMN: SOAP NOTE PANEL
   ========================================================================== */
.editor-actions {
    display: flex;
    gap: 0.5rem;
}

.btn-icon {
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    width: 32px;
    height: 32px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
}

.btn-icon:hover:not(:disabled) {
    background-color: var(--bg-tertiary);
    color: var(--text-primary);
    border-color: var(--text-muted);
}

.btn-icon:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.ai-tip-box {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 0.5rem 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-bottom: 0.75rem;
}

.tip-icon {
    font-size: 1.1rem;
}

.tip-text {
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.soap-inputs-container {
    flex: 1;
    overflow-y: auto;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem 1rem;
    padding: 1rem;
}

.soap-field-group {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    border-radius: var(--radius-sm);
    border: 1px solid transparent;
    transition: all var(--transition-normal);
}

.soap-field-group.highlight-border {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px var(--primary-light);
}

.field-label {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.field-icon {
    color: var(--primary-color);
    font-size: 1rem;
}

.field-label h5 {
    font-size: 0.8rem;
    letter-spacing: 0.03em;
    font-weight: 700;
    color: var(--primary-color);
}

.field-sublabel {
    font-weight: 500;
    color: var(--text-secondary);
    font-size: 0.725rem;
    text-transform: none;
    letter-spacing: normal;
    margin-left: 0.25rem;
    opacity: 0.85;
}

.soap-textarea {
    width: 100%;
    min-height: 150px;
    height: auto;
    resize: none;
    overflow: hidden;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 0.75rem 0.85rem;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    font-size: 0.825rem;
    line-height: 1.45;
}

.soap-textarea:focus:not(:disabled) {
    border-color: var(--accent-color);
    background-color: var(--bg-secondary);
    box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.15);
}

.soap-textarea:disabled {
    background-color: var(--bg-tertiary);
    color: var(--text-secondary);
    cursor: not-allowed;
    border-color: var(--border-color);
}

body.dark .soap-textarea:disabled {
    background-color: #1e293b;
    border-color: #334155;
    color: #94a3b8;
}

/* Locked read-only state for Approved files */
.soap-field-group.locked .soap-textarea {
    background-color: var(--bg-tertiary);
    cursor: not-allowed;
}

/* SOAP Toolbar */
.soap-bottom-toolbar {
    border-top: 1px solid var(--border-color);
    padding: 1.25rem 1rem;
    margin-top: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.soap-actions-right {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.soap-bottom-toolbar .btn-secondary,
.soap-bottom-toolbar .btn-accent {
    min-width: 140px;
    padding: 0.75rem 1.5rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.soap-bottom-toolbar #approve-btn.btn-accent:not(:disabled) {
    background-color: var(--primary-teal);
    border-color: var(--primary-teal);
    color: #ffffff;
    box-shadow: 0 10px 24px rgba(20, 184, 166, 0.26);
}

.soap-bottom-toolbar #approve-btn.btn-accent:hover:not(:disabled) {
    background-color: var(--primary-teal-hover);
    border-color: var(--primary-teal-hover);
    color: #ffffff;
    box-shadow: 0 14px 30px rgba(13, 148, 136, 0.3);
}

.btn-secondary {
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    color: var(--primary-color);
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    border-radius: var(--radius-sm);
}

.btn-secondary:hover {
    background-color: var(--primary-light);
    border-color: var(--primary-color);
    color: var(--primary-hover);
}

.autosave-status {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.autosave-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background-color: var(--success-color);
    display: inline-block;
}

.autosave-text {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 500;
}

/* ==========================================================================
   MODAL OVERLAY (APPROVE CONFIRM DIALOG)
   ========================================================================== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(4px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn var(--transition-fast);
}

.modal-card {
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    width: 90%;
    max-width: 640px;
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    animation: scaleUp var(--transition-normal);
}

body.modal-open {
    overflow: hidden;
}

.password-modal-overlay {
    background: rgba(15, 23, 42, 0.4);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 1300;
    padding: 1rem;
}

.modal-box {
    width: 100%;
    max-width: 450px;
    padding: 32px;
    border-radius: 16px;
    border: 1px solid #e2e8f0;
    background: #ffffff;
    box-shadow: 0 20px 60px rgba(15, 23, 42, 0.18);
    animation: scaleUp var(--transition-normal);
}

.password-modal-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.password-modal-header h3 {
    margin: 0;
    color: var(--text-primary);
    font-family: var(--font-heading);
    font-size: 1.35rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    line-height: 1.2;
}

.modal-close-btn {
    width: 34px;
    height: 34px;
    border: 0;
    border-radius: 50%;
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    font-size: 1.35rem;
    line-height: 1;
    cursor: pointer;
    transition: background-color var(--transition-fast), color var(--transition-fast);
}

.modal-close-btn:hover {
    background: #f1f5f9;
    color: var(--primary-teal-hover);
}

.password-modal-form {
    display: flex;
    flex-direction: column;
    gap: 1.4rem;
}

.password-modal-form .form-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}

.password-modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    margin-top: 0;
}

body.dark .modal-box {
    background: var(--bg-secondary);
    border-color: var(--border-color);
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.42);
}

body.dark .modal-close-btn:hover {
    background: rgba(20, 184, 166, 0.12);
}

.modal-header {
    background-color: var(--bg-tertiary);
    padding: 1.25rem 2rem;
    border-bottom: 1px solid var(--border-color);
}

.modal-header h4 {
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    color: var(--text-primary);
}

.modal-body {
    padding: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.modal-intro {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.modal-patient-box {
    background-color: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 1rem;
    display: flex;
    justify-content: center;
}

.modal-patient-ref {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.35rem;
    color: var(--primary-color);
}

.modal-security-warning {
    background-color: var(--danger-light);
    border: 1px solid rgba(220, 38, 38, 0.15);
    border-radius: var(--radius-sm);
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.modal-security-warning h5 {
    color: var(--danger-color);
    font-size: 0.85rem;
    font-weight: 700;
}

.modal-security-warning ol {
    padding-left: 1.2rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.modal-security-warning li {
    font-size: 0.825rem;
    line-height: 1.4;
    color: var(--text-primary);
}

.modal-footer {
    padding: 1.25rem 2rem;
    background-color: var(--bg-tertiary);
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
}

/* Toast styling */
.toast-container {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    z-index: 1100;
}

.toast {
    background-color: var(--bg-secondary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    padding: 0.75rem 1.25rem;
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-md);
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 0.875rem;
    font-weight: 500;
    min-width: 250px;
    border-left: 4px solid var(--accent-color);
    animation: slideIn var(--transition-normal);
}

.toast.success {
    border-left-color: var(--success-color);
}

.toast.danger {
    border-left-color: var(--danger-color);
}

.toast.warning {
    border-left-color: var(--warning-color);
}

/* ==========================================================================
   CSS ANIMATIONS
   ========================================================================== */
@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes slideDown {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }

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

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }

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

@keyframes scaleUp {
    from {
        transform: scale(0.95);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

@keyframes pulse {
    0% {
        opacity: 0.4;
    }

    50% {
        opacity: 1;
    }

    100% {
        opacity: 0.4;
    }
}

@keyframes bounce {

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

    50% {
        transform: translateY(-5px);
    }
}

/* ==========================================================================
   PATIENT DETAILS PANEL (SOAP NOTE PANEL) - COMPACT INLINE VIEW
   ========================================================================== */
.patient-info-card.compact {
    background-color: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 0.75rem 1rem;
    margin: 0.75rem 1rem;
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-normal);
}

body.dark .patient-info-card.compact {
    background-color: var(--bg-tertiary);
}

.patient-info-banner {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--warning-color);
    font-size: 0.85rem;
    font-weight: 600;
}

.patient-info-rows {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.patient-info-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem 1.75rem;
    border-bottom: 1px dashed var(--border-color);
    padding: 0.35rem 0;
}

body.dark .patient-info-row {
    border-bottom-color: #334155;
}

.patient-info-row:first-child {
    padding-top: 0;
}

.patient-info-row:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.info-item-inline {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.775rem;
}

.info-label {
    font-size: 0.725rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.info-value {
    font-size: 0.775rem;
    color: var(--text-primary);
    font-weight: 600;
}

.font-bold {
    font-weight: 700;
    color: var(--primary-color);
}

.font-highlight {
    font-weight: 700;
    color: var(--accent-color);
}

.font-mono {
    font-family: monospace;
    font-size: 0.75rem;
    letter-spacing: 0.02em;
}

/* ==========================================================================
   FOOTER SECTION
   ========================================================================== */
.app-footer {
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding: 4rem 2rem 1.5rem;
    margin-top: auto;
    background-color: var(--dark-slate);
    color: #ffffff;
    width: 100%;
}

body.dark .app-footer {
    background-color: var(--dark-slate);
    border-top-color: rgba(255, 255, 255, 0.08);
}

.footer-grid {
    width: 100%;
    max-width: 1180px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1.45fr repeat(4, 1fr);
    gap: 30px;
}

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

.footer-grid h4 {
    color: #ffffff;
    margin-bottom: 14px;
    font-size: 0.8rem;
    font-family: var(--font-heading);
    font-weight: 700;
    letter-spacing: 0.01em;
    text-transform: none;
}

.footer-grid p,
.footer-grid a {
    display: block;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 10px;
    font-size: 0.9rem;
    text-decoration: none;
    position: relative;
    transition: color var(--transition-fast), padding-left var(--transition-fast);
}

.footer-grid a::before {
    content: "";
    position: absolute;
    left: 0;
    top: 50%;
    width: 0;
    height: 1px;
    background-color: rgba(255, 255, 255, 0.7);
    transform: translateY(-50%);
    transition: width var(--transition-fast);
}

.footer-grid a:hover {
    color: #ffffff;
    padding-left: 14px;
}

.footer-grid a:hover::before {
    width: 8px;
}

.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    color: #ffffff;
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: 800;
    text-decoration: none;
    margin-bottom: 1rem;
}

.footer-brand-mark {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    flex-shrink: 0;
    object-fit: cover;
    background-color: #ffffff;
}

.footer-brand-block p {
    max-width: 360px;
    line-height: 1.7;
}

.footer-bottom {
    width: 100%;
    max-width: 1180px;
    margin: 2.75rem auto 0;
    padding-top: 1.25rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    color: rgba(255, 255, 255, 0.55);
    font-size: 0.82rem;
}

@media (max-width: 768px) {
    .footer-bottom {
        flex-direction: column;
        gap: 0.35rem;
    }
}

/* ==========================================================================
   DASHBOARD SEARCH, FILTERS & PAGINATION
   ========================================================================== */
.dashboard-filters {
    display: flex;
    align-items: flex-end;
    justify-content: flex-end;
    gap: 0.65rem;
    padding: 0;
    background-color: transparent;
    border-bottom: 0;
    flex-wrap: wrap;
}

.filter-group {
    display: flex;
    flex-direction: column;
}

.filter-group input,
.filter-group select {
    min-height: 38px;
    padding: 0.55rem 0.85rem;
    border-radius: 999px;
    border: 1px solid var(--border-color);
    background-color: var(--bg-primary);
    color: var(--text-primary);
    font-size: 0.875rem;
    font-weight: 500;
    transition: all var(--transition-fast);
}

.filter-group input {
    min-width: 220px;
}

.filter-group select {
    min-width: 170px;
}

.filter-group input:focus,
.filter-group select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px var(--primary-light);
    background-color: var(--bg-secondary);
}

/* Gộp filter-date-from/filter-date-to thành 1 pill "date-range" — dấu → tự nói rõ trái=từ ngày,
   phải=đến ngày, thay vì thêm label chữ (sẽ lệch với 4 ô filter còn lại vốn không có label). */
.date-range-input {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    min-height: 38px;
    padding: 0.35rem 0.7rem;
    border-radius: 999px;
    border: 1px solid var(--border-color);
    background-color: var(--bg-primary);
    transition: all var(--transition-fast);
}

.date-range-input:focus-within {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px var(--primary-light);
    background-color: var(--bg-secondary);
}

.date-range-input input[type="date"] {
    min-height: auto;
    min-width: 0;
    flex: 1;
    border: none;
    background: transparent;
    padding: 0;
    border-radius: 0;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-primary);
}

.date-range-input input[type="date"]:focus {
    background: transparent;
    box-shadow: none;
}

.date-range-sep {
    color: var(--text-muted);
    font-size: 0.8rem;
    flex-shrink: 0;
}

.btn-clear-filters {
    background-color: #f8fafc;
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
    min-height: 38px;
    padding: 0.55rem 1rem;
    font-weight: 600;
    font-size: 0.85rem;
    border-radius: 999px;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.btn-clear-filters:hover,
.btn-clear-filters:focus-visible {
    background-color: var(--border-color);
    color: var(--text-primary);
}

.pagination-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 2rem;
    background-color: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    flex-wrap: wrap;
    gap: 1rem;
}

.pagination-info {
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.pagination-buttons {
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.btn-page {
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    min-width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    font-weight: 600;
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
}

.btn-page:hover:not(:disabled):not(.active) {
    background-color: var(--bg-tertiary);
    border-color: var(--text-muted);
}

.btn-page.active {
    background-color: var(--primary-color);
    color: #ffffff;
    border-color: var(--primary-color);
}

.btn-page:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.sessions-table td.cell-stt {
    text-align: center;
    font-weight: 600;
    color: var(--text-secondary);
}

/* ==========================================================================
   LANDING HOMEPAGE STYLING (ClinNote AI Template Align)
   ========================================================================== */
.container {
    width: min(1180px, calc(100% - 40px));
    margin: 0 auto;
}

section {
    padding: 100px 0;
    background-color: var(--bg-primary);
}

@media (max-width: 768px) {
    section {
        padding: 80px 0;
    }
}

.section-title {
    text-align: center;
    max-width: 1140px;
    margin: 0 auto 56px;
}

.section-title h2 {
    font-size: clamp(34px, 4vw, 50px);
    letter-spacing: -0.02em;
    line-height: 1.2;
    margin-bottom: 20px;
    font-weight: 800;
    color: var(--text-primary);
}

.section-title p {
    color: var(--text-secondary);
    font-size: 1.05rem;
    line-height: 1.6;
}

.hero {
    padding: 116px 0 82px;
    width: 100%;
    background:
        linear-gradient(90deg, rgba(255, 255, 255, 0.96) 0%, rgba(255, 255, 255, 0.88) 45%, rgba(255, 255, 255, 0.62) 100%),
        radial-gradient(circle at 78% 28%, rgba(20, 184, 166, 0.18), transparent 34%),
        radial-gradient(circle at 88% 70%, rgba(17, 51, 58, 0.12), transparent 32%),
        linear-gradient(135deg, #f8fafc 0%, #ecfeff 45%, #ffffff 100%);
    position: relative;
    overflow: hidden;
}

body.dark .hero {
    background:
        linear-gradient(90deg, rgba(7, 19, 22, 0.96) 0%, rgba(7, 19, 22, 0.9) 48%, rgba(7, 19, 22, 0.72) 100%),
        radial-gradient(circle at 78% 28%, rgba(45, 212, 191, 0.18), transparent 34%),
        radial-gradient(circle at 88% 70%, rgba(94, 234, 212, 0.1), transparent 32%),
        linear-gradient(135deg, #071316 0%, #0b2024 52%, #102a30 100%);
}

.hero::before {
    content: "";
    position: absolute;
    top: 7%;
    right: 6%;
    width: min(42vw, 520px);
    height: min(42vw, 520px);
    border-radius: 48%;
    background:
        linear-gradient(160deg, rgba(255, 255, 255, 0.18), rgba(20, 184, 166, 0.1)),
        radial-gradient(circle at 42% 28%, rgba(255, 255, 255, 0.9) 0 9%, transparent 10%),
        linear-gradient(135deg, rgba(17, 51, 58, 0.18), rgba(20, 184, 166, 0.2));
    filter: blur(1px);
    opacity: 0.48;
    pointer-events: none;
}

body.dark .hero::before {
    background:
        linear-gradient(160deg, rgba(45, 212, 191, 0.14), rgba(45, 212, 191, 0.06)),
        radial-gradient(circle at 42% 28%, rgba(226, 232, 240, 0.5) 0 9%, transparent 10%),
        linear-gradient(135deg, rgba(94, 234, 212, 0.12), rgba(20, 184, 166, 0.18));
    opacity: 0.34;
}

.hero::after {
    content: "";
    position: absolute;
    inset: auto 0 0;
    height: 120px;
    background: linear-gradient(180deg, transparent, rgba(255, 255, 255, 0.86));
    pointer-events: none;
}

body.dark .hero::after {
    background: linear-gradient(180deg, transparent, var(--bg-primary));
}

.hero-grid {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: 1.05fr 0.95fr;
    gap: 50px;
    align-items: center;
    transition: gap 0.32s ease;
}

.hero.simulator-expanded .hero-grid {
    grid-template-columns: 1fr;
    gap: 2.5rem;
    align-items: start;
}

.eyebrow {
    display: inline-flex;
    padding: 8px 14px;
    border-radius: var(--radius-pill);
    background: var(--accent-light);
    color: var(--accent-hover);
    border: 1px solid rgba(20, 184, 166, 0.22);
    font-weight: 800;
    font-size: 13px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 14px;
}

h1.hero-title {
    font-size: clamp(42px, 5.5vw, 64px);
    line-height: 1.12 !important;
    letter-spacing: -0.02em;
    margin-bottom: 24px !important;
    font-weight: 800 !important;
    color: var(--text-primary) !important;
}

.hero-subtitle {
    font-size: 19px;
    color: var(--text-secondary);
    max-width: 620px;
    margin-bottom: 32px;
    line-height: 1.65;
}

.hero-actions {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.hero-card {
    position: relative;
    background: rgba(255, 255, 255, 0.82);
    border: 1px solid rgba(226, 232, 240, 0.9);
    border-radius: var(--radius-lg);
    padding: 22px;
    box-shadow: 0 24px 60px rgba(17, 51, 58, 0.1);
    overflow: hidden;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    transform-origin: center;
    transition: box-shadow 0.28s ease, border-color 0.28s ease;
}

.hero-card.sim-expanded {
    z-index: 3;
    border-color: rgba(20, 184, 166, 0.38);
    box-shadow: 0 32px 74px rgba(17, 51, 58, 0.18);
}

.hero.simulator-expanded .hero-card.sim-expanded {
    width: 100%;
    max-width: 1120px;
    justify-self: center;
    animation: simulatorFrameDown 0.38s ease both;
}

body.dark .hero-card {
    background: var(--bg-secondary);
    border-color: var(--border-color);
    box-shadow: var(--shadow-sm);
}

body.dark .hero-card.sim-expanded {
    border-color: rgba(45, 212, 191, 0.34);
    box-shadow: 0 28px 70px rgba(0, 0, 0, 0.42);
}

.hero-card::before {
    content: none;
}

body.dark .hero-card::before {
    content: none;
}

.hero-full-video {
    position: relative;
    min-height: calc(100vh - 96px);
    padding: clamp(120px, 18vh, 180px) 0 clamp(80px, 14vh, 140px);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background:
        linear-gradient(135deg, rgba(17, 51, 58, 0.92), rgba(15, 23, 42, 0.86)),
        radial-gradient(circle at 50% 42%, rgba(20, 184, 166, 0.22), transparent 34%);
}

.hero-full-video::before,
.hero-full-video::after {
    content: none;
}

.video-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
    filter: saturate(0.88) contrast(1.02);
}

.video-overlay {
    position: absolute;
    inset: 0;
    z-index: 1;
    background:
        linear-gradient(180deg, rgba(15, 23, 42, 0.48) 0%, rgba(17, 51, 58, 0.5) 44%, rgba(15, 23, 42, 0.62) 100%),
        radial-gradient(circle at center, rgba(20, 184, 166, 0.18), rgba(15, 23, 42, 0.28) 42%, rgba(15, 23, 42, 0.46) 100%);
    pointer-events: none;
}

.hero-content-center {
    position: relative;
    z-index: 2;
    max-width: 980px;
    min-height: 52vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #ffffff;
}

.badge-new {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 16px;
    border-radius: var(--radius-pill);
    background: rgba(255, 255, 255, 0.14);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.28);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 18px;
}

.hero-content-center h1.hero-title {
    max-width: 920px;
    color: #ffffff !important;
    text-shadow: 0 12px 34px rgba(15, 23, 42, 0.34);
}

.hero-content-center .hero-subtitle {
    max-width: 760px;
    margin: 0 auto 34px;
    color: rgba(255, 255, 255, 0.86);
    text-shadow: 0 6px 22px rgba(15, 23, 42, 0.3);
}

.hero-buttons,
.hero-content-center .hero-actions {
    justify-content: center;
}

.btn-work-us {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 50px;
    padding: 0 1.55rem;
    border-radius: var(--radius-pill);
    background: var(--primary-teal);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.22);
    font-weight: 800;
    box-shadow: 0 16px 34px rgba(20, 184, 166, 0.28);
}

.btn-work-us:hover {
    background: var(--primary-teal-hover);
    color: #ffffff;
    transform: translateY(-1px);
    box-shadow: 0 20px 40px rgba(13, 148, 136, 0.32);
}

@keyframes simulatorFrameDown {
    from {
        opacity: 0.92;
        transform: translateY(-1.5rem) scale(0.96);
    }

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

.trust-subbar {
    padding: 0;
    background-color: var(--dark-slate);
    border: none;
}

.trust-subbar-grid {
    min-height: 92px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    align-items: center;
    gap: 0;
}

.trust-subbar-grid div {
    color: #ffffff;
    font-family: var(--font-heading);
    font-size: clamp(1rem, 2vw, 1.45rem);
    font-weight: 700;
    text-align: center;
    padding: 1.25rem;
    border-right: 1px solid rgba(255, 255, 255, 0.16);
}

.trust-subbar-grid div:last-child {
    border-right: none;
}

body.dark.public-header-page {
    background-color: #071316;
}

body.dark.public-header-page .landing-main section:not(.hero-full-video):not(.trust-subbar) {
    background:
        radial-gradient(circle at 50% 0%, rgba(45, 212, 191, 0.08), transparent 32%),
        linear-gradient(180deg, #071316 0%, #081c20 100%) !important;
}

body.dark.public-header-page .landing-main section:nth-of-type(even):not(.hero-full-video):not(.trust-subbar) {
    background:
        radial-gradient(circle at 12% 10%, rgba(45, 212, 191, 0.06), transparent 28%),
        linear-gradient(180deg, #0a2025 0%, #071316 100%) !important;
}

body.dark.public-header-page .trust-subbar {
    background: linear-gradient(180deg, #11333a 0%, #0a252a 100%);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04), inset 0 -1px 0 rgba(45, 212, 191, 0.12);
}

body.dark.public-header-page .trust-subbar-grid div {
    border-right-color: rgba(255, 255, 255, 0.12);
}

body.dark.public-header-page .section-title h2,
body.dark.public-header-page .feature-card h3,
body.dark.public-header-page .module-card h3,
body.dark.public-header-page .difference-card h3,
body.dark.public-header-page .blog-card h3,
body.dark.public-header-page .path-card h3 {
    color: #f8fafc;
}

body.dark.public-header-page .section-title p,
body.dark.public-header-page .feature-card p,
body.dark.public-header-page .module-card li,
body.dark.public-header-page .difference-card p,
body.dark.public-header-page .blog-card p,
body.dark.public-header-page .path-card p {
    color: rgba(226, 232, 240, 0.82);
}

body.dark.public-header-page .module-card,
body.dark.public-header-page .path-card,
body.dark.public-header-page .difference-card,
body.dark.public-header-page .blog-card,
body.dark.public-header-page .feature-card {
    background: rgba(12, 39, 44, 0.86);
    border-color: rgba(94, 234, 212, 0.14);
    box-shadow: 0 18px 42px rgba(0, 0, 0, 0.22);
}

body.dark.public-header-page .module-card:hover,
body.dark.public-header-page .path-card:hover,
body.dark.public-header-page .difference-card:hover,
body.dark.public-header-page .blog-card:hover,
body.dark.public-header-page .feature-card:hover {
    border-color: rgba(45, 212, 191, 0.45);
    box-shadow: 0 22px 48px rgba(0, 0, 0, 0.32), 0 0 0 1px rgba(45, 212, 191, 0.08);
}

.feature-grid,
.steps-grid,
.blog-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 22px;
}

.difference-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

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

    .hero {
        padding: 54px 0 32px;
    }

    .hero-full-video {
        min-height: calc(100vh - 96px);
        padding: 112px 0 72px;
    }

    .hero-card.sim-expanded .simulator-container {
        height: 480px;
    }

    .feature-grid,
    .steps-grid,
    .blog-grid,
    .difference-grid {
        grid-template-columns: 1fr;
    }
}

.feature-card {
    padding: 28px;
    text-align: center;
}

.feature-icon {
    font-size: 2.5rem;
    margin-bottom: 1.25rem;
    display: inline-flex;
    color: var(--primary-color);
}

.feature-card h3 {
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
}

.feature-card p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.5;
}


/* ClinNote AI Core Components Styling from Template */
.panel,
.module-card,
.path-card,
.difference-card,
.blog-card,
.feature-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    transition: transform var(--transition-normal), box-shadow var(--transition-normal), border-color var(--transition-normal);
}

body.dark .panel,
body.dark .module-card,
body.dark .path-card,
body.dark .difference-card,
body.dark .blog-card,
body.dark .feature-card {
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

/* Unified Card Hover Micro-interactions */
.module-card:hover,
.path-card:hover,
.difference-card:hover,
.blog-card:hover,
.feature-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-md);
    border-color: #cbd5e1;
}

body.dark .module-card:hover,
body.dark .path-card:hover,
body.dark .difference-card:hover,
body.dark .blog-card:hover,
body.dark .feature-card:hover {
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.4), 0 4px 12px rgba(0, 0, 0, 0.15);
    border-color: var(--primary-color);
}

.panel {
    padding: 18px;
}

.panel h3 {
    margin-bottom: 10px;
    font-family: var(--font-heading);
    color: var(--text-primary);
}

.panel p {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.metric-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.metric {
    background: var(--bg-tertiary);
    border-radius: var(--radius-sm);
    padding: 16px;
    text-align: center;
}

.metric strong {
    display: block;
    font-size: 24px;
    color: var(--primary-color);
}

.metric span {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.modules {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 22px;
}

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

.module-card {
    padding: 28px;
}

.module-card .icon {
    display: inline-flex;
    padding: 6px 12px;
    background-color: var(--accent-light);
    color: var(--accent-hover);
    border: 1px solid rgba(20, 184, 166, 0.18);
    border-radius: var(--radius-sm);
    font-weight: 800;
    font-size: 11px;
    letter-spacing: 0.05em;
    margin-bottom: 14px;
    width: fit-content;
}

.module-card h3 {
    margin-bottom: 10px;
    font-size: 22px;
    color: var(--text-primary);
}

.module-card ul {
    list-style: none;
    display: grid;
    gap: 8px;
    margin-top: 12px;
}

.module-card li {
    font-size: 0.9rem;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
}

.module-card li::before {
    content: "✓";
    color: var(--primary-color);
    font-weight: 900;
    margin-right: 8px;
}

.work-block {
    background: var(--bg-tertiary);
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}

body.dark .work-block {
    background: var(--bg-tertiary);
    border-top-color: var(--border-color);
    border-bottom-color: var(--border-color);
}

.two-cards {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

@media (max-width: 768px) {
    .two-cards {
        grid-template-columns: 1fr;
    }
}

.path-card {
    min-height: 300px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 28px;
}

.path-card h3 {
    font-size: 32px;
    letter-spacing: -0.02em;
    margin-bottom: 12px;
    color: var(--text-primary);
}

.path-card p {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.tag {
    width: fit-content;
    background: var(--accent-light);
    color: var(--accent-hover);
    border: 1px solid rgba(20, 184, 166, 0.18);
    padding: 7px 12px;
    border-radius: var(--radius-sm);
    font-weight: 800;
    font-size: 13px;
    margin-bottom: 14px;
}

body.dark .tag {
    background: var(--accent-light);
    color: var(--accent-color);
    border-color: rgba(45, 212, 191, 0.22);
}

.intro {
    background: var(--dark-slate);
    color: white;
    border-radius: var(--radius-lg);
    padding: 44px;
    display: grid;
    grid-template-columns: 0.85fr 1.15fr;
    gap: 36px;
    align-items: center;
    box-shadow: var(--shadow-md);
    margin-top: 34px;
}

@media (max-width: 768px) {
    .intro {
        grid-template-columns: 1fr;
        padding: 28px;
    }
}

.avatar {
    aspect-ratio: 1;
    border-radius: var(--radius-lg);
    background:
        radial-gradient(circle at 35% 30%, rgba(20, 184, 166, 0.3) 0 13%, transparent 14%),
        linear-gradient(135deg, #f8fafc, #ccfbf1);
    border: 1px solid rgba(255, 255, 255, 0.28);
}

.intro h2 {
    font-size: 40px;
    line-height: 1.1;
    margin-bottom: 16px;
    color: #ffffff;
    letter-spacing: -0.02em;
}

.intro p {
    color: #d7eee9;
    font-size: 18px;
}

.steps-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
    margin-top: 3.5rem;
    position: relative;
}

/* Horizontal connecting process line */
.steps-grid::before {
    content: '';
    position: absolute;
    top: 24px; /* Center aligned with 48px circle height */
    left: 10%;
    right: 10%;
    height: 2px;
    background: linear-gradient(90deg, var(--primary-light), var(--primary-color), var(--primary-light));
    z-index: 0;
    opacity: 0.6;
}

@media (max-width: 768px) {
    .steps-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    .steps-grid::before {
        display: none; /* Hide connecting line on stacked mobile layout */
    }
}

.step {
    background: none !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    transition: transform var(--transition-normal);
}

.step:hover {
    transform: translateY(-4px);
}

.step h3 {
    margin-bottom: 10px;
    font-size: 21px;
    color: var(--text-primary);
}

.step p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.5;
    max-width: 320px;
}

.step-number {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background-color: var(--bg-secondary);
    border: 2px solid var(--border-color);
    display: grid;
    place-items: center;
    color: var(--text-secondary);
    font-weight: 900;
    margin-bottom: 18px;
    font-size: 1.1rem;
    z-index: 2;
    transition: all var(--transition-normal);
}

.step:hover .step-number {
    transform: scale(1.15);
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: #ffffff;
    box-shadow: 0 0 15px var(--primary-light);
}

.difference-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

@media (max-width: 900px) {
    .difference-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

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

.difference-card {
    padding: 24px;
}

.difference-card h3 {
    font-size: 21px;
    margin-bottom: 10px;
    color: var(--text-primary);
}

.difference-card p {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/*.testimonial block styling */
.testimonial {
    background: var(--dark-slate);
    color: white;
    border-radius: var(--radius-lg);
    padding: 48px 40px;
    box-shadow: var(--shadow-md);
    text-align: center;
    max-width: 900px;
    margin: 0 auto;
}

.testimonial p {
    font-size: 24px;
    line-height: 1.45;
    margin-bottom: 20px;
    color: #ffffff;
    font-style: italic;
}

.testimonial span {
    opacity: 0.84;
    font-weight: 700;
    font-size: 0.95rem;
}

.blog-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 22px;
}

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

.blog-card {
    padding: 28px;
    overflow: hidden;
}

.blog-card h3 {
    margin-bottom: 10px;
    font-size: 20px;
    color: var(--text-primary);
}

.blog-card p {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.blog-thumb {
    height: 150px;
    border-radius: var(--radius-md);
    background: linear-gradient(135deg, #f8fafc 0%, #ccfbf1 100%);
    border: 1px solid var(--border-color);
    margin-bottom: 18px;
    transition: transform var(--transition-normal);
}

body.dark .blog-thumb {
    background: linear-gradient(135deg, rgba(15, 159, 143, 0.2) 0%, rgba(56, 189, 248, 0.15) 100%);
}

.blog-card:hover .blog-thumb {
    transform: scale(1.04);
}

/* Background Glow Blobs */
.glow-blob {
    display: none;
}

.glow-1 {
    top: 10%;
    left: -150px;
}

.glow-2 {
    top: 45%;
    right: -150px;
}

/* Premium Card Overlay */
.premium-card {
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    transition: border-color var(--transition-normal), box-shadow var(--transition-normal);
    background: var(--bg-secondary);
}

body.dark .premium-card {
    box-shadow: 0 20px 40px -15px rgba(0, 0, 0, 0.4);
    border-color: var(--border-color);
}

.mockup-title-text {
    font-size: 0.75rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.35);
    margin-left: auto;
    font-family: var(--font-sans);
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

/* Simulator Container & Screen System */
.simulator-container {
    height: 330px;
    display: flex;
    flex-direction: column;
    position: relative;
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.85) 0%, rgba(15, 23, 42, 0.9) 100%);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #ffffff;
    font-family: var(--font-sans);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.25);
    transition: height 0.28s ease;
}

.hero-card.sim-expanded .simulator-container {
    height: 560px;
}

body.dark .simulator-container {
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.9) 0%, rgba(9, 13, 22, 0.95) 100%);
    border-color: rgba(255, 255, 255, 0.05);
}

.simulator-screen {
    display: none;
    flex: 1;
    padding: 1.25rem 1.5rem;
    flex-direction: column;
    overflow: hidden;
    animation: fadeIn 0.35s ease-out forwards;
}

.simulator-screen.active {
    display: flex;
}

.sim-ready-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
}

.sim-icon-glow {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--accent-light);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
    border: 1px solid rgba(20, 184, 166, 0.24);
    box-shadow: var(--shadow-sm);
}

.sim-steps {
    display: flex;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    background-color: rgba(255, 255, 255, 0.02);
    padding: 0.5rem 1.25rem;
    justify-content: space-between;
    font-size: 0.725rem;
}

body.dark .sim-steps {
    border-bottom-color: rgba(255, 255, 255, 0.05);
}

.sim-step {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    color: rgba(255, 255, 255, 0.3);
    font-weight: 500;
}

.sim-step.active {
    color: var(--primary-color);
    font-weight: 600;
}

.sim-step.completed {
    color: var(--success-color);
}

.step-num {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 1px solid currentColor;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.65rem;
    font-weight: 700;
}

.step-text {
    white-space: nowrap;
}

/* Recording Screen Waveform & Layout */
.sim-recording-layout {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    gap: 0.6rem;
}

.mic-wave-container {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    margin-bottom: 0.25rem;
}

.mic-icon-pulsing {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background-color: var(--danger-color);
    display: flex;
    align-items: center;
    justify-content: center;
    animation: pulse-red-ring 1.5s infinite;
    box-shadow: 0 0 15px rgba(220, 38, 38, 0.4);
}

@keyframes pulse-red-ring {
    0% {
        box-shadow: 0 0 0 0 rgba(220, 38, 38, 0.4);
    }

    70% {
        box-shadow: 0 0 0 10px rgba(220, 38, 38, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(220, 38, 38, 0);
    }
}

.waveform-bars {
    display: flex;
    align-items: center;
    gap: 3px;
    height: 36px;
}

.waveform-bars .bar {
    width: 4px;
    height: 6px;
    background-color: var(--danger-color);
    border-radius: 2px;
    animation: soundWave 1.2s ease-in-out infinite alternate;
}

.waveform-bars .bar-1 {
    height: 10px;
    animation-delay: 0.1s;
}

.waveform-bars .bar-2 {
    height: 20px;
    animation-delay: 0.3s;
}

.waveform-bars .bar-3 {
    height: 32px;
    animation-delay: 0.5s;
}

.waveform-bars .bar-4 {
    height: 16px;
    animation-delay: 0.2s;
}

.waveform-bars .bar-5 {
    height: 26px;
    animation-delay: 0.4s;
}

.waveform-bars .bar-6 {
    height: 8px;
    animation-delay: 0.6s;
}

.waveform-bars .bar-7 {
    height: 30px;
    animation-delay: 0.15s;
}

.waveform-bars .bar-8 {
    height: 12px;
    animation-delay: 0.35s;
}

@keyframes soundWave {
    0% {
        transform: scaleY(0.35);
    }

    100% {
        transform: scaleY(1.1);
    }
}

.sim-state-badge {
    font-size: 0.75rem;
    color: var(--danger-color);
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.sim-timer {
    font-size: 1.35rem;
    font-family: monospace;
    font-weight: 700;
    color: #e2e8f0;
}

.speech-ticker {
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 400px;
    text-align: center;
}

.ticker-bubble {
    background-color: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 0.35rem 0.85rem;
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
    color: #cbd5e1;
    width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Transcript & SOAP Styling */
.transcript-layout,
.soap-layout {
    display: flex;
    flex-direction: column;
    height: 100%;
    gap: 0.6rem;
}

.sim-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding-bottom: 0.4rem;
}

.sim-header-row h4 {
    color: #f8fafc;
    font-size: 0.9rem;
    font-family: var(--font-heading);
}

.transcript-scroll {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding-right: 0.25rem;
}

.transcript-bubble {
    padding: 0.45rem 0.65rem;
    border-radius: var(--radius-sm);
    max-width: 85%;
    font-size: 0.775rem;
    line-height: 1.4;
}

.transcript-bubble.doctor {
    background-color: rgba(20, 184, 166, 0.12);
    border: 1px solid rgba(20, 184, 166, 0.2);
    color: #ccfbf1;
    align-self: flex-start;
}

.transcript-bubble.patient {
    background-color: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.07);
    color: #cbd5e1;
    align-self: flex-end;
}

.speaker-tag {
    font-weight: 700;
    font-size: 0.675rem;
    display: block;
    margin-bottom: 0.15rem;
    opacity: 0.75;
}

.bubble-text {
    margin: 0;
}

.btn-sim-next {
    align-self: flex-end;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    padding: 0.45rem 1.1rem;
    margin-top: 0.25rem;
}

/* SOAP Tabs */
.soap-tabs {
    display: flex;
    gap: 3px;
    background-color: rgba(255, 255, 255, 0.04);
    padding: 3px;
    border-radius: var(--radius-sm);
}

.soap-tab {
    flex: 1;
    background: none;
    border: none;
    color: #94a3b8;
    padding: 0.3rem 0;
    font-size: 0.775rem;
    font-weight: 600;
    border-radius: 4px;
    transition: all var(--transition-fast);
}

.soap-tab:hover {
    color: #f8fafc;
}

.soap-tab.active {
    background-color: var(--primary-color);
    color: #ffffff;
}

.soap-content-viewer {
    flex: 1;
    background-color: rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: var(--radius-sm);
    padding: 0.6rem 0.8rem;
    overflow-y: auto;
}

.soap-tab-pane {
    display: none;
    flex-direction: column;
    gap: 0.35rem;
}

.soap-tab-pane.active {
    display: flex;
}

.bullet-item {
    font-size: 0.775rem;
    color: #e2e8f0;
    line-height: 1.4;
    margin: 0;
}

.sim-action-row {
    display: flex;
    align-items: center;
    height: 32px;
}

.thinking-indicator {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    color: var(--primary-color);
    font-size: 0.75rem;
    font-weight: 500;
}

/* Safe Approval Layout */
.sim-approve-layout {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    padding: 0 1rem;
}

.padlock-badge {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background-color: rgba(217, 119, 6, 0.12);
    border: 1px solid rgba(217, 119, 6, 0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.75rem;
    box-shadow: 0 0 15px rgba(217, 119, 6, 0.12);
}

.sim-compliance-desc {
    font-size: 0.8rem;
    color: #cbd5e1;
    text-align: center;
    line-height: 1.5;
    background-color: rgba(217, 119, 6, 0.04);
    border: 1px dashed rgba(217, 119, 6, 0.18);
    padding: 0.6rem 0.85rem;
    border-radius: var(--radius-sm);
    max-width: 350px;
}

.sim-complete-layout {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
}

.success-checkmark-glow {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background-color: var(--success-color);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
    box-shadow: 0 0 20px rgba(22, 163, 74, 0.35);
    animation: scale-up-bounce 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes scale-up-bounce {
    0% {
        transform: scale(0.6);
        opacity: 0;
    }

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

/* Metrics Section */
.landing-metrics {
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
    background-color: var(--bg-secondary);
    padding: 2.25rem 0;
    position: relative;
}

.landing-metrics .metrics-grid {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-around;
    align-items: center;
    flex-wrap: wrap;
    gap: 2rem;
    padding: 0 2rem;
}

.metric-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    min-width: 180px;
}

.metric-value {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--primary-color);
    line-height: 1.1;
    margin-bottom: 0.25rem;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.landing-metrics .metric-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.metric-divider {
    width: 1px;
    height: 40px;
    background-color: var(--border-color);
}

/* Features Layout Adjustments */
.features-header {
    margin-bottom: 3.5rem;
}

/* CTA Centered Card Banner styling */
.cta {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 48px 40px;
    text-align: center;
    max-width: 800px;
    margin: 2rem auto 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1.25rem;
    box-shadow: var(--shadow-sm);
    position: relative;
    overflow: hidden;
    transition: transform var(--transition-normal), box-shadow var(--transition-normal);
}

body.dark .cta {
    background: var(--bg-secondary);
    border-color: var(--border-color);
    box-shadow: var(--shadow-sm);
}

.cta h2 {
    font-size: clamp(26px, 3.5vw, 36px);
    font-family: var(--font-heading);
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1.2;
    margin: 0;
}

.cta p {
    font-size: 1.05rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0;
    line-height: 1.6;
}

.btn-cta {
    background-color: var(--primary-color);
    color: #ffffff !important;
    border: 1px solid var(--primary-color);
    padding: 12px 32px;
    border-radius: var(--radius-sm);
    font-weight: 800;
    font-size: 15px;
    letter-spacing: 0;
    text-transform: uppercase;
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-normal);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: fit-content;
    margin-top: 0.5rem;
    cursor: pointer;
}

.btn-cta:hover {
    background-color: var(--primary-hover);
    border-color: var(--primary-hover);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-cta:active {
    transform: translateY(-1px);
}

/* Animations */
.animate-pulse-slow {
    animation: pulseSlow 3s infinite;
}

@keyframes pulseSlow {

    0%,
    100% {
        opacity: 1;
        transform: scale(1);
    }

    50% {
        opacity: 0.85;
        transform: scale(0.97);
    }
}

.animate-slideUp {
    animation: slideUp 0.3s ease-out forwards;
}

@keyframes slideUp {
    0% {
        transform: translateY(12px);
        opacity: 0;
    }

    100% {
        transform: translateY(0);
        opacity: 1;
    }
}

@media (max-width: 768px) {
    .metric-divider {
        display: none;
    }

    .landing-metrics .metrics-grid {
        flex-direction: column;
        gap: 2rem;
    }

    .landing-cta-banner {
        padding: 3rem 1.5rem;
    }
}

/* ==========================================================================
   MARKETING SUBPAGES: ABOUT, CAREERS, PRIVACY
   ========================================================================== */
.page-main {
    width: 100%;
    background-color: var(--bg-primary);
}

.page-hero {
    padding: 88px 0 72px;
    background-color: var(--bg-primary);
    border-bottom: 1px solid var(--border-color);
}

.page-hero.narrow {
    padding-bottom: 54px;
}

.page-kicker {
    display: inline-flex;
    align-items: center;
    padding: 0.45rem 0.7rem;
    border-radius: var(--radius-sm);
    background-color: var(--accent-light);
    color: var(--accent-hover);
    border: 1px solid rgba(20, 184, 166, 0.18);
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 1.25rem;
}

.page-title {
    max-width: 840px;
    color: var(--text-primary);
    font-family: var(--font-heading);
    font-size: clamp(2.35rem, 5vw, 4.75rem);
    font-weight: 800;
    letter-spacing: -0.02em;
    line-height: 1.05;
    margin-bottom: 1.25rem;
}

.page-lede {
    max-width: 720px;
    color: var(--text-secondary);
    font-size: 1.08rem;
    line-height: 1.7;
}

.page-section {
    padding: 84px 0;
    background-color: var(--bg-primary);
}

.page-section.alt {
    background-color: var(--bg-tertiary);
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}

.page-section-header {
    max-width: 720px;
    margin-bottom: 2.75rem;
}

.page-section-header.center {
    margin-left: auto;
    margin-right: auto;
    text-align: center;
}

.page-section-header h2 {
    color: var(--text-primary);
    font-family: var(--font-heading);
    font-size: clamp(2rem, 3vw, 3rem);
    font-weight: 800;
    letter-spacing: -0.02em;
    line-height: 1.15;
    margin-bottom: 0.85rem;
}

.page-section-header p {
    color: var(--text-secondary);
    font-size: 1rem;
    line-height: 1.7;
}

.split-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.5rem;
}

.plain-card,
.team-card-simple,
.value-card-simple {
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-sm);
}

.plain-card,
.value-card-simple {
    padding: 1.5rem;
}

.plain-card h3,
.value-card-simple h3,
.team-card-simple h3 {
    color: var(--text-primary);
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: 800;
    margin-bottom: 0.6rem;
}

.plain-card p,
.value-card-simple p,
.team-card-simple p {
    color: var(--text-secondary);
    line-height: 1.65;
}

.team-grid-simple,
.values-grid-simple {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1rem;
}

.values-grid-simple {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.team-card-simple {
    padding: 1.35rem;
}

.team-avatar-simple {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-sm);
    display: grid;
    place-items: center;
    background-color: var(--primary-color);
    color: #ffffff;
    font-family: var(--font-heading);
    font-weight: 800;
    margin-bottom: 1rem;
}

.team-role {
    color: var(--accent-hover);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    margin-bottom: 0.55rem;
}

.article-layout {
    display: grid;
    grid-template-columns: 260px minmax(0, 1fr);
    gap: 4rem;
    align-items: start;
}

.article-toc {
    position: sticky;
    top: 96px;
    border-left: 1px solid var(--border-color);
    padding-left: 1rem;
}

.article-toc a {
    display: block;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 650;
    padding: 0.45rem 0;
}

.article-toc a:hover {
    color: var(--primary-color);
}

.policy-article {
    max-width: 800px;
}

.policy-article h2 {
    color: var(--text-primary);
    font-family: var(--font-heading);
    font-size: 1.65rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    margin: 2.4rem 0 0.8rem;
}

.policy-article h2:first-child {
    margin-top: 0;
}

.policy-article p,
.policy-article li {
    color: var(--text-secondary);
    font-size: 1rem;
    line-height: 1.72;
}

.policy-article ul {
    padding-left: 1.2rem;
    margin: 0.7rem 0 1.2rem;
}

.page-cta-band {
    background-color: var(--primary-teal);
    color: #ffffff;
    border-radius: var(--radius-sm);
    padding: 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
}

.page-cta-band h2 {
    color: #ffffff;
    font-size: clamp(1.4rem, 3vw, 2.25rem);
    margin-bottom: 0.4rem;
}

.page-cta-band p {
    color: rgba(255, 255, 255, 0.72);
    line-height: 1.6;
}

.page-cta-band .btn {
    background-color: #ffffff;
    color: var(--dark-slate);
    border-color: #ffffff;
}

@media (max-width: 960px) {
    .header-nav {
        display: none;
    }

    .split-grid,
    .article-layout {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

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

    .article-toc {
        position: static;
        border-left: none;
        border-bottom: 1px solid var(--border-color);
        padding: 0 0 1rem;
    }
}

@media (max-width: 640px) {
    .page-hero,
    .page-section {
        padding: 56px 0;
    }

    .team-grid-simple,
    .values-grid-simple {
        grid-template-columns: 1fr;
    }

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

    .header-brand-text .logo-subtitle {
        display: none;
    }
}

/* ==========================================================================
   AUTHENTICATION PAGES (LOGIN/REGISTER)
   ========================================================================== */
.flex-center {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: calc(100vh - 160px);
}

.auth-card {
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 480px;
    box-shadow: var(--shadow-lg);
    overflow: hidden;
}

.auth-card .auth-header {
    padding: 2.5rem 2.5rem 1.5rem 2.5rem;
    text-align: center;
    border-bottom: 1px dashed var(--border-color);
}

.auth-card .auth-header h2 {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.auth-card .auth-header p {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.auth-card .auth-body {
    padding: 2rem 2.5rem;
}

.auth-card .auth-footer {
    padding: 1.5rem 2.5rem 2.5rem 2.5rem;
    text-align: center;
    font-size: 0.9rem;
    color: var(--text-secondary);
    border-top: 1px solid var(--border-color);
    background-color: var(--bg-tertiary);
}

.auth-card .auth-footer a {
    color: var(--primary-color);
    font-weight: 600;
    text-decoration: none;
}

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

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.auth-form .form-group input {
    width: 100%;
    padding: 0.75rem 1.25rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
    background-color: var(--bg-primary);
    color: var(--text-primary);
    font-size: 0.95rem;
    font-weight: 500;
}

.auth-form .form-group input:focus {
    border-color: var(--primary-color);
    background-color: var(--bg-secondary);
    box-shadow: 0 0 0 3px var(--primary-light);
}

.auth-divider {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 1.5rem 0;
    color: var(--text-muted);
    font-size: 0.85rem;
    font-weight: 500;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid var(--border-color);
}

.auth-divider::before {
    margin-right: .75rem;
}

.auth-divider::after {
    margin-left: .75rem;
}

.btn-google-login {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    background-color: var(--bg-secondary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    font-size: 0.95rem;
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-fast);
}

.btn-google-login:hover {
    background-color: var(--bg-tertiary);
    border-color: var(--text-muted);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.demo-accounts-box {
    background-color: var(--primary-light);
    border: 1px dashed var(--border-color);
    border-radius: var(--radius-sm);
    padding: 1rem;
    margin-top: 1.5rem;
    font-size: 0.8rem;
    line-height: 1.5;
}

.demo-accounts-box h5 {
    color: var(--primary-color);
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.demo-accounts-box code {
    background-color: var(--border-color);
    padding: 0.1rem 0.3rem;
    border-radius: 4px;
    font-weight: 600;
}

/* ==========================================================================
   DOCTOR PROFILE PAGE STYLING
   ========================================================================== */
.profile-layout {
    display: grid;
    grid-template-columns: 0.8fr 1.2fr;
    gap: 2rem;
    width: 100%;
}

.profile-sidebar-card {
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 3rem 2rem;
    text-align: center;
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.profile-avatar-circle {
    font-size: 4rem;
    background-color: var(--primary-light);
    color: var(--primary-color);
    width: 110px;
    height: 110px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-md);
    margin-bottom: 1.5rem;
}

.profile-sidebar-card h2 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.summary-badge {
    background-color: var(--accent-light);
    color: var(--accent-color);
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    border: 1px solid rgba(2, 132, 199, 0.15);
    margin-bottom: 2rem;
}

.summary-divider {
    width: 100%;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 1.5rem;
}

.summary-meta-item {
    display: flex;
    justify-content: space-between;
    width: 100%;
    font-size: 0.875rem;
    margin-bottom: 0.75rem;
}

.summary-meta-item .label {
    color: var(--text-secondary);
    font-weight: 500;
}

.summary-meta-item .value {
    color: var(--text-primary);
    font-weight: 600;
}

.profile-details-card {
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.profile-details-card .card-header {
    background-color: var(--bg-tertiary);
    padding: 1.25rem 2rem;
    border-bottom: 1px solid var(--border-color);
}

.profile-details-card .card-header h3 {
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-secondary);
}

.profile-details-card .card-body {
    padding: 2.5rem 2rem;
}

.profile-form {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.25rem 1.5rem;
}

.form-grid .form-group input,
.form-grid .form-group select {
    width: 100%;
    padding: 0.7rem 1rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
    background-color: var(--bg-primary);
    color: var(--text-primary);
    font-size: 0.9rem;
    font-weight: 500;
}

.form-grid .form-group input:focus,
.form-grid .form-group select:focus {
    border-color: var(--primary-color);
    background-color: var(--bg-secondary);
    box-shadow: 0 0 0 3px var(--primary-light);
}

.profile-form-actions {
    display: flex;
    justify-content: flex-end;
}

/* ==========================================================================
   ADMIN LAYOUT STYLING
   ========================================================================== */
.admin-sections-container {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    width: 100%;
}

/* ==========================================================================
   RESPONSIVE MEDIA QUERIES
   ========================================================================== */

/* Prevent main container overflow */
.app-container,
.app-main,
.view-section,
.sessions-list-container {
    min-width: 0;
}

/* 1. Large Tablets & Small Laptops (max-width: 1024px) */
@media (max-width: 1024px) {
    .dashboard-hero h2 {
        font-size: 1.4rem;
    }

    .editor-workspace {
        flex-direction: column;
        gap: 1.5rem;
    }

    .left-column .panel-card {
        height: 50vh;
        min-height: 420px;
    }

    .right-column .panel-card {
        height: auto;
        min-height: 600px;
    }

    .landing-hero {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
        justify-items: center;
    }

    .hero-content {
        align-items: center;
    }

    .profile-layout {
        grid-template-columns: 1fr;
    }
}

/* 2. Tablets & Mobile Devices (max-width: 768px) */
@media (max-width: 768px) {
    .dashboard-layout-wrapper {
        flex-direction: column;
    }

    .sidebar-nav {
        width: 100%;
        flex-basis: auto;
        padding: 14px;
        position: sticky;
        top: 56px;
        z-index: 20;
    }

    .sidebar-menu {
        flex-direction: row;
        overflow-x: auto;
        padding-bottom: 2px;
        gap: 8px;
    }

    .sidebar-section {
        display: contents;
    }

    .sidebar-section-label {
        display: none;
    }

    .sidebar-item {
        flex: 0 0 auto;
        white-space: nowrap;
        border-left: 0;
        border-radius: 999px;
    }

    .sidebar-item.active {
        border-left: 0;
        border-radius: 999px;
    }

    .sidebar-support {
        display: none;
    }

    .dashboard-body {
        padding: 18px 20px 20px;
    }

    .dashboard-topbar {
        flex-direction: column;
        align-items: stretch;
    }

    .dashboard-header-summary {
        justify-content: flex-start;
    }

    .main-content-grid {
        grid-template-columns: 1fr;
    }

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

    .dashboard-hero h2 {
        font-size: 1.15rem;
    }

    .app-main {
        padding: 1.25rem 1rem;
    }

    .init-session-card .card-body {
        padding: 1.5rem;
    }

    .list-header {
        padding: 1rem 1.5rem;
        align-items: flex-start;
        flex-direction: column;
    }

    .dashboard-filters {
        width: 100%;
        justify-content: flex-start;
    }

    .sessions-table th,
    .sessions-table td {
        padding: 0.75rem 1rem;
    }

    .btn-action-view,
    .btn-action-edit,
    .btn-action-delete {
        padding: 0.35rem 0.6rem;
        font-size: 0.75rem;
    }

    .soap-inputs-container {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
}

/* 3. Small Mobile Devices (max-width: 600px) */
@media (max-width: 600px) {
    .password-modal-overlay {
        padding: 1rem;
    }

    .modal-box {
        padding: 24px;
    }

    .password-modal-actions {
        flex-direction: column-reverse;
    }

    .password-modal-actions .btn-primary,
    .password-modal-actions .btn-secondary {
        width: 100%;
    }

    .app-header {
        top: 12px;
        width: calc(100% - 24px);
        min-height: 60px;
        padding: 0.45rem 0.55rem 0.45rem 0.75rem;
    }

    .app-header.internal-theme {
        top: 0;
        left: 0;
        width: 100%;
        min-height: 56px;
        height: 56px;
        padding: 0 0.75rem;
        border-radius: 0;
        transform: none;
    }

    body.internal-header-page {
        padding-top: 56px;
    }

    body.public-header-page {
        padding-top: 84px;
    }

    body.public-header-page .landing-main {
        margin-top: -84px;
    }

    body.public-header-page .hero-full-video {
        min-height: 100vh;
    }

    .logo-subtitle,
    .user-info {
        display: none;
        /* Hide subtitle and user text details to fit mobile header */
    }

    .user-profile {
        padding-left: 0.75rem;
    }

    /* Change "System Test" button to icon-only on mobile to fit header */
    .btn-icon-secondary {
        width: 40px;
        height: 40px;
        padding: 0 !important;
        font-size: 0 !important;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        border-radius: 50%;
    }

    .btn-icon-secondary::before {
        content: "🔧";
        font-size: 1.1rem;
    }

    .dashboard-filters {
        padding: 0;
        gap: 0.75rem;
    }

    .metrics-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .dashboard-body {
        padding: 16px;
        gap: 16px;
    }

    .dashboard-topbar {
        padding: 16px;
        border-radius: 14px;
    }

    .dashboard-header-summary {
        gap: 0.45rem;
    }

    .summary-pill {
        width: 100%;
        justify-content: center;
    }

    .sidebar-item {
        min-height: 38px;
        padding: 0 12px;
        font-size: 0.82rem;
    }

    .sidebar-icon {
        width: 20px;
    }

    .main-content-grid,
    .dashboard-primary-column,
    .dashboard-secondary-column {
        gap: 16px;
    }

    .dashboard-panel {
        padding: 18px;
    }

    .chart-preview {
        min-height: 180px;
        gap: 10px;
        padding: 20px 14px 14px;
    }

    .metric-card {
        min-height: 96px;
    }

    .filter-group,
    .filter-group input,
    .filter-group select,
    .btn-clear-filters {
        width: 100%;
        min-width: 0;
    }

    .dashboard-hero {
        padding: 1.75rem 1.25rem;
    }

    .dashboard-hero h2 {
        font-size: 1.35rem;
    }

    .dashboard-hero p {
        font-size: 0.9rem;
        line-height: 1.55;
    }

    .input-with-button {
        flex-direction: column;
        gap: 0.75rem;
    }

    .btn-primary {
        width: 100%;
        text-align: center;
    }

    /* Hide the 4th column (updated at) in sessions table to fit mobile screen */
    .sessions-table th:nth-child(4),
    .sessions-table td:nth-child(4) {
        display: none;
    }

    .pagination-container {
        padding: 1rem;
        flex-direction: column;
        align-items: center;
        gap: 0.75rem;
    }

    .editor-subbar {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }

    .patient-title-area {
        width: 100%;
        justify-content: flex-start;
        flex-wrap: wrap;
    }

    .landing-main {
        padding: 1.5rem 1rem;
        gap: 4rem;
    }

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

    .hero-subtitle {
        font-size: 1rem;
        margin-bottom: 1.5rem;
    }

    .mockup-body {
        font-size: 0.75rem;
        padding: 1rem;
    }

    .auth-card {
        max-width: 100%;
        border: none;
        box-shadow: none;
    }

    .auth-card .auth-header,
    .auth-card .auth-body,
    .auth-card .auth-footer {
        padding: 1.5rem 1rem;
    }

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

    .modal-body {
        padding: 1.25rem;
    }

    .modal-footer {
        padding: 1rem 1.25rem;
    }

    .modal-patient-ref {
        font-size: 1.15rem;
    }
}

/* 3b. Extra-narrow phones (e.g. iPhone SE) - logo + both header CTAs no longer fit on one row */
@media (max-width: 400px) {
    .header-work-btn {
        display: none;
    }

    .header-actions {
        gap: 0.4rem;
    }

    .theme-toggle-btn,
    .lang-toggle-btn {
        width: 34px;
        height: 34px;
    }

    .lang-toggle-btn {
        padding: 0;
        gap: 0;
    }

    .lang-toggle-btn .lang-label {
        display: none;
    }

    .header-link-btn,
    .header-cta-btn {
        min-height: 34px;
        padding: 0 0.65rem;
        font-size: 0.8rem;
    }
}

/* 4. Extra Small Mobile Devices (max-width: 480px) */
@media (max-width: 480px) {
    .dashboard-hero h2 {
        font-size: 0.825rem;
    }

    .toast-container {
        bottom: 1rem;
        right: 1rem;
        left: 1rem;
    }

    .toast {
        min-width: 0;
        width: 100%;
    }

    .soap-bottom-toolbar {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
    }

    .soap-actions-right {
        flex-direction: column;
        width: 100%;
    }

    .soap-bottom-toolbar .btn-secondary,
    .soap-bottom-toolbar .btn-accent {
        width: 100%;
        margin-left: 0;
    }
}

/* ==========================================================================
   CSS CLASS-BASED ICONS (Rule 17 Compliance)
   ========================================================================== */
.icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-style: normal;
    font-variant: normal;
    text-rendering: auto;
    line-height: 1;
}

.icon:before {
    display: inline-block;
}

.icon-microphone:before {
    content: '🎙️';
}

.icon-note:before {
    content: '📝';
}

.icon-lock:before {
    content: '🔒';
}

.icon-logout:before {
    content: '↗';
}

.icon-lightning:before {
    content: '⚡';
}

.icon-hospital:before {
    content: '🏥';
}

.icon-shield {
    width: 1.2em;
    height: 1.2em;
    background-color: currentColor;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    -webkit-mask-position: center;
    mask-position: center;
    -webkit-mask-size: contain;
    mask-size: contain;
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill-rule='evenodd' d='M12 2L20 5V11C20 16 16.5 20 12 22C7.5 20 4 16 4 11V5Z M8.11 12.31L8.89 11.69L10.89 14.19L10.11 14.81Z M10.87 14.837L15.87 9.337L15.13 8.663L10.13 14.163Z'/%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill-rule='evenodd' d='M12 2L20 5V11C20 16 16.5 20 12 22C7.5 20 4 16 4 11V5Z M8.11 12.31L8.89 11.69L10.89 14.19L10.11 14.81Z M10.87 14.837L15.87 9.337L15.13 8.663L10.13 14.163Z'/%3E%3C/svg%3E");
}

.icon-shield:before {
    content: none;
}

.icon-doctor {
    width: 1.2em;
    height: 1.2em;
    background-color: currentColor;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    -webkit-mask-position: center;
    mask-position: center;
    -webkit-mask-size: contain;
    mask-size: contain;
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='8' r='3.4'/%3E%3Cpath fill-rule='evenodd' d='M4 21C4 16 7.5 13 12 13C16.5 13 20 16 20 21Z M8.68 14.384L9.32 13.616L15.32 18.616L14.68 19.384Z M16 19A1 1 0 1 0 14 19A1 1 0 1 0 16 19Z'/%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='8' r='3.4'/%3E%3Cpath fill-rule='evenodd' d='M4 21C4 16 7.5 13 12 13C16.5 13 20 16 20 21Z M8.68 14.384L9.32 13.616L15.32 18.616L14.68 19.384Z M16 19A1 1 0 1 0 14 19A1 1 0 1 0 16 19Z'/%3E%3C/svg%3E");
}

.icon-doctor:before {
    content: none;
}

.icon-warning:before {
    content: '⚠️';
}

.icon-music:before {
    content: '🎵';
}

.icon-play:before {
    content: '▶';
}

.icon-pause:before {
    content: '⏸';
}

.icon-undo:before {
    content: '↶';
}

.icon-redo:before {
    content: '↷';
}

.icon-stethoscope:before {
    content: '🩺';
}

.icon-patient:before {
    content: '👤';
}

.icon-dob:before {
    content: '📅';
}

.icon-room:before {
    content: '🛏️';
}

.icon-shift:before {
    content: '⏰';
}

.icon-code:before {
    content: '🔑';
}

.icon-card:before {
    content: '💳';
}

.icon-pin:before {
    content: '📍';
}

.icon-hourglass:before {
    content: '⏳';
}

.icon-check:before {
    content: '✓';
}

.icon-cross:before {
    content: '✕';
}

.icon-retry:before {
    content: '🔄';
}

.icon-eye,
.icon-eye-off {
    position: relative;
    width: 1.2rem;
    height: 0.85rem;
}

.icon-eye::before,
.icon-eye-off::before {
    content: "";
    position: absolute;
    inset: 0.12rem 0.05rem;
    border: 2px solid currentColor;
    border-radius: 999px 999px 999px 999px / 70% 70% 70% 70%;
}

.icon-eye::after {
    content: "";
    position: absolute;
    left: 50%;
    top: 50%;
    width: 0.28rem;
    height: 0.28rem;
    border-radius: 50%;
    background-color: currentColor;
    transform: translate(-50%, -50%);
}

.icon-eye-off::after {
    content: "";
    position: absolute;
    left: 0.08rem;
    top: 50%;
    width: 1.05rem;
    height: 2px;
    border-radius: 999px;
    background-color: currentColor;
    transform: rotate(-38deg);
}

/* ==========================================================================
   PASSWORD VISIBILITY TOGGLE
   ========================================================================== */
.password-input-container {
    position: relative;
    width: 100%;
}

.password-input-container input {
    padding-right: 3rem !important;
}

.toggle-password-btn {
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    font-size: 1.1rem;
    cursor: pointer;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    padding: 0 0.25rem;
    user-select: none;
}

.toggle-password-btn:hover {
    color: var(--primary-color);
}

/* ==========================================================================
   FLOATING LEFT-SIDE NAVIGATION (SCROLL SPY)
   ========================================================================== */
.side-nav {
    position: fixed;
    left: 28px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 100;
    pointer-events: none;
}

.side-nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 18px;
    pointer-events: auto;
    position: relative;
}

/* Background vertical track connecting dots */
.side-nav ul::before {
    content: '';
    position: absolute;
    left: 7px; /* Centered with 16px dot boundary */
    top: 8px;
    bottom: 8px;
    width: 2px;
    background: var(--border-color);
    opacity: 0.4;
    z-index: -1;
}

.side-nav-item {
    display: flex;
    align-items: center;
}

.side-nav-item a {
    display: flex;
    align-items: center;
    text-decoration: none;
    gap: 12px;
    padding: 2px 0;
}

.side-nav-item .dot {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background-color: var(--bg-secondary);
    border: 2px solid var(--border-color);
    transition: all var(--transition-normal);
    box-shadow: var(--shadow-sm);
}

.side-nav-item .label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-secondary);
    background-color: var(--bg-secondary);
    padding: 6px 12px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    opacity: 0;
    transform: translateX(-12px);
    transition: all var(--transition-normal);
    box-shadow: var(--shadow-sm);
    white-space: nowrap;
    pointer-events: none;
}

/* Hover effects */
.side-nav-item:hover .dot {
    border-color: var(--primary-color);
    background-color: var(--primary-light);
    transform: scale(1.2);
}

.side-nav-item:hover .label {
    opacity: 1;
    transform: translateX(0);
}

/* Active State styling */
.side-nav-item.active .dot {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px var(--primary-light);
    transform: scale(1.15);
}


.side-nav-item.active .label {
    color: var(--primary-color);
    border-color: var(--primary-light);
    font-weight: 800;
}

/* Hide navigation on smaller screens to avoid overlapping content */
@media (max-width: 1200px) {
    .side-nav {
        display: none;
    }
}

.about-page {
    width: 100%;
}

.about-container {
    max-width: 1120px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ── Hero ── */
.about-hero {
    position: relative;
    padding: 100px 0 80px;
    overflow: hidden;
    text-align: center;
}

.about-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 60% 55% at 50% -10%, rgba(20, 184, 166, 0.15) 0%, transparent 70%),
        radial-gradient(ellipse 40% 40% at 80% 60%, rgba(20, 184, 166, 0.07) 0%, transparent 60%);
    pointer-events: none;
}

.about-hero-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--primary-light);
    color: var(--primary-color);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    padding: 6px 16px;
    border-radius: var(--radius-pill);
    border: 1px solid rgba(20, 184, 166, 0.25);
    margin-bottom: 28px;
}

.about-hero-kicker .kicker-dot {
    width: 6px;
    height: 6px;
    background: var(--primary-color);
    border-radius: 50%;
    animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {
    0%, 100% { opacity: 1; transform: scale(1); }
    50%       { opacity: 0.5; transform: scale(0.75); }
}

.about-hero-title {
    font-size: clamp(2.2rem, 5vw, 3.8rem);
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -0.03em;
    color: var(--text-primary);
    max-width: 780px;
    margin: 0 auto 24px;
}

.about-hero-title .accent {
    background: linear-gradient(135deg, var(--primary-teal) 0%, #5eead4 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.about-hero-subtitle {
    font-size: 1.15rem;
    color: var(--text-secondary);
    line-height: 1.7;
    max-width: 620px;
    margin: 0 auto 48px;
}

.about-hero-actions {
    display: flex;
    gap: 14px;
    justify-content: center;
    flex-wrap: wrap;
}

/* ── Stat Strip ── */
.about-stats-strip {
    padding: 56px 0;
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
    background: var(--bg-tertiary);
}

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

.about-stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 0 24px;
    border-right: 1px solid var(--border-color);
}

.about-stat-item:last-child {
    border-right: none;
}

.about-stat-number {
    font-size: 2.8rem;
    font-weight: 800;
    color: var(--primary-color);
    letter-spacing: -0.04em;
    line-height: 1;
    margin-bottom: 8px;
}

.about-stat-label {
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-weight: 500;
    line-height: 1.4;
}

/* ── Story Section ── */
.about-story {
    padding: 96px 0;
}

.about-story-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: center;
}

.about-story-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--primary-color);
    margin-bottom: 20px;
}

.about-story-label::before {
    content: '';
    display: block;
    width: 24px;
    height: 2px;
    background: var(--primary-color);
    border-radius: 2px;
}

.about-story-title {
    font-size: clamp(1.8rem, 3vw, 2.6rem);
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -0.025em;
    margin-bottom: 20px;
    color: var(--text-primary);
}

.about-story-body {
    font-size: 1rem;
    color: var(--text-secondary);
    line-height: 1.8;
}

.about-story-body p + p {
    margin-top: 16px;
}

.about-story-visual {
    position: relative;
    padding-bottom: 32px;
}

.about-story-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 32px 32px 48px;
    box-shadow: var(--shadow-lg);
    position: relative;
    overflow: visible;
}

.about-story-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-teal) 0%, #5eead4 100%);
}

.about-story-card-icon {
    width: 52px;
    height: 52px;
    background: var(--primary-light);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    font-size: 1.5rem;
}

.about-story-card h4 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 10px;
    color: var(--text-primary);
}

.about-story-card p {
    font-size: 0.92rem;
    color: var(--text-secondary);
    line-height: 1.65;
}

.about-floating-badge {
    position: absolute;
    bottom: -20px;
    right: 16px;
    background: var(--primary-color);
    color: #fff;
    font-size: 0.78rem;
    font-weight: 700;
    padding: 10px 16px;
    border-radius: var(--radius-md);
    box-shadow: 0 8px 24px rgba(20, 184, 166, 0.4);
    display: flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}

/* ── Mission & Vision ── */
.about-mission {
    padding: 80px 0;
    background: var(--bg-tertiary);
}

.about-mission-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.about-mv-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 40px;
    position: relative;
    overflow: hidden;
    transition: transform var(--transition-normal), box-shadow var(--transition-normal);
}

.about-mv-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.about-mv-card::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-teal) 0%, #5eead4 100%);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform var(--transition-normal);
}

.about-mv-card:hover::after {
    transform: scaleX(1);
}

.about-mv-icon {
    width: 56px;
    height: 56px;
    border-radius: var(--radius-md);
    background: var(--primary-light);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    margin-bottom: 24px;
}

.about-mv-card h3 {
    font-size: 1.35rem;
    font-weight: 800;
    margin-bottom: 14px;
    color: var(--text-primary);
}

.about-mv-card p {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.75;
}

/* ── Values ── */
.about-values {
    padding: 96px 0;
}

.about-section-header {
    text-align: center;
    margin-bottom: 64px;
}

.about-section-label {
    display: inline-block;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--primary-color);
    background: var(--primary-light);
    padding: 5px 14px;
    border-radius: var(--radius-pill);
    margin-bottom: 16px;
}

.about-section-title {
    font-size: clamp(1.8rem, 3vw, 2.6rem);
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -0.025em;
    color: var(--text-primary);
    margin-bottom: 16px;
}

.about-section-desc {
    font-size: 1.05rem;
    color: var(--text-secondary);
    line-height: 1.7;
    max-width: 560px;
    margin: 0 auto;
}

.about-values-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.about-value-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 32px 28px;
    position: relative;
    transition: transform var(--transition-normal), box-shadow var(--transition-normal), border-color var(--transition-normal);
    cursor: default;
}

.about-value-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
    border-color: rgba(20, 184, 166, 0.3);
}

.about-value-number {
    font-size: 3rem;
    font-weight: 900;
    line-height: 1;
    color: var(--primary-light);
    letter-spacing: -0.04em;
    margin-bottom: 12px;
    /* subtle gradient overlay on number */
    background: linear-gradient(135deg, rgba(20, 184, 166, 0.15), rgba(20, 184, 166, 0.05));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.about-value-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-sm);
    background: var(--primary-light);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    margin-bottom: 18px;
}

.about-value-card h3 {
    font-size: 1.05rem;
    font-weight: 700;
    margin-bottom: 10px;
    color: var(--text-primary);
}

.about-value-card p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.7;
}

/* ── Team ── */
.about-team {
    padding: 96px 0;
    background: var(--bg-tertiary);
}

.about-team-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.about-team-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 32px 24px;
    text-align: center;
    position: relative;
    overflow: hidden;
    transition: transform var(--transition-normal), box-shadow var(--transition-normal);
}

.about-team-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
}

.about-team-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60%;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--primary-teal), transparent);
    opacity: 0;
    transition: opacity var(--transition-normal);
}

.about-team-card:hover::before {
    opacity: 1;
}

.about-team-avatar {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-teal) 0%, #0d9488 100%);
    color: #fff;
    font-size: 1.2rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    box-shadow: 0 6px 20px rgba(20, 184, 166, 0.35);
    letter-spacing: 0.01em;
}

.about-team-role-badge {
    display: inline-block;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--primary-color);
    background: var(--primary-light);
    padding: 3px 10px;
    border-radius: var(--radius-pill);
    margin-bottom: 10px;
}

.about-team-card h3 {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.about-team-card p {
    font-size: 0.84rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* ── CTA Banner ── */
.about-cta {
    padding: 80px 0;
}

.about-cta-card {
    background: linear-gradient(135deg, var(--dark-slate) 0%, #0f4a53 100%);
    border-radius: var(--radius-lg);
    padding: 64px 56px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 40px;
    overflow: hidden;
    position: relative;
}

.about-cta-card::before {
    content: '';
    position: absolute;
    top: -60px;
    right: -60px;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(20, 184, 166, 0.18) 0%, transparent 70%);
    pointer-events: none;
}

.about-cta-card::after {
    content: '';
    position: absolute;
    bottom: -40px;
    left: 30%;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(94, 234, 212, 0.1) 0%, transparent 70%);
    pointer-events: none;
}

.about-cta-content {
    position: relative;
    z-index: 1;
}

.about-cta-content h2 {
    font-size: clamp(1.6rem, 3vw, 2.4rem);
    font-weight: 800;
    color: #fff;
    line-height: 1.2;
    margin-bottom: 14px;
    letter-spacing: -0.025em;
}

.about-cta-content p {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.72);
    line-height: 1.6;
    max-width: 480px;
}

.about-cta-actions {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-shrink: 0;
    position: relative;
    z-index: 1;
}

/* ── Shared Buttons (reuse .btn if present, or fallback) ── */
.about-btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--primary-teal);
    color: #fff;
    font-size: 0.92rem;
    font-weight: 700;
    padding: 13px 26px;
    border-radius: var(--radius-pill);
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: all var(--transition-normal);
    white-space: nowrap;
}

.about-btn-primary:hover {
    background: var(--primary-teal-hover);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(20, 184, 166, 0.4);
}

.about-btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: transparent;
    color: var(--primary-teal);
    font-size: 0.92rem;
    font-weight: 700;
    padding: 13px 26px;
    border-radius: var(--radius-pill);
    text-decoration: none;
    border: 2px solid rgba(20, 184, 166, 0.4);
    cursor: pointer;
    transition: all var(--transition-normal);
    white-space: nowrap;
}

.about-btn-secondary:hover {
    border-color: var(--primary-teal);
    background: var(--primary-light);
    transform: translateY(-2px);
}

.about-btn-ghost {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    font-size: 0.92rem;
    font-weight: 700;
    padding: 13px 26px;
    border-radius: var(--radius-pill);
    text-decoration: none;
    border: 1px solid rgba(255, 255, 255, 0.2);
    cursor: pointer;
    transition: all var(--transition-normal);
    white-space: nowrap;
    backdrop-filter: blur(8px);
}

.about-btn-ghost:hover {
    background: rgba(255, 255, 255, 0.18);
    border-color: rgba(255, 255, 255, 0.4);
    transform: translateY(-2px);
}

/* ── Scroll-in animation ── */
.about-reveal {
    opacity: 0;
    transform: translateY(32px);
    transition: opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1), transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.about-reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}

.about-reveal-delay-1 { transition-delay: 0.1s; }
.about-reveal-delay-2 { transition-delay: 0.2s; }
.about-reveal-delay-3 { transition-delay: 0.3s; }
.about-reveal-delay-4 { transition-delay: 0.4s; }

/* ── Responsive ── */
@media (max-width: 1024px) {
    .about-team-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .about-stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 32px 0;
    }

    .about-stat-item:nth-child(2) {
        border-right: none;
    }

    .about-stat-item:nth-child(3) {
        border-top: 1px solid var(--border-color);
    }

    .about-stat-item:nth-child(4) {
        border-top: 1px solid var(--border-color);
        border-right: none;
    }
}

@media (max-width: 768px) {
    .about-hero {
        padding: 60px 0 48px;
    }

    .about-story-grid,
    .about-mission-grid {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .about-values-grid {
        grid-template-columns: 1fr;
    }

    .about-team-grid {
        grid-template-columns: 1fr 1fr;
    }

    .about-cta-card {
        flex-direction: column;
        padding: 40px 28px;
        text-align: center;
    }

    .about-cta-content p {
        max-width: 100%;
    }

    .about-cta-actions {
        flex-direction: column;
        width: 100%;
    }

    .about-btn-primary,
    .about-btn-secondary,
    .about-btn-ghost {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .about-team-grid {
        grid-template-columns: 1fr;
    }

    .about-stats-grid {
        grid-template-columns: 1fr 1fr;
    }
}
