:root {
    /* Color Palette */
    --primary: #16a34a;
    --primary-hover: #15803d;
    --primary-light: #f0fdf4;
    --secondary: #10b981;
    --dark: #064e3b;
    --text-main: #334155;
    --text-muted: #64748b;
    --bg-main: #f8fafc;
    --bg-card: #ffffff;
    --border: #e2e8f0;

    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);

    /* Transitions */
    --transition: all 0.3s ease;
}

[x-cloak] {
    display: none !important;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg-main);
    color: var(--text-main);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.text-primary {
    color: var(--primary);
}

/* Buttons */
button {
    font-family: 'Outfit', sans-serif;
    cursor: pointer;
    border: none;
    outline: none;
    transition: var(--transition);
    font-weight: 500;
}

.btn-primary {
    background-color: var(--primary);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
}

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

.btn-outline {
    background-color: transparent;
    color: var(--primary);
    border: 1px solid var(--primary);
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
}

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

.w-full {
    width: 100%;
}

/* Header */
.main-header {
    background-color: var(--bg-card);
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 80px;
}

.logo { font-size: 1.5rem; font-weight: 700; color: var(--dark); display: flex; align-items: center; gap: 0.5rem; }

.logo a {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.logo img { height: 80px; width: auto; }

.nav-links {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-muted);
    font-weight: 500;
    transition: var(--transition);
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--primary);
}

.menu-toggle {
    display: none;
    background: none;
    font-size: 1.5rem;
    color: var(--dark);
}

/* Standalone Search Section */
.top-search-section {
    background-color: var(--bg-card);
    padding: 2rem 0;
    border-bottom: 1px solid var(--border);
}

.search-bar-wrapper {
    max-width: 600px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    background-color: var(--bg-main);
    padding: 0.8rem 1.5rem;
    border-radius: 2rem;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    gap: 1rem;
    color: var(--text-muted);
}

.search-bar-wrapper input {
    flex: 1;
    border: none;
    outline: none;
    background: transparent;
    font-family: inherit;
    font-size: 1.1rem;
    color: var(--dark);
}

/* Main Content Grid */
.main-content {
    padding: 3rem 1.5rem;
}

.grid-layout {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
    align-items: stretch;
}

/* Cards */
.card {
    background: linear-gradient(135deg, var(--bg-card) 0%, var(--primary-light) 100%);
    border-radius: 1rem;
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    transition: var(--transition);
    border: 1px solid var(--border);
    min-height: 250px;
    /* Ensures all rows are equal based on the tallest content */
    display: flex;
}

.card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-4px);
}

/* AI Search Card */
.ia-search-card {
    justify-content: center;
    align-items: center;
    padding: 2rem;
}

.ia-content {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 2rem;
}

.ia-text-side {
    flex: 1;
}

.ia-image-side {
    width: 180px;
}

.ia-logo-text {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 1rem;
    letter-spacing: 0.05em;
}

.ia-mascot {
    display: block;
    width: 100%;
    height: auto;
    object-fit: cover;
}

.ia-description {
    margin-bottom: 1.5rem;
    color: var(--text-main);
    font-size: 1rem;
    line-height: 1.5;
}

.ia-dummy-input {
    display: flex;
    align-items: center;
    background: white;
    border-radius: 2rem;
    padding: 0.5rem;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border);
    opacity: 0.8;
}

.ia-dummy-input input {
    flex: 1;
    border: none;
    outline: none;
    padding: 0.5rem 1rem;
    font-family: inherit;
    font-size: 1rem;
    background: transparent;
    cursor: not-allowed;
}

.ia-play-btn {
    background: transparent;
    border: none;
    color: var(--primary);
    font-size: 1.25rem;
    padding: 0.5rem 1rem;
    cursor: pointer;
    transition: var(--transition);
}

.ia-play-btn:hover {
    color: var(--primary-hover);
    transform: scale(1.1);
}

/* Draft Cards (Nutritionists) */
.draft-card {}

.draft-card-left {
    flex: 1;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    border-right: 1px solid var(--border);
}

.draft-card-details .nutri-name {
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 0.5rem;
    font-size: 2rem;
    line-height: 1.2;
}

.draft-card-details .nutri-spec {
    color: var(--text-muted);
    font-size: 1.25rem;
    font-weight: 500;
}

