:root {
    --fh-bg: #f4f6fb;
    --fh-surface: #ffffff;
    --fh-primary: #4f46e5;
    --fh-primary-hover: #4338ca;
    --fh-text: #0f172a;
    --fh-text-secondary: #475569;
    --fh-border: #e2e8f0;
    --fh-radius-lg: 1rem;
    --fh-radius-xl: 1.25rem;
}

* {
    box-sizing: border-box;
}

html, body {
    overflow-x: hidden;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: var(--fh-text);
    background-color: var(--fh-bg);
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6, .fh-brand-title, .fh-main-date-heading, .fh-wall-time, .fh-wall-day-name {
    font-family: 'Plus Jakarta Sans', 'Inter', sans-serif;
}

.fw-extrabold {
    font-weight: 800;
}

.tracking-tight {
    letter-spacing: -0.025em;
}

.tracking-wide {
    letter-spacing: 0.06em;
}

.tracking-widest {
    letter-spacing: 0.18em;
}

.shadow-xs {
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05);
}

.btn-white {
    background-color: #ffffff;
    color: var(--fh-text);
}

.btn-white:hover, .btn-white.active {
    background-color: #f1f5f9;
    color: var(--fh-primary);
}

.icon-xs {
    width: 15px;
    height: 15px;
}

.icon-sm {
    width: 18px;
    height: 18px;
}

.icon-md {
    width: 22px;
    height: 22px;
}

.impersonation-banner {
    background: linear-gradient(90deg, #b91c1c, #dc2626);
    color: #ffffff;
    z-index: 1050;
}

.fh-navbar {
    height: 68px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--fh-border);
    z-index: 1030;
}

.fh-navbar-admin {
    background: #0f172a;
    border-bottom: 1px solid #1e293b;
}

.fh-logo-badge {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    box-shadow: 0 4px 10px rgba(79, 70, 229, 0.22);
    flex-shrink: 0;
}

.fh-logo-admin {
    background: linear-gradient(135deg, #f59e0b, #d97706);
}

.fh-brand-title {
    font-weight: 800;
    font-size: 1.12rem;
    color: var(--fh-text);
    letter-spacing: -0.02em;
}

.fh-brand-subtitle {
    font-size: 0.72rem;
    color: var(--fh-text-secondary);
    font-weight: 600;
}

.fh-nav-link {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.5rem 0.85rem;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--fh-text-secondary);
    text-decoration: none;
    transition: all 0.15s ease;
}

.fh-nav-link:hover {
    background-color: #f1f5f9;
    color: var(--fh-text);
}

.fh-nav-link.active {
    background-color: #eef2ff;
    color: var(--fh-primary);
}

.fh-nav-link-dark {
    color: #cbd5e1;
}

.fh-nav-link-dark:hover {
    background-color: #1e293b;
    color: #ffffff;
}

.fh-nav-link-dark.active {
    background-color: #334155;
    color: #ffffff;
}

.fh-header-clock {
    padding: 0.3rem 0.75rem;
    background: #f8fafc;
    border: 1px solid var(--fh-border);
    border-radius: 10px;
    line-height: 1.15;
}

.fh-live-time {
    font-size: 0.88rem;
    color: var(--fh-text);
}

.fh-live-date {
    font-size: 0.7rem;
}

.fh-weather-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.35rem 0.75rem;
    background: #f8fafc;
    border: 1px solid var(--fh-border);
    border-radius: 12px;
    color: var(--fh-text);
    transition: border-color 0.15s ease;
}

.fh-weather-pill:hover {
    border-color: #cbd5e1;
}

.fh-weather-pill-icon {
    width: 22px;
    height: 22px;
    color: #f59e0b;
}

.fh-weather-hl {
    font-size: 0.68rem;
    color: var(--fh-text-secondary);
    margin-top: 2px;
}

.fh-user-btn {
    padding: 0.3rem 0.65rem;
    border-radius: 999px;
    border: 1px solid var(--fh-border);
    background: #ffffff;
}

