/* KitaBees Design System v1 */
/* Warm, playful, Nunito-based design inspired by reference UI */

:root {
    /* Brand Colors */
    --color-kitabee-yellow: #FFD54F;
    --color-kitabee-amber: #FFC107;
    --color-kitabee-blue: #BBDEFB;
    --color-kitabee-gray: #F5F5F5;

    /* Amber tones for active/brand */
    --color-amber-800: #92400e;
    --color-amber-700: #b45309;
    --color-amber-600: #d97706;

    /* Neutrals */
    --color-bg: #F5F5F5;
    --color-surface: #ffffff;
    --color-text: #1f2937;
    --color-text-secondary: #4b5563;
    --color-text-muted: #6b7280;
    --color-border: #e5e7eb;
    --color-border-light: #f3f4f6;

    /* Semantic */
    --color-success: #16a34a;
    --color-success-bg: #dcfce7;
    --color-success-border-soft: rgba(22, 163, 74, 0.22);
    --color-warning: #ea580c;
    --color-warning-bg: #ffedd5;
    --color-warning-border-soft: rgba(234, 88, 12, 0.22);
    --color-danger: #dc2626;
    --color-danger-bg: #fee2e2;
    --color-info: #1d4ed8;
    --color-info-bg: #dbeafe;
    --color-purple: #9333ea;
    --color-purple-bg: #f3e8ff;
    --color-purple-border-soft: rgba(147, 51, 234, 0.18);
    --color-brand-soft-text: var(--color-amber-800);
    --color-pink: #db2777;
    --color-pink-bg: #fdf2f8;
    --color-pink-border-soft: rgba(219, 39, 119, 0.18);
    --color-teal: #0f766e;
    --color-teal-bg: #f0fdfa;
    --color-teal-border-soft: rgba(13, 148, 136, 0.18);
    --color-neutral-bg: #f8fafc;
    --color-neutral-border-soft: rgba(148, 163, 184, 0.22);
    --color-brand-soft: rgba(255, 213, 79, 0.12);
    --color-brand-soft-strong: rgba(255, 213, 79, 0.3);
    --color-brand-soft-subtle: rgba(255, 193, 7, 0.15);
    --color-blue-soft: rgba(187, 222, 251, 0.2);
    --color-info-border-soft: rgba(29, 78, 216, 0.2);
    --color-danger-border-soft: rgba(220, 38, 38, 0.2);
    --color-surface-overlay: rgba(255, 255, 255, 0.9);
    --color-surface-overlay-strong: rgba(255, 255, 255, 0.88);
    --color-surface-overlay-border: rgba(255, 255, 255, 0.6);
    --color-surface-warm-start: #ffffff;
    --color-surface-warm-end: #fffaf0;

    /* Spacing */
    --space-xs: 4px;
    --space-sm: 8px;
    --space-md: 12px;
    --space-lg: 16px;
    --space-xl: 24px;
    --space-2xl: 32px;
    --space-3xl: 48px;
    --space-4xl: 64px;

    /* Typography */
    --font-family: 'Nunito', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
    --font-size-xs: 12px;
    --font-size-sm: 14px;
    --font-size-base: 16px;
    --font-size-lg: 18px;
    --font-size-xl: 20px;
    --font-size-2xl: 24px;
    --font-size-3xl: 32px;
    --font-size-4xl: 40px;
    --font-size-hero: 54px;

    /* Border Radius */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    --radius-2xl: 24px;
    --radius-full: 9999px;

    /* Shadows */
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
    --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.07), 0 2px 4px -2px rgba(0,0,0,0.05);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.08), 0 4px 6px -4px rgba(0,0,0,0.05);
}

.theme-dark {
    --color-kitabee-gray: #162033;
    --color-bg: #0f172a;
    --color-surface: #1e293b;
    --color-text: #f8fafc;
    --color-text-secondary: #cbd5e1;
    --color-text-muted: #94a3b8;
    --color-border: #334155;
    --color-border-light: #243244;
    --color-success: #4ade80;
    --color-success-border-soft: rgba(74, 222, 128, 0.28);
    --color-warning: #fb923c;
    --color-warning-border-soft: rgba(251, 146, 60, 0.28);
    --color-danger: #f87171;
    --color-info: #60a5fa;
    --color-purple: #c084fc;
    --color-purple-border-soft: rgba(192, 132, 252, 0.28);
    --color-brand-soft-text: #fcd34d;
    --color-pink: #f472b6;
    --color-pink-bg: rgba(244, 114, 182, 0.15);
    --color-pink-border-soft: rgba(244, 114, 182, 0.28);
    --color-teal: #2dd4bf;
    --color-teal-bg: rgba(45, 212, 191, 0.15);
    --color-teal-border-soft: rgba(45, 212, 191, 0.28);
    --color-neutral-bg: rgba(148, 163, 184, 0.14);
    --color-neutral-border-soft: rgba(148, 163, 184, 0.28);
    --color-success-bg: rgba(22, 163, 74, 0.15);
    --color-warning-bg: rgba(234, 88, 12, 0.15);
    --color-danger-bg: rgba(220, 38, 38, 0.15);
    --color-info-bg: rgba(29, 78, 216, 0.15);
    --color-purple-bg: rgba(147, 51, 234, 0.16);
    --color-brand-soft: rgba(255, 213, 79, 0.14);
    --color-brand-soft-strong: rgba(255, 213, 79, 0.2);
    --color-brand-soft-subtle: rgba(255, 193, 7, 0.12);
    --color-sidebar-active-bg: rgba(255, 255, 255, 0.12);
    --color-sidebar-active-text: #ffffff;
    --color-blue-soft: rgba(96, 165, 250, 0.14);
    --color-info-border-soft: rgba(96, 165, 250, 0.28);
    --color-danger-border-soft: rgba(248, 113, 113, 0.28);
    --color-surface-overlay: rgba(30, 41, 59, 0.88);
    --color-surface-overlay-strong: rgba(30, 41, 59, 0.92);
    --color-surface-overlay-border: rgba(148, 163, 184, 0.18);
    --color-surface-warm-start: #1e293b;
    --color-surface-warm-end: #162033;
    color-scheme: dark;
}

.theme-transitioning,
.theme-transitioning *,
.theme-transitioning *::before,
.theme-transitioning *::after {
    transition: none !important;
}

/* Reset */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    color-scheme: light;
}

body {
    font-family: var(--font-family);
    color: var(--color-text);
    background-color: var(--color-bg);
    line-height: 1.5;
    min-height: 100vh;
}

body,
.card,
.stat-card,
.sidebar,
.top-header,
.modal,
.form-input,
.settings-row,
.settings-row-compact,
.security-row,
.support-link,
.account-stat-row,
.info-notice,
.nav-item,
table th,
table td {
    transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    line-height: 1.2;
    font-weight: 700;
    color: var(--color-text);
}

h1 { font-size: var(--font-size-4xl); letter-spacing: -0.5px; }
h2 { font-size: var(--font-size-3xl); letter-spacing: -0.3px; }
h3 { font-size: var(--font-size-2xl); }
h4 { font-size: var(--font-size-xl); }
h5 { font-size: var(--font-size-lg); }
h6 { font-size: var(--font-size-base); }

p { margin-bottom: var(--space-lg); }

a {
    color: var(--color-amber-600);
    text-decoration: none;
    transition: color 0.15s ease;
}
a:hover { color: var(--color-amber-700); }

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    padding: 10px 20px;
    font-size: var(--font-size-sm);
    font-weight: 600;
    font-family: var(--font-family);
    line-height: 1.5;
    border: 1px solid transparent;
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: all 0.15s ease;
    text-decoration: none;
    white-space: nowrap;
}
.btn:hover { opacity: 0.9; }
.btn:active { transform: scale(0.98); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

.btn-primary {
    background: var(--color-kitabee-amber);
    color: var(--color-amber-800);
    border-color: var(--color-kitabee-amber);
}
.btn-primary:hover {
    background: #e6ad00;
    color: var(--color-amber-800);
}

.btn-accent {
    background: var(--color-kitabee-amber);
    color: var(--color-amber-800);
    border-color: var(--color-kitabee-amber);
}
.btn-accent:hover {
    background: #e6ad00;
}

.btn-outline {
    background: transparent;
    color: var(--color-text);
    border-color: var(--color-border);
}
.btn-outline:hover {
    background: var(--color-border-light);
    color: var(--color-text);
}

.btn-ghost {
    background: transparent;
    color: var(--color-text-secondary);
    border: none;
}
.btn-ghost:hover {
    background: var(--color-border-light);
    color: var(--color-text);
}

.btn-danger {
    background: var(--color-danger);
    color: white;
    border-color: var(--color-danger);
}
.btn-danger:hover {
    background: #b91c1c;
}

.btn-sm, .btn-small { padding: 6px 12px; font-size: var(--font-size-xs); border-radius: var(--radius-md); }
.btn-lg { padding: 14px 28px; font-size: var(--font-size-base); border-radius: var(--radius-xl); }

/* Cards */
.card {
    background: var(--color-surface);
    border: 1px solid var(--color-border-light);
    border-radius: var(--radius-xl);
    padding: var(--space-xl);
    box-shadow: var(--shadow-sm);
}
.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--space-lg);
}
.card-title {
    font-size: var(--font-size-lg);
    font-weight: 700;
}

/* Forms */
.form-group {
    margin-bottom: var(--space-xl);
}
.form-label {
    display: block;
    font-size: var(--font-size-sm);
    font-weight: 600;
    color: var(--color-text-secondary);
    margin-bottom: var(--space-sm);
}
.form-input {
    width: 100%;
    padding: 12px 16px;
    font-size: var(--font-size-sm);
    font-family: var(--font-family);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-xl);
    background: var(--color-bg);
    color: var(--color-text);
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.form-input:focus {
    outline: none;
    border-color: var(--color-kitabee-amber);
    box-shadow: 0 0 0 3px rgba(255,193,7,0.15);
    background: var(--color-surface);
}
.form-input::placeholder {
    color: var(--color-text-muted);
}
textarea.form-input {
    min-height: 80px;
    resize: vertical;
}
select.form-input {
    cursor: pointer;
}

.form-error {
    color: var(--color-danger);
    font-size: var(--font-size-xs);
    margin-top: var(--space-xs);
}

/* Badges */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    font-size: var(--font-size-xs);
    font-weight: 600;
    border-radius: var(--radius-full);
    line-height: 1.4;
}
.badge-primary { background: var(--color-brand-soft-strong); color: var(--color-brand-soft-text); }
.badge-success, .badge-confirmed { background: var(--color-success-bg); color: var(--color-success); }
.badge-warning { background: var(--color-warning-bg); color: var(--color-warning); }
.badge-danger { background: var(--color-danger-bg); color: var(--color-danger); }
.badge-info { background: var(--color-info-bg); color: var(--color-info); }
.badge-neutral { background: var(--color-border-light); color: var(--color-text-secondary); }
.badge-requested { background: var(--color-warning-bg); color: var(--color-warning); }

/* Tables */
.table-container {
    overflow-x: auto;
}
table {
    width: 100%;
    border-collapse: collapse;
}
th {
    text-align: left;
    padding: 12px 16px;
    font-size: var(--font-size-xs);
    font-weight: 700;
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.6px;
    border-bottom: 1px solid var(--color-border);
}
td {
    padding: 14px 16px;
    font-size: var(--font-size-sm);
    border-bottom: 1px solid var(--color-border-light);
}
tr:hover td {
    background: var(--color-border-light);
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: var(--space-4xl) var(--space-xl);
    color: var(--color-text-muted);
}
.empty-state h2 {
    font-size: var(--font-size-xl);
    margin-bottom: var(--space-sm);
    color: var(--color-text);
}
.empty-state p {
    margin-bottom: var(--space-xl);
}
.empty-state .emoji {
    font-size: 48px;
    margin-bottom: var(--space-lg);
    display: block;
}

/* Loading */
.loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-3xl);
    color: var(--color-text-muted);
}
.spinner {
    width: 24px;
    height: 24px;
    border: 3px solid var(--color-border);
    border-top-color: var(--color-kitabee-amber);
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
    margin-right: var(--space-sm);
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Alerts / Feedback */
.alert {
    padding: var(--space-md) var(--space-lg);
    border-radius: var(--radius-xl);
    font-size: var(--font-size-sm);
    margin-bottom: var(--space-lg);
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}
.alert-success { background: var(--color-success-bg); color: var(--color-success); }
.alert-danger { background: var(--color-danger-bg); color: var(--color-danger); }
.alert-warning { background: var(--color-warning-bg); color: var(--color-warning); }
.alert-info { background: var(--color-info-bg); color: var(--color-info); }

/* Dialog / Modal Overlay */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.forms-qr-modal {
    width: min(100%, 460px);
}

.forms-qr-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: var(--space-md);
}

.forms-qr-heading .modal-title {
    margin-top: var(--space-sm);
}

.forms-qr-image {
    display: grid;
    place-items: center;
    margin: var(--space-lg) 0;
}

.forms-qr-image img {
    width: min(280px, 82vw);
    padding: var(--space-md);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    background: #fff;
}

.forms-qr-link {
    overflow-wrap: anywhere;
    padding: var(--space-md);
    border-radius: var(--radius-md);
    color: var(--color-text-muted);
    background: var(--color-surface-muted);
    font-size: 0.82rem;
}
.modal {
    background: var(--color-surface);
    border-radius: var(--radius-2xl);
    padding: var(--space-2xl);
    max-width: 520px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
}
.modal-title {
    font-size: var(--font-size-xl);
    font-weight: 700;
    margin-bottom: var(--space-lg);
}
.modal-actions {
    display: flex;
    gap: var(--space-sm);
    justify-content: flex-end;
    margin-top: var(--space-xl);
}

.wardrobe-panel-autocomplete {
    position: relative;
}

.wardrobe-panel-suggestions {
    position: absolute;
    top: calc(100% + var(--space-xs));
    left: 0;
    right: 0;
    z-index: 1050;
    display: grid;
    gap: var(--space-xs);
    padding: var(--space-xs);
    border-radius: var(--radius-lg);
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    box-shadow: var(--shadow-lg);
}

.wardrobe-panel-suggestion {
    appearance: none;
    display: block;
    width: 100%;
    border: none;
    border-radius: var(--radius-md);
    background: transparent;
    color: var(--color-text);
    text-align: left;
    padding: 0.75rem 0.85rem;
    font: inherit;
    font-size: var(--font-size-sm);
    font-weight: 800;
    cursor: pointer;
    transition: background-color 0.15s ease, color 0.15s ease;
}

.wardrobe-panel-suggestion:hover,
.wardrobe-panel-suggestion:focus-visible {
    outline: none;
    background: var(--color-brand-soft-subtle);
    color: var(--color-brand-soft-text);
}

/* Section Header */
.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--space-xl);
}
.section-title {
    font-size: var(--font-size-2xl);
    font-weight: 700;
}
.section-subtitle {
    font-size: var(--font-size-sm);
    color: var(--color-text-muted);
    margin-top: var(--space-xs);
}

/* Stats Cards */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--space-xl);
    margin-bottom: var(--space-2xl);
}
.stat-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border-light);
    border-radius: var(--radius-xl);
    padding: var(--space-xl);
    box-shadow: var(--shadow-sm);
}
.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    margin-bottom: var(--space-lg);
}
.stat-icon-yellow { background: var(--color-brand-soft-strong); color: var(--color-brand-soft-text); }
.stat-icon-blue { background: var(--color-blue-soft); color: var(--color-info); }
.stat-icon-purple { background: var(--color-purple-bg); color: var(--color-purple); }
.stat-icon-green { background: var(--color-success-bg); color: var(--color-success); }
.stat-value {
    font-size: var(--font-size-2xl);
    font-weight: 800;
    line-height: 1;
    color: var(--color-text);
}
.stat-label {
    font-size: var(--font-size-sm);
    color: var(--color-text-muted);
    margin-top: var(--space-xs);
}

/* ============================
   SIDEBAR (Admin - Full Width)
   ============================ */
.app-layout {
    display: flex;
    min-height: 100vh;
}
.sidebar {
    width: 260px;
    background: var(--color-surface);
    border-right: 1px solid var(--color-border-light);
    padding: var(--space-xl) 0;
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 100;
    box-shadow: var(--shadow-lg);
}
.sidebar-brand {
    padding: 0 var(--space-xl);
    margin-bottom: var(--space-2xl);
    display: flex;
    align-items: center;
    gap: var(--space-md);
}
.sidebar-brand .brand-icon {
    width: 48px;
    height: 48px;
    background: var(--color-kitabee-yellow);
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: var(--color-amber-800);
    flex-shrink: 0;
}
.sidebar-brand h1 {
    font-size: var(--font-size-lg);
    font-weight: 800;
    letter-spacing: -0.3px;
    color: var(--color-text);
}
.sidebar-brand-sub {
    font-size: var(--font-size-xs);
    color: var(--color-text-muted);
    font-weight: 400;
}
.sidebar-culture-switcher {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
    padding: 0 var(--space-xl);
    margin-bottom: var(--space-lg);
}
.sidebar-culture-select {
    background: var(--color-bg);
    border-radius: var(--radius-lg);
}
.sidebar-nav {
    flex: 1;
    padding: 0 var(--space-lg);
    overflow-y: auto;
}
.sidebar-section {
    margin-bottom: var(--space-xl);
}
.sidebar-section-title {
    font-size: var(--font-size-xs);
    font-weight: 700;
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.8px;
    padding: 0 var(--space-md);
    margin-bottom: var(--space-sm);
}
.nav-item {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: 10px 12px;
    font-size: var(--font-size-sm);
    font-weight: 500;
    color: var(--color-text-secondary);
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: all 0.15s ease;
    text-decoration: none;
    margin-bottom: 2px;
}
.nav-item:hover {
    background: var(--color-border-light);
    color: var(--color-text);
}
.nav-item.active {
    background: rgba(255,213,79,0.2);
    color: var(--color-amber-800);
    font-weight: 700;
}
.theme-dark .nav-item.active {
    background: var(--color-sidebar-active-bg);
    color: var(--color-sidebar-active-text);
}
.nav-item .nav-icon {
    font-size: 16px;
    width: 22px;
    text-align: center;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.sidebar-footer {
    padding: var(--space-lg) var(--space-xl);
    border-top: 1px solid var(--color-border-light);
}
.sidebar-footer .btn {
    justify-content: flex-start;
    gap: var(--space-md);
    color: var(--color-text-secondary);
}
.sidebar-footer .btn:hover {
    color: var(--color-danger);
    background: var(--color-danger-bg);
}

.main-content {
    flex: 1;
    margin-left: 260px;
    padding: var(--space-2xl) var(--space-3xl);
    min-height: 100vh;
    max-width: calc(100% - 260px);
}

/* Top Header Bar (optional per-page) */
.top-header {
    background: var(--color-surface);
    border-bottom: 1px solid var(--color-border-light);
    padding: var(--space-lg) var(--space-2xl);
    margin: calc(-1 * var(--space-2xl)) calc(-1 * var(--space-3xl)) var(--space-2xl);
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 50;
}
.top-header-title h2 {
    font-size: var(--font-size-xl);
    font-weight: 800;
}
.top-header-title p {
    font-size: var(--font-size-sm);
    color: var(--color-text-muted);
    margin-bottom: 0;
}
.top-header-actions {
    display: flex;
    align-items: center;
    gap: var(--space-md);
}
.icon-btn {
    width: 40px;
    height: 40px;
    background: var(--color-bg);
    border: none;
    border-radius: var(--radius-xl);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--color-text-secondary);
    transition: background 0.15s;
    position: relative;
}
.icon-btn:hover {
    background: var(--color-border);
}
.icon-btn .notification-dot {
    position: absolute;
    top: -2px;
    right: -2px;
    width: 20px;
    height: 20px;
    background: var(--color-danger);
    color: white;
    font-size: 11px;
    font-weight: 700;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Page header */
.page-header {
    margin-bottom: var(--space-2xl);
}
.page-title {
    font-size: var(--font-size-3xl);
    font-weight: 800;
}
.page-subtitle {
    font-size: var(--font-size-base);
    color: var(--color-text-muted);
    margin-top: var(--space-xs);
}

.fp-page-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: var(--space-lg);
}

.fp-page-header .btn {
    flex-shrink: 0;
}

/* Quick Actions Grid */
.quick-actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: var(--space-lg);
}
.quick-action-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: var(--space-lg);
    border-radius: var(--radius-lg);
    border: none;
    cursor: pointer;
    transition: all 0.15s ease;
    font-family: var(--font-family);
}
.quick-action-btn i {
    font-size: 24px;
    margin-bottom: var(--space-sm);
}
.quick-action-btn span {
    font-size: var(--font-size-sm);
    font-weight: 600;
    color: var(--color-text-secondary);
}
.quick-action-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}
.qa-yellow { background: var(--color-brand-soft-strong); }
.qa-yellow i { color: var(--color-brand-soft-text); }
.qa-blue { background: var(--color-blue-soft); }
.qa-blue i { color: var(--color-info); }
.qa-green { background: var(--color-success-bg); }
.qa-green i { color: var(--color-success); }
.qa-purple { background: var(--color-purple-bg); }
.qa-purple i { color: var(--color-purple); }