.draft-card-right {
    width: 45%;
}

.draft-photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Colored Backgrounds for Draft - Removed as per request to use uniform gradient */
.grid-layout> :nth-child(n) h3,
.grid-layout> :nth-child(n) p {
    color: var(--dark) !important;
}

.grid-layout> :nth-child(n) .nutri-spec {
    color: var(--text-muted) !important;
}

/* Empty State / Loading State */
.empty-state,
.loading-state {
    grid-column: 1 / -1;
    text-align: center;
    padding: 4rem 2rem;
    color: var(--text-muted);
}

.empty-state i,
.loading-state i {
    font-size: 3rem;
    color: var(--border);
    margin-bottom: 1rem;
}

.loading-state i {
    color: var(--primary);
}

/* Responsive */
@media (max-width: 768px) {
    .nav-links {
        display: none;
    }

    .menu-toggle {
        display: block;
    }

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

    .ia-content {
        flex-direction: column-reverse;
        text-align: center;
        gap: 1.5rem;
    }

    .ia-image-side {
        width: 150px;
    }
}

/* Booking Button */
.btn-book {
    background-color: var(--primary);
    color: white;
    border: none;
    padding: 0.8rem 1.2rem;
    border-radius: 0.5rem;
    font-weight: 600;
    margin-top: 1rem;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    width: fit-content;
}

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

/* Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    backdrop-filter: blur(4px);
}

.modal-content {
    background-color: white;
    width: 90%;
    max-width: 800px;
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    display: flex;
    flex-direction: column;
    max-height: 90vh;
}

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

.modal-header h2 {
    font-size: 1.25rem;
    color: var(--dark);
}

.modal-close {
    background: none;
    border: none;
    font-size: 2rem;
    color: var(--text-muted);
    cursor: pointer;
    line-height: 1;
}

.modal-close:hover {
    color: var(--dark);
}

.modal-body {
    padding: 0;
    flex: 1;
    overflow-y: auto;
}
/* Chat Interface - Refined for Desktop & Mobile */
.chat-container {
    max-width: 1000px;
    margin: 2rem auto;
    background: white;
    border-radius: 1.5rem;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    display: flex;
    flex-direction: column;
    height: 750px;
    max-height: calc(100vh - 200px);
    overflow: hidden;
    border: 1px solid var(--border);
    transition: var(--transition);
}

.chat-header {
    padding: 1.25rem 2rem;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 1.25rem;
    background: white;
}

