/* Gregorian AI — shared theme (landing + auth flows) */
:root {
    --bg-deep: #0c0f14;
    --bg-mid: #121826;
    --accent: #c4a574;
    --accent-soft: rgba(196, 165, 116, 0.15);
    --text: #e8eaef;
    --text-muted: #9aa3b2;
    --line: rgba(255, 255, 255, 0.08);
    --glow: rgba(196, 165, 116, 0.35);
}

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

/* Hide utility — used on dashboard, sign-up steps, panels (must be global, not only scoped selectors) */
.is-hidden {
    display: none !important;
}

html {
    scroll-behavior: smooth;
}

body {
    min-height: 100vh;
    font-family: "Plus Jakarta Sans", system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
    background: var(--bg-deep);
    color: var(--text);
    line-height: 1.6;
}

.noise {
    pointer-events: none;
    position: fixed;
    inset: 0;
    opacity: 0.04;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
    z-index: 0;
}

.hero,
.meet-greg,
.bridge,
.signin-section,
.greg-auth-page {
    position: relative;
    z-index: 1;
}

/* —— Hero —— */
.hero {
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: clamp(1.5rem, 5vw, 3rem);
    text-align: center;
    background:
        radial-gradient(ellipse 80% 50% at 50% -20%, rgba(196, 165, 116, 0.12), transparent),
        radial-gradient(ellipse 60% 40% at 100% 50%, rgba(59, 130, 246, 0.06), transparent),
        radial-gradient(ellipse 50% 35% at 0% 80%, rgba(139, 92, 246, 0.05), transparent),
        linear-gradient(180deg, var(--bg-mid) 0%, var(--bg-deep) 100%);
}

.hero-badge {
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 1.25rem;
    opacity: 0.95;
}

.hero h1 {
    font-family: "Fraunces", Georgia, serif;
    font-size: clamp(2.5rem, 7vw, 4.25rem);
    font-weight: 700;
    font-optical-sizing: auto;
    letter-spacing: -0.03em;
    line-height: 1.1;
    max-width: min(22ch, 92vw);
    margin: 0 auto 1.25rem;
    text-shadow: 0 2px 40px rgba(0, 0, 0, 0.4);
}

.hero-lede {
    font-size: clamp(1rem, 2.4vw, 1.2rem);
    color: var(--text-muted);
    max-width: 36rem;
    margin: 0 auto 2.5rem;
    font-weight: 500;
}

/* —— Sign in (landing bottom) —— */
.signin-section {
    padding: clamp(3rem, 10vw, 5rem) clamp(1.5rem, 5vw, 3rem);
    border-top: 1px solid var(--line);
    background:
        radial-gradient(ellipse 70% 40% at 50% 100%, rgba(196, 165, 116, 0.08), transparent),
        var(--bg-deep);
}

.signin-inner {
    width: 100%;
    max-width: 22rem;
    margin: 0 auto;
    text-align: left;
}

.signin-title {
    font-family: "Fraunces", Georgia, serif;
    font-size: clamp(1.25rem, 3vw, 1.5rem);
    font-weight: 600;
    color: var(--text);
    margin-bottom: 1rem;
    text-align: center;
}

.signin-form {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.signin-form label {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.signin-form input[type="email"],
.signin-form input[type="password"],
.signin-form input[type="text"] {
    width: 100%;
    padding: 0.85rem 1rem;
    font: inherit;
    font-size: 1rem;
    color: var(--text);
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--line);
    border-radius: 10px;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.signin-form input::placeholder {
    color: var(--text-muted);
    opacity: 0.85;
}

.signin-form input:hover {
    border-color: rgba(255, 255, 255, 0.14);
}

.signin-form input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-soft);
}

.signin-form button[type="submit"] {
    width: 100%;
    padding: 0.88rem 1.25rem;
    font: inherit;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--bg-deep);
    background: var(--accent);
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: filter 0.2s ease, transform 0.15s ease, opacity 0.2s ease;
}

.signin-form button[type="submit"]:hover:not(:disabled) {
    filter: brightness(1.06);
}

.signin-form button[type="submit"]:active:not(:disabled) {
    transform: scale(0.98);
}

.signin-form button[type="submit"]:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
}

