/* ==========================================================================
   ClientFlow™ - PREMIUM LUXURY THEME
   Palette: Editorial White, Light Lavender, Soft Violet & Imperial Purple
   Typography: Times New Roman, Baskerville, Georgia, serif
   ========================================================================== */

:root {
    /* Color Palette Variables */
    --bg-primary: #ffffff;
    --bg-secondary: #f9fafb;
    --accent-purple: #111827;
    --accent-purple-light: #9ca3af;
    --accent-purple-dark: #1f2937;
    --text-main: #111827;
    --text-secondary: #475569;
    --border-color: #e5e7eb;

    /* Layout & Styling */
    --header-height: 80px;
    /* Core height of the minimal brand header */
    --footer-height: 70px;
    /* Core height of the brand editorial footer */
    --font-luxury: 'Times New Roman', Times, Baskerville, Georgia, serif;
    --shadow-premium: 0 10px 30px -10px rgba(31, 41, 55, 0.08);
    --shadow-premium-hover: 0 20px 40px -10px rgba(31, 41, 55, 0.16);
    --transition-smooth: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    --border-radius: 4px;
    /* Classic, sharp luxury edges */
}

/* Base Resets */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    scroll-behavior: smooth;
}

sup {
    font-size: 0.55em;
    vertical-align: super;
    position: relative;
    top: -0.15em;
    margin-left: 1px;
}

body {
    font-family: var(--font-luxury);
    background-color: var(--bg-secondary);
    color: var(--text-main);
    line-height: 1.8;
    font-size: 1.1rem;
    letter-spacing: 0.02em;
    -webkit-font-smoothing: antialiased;
}

/* Header & Brand Identity */
header {
    background: linear-gradient(135deg, #ffffff 0%, #f9fafb 100%);
    border-bottom: 1px solid var(--border-color);
    padding: 3.5rem 1rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

header::before {
    content: '';
    position: absolute;
    top: -50%;
    left: 50%;
    transform: translateX(-50%);
    width: 600px;
    height: 300px;
    background: radial-gradient(circle, rgba(156, 163, 175, 0.08) 0%, rgba(255, 255, 255, 0) 70%);
    z-index: 1;
    pointer-events: none;
}

.header-container {
    position: relative;
    z-index: 2;
    max-width: 800px;
    margin: 0 auto;
}

.logo {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-bottom: 0.8rem;
}

.logo-cube-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    cursor: pointer;
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), filter 0.3s ease;
    outline: none;
    z-index: 10;
}

.logo-cube-link:hover {
    transform: scale(1.18);
    filter: drop-shadow(0 0 12px rgba(31, 41, 55, 0.65));
}

.logo-cube-link:active {
    transform: scale(0.92);
}

body.inverted-client-portal .logo-cube-link:hover {
    filter: drop-shadow(0 0 12px rgba(255, 255, 255, 0.8));
}

.logo i {
    font-size: 2.4rem;
    color: var(--accent-purple);
    text-shadow: 0 0 15px rgba(31, 41, 55, 0.25);
    animation: pulseGlow 3s ease-in-out infinite;
}

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

.logo h1 {
    font-size: 2.2rem;
    font-weight: 500;
    letter-spacing: 0.15em;
    margin-right: -0.15em;
    color: var(--text-main);
    line-height: 1.1;
}

.logo-sub {
    font-size: 0.65rem;
    letter-spacing: 0.58em;
    margin-right: -0.58em;
    text-transform: uppercase;
    color: var(--accent-purple-dark);
    margin-top: 2px;
    font-weight: 600;
    line-height: 1;
}

.subtitle {
    font-size: 0.95rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--text-secondary);
    display: inline-block;
    border-top: 1px solid var(--border-color);
    padding-top: 0.5rem;
    margin-top: 0.2rem;
}

/* Floating Luxury Navigation */
nav {
    background-color: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: var(--transition-smooth);
}

nav ul {
    list-style: none;
    display: flex;
    justify-content: center;
    max-width: 1200px;
    margin: 0 auto;
}

nav ul li {
    margin: 0 1.5rem;
}

nav ul li a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.95rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    padding: 1.2rem 0.5rem;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition-smooth);
    position: relative;
}

nav ul li a i {
    font-size: 0.85rem;
    color: var(--accent-purple-light);
    transition: var(--transition-smooth);
}

nav ul li a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--accent-purple);
    transition: var(--transition-smooth);
}

nav ul li a:hover {
    color: var(--accent-purple);
}

nav ul li a:hover i {
    color: var(--accent-purple);
    transform: translateY(-1px);
}

nav ul li a:hover::after {
    width: 100%;
}

/* Main Content Area */
main {
    max-width: 1200px;
    margin: 3rem auto;
    padding: 0 2rem;
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, var(--accent-purple-dark) 0%, #111827 100%);
    color: white;
    padding: 5rem 3rem;
    text-align: center;
    border-radius: var(--border-radius);
    box-shadow: 0 20px 40px -15px rgba(46, 16, 101, 0.3);
    margin-bottom: 4rem;
    position: relative;
    overflow: hidden;
}

.hero-section::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(156, 163, 175, 0.15) 0%, rgba(255, 255, 255, 0) 70%);
    z-index: 1;
    pointer-events: none;
}

.hero-content {
    max-width: 700px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

.hero-section h2 {
    font-size: 2.8rem;
    font-weight: 400;
    margin-bottom: 1.5rem;
    letter-spacing: 0.03em;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.hero-section p {
    font-size: 1.25rem;
    color: var(--accent-purple-light);
    margin-bottom: 2.5rem;
    font-weight: 300;
    line-height: 1.8;
}

.btn-primary {
    display: inline-block;
    background-color: var(--bg-primary);
    color: var(--accent-purple-dark);
    text-decoration: none;
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 0.15em;
    padding: 1rem 2.2rem;
    border-radius: var(--border-radius);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: var(--transition-smooth);
    border: 1px solid transparent;
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.25), 0 0 15px rgba(255, 255, 255, 0.4);
    background-color: transparent;
    color: white;
    border-color: white;
}

/* Editorial Sections */
section {
    background-color: var(--bg-primary);
    margin-bottom: 4rem;
    padding: 4rem 3.5rem;
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-premium);
    transition: var(--transition-smooth);
}

section:hover {
    box-shadow: var(--shadow-premium-hover);
}

.section-title {
    margin-bottom: 2.5rem;
    position: relative;
}

.section-title h2 {
    font-size: 2.2rem;
    font-weight: 400;
    letter-spacing: 0.08em;
    color: var(--text-main);
    margin-bottom: 0.6rem;
}

.title-bar {
    width: 60px;
    height: 2px;
    background-color: var(--accent-purple);
}

/* About Us Layout */
.about-lead {
    font-size: 1.3rem;
    line-height: 1.8;
    color: var(--accent-purple-dark);
    margin-bottom: 1.5rem;
    font-weight: 500;
}

#about p {
    color: var(--text-secondary);
}

#about p+p {
    margin-top: 1.2rem;
}

/* Services Dynamic Cards Grid */
.services-grid {
    display: grid;
    grid-template-cols: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
}

.service-card {
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 2.5rem 2rem;
    transition: var(--transition-smooth);
    position: relative;
    overflow: hidden;
}

.service-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, var(--accent-purple-light), var(--accent-purple));
    transform: scaleX(0);
    transform-origin: left;
    transition: var(--transition-smooth);
}

.service-card:hover {
    transform: translateY(-6px);
    background-color: var(--bg-primary);
    box-shadow: var(--shadow-premium-hover);
    border-color: rgba(31, 41, 55, 0.15);
}

.service-card:hover::after {
    transform: scaleX(1);
}