.chat-messages {
    flex: 1;
    padding: 2rem;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    background-color: #f8fafc;
    background-image: radial-gradient(#e2e8f0 0.5px, transparent 0.5px);
    background-size: 20px 20px;
}

.message {
    max-width: 70%;
    padding: 1rem 1.5rem;
    border-radius: 1.25rem;
    line-height: 1.6;
    font-size: 1.05rem;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}

.message.ai {
    align-self: flex-start;
    background-color: white;
    color: var(--dark);
    border-bottom-left-radius: 0.25rem;
    border: 1px solid var(--border);
}

.message.user {
    align-self: flex-end;
    background: var(--primary);
    color: white;
    border-bottom-right-radius: 0.25rem;
}

.chat-footer {
    padding: 1.5rem 2rem;
    border-top: 1px solid var(--border);
    background-color: white;
}

.chat-input-wrapper {
    display: flex;
    align-items: center;
    gap: 1rem;
    background-color: var(--bg-main);
    padding: 0.4rem;
    border-radius: 3rem;
    border: 2px solid transparent;
    transition: var(--transition);
}

.chat-input-wrapper:focus-within {
    border-color: var(--primary-light);
    background-color: white;
    box-shadow: 0 0 0 4px rgba(14, 165, 233, 0.1);
}

.chat-input {
    flex: 1;
    border: none;
    background: transparent;
    padding: 0.75rem 1.25rem;
    outline: none;
    font-family: inherit;
    font-size: 1.4rem;
    color: var(--dark);
}

.btn-send {
    background-color: var(--primary);
    color: white;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.2rem;
    transition: var(--transition);
}

.btn-send:hover:not(:disabled) {
    background-color: var(--primary-hover);
    transform: scale(1.05);
}

/* Mobile Adaptation */
@media (max-width: 768px) {
    .chat-container {
        margin: 0;
        height: calc(100vh - 70px); /* Fill available space below header */
        max-height: none;
        border-radius: 0;
        border: none;
    }

    .chat-header {
        padding: 1rem;
    }

    .chat-messages {
        padding: 1.25rem;
    }

    .message {
        max-width: 85%;
        font-size: 1rem;
    }

    .chat-footer {
        padding: 1rem;
    }
}
/* Landing Page Sections */
.section-title {
    text-align: center;
    margin-bottom: 3rem;
}

.section-title h2 {
    font-size: 2.5rem;
    color: var(--dark);
    margin-bottom: 0.5rem;
}

.section-title p {
    color: var(--text-muted);
    font-size: 1.1rem;
}

/* Hero Section */
.hero {
    display: flex;
    align-items: center;
    gap: 4rem;
    padding: 4rem 0;
}

.hero-content {
    flex: 1;
}

.hero-content h1 {
    font-size: 4rem;
    line-height: 1.1;
    color: var(--dark);
    margin-bottom: 1.5rem;
}

.hero-content .subtitle {
    font-family: 'Outfit', sans-serif;
    font-style: italic;
    font-size: 2rem;
    color: var(--primary);
    margin-bottom: 1.5rem;
    display: block;
}

.hero-content p {
    font-size: 1.2rem;
    color: var(--text-main);
    margin-bottom: 2rem;
    max-width: 500px;
}

.hero-image {
    flex: 1;
    position: relative;
}

.hero-image img {
    width: 100%;
    border-radius: 2rem;
    box-shadow: var(--shadow-lg);
}

.evidence-card {
    position: absolute;
    top: 50%;
    right: -2rem;
    transform: translateY(-50%);
    background: white;
    padding: 2rem;
    border-radius: 1.5rem;
    box-shadow: var(--shadow-lg);
    width: 300px;
}

.evidence-card h4 {
    margin-bottom: 1rem;
    color: var(--dark);
}

.evidence-list {
    list-style: none;
}

.evidence-list li {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
    font-size: 0.9rem;
    color: var(--text-main);
}

.evidence-list li i {
    color: var(--secondary);
    margin-top: 0.2rem;
}

/* Icons Grid (Hero) */
.hero-icons {
    display: flex;
    gap: 2rem;
    margin-bottom: 2.5rem;
}

.hero-icon-item {
    text-align: center;
}

.hero-icon-item i {
    font-size: 1.5rem;
    color: var(--primary);
    margin-bottom: 0.5rem;
    display: block;
}

.hero-icon-item span {
    font-size: 0.8rem;
    font-weight: 600;
}

/* Process Section */
.process-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 1.5rem;
    position: relative;
}

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

.process-number {
    width: 30px;
    height: 30px;
    background: var(--primary);
    color: white;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0 auto 1rem;
    font-weight: 700;
}

.process-icon {
    font-size: 2rem;
    color: var(--dark);
    margin-bottom: 1rem;
}

.process-item h4 {
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    font-size: 0.9rem;
}

.process-item p {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* Strategies Section */
.strategies-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.strategy-card {
    background: white;
    padding: 2rem;
    border-radius: 1.5rem;
    border: 1px solid var(--border);
    text-align: center;
    transition: var(--transition);
}

.strategy-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

.strategy-icon {
    font-size: 2.5rem;
    color: var(--primary);
    margin-bottom: 1.5rem;
}

.strategy-card h4 {
    margin-bottom: 1rem;
    text-transform: uppercase;
}

.strategy-list {
    list-style: none;
    text-align: left;
}

.strategy-list li {
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    display: flex;
    gap: 0.5rem;
}

.strategy-list li::before {
    content: "•";
    color: var(--primary);
}

/* Testimonials */
.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
}

.testimonial-card {
    background: white;
    padding: 2rem;
    border-radius: 1.5rem;
    display: flex;
    gap: 1.5rem;
    align-items: center;
    border: 1px solid var(--border);
}

.testimonial-img {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
}

.testimonial-content blockquote {
    font-style: italic;
    margin-bottom: 1rem;
}

.testimonial-stars {
    color: #fbbf24;
    margin-bottom: 0.5rem;
}

/* CTA Footer */
.cta-final {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-hover) 100%);
    color: white;
    padding: 4rem 2rem;
    border-radius: 2rem;
    text-align: center;
    margin: 4rem 0;
}