/* Activity / Feed Items */
.activity-item {
    display: flex;
    align-items: flex-start;
    gap: var(--space-md);
    padding: var(--space-md);
    border-radius: var(--radius-lg);
    transition: background 0.1s;
}
.activity-item:hover {
    background: var(--color-border-light);
}
.activity-icon {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 14px;
}
.activity-icon-green { background: var(--color-success-bg); color: var(--color-success); }
.activity-icon-blue { background: var(--color-info-bg); color: var(--color-info); }
.activity-icon-yellow { background: var(--color-brand-soft-strong); color: var(--color-brand-soft-text); }
.activity-icon-purple { background: var(--color-purple-bg); color: var(--color-purple); }
.activity-icon-red { background: var(--color-danger-bg); color: var(--color-danger); }
.activity-text {
    font-size: var(--font-size-sm);
    color: var(--color-text);
}
.activity-time {
    font-size: var(--font-size-xs);
    color: var(--color-text-muted);
    margin-top: 2px;
}

/* Schedule Items */
.schedule-item {
    display: flex;
    align-items: center;
    gap: var(--space-lg);
    padding: var(--space-md);
    border-radius: var(--radius-lg);
    border-left: 4px solid transparent;
}
.schedule-item-green { background: var(--color-success-bg); border-left-color: var(--color-success); }
.schedule-item-yellow { background: var(--color-brand-soft-subtle); border-left-color: var(--color-kitabee-amber); }
.schedule-item-blue { background: var(--color-info-bg); border-left-color: var(--color-info); }
.schedule-time {
    font-size: var(--font-size-sm);
    font-weight: 800;
    min-width: 50px;
}
.schedule-title {
    font-size: var(--font-size-sm);
    font-weight: 600;
    color: var(--color-text);
}
.schedule-detail {
    font-size: var(--font-size-xs);
    color: var(--color-text-muted);
}

/* List */
.list-item {
    display: flex;
    align-items: center;
    padding: var(--space-md) var(--space-lg);
    border-bottom: 1px solid var(--color-border-light);
    transition: background 0.1s;
}
.list-item:hover {
    background: var(--color-border-light);
}
.list-item:last-child {
    border-bottom: none;
}

/* Avatar */
.avatar {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-xl);
    background: var(--color-kitabee-yellow);
    color: var(--color-amber-800);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--font-size-sm);
    font-weight: 700;
    flex-shrink: 0;
}
.avatar-lg { width: 48px; height: 48px; font-size: var(--font-size-base); }
.avatar-sm { width: 28px; height: 28px; font-size: var(--font-size-xs); }
.avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: inherit;
}

/* Grid */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-xl); }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-xl); }

/* Utilities */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-muted { color: var(--color-text-muted); }
.text-sm { font-size: var(--font-size-sm); }
.text-xs { font-size: var(--font-size-xs); }
.text-success { color: var(--color-success); }
.text-danger { color: var(--color-danger); }
.mt-sm { margin-top: var(--space-sm); }
.mt-md { margin-top: var(--space-md); }
.mt-lg { margin-top: var(--space-lg); }
.mt-xl { margin-top: var(--space-xl); }
.mb-sm { margin-bottom: var(--space-sm); }
.mb-md { margin-bottom: var(--space-md); }
.mb-lg { margin-bottom: var(--space-lg); }
.mb-xl { margin-bottom: var(--space-xl); }
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-sm { gap: var(--space-sm); }
.gap-md { gap: var(--space-md); }
.gap-lg { gap: var(--space-lg); }
.w-full { width: 100%; }

/* ============================
   PUBLIC LAYOUT
   ============================ */
.public-layout {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: var(--color-bg);
}
.public-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-lg) var(--space-3xl);
    background: var(--color-surface);
    border-bottom: 1px solid var(--color-border-light);
    box-shadow: var(--shadow-sm);
}
.public-nav .brand {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    font-size: var(--font-size-xl);
    font-weight: 800;
    color: var(--color-text);
    text-decoration: none;
}
.public-nav .brand i {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--color-kitabee-yellow), var(--color-kitabee-amber));
    border-radius: var(--radius-xl);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: var(--color-amber-800);
    box-shadow: var(--shadow-md);
}
.public-nav .nav-links {
    display: flex;
    gap: var(--space-lg);
    align-items: center;
}
.public-nav-persona-menu {
    position: relative;
}
.public-nav-persona-menu > summary {
    list-style: none;
}
.public-nav-persona-menu > summary::-webkit-details-marker {
    display: none;
}
.public-nav-persona {
    display: inline-flex;
    align-items: center;
    gap: var(--space-md);
    padding: 0.4rem 0.55rem 0.4rem 0.4rem;
    border-radius: 999px;
    border: 1px solid rgba(255, 193, 7, 0.18);
    box-shadow: var(--shadow-sm);
    min-width: 0;
    cursor: pointer;
    user-select: none;
}
.public-nav-persona-avatar {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--color-kitabee-yellow), var(--color-kitabee-amber));
    color: var(--color-amber-900);
    font-size: 0.82rem;
    font-weight: 900;
    letter-spacing: 0.06em;
    flex-shrink: 0;
}
.public-nav-persona-copy {
    display: grid;
    gap: 0.1rem;
    min-width: 0;
}
.public-nav-persona-copy strong {
    font-size: var(--font-size-sm);
    font-weight: 800;
    color: var(--color-text);
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.public-nav-persona-copy span {
    font-size: 0.74rem;
    font-weight: 700;
    color: var(--color-text-secondary);
    line-height: 1.2;
}
.public-nav-persona-chevron {
    font-size: 0.72rem;
    color: var(--color-text-secondary);
    transition: transform 0.2s ease;
    flex-shrink: 0;
}
.public-nav-persona-menu[open] .public-nav-persona-chevron {
    transform: rotate(180deg);
}
.public-nav-persona-dropdown {
    position: absolute;
    top: calc(100% + 0.75rem);
    right: 0;
    min-width: 13.5rem;
    padding: 0.6rem;
    display: grid;
    gap: 0.28rem;
    border-radius: var(--radius-2xl);
    background: var(--color-surface);
    border: 1px solid var(--color-border-light);
    box-shadow: var(--shadow-lg);
    z-index: 30;
}
.public-nav-persona-action,
.public-nav-persona-logout-form {
    width: 100%;
}
.public-nav-persona-action {
    display: inline-flex;
    align-items: center;
    gap: 0.7rem;
    width: 100%;
    padding: 0.78rem 0.9rem;
    border: none;
    border-radius: var(--radius-xl);
    background: transparent;
    color: var(--color-text);
    text-decoration: none;
    font-size: var(--font-size-sm);
    font-weight: 700;
    text-align: left;
    cursor: pointer;
}
.public-nav-persona-action:hover {
    background: var(--color-brand-soft-subtle);
}
.public-nav-persona-action i {
    width: 1rem;
    text-align: center;
    color: var(--color-text-secondary);
}
.public-nav-persona-action-danger {
    color: var(--color-danger);
}
.public-nav-persona-action-danger i {
    color: var(--color-danger);
}
.public-culture-switcher {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    margin-bottom: 0;
}
.public-culture-select {
    min-width: 140px;
}
.culture-selector-label {
    font-size: var(--font-size-xs);
    font-weight: 700;
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}
.public-content {
    flex: 1;
    max-width: 1200px;
    margin: 0 auto;
    padding: var(--space-3xl);
    width: 100%;
}

.public-footer {
    width: 100%;
    margin-top: var(--space-4xl);
    background: var(--color-surface);
    border-top: 1px solid var(--color-border);
}

.public-footer-shell {
    max-width: 1200px;
    margin: 0 auto;
    padding: var(--space-3xl);
}

.public-footer-top {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
    gap: var(--space-3xl);
    align-items: start;
}

.public-footer-brand {
    display: flex;
    align-items: flex-start;
    gap: var(--space-lg);
    text-decoration: none;
    color: var(--color-text);
    min-width: 0;
}

.public-footer-brand-icon {
    width: 44px;
    height: 44px;
    flex-shrink: 0;
    border-radius: 14px;
    background: var(--color-brand-soft-subtle);
    border: 1px solid rgba(255, 193, 7, 0.18);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--color-amber-800);
    font-size: 18px;
}

.public-footer-brand-copy {
    display: grid;
    gap: var(--space-sm);
    min-width: 0;
}

.public-footer-brand-copy strong {
    font-size: clamp(1.35rem, 1.8vw, 1.75rem);
    font-weight: 800;
    line-height: 1.05;
    letter-spacing: -0.03em;
}

.public-footer-brand-copy p {
    margin: 0;
    max-width: 34rem;
    color: var(--color-text-secondary);
    font-size: var(--font-size-base);
    line-height: 1.7;
}

.public-footer-links {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: var(--space-xl);
}

.public-footer-group {
    display: grid;
    gap: var(--space-md);
    align-content: start;
}

.public-footer-group h3 {
    margin: 0;
    color: var(--color-text);
    font-size: var(--font-size-sm);
    font-weight: 700;
}

.public-footer-group a,
.public-footer-bottom-links a {
    color: var(--color-text-muted);
    text-decoration: none;
    font-size: var(--font-size-sm);
    font-weight: 600;
    transition: color 0.2s ease;
}

.public-footer-group a:hover,
.public-footer-bottom-links a:hover {
    color: var(--color-amber-700);
}

.public-footer-bottom {
    margin-top: var(--space-2xl);
    padding-top: var(--space-lg);
    border-top: 1px solid rgba(229, 231, 235, 0.92);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-lg);
    color: var(--color-text-muted);
    font-size: var(--font-size-sm);
}

.public-footer-bottom-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: var(--space-lg);
}

.public-info-page {
    display: grid;
    gap: var(--space-xl);
}

.public-info-hero {
    position: relative;
    overflow: hidden;
    padding: var(--space-3xl);
    border-radius: var(--radius-3xl);
    background:
        radial-gradient(circle at top right, rgba(255, 213, 79, 0.24), transparent 28%),
        linear-gradient(135deg, rgba(255, 249, 235, 0.98) 0%, rgba(255, 255, 255, 0.96) 100%);
    border: 1px solid var(--color-border-light);
    box-shadow: var(--shadow-md);
}

.public-info-hero > * {
    position: relative;
    z-index: 1;
}

.public-info-kicker {
    display: inline-flex;
    align-items: center;
    padding: 0.35rem 0.8rem;
    border-radius: var(--radius-full);
    background: rgba(255, 255, 255, 0.78);
    color: var(--color-text-muted);
    font-size: var(--font-size-xs);
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.public-info-hero h1 {
    margin: var(--space-lg) 0 var(--space-sm);
    font-size: clamp(2rem, 3.2vw, 3rem);
    line-height: 1.05;
    letter-spacing: -0.04em;
}

.public-info-hero p {
    margin: 0;
    max-width: 48rem;
    color: var(--color-text-muted);
    font-size: var(--font-size-md);
    line-height: 1.7;
}

.public-info-page .card {
    height: 100%;
}

.public-info-cta {
    background:
        linear-gradient(135deg, rgba(255, 248, 235, 0.98) 0%, rgba(255, 255, 255, 0.98) 100%);
    border: 1px solid var(--color-border-light);
}

/* Auth forms */
.auth-container {
    max-width: 440px;
    margin: var(--space-4xl) auto;
}
.auth-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border-light);
    border-radius: var(--radius-2xl);
    padding: var(--space-2xl);
    box-shadow: var(--shadow-md);
}
.auth-title {
    font-size: var(--font-size-2xl);
    font-weight: 800;
    margin-bottom: var(--space-xs);
}
.auth-subtitle {
    color: var(--color-text-muted);
    font-size: var(--font-size-sm);
    margin-bottom: var(--space-xl);
}

/* Hero section */
.hero {
    text-align: center;
    padding: var(--space-4xl) var(--space-xl);
}
.hero h1 {
    font-size: var(--font-size-hero);
    font-weight: 800;
    letter-spacing: -1.5px;
    line-height: 1.1;
    margin-bottom: var(--space-xl);
}
.hero p {
    font-size: var(--font-size-xl);
    color: var(--color-text-secondary);
    max-width: 600px;
    margin: 0 auto var(--space-2xl);
}
.hero .hero-accent {
    color: var(--color-kitabee-amber);
    background: linear-gradient(135deg, var(--color-kitabee-amber), #ff9800);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.public-home-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}
.public-home-persona {
    width: fit-content;
    max-width: min(100%, 30rem);
    margin: 0 auto var(--space-xl);
    padding: 0.75rem 1rem;
    display: inline-flex;
    align-items: center;
    gap: 0.9rem;
    border-radius: var(--radius-2xl);
    background: linear-gradient(135deg, rgba(255, 248, 225, 0.92), rgba(255, 255, 255, 0.98));
    border: 1px solid rgba(255, 193, 7, 0.18);
    box-shadow: var(--shadow-sm);
    text-align: left;
}
.public-home-persona-avatar {
    width: 3.15rem;
    height: 3.15rem;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--color-kitabee-yellow), var(--color-kitabee-amber));
    color: var(--color-amber-900);
    font-size: 0.95rem;
    font-weight: 900;
    letter-spacing: 0.06em;
    flex-shrink: 0;
}
.public-home-persona-copy {
    display: grid;
    gap: 0.22rem;
    min-width: 0;
}
.public-home-persona-copy strong {
    font-size: clamp(1rem, 2vw, 1.12rem);
    font-weight: 800;
    color: var(--color-text);
    line-height: 1.25;
}
.public-home-persona-copy span {
    color: var(--color-text-secondary);
    font-size: var(--font-size-sm);
    font-weight: 700;
}

/* Feature cards on homepage */
.feature-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border-light);
    border-radius: var(--radius-xl);
    padding: var(--space-2xl);
    text-align: center;
    box-shadow: var(--shadow-sm);
    transition: all 0.2s ease;
}
.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}
.feature-icon {
    width: 64px;
    height: 64px;
    border-radius: var(--radius-xl);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto var(--space-lg);
    font-size: 28px;
}
.feature-icon-yellow { background: rgba(255,213,79,0.25); color: var(--color-amber-700); }
.feature-icon-blue { background: rgba(187,222,251,0.5); color: var(--color-info); }
.feature-icon-green { background: var(--color-success-bg); color: var(--color-success); }


/* Redesigned public home */
.public-layout-home {
    background: #fff9e9;
}

.public-layout-home .public-content {
    max-width: none;
    padding: 0;
}

.public-layout-home .public-footer {
    margin-top: 0;
}

.public-home-page {
    --home-shell: minmax(1.25rem, calc((100vw - 1220px) / 2));
    --home-yellow: #ffd84d;
    --home-yellow-soft: #fff1b8;
    --home-honey: #f5b400;
    --home-ink: #273245;
    --home-leaf: #9ccf74;
    --home-sky: #dcefff;
    --home-rose: #ffd6c9;
    width: 100%;
    overflow: hidden;
    background: #fff9e9;
    color: var(--home-ink);
}

.public-home-page > section {
    padding-inline: max(1.25rem, calc((100vw - 1220px) / 2));
}

.public-home-hero {
    position: relative;
    isolation: isolate;
    display: grid;
    grid-template-columns: minmax(0, 1.02fr) minmax(320px, 0.98fr);
    gap: clamp(2rem, 5vw, 4.5rem);
    align-items: center;
    min-height: clamp(620px, calc(100vh - 5rem), 860px);
    padding-block: clamp(3.2rem, 8vw, 6.5rem);
    background: #fff9e9;
}

.public-home-playful-layer {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: -1;
}

.public-home-hero-bee,
.public-home-doodle,
.public-home-honeycomb {
    position: absolute;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.public-home-hero-bee {
    top: 7%;
    right: 8%;
    width: clamp(3.8rem, 6vw, 5.4rem);
    height: clamp(3.8rem, 6vw, 5.4rem);
    border-radius: 48% 52% 46% 54%;
    background: var(--home-yellow);
    color: #573f00;
    font-size: clamp(1.35rem, 2.4vw, 2.05rem);
    box-shadow: 0 16px 34px rgba(245, 180, 0, 0.2);
    transform: rotate(12deg);
}

.public-home-hero-bee::after {
    content: "";
    position: absolute;
    left: -5.5rem;
    top: 52%;
    width: 6.8rem;
    height: 2.6rem;
    border-top: 2px dashed rgba(87, 63, 0, 0.24);
    border-radius: 50%;
    transform: rotate(-18deg);
}
.public-home-honeycomb {
    width: 4.7rem;
    height: 4.1rem;
    clip-path: polygon(25% 6%, 75% 6%, 100% 50%, 75% 94%, 25% 94%, 0 50%);
    background: rgba(255, 216, 77, 0.42);
}

.public-home-honeycomb::after {
    content: "";
    position: absolute;
    inset: 0.45rem;
    clip-path: inherit;
    background: #fff9e9;
}

.public-home-honeycomb-one {
    right: 3%;
    bottom: 9%;
    transform: rotate(12deg);
}

.public-home-honeycomb-two {
    left: 2.8%;
    top: 15%;
    width: 3.7rem;
    height: 3.25rem;
    opacity: 0.75;
    transform: rotate(-10deg);
}

.public-home-honeycomb-three {
    left: 46%;
    top: 8%;
    width: 2.8rem;
    height: 2.45rem;
    opacity: 0.55;
    transform: rotate(18deg);
}

.public-home-doodle {
    width: 2.8rem;
    height: 2.8rem;
    border-radius: 999px;
    font-size: 1.05rem;
}

.public-home-doodle-pencil {
    right: 44%;
    bottom: 10%;
    background: var(--home-sky);
    color: #2563eb;
    transform: rotate(-15deg);
}

.public-home-doodle-star {
    right: 31%;
    top: 21%;
    background: var(--home-rose);
    color: #f97316;
    transform: rotate(16deg);
}

.public-home-hero-copy,
.public-home-product-card {
    position: relative;
    z-index: 1;
}

.public-home-hero-copy {
    display: grid;
    gap: var(--space-xl);
    align-content: center;
}

.public-home-kicker,
.public-home-section-kicker {
    width: fit-content;
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.45rem 0.85rem;
    border-radius: var(--radius-full);
    background: #fff4c9;
    color: #6f5200;
    font-size: var(--font-size-xs);
    font-weight: 900;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.public-home-hero h1,
.public-home-section-head h2,
.public-home-audience-card h2,
.public-home-demo-copy h2 {
    margin: 0;
    color: var(--home-ink);
    font-weight: 900;
    letter-spacing: -0.035em;
    line-height: 1.04;
}

.public-home-hero h1 {
    max-width: 12ch;
    font-size: clamp(3rem, 7vw, 5.8rem);
}

.public-home-hero p,
.public-home-section-head p,
.public-home-audience-card p,
.public-home-demo-copy p {
    margin: 0;
    color: var(--color-text-secondary);
    line-height: 1.75;
}

.public-home-hero p {
    max-width: 43rem;
    font-size: clamp(1.04rem, 1.45vw, 1.24rem);
}

.public-home-actions {
    justify-content: flex-start;
    flex-wrap: wrap;
}

.public-home-actions .btn {
    gap: 0.5rem;
}

.public-home-proof-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
}

.public-home-proof-row span {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.58rem 0.78rem;
    border-radius: var(--radius-full);
    background: rgba(255, 255, 255, 0.72);
    color: var(--color-text-secondary);
    font-size: var(--font-size-sm);
    font-weight: 800;
}

.public-home-proof-row i {
    color: var(--home-honey);
}

.public-home-product-card {
    padding: clamp(1.25rem, 2.5vw, 2rem);
    border-radius: 2rem;
    background: rgba(255, 255, 255, 0.88);
    box-shadow: 0 24px 70px rgba(136, 98, 0, 0.12);
    transform: rotate(0.7deg);
}

.public-home-product-card::before,
.public-home-product-card::after {
    content: "";
    position: absolute;
    border-radius: 999px;
    z-index: -1;
}

.public-home-product-card::before {
    width: 7rem;
    height: 7rem;
    right: -1.8rem;
    top: -2rem;
    background: #ffe680;
}

.public-home-product-card::after {
    width: 5.5rem;
    height: 5.5rem;
    left: -1.4rem;
    bottom: -1.5rem;
    background: #dff1c8;
}

.public-home-product-toolbar {
    display: flex;
    gap: 0.45rem;
    margin-bottom: var(--space-lg);
}

.public-home-product-toolbar span {
    width: 0.72rem;
    height: 0.72rem;
    border-radius: 999px;
    background: var(--color-border);
}

.public-home-product-toolbar span:nth-child(1) { background: #f97316; }
.public-home-product-toolbar span:nth-child(2) { background: #facc15; }
.public-home-product-toolbar span:nth-child(3) { background: #22c55e; }

.public-home-product-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: var(--space-lg);
    padding-bottom: var(--space-lg);
}

.public-home-product-header > div:first-child {
    display: grid;
    gap: 0.42rem;
}

.public-home-product-label {
    color: var(--color-text-muted);
    font-size: var(--font-size-xs);
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.public-home-product-header strong {
    color: var(--home-ink);
    font-size: clamp(1.28rem, 2vw, 1.72rem);
    line-height: 1.16;
}

.public-home-product-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.38rem;
    padding: 0.46rem 0.68rem;
    border-radius: var(--radius-full);
    background: #e9f8dc;
    color: #3f7b2d;
    font-size: var(--font-size-xs);
    font-weight: 900;
}

.public-home-product-list {
    display: grid;
    gap: var(--space-md);
    margin-top: var(--space-lg);
}

.public-home-product-list article {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: var(--space-md);
    align-items: center;
    padding: var(--space-md);
    border-radius: 1.35rem;
    background: #fffdf6;
}

.public-home-product-list article:nth-child(2) {
    background: #f3f9ff;
}

.public-home-product-list article:nth-child(3) {
    background: #f5fbec;
}

.public-home-product-list strong,
.public-home-feature-card h3,
.public-home-flow-grid h3 {
    color: var(--home-ink);
    font-weight: 900;
}

.public-home-product-list p,
.public-home-feature-card p,
.public-home-flow-grid p {
    margin: 0.28rem 0 0;
    color: var(--color-text-secondary);
    line-height: 1.6;
    font-size: var(--font-size-sm);
}

.public-home-product-icon,
.public-home-feature-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.public-home-product-icon {
    width: 2.85rem;
    height: 2.85rem;
    border-radius: 1rem;
    font-size: 1.05rem;
}

.public-home-product-icon-yellow,
.public-home-tone-yellow {
    background: #fff0a6;
    color: #8a6200;
}

.public-home-product-icon-blue,
.public-home-tone-blue {
    background: var(--home-sky);
    color: #2563eb;
}

.public-home-product-icon-green,
.public-home-tone-green {
    background: #e4f5d4;
    color: #3f7b2d;
}

.public-home-tone-purple {
    background: #f0e5ff;
    color: #7c3aed;
}

.public-home-section {
    display: grid;
    gap: var(--space-2xl);
    padding-block: clamp(3rem, 7vw, 5.5rem);
    background: #ffffff;
}

.public-home-section-head {
    max-width: 48rem;
    margin: 0 auto;
    display: grid;
    justify-items: center;
    gap: var(--space-md);
    text-align: center;
}

.public-home-section-head-left {
    margin: 0;
    justify-items: start;
    text-align: left;
}

.public-home-section-head h2,
.public-home-demo-copy h2 {
    font-size: clamp(2rem, 4.5vw, 3.6rem);
}

.public-home-feature-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: var(--space-lg);
}

.public-home-feature-card {
    position: relative;
    padding: var(--space-xl);
    border-radius: 1.8rem;
    background: #fff9e9;
    box-shadow: 0 14px 35px rgba(39, 50, 69, 0.06);
}

.public-home-feature-card:nth-child(2) {
    background: #eef8ff;
    transform: rotate(0.45deg);
}

.public-home-feature-card:nth-child(3) {
    background: #f3faea;
    transform: rotate(-0.45deg);
}

.public-home-feature-card:nth-child(4) {
    background: #fff1eb;
}

.public-home-feature-card::after {
    content: "";
    position: absolute;
    right: 1.15rem;
    top: 1.15rem;
    width: 1.9rem;
    height: 1.65rem;
    clip-path: polygon(25% 6%, 75% 6%, 100% 50%, 75% 94%, 25% 94%, 0 50%);
    background: rgba(255, 216, 77, 0.42);
}

.public-home-feature-icon {
    width: 3.1rem;
    height: 3.1rem;
    border-radius: 1.05rem;
    margin-bottom: var(--space-lg);
    font-size: 1.15rem;
}

.public-home-feature-card h3,
.public-home-flow-grid h3 {
    margin: 0;
    font-size: var(--font-size-lg);
}

.public-home-split-section {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: var(--space-xl);
    padding-block: clamp(3rem, 7vw, 5.5rem);
    background: #fff4c9;
}

.public-home-audience-card {
    min-height: 100%;
    display: grid;
    align-content: start;
    gap: var(--space-lg);
    padding: clamp(1.6rem, 3vw, 2.6rem);
    border-radius: 2rem;
    background: rgba(255, 255, 255, 0.78);
    box-shadow: 0 18px 45px rgba(136, 98, 0, 0.08);
}

.public-home-audience-card-primary {
    background: #fffdf6;
}

.public-home-audience-card h2 {
    font-size: clamp(1.85rem, 3.6vw, 3rem);
}

.public-home-check-list {
    display: grid;
    gap: var(--space-md);
    padding: 0;
    margin: 0;
    list-style: none;
}

.public-home-check-list li {
    display: flex;
    gap: var(--space-sm);
    align-items: flex-start;
    color: var(--color-text-secondary);
    font-weight: 700;
    line-height: 1.55;
}

.public-home-check-list i {
    width: 1.35rem;
    height: 1.35rem;
    margin-top: 0.05rem;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #e4f5d4;
    color: #3f7b2d;
    font-size: 0.72rem;
    flex-shrink: 0;
}

.public-home-flow-section {
    display: grid;
    gap: var(--space-2xl);
    padding-block: clamp(3rem, 7vw, 5.5rem);
    background: var(--color-surface);
}

.public-home-flow-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: var(--space-md);
}

.public-home-flow-grid article {
    padding: var(--space-xl);
    border-radius: 1.6rem;
    background: var(--color-surface);
    border: 1px solid var(--color-border-light);
    box-shadow: var(--shadow-sm);
}

.public-home-flow-grid span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.2rem;
    height: 2.2rem;
    margin-bottom: var(--space-md);
    border-radius: 999px;
    background: var(--home-yellow);
    color: #6f5200;
    font-size: var(--font-size-sm);
    font-weight: 900;
}

