:root,
html[data-theme="light"] {
    color-scheme: light;
    --bg: #f8fafc;
    --bg-elev: #ffffff;
    --surface: #ffffff;
    --ink: #0f172a;
    --ink-strong: #020617;
    --text: var(--ink);
    --muted: #64748b;
    --line: rgba(15, 23, 42, 0.08);
    --line-strong: rgba(15, 23, 42, 0.14);
    --border: var(--line-strong);
    --accent: #0f766e;
    --accent-bright: #14b8a6;
    --accent-deep: #0d5c56;
    --accent-dim: rgba(15, 118, 110, 0.08);
    --primary: #0f766e;
    --primary-hover: #0d9488;
    --secondary: #0d5c56;
    --warm: #ea580c;
    --warm-ink: #fff7ed;
    --danger: #dc2626;
    --danger-bg: #fef2f2;
    --success: #16a34a;
    --success-bg: #f0fdf4;
    --warning: #d97706;
    --warning-bg: #fffbeb;
    --btn-primary-fg: #ffffff;
    --btn-primary-shadow: rgba(15, 118, 110, 0.25);
    --btn-ghost-hover-bg: rgba(15, 23, 42, 0.05);
    --btn-ghost-hover-border: rgba(15, 23, 42, 0.2);
    --shadow-xs: 0 1px 2px 0 rgba(0, 0, 0, 0.04);
    --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.06), 0 1px 2px -1px rgba(0, 0, 0, 0.06);
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.06), 0 2px 4px -2px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.06), 0 4px 6px -4px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.08), 0 8px 10px -6px rgba(0, 0, 0, 0.06);
    --shadow-xl: 0 25px 50px -12px rgba(0, 0, 0, 0.15);
    --radius: 14px;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-pill: 9999px;
    --ease: cubic-bezier(0.16, 1, 0.3, 1);
    --font: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --brand-mark: #0f766e;
    --brand-dot: #ea580c;
    --header-bg: rgba(248, 250, 252, 0.88);
    --cal-today: rgba(15, 118, 110, 0.08);
    --event: #8b5cf6;
    --ring-focus: rgba(15, 118, 110, 0.2);
}

html[data-theme="dark"] {
    color-scheme: dark;
    --bg: #090d16;
    --bg-elev: #0f172a;
    --surface: #131d31;
    --ink: #f1f5f9;
    --ink-strong: #ffffff;
    --text: var(--ink);
    --muted: #94a3b8;
    --line: rgba(241, 245, 249, 0.08);
    --line-strong: rgba(241, 245, 249, 0.15);
    --border: var(--line-strong);
    --accent: #2dd4bf;
    --accent-bright: #5eead4;
    --accent-deep: #14b8a6;
    --accent-dim: rgba(45, 212, 191, 0.12);
    --primary: #2dd4bf;
    --primary-hover: #5eead4;
    --secondary: #14b8a6;
    --warm: #fb923c;
    --warm-ink: #1c0e04;
    --danger: #f87171;
    --danger-bg: rgba(239, 68, 68, 0.14);
    --success: #4ade80;
    --success-bg: rgba(34, 197, 94, 0.14);
    --warning: #fbbf24;
    --warning-bg: rgba(245, 158, 11, 0.14);
    --btn-primary-fg: #04201c;
    --btn-primary-shadow: rgba(45, 212, 191, 0.28);
    --btn-ghost-hover-bg: rgba(255, 255, 255, 0.06);
    --btn-ghost-hover-border: rgba(241, 245, 249, 0.22);
    --shadow-xs: 0 1px 2px 0 rgba(0, 0, 0, 0.2);
    --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.3), 0 1px 2px -1px rgba(0, 0, 0, 0.3);
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.35), 0 2px 4px -2px rgba(0, 0, 0, 0.35);
    --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.4), 0 4px 6px -4px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.45), 0 8px 10px -6px rgba(0, 0, 0, 0.4);
    --shadow-xl: 0 25px 50px -12px rgba(0, 0, 0, 0.55);
    --brand-mark: #2dd4bf;
    --brand-dot: #fb923c;
    --header-bg: rgba(9, 13, 22, 0.88);
    --cal-today: rgba(45, 212, 191, 0.1);
    --event: #a78bfa;
    --ring-focus: rgba(45, 212, 191, 0.25);
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

body {
    margin: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    font-family: var(--font);
    background: var(--bg);
    color: var(--ink);
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
    transition: background-color 0.25s var(--ease), color 0.25s var(--ease);
}

body > main {
    flex: 1;
}

html.workspace,
html.workspace body {
    height: 100%;
    height: 100dvh;
    max-height: 100%;
    max-height: 100dvh;
    overflow: hidden;
}

html.workspace body {
    display: flex;
    flex-direction: column;
}