.signin-form button[type="submit"]:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.signin-error {
    display: none;
    font-size: 0.85rem;
    font-weight: 500;
    color: #f0a8a8;
    text-align: center;
    margin: 0;
    padding: 0 0.25rem;
}

.signin-error.is-visible {
    display: block;
}

.signin-register {
    margin-top: 1rem;
    text-align: center;
    font-size: 0.88rem;
    color: var(--text-muted);
}

.signin-register a {
    color: var(--accent);
    font-weight: 600;
    text-decoration: none;
}

.signin-register a:hover,
.signin-register a:focus-visible {
    text-decoration: underline;
    outline: none;
}

/* —— OAuth placeholders (disabled until wired) —— */
.signin-oauth {
    margin-top: 1.25rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--line);
}

.signin-oauth-legend {
    font-size: 0.8rem;
    color: var(--text-muted);
    text-align: center;
    margin-bottom: 0.75rem;
    font-weight: 500;
}

.signin-oauth-row {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

@media (min-width: 400px) {
    .signin-oauth-row {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
    }
}

.oauth-btn {
    flex: 1;
    min-width: 5.75rem;
    padding: 0.65rem 0.85rem;
    font: inherit;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-muted);
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--line);
    border-radius: 10px;
    cursor: not-allowed;
    opacity: 0.62;
    transition: opacity 0.2s ease;
}

.oauth-btn:disabled {
    cursor: not-allowed;
}

.signin-oauth-note {
    font-size: 0.72rem;
    color: var(--text-muted);
    text-align: center;
    margin-top: 0.65rem;
    opacity: 0.88;
}

/* —— Password requirements hint (sign-up) —— */
.password-hint {
    font-size: 0.78rem;
    color: var(--text-muted);
    line-height: 1.45;
    margin: -0.35rem 0 0.15rem;
}

.password-hint-list {
    font-size: 0.78rem;
    color: var(--text-muted);
    line-height: 1.5;
    margin: -0.35rem 0 0.35rem;
    padding-left: 1.1rem;
}

.password-hint-list li {
    margin-bottom: 0.2rem;
}

.password-hint-list strong {
    color: var(--text);
    font-weight: 600;
}

@media (prefers-reduced-motion: reduce) {
    .signin-form button[type="submit"]:active:not(:disabled) {
        transform: none;
    }
}

.scroll-hint {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-muted);
    font-size: 0.8rem;
    font-weight: 500;
    text-decoration: none;
    margin-top: auto;
    padding-top: 3rem;
    transition: color 0.2s ease;
}

.scroll-hint:hover,
.scroll-hint:focus-visible {
    color: var(--accent);
    outline: none;
}

.scroll-hint .chev {
    width: 22px;
    height: 22px;
    border: 2px solid currentColor;
    border-radius: 50%;
    display: grid;
    place-items: center;
    animation: bounce 2.2s ease-in-out infinite;
}

@media (prefers-reduced-motion: reduce) {
    .scroll-hint .chev {
        animation: none;
    }
    html {
        scroll-behavior: auto;
    }
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); opacity: 0.85; }
    50% { transform: translateY(6px); opacity: 1; }
}

.scroll-hint .chev svg {
    width: 10px;
    height: 10px;
}

/* —— Bridge strip —— */
.bridge {
    padding: 2.5rem clamp(1.5rem, 5vw, 3rem);
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    background: linear-gradient(90deg, transparent, var(--accent-soft), transparent);
}

.bridge-inner {
    max-width: 56rem;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 1rem 2rem;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.bridge-inner strong {
    color: var(--text);
    font-weight: 600;
}

.provider-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
    list-style: none;
}

.provider-pills li {
    padding: 0.35rem 0.85rem;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.03);
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-muted);
}

/* —— Meet Greg —— */
.meet-greg {
    padding: clamp(4rem, 12vw, 7rem) clamp(1.5rem, 5vw, 3rem);
    background: var(--bg-deep);
}

.meet-greg-inner {
    max-width: 40rem;
    margin: 0 auto;
}

.meet-greg h2 {
    font-family: "Fraunces", Georgia, serif;
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    font-weight: 600;
    letter-spacing: -0.02em;
    margin-bottom: 1rem;
    color: var(--text);
}

.meet-greg .call-me {
    font-size: clamp(1.05rem, 2.2vw, 1.2rem);
    color: var(--text-muted);
    margin-bottom: 1.75rem;
}