.public-home-demo-section {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 0.95fr) minmax(320px, 0.72fr);
    gap: clamp(1.8rem, 4vw, 3.4rem);
    align-items: center;
    padding-block: clamp(3rem, 7vw, 5.5rem);
    background: #fff9e9;
}

.public-home-demo-copy {
    display: grid;
    gap: var(--space-lg);
}

.public-home-demo-note {
    display: flex;
    gap: var(--space-sm);
    align-items: flex-start;
    max-width: 34rem;
    padding: var(--space-md);
    border-radius: 1.25rem;
    background: #ffffff;
    color: var(--color-text-secondary);
    font-size: var(--font-size-sm);
    font-weight: 700;
    line-height: 1.6;
    box-shadow: 0 10px 25px rgba(39, 50, 69, 0.05);
}

.public-home-demo-note i {
    color: #2563eb;
    margin-top: 0.2rem;
}

.public-home-demo-form {
    display: grid;
    gap: var(--space-md);
    padding: var(--space-xl);
    border-radius: 2rem;
    background: #ffffff;
    box-shadow: 0 22px 55px rgba(136, 98, 0, 0.1);
}

.public-home-demo-form label {
    display: grid;
    gap: 0.45rem;
}

.public-home-demo-form span {
    color: var(--color-text-secondary);
    font-size: var(--font-size-sm);
    font-weight: 900;
}

.public-home-demo-form input {
    width: 100%;
    min-height: 3rem;
    padding: 0.85rem 1rem;
    border-radius: var(--radius-xl);
    border: 1px solid rgba(245, 180, 0, 0.24);
    background: #fffdf6;
    color: var(--color-text);
    font: inherit;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.public-home-demo-form input:focus {
    border-color: var(--home-honey);
    box-shadow: 0 0 0 4px rgba(255, 216, 77, 0.2);
}


.public-home-demo-status {
    min-height: 1.35rem;
    margin: 0;
    color: var(--color-text-secondary);
    font-size: var(--font-size-sm);
    font-weight: 800;
    line-height: 1.45;
}

.public-home-demo-status[data-state="success"] {
    color: var(--color-success);
}

.public-home-demo-status[data-state="error"] {
    color: var(--color-danger);
}

.public-home-demo-form button:disabled {
    opacity: 0.82;
    cursor: not-allowed;
}

@media (max-width: 1080px) {
    .public-home-hero,
    .public-home-demo-section {
        grid-template-columns: 1fr;
    }

    .public-home-feature-grid,
    .public-home-flow-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .public-home-doodle-pencil,
    .public-home-doodle-star,
    .public-home-honeycomb-three {
        display: none;
    }
}

@media (max-width: 768px) {
    .public-home-page > section {
        padding-inline: var(--space-lg);
    }

    .public-home-hero {
        min-height: auto;
        padding-block: var(--space-3xl);
    }

    .public-home-hero h1 {
        max-width: none;
        font-size: clamp(2.45rem, 13vw, 3.7rem);
    }

    .public-home-product-card {
        transform: none;
    }

    .public-home-product-header,
.public-home-feature-grid,
    .public-home-flow-grid,
    .public-home-split-section {
        grid-template-columns: 1fr;
    }

    .public-home-section-head {
        justify-items: start;
        text-align: left;
    }

    .public-home-actions .btn,
    .public-home-demo-form .btn {
        width: 100%;
    }
    .public-home-honeycomb-two {
        display: none;
    }
}

@media (max-width: 480px) {
    .public-home-product-card,
    .public-home-demo-form,
    .public-home-audience-card,
    .public-home-feature-card,
    .public-home-flow-grid article {
        border-radius: 1.35rem;
        padding: var(--space-lg);
    }

    .public-home-product-list article {
        grid-template-columns: 1fr;
    }
}
/* Chat styles */
.chat-container {
    display: flex;
    height: calc(100vh - 120px);
    border: 1px solid var(--color-border-light);
    border-radius: var(--radius-xl);
    overflow: hidden;
    background: var(--color-surface);
    box-shadow: var(--shadow-sm);
}
.chat-threads {
    width: 300px;
    border-right: 1px solid var(--color-border-light);
    overflow-y: auto;
}
.chat-thread-item {
    padding: var(--space-md) var(--space-lg);
    border-bottom: 1px solid var(--color-border-light);
    cursor: pointer;
    transition: background 0.1s;
}
.chat-thread-item:hover,
.chat-thread-item.active {
    background: var(--color-border-light);
}
.chat-messages {
    flex: 1;
    display: flex;
    flex-direction: column;
}
.chat-messages-list {
    flex: 1;
    overflow-y: auto;
    padding: var(--space-lg);
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}
.message-bubble {
    max-width: 70%;
    padding: var(--space-md) var(--space-lg);
    border-radius: var(--radius-xl);
    font-size: var(--font-size-sm);
}
.message-bubble.sent {
    align-self: flex-end;
    background: var(--color-kitabee-amber);
    color: var(--color-amber-800);
    border-bottom-right-radius: var(--radius-sm);
}
.message-bubble.received {
    align-self: flex-start;
    background: var(--color-border-light);
    border-bottom-left-radius: var(--radius-sm);
}
.message-time {
    font-size: var(--font-size-xs);
    color: var(--color-text-muted);
    margin-top: 2px;
}
.chat-input-area {
    padding: var(--space-md) var(--space-lg);
    border-top: 1px solid var(--color-border-light);
    display: flex;
    gap: var(--space-sm);
}
.chat-input-area input {
    flex: 1;
}

/* Food plan */
.food-plan-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: var(--space-md);
}
.food-day-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border-light);
    border-radius: var(--radius-xl);
    padding: var(--space-lg);
    text-align: center;
    box-shadow: var(--shadow-sm);
}
.food-day-name {
    font-size: var(--font-size-sm);
    font-weight: 700;
    color: var(--color-amber-700);
    text-transform: uppercase;
    letter-spacing: 0.6px;
    margin-bottom: var(--space-sm);
}

/* Food Plan Redesign */
.fp-filter-card {
    padding: var(--space-xl);
    margin-bottom: var(--space-xl);
}

.fp-filter-bar {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: var(--space-lg);
}

.fp-filter-controls {
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
    gap: var(--space-md);
}

.fp-filter-select {
    flex: 0 0 220px;
    min-width: 180px;
    width: auto;
    max-width: none;
}

.fp-next-meal-pill {
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    min-height: 44px;
    padding: 12px 16px;
    border: 1px solid rgba(59, 130, 246, 0.18);
    border-radius: var(--radius-xl);
    background: var(--color-bg);
    color: var(--color-text-secondary);
    font-size: var(--font-size-sm);
    font-weight: 700;
    line-height: 1;
    white-space: nowrap;
}

.fp-next-meal-pill i {
    color: var(--color-info);
}

.fp-next-meal-pill strong {
    color: var(--color-text);
    font-weight: 800;
}

.fp-plans-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-xl);
    margin-bottom: var(--space-2xl);
}

.fp-plan-card {
    border-left: 4px solid var(--color-border) !important;
}
.fp-plan-active { border-left-color: var(--color-success) !important; }
.fp-plan-upcoming { border-left-color: #3b82f6 !important; }
.fp-plan-completed { border-left-color: var(--color-text-muted) !important; }

/* Plan header */
.fp-plan-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--space-xl);
}
.fp-plan-header-left {
    display: flex;
    align-items: center;
    gap: var(--space-lg);
}
.fp-plan-icon {
    width: 56px;
    height: 56px;
    border-radius: var(--radius-xl);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--font-size-xl);
    flex-shrink: 0;
}
.fp-plan-icon-active {
    background: var(--color-success-bg);
    color: var(--color-success);
}
.fp-plan-icon-upcoming {
    background: var(--color-info-bg);
    color: var(--color-info);
}
.fp-plan-icon-completed {
    background: var(--color-border-light);
    color: var(--color-text-muted);
}
.fp-plan-info {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
}
.fp-plan-title {
    font-size: var(--font-size-lg);
    font-weight: 700;
    color: var(--color-text);
    margin: 0;
}
.fp-plan-dates {
    font-size: var(--font-size-sm);
    color: var(--color-text-muted);
    margin: 0;
}
.fp-plan-actions {
    display: flex;
    gap: var(--space-sm);
}

/* Days grid */
.fp-days-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: var(--space-md);
}
.fp-day-column {
    background: var(--color-bg);
    border-radius: var(--radius-xl);
    padding: var(--space-lg);
}
.fp-day-title {
    font-size: var(--font-size-sm);
    font-weight: 700;
    color: var(--color-text);
    margin: 0 0 var(--space-md) 0;
}
.fp-meals {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}
.fp-meal-card {
    background: var(--color-surface);
    padding: var(--space-md);
    border-radius: var(--radius-lg);
}
.fp-meal-empty {
    opacity: 0.5;
}
.fp-meal-type {
    font-size: var(--font-size-sm);
    font-weight: 600;
    color: var(--color-text);
    margin: 0 0 2px 0;
}
.fp-meal-desc {
    font-size: var(--font-size-xs);
    color: var(--color-text-muted);
    margin: 0;
}

/* Allergen dots */
.fp-allergen-dots {
    display: flex;
    gap: 4px;
    margin-top: var(--space-xs);
}
.fp-allergen-dot {
    width: 12px;
    height: 12px;
    border-radius: var(--radius-full);
    display: inline-block;
    flex-shrink: 0;
}
.dot-gluten { background: #f87171; }
.dot-dairy { background: #60a5fa; }
.dot-nuts { background: #fb923c; }
.dot-eggs { background: #fbbf24; }
.dot-other { background: #a78bfa; }

/* Draft / empty state */
.fp-draft-note {
    color: var(--color-text-muted);
    font-size: var(--font-size-sm);
    margin-bottom: var(--space-lg);
}
.fp-empty-plan {
    background: var(--color-bg);
    border-radius: var(--radius-xl);
    padding: var(--space-3xl) var(--space-xl);
    text-align: center;
}
.fp-empty-plan i {
    font-size: var(--font-size-3xl);
    color: var(--color-text-muted);
    margin-bottom: var(--space-md);
    display: block;
}
.fp-empty-plan p {
    color: var(--color-text-muted);
    margin-bottom: var(--space-lg);
}

/* Completed summary */
.fp-summary-row {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-xl);
    font-size: var(--font-size-sm);
    color: var(--color-text-secondary);
}
.fp-summary-item {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

/* Allergen legend */
.fp-legend-card {
    margin-top: var(--space-2xl);
}
.fp-legend-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-lg);
    margin-top: var(--space-md);
}
.fp-legend-item {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    font-size: var(--font-size-sm);
    color: var(--color-text-secondary);
}

/* Form modal */
.fp-form-modal {
    max-width: 920px !important;
    max-height: 85vh;
    overflow-y: auto;
}
.fp-form-section-title {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    font-size: var(--font-size-md);
    font-weight: 700;
    color: var(--color-text);
    margin: var(--space-xl) 0 var(--space-lg) 0;
}
.fp-form-section-title i {
    color: var(--color-kitabee-amber);
}
.fp-form-days {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: var(--space-md);
    margin-bottom: var(--space-xl);
}
.fp-form-day {
    background: var(--color-bg);
    border-radius: var(--radius-lg);
    padding: var(--space-md);
}
.fp-form-day-title {
    font-size: var(--font-size-sm);
    font-weight: 700;
    color: var(--color-amber-700);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 0 0 var(--space-md) 0;
}
.fp-form-meal {
    margin-bottom: var(--space-md);
}
.fp-form-meal .form-label {
    font-size: var(--font-size-xs);
    margin-bottom: 2px;
}
.fp-form-meal .form-input {
    font-size: var(--font-size-xs);
    padding: var(--space-sm) var(--space-md);
    margin-bottom: 4px;
}
.fp-allergen-input {
    font-size: var(--font-size-xs) !important;
    color: var(--color-text-muted);
}

/* Food plan responsive */
@media (max-width: 1024px) {
    .fp-days-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    .fp-form-days {
        grid-template-columns: repeat(3, 1fr);
    }
    .fp-legend-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .fp-filter-bar {
        align-items: stretch;
        flex-direction: column;
        gap: var(--space-md);
    }
    .fp-filter-controls {
        flex-direction: column;
        align-items: stretch;
    }
    .fp-filter-select {
        flex: 1 1 auto;
        min-width: 0;
        max-width: none;
        width: 100%;
    }
    .fp-next-meal-pill {
        align-self: flex-start;
    }
    .fp-plan-header {
        flex-direction: column;
        align-items: flex-start;
        gap: var(--space-md);
    }
    .fp-plan-actions {
        align-self: flex-end;
    }
    .fp-days-grid {
        grid-template-columns: 1fr;
    }
    .fp-form-days {
        grid-template-columns: 1fr;
    }
    .fp-form-modal {
        max-width: 100% !important;
    }
    .fp-summary-row {
        flex-direction: column;
        gap: var(--space-sm);
    }
    .fp-legend-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Section with icon header */
.section-icon-title {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    font-size: var(--font-size-lg);
    font-weight: 700;
    color: var(--color-text);
    margin-bottom: var(--space-lg);
}
.section-icon-title i {
    color: var(--color-kitabee-amber);
}

/* Responsive */
@media (max-width: 1024px) {
    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s ease-in-out;
    }
    .sidebar.open {
        transform: translateX(0);
    }
    .main-content {
        margin-left: 0;
        max-width: 100%;
        padding: var(--space-lg);
    }
}

@media (max-width: 768px) {
    .hero h1 {
        font-size: var(--font-size-4xl);
    }
    .grid-2, .grid-3 {
        grid-template-columns: 1fr;
    }
    .fp-page-header {
        flex-direction: column;
        align-items: stretch;
    }
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .food-plan-grid {
        grid-template-columns: 1fr;
    }
    .chat-container {
        flex-direction: column;
        height: auto;
    }
    .chat-threads {
        width: 100%;
        max-height: 200px;
        border-right: none;
        border-bottom: 1px solid var(--color-border-light);
    }
    .public-nav {
        padding: var(--space-md) var(--space-lg);
    }
    .public-nav .nav-links {
        gap: var(--space-md);
        flex-wrap: wrap;
        justify-content: flex-end;
    }
    .public-nav-persona-menu {
        width: 100%;
    }
    .public-nav-persona {
        width: 100%;
        justify-content: flex-start;
    }
    .public-nav-persona-dropdown {
        right: auto;
        left: 0;
        width: 100%;
    }
    .public-content {
        padding: var(--space-xl) var(--space-lg);
    }
    .public-footer {
        margin-top: var(--space-3xl);
    }
    .public-footer-shell {
        padding: var(--space-2xl) var(--space-lg);
    }
    .public-footer-top {
        grid-template-columns: 1fr;
        gap: var(--space-2xl);
    }
    .public-footer-links {
        grid-template-columns: 1fr;
        gap: var(--space-lg);
    }
    .public-footer-bottom {
        flex-direction: column;
        align-items: flex-start;
    }
    .public-footer-bottom-links {
        justify-content: flex-start;
        gap: var(--space-md);
    }
    .public-info-hero {
        padding: var(--space-2xl);
    }
    .quick-actions {
        grid-template-columns: repeat(2, 1fr);
    }
    .public-home-persona {
        width: 100%;
        justify-content: flex-start;
    }
    .public-home-actions {
        flex-direction: column;
    }
    .public-home-actions .btn {
        width: 100%;
    }
}

@media (max-width: 425px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }
    .quick-actions {
        grid-template-columns: 1fr;
    }
}

/* ============================
   SETTINGS PAGE
   ============================ */

/* Two-column layout */
.settings-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: var(--space-xl);
    align-items: start;
}
.settings-main,
.settings-aside {
    display: flex;
    flex-direction: column;
    gap: var(--space-xl);
}

/* Profile header */
.profile-header {
    display: flex;
    align-items: flex-start;
    gap: var(--space-xl);
    margin-bottom: var(--space-2xl);
}
.profile-avatar-container {
    position: relative;
    flex-shrink: 0;
    display: inline-flex;
    width: fit-content;
}
.profile-avatar-inline {
    display: inline-flex;
    align-items: flex-start;
    justify-content: flex-start;
}
.profile-avatar-frame {
    width: 96px;
    height: 96px;
    align-items: stretch;
    justify-content: stretch;
}
.profile-avatar-frame .profile-avatar {
    width: 100%;
    height: 100%;
}
.profile-avatar-frame .profile-avatar-initials {
    width: 100%;
    height: 100%;
}
.profile-avatar {
    width: 96px;
    height: 96px;
    border-radius: var(--radius-full);
    object-fit: cover;
    border: 4px solid var(--color-kitabee-yellow);
}
.profile-avatar-initials {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-kitabee-yellow);
    color: var(--color-amber-800);
    font-size: var(--font-size-2xl);
    font-weight: 800;
}
.profile-avatar-edit {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 32px;
    height: 32px;
    background: var(--color-kitabee-yellow);
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--color-surface);
    cursor: pointer;
    transition: background 0.15s;
}
.profile-avatar-edit:hover {
    background: var(--color-kitabee-amber);
}
.profile-avatar-edit i {
    color: var(--color-amber-800);
    font-size: 13px;
}
.profile-avatar-delete {
    position: absolute;
    top: 0;
    right: 0;
    width: 24px;
    height: 24px;
    background: var(--color-danger);
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--color-surface);
    cursor: pointer;
    transition: background 0.15s;
    padding: 0;
    color: #fff;
    font-size: 10px;
}
.profile-avatar-delete:hover {
    background: #c0392b;
}
.profile-header-info h3 {
    font-size: var(--font-size-xl);
    font-weight: 800;
    margin-bottom: 2px;
}
.profile-header-info p {
    margin-bottom: var(--space-sm);
}
.profile-badges {
    display: flex;
    gap: var(--space-sm);
    flex-wrap: wrap;
}
.profile-badges .badge {
    gap: 4px;
}