.fh-avatar-sm {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    color: #ffffff;
    font-weight: 700;
    font-size: 0.74rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.fh-avatar-lg {
    width: 52px;
    height: 52px;
    border-radius: 16px;
    color: #ffffff;
    font-weight: 800;
    font-size: 1.1rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.fh-day-eyebrow {
    font-size: 0.88rem;
    letter-spacing: 0.08em;
}

.fh-main-date-heading {
    font-size: clamp(1.5rem, 2.8vw, 2.25rem);
    letter-spacing: -0.02em;
}

.fh-date-picker-input {
    width: auto;
    min-width: 148px;
    border-radius: 8px;
}

.fh-member-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.38rem 0.85rem;
    border-radius: 999px;
    border: 1px solid var(--fh-border);
    background: #ffffff;
    color: var(--fh-text-secondary);
    font-size: 0.84rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease;
}

.fh-member-chip:hover {
    background: #f8fafc;
    color: var(--fh-text);
}

.fh-member-chip.active {
    background: var(--fh-text);
    color: #ffffff;
    border-color: var(--fh-text);
}

.fh-chip-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
}

.fh-event-card {
    background: #ffffff;
    border-radius: 16px;
    border: 1px solid rgba(226, 232, 240, 0.9);
    border-left-width: 6px;
    padding: 1.1rem 1.25rem;
    transition: transform 0.12s ease, box-shadow 0.12s ease;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(15, 23, 42, 0.03);
}

.fh-event-card:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.07);
}

.fh-event-time-badge {
    font-size: 0.95rem;
    font-weight: 800;
    color: var(--fh-text);
    min-width: 140px;
}

.fh-event-title {
    font-size: 1.12rem;
    font-weight: 700;
    color: var(--fh-text);
    margin-bottom: 0.2rem;
}

.fh-event-meta {
    font-size: 0.84rem;
    color: var(--fh-text-secondary);
}

.fh-member-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.28rem 0.7rem;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 700;
    color: #ffffff;
}

.fh-category-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.24rem 0.6rem;
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: 600;
    background: #f1f5f9;
    color: #334155;
}

.fh-week-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 0.75rem;
}

@media (max-width: 767.98px) {
    .fh-week-grid {
        grid-template-columns: 1fr;
    }
}

.fh-week-day-col {
    background: #ffffff;
    border-radius: 14px;
    border: 1px solid var(--fh-border);
    padding: 0.85rem;
    min-height: 220px;
}

.fh-week-day-col.is-today {
    border: 2px solid var(--fh-primary);
    background: #fafbff;
}

.fh-month-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 1px;
    background: var(--fh-border);
    border: 1px solid var(--fh-border);
    border-radius: 16px;
    overflow: hidden;
}

.fh-month-weekday-header {
    background: #f8fafc;
    padding: 0.6rem 0.5rem;
    text-align: center;
    font-size: 0.76rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--fh-text-secondary);
}

.fh-month-cell {
    background: #ffffff;
    min-height: 115px;
    padding: 0.5rem;
    cursor: pointer;
    transition: background-color 0.12s ease;
}

.fh-month-cell:hover {
    background: #f8fafc;
}

.fh-month-cell.other-month {
    background: #f8fafc;
    color: #94a3b8;
}

.fh-month-cell.is-today {
    background: #f5f7ff;
}

.fh-month-day-num {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.82rem;
    font-weight: 700;
}

.fh-month-cell.is-today .fh-month-day-num {
    background: var(--fh-primary);
    color: #ffffff;
}

.fh-month-event-chip {
    display: block;
    font-size: 0.72rem;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 5px;
    color: #ffffff;
    margin-top: 3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.fh-mini-calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
    text-align: center;
}

.fh-mini-cal-dow {
    font-size: 0.7rem;
    font-weight: 700;
    color: #64748b;
    padding-bottom: 4px;
}

.fh-mini-cal-day {
    aspect-ratio: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    color: var(--fh-text);
    border: none;
    background: transparent;
}

.fh-mini-cal-day:hover {
    background: #f1f5f9;
}

.fh-mini-cal-day.is-selected {
    background: var(--fh-primary);
    color: #ffffff;
    font-weight: 700;
}

.fh-mini-cal-day.is-today:not(.is-selected) {
    border: 1px solid var(--fh-primary);
    color: var(--fh-primary);
}

.fh-mini-cal-day.text-muted {
    opacity: 0.4;
}

.fh-weather-lg-icon {
    width: 46px;
    height: 46px;
}

.fh-color-swatch {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 2px solid #ffffff;
    box-shadow: 0 0 0 1px #cbd5e1;
    cursor: pointer;
    transition: transform 0.12s ease;
}

.fh-color-swatch:hover {
    transform: scale(1.12);
}