html.workspace .site-header {
    flex: 0 0 auto;
    position: relative;
    z-index: 40;
    padding: 0.5rem 0;
}

html.workspace .site-header .container {
    width: calc(100% - 2rem);
    max-width: none;
}

html.workspace .site-nav {
    flex-wrap: nowrap;
}

.container {
    width: min(1200px, calc(100% - 2rem));
    margin: 0 auto;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 40;
    background: var(--header-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--line);
    padding: 0.75rem 0;
}

.site-header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    position: relative;
}

.site-footer {
    margin-top: auto;
    padding: 1.5rem 0;
    border-top: 1px solid var(--line);
    font-size: 0.88rem;
    color: var(--muted);
}

.site-footer-inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

.site-footer a {
    color: var(--muted);
    text-decoration: none;
    margin-left: 1rem;
}

.site-footer a:hover {
    color: var(--ink);
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1rem;
}

.footer-links a { margin-left: 0; }

.brand {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    font-weight: 700;
    font-size: 1.15rem;
    color: var(--ink-strong);
    text-decoration: none;
    letter-spacing: -0.02em;
}

.brand-icon {
    width: 2rem;
    height: 2rem;
    color: var(--brand-mark);
    flex-shrink: 0;
}

.brand span {
    display: inline-flex;
    align-items: baseline;
    gap: 0.35rem;
}

.brand-mark {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    color: var(--ink-strong);
    font-weight: 750;
    letter-spacing: -0.025em;
    text-decoration: none;
}

.brand-mark:hover { text-decoration: none; }
.brand-mark svg { width: 2rem; height: 2rem; color: var(--brand-mark); }
.mark-ring, .mark-hand { stroke: currentColor; }
.mark-dot { fill: var(--brand-dot); }

.site-nav {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.35rem 0.5rem;
}

.site-nav a {
    color: var(--muted);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    padding: 0.5rem 0.75rem;
    border-radius: var(--radius-pill);
    transition: all 0.15s var(--ease);
}

.site-nav a:hover {
    color: var(--ink);
    background: var(--btn-ghost-hover-bg);
}

.nav-toggle {
    display: none;
    place-items: center;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: var(--radius-pill);
    border: 1px solid var(--line);
    background: transparent;
    color: var(--ink);
    cursor: pointer;
    padding: 0;
}

.nav-toggle svg { width: 1.2rem; height: 1.2rem; }

.theme-toggle {
    display: inline-grid;
    place-items: center;
    width: 2.5rem;
    height: 2.5rem;
    min-width: 2.5rem;
    border-radius: var(--radius-pill);
    border: 1px solid var(--line);
    background: transparent;
    color: var(--ink);
    cursor: pointer;
    padding: 0;
    margin: 0;
    transition: all 0.15s var(--ease);
}

.theme-toggle:hover {
    background: var(--btn-ghost-hover-bg);
    border-color: var(--btn-ghost-hover-border);
}

.theme-toggle svg { width: 1.15rem; height: 1.15rem; }
.theme-toggle .icon-sun { display: none; }
.theme-toggle .icon-moon { display: block; }
html[data-theme="dark"] .theme-toggle .icon-sun { display: block; }
html[data-theme="dark"] .theme-toggle .icon-moon { display: none; }

a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }

main {
    padding: 1.75rem 0 3rem;
}

h1, h2, h3, h4 {
    color: var(--ink-strong);
    letter-spacing: -0.025em;
    line-height: 1.25;
}

h1 { margin: 0 0 0.5rem; font-size: clamp(1.4rem, 2.2vw, 1.85rem); }
h2 { margin: 1.5rem 0 0.6rem; font-size: 1.25rem; }
h3 { margin: 0 0 0.5rem; font-size: 1.05rem; }
h4 { margin: 1rem 0 0.4rem; font-size: 0.95rem; }

.subtitle {
    color: var(--muted);
    margin: 0 0 1rem;
    font-size: 0.92rem;
}

.hint {
    display: block;
    color: var(--muted);
    font-size: 0.8rem;
    font-weight: 400;
    margin-top: 0.3rem;
}

label {
    display: block;
    margin: 0.85rem 0 0;
    font-weight: 600;
    font-size: 0.88rem;
    color: var(--ink);
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="tel"],
input[type="search"],
input[type="date"],
input[type="time"],
input[type="number"],
select,
textarea {
    width: 100%;
    padding: 0.6rem 0.85rem;
    border: 1px solid var(--line-strong);
    background: var(--surface);
    color: var(--ink);
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 0.92rem;
    margin-top: 0.35rem;
    transition: border-color 0.15s var(--ease), box-shadow 0.15s var(--ease);
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--ring-focus);
}

textarea {
    min-height: 84px;
    resize: vertical;
}

.form-grid { display: grid; gap: 0.85rem; }