/* Form grid */
.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-lg);
}
.form-grid .form-group {
    margin-bottom: 0;
}
.form-grid .full-width {
    grid-column: 1 / -1;
}

/* Card actions */
.card-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: var(--space-md);
    margin-top: var(--space-xl);
}

/* Children list */
.children-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-lg);
}
.child-card {
    display: flex;
    align-items: center;
    gap: var(--space-lg);
    padding: var(--space-lg);
    border-radius: var(--radius-xl);
    border: 1px solid;
}
.child-card-yellow {
    background: linear-gradient(135deg, rgba(255,213,79,0.15), rgba(255,193,7,0.08));
    border-color: rgba(255,213,79,0.35);
}
.child-card-blue {
    background: rgba(187,222,251,0.15);
    border-color: rgba(187,222,251,0.5);
}
.child-avatar-wrap {
    flex-shrink: 0;
}
.child-avatar {
    width: 64px;
    height: 64px;
    border-radius: var(--radius-full);
    object-fit: cover;
    border: 2px solid white;
}
.child-avatar-initials {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-kitabee-blue);
    color: var(--color-info);
    font-size: var(--font-size-lg);
    font-weight: 700;
}
.child-card-info {
    flex: 1;
    min-width: 0;
}
.child-card-info h4 {
    font-size: var(--font-size-base);
    font-weight: 700;
    margin-bottom: 2px;
}
.child-card-info p {
    margin-bottom: 2px;
}
.btn-circle {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-full);
    background: var(--color-surface);
    border: 1px solid var(--color-border-light);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.15s;
    flex-shrink: 0;
    color: var(--color-text-muted);
}
.btn-circle:hover {
    background: var(--color-border-light);
}

/* Settings rows (notifications, privacy) */
.settings-rows {
    display: flex;
    flex-direction: column;
    gap: var(--space-lg);
}
.settings-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-lg);
    background: var(--color-bg);
    border-radius: var(--radius-xl);
    gap: var(--space-md);
}
.settings-row-info {
    display: flex;
    align-items: flex-start;
    gap: var(--space-md);
}
.settings-row-info > i {
    margin-top: 2px;
    font-size: 15px;
    width: 18px;
    text-align: center;
    flex-shrink: 0;
}
.settings-row-text h4 {
    font-size: var(--font-size-sm);
    font-weight: 600;
    line-height: 1.3;
}
.settings-row-text p {
    font-size: var(--font-size-xs);
    color: var(--color-text-muted);
    margin-bottom: 0;
    line-height: 1.4;
}

/* Toggle Switch */
.toggle {
    position: relative;
    display: inline-flex;
    align-items: center;
    cursor: pointer;
    flex-shrink: 0;
}
.toggle input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}
.toggle-slider {
    width: 44px;
    height: 24px;
    background: var(--color-border);
    border-radius: var(--radius-full);
    position: relative;
    transition: background 0.2s ease;
    flex-shrink: 0;
}
.toggle-slider::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 20px;
    height: 20px;
    background: white;
    border-radius: 50%;
    transition: transform 0.2s ease;
    box-shadow: var(--shadow-sm);
}
.toggle input:checked + .toggle-slider {
    background: var(--color-kitabee-amber);
}
.toggle input:checked + .toggle-slider::after {
    transform: translateX(20px);
}
.toggle input:checked + .toggle-slider-green {
    background: var(--color-success);
}
.toggle input:checked + .toggle-slider-green::after {
    transform: translateX(20px);
}

/* Compact form input for selects in rows */
.form-input-compact {
    width: auto;
    min-width: 120px;
    padding: 8px 12px;
    font-size: var(--font-size-sm);
    border-radius: var(--radius-lg);
    background: var(--color-surface);
}

/* Info notice (privacy notice) */
.info-notice {
    display: flex;
    align-items: flex-start;
    gap: var(--space-md);
    padding: var(--space-lg);
    background: var(--color-info-bg);
    border: 1px solid var(--color-info-border-soft);
    border-radius: var(--radius-xl);
}
.info-notice > i {
    margin-top: 2px;
    flex-shrink: 0;
}
.info-notice h4 {
    font-size: var(--font-size-sm);
    font-weight: 600;
    margin-bottom: 4px;
}
.info-notice p {
    font-size: var(--font-size-xs);
    color: var(--color-text-secondary);
    margin-bottom: 0;
}
.btn-link {
    background: none;
    border: none;
    color: var(--color-info);
    font-size: var(--font-size-xs);
    font-weight: 600;
    cursor: pointer;
    padding: 0;
    margin-top: var(--space-sm);
    font-family: var(--font-family);
}
.btn-link:hover {
    text-decoration: underline;
}

/* Security rows */
.security-row {
    padding: var(--space-lg);
    background: var(--color-bg);
    border-radius: var(--radius-xl);
}
.security-row-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--space-sm);
}
.security-row-header .settings-row-info h4 {
    font-size: var(--font-size-sm);
    font-weight: 600;
}


.user-pin-control {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.user-pin-toggle {
    width: 40px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-full);
    border: 1px solid rgba(245, 158, 11, 0.22);
    background: rgba(255, 193, 7, 0.12);
    color: var(--color-amber-800);
    cursor: pointer;
    transition: all 0.2s ease;
}

.user-pin-toggle:hover {
    background: rgba(255, 193, 7, 0.2);
    transform: translateY(-1px);
}

.user-pin-code {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 72px;
    padding: 8px 14px;
    border-radius: var(--radius-full);
    background: rgba(255, 193, 7, 0.18);
    color: var(--color-amber-800);
    border: 1px solid rgba(245, 158, 11, 0.24);
    font-size: var(--font-size-lg);
    font-weight: 800;
    letter-spacing: 0.18em;
    font-variant-numeric: tabular-nums;
}

[data-theme="dark"] .user-pin-toggle {
    background: rgba(255, 193, 7, 0.12);
    color: var(--color-kitabee-yellow);
    border-color: rgba(255, 193, 7, 0.24);
}

[data-theme="dark"] .user-pin-code {
    background: rgba(255, 193, 7, 0.16);
    color: var(--color-kitabee-yellow);
    border-color: rgba(255, 193, 7, 0.28);
}
/* Helper / Tips card */
.helper-card {
    background: linear-gradient(135deg, var(--color-kitabee-yellow), var(--color-kitabee-amber));
    border-radius: var(--radius-2xl);
    padding: var(--space-xl);
    text-align: center;
    box-shadow: var(--shadow-sm);
}
.helper-mascot {
    font-size: 56px;
    margin-bottom: var(--space-md);
    line-height: 1;
}
.helper-card h3 {
    font-size: var(--font-size-lg);
    font-weight: 800;
    color: var(--color-amber-800);
    margin-bottom: var(--space-sm);
}
.helper-card p {
    font-size: var(--font-size-sm);
    color: var(--color-amber-800);
    margin-bottom: var(--space-lg);
    opacity: 0.9;
}
.btn-helper {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    font-size: var(--font-size-sm);
    font-weight: 600;
    font-family: var(--font-family);
    background: var(--color-surface);
    color: var(--color-amber-700);
    border: none;
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: background 0.15s;
}
.btn-helper:hover {
    background: var(--color-border-light);
}

/* Account stats */
.account-stats {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}
.account-stat-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-md);
    border-radius: var(--radius-lg);
}
.stat-bg-yellow { background: var(--color-brand-soft); }
.stat-bg-blue { background: var(--color-blue-soft); }
.stat-bg-green { background: var(--color-success-bg); }
.stat-bg-purple { background: var(--color-purple-bg); }

/* Subscription */
.subscription-highlight {
    padding: var(--space-lg);
    background: linear-gradient(135deg, var(--color-brand-soft-strong), var(--color-brand-soft-subtle));
    border: 2px solid var(--color-kitabee-yellow);
    border-radius: var(--radius-xl);
    margin-bottom: var(--space-lg);
}
.subscription-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--space-xs);
}
.subscription-plan {
    font-size: var(--font-size-sm);
    font-weight: 800;
    color: var(--color-amber-800);
}

/* Appearance – compact rows */
.settings-rows-compact {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}
.settings-row-compact {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-md);
    background: var(--color-bg);
    border-radius: var(--radius-lg);
    gap: var(--space-md);
}

/* Support links */
.support-links {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.support-link {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-md);
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: background 0.15s;
    text-decoration: none;
    color: var(--color-text-secondary);
    font-size: var(--font-size-sm);
}
.support-link:hover {
    background: var(--color-border-light);
    color: var(--color-text);
}
.support-link .chevron {
    margin-left: auto;
    color: var(--color-text-muted);
    font-size: var(--font-size-xs);
}

/* Danger zone */
.danger-card {
    border-color: var(--color-danger-border-soft) !important;
}
.danger-actions {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}
.btn-danger-outline {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    padding: 12px 20px;
    font-size: var(--font-size-sm);
    font-weight: 600;
    font-family: var(--font-family);
    background: var(--color-danger-bg);
    color: var(--color-danger);
    border: 1px solid var(--color-danger-border-soft);
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: all 0.15s ease;
}
.btn-danger-outline:hover {
    background: var(--color-danger-bg);
}

/* ============================
   SETTINGS RESPONSIVE
   ============================ */
@media (max-width: 1024px) {
    .settings-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .profile-header {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    .profile-badges {
        justify-content: center;
    }
    .form-grid {
        grid-template-columns: 1fr;
    }
    .card-actions {
        flex-direction: column;
    }
    .card-actions .btn {
        width: 100%;
    }
    .settings-row {
        flex-wrap: wrap;
    }
    .form-input-compact {
        min-width: 100px;
    }
    .child-card {
        flex-wrap: wrap;
    }
}

@media (max-width: 425px) {
    .settings-row {
        flex-direction: column;
        align-items: flex-start;
        gap: var(--space-md);
    }
    .settings-row .toggle,
    .settings-row .form-input-compact {
        align-self: flex-end;
    }
}

/* ============================================
   ACTIVITIES
   ============================================ */

.act-filter-bar {
    display: flex;
    gap: var(--space-sm);
    margin-bottom: var(--space-xl);
    flex-wrap: wrap;
}

.act-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-lg);
}

.act-card {
    border-left: 4px solid var(--color-primary);
    transition: box-shadow 0.2s;
}

.act-card:hover {
    box-shadow: var(--shadow-md);
}

.act-card-today {
    border-left-color: var(--color-success);
    background: rgba(16, 185, 129, 0.03);
}

.act-card-past {
    border-left-color: var(--color-text-muted);
    opacity: 0.8;
}

.act-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: var(--space-md);
}

.act-card-header-left {
    display: flex;
    gap: var(--space-md);
    align-items: flex-start;
    flex: 1;
    min-width: 0;
}

.act-category-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}

.act-cat-creative { background: rgba(168, 85, 247, 0.12); color: #a855f7; }
.act-cat-physical { background: rgba(239, 68, 68, 0.12); color: #ef4444; }
.act-cat-educational { background: rgba(59, 130, 246, 0.12); color: #3b82f6; }
.act-cat-musical { background: rgba(236, 72, 153, 0.12); color: #ec4899; }
.act-cat-outing { background: rgba(34, 197, 94, 0.12); color: #22c55e; }
.act-cat-default,
.act-cat-other { background: rgba(107, 114, 128, 0.12); color: #6b7280; }
.act-cat-free\ play { background: rgba(251, 191, 36, 0.12); color: #f59e0b; }

.act-card-info {
    flex: 1;
    min-width: 0;
}

.act-card-title {
    font-size: var(--font-size-lg);
    font-weight: 700;
    color: var(--color-text);
    margin: 0 0 var(--space-xs) 0;
}

.act-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-sm) var(--space-lg);
    font-size: var(--font-size-sm);
    color: var(--color-text-secondary);
    margin-bottom: var(--space-xs);
}

.act-card-meta i {
    margin-right: 4px;
    color: var(--color-text-muted);
}

.act-card-badges {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-xs);
    margin-top: var(--space-xs);
}

.act-description {
    color: var(--color-text-secondary);
    font-size: var(--font-size-sm);
    margin: var(--space-md) 0 0;
    line-height: 1.5;
}

.act-participant-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: var(--space-md);
    padding-top: var(--space-md);
    border-top: 1px solid var(--color-border);
    font-size: var(--font-size-sm);
    color: var(--color-text-secondary);
}

.act-participant-summary i {
    margin-right: 4px;
}

/* Participants Modal */
.act-picker-shell {
    display: grid;
    gap: var(--space-lg);
    margin-bottom: var(--space-lg);
}

.act-picker-toolbar,
.act-picker-actions,
.act-group-chip-list,
.act-group-chip,
.act-kid-picker-card {
    display: flex;
    gap: var(--space-sm);
}

.act-picker-toolbar {
    align-items: flex-start;
    justify-content: space-between;
    flex-wrap: wrap;
    padding: var(--space-md);
    border: 1px solid var(--color-border-light);
    border-radius: var(--radius-xl);
}

.act-picker-summary {
    display: grid;
    gap: 4px;
}

.act-picker-summary strong {
    font-size: var(--font-size-lg);
    color: var(--color-text);
}

.act-picker-actions {
    flex-wrap: wrap;
    justify-content: flex-end;
}

.act-picker-section {
    display: grid;
    gap: var(--space-md);
}

.act-picker-section-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: var(--space-md);
}

.act-picker-section-title {
    margin: 0;
    font-size: var(--font-size-md);
    color: var(--color-text);
}

.act-picker-section-head p {
    margin: 4px 0 0;
}

.act-group-chip-list {
    flex-wrap: wrap;
}

.act-group-chip {
    appearance: none;
    border: 1px solid var(--color-border-light);
    background: var(--color-surface);
    border-radius: var(--radius-full);
    padding: 10px 14px;
    align-items: center;
    color: var(--color-text);
    cursor: pointer;
    transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.act-group-chip:hover {
    transform: translateY(-1px);
    border-color: rgba(244, 176, 0, 0.45);
    box-shadow: var(--shadow-sm);
}

.act-group-chip.is-selected {
    border-color: rgba(244, 176, 0, 0.55);
    background: linear-gradient(180deg, var(--color-brand-soft-subtle) 0%, var(--color-surface) 100%);
    box-shadow: var(--shadow-sm);
}

.act-group-chip-name {
    font-weight: 700;
}

.act-group-chip-count {
    color: var(--color-text-secondary);
    font-size: var(--font-size-sm);
}

.act-group-chip-state {
    color: var(--color-brand-soft-text);
}

.act-kid-picker-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: var(--space-md);
}

.act-kid-picker-card {
    align-items: center;
    padding: 14px 16px;
    border-radius: var(--radius-xl);
    border: 1px solid var(--color-border-light);
    background: var(--color-surface);
    cursor: pointer;
    transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.act-kid-picker-card:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
}

.act-kid-picker-card.is-selected {
    border-color: rgba(244, 176, 0, 0.58);
    background: linear-gradient(180deg, var(--color-brand-soft-subtle) 0%, var(--color-surface) 100%);
    box-shadow: var(--shadow-sm);
}

.act-kid-picker-checkbox {
    margin: 0;
    width: 18px;
    height: 18px;
    accent-color: var(--color-kitabee-amber);
    flex: 0 0 auto;
}

.act-kid-picker-avatar {
    flex: 0 0 auto;
}

.act-kid-picker-copy {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.act-kid-picker-copy strong {
    color: var(--color-text);
}

.act-kid-picker-copy span {
    color: var(--color-text-secondary);
    font-size: var(--font-size-sm);
}

.act-kid-picker-check {
    margin-left: auto;
    width: 28px;
    height: 28px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: transparent;
    background: var(--color-brand-soft-subtle);
    transition: color 0.18s ease, background 0.18s ease;
}

.act-kid-picker-card.is-selected .act-kid-picker-check {
    color: var(--color-brand-soft-text);
    background: var(--color-brand-soft-strong);
}

.act-participants-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
    max-height: 400px;
    overflow-y: auto;
    margin-bottom: var(--space-lg);
}

/* ============================================================
   Calendar Page Styles
   ============================================================ */

.cal-grid-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-xl);
}

@media (min-width: 1024px) {
    .cal-grid-layout {
        grid-template-columns: 2fr 1fr;
    }
}

.cal-section {
    background: var(--color-surface);
    border-radius: var(--radius-2xl);
    padding: var(--space-xl);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--color-border-light);
}

/* Calendar nav header */
.cal-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--space-xl);
    flex-wrap: wrap;
    gap: var(--space-md);
}

.cal-nav-arrows {
    display: flex;
    align-items: center;
    gap: var(--space-lg);
}

.cal-nav-btn {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-full);
    background: var(--color-bg);
    border: 1px solid var(--color-border-light);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-text-secondary);
    transition: background 0.2s;
}

.cal-nav-btn:hover {
    background: var(--color-border);
}

.cal-month-title {
    font-size: var(--font-size-xl);
    font-weight: 700;
    color: var(--color-text);
}

.cal-view-btns {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    flex-wrap: wrap;
}

.cal-view-btn {
    padding: var(--space-sm) var(--space-lg);
    border-radius: var(--radius-xl);
    border: none;
    font-size: var(--font-size-sm);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    color: var(--color-text-secondary);
    background: transparent;
    font-family: var(--font-family);
}

.cal-view-btn:hover {
    background: var(--color-border-light);
}

.cal-view-btn.active {
    background: var(--color-brand-soft-subtle);
    color: var(--color-brand-soft-text);
}

/* Week day headers */
.cal-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 6px;
    margin-bottom: 6px;
}

.cal-weekday {
    text-align: center;
    font-size: var(--font-size-xs);
    font-weight: 600;
    color: var(--color-text-muted);
    padding: var(--space-sm) 0;
}

/* Calendar day grid */
.cal-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 6px;
}

.cal-day {
    border-radius: var(--radius-md);
    padding: var(--space-md);
    min-height: 90px;
    transition: all 0.2s ease;
    cursor: pointer;
    position: relative;
}

.cal-day:hover {
    transform: translateY(-2px);
}

.cal-day-outside {
    background: var(--color-bg);
}

.cal-day-outside .cal-day-num {
    color: var(--color-text-muted);
    opacity: 0.5;
}

.cal-day-current {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
}

.cal-day-current:hover {
    border-color: var(--color-kitabee-amber);
}

.cal-day-today {
    background: var(--color-brand-soft-subtle);
    border: 2px solid var(--color-kitabee-amber);
}

.cal-day-today .cal-day-num {
    color: var(--color-brand-soft-text);
    font-weight: 700;
}

.cal-day-num {
    font-size: var(--font-size-xs);
    font-weight: 600;
    color: var(--color-text-secondary);
    margin-bottom: var(--space-xs);
}