.meet-greg .call-me .name {
    color: var(--accent);
    font-weight: 700;
    font-style: normal;
}

.impact {
    font-family: "Fraunces", Georgia, serif;
    font-size: clamp(1.2rem, 2.8vw, 1.55rem);
    font-weight: 400;
    font-style: italic;
    line-height: 1.55;
    padding: 1.5rem 1.75rem;
    border-left: 3px solid var(--accent);
    background: linear-gradient(90deg, var(--accent-soft), transparent);
    border-radius: 0 12px 12px 0;
    box-shadow: 0 0 60px -20px var(--glow);
}

footer {
    position: relative;
    z-index: 1;
    text-align: center;
    padding: 2rem 1.5rem 3rem;
    font-size: 0.85rem;
    color: var(--text-muted);
    border-top: 1px solid var(--line);
}

footer .brand {
    color: var(--text);
    font-weight: 600;
}

/* —— Standalone auth (sign-up) —— */
.greg-auth-page {
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding: clamp(1.25rem, 4vw, 2rem) clamp(1rem, 4vw, 1.5rem) 3rem;
    background:
        radial-gradient(ellipse 80% 50% at 50% -20%, rgba(196, 165, 116, 0.12), transparent),
        radial-gradient(ellipse 60% 40% at 100% 40%, rgba(59, 130, 246, 0.06), transparent),
        linear-gradient(180deg, var(--bg-mid) 0%, var(--bg-deep) 100%);
}

.greg-auth-back {
    align-self: flex-start;
    margin-bottom: 1.25rem;
    font-size: 0.88rem;
    font-weight: 500;
    color: var(--text-muted);
    text-decoration: none;
}

.greg-auth-back:hover,
.greg-auth-back:focus-visible {
    color: var(--accent);
    outline: none;
}

.greg-auth-card {
    width: 100%;
    max-width: 22rem;
}

.greg-auth-h1 {
    font-family: "Fraunces", Georgia, serif;
    font-size: clamp(1.45rem, 4vw, 1.85rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    text-align: center;
    margin-bottom: 0.45rem;
}

.greg-auth-lede {
    font-size: 0.92rem;
    color: var(--text-muted);
    text-align: center;
    margin-bottom: 1.35rem;
    line-height: 1.5;
}

.signup-progress {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 1.35rem;
}

.signup-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid var(--line);
}

.signup-dot.is-active {
    background: var(--accent);
    border-color: transparent;
    box-shadow: 0 0 12px var(--glow);
}

.signup-step.is-hidden {
    display: none;
}

.signup-type-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
    margin-bottom: 0.65rem;
}

.signup-type-btn {
    padding: 0.7rem 0.5rem;
    font: inherit;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-muted);
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--line);
    border-radius: 10px;
    cursor: pointer;
    transition: border-color 0.2s ease, color 0.2s ease, background 0.2s ease;
}

.signup-type-btn:hover {
    border-color: rgba(255, 255, 255, 0.18);
}

.signup-type-btn.is-selected {
    color: var(--bg-deep);
    background: var(--accent);
    border-color: transparent;
}

.signup-type-btn:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.btn-secondary {
    width: 100%;
    margin-top: 0.5rem;
    padding: 0.68rem;
    font: inherit;
    font-size: 0.88rem;
    font-weight: 500;
    color: var(--text-muted);
    background: transparent;
    border: 1px solid var(--line);
    border-radius: 10px;
    cursor: pointer;
}

.btn-secondary:hover:not(:disabled) {
    border-color: var(--accent);
    color: var(--accent);
}

.btn-secondary:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.signup-hint {
    font-size: 0.82rem;
    color: var(--text-muted);
    text-align: center;
    margin: 0 0 1rem;
    line-height: 1.45;
}

.email-display {
    font-size: 0.88rem;
    color: var(--accent);
    text-align: center;
    margin-bottom: 1rem;
    word-break: break-all;
    font-weight: 500;
}

.field-group.is-hidden {
    display: none;
}