.service-icon {
    font-size: 2.2rem;
    color: var(--accent-purple);
    margin-bottom: 1.2rem;
    transition: var(--transition-smooth);
    display: inline-block;
}

.service-card:hover .service-icon {
    transform: scale(1.1) rotate(5deg);
    text-shadow: 0 0 10px rgba(31, 41, 55, 0.2);
}

.service-card h3 {
    font-size: 1.4rem;
    font-weight: 500;
    margin-bottom: 0.8rem;
    color: var(--text-main);
}

.service-card p {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* Contact Us Layout & Glowing Form */
.contact-container {
    display: grid;
    grid-template-cols: 1fr 1.3fr;
    gap: 3.5rem;
    align-items: start;
}

.contact-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    max-width: 1100px;
    margin: 2.5rem auto 0 auto;
}

@media (max-width: 1024px) {
    .contact-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
}

@media (max-width: 600px) {
    .contact-grid {
        grid-template-columns: 1fr;
        gap: 1.25rem;
    }
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.info-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 22px;
    padding: 2.25rem 1.5rem;
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    transition: var(--transition-smooth);
    box-shadow: 0 4px 15px rgba(31, 41, 55, 0.02);
    overflow: hidden;
}

.info-item:hover {
    transform: translateY(-5px);
    background-color: var(--bg-primary);
    border-color: rgba(31, 41, 55, 0.15);
    box-shadow: var(--shadow-premium-hover);
}

.info-item i {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    font-size: 1.3rem;
    color: var(--accent-purple);
    background-color: rgba(31, 41, 55, 0.06);
    border-radius: 50%;
    flex-shrink: 0;
    transition: var(--transition-smooth);
}

.info-item:hover i {
    background-color: var(--accent-purple);
    color: #ffffff;
    box-shadow: 0 0 15px rgba(31, 41, 55, 0.3);
}

.info-item>div {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    width: 100%;
}

.info-item h4 {
    font-family: var(--font-luxury);
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 0.5rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.info-item p {
    font-family: var(--font-luxury);
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin: 0;
}

.info-item p a {
    color: inherit;
    text-decoration: none;
    transition: var(--transition-smooth);
    word-break: break-all;
}

.info-item p a:hover {
    color: var(--accent-purple);
}

.contact-form {
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 3rem 2.5rem;
    box-shadow: var(--shadow-premium);
    position: relative;
}

.contact-form h3 {
    font-size: 1.5rem;
    font-weight: 500;
    color: var(--text-main);
    margin-bottom: 2rem;
    letter-spacing: 0.04em;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.8rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.9rem 1.2rem;
    font-family: var(--font-luxury);
    font-size: 1rem;
    background-color: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    color: var(--text-main);
    transition: var(--transition-smooth);
    outline: none;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: var(--accent-purple);
    background-color: var(--bg-primary);
    box-shadow: 0 0 12px rgba(31, 41, 55, 0.12);
}

.btn-submit {
    width: 100%;
    padding: 1rem;
    background-color: var(--accent-purple-dark);
    color: white;
    border: none;
    border-radius: var(--border-radius);
    text-transform: uppercase;
    font-size: 0.95rem;
    letter-spacing: 0.15em;
    font-family: var(--font-luxury);
    cursor: pointer;
    box-shadow: 0 5px 15px rgba(91, 33, 182, 0.15);
    transition: var(--transition-smooth);
}

.btn-submit:hover {
    background-color: var(--accent-purple);
    box-shadow: 0 10px 25px rgba(31, 41, 55, 0.35);
    transform: translateY(-2px);
}

/* Editorial Footer */
footer {
    text-align: center;
    padding: 3rem 1rem;
    background-color: #ffffff;
    color: var(--text-secondary);
    border-top: 1px solid var(--border-color);
    margin-top: 4rem;
    position: relative;
    z-index: 10;
}

/* Ensure footer is visible above browser bar on mobile */
@media (max-width: 768px) {
    footer {
        height: var(--footer-height, 50px);
        padding-bottom: env(safe-area-inset-bottom, 0px) !important;
        align-items: flex-start !important;
        padding-top: 12px !important;
    }
}

footer p {
    font-size: 0.9rem;
    letter-spacing: 0.08em;
}

/* Core Animations */
@keyframes pulseGlow {

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

    50% {
        transform: scale(1.05);
        opacity: 0.85;
        text-shadow: 0 0 25px rgba(31, 41, 55, 0.55);
    }
}

/* Premium Responsive Viewports */
@media (max-width: 992px) {
    .contact-container {
        grid-template-cols: 1fr;
        gap: 3rem;
    }
}

@media (max-width: 768px) {
    header {
        padding: 2.5rem 1rem;
    }

    .logo h1 {
        font-size: 1.8rem;
    }

    nav ul {
        flex-direction: column;
        padding: 0.5rem 0;
    }

    nav ul li {
        margin: 0;
    }

    nav ul li a {
        padding: 0.8rem 2rem;
        justify-content: center;
    }

    main {
        padding: 0 1.2rem;
        margin: 2rem auto;
    }

    .hero-section {
        padding: 3.5rem 1.5rem;
    }

    .hero-section h2 {
        font-size: 2rem;
    }

    section {
        padding: 2.5rem 1.8rem;
    }
}

/* ==========================================================================
   PORTAL INPUT TABS & DYNAMIC FILE UPLOADER STYLES
   ========================================================================== */
.form-tabs {
    display: flex;
    gap: 15px;
    margin-bottom: 2rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.8rem;
}

.form-tab-btn {
    background: none;
    border: none;
    padding: 0.5rem 1rem;
    cursor: pointer;
    font-family: var(--font-luxury);
    font-size: 1.1rem;
    color: var(--text-secondary);
    transition: var(--transition-smooth);
    outline: none;
    border-bottom: 2px solid transparent;
}

.form-tab-btn:hover {
    color: var(--accent-purple);
}

.form-tab-btn.active {
    color: var(--accent-purple);
    border-bottom-color: var(--accent-purple);
    font-weight: 600;
}

/* Drag and Drop Zone */
.drag-drop-zone {
    border: 2px dashed var(--border-color);
    border-radius: var(--border-radius);
    padding: 2.2rem 1.5rem;
    text-align: center;
    background-color: var(--bg-primary);
    cursor: pointer;
    transition: var(--transition-smooth);
    position: relative;
    overflow: hidden;
}

.drag-drop-zone.dragover {
    border-color: var(--accent-purple);
    background-color: rgba(31, 41, 55, 0.03);
    box-shadow: 0 0 15px rgba(31, 41, 55, 0.08);
}

.drag-drop-zone i {
    font-size: 2.2rem;
    color: var(--accent-purple-light);
    margin-bottom: 0.8rem;
    transition: var(--transition-smooth);
}

.drag-drop-zone:hover i {
    transform: translateY(-3px);
    color: var(--accent-purple);
}

.drag-drop-zone p {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

/* File Preview Capsule */
#file-preview-capsule {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background-color: rgba(31, 41, 55, 0.05);
    padding: 0.6rem 1.2rem;
    border-radius: 30px;
    border: 1px solid rgba(31, 41, 55, 0.15);
    width: fit-content;
    margin: 1rem auto 0 auto;
    animation: previewGlow 3s ease-in-out infinite;
}

#file-preview-capsule i {
    font-size: 1.1rem;
    color: var(--accent-purple);
    margin-bottom: 0;
}

#file-preview-capsule span {
    font-size: 0.9rem;
    color: var(--text-main);
    font-weight: 500;
}

.remove-file-btn {
    background: none;
    border: none;
    font-size: 1.4rem;
    color: #ef4444;
    cursor: pointer;
    line-height: 1;
    margin-left: 5px;
    transition: var(--transition-smooth);
}