/* Event dot indicators inside calendar day */
.cal-day-events {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.cal-day-item {
    position: relative;
    min-width: 0;
    padding-right: 18px;
}

.cal-day-item-requested,
.cal-day-event.cal-day-item-requested,
.cal-day-event-label.cal-day-item-requested {
    opacity: 0.62;
}

.cal-day-event {
    display: flex;
    align-items: center;
    gap: 4px;
    min-width: 0;
}

.cal-day-event-bar {
    width: 100%;
    height: 3px;
    border-radius: var(--radius-full);
}

.cal-day-event-label {
    display: block;
    font-size: 11px;
    color: var(--color-text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
}

.cal-day-delete {
    position: absolute;
    top: 50%;
    right: 0;
    transform: translateY(-50%);
    width: 14px;
    height: 14px;
    padding: 0;
    background: transparent;
    color: var(--color-danger);
    border: none;
    border-radius: 0;
    box-shadow: none;
    font-size: 12px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.15s ease, color 0.15s ease;
}

.cal-day-item:hover .cal-day-delete,
.cal-day-item:focus-within .cal-day-delete {
    opacity: 1;
}

.cal-day-delete:hover { color: var(--color-danger); }

.cal-day-add {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-top: 4px;
    padding: 0;
    background: transparent;
    border: none;
    box-shadow: none;
    appearance: none;
    font-size: var(--font-size-xs);
    font-family: var(--font-family);
    font-weight: 700;
    color: var(--color-kitabee-amber);
    cursor: pointer;
}

.cal-day-add:hover {
    color: var(--color-amber-600);
}

/* Category colors */
.cal-color-green { background-color: var(--color-success); }
.cal-color-purple { background-color: var(--color-purple); }
.cal-color-blue { background-color: var(--color-info); }
.cal-color-amber { background-color: var(--color-kitabee-amber); }
.cal-color-pink { background-color: var(--color-pink); }
.cal-color-red { background-color: var(--color-danger); }
.cal-color-teal { background-color: var(--color-teal); }
.cal-color-default { background-color: var(--color-text-muted); }

/* Upcoming events sidebar cards */
.cal-event-card {
    padding: var(--space-lg);
    border-radius: var(--radius-xl);
    cursor: pointer;
    transition: all 0.2s;
    border-left: 4px solid;
    margin-bottom: var(--space-md);
}

.cal-event-card:last-child {
    margin-bottom: 0;
}

.cal-event-card:hover {
    filter: brightness(0.96);
}

.cal-event-card-red { background: var(--color-danger-bg); border-color: var(--color-danger); }
.cal-event-card-pink { background: var(--color-pink-bg); border-color: var(--color-pink); }
.cal-event-card-green { background: var(--color-success-bg); border-color: var(--color-success); }
.cal-event-card-blue { background: var(--color-info-bg); border-color: var(--color-info); }
.cal-event-card-purple { background: var(--color-purple-bg); border-color: var(--color-purple); }
.cal-event-card-amber { background: var(--color-brand-soft-subtle); border-color: var(--color-kitabee-amber); }
.cal-event-card-requested { opacity: 0.72; }

.cal-event-card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: var(--space-sm);
}

.cal-event-card-title {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.cal-event-card-title i {
    font-size: var(--font-size-sm);
}

.cal-event-card-title span {
    font-size: var(--font-size-sm);
    font-weight: 700;
    color: var(--color-text);
}

.cal-event-date-badge {
    font-size: var(--font-size-xs);
    padding: 2px var(--space-sm);
    border-radius: var(--radius-full);
    font-weight: 600;
}

.cal-event-desc {
    font-size: var(--font-size-xs);
    color: var(--color-text-secondary);
    margin-bottom: var(--space-sm);
}

.cal-event-meta {
    display: flex;
    align-items: center;
    gap: var(--space-lg);
    font-size: var(--font-size-xs);
    color: var(--color-text-muted);
}

.cal-event-meta i {
    margin-right: 4px;
}

/* Filter section */
.cal-filter-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.cal-kita-filter {
    display: grid;
    gap: var(--space-sm);
    padding-bottom: var(--space-md);
    border-bottom: 1px solid var(--color-border-light);
    color: var(--color-text-secondary);
    font-size: var(--font-size-sm);
    font-weight: 700;
}

.cal-filter-select {
    width: 100%;
}

.cal-filter-item {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    cursor: pointer;
    font-size: var(--font-size-sm);
    color: var(--color-text-secondary);
}

.cal-filter-item input[type="checkbox"] {
    width: 16px;
    height: 16px;
    border-radius: var(--radius-sm);
    accent-color: var(--color-kitabee-amber);
}

/* Category cards grid */
.cal-categories-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-md);
}

@media (min-width: 768px) {
    .cal-categories-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

.cal-category-card {
    padding: var(--space-lg);
    border-radius: var(--radius-xl);
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    border: 1px solid;
}

.cal-category-card:hover {
    filter: brightness(0.95);
}

.cal-category-card i {
    font-size: var(--font-size-2xl);
    margin-bottom: var(--space-sm);
    display: block;
}

.cal-category-card-label {
    font-size: var(--font-size-sm);
    font-weight: 600;
    color: var(--color-text-secondary);
}

.cal-category-card-count {
    font-size: var(--font-size-xs);
    color: var(--color-text-muted);
    margin-top: var(--space-xs);
}

.cal-cat-green { background: var(--color-success-bg); border-color: var(--color-success-border-soft); color: var(--color-success); }
.cal-cat-green:hover { background: var(--color-success-bg); }
.cal-cat-purple { background: var(--color-purple-bg); border-color: var(--color-purple-border-soft); color: var(--color-purple); }
.cal-cat-purple:hover { background: var(--color-purple-bg); }
.cal-cat-blue { background: var(--color-info-bg); border-color: var(--color-info-border-soft); color: var(--color-info); }
.cal-cat-blue:hover { background: var(--color-info-bg); }
.cal-cat-amber { background: var(--color-brand-soft-subtle); border-color: var(--color-kitabee-amber); color: var(--color-brand-soft-text); }
.cal-cat-amber:hover { background: var(--color-brand-soft-subtle); }
.cal-cat-pink { background: var(--color-pink-bg); border-color: var(--color-pink-border-soft); color: var(--color-pink); }
.cal-cat-pink:hover { background: var(--color-pink-bg); }
.cal-cat-red { background: var(--color-danger-bg); border-color: var(--color-danger-border-soft); color: var(--color-danger); }
.cal-cat-red:hover { background: var(--color-danger-bg); }

/* Admin: event management quick actions */
.cal-mgmt-grid {
    display: grid;
    grid-template-columns: repeat(1, 1fr);
    gap: var(--space-lg);
}

@media (min-width: 768px) {
    .cal-mgmt-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.cal-mgmt-btn {
    padding: var(--space-lg);
    border-radius: var(--radius-xl);
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    border: 1px solid;
    background: transparent;
    font-family: var(--font-family);
}

.cal-mgmt-btn:hover {
    filter: brightness(0.95);
}

.cal-mgmt-btn i {
    font-size: var(--font-size-2xl);
    margin-bottom: var(--space-sm);
    display: block;
    transition: transform 0.2s;
}

.cal-mgmt-btn:hover i {
    transform: scale(1.1);
}

.cal-mgmt-btn-label {
    font-size: var(--font-size-sm);
    font-weight: 600;
    color: var(--color-text-secondary);
}

.cal-mgmt-btn-sub {
    font-size: var(--font-size-xs);
    color: var(--color-text-muted);
    margin-top: var(--space-xs);
}

.cal-mgmt-green { background: var(--color-success-bg); border-color: var(--color-success-border-soft); color: var(--color-success); }
.cal-mgmt-blue { background: var(--color-info-bg); border-color: var(--color-info-border-soft); color: var(--color-info); }
.cal-mgmt-purple { background: var(--color-purple-bg); border-color: var(--color-purple-border-soft); color: var(--color-purple); }

/* Admin: event stat rows */
.cal-stat-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-md);
    border-radius: var(--radius-md);
    margin-bottom: var(--space-md);
}

.cal-stat-row:last-child {
    margin-bottom: 0;
}

.cal-stat-row-green { background: var(--color-success-bg); }
.cal-stat-row-blue { background: var(--color-info-bg); }
.cal-stat-row-purple { background: var(--color-purple-bg); }

.cal-stat-label {
    font-size: var(--font-size-sm);
    font-weight: 600;
    color: var(--color-text-secondary);
}

.cal-stat-sub {
    font-size: var(--font-size-xs);
    color: var(--color-text-muted);
}

.cal-stat-value {
    font-size: var(--font-size-2xl);
    font-weight: 700;
}

.cal-stat-value-green { color: var(--color-success); }
.cal-stat-value-blue { color: var(--color-info); }
.cal-stat-value-purple { color: var(--color-purple); }

/* Admin: event list with edit/delete */
.cal-event-actions {
    display: flex;
    gap: var(--space-sm);
}

.cal-event-action-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: var(--font-size-xs);
    padding: 4px;
    transition: color 0.2s;
}

.cal-event-action-btn-edit { color: var(--color-info); }
.cal-event-action-btn-edit:hover { color: var(--color-info); }
.cal-event-action-btn-delete { color: var(--color-danger); }
.cal-event-action-btn-delete:hover { color: var(--color-danger); }

/* Admin: category list sidebar */
.cal-cat-list-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-sm);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: background 0.2s;
}

.cal-cat-list-item:hover { background: var(--color-border-light); }

.cal-cat-dot {
    width: 12px;
    height: 12px;
    border-radius: var(--radius-full);
    flex-shrink: 0;
}

.cal-cat-list-info {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.cal-cat-list-info span {
    font-size: var(--font-size-sm);
    color: var(--color-text-secondary);
}

.cal-cat-list-count {
    font-size: var(--font-size-xs);
    font-weight: 600;
    color: var(--color-text-muted);
}

/* ============================
   FORM BUILDER
   ============================ */

/* Page header */
.fb-page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--space-2xl);
    flex-wrap: wrap;
    gap: var(--space-md);
}
.fb-page-header-left {
    display: flex;
    align-items: center;
    gap: var(--space-lg);
}
.fb-page-header-actions {
    display: flex;
    gap: var(--space-md);
}
.fb-page-title {
    font-size: var(--font-size-xl);
    font-weight: 800;
    margin: 0;
}
.fb-page-subtitle {
    font-size: var(--font-size-sm);
    color: var(--color-text-muted);
    margin: 0;
}

/* Layout: main + sidebar */
.fb-layout {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: var(--space-2xl);
    align-items: start;
}
.fb-main {
    min-width: 0;
}
.fb-sidebar {
    display: flex;
    flex-direction: column;
    gap: var(--space-xl);
}

/* Builder header */
.fb-builder-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--space-lg);
}

/* 3 column row */
.fb-row-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-lg);
}

/* Field cards */
.fb-fields-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}
.fb-field-card {
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-xl);
    padding: var(--space-lg);
    transition: border-color 0.15s, box-shadow 0.15s;
}
.fb-field-card:hover {
    border-color: var(--color-kitabee-amber);
}
.fb-field-selected {
    border-color: var(--color-kitabee-amber) !important;
    box-shadow: 0 0 0 3px rgba(255,193,7,0.15);
}
.fb-field-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--space-md);
    flex-wrap: wrap;
    gap: var(--space-sm);
}
.fb-field-header-left {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}
.fb-field-actions {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    flex-wrap: wrap;
}
.fb-drag-handle {
    color: var(--color-text-muted);
    cursor: grab;
    font-size: 14px;
}
.fb-field-type-icon {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    flex-shrink: 0;
}
.fb-icon-green { background: #dcfce7; color: #16a34a; }
.fb-icon-blue { background: #dbeafe; color: #1d4ed8; }
.fb-icon-purple { background: #f3e8ff; color: #9333ea; }
.fb-icon-yellow { background: #fef9c3; color: #ca8a04; }
.fb-icon-red { background: #fee2e2; color: #dc2626; }
.fb-icon-indigo { background: #e0e7ff; color: #4338ca; }
.fb-icon-pink { background: #fce7f3; color: #db2777; }
.fb-icon-orange { background: #ffedd5; color: #ea580c; }
.fb-icon-amber { background: rgba(255,213,79,0.3); color: var(--color-amber-800); }

.fb-field-type-label {
    font-size: var(--font-size-sm);
    font-weight: 600;
    color: var(--color-text-secondary);
}
.fb-field-body {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}
.fb-preview-input {
    opacity: 0.6;
    pointer-events: none;
}

/* Type selector */
.fb-type-select {
    padding: 6px 10px;
    font-size: var(--font-size-xs);
    font-family: var(--font-family);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    background: var(--color-surface);
    cursor: pointer;
}

/* Toggle switch */
.fb-sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    border: 0;
}
.fb-toggle-label {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    cursor: pointer;
}
.fb-toggle {
    position: relative;
    width: 44px;
    height: 24px;
    background: var(--color-border);
    border-radius: var(--radius-full);
    transition: background 0.2s;
    flex-shrink: 0;
}
.fb-toggle-on {
    background: var(--color-kitabee-amber);
}
.fb-toggle-slider {
    position: absolute;
    top: 2px;
    left: 2px;
    width: 20px;
    height: 20px;
    background: white;
    border-radius: var(--radius-full);
    transition: transform 0.2s;
    box-shadow: var(--shadow-sm);
}
.fb-toggle-on .fb-toggle-slider {
    transform: translateX(20px);
}

/* Options */
.fb-options-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
    padding-left: var(--space-md);
}
.fb-option-row {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}
.fb-option-input {
    flex: 1;
    padding: 6px 10px !important;
    font-size: var(--font-size-sm) !important;
    border-radius: var(--radius-md) !important;
}
.fb-option-remove {
    width: 28px;
    height: 28px;
    border: none;
    background: none;
    color: var(--color-text-muted);
    cursor: pointer;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.15s, background 0.15s;
}
.fb-option-remove:hover {
    color: var(--color-danger);
    background: var(--color-danger-bg);
}
.fb-add-option-btn {
    display: inline-flex;
    align-items: center;
    gap: var(--space-xs);
    font-size: var(--font-size-xs);
    color: var(--color-info);
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px 0;
    font-family: var(--font-family);
    font-weight: 600;
}
.fb-add-option-btn:hover {
    text-decoration: underline;
}

/* Add field zone */
.fb-add-field-zone {
    border: 2px dashed var(--color-border);
    border-radius: var(--radius-xl);
    padding: var(--space-2xl);
    text-align: center;
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s;
    color: var(--color-text-muted);
}
.fb-add-field-zone:hover {
    border-color: var(--color-kitabee-amber);
    background: rgba(255,213,79,0.05);
}
.fb-add-field-zone i {
    font-size: var(--font-size-2xl);
    margin-bottom: var(--space-sm);
    display: block;
}
.fb-add-field-zone p {
    font-size: var(--font-size-sm);
    margin: 0;
}

/* Settings */
.fb-settings-col {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}
.fb-setting-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-lg);
    background: var(--color-bg);
    border-radius: var(--radius-xl);
}
.fb-setting-title {
    font-size: var(--font-size-sm);
    font-weight: 600;
    margin: 0;
}
.fb-setting-desc {
    font-size: var(--font-size-xs);
    color: var(--color-text-muted);
    margin: 0;
}

/* Actions bar */
.fb-actions-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: var(--space-md);
}
.fb-actions-left,
.fb-actions-right {
    display: flex;
    gap: var(--space-md);
}

/* Field Library sidebar */
.fb-library-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}
.fb-library-item {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-md);
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s;
    font-size: var(--font-size-sm);
    font-weight: 600;
    color: var(--color-text-secondary);
}
.fb-library-item:hover {
    background: var(--color-border-light);
    border-color: var(--color-kitabee-amber);
}

/* Tips card */
.fb-tips-card {
    background: linear-gradient(135deg, var(--color-kitabee-yellow), var(--color-kitabee-amber));
    border-radius: var(--radius-2xl);
    padding: var(--space-xl);
}
.fb-tips-title {
    font-size: var(--font-size-lg);
    font-weight: 700;
    color: var(--color-amber-800);
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    margin-bottom: var(--space-md);
}
.fb-tips-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}
.fb-tips-list li {
    font-size: var(--font-size-sm);
    color: var(--color-amber-800);
    display: flex;
    align-items: flex-start;
    gap: var(--space-sm);
}

/* Templates */
.fb-template-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}
.fb-template-item {
    padding: var(--space-md);
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: opacity 0.15s;
}
.fb-template-item:hover { opacity: 0.8; }
.fb-template-blue { background: rgba(187,222,251,0.3); }
.fb-template-blue .fb-template-name { color: #1565c0; }
.fb-template-blue .fb-template-desc { color: #1976d2; }
.fb-template-green { background: #f0fdf4; }
.fb-template-green .fb-template-name { color: #166534; }
.fb-template-green .fb-template-desc { color: #16a34a; }
.fb-template-purple { background: #faf5ff; }
.fb-template-purple .fb-template-name { color: #6b21a8; }
.fb-template-purple .fb-template-desc { color: #9333ea; }
.fb-template-name {
    font-size: var(--font-size-sm);
    font-weight: 600;
    margin: 0;
    min-width: 0;
    overflow-wrap: anywhere;
}
.fb-template-desc {
    font-size: var(--font-size-xs);
    margin: 0;
}
.fb-template-divider {
    height: 1px;
    background: var(--color-border-light);
    margin: var(--space-md) 0;
}
.fb-template-section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-sm);
    margin-bottom: var(--space-sm);
}
.fb-template-neutral {
    background: var(--color-surface-muted);
    border: 1px solid var(--color-border-light);
}
.fb-template-active {
    border-color: var(--color-info);
    box-shadow: 0 0 0 3px var(--color-info-bg);
}
.fb-template-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-sm);
}
.fb-template-actions {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    flex-shrink: 0;
}
.fb-template-delete {
    width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(220, 38, 38, 0.2);
    border-radius: var(--radius-md);
    background: var(--color-surface);
    color: var(--color-danger);
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s;
}
.fb-template-delete:hover {
    background: var(--color-danger-bg);
    border-color: var(--color-danger);
}
.fb-template-meta {
    display: inline-flex;
    margin-top: var(--space-xs);
    color: var(--color-text-muted);
    font-size: var(--font-size-xs);
    font-weight: 600;
}
.fb-template-empty {
    margin: 0;
    color: var(--color-text-muted);
    font-size: var(--font-size-sm);
}

@media (max-width: 640px) {
    .fb-page-header-left {
        width: 100%;
        align-items: flex-start;
        gap: var(--space-md);
    }
    .fb-page-header-actions {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        width: 100%;
        gap: var(--space-sm);
    }
    .fb-page-header-actions .btn {
        width: 100%;
        justify-content: center;
    }
    .fb-page-header-actions .btn-primary {
        grid-column: 1 / -1;
    }
    .fb-template-item {
        padding: var(--space-sm) var(--space-md);
    }
    .fb-template-row {
        align-items: flex-start;
    }
    .fb-template-delete {
        width: 40px;
        height: 40px;
    }
    .template-delete-overlay {
        align-items: flex-end;
        padding: 0;
    }
    .template-delete-modal {
        width: 100%;
        max-width: none;
        max-height: 85vh;
        padding: var(--space-xl);
        border-radius: var(--radius-2xl) var(--radius-2xl) 0 0;
    }
    .template-delete-modal .modal-actions {
        display: grid;
        grid-template-columns: 1fr;
    }
    .template-delete-modal .modal-actions .btn {
        width: 100%;
        min-height: 44px;
        justify-content: center;
    }
    .template-delete-modal .btn-danger {
        order: -1;
    }
}

/* Preview Modal */
.fb-preview-modal {
    max-width: 700px !important;
    width: 95%;
}
.fb-preview-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--space-xl);
}
.fb-preview-content {
    max-height: 60vh;
    overflow-y: auto;
    padding-right: var(--space-sm);
}
.fb-preview-title-block {
    margin-bottom: var(--space-xl);
    padding-bottom: var(--space-lg);
    border-bottom: 1px solid var(--color-border-light);
}
.fb-preview-title-block h3 {
    font-size: var(--font-size-xl);
    margin-bottom: var(--space-xs);
}
.fb-preview-field {
    margin-bottom: var(--space-xl);
}
.fb-preview-section-header {
    font-size: var(--font-size-lg);
    font-weight: 700;
    color: var(--color-text);
    margin-bottom: var(--space-md);
    padding-bottom: var(--space-sm);
    border-bottom: 2px solid var(--color-kitabee-yellow);
}
.fb-preview-options {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
    padding-left: var(--space-sm);
}
.fb-preview-radio {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    font-size: var(--font-size-sm);
    color: var(--color-text-secondary);
    cursor: pointer;
}
.fb-preview-signature {
    border: 2px dashed var(--color-border);
    border-radius: var(--radius-xl);
    padding: var(--space-2xl);
    text-align: center;
    color: var(--color-text-muted);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-sm);
}

/* Form Fill (Parent) */
.fb-fill-container {
    max-width: 750px;
    margin: 0 auto;
}
.fb-fill-header {
    display: flex;
    align-items: center;
    gap: var(--space-lg);
    margin-bottom: var(--space-xl);
}
.fb-fill-field {
    margin-bottom: var(--space-xl);
}
.fb-fill-options {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}
.fb-fill-radio-label {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    font-size: var(--font-size-sm);
    cursor: pointer;
    padding: var(--space-sm) var(--space-md);
    border-radius: var(--radius-lg);
    transition: background 0.1s;
}
.fb-fill-radio-label:hover {
    background: var(--color-border-light);
}
.fb-fill-file-zone {
    border: 2px dashed var(--color-border);
    border-radius: var(--radius-xl);
    padding: var(--space-xl);
    text-align: center;
    color: var(--color-text-muted);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-sm);
}

/* Admin Response View */
.fb-response-detail-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--space-xl);
    padding-bottom: var(--space-lg);
    border-bottom: 1px solid var(--color-border-light);
}
.fb-response-field {
    margin-bottom: var(--space-lg);
    padding-bottom: var(--space-md);
    border-bottom: 1px solid var(--color-border-light);
}
.fb-response-field:last-of-type {
    border-bottom: none;
}
.fb-response-value {
    font-size: var(--font-size-base);
    color: var(--color-text);
    padding: var(--space-sm) 0;
}
.fb-response-signature {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-lg);
    background: var(--color-bg);
    border-radius: var(--radius-xl);
    font-size: var(--font-size-lg);
    font-style: italic;
    color: var(--color-text);
}

/* Responsive */
@media (max-width: 1024px) {
    .fb-layout {
        grid-template-columns: 1fr;
    }
    .fb-sidebar {
        order: -1;
    }
    .fb-row-3 {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .fb-page-header {
        flex-direction: column;
        align-items: flex-start;
    }
    .fb-field-header {
        flex-direction: column;
        align-items: flex-start;
    }
    .fb-field-actions {
        width: 100%;
        justify-content: flex-end;
    }
    .fb-actions-bar {
        flex-direction: column;
    }
    .fb-actions-left,
    .fb-actions-right {
        width: 100%;
        justify-content: center;
    }
    .fb-response-detail-header {
        flex-direction: column;
        gap: var(--space-md);
    }
}

/* Appointment modal overlay */
.cal-modal-info {
    padding: var(--space-lg);
    background: var(--color-blue-soft);
    border-radius: var(--radius-xl);
    margin-top: var(--space-xl);
}

.cal-modal-info-inner {
    display: flex;
    align-items: flex-start;
    gap: var(--space-md);
}

.cal-modal-info-inner i {
    color: var(--color-info);
    margin-top: 2px;
}

.cal-modal-info-inner p {
    font-size: var(--font-size-sm);
    color: var(--color-text-secondary);
}

/* Responsive */
@media (max-width: 640px) {
    .cal-day {
        min-height: 60px;
        padding: var(--space-sm);
    }

    .cal-day-event-label {
        display: none;
    }

    .cal-nav {
        flex-direction: column;
        align-items: flex-start;
    }

    .cal-view-btns {
        width: 100%;
        justify-content: flex-start;
    }

    .cal-categories-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.act-participant-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-sm) var(--space-md);
    background: var(--color-bg-secondary);
    border-radius: var(--radius-md);
}