.link-row {
    text-align: center;
    margin-top: 0.85rem;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.link-row button {
    background: none;
    border: none;
    color: var(--accent);
    font: inherit;
    font-weight: 600;
    cursor: pointer;
    text-decoration: underline;
    padding: 0;
}

.link-row button:hover:not(:disabled) {
    color: #d4b88a;
}

.link-row button:disabled {
    opacity: 0.45;
    cursor: not-allowed;
    text-decoration: none;
}

/* —— Greg dashboard (post sign-in) —— */
.greg-dash {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: var(--bg-deep);
}

.greg-dash-header {
    position: relative;
    z-index: 1;
    padding: clamp(1.5rem, 4vw, 2.25rem) clamp(1.25rem, 4vw, 2rem) 1.5rem;
    text-align: center;
    border-bottom: 1px solid var(--line);
    background:
        radial-gradient(ellipse 80% 80% at 50% -40%, rgba(196, 165, 116, 0.14), transparent),
        linear-gradient(180deg, var(--bg-mid), var(--bg-deep));
}

.greg-dash-header .hero-badge {
    margin-bottom: 0.65rem;
}

.greg-dash-title {
    font-family: "Fraunces", Georgia, serif;
    font-size: clamp(1.35rem, 3.5vw, 1.75rem);
    font-weight: 700;
    letter-spacing: -0.02em;
}

.greg-dash-sub {
    font-size: 0.88rem;
    color: var(--text-muted);
    margin-top: 0.35rem;
}

.greg-dash-main {
    position: relative;
    z-index: 1;
    flex: 1;
    width: 100%;
    max-width: 40rem;
    margin: 0 auto;
    padding: clamp(1.25rem, 3vw, 2rem) clamp(1rem, 4vw, 1.5rem) 3rem;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.greg-panel {
    padding: 1.25rem 1.35rem;
    border-radius: 14px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.03);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.22);
}

.greg-panel h3 {
    font-family: "Fraunces", Georgia, serif;
    font-size: 1.08rem;
    font-weight: 600;
    margin-bottom: 0.85rem;
    color: var(--text);
}

.greg-panel.is-hidden {
    display: none;
}

/* Manual booking approval (PJ admin parity) — business panel on greg-dashboard */
#panel-greg-business-ext .greg-manual-approval-wrap {
    margin-bottom: 1.25rem;
    padding: 16px 18px;
    border-radius: 14px;
    background: linear-gradient(180deg, rgba(196, 165, 116, 0.1) 0%, rgba(255, 255, 255, 0.04) 100%);
    border: 1px solid rgba(196, 165, 116, 0.28);
}

#panel-greg-business-ext .greg-checkbox-label-row {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: 12px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text);
    margin: 0 0 6px;
}

#panel-greg-business-ext .greg-checkbox-label-row input[type="checkbox"] {
    margin-top: 2px;
    flex-shrink: 0;
    width: 18px;
    height: 18px;
    accent-color: var(--accent);
    cursor: pointer;
}

#panel-greg-business-ext .greg-manual-booking-help-indent {
    font-size: 13px;
    color: var(--text-muted);
    margin-top: 8px;
    margin-left: 30px;
    margin-bottom: 0;
    line-height: 1.45;
}

.dash-display-name {
    font-family: "Fraunces", Georgia, serif;
    font-size: clamp(1.35rem, 3.5vw, 1.65rem);
    font-weight: 700;
    margin-bottom: 0.35rem;
    letter-spacing: -0.02em;
}

.dash-meta {
    font-size: 0.9rem;
    color: var(--text-muted);
}

.dash-phone-wrap {
    margin-top: 1rem;
}

.dash-phone-wrap .dash-phone-hint {
    margin-bottom: 0.25rem;
}

.dash-category-label {
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-top: 0.85rem;
    margin-bottom: 0.35rem;
}

.dash-category-input {
    width: 100%;
    padding: 0.65rem 0.85rem;
    font: inherit;
    font-size: 0.9rem;
    color: var(--text);
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--line);
    border-radius: 10px;
}

.dash-category-input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-soft);
}

.dash-category-badge {
    display: inline-block;
    margin-top: 0.5rem;
    padding: 0.35rem 0.85rem;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: var(--accent-soft);
    color: var(--accent);
    font-size: 0.82rem;
    font-weight: 600;
}

.greg-textarea {
    width: 100%;
    min-height: 7rem;
    padding: 0.85rem 1rem;
    font: inherit;
    font-size: 0.95rem;
    line-height: 1.5;
    color: var(--text);
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--line);
    border-radius: 10px;
    resize: vertical;
}