.cta-final h2 {
    font-size: 2.5rem;
    margin-bottom: 2rem;
}

@media (max-width: 992px) {
    .hero { flex-direction: column; text-align: center; }
    .hero-content h1 { font-size: 3rem; }
    .process-grid { grid-template-columns: repeat(3, 1fr); }
    .strategies-grid { grid-template-columns: repeat(2, 1fr); }
    .evidence-card { position: static; transform: none; width: 100%; margin-top: 2rem; }
}

@media (max-width: 768px) {
    .process-grid { grid-template-columns: repeat(2, 1fr); }
    .strategies-grid { grid-template-columns: repeat(1, 1fr); }
    .testimonials-grid { grid-template-columns: repeat(1, 1fr); }
}


/* --- Mobile Optimizations --- */
@media (max-width: 768px) {
    .nav-links.show {
        display: flex !important;
        position: absolute;
        top: 80px;
        left: 0;
        width: 100%;
        background-color: var(--bg-card);
        flex-direction: column;
        padding: 1.5rem;
        box-shadow: var(--shadow-md);
        z-index: 101;
    }
}

@media (max-width: 480px) {
    .hero-content h1 { font-size: 2.2rem !important; }
    .hero-content .subtitle { font-size: 1.5rem !important; }
    .process-grid { grid-template-columns: 1fr !important; }
    .hero-icons { 
        display: grid !important; 
        grid-template-columns: repeat(2, 1fr) !important; 
        gap: 1rem !important; 
    }
    .section-title h2 { font-size: 1.8rem !important; }
    .container { padding: 0 1rem !important; }
    .logo span { font-size: 1.1rem !important; }
    .logo img { height: 35px !important; }
}

@media (max-width: 360px) {
    .logo span { display: none !important; }
}

/* Access and registration modal */
.btn-access {
    background-color: var(--primary);
    color: white;
    padding: 0.65rem 1rem;
    border-radius: 0.5rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-access:hover {
    background-color: var(--primary-hover);
    box-shadow: var(--shadow-md);
}

.auth-modal-overlay {
    padding: 1rem;
}

.auth-modal {
    max-width: 440px;
}

.auth-modal-body {
    padding: 1.5rem;
}

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

.auth-form label {
    color: var(--dark);
    font-weight: 600;
}

.auth-form input,
.auth-form select {
    width: 100%;
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    padding: 0.8rem 1rem;
    color: var(--dark);
    font-family: inherit;
    font-size: 1rem;
    background-color: white;
}

.auth-form input:focus,
.auth-form select:focus {
    border-color: var(--primary);
    outline: none;
    box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.12);
}

.auth-divider {
    border: 0;
    border-top: 1px solid var(--border);
    margin: 1.5rem 0;
}

.auth-register h3 {
    color: var(--dark);
    font-size: 1.1rem;
    margin-bottom: 1rem;
}

.auth-tabs {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.35rem;
    margin-bottom: 1rem;
    padding: 0.25rem;
    background-color: var(--bg-main);
    border: 1px solid var(--border);
    border-radius: 0.5rem;
}

.auth-tabs button {
    background-color: transparent;
    color: var(--text-muted);
    border-radius: 0.4rem;
    padding: 0.65rem 0.4rem;
    font-size: 0.9rem;
}

.auth-tabs button.active {
    background-color: white;
    color: var(--primary);
    box-shadow: var(--shadow-sm);
}

.register-form > div {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.register-form button[type="submit"] {
    margin-top: 0.25rem;
}

@media (max-width: 768px) {
    .nav-links .btn-access {
        justify-content: center;
        width: 100%;
    }
}

@media (max-width: 480px) {
    .auth-tabs {
        grid-template-columns: 1fr;
    }
}

.register-form fieldset {
    border: 0;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    min-width: 0;
}



a.btn-access {
    text-decoration: none;
}

.dashboard-hero {
    background: linear-gradient(135deg, var(--bg-card) 0%, var(--primary-light) 100%);
    border: 1px solid var(--border);
    border-radius: 1rem;
    padding: 3rem;
    box-shadow: var(--shadow-sm);
}

.dashboard-copy {
    max-width: 720px;
}

.dashboard-eyebrow {
    color: var(--primary);
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.8rem;
    margin-bottom: 0.75rem;
}

.dashboard-copy h1 {
    color: var(--dark);
    font-size: 2.75rem;
    line-height: 1.1;
    margin-bottom: 1rem;
}

.dashboard-lead {
    color: var(--text-main);
    font-size: 1.1rem;
    margin-bottom: 2rem;
}

.dashboard-user {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    padding: 1.25rem 1.5rem;
    background-color: white;
    border: 1px solid var(--border);
    border-radius: 0.75rem;
    box-shadow: var(--shadow-sm);
    margin-bottom: 1.5rem;
}

.dashboard-label,
.dashboard-meta {
    color: var(--text-muted);
}

.dashboard-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    align-items: center;
}