.act-participant-info {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.act-participant-actions {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.act-participant-actions .form-input-compact {
    width: 120px;
    padding: 6px 8px;
    font-size: var(--font-size-xs);
}

/* Parent: Kid Registration */
.act-kids-register {
    margin-top: var(--space-md);
    padding-top: var(--space-md);
    border-top: 1px solid var(--color-border);
}

.act-register-title {
    font-size: var(--font-size-sm);
    font-weight: 600;
    color: var(--color-text-secondary);
    margin: 0 0 var(--space-sm) 0;
}

.act-kids-grid {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-sm);
}

.act-kid-register-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-md);
    padding: var(--space-sm) var(--space-md);
    background: var(--color-bg-secondary);
    border-radius: var(--radius-md);
    border: 1px solid var(--color-border);
    min-width: 240px;
    flex: 1;
    max-width: 350px;
}

.act-kid-registered {
    background: rgba(16, 185, 129, 0.06);
    border-color: var(--color-success);
}

.act-kid-info {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    font-size: var(--font-size-sm);
    font-weight: 500;
}

.act-kid-action-stack {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: var(--space-xs);
}

.act-btn-unregister {
    border-color: var(--color-danger) !important;
    color: var(--color-danger) !important;
}

.act-btn-unregister:hover {
    background: rgba(239, 68, 68, 0.08) !important;
}

.act-past-status {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-xs);
    margin-top: var(--space-md);
    padding-top: var(--space-md);
    border-top: 1px solid var(--color-border);
}

.act-past-badge {
    font-size: var(--font-size-xs);
}

.act-request-modal {
    max-width: 640px !important;
}

.act-unregister-requests {
    margin-top: var(--space-lg);
    padding-top: var(--space-lg);
    border-top: 1px solid var(--color-border);
}

.act-unregister-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: var(--space-md);
    margin-bottom: var(--space-md);
}

.act-request-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.act-request-card {
    border: 1px solid var(--color-border);
    border-radius: var(--radius-xl);
    background: var(--color-bg-secondary);
    padding: var(--space-md);
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.act-request-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: var(--space-md);
}

.act-request-note {
    margin: 0;
    color: var(--color-text-secondary);
    white-space: pre-wrap;
}

.act-request-actions {
    display: flex;
    justify-content: flex-end;
    gap: var(--space-sm);
    flex-wrap: wrap;
}

/* Responsive */
@media (max-width: 768px) {
    .act-card-header {
        flex-direction: column;
    }

    .act-card-meta {
        flex-direction: column;
        gap: var(--space-xs);
    }

    .act-kid-register-card {
        min-width: 100%;
        max-width: 100%;
    }

    .act-kid-action-stack,
    .act-request-header {
        width: 100%;
        align-items: flex-start;
    }

    .act-participant-row {
        flex-direction: column;
        align-items: flex-start;
        gap: var(--space-sm);
    }

    .act-participant-actions {
        width: 100%;
        justify-content: flex-end;
    }

    .act-picker-toolbar {
        flex-direction: column;
    }

    .act-picker-actions,
    .act-group-chip-list {
        width: 100%;
        justify-content: flex-start;
    }

    .act-kid-picker-grid {
        grid-template-columns: 1fr;
    }

    .act-unregister-header {
        flex-direction: column;
    }
}

/* Forms dashboard pages */
.forms-page-container {
    width: 100%;
}

.forms-dashboard-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: var(--space-xl);
}

.forms-dashboard-header-copy {
    max-width: 760px;
}

.forms-dashboard-actions {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    flex-wrap: wrap;
}

.forms-stats-grid {
    margin-bottom: var(--space-2xl);
}

.forms-dashboard-shell {
    display: grid;
    grid-template-columns: minmax(0, 1.75fr) minmax(320px, 0.95fr);
    gap: var(--space-xl);
    align-items: start;
}

.forms-dashboard-main,
.forms-dashboard-side {
    display: flex;
    flex-direction: column;
    gap: var(--space-xl);
}

.forms-filter-card {
    display: flex;
    flex-direction: column;
    gap: var(--space-lg);
}

.forms-filter-card-stacked {
    gap: var(--space-md);
}

.forms-filter-heading {
    display: grid;
    gap: var(--space-xs);
}

.forms-filter-controls-row {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: var(--space-md);
    flex-wrap: wrap;
    margin-top: var(--space-sm);
}

.forms-filter-controls-row > .form-input {
    flex: 0 1 240px;
}

.forms-filter-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: var(--space-lg);
    flex-wrap: wrap;
}

.forms-tab-list {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-sm);
}

.forms-filter-tab {
    border: 1px solid transparent;
    border-radius: var(--radius-lg);
    background: var(--color-border-light);
    color: var(--color-text-secondary);
    padding: 10px 16px;
    font-family: var(--font-family);
    font-size: var(--font-size-sm);
    font-weight: 700;
    cursor: pointer;
    transition: all 0.15s ease;
}

.forms-filter-tab:hover {
    background: var(--color-border);
}

.forms-filter-tab.active {
    background: rgba(255, 213, 79, 0.28);
    color: var(--color-amber-800);
    border-color: rgba(255, 193, 7, 0.55);
}

.forms-search {
    position: relative;
    width: min(100%, 360px);
}

.forms-search i {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--color-text-muted);
    pointer-events: none;
}

.forms-search .form-input {
    padding-left: 40px;
}

.forms-template-card {
    display: flex;
    flex-direction: column;
    gap: var(--space-lg);
}

.forms-template-layout {
    display: grid;
    grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.3fr);
    gap: var(--space-lg);
}

.forms-template-block {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.forms-template-block-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-sm);
}

.forms-template-block-head h3 {
    margin: 0;
    font-size: var(--font-size-md);
}

.forms-template-block-head span {
    color: var(--color-text-muted);
    font-size: var(--font-size-xs);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.forms-template-tile-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: var(--space-md);
}

.forms-template-tile {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
    padding: var(--space-lg);
    border-radius: var(--radius-xl);
    text-decoration: none;
    border: 1px solid transparent;
    transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
    box-shadow: var(--shadow-sm);
}

.forms-template-tile:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.forms-template-tile strong {
    color: var(--color-text);
    font-size: var(--font-size-sm);
}

.forms-template-tile span:last-child {
    color: var(--color-text-secondary);
    font-size: var(--font-size-xs);
}

.forms-template-tile-blue {
    background: linear-gradient(180deg, rgba(219, 234, 254, 0.92) 0%, rgba(239, 246, 255, 0.96) 100%);
    border-color: rgba(59, 130, 246, 0.14);
}

.forms-template-tile-green {
    background: linear-gradient(180deg, rgba(220, 252, 231, 0.92) 0%, rgba(240, 253, 244, 0.98) 100%);
    border-color: rgba(22, 163, 74, 0.14);
}

.forms-template-tile-purple {
    background: linear-gradient(180deg, rgba(243, 232, 255, 0.92) 0%, rgba(250, 245, 255, 0.98) 100%);
    border-color: rgba(147, 51, 234, 0.14);
}

.forms-template-tile-icon {
    width: 42px;
    height: 42px;
    border-radius: var(--radius-lg);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: var(--space-xs);
    font-size: 1rem;
    background: rgba(255, 255, 255, 0.78);
    color: var(--color-text);
}

.forms-template-saved-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.forms-template-saved-item {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: var(--space-lg);
    padding: var(--space-lg);
    border-radius: var(--radius-xl);
    border: 1px solid var(--color-border-light);
    background: var(--color-surface-muted);
}

.forms-template-saved-copy {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
    min-width: 0;
    flex: 1;
}

.forms-template-saved-title-row {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    flex-wrap: wrap;
}

.forms-template-saved-title-row strong {
    font-size: var(--font-size-md);
    color: var(--color-text);
}

.forms-template-saved-copy p {
    margin: 0;
    color: var(--color-text-secondary);
}

.forms-template-saved-meta {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-md);
    color: var(--color-text-muted);
    font-size: var(--font-size-xs);
    font-weight: 600;
}

.forms-template-saved-meta span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.forms-template-saved-actions {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
    min-width: 170px;
}

.forms-template-empty {
    padding: var(--space-lg);
    border-radius: var(--radius-xl);
    border: 1px dashed var(--color-border);
    background: var(--color-surface-muted);
}

.forms-template-empty p {
    margin: 0;
    color: var(--color-text-muted);
}

.forms-record-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.forms-record-card {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: var(--space-lg);
    border-radius: var(--radius-2xl);
    padding: var(--space-lg);
    border: 1px solid var(--color-border-light);
    box-shadow: var(--shadow-sm);
}

.forms-record-card-warning {
    background: var(--color-surface);
    border-color: rgba(234, 88, 12, 0.18);
}

.forms-record-card-success {
    background: var(--color-surface);
    border-color: rgba(22, 163, 74, 0.14);
}

.forms-record-card-danger {
    background: var(--color-surface);
    border-color: rgba(220, 38, 38, 0.16);
}

.forms-record-card-purple {
    background: var(--color-surface);
    border-color: rgba(147, 51, 234, 0.14);
}

.forms-record-main {
    display: flex;
    align-items: flex-start;
    gap: var(--space-lg);
    min-width: 0;
    flex: 1;
}

.forms-record-icon {
    width: 52px;
    height: 52px;
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 20px;
}

.forms-record-icon-warning {
    background: rgba(255, 237, 213, 0.95);
    color: var(--color-warning);
}

.forms-record-icon-success {
    background: rgba(220, 252, 231, 0.95);
    color: var(--color-success);
}

.forms-record-icon-danger {
    background: rgba(254, 226, 226, 0.95);
    color: var(--color-danger);
}

.forms-record-icon-purple {
    background: rgba(243, 232, 255, 0.95);
    color: var(--color-purple);
}

.forms-record-content {
    min-width: 0;
    flex: 1;
}

.forms-record-title-row {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    flex-wrap: wrap;
    margin-bottom: var(--space-sm);
}

.forms-record-title-row h3 {
    margin: 0;
    font-size: var(--font-size-lg);
}

.forms-record-description {
    color: var(--color-text-secondary);
    margin-bottom: var(--space-md);
}

.forms-record-meta {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-md);
    margin-bottom: var(--space-md);
    color: var(--color-text-muted);
    font-size: var(--font-size-sm);
}

.forms-record-meta span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.forms-record-progress {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    flex-wrap: wrap;
}

.forms-progress {
    width: 100%;
    height: 8px;
    border-radius: var(--radius-full);
    background: var(--color-border-light);
    overflow: hidden;
    flex: 1 1 180px;
}

.forms-progress span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--color-kitabee-yellow), var(--color-kitabee-amber));
}

.forms-progress-green span {
    background: linear-gradient(90deg, #34d399, #16a34a);
}

.forms-progress-blue span {
    background: linear-gradient(90deg, #60a5fa, #2563eb);
}

.forms-progress-purple span {
    background: linear-gradient(90deg, #c084fc, #9333ea);
}

.forms-progress-danger span {
    background: linear-gradient(90deg, #f87171, #dc2626);
}

.forms-progress-warning span {
    background: linear-gradient(90deg, #fb923c, #ea580c);
}

.forms-progress-compact {
    height: 5px;
}

.forms-record-actions {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
    align-self: stretch;
    justify-content: center;
    min-width: 150px;
}

.forms-record-actions .btn {
    width: 100%;
}

.forms-inline-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: var(--space-sm);
}

.forms-icon-danger {
    color: var(--color-danger);
}

.forms-mini-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.forms-mini-item {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-md);
    border-radius: var(--radius-xl);
    background: var(--color-bg);
}

.forms-mini-copy {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
    flex: 1;
}

.forms-mini-copy strong {
    font-size: var(--font-size-sm);
}

.forms-mini-copy span {
    font-size: var(--font-size-xs);
    color: var(--color-text-muted);
}

.forms-mini-time {
    font-size: var(--font-size-xs);
    color: var(--color-text-muted);
    white-space: nowrap;
}

.forms-progress-stack {
    display: flex;
    flex-direction: column;
    gap: var(--space-lg);
}

.forms-analytics-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-lg);
}

.forms-analytics-item {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.forms-analytics-meter {
    display: block;
    width: 100%;
    height: 6px;
    min-height: 6px;
    max-height: 6px;
    border-radius: 999px;
    background: var(--color-border-light);
    overflow: hidden;
    line-height: 0;
    flex: none;
}

.forms-analytics-fill {
    display: block;
    height: 100%;
    min-height: 6px;
    max-height: 6px;
    border-radius: inherit;
}

.forms-analytics-fill-green {
    background: linear-gradient(90deg, #34d399, #16a34a);
}

.forms-analytics-fill-blue {
    background: linear-gradient(90deg, #60a5fa, #2563eb);
}

.forms-analytics-fill-warning {
    background: linear-gradient(90deg, #fb923c, #ea580c);
}

.forms-progress-row {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.forms-progress-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-md);
    font-size: var(--font-size-sm);
}

.forms-progress-head span {
    color: var(--color-text-secondary);
}

.forms-progress-head strong {
    font-size: var(--font-size-xs);
    color: var(--color-text);
}

.forms-overview-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.forms-overview-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-md);
    padding: 12px 14px;
    border-radius: var(--radius-lg);
    background: var(--color-bg);
    font-size: var(--font-size-sm);
}

.forms-helper-card {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-md);
}

.forms-helper-icon {
    width: 56px;
    height: 56px;
    border-radius: var(--radius-xl);
    background: linear-gradient(135deg, rgba(255, 213, 79, 0.95), rgba(255, 193, 7, 0.95));
    color: var(--color-amber-800);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
}

.forms-helper-card h3 {
    margin: 0;
}

.forms-helper-card p {
    margin: 0;
    color: var(--color-text-secondary);
}

.forms-quick-modal {
    max-width: 620px;
}

.dashboard-record-card-info {
    background: var(--color-surface);
    border-color: rgba(37, 99, 235, 0.16);
}

.dashboard-record-card-neutral {
    background: var(--color-surface);
    border-color: rgba(148, 163, 184, 0.2);
}

.dashboard-record-icon-info {
    background: rgba(219, 234, 254, 0.95);
    color: #2563eb;
}

.dashboard-record-icon-neutral {
    background: rgba(241, 245, 249, 0.95);
    color: var(--color-text-secondary);
}

.dashboard-chip-list {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-sm);
    margin-top: var(--space-md);
}

.dashboard-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    border-radius: var(--radius-full);
    background: var(--color-bg);
    color: var(--color-text-secondary);
    font-size: var(--font-size-sm);
    line-height: 1.2;
}

.dashboard-rich-panel {
    margin-top: var(--space-md);
    padding: var(--space-lg);
    border-radius: var(--radius-xl);
    border: 1px solid var(--color-border-light);
    background: var(--color-bg);
}

.dashboard-rich-text {
    margin: 0;
    color: var(--color-text-secondary);
    line-height: 1.65;
    white-space: pre-line;
}

.dashboard-note {
    margin-top: var(--space-md);
    padding: 12px 14px;
    border-radius: var(--radius-xl);
    background: var(--color-bg);
    color: var(--color-text-secondary);
    font-size: var(--font-size-sm);
    line-height: 1.5;
}

.forms-switch-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-lg);
    padding: var(--space-lg);
    border-radius: var(--radius-xl);
    background: var(--color-bg);
    margin-bottom: var(--space-xl);
}

.forms-switch-row h3 {
    margin: 0 0 2px 0;
    font-size: var(--font-size-base);
}

.forms-toggle {
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    font-size: var(--font-size-sm);
    font-weight: 700;
    white-space: nowrap;
}

.forms-toggle input {
    width: 18px;
    height: 18px;
    accent-color: var(--color-kitabee-amber);
}

.forms-result-card {
    max-width: 860px;
    margin: 0 auto;
    padding: var(--space-2xl);
}

.forms-result-hero {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: var(--space-md);
    padding: var(--space-2xl);
    border-radius: var(--radius-2xl);
    border: 1px solid rgba(255, 213, 79, 0.24);
}

.forms-result-hero h2 {
    margin: 0;
    font-size: clamp(28px, 4vw, 20px);
}

.forms-result-hero p {
    margin: 0;
    max-width: 620px;
    color: var(--color-text-secondary);
}

.forms-result-icon {
    width: 84px;
    height: 84px;
    border-radius: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
}

.forms-result-icon-success {
    background: rgba(220, 252, 231, 0.95);
    color: var(--color-success);
}

.forms-result-icon-info {
    background: rgba(219, 234, 254, 0.95);
    color: var(--color-info);
}

.forms-result-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: var(--space-md);
    margin-top: var(--space-xl);
}

.forms-result-stat {
    border: 1px solid var(--color-border-light);
    border-radius: var(--radius-xl);
    padding: var(--space-lg);
    background: var(--color-surface);
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
}

.forms-result-label {
    font-size: var(--font-size-xs);
    font-weight: 700;
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.forms-result-actions {
    display: flex;
    justify-content: center;
    gap: var(--space-sm);
    flex-wrap: wrap;
    margin-top: var(--space-xl);
}

@media (max-width: 1100px) {
    .forms-dashboard-shell {
        grid-template-columns: 1fr;
    }

    .forms-dashboard-side {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 900px) {
    .forms-dashboard-header {
        flex-direction: column;
    }

    .forms-template-layout,
    .forms-template-tile-grid,
    .forms-template-saved-item {
        grid-template-columns: 1fr;
        flex-direction: column;
    }

    .forms-record-card {
        flex-direction: column;
    }

    .forms-record-actions {
        width: 100%;
        min-width: 0;
    }

    .forms-result-stats {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .forms-dashboard-actions {
        width: 100%;
    }

    .forms-dashboard-actions .btn {
        flex: 1 1 auto;
    }

    .forms-filter-row {
        flex-direction: column;
    }

    .forms-filter-controls-row {
        align-items: stretch;
    }

    .forms-search,
    .forms-filter-controls-row > .form-input {
        width: 100%;
        flex: 1 1 auto;
    }

    .forms-dashboard-side {
        grid-template-columns: 1fr;
    }

    .forms-template-tile-grid {
        grid-template-columns: 1fr;
    }

    .forms-template-saved-actions {
        width: 100%;
        min-width: 0;
        flex-direction: row;
        flex-wrap: wrap;
    }

    .forms-template-saved-actions .btn {
        flex: 1 1 180px;
    }

    .forms-record-main {
        flex-direction: column;
    }

    .forms-record-progress {
        flex-direction: column;
        align-items: stretch;
    }

    .forms-mini-item {
        align-items: flex-start;
    }

    .forms-mini-time {
        white-space: normal;
    }

    .forms-switch-row {
        flex-direction: column;
        align-items: flex-start;
    }

    .forms-result-card {
        padding: var(--space-lg);
    }

    .forms-result-hero {
        padding: var(--space-xl);
    }
}

/* ============================
   ANNOUNCEMENTS PAGE
   ============================ */

.ann-filter-section {
    margin-bottom: var(--space-xl);
}

.ann-filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-lg);
    align-items: center;
}

.ann-search-wrap {
    flex: 1;
    min-width: 200px;
    position: relative;
}

.ann-search-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--color-text-muted);
    font-size: var(--font-size-sm);
    pointer-events: none;
}

.ann-search-input {
    padding-left: 40px !important;
}

.ann-filter-controls {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-sm);
    align-items: center;
}

.ann-filter-select {
    min-width: 140px;
    width: auto;
}

/* Two-column grid */
.ann-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: var(--space-2xl);
    align-items: start;
}

.ann-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-xl);
}

.ann-sidebar {
    display: flex;
    flex-direction: column;
    gap: var(--space-xl);
}

/* Announcement Card */
.ann-card {
    overflow: hidden;
}

.ann-card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: var(--space-md);
    margin-bottom: var(--space-lg);
}

.ann-card-header-left {
    display: flex;
    align-items: flex-start;
    gap: var(--space-md);
    min-width: 0;
}

.ann-card-header-right {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    flex-shrink: 0;
}

.ann-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--font-size-lg);
    flex-shrink: 0;
}

.ann-icon-red { background: var(--color-danger-bg); color: var(--color-danger); }
.ann-icon-green { background: var(--color-success-bg); color: var(--color-success); }
.ann-icon-yellow { background: rgba(255,213,79,0.3); color: var(--color-amber-800); }
.ann-icon-purple { background: var(--color-purple-bg); color: var(--color-purple); }
.ann-icon-gray { background: var(--color-border-light); color: var(--color-text-secondary); }

.ann-card-title {
    font-size: var(--font-size-base);
    font-weight: 700;
    color: var(--color-text);
    margin: 0;
    line-height: 1.3;
}

.ann-card-meta {
    font-size: var(--font-size-xs);
    color: var(--color-text-muted);
    margin: 2px 0 0;
}

.ann-card-content {
    font-size: var(--font-size-sm);
    color: var(--color-text-secondary);
    line-height: 1.6;
    margin-bottom: var(--space-lg);
}