.remove-file-btn:hover {
    transform: scale(1.2);
    color: #b91c1c;
}

/* ==========================================================================
   FLOATING LOCAL GPU AI CONCIERGE WIDGET
   ========================================================================== */
.chat-widget-trigger {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    border-radius: 50px;
    background-color: var(--accent-purple);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    cursor: pointer;
    box-shadow: 0 10px 25px rgba(31, 41, 55, 0.35);
    transition: var(--transition-smooth);
    z-index: 9999;
}

.chat-widget-trigger:hover {
    transform: scale(1.05) translateY(-3px);
    box-shadow: 0 15px 30px rgba(31, 41, 55, 0.5);
}

.chat-pulse {
    position: absolute;
    top: 0;
    right: 0;
    width: 12px;
    height: 12px;
    background-color: #10b981;
    border-radius: 50%;
    border: 2px solid white;
    animation: pulseActive 2s infinite;
}

.chat-widget {
    position: fixed;
    bottom: 105px;
    right: 30px;
    width: 380px;
    height: 500px;
    border-radius: 8px;
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    box-shadow: 0 20px 50px rgba(31, 41, 55, 0.15);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: var(--transition-smooth);
    z-index: 9999;
}

.chat-widget.hidden {
    opacity: 0;
    transform: translateY(20px) scale(0.95);
    pointer-events: none;
}

/* Chat Header */
.chat-widget-header {
    background: linear-gradient(135deg, var(--accent-purple-dark) 0%, #111827 100%);
    color: white;
    padding: 1.2rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.chat-brand {
    display: flex;
    align-items: center;
    gap: 10px;
}

.chat-brand i {
    font-size: 1.5rem;
    color: var(--accent-purple-light);
    text-shadow: 0 0 8px rgba(156, 163, 175, 0.4);
}

.chat-brand div {
    display: flex;
    flex-direction: column;
}

.chat-brand h4 {
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    line-height: 1.1;
}

.chat-brand span {
    font-size: 0.7rem;
    color: var(--accent-purple-light);
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.close-chat-btn {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.7);
    font-size: 1.6rem;
    cursor: pointer;
    transition: var(--transition-smooth);
    line-height: 1;
}

.close-chat-btn:hover {
    color: white;
    transform: scale(1.1);
}

/* Chat Messages Area */
.chat-widget-messages {
    flex: 1;
    padding: 1.5rem;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    background-color: var(--bg-secondary);
}

.chat-message {
    max-width: 80%;
    padding: 0.9rem 1.4rem;
    border-radius: 20px;
    /* Highly rounded premium chat bubbles */
    font-size: 0.95rem;
    line-height: 1.6;
    position: relative;
    animation: chatMsgFade 0.3s ease-out;
}

.chat-message p {
    margin: 0;
}

.chat-message.assistant {
    background-color: var(--bg-primary);
    color: var(--text-main);
    align-self: flex-start;
    border: 1px solid var(--border-color);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02);
    border-bottom-left-radius: 4px;
    /* Organic conversation edge */
}

.chat-message.user {
    background-color: var(--accent-purple);
    color: white;
    align-self: flex-end;
    box-shadow: 0 4px 10px rgba(31, 41, 55, 0.25);
    border-bottom-right-radius: 4px;
    /* Organic conversation edge */
}

/* Chat Inputs */
.chat-widget-input {
    display: flex;
    border-top: 1px solid var(--border-color);
    background-color: var(--bg-primary);
    padding: 0.8rem 1.2rem;
    gap: 10px;
    align-items: center;
}

.chat-widget-input input {
    flex: 1;
    border: 1px solid var(--border-color);
    padding: 0.7rem 1rem;
    border-radius: var(--border-radius);
    font-family: var(--font-luxury);
    font-size: 0.95rem;
    outline: none;
    transition: var(--transition-smooth);
}

.chat-widget-input input:focus {
    border-color: var(--accent-purple);
    box-shadow: 0 0 10px rgba(31, 41, 55, 0.08);
}

.chat-widget-input button {
    background-color: var(--accent-purple-dark);
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: var(--transition-smooth);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 10px rgba(91, 33, 182, 0.15);
}

.chat-widget-input button:hover {
    background-color: var(--accent-purple);
    box-shadow: 0 8px 18px rgba(31, 41, 55, 0.35);
    transform: translateY(-1px);
}

/* Dots Loader Animation */
.chat-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    background-color: var(--accent-purple-light);
    border-radius: 50%;
    margin: 0 3px;
    animation: chatDotBounce 1.4s infinite both;
}

.chat-dot:nth-child(2) {
    animation-delay: 0.2s;
}

.chat-dot:nth-child(3) {
    animation-delay: 0.4s;
}

/* Custom Animations */
@keyframes previewGlow {

    0%,
    100% {
        box-shadow: 0 0 10px rgba(31, 41, 55, 0.08);
        border-color: rgba(31, 41, 55, 0.15);
    }

    50% {
        box-shadow: 0 0 20px rgba(31, 41, 55, 0.2);
        border-color: rgba(31, 41, 55, 0.4);
    }
}