.form-inline {
    display: flex;
    align-items: end;
    flex-wrap: wrap;
    gap: 0.65rem;
}

.check-row,
.consent-row {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    margin: 0;
    font-weight: 500;
}

.check-row input,
.consent-row input {
    width: auto;
    margin: 0.2rem 0 0;
    flex: 0 0 auto;
}

.field-error { color: var(--danger); font-size: 0.8rem; margin-top: 0.35rem; }
.loading { padding: 2rem 0; color: var(--muted); text-align: center; }

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    padding: 0.55rem 1.15rem;
    min-height: 40px;
    border-radius: var(--radius-pill);
    font-family: inherit;
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    border: 1px solid transparent;
    transition: all 0.15s var(--ease);
    white-space: nowrap;
}

.btn-primary {
    background: var(--primary);
    color: var(--btn-primary-fg);
    box-shadow: 0 2px 8px var(--btn-primary-shadow);
}

.btn-primary:hover {
    background: var(--primary-hover);
    text-decoration: none;
    transform: translateY(-1px);
}

.btn-secondary {
    background: var(--surface);
    color: var(--ink);
    border-color: var(--line-strong);
}

.btn-secondary:hover {
    background: var(--btn-ghost-hover-bg);
    border-color: var(--btn-ghost-hover-border);
    text-decoration: none;
}

.btn-danger {
    background: var(--danger);
    color: #ffffff;
}

.btn-danger:hover {
    filter: brightness(0.92);
    text-decoration: none;
}

.btn-ghost {
    background: transparent;
    color: var(--ink);
    border-color: var(--line);
}

.btn-ghost:hover {
    background: var(--btn-ghost-hover-bg);
    border-color: var(--btn-ghost-hover-border);
    text-decoration: none;
}

.btn-sm {
    padding: 0.4rem 0.8rem;
    min-height: 32px;
    font-size: 0.82rem;
    border-radius: var(--radius-pill);
}

.btn-icon {
    padding: 0.4rem;
    width: 36px;
    height: 36px;
    min-height: 36px;
    border-radius: var(--radius-pill);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn:disabled,
.btn[disabled] {
    opacity: 0.55;
    cursor: not-allowed;
    transform: none !important;
}

.seg-control {
    display: inline-flex;
    padding: 0.2rem;
    gap: 0.15rem;
    border: 1px solid var(--line);
    border-radius: var(--radius-pill);
    background: var(--bg);
}

.seg-control button {
    min-height: 34px;
    padding: 0.35rem 0.7rem;
    border: 0;
    border-radius: var(--radius-pill);
    background: transparent;
    color: var(--muted);
    cursor: pointer;
    font: inherit;
    font-size: 0.82rem;
    font-weight: 600;
}

.seg-control button.active {
    background: var(--surface);
    color: var(--ink-strong);
    box-shadow: var(--shadow-xs);
}

/* SVG Icons */
.icon-svg {
    width: 1.15rem;
    height: 1.15rem;
    flex-shrink: 0;
    display: inline-block;
    vertical-align: middle;
}

.icon-sm { width: 0.95rem; height: 0.95rem; }
.icon-md { width: 1.25rem; height: 1.25rem; }
.icon-lg { width: 1.75rem; height: 1.75rem; }
.icon-empty { width: 2.25rem; height: 2.25rem; color: var(--accent); opacity: 0.85; }

/* Avatars */
.avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-pill);
    font-weight: 700;
    letter-spacing: -0.02em;
    flex-shrink: 0;
    user-select: none;
}

.avatar-sm { width: 26px; height: 26px; font-size: 0.72rem; }
.avatar-md { width: 36px; height: 36px; font-size: 0.84rem; }
.avatar-lg { width: 48px; height: 48px; font-size: 1.1rem; }

/* Toggle Switch Control */
.toggle-control {
    display: inline-flex;
    align-items: flex-start;
    gap: 0.75rem;
    cursor: pointer;
    margin: 0.75rem 0;
    user-select: none;
}

.toggle-control.is-disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.toggle-input {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

.toggle-slider {
    position: relative;
    width: 42px;
    height: 24px;
    background-color: var(--line-strong);
    border-radius: 9999px;
    transition: background-color 0.2s var(--ease);
    flex-shrink: 0;
    margin-top: 2px;
}

.toggle-slider::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 18px;
    height: 18px;
    background-color: #ffffff;
    border-radius: 50%;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
    transition: transform 0.2s var(--ease);
}

.toggle-input:checked + .toggle-slider {
    background-color: var(--primary);
}

.toggle-input:checked + .toggle-slider::after {
    transform: translateX(18px);
}

.toggle-input:focus-visible + .toggle-slider {
    outline: none;
    box-shadow: 0 0 0 3px var(--ring-focus);
}