.greg-textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-soft);
}

.greg-textarea-hint {
    font-size: 0.78rem;
    color: var(--text-muted);
    margin: 0.4rem 0 0.75rem;
    line-height: 1.4;
}

.dash-about-actions-row {
    display: flex;
    justify-content: flex-end;
    margin-top: 0.5rem;
}

/* Greg dashboard: shared primary save buttons (profile, business, availability) */
.greg-dash-main .greg-dash-save-primary {
    width: 100%;
    max-width: 320px;
}

#panel-greg-business-ext > .greg-dash-save-primary {
    margin-top: 20px;
}

.dash-about-actions-row .dash-about-save-btn,
.dash-slots-actions-row .dash-slots-save-btn {
    margin-top: 0;
}

.greg-slots-intro {
    margin-top: -0.35rem;
}

.dash-slots-actions-row {
    display: flex;
    justify-content: flex-end;
    margin-top: 0.65rem;
}

.btn-greg-primary {
    padding: 0.75rem 1.2rem;
    font: inherit;
    font-size: 0.92rem;
    font-weight: 600;
    color: var(--bg-deep);
    background: var(--accent);
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: filter 0.2s ease;
}

.btn-greg-primary:hover:not(:disabled) {
    filter: brightness(1.06);
}

.btn-greg-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.cal-provider-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
    margin-bottom: 1rem;
}

@media (min-width: 380px) {
    .cal-provider-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

.cal-provider-chip {
    padding: 0.65rem 0.35rem;
    font: inherit;
    font-size: 0.76rem;
    font-weight: 600;
    border-radius: 10px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-muted);
    cursor: pointer;
    transition: border-color 0.2s ease, color 0.2s ease, background 0.2s ease;
}

.cal-provider-chip:hover {
    border-color: rgba(255, 255, 255, 0.2);
}

.cal-provider-chip.is-active {
    border-color: var(--accent);
    color: var(--accent);
    background: var(--accent-soft);
}

.cal-provider-chip:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.cal-status-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    font-size: 0.85rem;
    font-weight: 500;
    margin-bottom: 0.85rem;
    color: var(--text-muted);
}

.cal-status-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--text-muted);
    opacity: 0.85;
}

.cal-status-dot.on {
    background: #5fd38a;
    box-shadow: 0 0 12px rgba(95, 211, 138, 0.45);
    opacity: 1;
}

.cal-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.cal-actions .btn-secondary {
    margin-top: 0;
    flex: 1;
    min-width: 6.5rem;
}

.cal-help {
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-top: 0.85rem;
    line-height: 1.45;
}

.slot-day-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.6rem 0;
    border-bottom: 1px solid var(--line);
    font-size: 0.88rem;
}

.slot-day-row:last-child {
    border-bottom: none;
}

.slot-day-name {
    font-weight: 600;
    color: var(--text);
    min-width: 6rem;
}

.slot-day-times {
    color: var(--text-muted);
    text-align: right;
    line-height: 1.35;
}

.slot-duration-note {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 0.65rem;
}

.greg-dash-load-error {
    padding: 1rem;
    border-radius: 10px;
    border: 1px solid rgba(240, 168, 168, 0.35);
    background: rgba(80, 30, 30, 0.25);
    color: #f0c4c4;
    font-size: 0.9rem;
    text-align: center;
}

.greg-dash-load-error.is-hidden {
    display: none;
}

.greg-toast {
    position: fixed;
    bottom: 1.35rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 30;
    padding: 0.7rem 1.15rem;
    border-radius: 10px;
    font-size: 0.88rem;
    font-weight: 500;
    max-width: min(90vw, 24rem);
    text-align: center;
    box-shadow: 0 10px 36px rgba(0, 0, 0, 0.4);
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.25s ease;
}

.greg-toast.is-visible {
    opacity: 1;
}

.greg-toast.ok {
    background: #1a3028;
    color: #b5e8cc;
    border: 1px solid #2a4d3d;
}

.greg-toast.err {
    background: #301a1a;
    color: #f0c4c4;
    border: 1px solid #4d2a2a;
}

.greg-dash-footer-links {
    margin-top: 0.85rem;
    font-size: 0.8rem;
    line-height: 1.6;
}