@keyframes pulseActive {
    0% {
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
    }

    70% {
        box-shadow: 0 0 0 10px rgba(16, 185, 129, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
    }
}

@keyframes chatMsgFade {
    from {
        opacity: 0;
        transform: translateY(8px);
    }

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

@keyframes chatDotBounce {

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

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

/* Responsive constraints */
@media (max-width: 480px) {
    .chat-widget {
        width: calc(100% - 40px);
        right: 20px;
        bottom: 90px;
        height: 400px;
    }

    .chat-widget-trigger {
        bottom: 20px;
        right: 20px;
    }
}

/* ==========================================================================
   CONVERSATIONAL AI-FIRST CONSOLE STYLES
   ========================================================================== */

.chat-console-container {
    display: grid;
    grid-template-columns: 1.6fr 1fr;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow-premium);
    margin-top: 1.5rem;
    min-height: 520px;
    transition: var(--transition-smooth);
}

.chat-console-container:hover {
    box-shadow: var(--shadow-premium-hover);
}

/* Left Panel - Chat Terminal Thread */
.chat-thread-panel {
    display: flex;
    flex-direction: column;
    background: #ffffff;
    border-right: 1px solid var(--border-color);
    position: relative;
}

.chat-thread-panel.dragover {
    background-color: var(--bg-secondary);
    border: 2px dashed var(--accent-purple);
}

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

.chat-panel-status {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--text-secondary);
    font-weight: 600;
}

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

.status-indicator-dot.online {
    background-color: #10b981;
    box-shadow: 0 0 8px #10b981;
    animation: pulseActive 2s infinite;
}

.chat-panel-messages {
    flex-grow: 1;
    padding: 1.5rem;
    overflow-y: auto;
    max-height: 340px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    scroll-behavior: smooth;
}

.chat-panel-input-container {
    padding: 1.2rem 1.5rem;
    border-top: 1px solid var(--border-color);
    background: var(--bg-secondary);
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.chat-input-row {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 28px;
    /* Smooth pill shape */
    padding: 4px 6px 4px 12px;
    transition: var(--transition-smooth);
    width: 100%;
}

.chat-input-row:focus-within {
    border-color: var(--accent-purple);
    box-shadow: 0 4px 15px rgba(31, 41, 55, 0.08);
}

.btn-attach {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.1rem;
    transition: var(--transition-smooth);
    border-radius: 50%;
}

.btn-attach:hover {
    color: var(--accent-purple);
    background: rgba(31, 41, 55, 0.07);
}

.chat-panel-input-container input[type="text"] {
    flex-grow: 1;
    border: none !important;
    /* Remove individual border */
    background: transparent !important;
    /* Transparent wrapper */
    padding: 0.6rem 0.4rem;
    font-family: var(--font-luxury);
    font-size: 1.05rem;
    outline: none !important;
    box-shadow: none !important;
}

.btn-send {
    background: var(--accent-purple);
    border: none;
    color: #ffffff;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 0.95rem;
    transition: var(--transition-smooth);
    border-radius: 50%;
}

.btn-send:hover {
    background: var(--accent-purple-dark);
    transform: scale(1.05);
}

/* Staged file inside console input */
.staged-file-bubble {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(31, 41, 55, 0.08);
    border: 1px solid rgba(31, 41, 55, 0.15);
    padding: 0.4rem 0.8rem;
    font-size: 0.85rem;
    color: var(--accent-purple-dark);
    border-radius: 20px;
    width: fit-content;
    animation: chatMsgFade 0.3s ease-out;
}

.staged-file-bubble i {
    font-size: 0.95rem;
}

.btn-clear-staged {
    background: transparent;
    border: none;
    font-size: 1.1rem;
    cursor: pointer;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-clear-staged:hover {
    color: #ef4444;
}

/* Right Panel - Secure Staging Vault */
.staging-vault-panel {
    background: linear-gradient(180deg, #16112c 0%, #0d091e 100%);
    color: #ffffff;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    gap: 20px;
    position: relative;
    border-left: 1px solid rgba(31, 41, 55, 0.15);
}

.vault-header {
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding-bottom: 0.8rem;
}

.vault-header i {
    font-size: 1.6rem;
    color: var(--accent-purple-light);
    text-shadow: 0 0 10px rgba(156, 163, 175, 0.4);
}

.vault-header h3 {
    font-family: var(--font-luxury);
    font-size: 1.3rem;
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.vault-status-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.75rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--text-purple);
    background: rgba(31, 41, 55, 0.1);
    border: 1px solid rgba(156, 163, 175, 0.15);
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    width: fit-content;
}

.vault-led {
    width: 6px;
    height: 6px;
    background-color: #10b981;
    border-radius: 50%;
    box-shadow: 0 0 6px #10b981;
}

.vault-led.staged {
    background-color: #3b82f6;
    box-shadow: 0 0 6px #3b82f6;
}

.vault-fields {
    display: flex;
    flex-direction: column;
    gap: 16px;
    flex-grow: 1;
}

.vault-field {
    display: flex;
    flex-direction: column;
    gap: 4px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.04);
    padding: 0.8rem 1rem;
    border-radius: var(--border-radius);
    transition: var(--transition-smooth);
}

.vault-field:hover {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(31, 41, 55, 0.12);
}

.vault-field-label {
    font-size: 0.7rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-muted);
}

.vault-field-value {
    font-size: 0.95rem;
    color: #f9fafb;
    font-weight: 500;
}

.vault-field-value.unpopulated {
    color: rgba(255, 255, 255, 0.25);
    font-style: italic;
    font-weight: 300;
}

.vault-field-value.staged-badge {
    display: inline-block;
    padding: 0.15rem 0.5rem;
    background: rgba(31, 41, 55, 0.2);
    border: 1px solid rgba(156, 163, 175, 0.3);
    color: var(--text-purple);
    border-radius: 3px;
    font-size: 0.8rem;
    width: fit-content;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.btn-vault-submit {
    width: 100%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.4);
    font-family: var(--font-luxury);
    font-size: 1.05rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 0.9rem;
    cursor: not-allowed;
    transition: var(--transition-smooth);
    border-radius: var(--border-radius);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-vault-submit.ready {
    background: var(--accent-purple);
    border-color: var(--accent-purple);
    color: #ffffff;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(31, 41, 55, 0.3);
}

.btn-vault-submit.ready:hover {
    background: var(--accent-purple-light);
    border-color: var(--accent-purple-light);
    box-shadow: 0 8px 25px rgba(156, 163, 175, 0.45);
}

/* Multi-column console responsive rules */
@media (max-width: 992px) {
    .chat-console-container {
        grid-template-columns: 1fr;
        min-height: auto;
    }

    .chat-thread-panel {
        border-right: none;
        border-bottom: 1px solid var(--border-color);
    }

    .staging-vault-panel {
        border-left: none;
    }
}

/* ==========================================================================
   CHAT OPTION BUTTONS (New Policy / Policy Change)
   ========================================================================== */
.chat-option-buttons {
    display: flex;
    gap: 12px;
    margin-top: 15px;
    flex-wrap: wrap;
}

.chat-option-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: linear-gradient(135deg, var(--accent-purple-dark) 0%, #111827 100%);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.15);
    padding: 0.75rem 1.5rem;
    border-radius: 24px;
    /* Highly rounded luxury buttons */
    font-family: var(--font-luxury);
    font-size: 0.85rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    cursor: pointer;
    transition: var(--transition-smooth);
    box-shadow: 0 4px 15px rgba(46, 16, 101, 0.25);
}

.chat-option-btn i {
    font-size: 0.85rem;
    color: var(--accent-purple-light);
    transition: var(--transition-smooth);
}

.chat-option-btn:hover {
    background: transparent;
    color: var(--accent-purple-dark);
    border-color: var(--accent-purple-dark);
    box-shadow: 0 8px 20px rgba(91, 33, 182, 0.15);
    transform: translateY(-3px);
}

.chat-option-btn:hover i {
    color: var(--accent-purple-dark);
}

.chat-option-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(91, 33, 182, 0.1);
}

/* ==========================================================================
   START OVER / RESET BUTTON
   ========================================================================== */
.btn-reset-chat {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    font-family: var(--font-luxury);
    font-size: 0.75rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 0.4rem 0.85rem;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: var(--transition-smooth);
}

.btn-reset-chat i {
    font-size: 0.75rem;
    transition: var(--transition-smooth);
}

.btn-reset-chat:hover {
    border-color: rgba(31, 41, 55, 0.3);
    color: var(--accent-purple);
    background: rgba(31, 41, 55, 0.04);
}

.btn-reset-chat:hover i {
    transform: rotate(360deg);
}

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

/* ==========================================================================
   SECTION SUBTITLE
   ========================================================================== */
.section-subtitle {
    font-size: 1rem;
    color: var(--text-secondary);
    margin-top: 0.5rem;
    font-style: italic;
    letter-spacing: 0.01em;
    line-height: 1.6;
}

/* ==========================================================================
   CONTACT CARDS ROW — Bottom Section
   ========================================================================== */
.contact-cards-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    margin-top: 1rem;
}

.contact-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 2rem 1.5rem;
    text-align: center;
    transition: var(--transition-smooth);
    position: relative;
    overflow: hidden;
}

.contact-card::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, var(--accent-purple-light), var(--accent-purple));
    transform: scaleX(0);
    transform-origin: left;
    transition: var(--transition-smooth);
}

.contact-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-premium-hover);
    border-color: rgba(31, 41, 55, 0.12);
    background: var(--bg-primary);
}

.contact-card:hover::after {
    transform: scaleX(1);
}

.contact-card-icon {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: rgba(31, 41, 55, 0.07);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.2rem auto;
    transition: var(--transition-smooth);
}

.contact-card-icon i {
    font-size: 1.4rem;
    color: var(--accent-purple);
    transition: var(--transition-smooth);
}

.contact-card:hover .contact-card-icon {
    background: rgba(31, 41, 55, 0.12);
}

.contact-card:hover .contact-card-icon i {
    transform: scale(1.1);
    text-shadow: 0 0 10px rgba(31, 41, 55, 0.25);
}

.contact-card h4 {
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--accent-purple-dark);
    margin-bottom: 0.5rem;
}