.dashboard-actions form {
    margin: 0;
}

@media (max-width: 768px) {
    .dashboard-hero {
        padding: 2rem 1.25rem;
    }

    .dashboard-copy h1 {
        font-size: 2rem;
    }
}


.auth-modal-overlay {
    align-items: flex-start;
    overflow-y: auto;
    overscroll-behavior: contain;
}

.auth-modal {
    max-height: calc(100vh - 2rem);
    margin: 0 auto;
}

.auth-modal-body {
    overflow-y: auto;
    overscroll-behavior: contain;
}

html {
    scrollbar-gutter: stable;
}

body {
    overflow-y: scroll;
}

body.auth-open {
    overflow: hidden;
}

.auth-modal-body {
    max-height: calc(100vh - 9rem);
}

.calendar-shell {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.calendar-header-panel,
.calendar-meta-grid {
    display: grid;
    gap: 1rem;
}

.calendar-header-panel {
    grid-template-columns: 1fr auto;
    align-items: center;
}

.calendar-title {
    color: var(--dark);
    font-size: 2.5rem;
    margin: 0;
}

.calendar-nav,
.calendar-form-inline,
.calendar-actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    align-items: center;
}

.calendar-card,
.calendar-grid-panel {
    background: white;
    border: 1px solid var(--border);
    border-radius: 1rem;
    box-shadow: var(--shadow-sm);
    padding: 1.5rem;
}

.calendar-card h2 {
    color: var(--dark);
    margin-bottom: 0.75rem;
}

.calendar-copy {
    color: var(--text-muted);
}

.calendar-form,
.calendar-form-inline {
    margin-top: 1rem;
}

.calendar-form {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.calendar-form select,
.calendar-form-inline select,
.calendar-day-form textarea {
    width: 100%;
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    padding: 0.8rem 1rem;
    font-family: inherit;
    font-size: 1rem;
    color: var(--dark);
    background: white;
}

.calendar-weekdays,
.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 0.75rem;
}

.calendar-weekdays span {
    color: var(--text-muted);
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
}

.calendar-day {
    min-height: 180px;
    border: 1px solid var(--border);
    border-radius: 0.75rem;
    padding: 0.75rem;
    background: var(--bg-main);
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.calendar-day-empty {
    background: transparent;
    border-style: dashed;
}

.calendar-day-head {
    color: var(--dark);
}

.calendar-entry {
    color: var(--text-main);
    font-size: 0.95rem;
    white-space: pre-wrap;
}

.calendar-day-form {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    height: 100%;
}

.calendar-day-form textarea {
    min-height: 92px;
    resize: vertical;
    flex: 1;
}

@media (max-width: 992px) {
    .calendar-header-panel,
    .calendar-meta-grid {
        grid-template-columns: 1fr;
    }
}

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

    .calendar-weekdays {
        display: none;
    }

    .calendar-day {
        min-height: 0;
    }

    .calendar-title {
        font-size: 2rem;
    }
}

.calendar-day-date {
    color: var(--text-muted);
    font-size: 0.85rem;
}

.calendar-mobile-trigger {
    display: none;
}

.calendar-mobile-detail-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.45);
    padding: 1rem;
    z-index: 1200;
    align-items: flex-end;
    justify-content: center;
}

.calendar-mobile-detail {
    width: min(100%, 34rem);
    max-height: 82vh;
    background: white;
    border-radius: 1rem;
    box-shadow: var(--shadow-lg);
    overflow: hidden;
}

.calendar-mobile-detail-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.25rem 1.25rem 1rem;
    border-bottom: 1px solid var(--border);
}