.fh-mobile-bottom-nav {
    height: 62px;
    background: #ffffff;
    border-top: 1px solid var(--fh-border);
    display: flex;
    align-items: center;
    justify-content: space-around;
    z-index: 1030;
}

.fh-mobile-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-size: 0.68rem;
    font-weight: 600;
    color: var(--fh-text-secondary);
    text-decoration: none;
    gap: 2px;
}

.fh-mobile-nav-item.active {
    color: var(--fh-primary);
}

.fh-fab-add {
    position: fixed;
    right: 18px;
    bottom: 78px;
    width: 54px;
    height: 54px;
    border-radius: 50%;
    background: var(--fh-primary);
    color: #ffffff;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1025;
}

.bg-landing, .bg-auth {
    background: radial-gradient(circle at top right, #eef2ff 0%, #f8fafc 55%, #f1f5f9 100%);
}

.fh-wall-pairing-body {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
}

.fh-wall-display-body {
    background: #0b1120;
    color: #f8fafc;
    min-height: 100vh;
    overflow-x: hidden;
    user-select: none;
}

.fh-wall-layout {
    display: grid;
    grid-template-columns: 440px 1fr;
    min-height: 100vh;
}

@media (max-width: 1199.98px) {
    .fh-wall-layout {
        grid-template-columns: 400px 1fr;
    }
}

@media (max-width: 767.98px) {
    .fh-wall-layout {
        grid-template-columns: 1fr;
        grid-template-rows: auto 1fr;
    }
}

.fh-wall-sidebar {
    background: linear-gradient(180deg, #111827 0%, #0f172a 100%);
    border-right: 1px solid rgba(255, 255, 255, 0.08);
    padding: 1.75rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

@media (max-width: 767.98px) {
    .fh-wall-sidebar {
        border-right: none;
        border-bottom: 1px solid rgba(255, 255, 255, 0.08);
        padding: 1.25rem 1.5rem;
    }
}

.fh-wall-logo-dot {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
}

.fh-wall-family-name {
    font-size: 1.15rem;
    font-weight: 800;
    color: #ffffff;
    line-height: 1.15;
}

.fh-wall-device-tag {
    font-size: 0.75rem;
    color: #94a3b8;
    font-weight: 600;
}

.fh-wall-live-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(16, 185, 129, 0.15);
    color: #34d399;
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.08em;
}

.fh-live-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #10b981;
    box-shadow: 0 0 8px #10b981;
}

.fh-wall-time {
    font-size: clamp(3.2rem, 5vw, 4.6rem);
    font-weight: 800;
    letter-spacing: -0.04em;
    line-height: 1;
    color: #ffffff;
}

.fh-wall-ampm {
    font-size: 1.35rem;
    font-weight: 700;
    color: #94a3b8;
    margin-left: 6px;
}

.fh-wall-day-name {
    font-size: 1.55rem;
    font-weight: 800;
    color: #818cf8;
    letter-spacing: 0.06em;
    margin-top: 0.6rem;
}

.fh-wall-full-date {
    font-size: 1.15rem;
    font-weight: 700;
    color: #e2e8f0;
    letter-spacing: 0.03em;
}

.fh-wall-weather-panel {
    background: rgba(30, 41, 59, 0.65);
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: 20px;
    padding: 1.25rem;
}

.fh-wall-weather-svg {
    width: 48px;
    height: 48px;
    color: #fbbf24;
}

.fh-wall-temp {
    font-size: 2.35rem;
    font-weight: 800;
    line-height: 1;
    color: #ffffff;
}

.fh-wall-condition {
    font-size: 0.9rem;
    font-weight: 600;
    color: #cbd5e1;
    margin-top: 2px;
}

.fh-wall-hl {
    font-size: 0.85rem;
    font-weight: 700;
    color: #f8fafc;
    white-space: nowrap;
}

.fh-wall-precip {
    font-size: 0.78rem;
    color: #60a5fa;
    font-weight: 600;
    white-space: nowrap;
}

.fh-wall-loc {
    font-size: 0.72rem;
    color: #94a3b8;
}

.fh-wall-forecast-strip {
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 6px;
    text-align: center;
}

.fh-wall-fc-item {
    padding: 6px 4px;
    border-radius: 10px;
    background: rgba(15, 23, 42, 0.45);
}

.fh-wall-fc-day {
    font-size: 0.68rem;
    font-weight: 700;
    color: #94a3b8;
    text-transform: uppercase;
}

.fh-wall-fc-temp {
    font-size: 0.76rem;
    font-weight: 700;
    color: #f8fafc;
    white-space: nowrap;
}

.fh-wall-ctrl-btn {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #cbd5e1;
    font-size: 0.75rem;
    padding: 4px 10px;
    border-radius: 8px;
}

.fh-wall-ctrl-btn:hover {
    background: rgba(255, 255, 255, 0.14);
    color: #ffffff;
}

.fh-wall-main {
    padding: 1.75rem 2rem;
    display: flex;
    flex-direction: column;
    max-height: 100vh;
    overflow-y: auto;
}

@media (max-width: 991.98px) {
    .fh-wall-main {
        padding: 1.25rem;
        max-height: none;
    }
}

.fh-wall-filter-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 0.5rem 1rem;
    border-radius: 999px;
    background: rgba(30, 41, 59, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #cbd5e1;
    font-weight: 700;
    font-size: 0.92rem;
}

.fh-wall-filter-pill.active {
    background: #4f46e5;
    border-color: #6366f1;
    color: #ffffff;
}

.fh-wall-nav-btn {
    background: rgba(30, 41, 59, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #ffffff;
    padding: 0.55rem 1rem;
    border-radius: 12px;
    font-weight: 700;
}

.fh-wall-nav-btn:hover {
    background: #334155;
    color: #ffffff;
}

.fh-wall-add-btn {
    background: #4f46e5;
    border: 1px solid #6366f1;
    color: #ffffff;
    padding: 0.55rem 1.15rem;
    border-radius: 12px;
    font-weight: 800;
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.35);
}

.fh-wall-add-btn:hover {
    background: #4338ca;
    border-color: #4f46e5;
    color: #ffffff;
}

.fh-wall-display-body .modal-content {
    color: var(--fh-text);
}

.fh-wall-event-card {
    background: #151f32;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-left-width: 8px;
    border-radius: 20px;
    padding: 1.35rem 1.5rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.25rem;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.22);
    cursor: pointer;
    transition: transform 0.12s ease, background-color 0.12s ease;
}