.contact-card p {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

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

@media (max-width: 500px) {
    .contact-cards-row {
        grid-template-columns: 1fr;
    }
}

/* ==========================================================================
   MINIMALIST CONVERSATIONAL AI-FIRST LAYOUT (Ready When You Are style)
   ========================================================================== */

.minimal-chat-layout {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    overflow-y: auto;
    background-color: var(--bg-secondary);
}

@media (max-width: 768px) {
    .minimal-chat-layout {
        min-height: 100dvh !important;
        height: 100dvh !important;
        overflow: hidden !important;
        position: fixed !important;
        width: 100% !important;
        top: 0;
        left: 0;
    }

    .minimal-chat-layout main {
        height: calc(100dvh - var(--header-height, 80px) - var(--footer-height, 70px)) !important;
        overflow: hidden !important;
        padding: 0 1rem !important;
        align-items: stretch !important;
        display: flex !important;
        flex-direction: column !important;
    }

    /* Hide footer on mobile when chat is active or input is focused to maximize screen real estate and prevent keyboard overlap */
    body:has(.chat-active) footer,
    body:has(#console-chat-input-field:focus) footer {
        display: none !important;
    }

    /* When footer is hidden, let main fill the remaining space to the bottom of the viewport */
    body:has(.chat-active) main,
    body:has(#console-chat-input-field:focus) main {
        height: calc(100dvh - var(--header-height, 80px)) !important;
    }

    .minimal-chat-layout .chat-console-container {
        height: 100% !important;
        min-height: 0 !important;
        overflow: hidden !important;
    }

    .minimal-chat-layout .minimal-chat-core {
        height: 100% !important;
        max-height: 100% !important;
        overflow: hidden !important;
        padding: 0.5rem 0 !important;
    }

    .minimal-chat-layout .chat-thread-panel {
        overflow-y: auto !important;
        overflow-x: hidden !important;
        -webkit-overflow-scrolling: touch;
    }

    .minimal-chat-layout .chat-panel-messages {
        overflow-y: visible !important;
        max-height: none !important;
    }
}

.minimal-header {
    background: linear-gradient(135deg, #ffffff 0%, #f9fafb 100%);
    border-bottom: 1px solid var(--border-color);
    text-align: center;
    position: relative;
    z-index: 101;
    height: var(--header-height, 80px);
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 1.5rem !important;
    overflow: visible !important;
    /* Override general header overflow:hidden to prevent cube icon being clipped */
}

.minimal-header::before {
    display: none !important;
}

.minimal-header .header-container {
    position: relative;
    max-width: 1000px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.minimal-header .logo {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-bottom: 0.2rem;
}

.minimal-header .logo i {
    font-size: 1.6rem;
}

.minimal-header .logo h1 {
    font-size: 1.4rem;
    letter-spacing: 0.1em;
}

.top-nav-actions {
    position: absolute;
    top: 24px;
    right: 24px;
    z-index: 1000;
    display: flex;
    align-items: center;
    gap: 12px;
}

.top-nav-actions .btn-toggle-vault {
    background: #ffffff;
    border: 1px solid var(--border-color);
    color: var(--accent-purple-dark);
    padding: 0.5rem 1.2rem;
    border-radius: 20px;
    font-family: var(--font-luxury);
    font-size: 0.9rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition-smooth);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02);
}

.top-nav-actions .btn-toggle-vault:hover {
    background: var(--accent-purple);
    color: #ffffff;
    border-color: var(--accent-purple);
    box-shadow: 0 4px 12px rgba(31, 41, 55, 0.15);
}

body.inverted-client-portal .top-nav-actions .btn-toggle-vault {
    background: rgba(255, 255, 255, 0.1) !important;
    border-color: rgba(255, 255, 255, 0.2) !important;
    color: #ffffff !important;
}

body.inverted-client-portal .top-nav-actions .btn-toggle-vault:hover {
    background: #ffffff !important;
    color: #111827 !important;
    border-color: #ffffff !important;
    box-shadow: 0 4px 12px rgba(255, 255, 255, 0.2) !important;
}

/* Close Button in Vault Staging Panel */
.btn-close-vault {
    background: transparent;
    border: none;
    font-size: 1.8rem;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0.2rem 0.5rem;
    line-height: 1;
    transition: var(--transition-smooth);
}

.btn-close-vault:hover {
    color: var(--accent-purple);
    transform: scale(1.1);
}

/* Immersive Chat Layout */
.minimal-chat-layout main {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 2rem 1.5rem;
    width: 100%;
    overflow: visible;
    transition: align-items 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.minimal-chat-layout:has(.chat-active) main {
    align-items: flex-start;
}

.minimal-chat-layout .chat-console-container {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    max-width: 800px;
    background: transparent;
    border: none;
    box-shadow: none;
    overflow: visible;
    min-height: 60vh;
    transition: align-items 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.minimal-chat-layout .chat-console-container.chat-active {
    align-items: flex-start;
}

.minimal-chat-core {
    width: 100%;
    max-width: 680px;
    height: 100%;
    /* Fill the container space */
    max-height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    /* Centered layout when empty, flex-grow takes over when active */
    box-sizing: border-box;
    padding: 1.5rem 0;
    /* Add visual spacing from header and footer */
    position: relative;
    transition: var(--transition-smooth);
}

/* Welcome Title (Baskerville / Serif premium centered text) */
.chat-welcome-title {
    font-family: var(--font-luxury);
    font-size: 1.8rem;
    text-align: center;
    color: var(--text-main);
    font-weight: 500;
    margin-bottom: 1.6rem;
    letter-spacing: -0.01em;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    opacity: 1;
}

/* Thread Panel - Grows dynamically once user chats */
.minimal-chat-layout .chat-thread-panel {
    width: 100%;
    background: transparent;
    border: none;
    overflow: visible;
    display: flex;
    flex-direction: column;
    flex-grow: 0;
    min-height: 0;
    height: 0;
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.minimal-chat-layout .chat-panel-messages {
    max-height: none !important;
    overflow-y: visible;
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 10px 0;
    flex-grow: 1;
}

/* Pill Input Row (tall, clean, matches the photo) */
.chat-input-row {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #ffffff;
    border: 1.5px solid #e2e8f0;
    border-radius: 36px;
    /* High radius search bar */
    padding: 8px 8px 8px 16px;
    transition: var(--transition-smooth);
    width: 100%;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.02);
    height: 64px;
}

.chat-input-row:focus-within {
    border-color: var(--accent-purple);
    box-shadow: 0 8px 30px rgba(31, 41, 55, 0.06);
}

/* Plus Button (Matches reference photo) */
.btn-attach {
    background: #f8fafc;
    border: none;
    color: #64748b;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.2rem;
    transition: var(--transition-smooth);
    border-radius: 50%;
}

.btn-attach:hover {
    background: #f1f5f9;
    color: var(--accent-purple);
}

/* Main Input Area */
.chat-panel-input-container {
    width: 100%;
    background: transparent;
    border: none;
    padding: 0;
    margin-top: 1rem;
}

.chat-panel-input-container input[type="text"] {
    flex-grow: 1;
    border: none !important;
    background: transparent !important;
    padding: 0.6rem 0.4rem;
    font-family: var(--font-luxury);
    font-size: 1.15rem;
    outline: none !important;
    box-shadow: none !important;
    color: var(--text-main);
}

.chat-panel-input-container input[type="text"]::placeholder {
    color: #94a3b8;
}

/* Microphone Button (Matches reference photo) */
.btn-mic {
    background: transparent;
    border: none;
    color: #64748b;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.2rem;
    transition: var(--transition-smooth);
    border-radius: 50%;
}

.btn-mic:hover {
    background: #f8fafc;
    color: var(--accent-purple);
}

/* Send Button inside Solid Circle (Matches reference photo) */
.btn-send {
    background: var(--accent-purple);
    border: none;
    color: #ffffff;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.1rem;
    transition: var(--transition-smooth);
    border-radius: 50%;
}

.btn-send:hover {
    background: var(--accent-purple-dark);
    transform: scale(1.05);
}

/* ==========================================================================
   ACTIVE CONVERSATION STATE (Triggers once first message is sent)
   ========================================================================== */

.chat-active .chat-welcome-title {
    opacity: 0;
    transform: translateY(-20px) scale(0.95);
    height: 0;
    margin-bottom: 0;
    pointer-events: none;
    overflow: hidden;
}

.chat-active .chat-thread-panel {
    flex-grow: 1;
    /* Fill all remaining vertical space inside minimal-chat-core */
    min-height: 0;
    /* Allow the panel to shrink and scroll instead of expanding parent */
    height: auto;
    /* Let flexbox control the height */
    opacity: 1;
    margin-bottom: 1rem;
}

/* ==========================================================================
   SECURE STAGING VAULT SIDE-PANEL OVERLAY (MANAGED BY RESPONSIVE DOCK ENGINE)
   ========================================================================== */

/* Make sure header and standard spacing looks luxury and tight */
.minimal-chat-layout .vault-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 1.8rem;
    border-bottom: 1px solid var(--border-color);
}

body.inverted-client-portal .minimal-chat-layout .vault-header {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
}

.minimal-chat-layout .btn-close-vault {
    background: transparent;
    border: none;
    font-size: 2rem;
    color: var(--text-secondary);
    cursor: pointer;
    line-height: 1;
    transition: var(--transition-smooth);
}

body.inverted-client-portal .minimal-chat-layout .btn-close-vault {
    color: #cbd5e1 !important;
}

.minimal-chat-layout .btn-close-vault:hover {
    color: #ef4444 !important;
    transform: scale(1.1);
}

/* Styled Logout button in the sidebar */
.btn-vault-logout {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.25);
    color: #ef4444;
    padding: 0.75rem 1.5rem;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    cursor: pointer;
    transition: var(--transition-smooth);
    border-radius: var(--border-radius);
    font-family: var(--font-luxury);
}

.btn-vault-logout:hover {
    background: #ef4444;
    border-color: #ef4444;
    color: #ffffff;
    box-shadow: 0 0 15px rgba(239, 68, 68, 0.4);
}

body.inverted-client-portal .btn-vault-logout {
    background: rgba(239, 68, 68, 0.15) !important;
    border-color: rgba(239, 68, 68, 0.3) !important;
    color: #ff8a8a !important;
}

body.inverted-client-portal .btn-vault-logout:hover {
    background: #ef4444 !important;
    border-color: #ef4444 !important;
    color: #ffffff !important;
}

.minimal-chat-layout .vault-header-title {
    display: flex;
    align-items: center;
    gap: 10px;
}

.minimal-chat-layout .vault-header-title h3 {
    font-size: 1.1rem;
    font-weight: 500;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

footer {
    height: var(--footer-height, 50px);
    display: flex;
    align-items: center;
    justify-content: center;
    background: #ffffff;
    border-top: 1px solid var(--border-color);
    padding: 0 1rem;
    font-size: 0.8rem;
    z-index: 101;
}

footer p {
    font-size: 0.8rem;
    letter-spacing: 0.08em;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
    margin: 0;
}

.footer-portal-link {
    color: var(--accent-purple) !important;
    text-decoration: none;
    font-weight: 600;
    font-family: var(--font-luxury);
    padding: 4px 12px;
    border-radius: 12px;
    background: rgba(31, 41, 55, 0.06);
    border: 1px solid rgba(31, 41, 55, 0.15);
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.78rem;
    letter-spacing: 0.05em;
}

.footer-portal-link:hover {
    background: var(--accent-purple) !important;
    color: #ffffff !important;
    border-color: var(--accent-purple) !important;
    box-shadow: 0 0 10px rgba(31, 41, 55, 0.3);
}

body.inverted-client-portal .footer-portal-link {
    color: #ffffff !important;
    background: rgba(255, 255, 255, 0.1) !important;
    border-color: rgba(255, 255, 255, 0.2) !important;
}

body.inverted-client-portal .footer-portal-link:hover {
    background: #ffffff !important;
    color: #111827 !important;
    border-color: #ffffff !important;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
}

/* Responsive Vault styles */
@media (max-width: 900px) {
    .minimal-chat-layout .chat-console-container {
        height: 100%;
    }
}

@media (max-width: 768px) {
    .minimal-header {
        padding-top: calc(16px + env(safe-area-inset-top, 0px)) !important;
        padding-bottom: 8px !important;
    }

    footer {
        height: var(--footer-height) !important;
        padding-bottom: env(safe-area-inset-bottom, 0px) !important;
        align-items: flex-start !important;
        padding-top: 12px !important;
    }

    .minimal-chat-layout .staging-vault-panel {
        width: 100%;
        left: -100%;
        border-right: none;
        border-radius: 0;
        top: var(--header-height, 80px) !important;
        bottom: var(--footer-height, 50px) !important;
        height: calc(100vh - var(--header-height, 80px) - var(--footer-height, 50px)) !important;
    }

    .top-nav-actions {
        top: calc(22px + env(safe-area-inset-top, 0px));
        right: 16px;
        gap: 8px;
    }

    .top-nav-actions .theme-switch-label {
        display: none !important;
    }

    .top-nav-actions .theme-switch-container {
        padding: 0.4rem;
    }

    .top-nav-actions .btn-toggle-vault .btn-text {
        display: none !important;
    }

    .top-nav-actions .btn-toggle-vault {
        padding: 0.4rem;
        width: 36px;
        height: 36px;
        justify-content: center;
    }
}

/* Drifting Particle Canvas behind everything */
#particle-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 0;
    pointer-events: none;
    /* Let clicks pass through to content! */
}

/* ==========================================================================
   PORTAL COLOR THEME INVERSION (White is Black, Black is White)
   ========================================================================== */
body.inverted-client-portal {
    --bg-primary: #090d16;
    /* Premium Obsidian Black */
    --bg-secondary: #111827;
    /* Sleek Dark Charcoal */
    --text-main: #ffffff;
    /* Elegant White Text */
    --text-secondary: #cbd5e1;
    /* Soft Slate */
    --border-color: rgba(255, 255, 255, 0.15);
    /* Translucent Glass Borders */
}

body.inverted-client-portal .minimal-header {
    background: linear-gradient(135deg, #090d16 0%, #111827 100%) !important;
    border-bottom: 1px solid var(--border-color) !important;
}

body.inverted-client-portal .minimal-header h1 {
    color: #ffffff !important;
}

body.inverted-client-portal .minimal-header .logo i {
    color: #ffffff !important;
    text-shadow: 0 0 15px rgba(255, 255, 255, 0.4);
}

body.inverted-client-portal .chat-welcome-title {
    color: #ffffff !important;
}

body.inverted-client-portal .chat-input-row {
    background: rgba(255, 255, 255, 0.08) !important;
    border: 1.5px solid rgba(255, 255, 255, 0.2) !important;
}

body.inverted-client-portal .chat-input-row input {
    color: #ffffff !important;
}

body.inverted-client-portal .chat-input-row input::placeholder {
    color: rgba(255, 255, 255, 0.4) !important;
}

body.inverted-client-portal .btn-attach {
    background: rgba(255, 255, 255, 0.12) !important;
    color: #ffffff !important;
}

body.inverted-client-portal .btn-attach:hover {
    background: rgba(255, 255, 255, 0.22) !important;
}

body.inverted-client-portal .btn-mic {
    color: rgba(255, 255, 255, 0.7) !important;
}

body.inverted-client-portal .btn-mic:hover {
    color: #ffffff !important;
    background: rgba(255, 255, 255, 0.1) !important;
}

body.inverted-client-portal .btn-send {
    background: #ffffff !important;
    color: #581c87 !important;
}

body.inverted-client-portal .btn-send:hover {
    background: #f1f5f9 !important;
    transform: scale(1.05);
}

body.inverted-client-portal .chat-message.assistant {
    background: rgba(255, 255, 255, 0.08) !important;
    color: #ffffff !important;
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
}

body.inverted-client-portal .chat-message.user {
    background: #ffffff !important;
    color: #111827 !important;
    border: 1px solid #ffffff !important;
}

body.inverted-client-portal footer {
    background: #090d16 !important;
    border-top: 1px solid var(--border-color) !important;
    color: rgba(255, 255, 255, 0.6) !important;
}

body.inverted-client-portal footer p a {
    color: #ffffff !important;
}

/* ==========================================================================
   SECURE CLIENT ONBOARDING / LOGIN OVERLAY
   ========================================================================== */
.auth-overlay-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(17, 24, 39, 0.88);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 99999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.auth-overlay-container.active {
    opacity: 1;
    pointer-events: auto;
}

.auth-card {
    background: rgba(17, 24, 39, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: var(--border-radius);
    padding: 3rem 2.5rem;
    width: 100%;
    max-width: 480px;
    box-shadow: 0 30px 60px -15px rgba(0, 0, 0, 0.6), 0 0 50px rgba(31, 41, 55, 0.3);
    color: #ffffff;
    display: none;
    flex-direction: column;
    gap: 1.5rem;
    animation: authSlideUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    backdrop-filter: blur(15px);
}

.auth-card.active {
    display: flex;
}

@keyframes authSlideUp {
    from {
        opacity: 0;
        transform: translateY(25px);
    }

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

.auth-card h3 {
    font-size: 1.9rem;
    font-weight: 500;
    letter-spacing: 0.08em;
    color: #ffffff;
    text-align: center;
    font-family: var(--font-luxury);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 1rem;
    margin-bottom: 0.5rem;
}

.auth-card p {
    font-size: 0.95rem;
    color: #cbd5e1;
    text-align: center;
    line-height: 1.6;
}

.auth-form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.auth-form-group label {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #9ca3af;
    font-weight: 600;
}

.auth-form-group input {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.15);
    padding: 0.9rem 1.2rem;
    color: #ffffff;
    border-radius: var(--border-radius);
    font-family: var(--font-luxury);
    font-size: 1.1rem;
    outline: none;
    transition: var(--transition-smooth);
}

.auth-form-group input:focus {
    border-color: #9ca3af;
    background: rgba(255, 255, 255, 0.12);
    box-shadow: 0 0 15px rgba(156, 163, 175, 0.25);
}

.btn-auth-submit {
    background: #111827;
    color: #ffffff;
    border: none;
    padding: 1rem;
    border-radius: var(--border-radius);
    font-family: var(--font-luxury);
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    cursor: pointer;
    transition: var(--transition-smooth);
    box-shadow: 0 4px 15px rgba(31, 41, 55, 0.35);
    margin-top: 10px;
    font-weight: 500;
}

.btn-auth-submit:hover {
    background: #4b5563;
    box-shadow: 0 8px 25px rgba(31, 41, 55, 0.55);
    transform: translateY(-1px);
}

.auth-switch {
    font-size: 0.85rem;
    text-align: center;
    color: #94a3b8;
    margin-top: 5px;
}

.auth-switch a {
    color: #6b7280;
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition-smooth);
}

.auth-switch a:hover {
    color: #e5e7eb;
    text-decoration: underline;
}

/* ==========================================================================
   PERSONAL PROFILE HEADER & PORTAL CONTROLS (HAMBURGER MENU)
   ========================================================================== */
.portal-hamburger-container {
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1005;
}

.btn-hamburger {
    background: transparent;
    border: none;
    color: var(--text-main);
    font-size: 1.5rem;
    cursor: pointer;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: var(--transition-smooth);
}

.btn-hamburger:hover {
    background: rgba(31, 41, 55, 0.08);
    color: var(--accent-purple);
}

body.inverted-client-portal .btn-hamburger {
    color: #ffffff;
}

body.inverted-client-portal .btn-hamburger:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* Hamburger Dropdown Content */
.hamburger-dropdown-content {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    margin-top: 10px;
    background: rgba(255, 255, 255, 0.98);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-premium-hover);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    width: 280px;
    z-index: 1006;
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    animation: authSlideUp 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    text-align: left;
}

.hamburger-dropdown-content.active {
    display: block;
}

body.inverted-client-portal .hamburger-dropdown-content {
    background: rgba(30, 27, 75, 0.96);
    border-color: rgba(255, 255, 255, 0.15);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4), 0 0 30px rgba(156, 163, 175, 0.2);
}