.toggle-label-wrap {
    display: flex;
    flex-direction: column;
}

.toggle-label {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--ink);
}

/* Badges */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.2rem 0.65rem;
    border-radius: var(--radius-pill);
    font-size: 0.75rem;
    font-weight: 600;
    background: var(--accent-dim);
    color: var(--accent-deep);
    line-height: 1.2;
}

html[data-theme="dark"] .badge { color: var(--accent-bright); }

.badge-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background-color: currentColor;
    display: inline-block;
}

.badge-success { background: var(--success-bg); color: var(--success); }
.badge-warn { background: var(--warning-bg); color: var(--warning); }
.badge-danger { background: var(--danger-bg); color: var(--danger); }

/* Alerts */
.alert {
    padding: 0.85rem 1rem;
    border-radius: var(--radius-sm);
    margin: 0.75rem 0;
    font-size: 0.9rem;
    border: 1px solid transparent;
}

.alert-error { background: var(--danger-bg); color: var(--danger); border-color: rgba(220, 38, 38, 0.2); }
.alert-success { background: var(--success-bg); color: var(--success); border-color: rgba(22, 163, 74, 0.2); }

/* Cards */
.card,
.dashboard-card,
.auth-card,
.panel-card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
}

.panel-wide { max-width: 1360px; width: 100%; margin: 0 auto; }

.page-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
    padding-bottom: 1.25rem;
    margin-bottom: 1.25rem;
    border-bottom: 1px solid var(--line);
}

.page-header h1 { margin: 0; }
.page-header-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 0.5rem; }
.list-row { padding: 1rem 0; border-bottom: 1px solid var(--line); }
.list-row:last-child { border-bottom: 0; }

/* Workspace: locked viewport. Sidebar is chrome. Only .org-stage scrolls. */
.workspace-main {
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 0;
    flex: 1 0 auto;
}

body.org-nav-locked {
    overflow: hidden;
}

.auth-split {
    display: grid;
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
    gap: 1.5rem;
    align-items: stretch;
    max-width: 880px;
    margin: 0 auto;
}

.auth-aside {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 1.5rem;
}

.auth-aside h2 { margin-top: 1rem; }
.auth-switch { margin-top: 1rem; color: var(--muted); font-size: 0.9rem; }

.guide-shell {
    display: grid;
    grid-template-columns: minmax(200px, 240px) minmax(0, 1fr);
    gap: 1.5rem;
    align-items: start;
}

.kvkk-draft-banner {
    padding: 0.75rem 1rem;
    background: var(--warning-bg);
    color: var(--warning);
    border-radius: var(--radius-sm);
    font-size: 0.88rem;
}

.legal-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem 1.25rem;
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid var(--line);
}

.org-shell {
    display: grid;
    grid-template-columns: 16rem minmax(0, 1fr);
    grid-template-rows: minmax(0, 1fr);
    gap: 0;
    flex: 1 1 auto;
    min-height: 0;
    width: 100%;
    max-width: none;
    margin: 0;
    overflow: hidden;
}

.org-mobile-bar {
    display: none;
}

.org-nav-backdrop {
    display: none;
}

.org-sidebar {
    grid-column: 1;
    grid-row: 1;
    position: relative;
    align-self: stretch;
    min-height: 0;
    height: 100%;
    background: var(--surface);
    border: 0;
    border-right: 1px solid var(--line);
    border-radius: 0;
    box-shadow: none;
    padding: 1rem 0.85rem 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    overflow-x: hidden;
    overflow-y: auto;
    max-height: none;
    scrollbar-width: thin;
    overscroll-behavior: contain;
}

.org-stage {
    grid-column: 2;
    grid-row: 1;
    min-width: 0;
    min-height: 0;
    height: 100%;
    overflow: auto;
    background: var(--bg);
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    overscroll-behavior: contain;
}

.org-brand-box {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--line);
}

.org-brand-box h1 {
    font-size: 1.1rem;
    margin: 0;
    font-weight: 700;
}

.org-brand-box .subtitle {
    font-size: 0.82rem;
    margin: 0;
    color: var(--muted);
}

.org-quick-links {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.org-quick-links .btn {
    width: 100%;
}

.org-public-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    gap: 0.4rem;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--primary);
    text-decoration: none;
    padding: 0.45rem 0.65rem;
    border-radius: var(--radius-sm);
    background: var(--accent-dim);
    transition: all 0.15s var(--ease);
}

.org-public-link:hover {
    background: var(--primary);
    color: var(--btn-primary-fg);
    text-decoration: none;
}

.panel-nav {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    margin: 0;
    padding: 0;
    flex: 1 1 auto;
}