.greg-dash-footer-links a {
    color: var(--accent);
    font-weight: 600;
    text-decoration: none;
}

.greg-dash-footer-links a:hover {
    text-decoration: underline;
}

/* Screen-reader only (Greg chat label) */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Greg workspace chat — WhatsApp-inspired dark UI */
.greg-wa-panel .greg-wa-chrome {
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
    margin-top: 0.65rem;
    font-family: "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", sans-serif;
}

/* Tiled doodle pattern (approx. WhatsApp wallpaper) */
.greg-chat-log {
    --wa-chat-bg: #0b141a;
    --wa-bubble-in: #202c33;
    --wa-bubble-out: #005c4b;
    --wa-text-in: #e9edef;
    --wa-text-out: #ffffff;

    max-height: 22rem;
    min-height: 14rem;
    overflow-x: hidden;
    overflow-y: auto;
    padding: 0.65rem 0.7rem 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    align-items: stretch;
    font-size: 0.9025rem;
    line-height: 1.42;
    color: var(--wa-text-in);
    background-color: var(--wa-chat-bg);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='72' height='72' viewBox='0 0 72 72'%3E%3Cg fill='%23a8b4bb' fill-opacity='0.055'%3E%3Ccircle cx='8' cy='10' r='1.2'/%3E%3Ccircle cx='38' cy='6' r='0.9'/%3E%3Ccircle cx='62' cy='22' r='1'/%3E%3Ccircle cx='22' cy='28' r='0.85'/%3E%3Ccircle cx='52' cy='38' r='1.1'/%3E%3Ccircle cx='12' cy='48' r='0.95'/%3E%3Ccircle cx='66' cy='52' r='0.8'/%3E%3Ccircle cx='34' cy='58' r='1'/%3E%3Cpath d='M44 14h2v2h-2zm-28 20h1.5v1.5H16zm24 28h2v2h-2z'/%3E%3Crect x='56' y='8' width='2' height='2' rx='0.4'/%3E%3Crect x='6' y='62' width='2.5' height='2.5' rx='0.5'/%3E%3C/g%3E%3C/svg%3E");
}

.greg-chat-log::-webkit-scrollbar {
    width: 6px;
}

.greg-chat-log::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.12);
    border-radius: 4px;
}

.greg-chat-log::-webkit-scrollbar-track {
    background: transparent;
}

.greg-chat-bubble {
    position: relative;
    max-width: min(85%, 26rem);
    padding: 0.35rem 0.55rem 0.45rem 0.65rem;
    box-shadow: 0 1px 0.5px rgba(11, 20, 26, 0.13);
}