.hamburger-profile-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 1rem;
}

.hamburger-welcome-name {
    font-size: 1.2rem;
    font-weight: 500;
    color: var(--text-main);
    font-family: var(--font-luxury);
}

body.inverted-client-portal .hamburger-welcome-name {
    color: #ffffff;
}

.hamburger-business-subtitle {
    font-size: 0.75rem;
    color: var(--accent-purple-dark);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    font-weight: 600;
}

body.inverted-client-portal .hamburger-business-subtitle {
    color: #d8b4fe;
}

.hamburger-divider {
    border: 0;
    height: 1px;
    background: var(--border-color);
    margin: 1rem 0;
}

body.inverted-client-portal .hamburger-divider {
    background: rgba(255, 255, 255, 0.1);
}

.hamburger-action-btn {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-main);
    width: 100%;
    padding: 0.6rem 1rem;
    font-size: 0.9rem;
    text-align: left;
    cursor: pointer;
    border-radius: var(--border-radius);
    transition: var(--transition-smooth);
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-luxury);
}

.hamburger-action-btn:hover {
    background: #ef4444;
    border-color: #ef4444;
    color: #ffffff;
}

body.inverted-client-portal .hamburger-action-btn {
    border-color: rgba(255, 255, 255, 0.15);
    color: #ffffff;
}