.fh-wall-event-card:hover {
    transform: translateY(-1px);
    background: #1c2840;
}

.fh-wall-event-time {
    font-size: 1.28rem;
    font-weight: 800;
    color: #93c5fd;
    min-width: 165px;
}

.fh-wall-event-title {
    font-size: 1.45rem;
    font-weight: 800;
    color: #ffffff;
    line-height: 1.2;
}

.fh-wall-event-sub {
    font-size: 0.98rem;
    color: #94a3b8;
    margin-top: 4px;
}

.fh-wall-member-badge {
    padding: 0.45rem 1rem;
    border-radius: 999px;
    font-size: 0.95rem;
    font-weight: 800;
    color: #ffffff;
    white-space: nowrap;
}

.fh-wall-week-btn {
    background: rgba(79, 70, 229, 0.22);
    border: 1px solid rgba(129, 140, 248, 0.45);
    color: #e0e7ff;
    padding: 0.55rem 1.15rem;
    border-radius: 12px;
    font-weight: 700;
    font-size: 0.92rem;
    transition: all 0.15s ease;
}

.fh-wall-week-btn:hover {
    background: #4f46e5;
    border-color: #6366f1;
    color: #ffffff;
}

.fh-event-form-dialog {
    max-height: calc(100vh - 1.5rem);
    max-height: calc(100dvh - 1.5rem);
    margin-top: 0.75rem;
    margin-bottom: 0.75rem;
}

.fh-event-form-dialog .modal-content {
    max-height: calc(100vh - 1.5rem);
    max-height: calc(100dvh - 1.5rem);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.fh-modal-scroll-form {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 0;
    overflow: hidden;
}

.fh-modal-scroll-form .modal-body {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.fh-modal-scroll-form .modal-footer {
    flex-shrink: 0;
}

.fh-scrollable-modal-dialog {
    max-height: calc(100vh - 1.5rem);
    max-height: calc(100dvh - 1.5rem);
    margin-top: 0.75rem;
    margin-bottom: 0.75rem;
}

.fh-scrollable-modal-dialog .modal-content {
    max-height: calc(100vh - 1.5rem);
    max-height: calc(100dvh - 1.5rem);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.fh-scrollable-modal-dialog .modal-header,
.fh-scrollable-modal-dialog .modal-footer {
    flex-shrink: 0;
}

.fh-scrollable-modal-dialog .modal-body {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}