.panel-nav-group {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.panel-nav-heading {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 700;
    color: var(--muted);
    padding: 0.25rem 0.65rem 0.25rem;
}

.tab-btn {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    width: 100%;
    padding: 0.55rem 0.75rem;
    min-height: 38px;
    border: 1px solid transparent;
    background: transparent;
    color: var(--muted);
    border-radius: var(--radius-md);
    cursor: pointer;
    font-family: inherit;
    font-weight: 600;
    font-size: 0.88rem;
    text-align: left;
    transition: all 0.15s var(--ease);
}

.tab-btn .tab-icon {
    width: 1.1rem;
    height: 1.1rem;
    color: var(--muted);
    transition: color 0.15s var(--ease);
}

.tab-btn:hover {
    color: var(--ink-strong);
    background: var(--btn-ghost-hover-bg);
}

.tab-btn:hover .tab-icon {
    color: var(--ink);
}

.tab-btn.active {
    background: var(--accent-dim);
    color: var(--primary);
    border-color: rgba(15, 118, 110, 0.18);
}

html[data-theme="dark"] .tab-btn.active {
    border-color: rgba(45, 212, 191, 0.25);
}

.tab-btn.active .tab-icon {
    color: var(--primary);
}

.org-sidebar-guide {
    margin-top: auto;
    padding: 0.55rem 0.75rem;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--muted);
    text-decoration: none;
    border-radius: var(--radius-md);
}

.org-sidebar-guide:hover {
    color: var(--ink);
    background: var(--btn-ghost-hover-bg);
    text-decoration: none;
}

.org-main {
    min-width: 0;
    width: 100%;
    max-width: 1120px;
    padding: 1.35rem 1.75rem 2.5rem;
    background: transparent;
}

.tab-panel {
    animation: fadeIn 0.18s var(--ease);
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(4px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Header & Section Intros */
.panel-section-intro {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1.25rem;
    padding-bottom: 0.85rem;
    border-bottom: 1px solid var(--line);
}

.panel-section-intro h2 {
    margin: 0;
    font-size: 1.25rem;
}

.panel-section-intro p {
    margin: 0.25rem 0 0;
    color: var(--muted);
    font-size: 0.88rem;
}

.panel-section-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.panel-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    align-items: center;
    margin-bottom: 1.25rem;
    padding: 0.75rem;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
}

.panel-toolbar select,
.panel-toolbar input {
    width: auto;
    min-width: 140px;
    flex: 1;
    margin-top: 0;
}

.field-inline {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--muted);
}

/* KPI Stat Cards */
.kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.kpi-card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 1.15rem;
    box-shadow: var(--shadow-xs);
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    transition: border-color 0.15s var(--ease), box-shadow 0.15s var(--ease);
}

.kpi-card:hover {
    border-color: var(--line-strong);
    box-shadow: var(--shadow-sm);
}

.kpi-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: var(--muted);
    font-size: 0.82rem;
    font-weight: 600;
}

.kpi-value {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--ink-strong);
    line-height: 1.1;
    letter-spacing: -0.03em;
}

.kpi-footer {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.78rem;
    color: var(--muted);
}

/* Wizard / Setup Progress Bar */
.wizard-card {
    background: linear-gradient(145deg, var(--surface), var(--accent-dim));
    border: 1px solid rgba(15, 118, 110, 0.18);
    border-radius: var(--radius);
    padding: 1.25rem 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow-sm);
}

.wizard-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.75rem;
}

.wizard-header h3 { margin: 0; font-size: 1rem; }

.wizard-progress-bar {
    width: 100%;
    height: 8px;
    background: var(--line);
    border-radius: var(--radius-pill);
    overflow: hidden;
    margin-bottom: 1rem;
}

.wizard-progress-fill {
    height: 100%;
    background: var(--primary);
    border-radius: var(--radius-pill);
    transition: width 0.4s var(--ease);
}

.wizard-steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 0.75rem;
}

.wizard-step-item {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.65rem 0.85rem;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    font-size: 0.84rem;
    font-weight: 600;
}

.wizard-step-item.is-done {
    border-color: rgba(22, 163, 74, 0.25);
    background: var(--success-bg);
    color: var(--success);
}

.wizard-step-item.is-pending {
    color: var(--ink);
}

.wizard-step-item .btn-wizard-action {
    margin-left: auto;
}

/* Calendar & Time Grid */
.cal-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
    margin-bottom: 1rem;
}

.cal-title {
    font-weight: 700;
    font-size: 1.1rem;
    margin: 0 0.5rem;
    color: var(--ink-strong);
}

.cal-grid {
    background: var(--surface);
    border-radius: var(--radius);
    padding: 0.85rem;
    border: 1px solid var(--line);
    box-shadow: var(--shadow-sm);
}

.cal-month-head,
.cal-month-body,
.cal-week {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 6px;
}

.cal-month-head span {
    text-align: center;
    font-weight: 700;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--muted);
    padding: 0.35rem 0.25rem;
}