.ann-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: var(--space-md);
    border-top: 1px solid var(--color-border-light);
}

.ann-card-stats {
    display: flex;
    align-items: center;
    gap: var(--space-lg);
}

.ann-stat {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    font-size: var(--font-size-sm);
    color: var(--color-text-muted);
}

.ann-read-more {
    background: none;
    border: none;
    color: var(--color-amber-600);
    font-weight: 600;
    font-size: var(--font-size-sm);
    cursor: pointer;
    font-family: var(--font-family);
    padding: 0;
    transition: color 0.15s;
}

.ann-read-more:hover {
    color: var(--color-amber-700);
}

/* Heart reaction button */
.ann-react-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: none;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-full);
    padding: 6px 14px;
    font-size: var(--font-size-sm);
    color: var(--color-text-muted);
    cursor: pointer;
    font-family: var(--font-family);
    transition: all 0.2s ease;
}

.ann-react-btn:hover {
    border-color: var(--color-danger);
    color: var(--color-danger);
    background: var(--color-danger-bg);
}

.ann-react-btn.reacted {
    border-color: var(--color-danger);
    color: var(--color-danger);
    background: var(--color-danger-bg);
}

.ann-react-btn i {
    font-size: 14px;
}

/* Dropdown menu */
.ann-actions-dropdown {
    position: relative;
}

.ann-menu-btn {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-md);
    cursor: pointer;
    color: var(--color-text-muted);
    background: transparent;
    border: none;
    font-size: var(--font-size-sm);
}

.ann-menu-btn:hover {
    background: var(--color-border-light);
    color: var(--color-text);
}

.ann-dropdown-menu {
    position: absolute;
    right: 0;
    top: 100%;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    min-width: 150px;
    z-index: 100;
    overflow: hidden;
}

.ann-dropdown-menu button {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    width: 100%;
    padding: var(--space-md) var(--space-lg);
    background: none;
    border: none;
    font-size: var(--font-size-sm);
    font-family: var(--font-family);
    color: var(--color-text);
    cursor: pointer;
    transition: background 0.1s;
}

.ann-dropdown-menu button:hover {
    background: var(--color-border-light);
}

.ann-dropdown-menu button.text-danger {
    color: var(--color-danger);
}

/* Sidebar elements */
.ann-sidebar-title {
    font-size: var(--font-size-lg);
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    margin-bottom: var(--space-lg);
}

.ann-quick-actions {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.ann-quick-btn {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    width: 100%;
    padding: var(--space-md) var(--space-lg);
    border-radius: var(--radius-lg);
    border: none;
    cursor: pointer;
    font-family: var(--font-family);
    font-weight: 600;
    font-size: var(--font-size-sm);
    color: var(--color-text-secondary);
    transition: all 0.15s;
    text-decoration: none;
}

.ann-quick-btn-yellow {
    background: rgba(255,213,79,0.2);
}

.ann-quick-btn-yellow i {
    color: var(--color-amber-700);
}

.ann-quick-btn-yellow:hover {
    background: rgba(255,213,79,0.35);
}

.ann-quick-btn-blue {
    background: rgba(187,222,251,0.3);
}

.ann-quick-btn-blue i {
    color: var(--color-info);
}

.ann-quick-btn-blue:hover {
    background: rgba(187,222,251,0.5);
}

.ann-stats-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.ann-stat-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-md);
    background: var(--color-bg);
    border-radius: var(--radius-lg);
}

.ann-stat-row p {
    margin: 0;
}

.ann-stat-value {
    font-size: var(--font-size-xl);
    font-weight: 800;
    color: var(--color-text);
}

.ann-categories-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
}

.ann-category-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-sm) var(--space-md);
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: background 0.1s;
    background: none;
    border: none;
    width: 100%;
    font-family: var(--font-family);
    font-size: var(--font-size-sm);
    color: var(--color-text-secondary);
}

.ann-category-item:hover {
    background: var(--color-border-light);
}

.ann-category-item.active {
    background: rgba(255,213,79,0.15);
    color: var(--color-amber-800);
    font-weight: 600;
}

.ann-category-left {
    display: flex;
    align-items: center;
    gap: var(--space-md);
}

.ann-category-icon {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.contract-signature-pad {
    width: 100%;
}

.contract-signature-surface {
    background: #ffffff;
    border: 2px solid rgba(180, 119, 16, 0.28);
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

.contract-signature-canvas {
    width: 100%;
    height: 220px;
    display: block;
    touch-action: none;
    cursor: crosshair;
}

.contract-signature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: var(--space-md);
    margin-top: var(--space-lg);
}

.contract-signature-card {
    border: 1px solid var(--color-border);
    border-radius: var(--radius-xl);
    background: var(--color-surface);
    padding: var(--space-md);
}

.contract-signature-card img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: var(--radius-lg);
    background: #fff;
    border: 1px solid var(--color-border-light);
    margin-top: var(--space-sm);
}

.contract-signature-caption {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-sm);
    margin-bottom: var(--space-sm);
}

/* Announcements responsive */
@media (max-width: 1024px) {
    .ann-grid {
        grid-template-columns: 1fr;
    }
    .ann-sidebar {
        order: -1;
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: var(--space-lg);
    }
}

@media (max-width: 768px) {
    .ann-filter-bar {
        flex-direction: column;
        align-items: stretch;
    }
    .ann-filter-controls {
        flex-direction: column;
    }
    .ann-filter-select {
        width: 100%;
    }
    .ann-sidebar {
        grid-template-columns: 1fr;
    }
    .ann-card-header {
        flex-direction: column;
        gap: var(--space-sm);
    }
    .ann-card-header-right {
        align-self: flex-start;
    }
}

/* Parent Space */
.community-space-page {
    min-height: 100vh;
    color: var(--color-text);
    background:
        radial-gradient(circle at top left, rgba(255, 213, 79, 0.34), transparent 28rem),
        radial-gradient(circle at bottom right, rgba(187, 222, 251, 0.28), transparent 26rem),
        linear-gradient(135deg, var(--color-bg), var(--color-surface-warm-end));
}

.community-space-state-page,
.community-space-selector-page {
    display: grid;
    place-items: center;
    padding: clamp(24px, 5vw, 72px);
}

.community-space-state-card,
.community-space-selector-hero,
.community-space-selector-card,
.community-space-hero-card,
.community-space-panel {
    border: 1px solid var(--color-surface-overlay-border);
    background: var(--color-surface-overlay-strong);
    box-shadow: 0 24px 70px rgba(15, 23, 42, 0.12);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
}

.community-space-state-card {
    width: min(100%, 460px);
    display: grid;
    justify-items: center;
    gap: 14px;
    padding: 34px;
    border-radius: 34px;
    text-align: center;
}

.community-space-state-card h1,
.community-space-selector-hero h1,
.community-space-hero-card h1,
.community-space-panel h2,
.community-space-panel h3 {
    margin: 0;
    color: var(--color-text);
}

.community-space-state-card p,
.community-space-selector-hero p,
.community-space-hero-card p,
.community-space-panel p {
    margin: 0;
    color: var(--color-text-muted);
    line-height: 1.6;
}

.community-space-spinner {
    width: 42px;
    height: 42px;
    border: 4px solid rgba(203, 213, 225, 0.55);
    border-top-color: var(--color-kitabee-amber);
    border-radius: 999px;
    animation: spin 0.8s linear infinite;
}

.community-space-state-icon,
.community-space-section-icon,
.community-space-selector-badge {
    width: 58px;
    height: 58px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 20px;
    color: #3f2f05;
    background: linear-gradient(135deg, var(--color-kitabee-yellow), var(--color-kitabee-amber));
    box-shadow: 0 18px 34px rgba(217, 119, 6, 0.18);
}

.community-space-state-icon-danger {
    color: #fff;
    background: linear-gradient(135deg, #fb7185, #dc2626);
}

.community-space-primary-btn,
.community-space-switch-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 42px;
    padding: 0 18px;
    border: 0;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--color-kitabee-yellow), var(--color-kitabee-amber));
    color: #3f2f05;
    font-weight: 900;
    text-decoration: none;
    box-shadow: 0 14px 30px rgba(217, 119, 6, 0.16);
}

.community-space-selector-page {
    align-content: center;
    gap: 24px;
}

.community-space-selector-hero {
    width: min(100%, 920px);
    padding: clamp(26px, 5vw, 48px);
    border-radius: 36px;
}

.community-space-kicker {
    width: fit-content;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 14px;
    padding: 7px 12px;
    border-radius: 999px;
    background: rgba(255, 213, 79, 0.22);
    color: var(--color-amber-800);
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.community-space-selector-grid {
    width: min(100%, 920px);
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 18px;
}

.community-space-selector-card {
    display: grid;
    gap: 10px;
    padding: 22px;
    border-radius: 28px;
    color: var(--color-text);
    text-decoration: none;
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.community-space-selector-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 30px 80px rgba(15, 23, 42, 0.16);
}

.community-space-selector-card strong {
    font-size: 20px;
}

.community-space-selector-card > span:not(.community-space-selector-badge) {
    color: var(--color-text-muted);
}

.community-space-selector-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 10px;
    color: var(--color-amber-800);
    font-weight: 900;
}

.community-space-shell {
    display: grid;
    grid-template-columns: 78px minmax(0, 1fr);
}

.community-space-rail {
    position: sticky;
    top: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    padding: 22px 12px;
    background: rgba(30, 41, 59, 0.92);
    box-shadow: 16px 0 40px rgba(15, 23, 42, 0.18);
}

.community-space-rail-item {
    width: 48px;
    height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 17px;
    color: #e2e8f0;
    text-decoration: none;
    transition: background 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

.community-space-rail-item:hover,
.community-space-rail-item.active {
    color: #3f2f05;
    background: linear-gradient(135deg, var(--color-kitabee-yellow), var(--color-kitabee-amber));
    transform: translateY(-1px);
}

.community-space-rail-item-disabled {
    opacity: 0.36;
    cursor: not-allowed;
}

.community-space-main {
    display: grid;
    gap: 22px;
    padding: clamp(20px, 4vw, 42px);
}

.community-space-hero-card {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    padding: clamp(24px, 4vw, 38px);
    border-radius: 36px;
}

.community-space-hero-card h1 {
    font-size: clamp(30px, 5vw, 54px);
    letter-spacing: -0.05em;
}

.community-space-content-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 22px;
}

.community-space-panel {
    border-radius: 30px;
    padding: 24px;
}

.community-space-panel-main {
    min-height: 0;
    display: grid;
    align-content: start;
    gap: 14px;
}

.community-space-side-panel {
    display: grid;
    align-content: start;
    gap: 14px;
}

.community-space-composer-preview {
    margin-top: 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 18px;
    border: 1px dashed rgba(217, 119, 6, 0.35);
    border-radius: 22px;
    background: rgba(255, 213, 79, 0.12);
    color: var(--color-text-secondary);
}

.community-space-composer-preview button {
    border: 0;
    border-radius: 999px;
    padding: 10px 14px;
    background: rgba(148, 163, 184, 0.2);
    color: var(--color-text-muted);
    font-weight: 900;
}

.community-space-role-list,
.community-space-members-preview {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.community-space-role-list span,
.community-space-members-preview span {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 8px 11px;
    border-radius: 999px;
    background: var(--color-brand-soft);
    color: var(--color-brand-soft-text);
    font-size: 13px;
    font-weight: 900;
}

.theme-dark .community-space-page {
    background:
        radial-gradient(circle at top left, rgba(245, 158, 11, 0.18), transparent 28rem),
        radial-gradient(circle at bottom right, rgba(96, 165, 250, 0.14), transparent 26rem),
        linear-gradient(135deg, #0f172a, #111827);
}

.theme-dark .community-space-state-card,
.theme-dark .community-space-selector-hero,
.theme-dark .community-space-selector-card,
.theme-dark .community-space-hero-card,
.theme-dark .community-space-panel {
    border-color: rgba(148, 163, 184, 0.2);
    background: rgba(30, 41, 59, 0.84);
}

@media (max-width: 900px) {
    .community-space-shell {
        grid-template-columns: 1fr;
    }

    .community-space-rail {
        position: fixed;
        inset: auto 14px 14px;
        z-index: 20;
        min-height: auto;
        flex-direction: row;
        justify-content: center;
        border-radius: 24px;
        padding: 10px;
    }

    .community-space-main {
        padding-bottom: 110px;
    }

    .community-space-content-grid {
        grid-template-columns: 1fr;
    }

    .community-space-hero-card {
        flex-direction: column;
    }
}

@media (max-width: 560px) {
    .community-space-state-page,
    .community-space-selector-page {
        padding: 18px;
    }

    .community-space-rail-item {
        width: 42px;
        height: 42px;
        border-radius: 15px;
    }

    .community-space-composer-preview {
        align-items: stretch;
        flex-direction: column;
    }
}

/* Parent Space - light dashboard styling inspired by the provided mockup */
.community-space-page {
    background: #f3f4f2;
}

.community-space-state-card,
.community-space-selector-hero,
.community-space-selector-card,
.community-space-hero-card,
.community-space-panel {
    border: 1px solid #edf0f2;
    background: #ffffff;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.055);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

.community-space-state-card,
.community-space-selector-hero,
.community-space-hero-card,
.community-space-panel {
    border-radius: 22px;
}

.community-space-selector-card {
    border-radius: 20px;
}

.community-space-state-icon,
.community-space-section-icon,
.community-space-selector-badge {
    color: #6b4a00;
    background: #ffcf3d;
    box-shadow: none;
}

.community-space-state-icon-danger {
    color: #e11d48;
    background: #fff1f2;
}

.community-space-primary-btn,
.community-space-switch-btn {
    background: #ffcf3d;
    color: #4a3500;
    box-shadow: none;
}

.community-space-kicker {
    background: #fff6cc;
    color: #9a6a00;
}

.community-space-shell {
    grid-template-columns: 64px minmax(0, 1fr);
    min-height: 100vh;
}

.community-space-rail {
    position: sticky;
    top: 0;
    align-self: start;
    height: 100vh;
    overflow-y: auto;
    background: #ffffff;
    box-shadow: 1px 0 0 #eceff1;
    gap: 10px;
    padding: 14px 8px 18px;
}

.community-space-rail-item {
    width: 46px;
    min-height: 46px;
    height: 46px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 16px;
    background: transparent;
    color: #98a2b3;
    cursor: pointer;
    font-size: 16px;
    line-height: 1;
    text-decoration: none;
    transition: background 0.18s ease, color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.community-space-rail-item i {
    font-size: 17px;
}

.community-space-rail-item:hover,
.community-space-rail-item.active {
    color: #5c4300;
    background: #ffcf3d;
    box-shadow: 0 10px 22px rgba(245, 158, 11, 0.18);
    transform: translateY(-1px);
}

.community-space-rail-item-disabled {
    background: #f7f8fa;
    color: #c5ccd6;
    cursor: not-allowed;
}

.community-space-main {
    max-width: 1180px;
    width: 100%;
    margin: 0 auto;
    align-content: start;
    grid-auto-rows: max-content;
    padding: 24px clamp(22px, 4vw, 42px);
}

.community-space-hero-card {
    padding: 22px 24px 18px;
}

.community-space-hero-card h1 {
    font-size: clamp(26px, 4vw, 38px);
    letter-spacing: -0.035em;
}

.community-space-quick-row {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
    align-items: center;
    padding: 0 4px 2px;
}

.community-space-quick-item {
    min-width: 76px;
    display: grid;
    justify-items: center;
    gap: 8px;
    border: 0;
    background: transparent;
    color: var(--color-text);
    cursor: pointer;
    text-align: center;
    text-decoration: none;
}

.community-space-quick-item span {
    width: 54px;
    height: 54px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    color: #fff;
    box-shadow: 0 10px 22px rgba(15, 23, 42, 0.08);
}

.community-space-quick-item strong {
    font-size: 12px;
    line-height: 1.1;
}

.community-space-quick-item.active span {
    outline: 3px solid #ffffff;
    box-shadow: 0 0 0 3px #ffcf3d, 0 10px 22px rgba(15, 23, 42, 0.08);
}

.community-space-quick-item-yellow span {
    background: #ffcf3d;
    color: #5c4300;
}

.community-space-quick-item-green span {
    background: #42d98b;
}

.community-space-quick-item-blue span {
    background: #45b7f0;
}

.community-space-quick-item-pink span {
    background: #c977ec;
}

.community-space-content-grid {
    grid-template-columns: minmax(0, 1fr) 300px;
    align-items: start;
    gap: 18px;
}

.community-space-main-column {
    min-width: 0;
    display: grid;
    align-content: start;
    gap: 18px;
}

.community-space-side-panel {
    width: 300px;
    max-width: 300px;
    min-width: 300px;
    height: fit-content;
    align-self: start;
    justify-self: start;
    padding-bottom: 18px;
}

@media (max-width: 980px) {
    .community-space-content-grid {
        grid-template-columns: 1fr;
    }

    .community-space-side-panel {
        width: 100%;
        max-width: none;
        min-width: 0;
        justify-self: stretch;
    }
}

.community-space-panel-main {
    min-height: 0;
}

.community-space-composer-preview {
    border-color: #f2e4a7;
    background: #fff9db;
}

.community-space-composer-preview button {
    background: #f3f4f6;
}

.community-space-role-list span,
.community-space-members-preview span {
    background: #fff6cc;
    color: #9a6a00;
}

.theme-dark .community-space-page {
    background: var(--color-bg);
}

.theme-dark .community-space-rail,
.theme-dark .community-space-state-card,
.theme-dark .community-space-selector-hero,
.theme-dark .community-space-selector-card,
.theme-dark .community-space-hero-card,
.theme-dark .community-space-panel {
    border-color: var(--color-border);
    background: var(--color-surface);
}

.theme-dark .community-space-rail {
    box-shadow: 1px 0 0 var(--color-border);
}

.community-space-section-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.community-space-section-title-row h2 {
    margin: 0;
}

.community-space-composer-toggle {
    min-height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: 0;
    border-radius: 999px;
    padding: 0 18px;
    background: #ffcf3d;
    color: #5c4300;
    font-weight: 900;
    box-shadow: 0 10px 22px rgba(217, 119, 6, 0.14);
}

.community-space-composer-toggle.is-open {
    background: #f7c62f;
}

.community-space-composer {
    display: grid;
    gap: 14px;
    margin-top: 18px;
    padding: 18px;
    border: 1px solid #edf0f2;
    border-radius: 22px;
    background: #ffffff;
    box-shadow: 0 8px 22px rgba(15, 23, 42, 0.045);
}

.community-space-composer-author,
.community-space-post-card header {
    display: flex;
    align-items: center;
    gap: 12px;
}

.community-space-composer-author div,
.community-space-post-author {
    min-width: 0;
    display: grid;
    gap: 3px;
}

.community-space-composer-author strong,
.community-space-post-author strong {
    color: var(--color-text);
    font-weight: 900;
    line-height: 1.15;
}

.community-space-composer-author small,
.community-space-post-author span,
.community-space-empty-feed span {
    color: var(--color-text-muted);
    font-size: 13px;
}

.community-space-avatar,
.community-space-avatar-img {
    width: 44px;
    height: 44px;
    flex: 0 0 44px;
    border-radius: 999px;
}

.community-space-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #eaf4ff;
    color: #2563eb;
    font-weight: 950;
}

.community-space-avatar-yellow {
    background: #ffcf3d;
    color: #5c4300;
}

.community-space-avatar-img {
    object-fit: cover;
}

.community-space-composer textarea {
    width: 100%;
    min-height: 120px;
    resize: vertical;
    border: 1px solid #e5e7eb;
    border-radius: 18px;
    padding: 14px 16px;
    background: #f9fafb;
    color: var(--color-text);
    font: inherit;
    line-height: 1.55;
    outline: none;
}

.community-space-composer textarea:focus {
    border-color: #ffcf3d;
    box-shadow: 0 0 0 4px rgba(255, 207, 61, 0.2);
}

.community-space-image-preview {
    position: relative;
    width: min(100%, 420px);
    overflow: hidden;
    border: 1px solid #edf0f2;
    border-radius: 20px;
    background: #f8fafc;
}

.community-space-image-preview img {
    width: 100%;
    max-height: 260px;
    display: block;
    object-fit: cover;
}

.community-space-image-preview button {
    position: absolute;
    top: 10px;
    right: 10px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border: 0;
    border-radius: 999px;
    padding: 8px 11px;
    background: rgba(15, 23, 42, 0.78);
    color: #ffffff;
    font-size: 12px;
    font-weight: 900;
}

.community-space-composer-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.community-space-composer-footer > span {
    color: var(--color-text-muted);
    font-size: 12px;
    font-weight: 800;
}

.community-space-composer-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 10px;
}

.community-space-image-picker {
    min-height: 42px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border-radius: 999px;
    padding: 0 16px;
    background: #f8fafc;
    color: var(--color-text-muted);
    cursor: pointer;
    font-weight: 900;
}

.community-space-image-picker input {
    display: none;
}

.community-space-image-picker:hover {
    background: #fff6cc;
    color: #8a6100;
}

.community-space-post-btn {
    min-height: 42px;
    border: 0;
    border-radius: 999px;
    padding: 0 20px;
    background: #ffcf3d;
    color: #4a3500;
    font-weight: 950;
}

.community-space-post-btn:disabled {
    cursor: not-allowed;
    opacity: 0.48;
}

.community-space-post-alert {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    border-radius: 14px;
    background: #fff1f2;
    color: #be123c;
    font-weight: 800;
}

.community-space-post-alert-spaced {
    margin-top: 18px;
}

.community-space-empty-feed {
    display: grid;
    justify-items: center;
    gap: 8px;
    margin-top: 16px;
    padding: 28px 18px;
    border: 1px dashed #d6dde6;
    border-radius: 22px;
    background: #f8fafc;
    color: var(--color-text);
    text-align: center;
}

.community-space-empty-feed i {
    width: 46px;
    height: 46px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: #fff6cc;
    color: #9a6a00;
}

.community-space-feed {
    display: grid;
    gap: 16px;
    margin-top: 16px;
}

.community-space-feed-block .community-space-feed,
.community-space-feed-block .community-space-empty-feed {
    margin-top: 0;
}

.community-space-post-card {
    display: grid;
    gap: 14px;
    padding: 18px;
    border: 1px solid #edf0f2;
    border-radius: 22px;
    background: #ffffff;
    box-shadow: 0 8px 22px rgba(15, 23, 42, 0.045);
}

.community-space-post-author > span {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.community-space-post-card header {
    align-items: flex-start;
}

.community-space-post-menu {
    position: relative;
    margin-left: auto;
}

.community-space-post-menu-trigger {
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 999px;
    background: #f8fafc;
    color: var(--color-text-muted);
}

.community-space-post-menu-trigger:hover,
.community-space-post-menu-trigger:focus-visible {
    background: #fff6cc;
    color: #8a6100;
    outline: none;
}

.community-space-post-menu-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    z-index: 5;
    min-width: 158px;
    display: grid;
    gap: 4px;
    padding: 8px;
    border: 1px solid #edf0f2;
    border-radius: 16px;
    background: #ffffff;
    box-shadow: 0 18px 44px rgba(15, 23, 42, 0.14);
}

.community-space-post-menu-dropdown button {
    min-height: 36px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: 0;
    border-radius: 12px;
    padding: 0 10px;
    background: transparent;
    color: var(--color-text);
    font-weight: 850;
    text-align: left;
}

.community-space-post-menu-dropdown button:hover {
    background: #f8fafc;
}

.community-space-post-menu-dropdown button.danger {
    color: #be123c;
}

.community-space-edit-form {
    display: grid;
    gap: 10px;
}

.community-space-edit-form textarea {
    width: 100%;
    min-height: 110px;
    resize: vertical;
    border: 1px solid #e5e7eb;
    border-radius: 18px;
    padding: 12px 14px;
    background: #f9fafb;
    color: var(--color-text);
    font: inherit;
    line-height: 1.55;
    outline: none;
}

.community-space-edit-form textarea:focus {
    border-color: #ffcf3d;
    box-shadow: 0 0 0 4px rgba(255, 207, 61, 0.2);
}

.community-space-edit-form > div {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
}

.community-space-edit-image-preview {
    width: min(100%, 360px);
}

.community-space-edit-image-actions {
    display: flex;
    justify-content: flex-start !important;
}

.community-space-edit-image-note {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 14px;
    background: #fff6cc;
    color: #8a6100;
    font-weight: 850;
}

.community-space-edit-image-note button {
    border: 0;
    border-radius: 999px;
    padding: 7px 11px;
    background: #ffffff;
    color: #8a6100;
    font-weight: 950;
}

.community-space-edit-form > div > span {
    margin-right: auto;
    color: var(--color-text-muted);
    font-size: 12px;
    font-weight: 850;
}

.community-space-edit-cancel,
.community-space-edit-save,
.community-space-confirm-primary {
    min-height: 38px;
    border: 0;
    border-radius: 999px;
    padding: 0 14px;
    font-weight: 950;
}

.community-space-edit-cancel {
    background: #f8fafc;
    color: var(--color-text-muted);
}

.community-space-edit-save,
.community-space-confirm-primary {
    background: #ffcf3d;
    color: #4a3500;
}

.community-space-confirm-primary.danger {
    background: #ffe4e6;
    color: #be123c;
}

.community-space-edit-cancel:disabled,
.community-space-edit-save:disabled,
.community-space-confirm-primary:disabled {
    cursor: not-allowed;
    opacity: 0.55;
}

.community-space-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: grid;
    place-items: center;
    padding: 18px;
    background: rgba(15, 23, 42, 0.42);
    backdrop-filter: blur(8px);
}

.community-space-confirm-modal {
    width: min(100%, 420px);
    display: grid;
    gap: 10px;
    padding: 22px;
    border-radius: 24px;
    background: #ffffff;
    box-shadow: 0 24px 80px rgba(15, 23, 42, 0.24);
}

.community-space-confirm-icon {
    width: 46px;
    height: 46px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: #fff6cc;
    color: #8a6100;
}

.community-space-confirm-icon.danger {
    background: #ffe4e6;
    color: #be123c;
}

.community-space-confirm-modal h2,
.community-space-confirm-modal p {
    margin: 0;
}

.community-space-confirm-modal p {
    color: var(--color-text-muted);
    line-height: 1.55;
}

.community-space-confirm-modal strong {
    color: var(--color-text);
}

.community-space-confirm-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 6px;
}