body.inverted-client-portal .hamburger-action-btn:hover {
    background: #ef4444;
    border-color: #ef4444;
    color: #ffffff;
    box-shadow: 0 0 15px rgba(239, 68, 68, 0.4);
}

/* ==========================================================================
   ELITE CHATGPT-STYLE PERMANENTLY DOCKED SIDEBAR LAYOUT
   ========================================================================== */

/* 1. Desktop Mode (min-width: 769px) - Docked Permanent Sidebar */
@media (min-width: 769px) {

    /* The sidebar panel: fixed position, flush from left screen edge, bounded between header and footer */
    .minimal-chat-layout .staging-vault-panel {
        display: flex !important;
        position: fixed !important;
        top: var(--header-height, 80px) !important;
        bottom: var(--footer-height, 50px) !important;
        left: -320px !important;
        /* Hidden offscreen by default when body.sidebar-closed */
        width: 320px !important;
        height: calc(100vh - var(--header-height, 80px) - var(--footer-height, 50px)) !important;
        background: linear-gradient(180deg, #16112c 0%, #0d091e 100%) !important;
        /* Premium guest dark purple gradient */
        color: #ffffff !important;
        border-right: 1px solid rgba(31, 41, 55, 0.15) !important;
        border-left: none !important;
        border-radius: 0 16px 16px 0 !important;
        /* Premium flush-drawer edge rounding */
        box-shadow: 15px 0 35px rgba(0, 0, 0, 0.15) !important;
        z-index: 1000 !important;
        transition: left 0.3s cubic-bezier(0.16, 1, 0.3, 1) !important;
    }

    /* When open, slide the sidebar into view */
    .minimal-chat-layout .staging-vault-panel.open {
        left: 0 !important;
    }

    /* Inverted purple client portal styling for the docked sidebar */
    body.inverted-client-portal.minimal-chat-layout .staging-vault-panel {
        background: rgba(30, 27, 75, 0.96) !important;
        border-right: 1px solid rgba(255, 255, 255, 0.15) !important;
    }

    /* Keep the chat console container centered */
    .minimal-chat-layout .chat-console-container {
        max-width: 800px !important;
        width: 100% !important;
    }

    /* Offset main content when sidebar is open */
    .staging-vault-panel.open ~ main {
        width: calc(100% - 320px);
        margin-left: 320px;
    }

    /* Ensure main content is properly centered when sidebar is closed */
    body.sidebar-closed main {
        width: 100%;
        margin-left: 0;
    }

    /* Hide standard close button since we have the top-right toggle button */
    .minimal-chat-layout .btn-close-vault {
        display: none !important;
    }
}

/* 2. Mobile Mode (max-width: 768px) - Clean Slide-Out Overlay Drawer */
@media (max-width: 768px) {

    /* Sidebar acts as overlay sliding in from the left edge */
    .minimal-chat-layout .staging-vault-panel {
        display: flex !important;
        position: fixed !important;
        top: var(--header-height, 80px) !important;
        /* Stop at bottom of header */
        bottom: var(--footer-height, 50px) !important;
        /* Stop at top of footer */
        left: -100% !important;
        /* Hidden left offscreen by default */
        width: 100% !important;
        height: calc(100vh - var(--header-height, 80px) - var(--footer-height, 50px)) !important;
        background: linear-gradient(180deg, #16112c 0%, #0d091e 100%) !important;
        color: #ffffff !important;
        border-right: none !important;
        border-radius: 0 !important;
        box-shadow: 15px 0 35px rgba(0, 0, 0, 0.3) !important;
        z-index: 1000 !important;
        transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1) !important;
    }

    /* Inverted purple client portal styling for the mobile overlay sidebar */
    body.inverted-client-portal.minimal-chat-layout .staging-vault-panel {
        background: rgba(30, 27, 75, 0.98) !important;
        border-right: none !important;
    }

    /* Slide in cleanly when the open class is toggled */
    .minimal-chat-layout .staging-vault-panel.open {
        left: 0 !important;
    }

    /* Keep close button visible in the mobile slide-out drawer */
    .minimal-chat-layout .btn-close-vault {
        display: block !important;
    }
}

/* Sidebar Client Portal Login Button Styling */
.btn-vault-login {
    width: 100%;
    background: var(--accent-purple) !important;
    border: 1px solid var(--accent-purple) !important;
    color: #ffffff !important;
    font-family: var(--font-luxury);
    font-size: 1.05rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 0.9rem;
    cursor: pointer;
    transition: var(--transition-smooth);
    border-radius: var(--border-radius);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 4px 15px rgba(31, 41, 55, 0.2);
}

.btn-vault-login:hover {
    background: var(--accent-purple-light) !important;
    border-color: var(--accent-purple-light) !important;
    box-shadow: 0 8px 25px rgba(156, 163, 175, 0.4) !important;
}

/* On mobile, hide the Client Portal Login from the floating actions container to prevent overlapping the brand logo */
@media (max-width: 768px) {
    #btn-portal-login-trigger {
        display: none !important;
    }
}