.cal-cell,
.cal-week-col {
    min-height: 94px;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    padding: 6px;
    background: var(--bg);
    display: flex;
    flex-direction: column;
    gap: 3px;
    transition: all 0.12s var(--ease);
}

.cal-cell:hover {
    border-color: var(--line-strong);
}

.cal-cell.cal-empty { background: transparent; border-color: transparent; }
.cal-cell.cal-today { border-color: var(--primary); background: var(--cal-today); }

.cal-date {
    font-size: 0.78rem;
    font-weight: 700;
    margin-bottom: 2px;
    color: var(--muted);
}

.cal-today .cal-date {
    color: var(--primary);
}

.cal-chip {
    display: block;
    width: 100%;
    text-align: left;
    font-size: 0.74rem;
    padding: 4px 6px;
    border: none;
    border-radius: 6px;
    background: var(--surface);
    color: var(--ink);
    border-left: 3px solid var(--primary);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    cursor: pointer;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-family: inherit;
    font-weight: 600;
    transition: transform 0.1s var(--ease), box-shadow 0.1s var(--ease);
}

.cal-chip:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
}

.cal-chip.is-confirmed {
    border-left-color: var(--success);
}

.cal-chip.is-pending {
    border-left-color: var(--warning);
}

.cal-chip.cal-event {
    border-left-color: var(--event);
}

.cal-chip.is-cancel-req {
    border-left-color: var(--danger);
    background: var(--danger-bg);
}

/* Split Panel for CRM & Contacts */
.split-panel {
    display: grid;
    grid-template-columns: minmax(260px, 320px) minmax(0, 1fr);
    gap: 1.25rem;
    align-items: start;
}

.split-left {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: visible;
    max-height: none;
    background: var(--surface);
    display: flex;
    flex-direction: column;
}

.split-right {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 1.5rem;
    background: var(--surface);
    box-shadow: var(--shadow-sm);
}

.client-row-wrap {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    border-bottom: 1px solid var(--line);
    padding: 0 0.5rem;
    transition: background-color 0.12s var(--ease);
}

.client-row-wrap:hover {
    background-color: var(--btn-ghost-hover-bg);
}

.client-row-wrap .contact-pick { margin: 0; }

.client-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    width: 100%;
    text-align: left;
    padding: 0.85rem 0.5rem;
    min-height: 52px;
    border: none;
    background: transparent;
    color: inherit;
    cursor: pointer;
    font-family: inherit;
}

.client-row-content {
    display: flex;
    flex-direction: column;
    min-width: 0;
    flex: 1;
}

.client-row-name {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--ink-strong);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.client-row small {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    color: var(--muted);
    font-size: 0.76rem;
    margin-top: 0.15rem;
    flex-wrap: wrap;
}

.client-row.is-active,
.client-row-wrap:has(.client-row.is-active) {
    background: var(--accent-dim);
}

/* Contact Details */
.contact-profile-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    padding-bottom: 1.25rem;
    border-bottom: 1px solid var(--line);
    margin-bottom: 1.25rem;
}

.contact-profile-identity {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.contact-quick-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.25rem;
}

/* Activity Timeline */
.timeline {
    list-style: none;
    padding: 0;
    margin: 1rem 0;
    position: relative;
}

.timeline::before {
    content: '';
    position: absolute;
    top: 8px;
    bottom: 8px;
    left: 15px;
    width: 2px;
    background: var(--line-strong);
}

.timeline-item {
    position: relative;
    padding-left: 2.25rem;
    margin-bottom: 1rem;
}

.timeline-dot {
    position: absolute;
    left: 8px;
    top: 4px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--surface);
    border: 2px solid var(--primary);
    transform: translateX(-50%);
}

.timeline-content {
    background: var(--bg);
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    padding: 0.75rem 0.9rem;
    font-size: 0.88rem;
}

.timeline-time {
    display: block;
    font-size: 0.75rem;
    color: var(--muted);
    margin-bottom: 0.25rem;
}

/* Schedule Planner & Hours */
.schedule-grid {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    margin: 1rem 0 1.5rem;
}

.hours-day {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.75rem;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    padding: 0.75rem 1rem;
    background: var(--surface);
    margin: 0;
}

.hours-day-name {
    font-weight: 700;
    font-size: 0.9rem;
    min-width: 100px;
}