.community-space-role-chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 8px;
    border-radius: 999px;
    background: #fff6cc;
    color: #9a6a00;
    font-size: 12px;
    font-weight: 900;
}

.community-space-post-content {
    margin: 0;
    color: var(--color-text);
    font-size: 15px;
    line-height: 1.65;
    white-space: pre-line;
}

.community-space-post-image {
    width: 100%;
    max-height: 520px;
    display: block;
    border-radius: 20px;
    object-fit: cover;
    background: #f8fafc;
}

.community-space-post-card footer {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding-top: 12px;
    border-top: 1px solid #edf0f2;
}

.community-space-post-card footer button {
    min-height: 36px;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    border: 0;
    border-radius: 999px;
    padding: 0 12px;
    background: #f8fafc;
    color: var(--color-text-muted);
    font-weight: 850;
}

.community-space-post-card footer button span {
    font-size: 12px;
    font-weight: 950;
}

.community-space-post-card footer button.active {
    background: #fff6cc;
    color: #8a6100;
}

.community-space-post-card footer button.active .fa-heart {
    color: #e11d48;
}

.community-space-post-card footer button:disabled {
    cursor: not-allowed;
    opacity: 0.72;
}

.community-space-comments {
    display: grid;
    gap: 12px;
    padding-top: 2px;
}

.community-space-comment {
    display: flex;
    gap: 10px;
    padding: 12px;
    border-radius: 16px;
    background: #f8fafc;
}

.community-space-comment-avatar,
.community-space-comment-avatar-img {
    width: 32px;
    height: 32px;
    flex: 0 0 32px;
    border-radius: 999px;
}

.community-space-comment-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #eaf4ff;
    color: #2563eb;
    font-size: 12px;
    font-weight: 950;
}

.community-space-comment-avatar-img {
    object-fit: cover;
}

.community-space-comment div {
    min-width: 0;
    display: grid;
    gap: 2px;
}

.community-space-comment strong {
    color: var(--color-text);
    font-size: 13px;
    font-weight: 950;
}

.community-space-comment time {
    color: var(--color-text-muted);
    font-size: 11px;
}

.community-space-comment p {
    margin: 4px 0 0;
    color: var(--color-text);
    line-height: 1.5;
    white-space: pre-line;
}

.community-space-comment-composer {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    align-items: end;
}

.community-space-comment-composer textarea {
    min-height: 48px;
    resize: vertical;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    padding: 10px 12px;
    background: #f9fafb;
    color: var(--color-text);
    font: inherit;
    line-height: 1.45;
    outline: none;
}

.community-space-comment-composer textarea:focus {
    border-color: #ffcf3d;
    box-shadow: 0 0 0 4px rgba(255, 207, 61, 0.16);
}

.community-space-comment-composer button {
    min-height: 42px;
    border: 0;
    border-radius: 999px;
    padding: 0 16px;
    background: #ffcf3d;
    color: #4a3500;
    font-weight: 950;
}

.community-space-comment-composer button:disabled {
    cursor: not-allowed;
    opacity: 0.48;
}

.community-space-members-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 14px;
    margin-top: 18px;
}

.community-space-member-card {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px;
    border: 1px solid #edf0f2;
    border-radius: 20px;
    background: #ffffff;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.04);
}

.community-space-member-avatar,
.community-space-member-avatar-img {
    width: 46px;
    height: 46px;
    flex: 0 0 46px;
    border-radius: 999px;
}

.community-space-member-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #ffcf3d;
    color: #5c4300;
    font-weight: 950;
}

.community-space-member-avatar-img {
    object-fit: cover;
}

.community-space-member-copy {
    min-width: 0;
    display: grid;
    gap: 5px;
}

.community-space-member-copy strong {
    color: var(--color-text);
    font-weight: 950;
    line-height: 1.2;
}

.community-space-member-copy small {
    color: var(--color-text-muted);
    font-size: 12px;
    overflow-wrap: anywhere;
}

.community-space-member-roles {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 4px;
}

.community-space-member-roles span {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 8px;
    border-radius: 999px;
    background: #fff6cc;
    color: #9a6a00;
    font-size: 12px;
    font-weight: 900;
}

.community-space-role-admin {
    background: #ffedd5 !important;
    color: #c2410c !important;
}

.community-space-role-educator {
    background: #dbeafe !important;
    color: #1d4ed8 !important;
}

.community-space-role-parent {
    background: #dcfce7 !important;
    color: #166534 !important;
}

.community-space-role-default {
    background: #f1f5f9 !important;
    color: #475569 !important;
}

.community-space-coffee-placeholder {
    display: grid;
    gap: 18px;
    margin-top: 18px;
    padding: 24px;
    border: 1px solid #f2e4a7;
    border-radius: 24px;
    background: linear-gradient(180deg, #fff9db 0%, #ffffff 100%);
    text-align: center;
}

.community-space-coffee-illustration {
    position: relative;
    width: 86px;
    height: 86px;
    display: inline-grid;
    place-items: center;
    justify-self: center;
    border-radius: 28px;
    background: #ffcf3d;
    color: #5c4300;
    font-size: 34px;
    overflow: hidden;
}

.community-space-coffee-illustration span {
    position: absolute;
    width: 34px;
    height: 34px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.36);
}

.community-space-coffee-illustration span:nth-child(2) {
    top: 10px;
    right: 8px;
}

.community-space-coffee-illustration span:nth-child(3) {
    bottom: 8px;
    left: 10px;
}

.community-space-coffee-placeholder h3 {
    margin: 0;
    color: var(--color-text);
    font-size: 22px;
    font-weight: 950;
}

.community-space-coffee-placeholder p {
    max-width: 560px;
    margin: 0 auto;
}

.community-space-coffee-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
}

.community-space-coffee-actions span {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 10px 12px;
    border-radius: 999px;
    background: #ffffff;
    color: var(--color-text);
    font-size: 13px;
    font-weight: 900;
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.05);
}

.theme-dark .community-space-composer,
.theme-dark .community-space-post-card,
.theme-dark .community-space-empty-feed,
.theme-dark .community-space-comment,
.theme-dark .community-space-member-card,
.theme-dark .community-space-coffee-placeholder,
.theme-dark .community-space-coffee-actions span {
    border-color: var(--color-border);
    background: var(--color-surface);
}

.theme-dark .community-space-composer-toggle {
    border-color: var(--color-border);
    background: var(--color-surface);
    color: var(--color-text);
}

.theme-dark .community-space-composer-toggle.is-open {
    background: var(--color-surface-muted);
}

.theme-dark .community-space-composer textarea,
.theme-dark .community-space-post-card footer button,
.theme-dark .community-space-comment-composer textarea {
    border-color: var(--color-border);
    background: var(--color-surface-muted);
}

@media (max-width: 900px) {
    .community-space-rail {
        background: #ffffff;
        box-shadow: 0 10px 28px rgba(15, 23, 42, 0.12);
    }
    .community-space-section-title-row {
        align-items: stretch;
        flex-direction: column;
    }

    .community-space-composer-toggle {
        width: 100%;
    }

    .community-space-composer,
    .community-space-post-card {
        padding: 15px;
        border-radius: 18px;
    }

    .community-space-composer-footer {
        align-items: stretch;
        flex-direction: column;
    }

    .community-space-post-btn {
        width: 100%;
    }

    .community-space-comment-composer {
        grid-template-columns: 1fr;
    }

    .community-space-comment-composer button {
        width: 100%;
    }
}

.community-space-action-modal .modal-title {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.community-space-action-modal-message {
    margin: 0;
    color: var(--color-text-muted);
    line-height: 1.6;
}

.community-space-action-modal-target {
    margin: var(--space-md) 0 0;
    color: var(--color-text);
}
.community-space-post-image-button {
    width: 100%;
    display: block;
    padding: 0;
    border: 0;
    border-radius: 20px;
    background: transparent;
    cursor: pointer;
    overflow: hidden;
    text-align: inherit;
}

.community-space-post-image-button:focus-visible {
    outline: 3px solid rgba(255, 207, 61, 0.78);
    outline-offset: 3px;
}

.community-space-image-lightbox {
    position: fixed;
    inset: 0;
    z-index: 2400;
    display: flex;
    justify-content: center;
    padding: max(18px, env(safe-area-inset-top, 0px)) 18px max(18px, env(safe-area-inset-bottom, 0px));
    background:
        radial-gradient(circle at top left, rgba(251, 191, 36, 0.16), transparent 34%),
        rgba(2, 6, 23, 0.94);
    box-sizing: border-box;
    color: #ffffff;
}

.community-space-image-lightbox-close {
    position: fixed;
    top: max(18px, env(safe-area-inset-top, 0px));
    right: 18px;
    z-index: 2402;
    width: 46px;
    height: 46px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.72);
    color: #ffffff;
    box-shadow: 0 16px 32px rgba(0, 0, 0, 0.28);
}

.community-space-image-lightbox-shell {
    width: min(100%, 1040px);
    height: 100%;
    display: grid;
}

.community-space-image-lightbox-stage {
    position: relative;
    min-height: 0;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 28px;
    background: rgba(15, 23, 42, 0.72);
    box-shadow: 0 24px 56px rgba(0, 0, 0, 0.34);
}

.community-space-image-lightbox-topbar {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 2;
    padding: 16px 78px 42px 18px;
    background: linear-gradient(180deg, rgba(2, 6, 23, 0.78), transparent);
    pointer-events: none;
}

.community-space-image-lightbox-topbar div {
    min-width: 0;
    display: grid;
    gap: 7px;
}

.community-space-image-lightbox-topbar h2,
.community-space-image-lightbox-topbar span {
    margin: 0;
    color: #ffffff;
}

.community-space-image-lightbox-topbar h2 {
    font-size: 17px;
    font-weight: 850;
    line-height: 1.28;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.34);
}

.community-space-image-lightbox-topbar span {
    width: max-content;
    max-width: 100%;
    padding: 6px 11px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.14);
    color: rgba(255, 255, 255, 0.84);
    font-size: 13px;
    font-weight: 800;
    line-height: 1.3;
    overflow-wrap: anywhere;
}

.community-space-image-lightbox-image {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: contain;
}
.community-space-panel-main {
    border-color: #e4ebf3;
    background: #f6f8fb;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.82), 0 18px 40px rgba(15, 23, 42, 0.07);
}

.community-space-feed {
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

.community-space-post-card {
    border-color: #dbe4ee;
    background: #ffffff;
    box-shadow: 0 14px 34px rgba(15, 23, 42, 0.075);
}

.theme-dark .community-space-panel-main {
    border-color: var(--color-border);
    background: var(--color-surface-muted);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04), 0 18px 40px rgba(0, 0, 0, 0.24);
}

.theme-dark .community-space-feed {
    border-color: transparent;
    background: transparent;
    box-shadow: none;
}

.theme-dark .community-space-post-card {
    border-color: var(--color-border);
    background: var(--color-surface);
    box-shadow: 0 14px 34px rgba(0, 0, 0, 0.24);
}

@media (max-width: 900px) {
    .community-space-feed {
        padding: 0;
        border-radius: 0;
    }
}
@media (max-width: 900px) {
    .community-space-shell {
        display: block;
        min-height: 100vh;
    }

    .community-space-rail {
        position: fixed;
        left: max(12px, env(safe-area-inset-left, 0px));
        right: max(12px, env(safe-area-inset-right, 0px));
        bottom: max(12px, env(safe-area-inset-bottom, 0px));
        top: auto;
        z-index: 1200;
        width: auto;
        height: auto;
        min-height: 0;
        max-width: none;
        display: flex;
        flex-direction: row;
        align-items: center;
        justify-content: center;
        gap: 8px;
        padding: 10px;
        overflow-x: auto;
        overflow-y: hidden;
        border: 1px solid #e4ebf3;
        border-radius: 24px;
        background: rgba(255, 255, 255, 0.96);
        box-shadow: 0 18px 42px rgba(15, 23, 42, 0.16);
        -webkit-overflow-scrolling: touch;
    }

    .community-space-rail-item {
        flex: 0 0 46px;
        width: 46px;
        height: 46px;
        min-height: 46px;
        cursor: pointer;
    }

    .community-space-rail-item-disabled {
        cursor: not-allowed;
    }

    .community-space-main {
        width: 100%;
        max-width: none;
        padding: 20px 16px calc(112px + env(safe-area-inset-bottom, 0px));
    }
}

@media (max-width: 420px) {
    .community-space-rail {
        justify-content: flex-start;
        gap: 7px;
        padding: 9px;
    }

    .community-space-rail-item {
        flex-basis: 42px;
        width: 42px;
        height: 42px;
        min-height: 42px;
        border-radius: 15px;
    }
}

.community-space-rail-item,
.community-space-composer-toggle,
.community-space-image-picker,
.community-space-post-menu-trigger,
.community-space-post-menu-dropdown button,
.community-space-post-card footer button,
.community-space-comment-composer button,
.community-space-edit-cancel,
.community-space-edit-save,
.community-space-edit-image-note button,
.community-space-action-modal button {
    cursor: pointer;
}

.community-space-rail-item-disabled,
.community-space-post-card button:disabled,
.community-space-composer button:disabled,
.community-space-comment-composer button:disabled {
    cursor: not-allowed;
}

.theme-dark .parent-kita-team-member-card {
    background: var(--color-surface-overlay);
    border-color: var(--color-border);
    box-shadow: 0 18px 38px rgba(0, 0, 0, 0.18);
}

.theme-dark .parent-kita-team-sidebar-card {
    background: linear-gradient(180deg, var(--color-surface) 0%, var(--color-surface-warm-end) 100%);
    border-color: var(--color-border);
}

.theme-dark .parent-kita-team-avatar-image {
    border-color: var(--color-border);
    background: var(--color-surface);
}

.theme-dark .parent-kita-team-job,
.theme-dark .parent-kita-team-kid-chip {
    background: var(--color-neutral-bg);
    border-color: var(--color-neutral-border-soft);
    color: var(--color-text-secondary);
}

.theme-dark .parent-kita-team-role-admin {
    background: var(--color-warning-bg);
    color: #fdba74;
}

.theme-dark .parent-kita-team-role-educator {
    background: var(--color-success-bg);
    color: #86efac;
}

.theme-dark .parent-kita-team-member-meta,
.theme-dark .parent-kita-team-detail-item,
.theme-dark .parent-kita-team-kid-chip span {
    color: var(--color-text-secondary);
}
.community-space-quick-item-amber span {
    background: #f59e0b;
}

.community-space-notification-list {
    display: grid;
    gap: 16px;
}

.community-space-notification-card {
    display: grid;
    gap: 14px;
    padding: 18px;
    border: 1px solid #edf0f2;
    border-radius: 22px;
    background: #ffffff;
    box-shadow: 0 8px 22px rgba(15, 23, 42, 0.045);
}

.community-space-notification-card.is-unread {
    border-color: rgba(255, 207, 61, 0.72);
    background: #fffdf2;
}

.community-space-notification-head {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.community-space-notification-icon {
    width: 44px;
    height: 44px;
    flex: 0 0 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 16px;
    background: #fff6cc;
    color: #8a6100;
}

.community-space-notification-copy {
    min-width: 0;
    display: grid;
    gap: 4px;
}

.community-space-notification-title-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.community-space-notification-title-row h3 {
    margin: 0;
    color: var(--color-text);
    font-size: 17px;
    font-weight: 900;
    line-height: 1.25;
}

.community-space-notification-meta {
    margin: 0;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--color-text-muted);
    font-size: 13px;
    font-weight: 800;
}

.community-space-notification-message {
    margin: 0;
    padding: 12px;
    border-radius: 16px;
    background: #f8fafc;
    color: var(--color-text-muted);
    line-height: 1.55;
}

.community-space-notification-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 10px;
}

.theme-dark .community-space-notification-card {
    border-color: var(--color-border);
    background: var(--color-surface);
}

.theme-dark .community-space-notification-card.is-unread,
.theme-dark .community-space-notification-icon,
.theme-dark .community-space-notification-message {
    background: rgba(255, 207, 61, 0.12);
}
.community-space-rail-item {
    position: relative;
}

.community-space-rail-badge,
.community-space-quick-badge {
    position: absolute;
    min-width: 18px;
    height: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #ffffff;
    border-radius: 999px;
    padding: 0 5px;
    background: #ef4444;
    color: #ffffff;
    font-size: 10px;
    font-style: normal;
    font-weight: 950;
    line-height: 1;
}

.community-space-rail-badge {
    top: 3px;
    right: 3px;
}

.community-space-quick-item span {
    position: relative;
}

.community-space-quick-badge {
    top: -5px;
    right: -7px;
}

.theme-dark .community-space-rail-badge,
.theme-dark .community-space-quick-badge {
    border-color: var(--color-surface);
}