.calendar-mobile-detail-head h2 {
    margin: 0;
    color: var(--dark);
}

.calendar-mobile-detail-body {
    padding: 1.25rem;
    color: var(--text-main);
    white-space: pre-wrap;
    overflow-y: auto;
}

@media (max-width: 768px) {
    .calendar-day-client {
        cursor: pointer;
    }

    .calendar-entry {
        display: -webkit-box;
        -webkit-line-clamp: 4;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    .calendar-mobile-trigger {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 100%;
        border: 1px solid var(--border);
        border-radius: 0.5rem;
        background: white;
        color: var(--dark);
        font-weight: 600;
        padding: 0.8rem 1rem;
        font-family: inherit;
        font-size: 0.95rem;
    }

    .calendar-mobile-detail-overlay[x-cloak],
    .calendar-mobile-detail-overlay[style*="display: none"] {
        display: none !important;
    }

    .calendar-mobile-detail-overlay {
        display: flex;
    }
}

.private-shell {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.private-hero {
    display: grid;
    grid-template-columns: minmax(0, 1.7fr) minmax(18rem, 0.9fr);
    gap: 1rem;
    align-items: stretch;
}

.private-hero-main,
.private-account-card,
.private-card {
    background: white;
    border: 1px solid var(--border);
    border-radius: 1rem;
    box-shadow: var(--shadow-sm);
}

.private-hero-main {
    padding: 2rem;
}

.private-hero-main h1 {
    margin: 0 0 0.75rem;
    color: var(--dark);
    font-size: 2.4rem;
}

.private-account-card {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.private-account-card strong {
    color: var(--dark);
    font-size: 1.15rem;
}

.private-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 1.5rem;
    align-items: center;
}

.private-actions form {
    margin: 0;
}

.private-highlight-list {
    display: grid;
    gap: 0.75rem;
    margin-top: 0.5rem;
}

.private-highlight-item {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--border);
}

.private-highlight-label {
    color: var(--text-muted);
    font-size: 0.85rem;
    font-weight: 600;
}

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

.private-card {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.private-card h2 {
    margin: 0;
    color: var(--dark);
}

.private-card-wide {
    grid-column: span 2;
}

.private-link-list,
.private-bullet-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.private-link-item {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    padding: 1rem;
    border: 1px solid var(--border);
    border-radius: 0.75rem;
    color: inherit;
    text-decoration: none;
    background: var(--bg-main);
}

.private-link-item strong,
.private-metric strong {
    color: var(--dark);
}

.private-bullet-list {
    padding-left: 1.1rem;
    color: var(--text-main);
}

.private-bullet-list li {
    margin: 0;
}

.private-metric {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    padding: 1rem;
    border-radius: 0.75rem;
    background: var(--bg-main);
}

@media (max-width: 992px) {
    .private-hero,
    .private-grid {
        grid-template-columns: 1fr;
    }

    .private-card-wide {
        grid-column: span 1;
    }
}

@media (max-width: 768px) {
    .private-hero-main {
        padding: 1.5rem;
    }

    .private-hero-main h1 {
        font-size: 2rem;
    }
}

.test-status-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
}

.test-status-head h2 {
    margin: 0;
    color: var(--dark);
}

.test-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.45rem 0.8rem;
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 700;
    white-space: nowrap;
}

.test-badge-ok,
.test-text-ok {
    color: #166534;
}

.test-badge-ok {
    background: #dcfce7;
}

.test-badge-fail,
.test-text-fail {
    color: #991b1b;
}

.test-badge-fail {
    background: #fee2e2;
}

.test-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.test-item {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0.35rem 1rem;
    padding: 1rem;
    border: 1px solid var(--border);
    border-radius: 0.75rem;
    background: var(--bg-main);
}

.test-item p {
    grid-column: 1 / -1;
    margin: 0;
    color: var(--text-muted);
}

@media (max-width: 768px) {
    .test-status-head,
    .test-item {
        grid-template-columns: 1fr;
    }
}

.test-error-box {
    margin-top: 1rem;
    padding: 1rem 1rem 0.9rem;
    border-radius: 0.85rem;
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #991b1b;
}

.test-error-box strong {
    display: block;
    margin-bottom: 0.5rem;
}

.test-error-box p {
    margin: 0.35rem 0 0;
}