.hours-day-times {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.hours-day-times label {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    margin: 0;
    font-size: 0.84rem;
    font-weight: 500;
    color: var(--muted);
}

.hours-day-times input[type="time"] {
    width: auto;
    padding: 0.35rem 0.5rem;
    margin: 0;
}

/* Brand Studio & Preview */
.brand-preview-card {
    border-radius: var(--radius);
    padding: 1.5rem;
    margin: 1.25rem 0;
    background: var(--surface);
    border: 2px solid var(--line-strong);
    box-shadow: var(--shadow-sm);
}

.brand-preview-header {
    padding: 1.5rem;
    border-radius: var(--radius-sm);
    background: linear-gradient(135deg, var(--primary), var(--secondary, var(--accent-deep)));
    color: #ffffff;
    text-align: center;
    margin-bottom: 1rem;
}

.brand-preview-header h3 { color: #ffffff; margin: 0 0 0.25rem; }
.brand-preview-header p { margin: 0; opacity: 0.9; font-size: 0.88rem; }

/* Modals & Slide-over Drawers */
.modal {
    position: fixed;
    inset: 0;
    background: rgba(4, 9, 20, 0.6);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
    padding: 1rem;
    animation: fadeIn 0.15s var(--ease);
}

.modal-content {
    background: var(--surface);
    padding: 1.75rem;
    border-radius: var(--radius);
    max-width: 540px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-xl);
    border: 1px solid var(--line-strong);
}

.modal-wide { max-width: 680px; }

.modal-actions,
.drawer-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 0.65rem;
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid var(--line);
}

/* Toast System */
.toast-host {
    position: fixed;
    right: 1.25rem;
    bottom: 1.25rem;
    z-index: 200;
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    max-width: min(380px, calc(100% - 2.5rem));
}

.toast {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    background: var(--ink-strong);
    color: var(--bg);
    padding: 0.85rem 1.15rem;
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-lg);
    font-size: 0.9rem;
    font-weight: 600;
    animation: toastSlideIn 0.22s var(--ease);
}

.toast-fadeout {
    opacity: 0;
    transform: translateY(8px);
    transition: all 0.25s var(--ease);
}

@keyframes toastSlideIn {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}