/* Greg (incoming): left, grey */
.greg-chat-bubble.is-greg {
    align-self: flex-start;
    margin-right: auto;
    margin-left: 0;
    background: var(--wa-bubble-in, #202c33);
    color: var(--wa-text-in, #e9edef);
    border-radius: 0 7.5px 7.5px 7.5px;
}

.greg-chat-bubble.is-greg::before {
    content: "";
    position: absolute;
    top: 0;
    left: -6px;
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 0 6px 6px 0;
    border-color: transparent var(--wa-bubble-in, #202c33) transparent transparent;
}

/* User (outgoing): right, green */
.greg-chat-bubble.is-user {
    align-self: flex-end;
    margin-left: auto;
    margin-right: 0;
    background: var(--wa-bubble-out, #005c4b);
    color: var(--wa-text-out, #fff);
    border-radius: 7.5px 0 7.5px 7.5px;
}

.greg-chat-bubble.is-user::after {
    content: "";
    position: absolute;
    top: 0;
    right: -6px;
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 6px 0 0 6px;
    border-color: var(--wa-bubble-out, #005c4b) transparent transparent transparent;
}

.greg-md {
    font-size: inherit;
    line-height: 1.48;
}

.greg-md p {
    margin: 0 0 0.35rem;
}

.greg-md p:last-child {
    margin-bottom: 0;
}

.greg-md ul,
.greg-md ol {
    margin: 0.3rem 0 0.4rem 1.1rem;
    padding: 0;
}

.greg-md li {
    margin-bottom: 0.2rem;
}

.greg-chat-bubble.is-greg .greg-md strong {
    font-weight: 600;
    color: #fff;
}

.greg-chat-bubble.is-user .greg-md strong {
    font-weight: 600;
    color: inherit;
}

.greg-md h1,
.greg-md h2,
.greg-md h3 {
    font-size: 0.95rem;
    font-weight: 600;
    margin: 0.4rem 0 0.3rem;
    font-family: inherit;
}

.greg-md h1:first-child,
.greg-md h2:first-child,
.greg-md h3:first-child {
    margin-top: 0;
}

.greg-chat-bubble.is-greg .greg-md code {
    font-size: 0.85em;
    padding: 0.1em 0.35em;
    border-radius: 4px;
    background: rgba(0, 0, 0, 0.28);
}

.greg-chat-bubble.is-user .greg-md code {
    font-size: 0.85em;
    padding: 0.1em 0.35em;
    border-radius: 4px;
    background: rgba(0, 0, 0, 0.2);
}

.greg-md pre {
    margin: 0.4rem 0;
    padding: 0.45rem 0.55rem;
    overflow-x: auto;
    border-radius: 6px;
    background: rgba(0, 0, 0, 0.32);
    font-size: 0.8rem;
}

.greg-md pre code {
    padding: 0;
    background: none;
}

.greg-chat-bubble.is-greg .greg-md a {
    color: #53bdeb;
    font-weight: 500;
}

.greg-chat-bubble.is-user .greg-md a {
    color: #b7f6d6;
    font-weight: 500;
}

/* Bottom bar + pill input (WhatsApp-like) */
.greg-wa-compose {
    display: flex;
    align-items: flex-end;
    gap: 0.45rem;
    padding: 0.5rem 0.55rem 0.5rem 0.65rem;
    background: #202c33;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.greg-wa-input {
    flex: 1;
    min-height: 2.65rem;
    max-height: 7.5rem;
    resize: none;
    border: none;
    border-radius: 1.35rem;
    padding: 0.65rem 1rem 0.6rem;
    background: #2a3942;
    color: #e9edef;
    font: inherit;
    font-size: 0.9375rem;
    line-height: 1.35;
    outline: none;
}

.greg-wa-input::placeholder {
    color: rgba(233, 237, 239, 0.45);
}

.greg-wa-input:focus {
    box-shadow: 0 0 0 1px rgba(0, 168, 132, 0.35);
}

.greg-wa-send {
    flex-shrink: 0;
    width: 2.65rem;
    height: 2.65rem;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: #00a884;
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s ease, transform 0.1s ease;
}

.greg-wa-send:hover:not(:disabled) {
    background: #06cf9c;
}

.greg-wa-send:active:not(:disabled) {
    transform: scale(0.96);
}

.greg-wa-send:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.greg-wa-send-icon {
    width: 1.15rem;
    height: 1.15rem;
    margin-left: 2px;
}

/* Greg chat — standalone popup window */
.greg-chat-page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.greg-chat-page-header {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--line);
}

.greg-chat-back-link {
    display: inline-block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--accent);
    text-decoration: none;
    margin-bottom: 0.45rem;
}

.greg-chat-back-link:hover {
    text-decoration: underline;
}

.greg-chat-page-title {
    font-family: "Fraunces", Georgia, serif;
    font-size: 1.12rem;
    font-weight: 600;
    margin: 0;
    color: var(--text);
}

.greg-chat-page-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
    max-width: 720px;
    width: 100%;
    margin: 0 auto;
    padding: 0.85rem 1rem 1.25rem;
    box-sizing: border-box;
}

.greg-greg-chat-launch-hint {
    margin-top: -0.35rem;
}

.greg-chat-compose-hint {
    margin: 0 0 0.65rem;
    line-height: 1.4;
}

.greg-chat-shell.is-hidden {
    display: none;
}

.greg-chat-blocked {
    padding: 1rem 1.1rem;
    border-radius: 12px;
    border: 1px solid rgba(229, 115, 115, 0.35);
    background: rgba(229, 115, 115, 0.08);
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.45;
}

.greg-chat-blocked.is-hidden {
    display: none;
}

.greg-chat-page .greg-wa-chrome {
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
    margin-top: 0;
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
    font-family: "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", sans-serif;
}

.greg-chat-page .greg-chat-log {
    flex: 1;
    max-height: none;
    min-height: 12rem;
}