/* ==========================================================================
   PREMIUM CHATGPT-STYLE SIDEBAR TOGGLE & ACCOUNT NAV & THEME SWITCH
   ========================================================================== */

/* 1. Sidebar Toggle Buttons (ChatGPT Style) */
.btn-sidebar-toggle {
    background: transparent;
    border: none;
    color: var(--text-main);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 8px;
    transition: var(--transition-smooth);
    z-index: 1005;
}

.btn-sidebar-toggle svg {
    width: 20px;
    height: 20px;
    stroke: currentColor;
    transition: transform 0.3s ease;
}

.btn-sidebar-toggle:hover {
    background: rgba(31, 41, 55, 0.08);
    color: var(--accent-purple);
}

body.inverted-client-portal .btn-sidebar-toggle {
    color: #ffffff;
}

body.inverted-client-portal .btn-sidebar-toggle:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
}

/* Closed toggle sits in the header on the left */
.btn-sidebar-toggle-closed {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    display: none !important;
    /* Managed by .sidebar-closed class */
}

/* Open toggle sits inside the sidebar header on the right */
.btn-sidebar-toggle-open {
    color: var(--text-secondary) !important;
}

.btn-sidebar-toggle-open:hover {
    color: #ef4444 !important;
}

/* Show closed toggle in header ONLY when sidebar is closed */
body.sidebar-closed .btn-sidebar-toggle-closed {
    display: flex !important;
}

/* On desktop, hide the standard close button & make sidebar open/close fluid */
@media (min-width: 769px) {
    .staging-vault-panel {
        transition: width 0.3s ease, margin 0.3s ease !important;
    }
}

/* 2. Sidebar Navigation Menu Styles */
.sidebar-nav-menu {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 1.5rem 1.8rem 1rem;
    border-bottom: 1px solid var(--border-color);
}

body.inverted-client-portal .sidebar-nav-menu {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0.8rem 1rem;
    border-radius: 12px;
    font-family: var(--font-luxury);
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition-smooth);
}

.sidebar-nav-item i {
    font-size: 1.1rem;
    width: 20px;
    text-align: center;
    color: var(--accent-purple-light);
}

body.inverted-client-portal .sidebar-nav-item i {
    color: #d8b4fe;
}

.sidebar-nav-item span {
    letter-spacing: 0.02em;
}

.sidebar-nav-item:hover {
    background: rgba(31, 41, 55, 0.08);
    color: var(--accent-purple-light);
}

body.inverted-client-portal .sidebar-nav-item {
    color: #cbd5e1;
}

body.inverted-client-portal .sidebar-nav-item:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
}

.sidebar-nav-item.logout-item:hover {
    background: rgba(239, 68, 68, 0.08);
    color: #ef4444 !important;
}

.sidebar-nav-item.logout-item i {
    color: #ef4444 !important;
}

/* Visibility toggles based on client login state */
.client-only {
    display: none !important;
}

body.inverted-client-portal .client-only {
    display: flex !important;
}

body.inverted-client-portal .guest-only {
    display: none !important;
}

/* 3. Account Theme Toggle Switch */
.theme-switch-container {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--border-color);
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    font-family: var(--font-luxury);
    font-size: 0.8rem;
    color: var(--text-main);
    transition: var(--transition-smooth);
}

body.inverted-client-portal .theme-switch-container {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.15);
}

.theme-switch-label {
    letter-spacing: 0.05em;
    font-weight: 500;
}

/* Switch styling */
.switch {
    position: relative;
    display: inline-block;
    width: 36px;
    height: 20px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(31, 41, 55, 0.2);
    transition: .4s;
    border: 1px solid rgba(31, 41, 55, 0.3);
}

.slider:before {
    position: absolute;
    content: "";
    height: 12px;
    width: 12px;
    left: 3px;
    bottom: 3px;
    background-color: var(--accent-purple);
    transition: .4s;
}

input:checked+.slider {
    background-color: var(--accent-purple-light);
    border-color: var(--accent-purple-light);
}

input:checked+.slider:before {
    transform: translateX(16px);
    background-color: #ffffff;
}

.slider.round {
    border-radius: 20px;
}

.slider.round:before {
    border-radius: 50%;
}