.toast-error { background: var(--danger); color: #ffffff; }
.toast-success { background: var(--success); color: #ffffff; }

/* Empty States */
.empty-state {
    text-align: center;
    padding: 2.5rem 1.5rem;
    color: var(--muted);
    background: var(--surface);
    border: 1px dashed var(--line-strong);
    border-radius: var(--radius);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.empty-state-icon { margin-bottom: 0.25rem; }
.empty-state h3 { margin: 0; color: var(--ink-strong); font-size: 1.1rem; }
.empty-state p { margin: 0; font-size: 0.88rem; max-width: 420px; }
.empty-state-action { margin-top: 0.75rem; }

/* Tables */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 1rem 0; }

.data-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 500px;
}

.data-table th,
.data-table td {
    border-bottom: 1px solid var(--line);
    padding: 0.75rem 0.85rem;
    text-align: left;
    vertical-align: middle;
    font-size: 0.88rem;
}

.data-table th {
    background: var(--bg);
    font-size: 0.76rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 700;
    color: var(--muted);
}

.data-table tbody tr:hover {
    background: var(--btn-ghost-hover-bg);
}

/* Utilities */
.hidden { display: none !important; }
.text-muted { color: var(--muted); }
.text-success { color: var(--success); }
.text-danger { color: var(--danger); }
.text-warning { color: var(--warning); }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.gap-sm { gap: 0.5rem; }
.gap-md { gap: 1rem; }

/* Responsive adjustments */
/* Public Booking Page & Form Components */
.booking-page { max-width: 820px; margin: 0 auto; }
.booking-schedule-grid,
.public-two-column {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(240px, 1fr);
    gap: 1.5rem;
    align-items: start;
}
.public-two-column { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.75rem; }
.booking-logo { max-height: 72px; max-width: 220px; margin: 0 auto 0.75rem; display: block; }
.booking-header { text-align: center; margin-bottom: 1.5rem; }
.booking-tabs {
    display: flex;
    flex-wrap: nowrap;
    gap: 0.5rem;
    margin-bottom: 1.25rem;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 0.25rem;
}

.booking-user-banner {
    background: var(--accent-dim);
    padding: 0.65rem 1rem;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    border: 1px solid rgba(15, 118, 110, 0.15);
}

.service-card {
    border-radius: var(--radius);
    background: var(--surface);
    transition: all 0.15s var(--ease);
}

.service-card:hover {
    border-color: var(--primary) !important;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.slot-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 0.5rem;
}

.slot-chip {
    border: 1px solid var(--line-strong);
    background: var(--surface);
    color: var(--ink);
    border-radius: var(--radius-pill);
    padding: 0.6rem 0.75rem;
    min-height: 40px;
    cursor: pointer;
    font-family: inherit;
    font-weight: 600;
    font-size: 0.84rem;
    text-align: center;
    transition: all 0.12s var(--ease);
}

.slot-chip:hover {
    border-color: var(--primary);
    background: var(--btn-ghost-hover-bg);
}

.slot-chip.is-selected {
    background: var(--primary);
    color: var(--btn-primary-fg);
    border-color: var(--primary);
    box-shadow: 0 2px 8px var(--btn-primary-shadow);
}

.legal-page { max-width: 760px; margin: 0 auto; }
.legal-card { padding: clamp(1.25rem, 4vw, 2rem); }
.form-or { margin: 0.5rem 0 -0.25rem; color: var(--muted); text-align: center; font-size: 0.84rem; }
.success-panel {
    padding: 1rem;
    margin-top: 1rem;
    border: 1px solid rgba(22, 163, 74, 0.3);
    background: var(--success-bg);
    color: var(--success);
    border-radius: var(--radius-sm);
    font-weight: 600;
}
.public-consent {
    padding: 0.85rem;
    margin: 1rem 0;
    background: var(--bg);
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
}
.public-consent .consent-row { margin: 0; font-size: 0.84rem; }

/* Responsive adjustments */
@media (max-width: 960px) {
    html.workspace .site-nav {
        display: flex;
    }
    html.workspace .nav-toggle {
        display: none;
    }
    .org-shell {
        display: flex;
        flex-direction: column;
        position: relative;
        overflow: hidden;
        min-height: 0;
    }
    .org-mobile-bar {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 1rem;
        margin: 0.75rem 0.75rem 0;
        padding: 0.75rem 1rem;
        background: var(--surface);
        border: 1px solid var(--line);
        border-radius: var(--radius);
        box-shadow: var(--shadow-sm);
    }
    .org-mobile-bar div {
        min-width: 0;
        display: grid;
        gap: 0.15rem;
    }
    .org-mobile-bar strong {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
    .org-mobile-bar span {
        color: var(--muted);
        font-size: 0.8rem;
    }
    .org-nav-backdrop {
        display: none;
        position: fixed;
        inset: 0;
        z-index: 80;
        background: rgba(4, 9, 20, 0.45);
    }
    .org-shell.nav-open .org-nav-backdrop {
        display: block;
    }
    .org-sidebar {
        position: fixed;
        top: 0;
        left: 0;
        bottom: 0;
        width: min(19rem, 88vw);
        height: 100%;
        z-index: 90;
        transform: translateX(-105%);
        transition: transform 0.2s var(--ease);
        overflow-y: auto;
        border-right: 1px solid var(--line);
        box-shadow: var(--shadow-lg);
        padding-top: 1.25rem;
    }
    .org-shell.nav-open .org-sidebar {
        transform: translateX(0);
    }
    .org-stage {
        flex: 1 1 auto;
        width: 100%;
        min-height: 0;
        height: auto;
        overflow: auto;
    }
    .org-main {
        max-width: none;
        padding: 1rem 0.75rem 2rem;
    }
    .panel-nav {
        gap: 0.85rem;
    }
    .panel-nav-group {
        flex-direction: column;
    }
    .panel-nav-heading {
        display: block;
    }
    .tab-btn {
        width: 100%;
        white-space: normal;
        min-height: 44px;
    }
}

@media (max-width: 768px) {
    .split-panel { grid-template-columns: 1fr; }
    .split-left { max-height: none; }
    .cal-cell, .cal-week-col { min-height: 60px; }
    .cal-chip { font-size: 0.68rem; }
    .cal-month-head { font-size: 0.7rem; }
    .kpi-grid { grid-template-columns: 1fr 1fr; }
    .booking-schedule-grid,
    .public-two-column { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
    .container { width: calc(100% - 1.25rem); }
    .kpi-grid { grid-template-columns: 1fr; }
    .hours-day { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 720px) {
    .nav-toggle { display: inline-grid; }
    .site-nav {
        display: none;
        position: absolute;
        top: calc(100% + 0.6rem);
        left: 0;
        right: 0;
        padding: 0.6rem;
        border: 1px solid var(--line);
        border-radius: var(--radius);
        background: var(--surface);
        box-shadow: var(--shadow-md);
        align-items: stretch;
    }
    .site-header.is-open .site-nav { display: flex; }
    .site-nav a,
    .site-nav .theme-toggle {
        width: 100%;
        justify-content: flex-start;
    }
    .site-nav .theme-toggle { display: flex; padding-left: 0.75rem; }
    html.workspace .nav-toggle { display: none; }
    html.workspace .site-nav {
        display: flex;
        position: static;
        padding: 0;
        border: 0;
        border-radius: 0;
        background: transparent;
        box-shadow: none;
        width: auto;
        align-items: center;
        flex-wrap: nowrap;
    }
    html.workspace .site-nav a,
    html.workspace .site-nav .theme-toggle {
        width: auto;
        justify-content: center;
    }
    .auth-split,
    .guide-shell { grid-template-columns: 1fr; }
    .page-header-actions { width: 100%; }
}
