/*
 * EVE Family Vision – Global Styles
 * ---------------------------------
 * Design tokens, component layouts, utilities, and responsive rules for the demo UI.
 */

:root {
    --orange: #ec6138;
    --black: #1a1a1a;
    --light-black: #6b6b6b;
    --white: #fafafa;
    --near-white: #fff;
    --gray-200: #dde3ee;
    --font-size-12px: 12px;
    --font-size-13px: 13px;
    --font-size-14px: 14px;
    --font-size-16px: 16px;
    --font-size-18px: 18px;
    --font-size-20px: 20px;
    --font-size-22px: 22px;
    --font-size-24px: 24px;

    --font-weight-400: 400;
    --font-weight-500: 500;
    --font-weight-600: 600;
    --font-weight-700: 700;

    --space-0: 0;
    --space-5: 5px;
    --space-6: 6px;
    --space-10: 10px;
    --space-15: 15px;
    --space-24: 24px;
    --space-25: 25px;
    --space-30: 30px;
    --space-100: 100px;

    --radius-999: 999px;
    --radius-50: 50px;
    --radius-25: 25px;

    --border-default: 1px solid var(--gray-200);
    --shadow-soft: 0 1px 2px rgba(15, 23, 42, 0.06), 0 1px 3px 1px rgba(15, 23, 42, 0.03);
    --shadow-pressable: 0 1px 2px 0 rgba(15, 23, 42, 0.05), 0 1px 3px 0 rgba(15, 23, 42, 0.08);

    --gradient-brand: linear-gradient(45deg, #8f1003 0%, #eb5c3c 50%, #f7a600 100%);
    --gradient-surface-soft: linear-gradient(to bottom, rgba(255, 255, 255, 0.95), rgba(225, 225, 225, 0.2));
    --gradient-green-border: linear-gradient(45deg, #047857 0%, #059669 50%, #10b981 100%);
    --gradient-alert: linear-gradient(45deg, #991b1b 0%, #dc2626 50%, #ef4444 100%);
    --gradient-warning: linear-gradient(45deg, #b45309 0%, #d97706 50%, #f59e0b 100%);
    --gradient-insight: linear-gradient(45deg, #047857 0%, #059669 50%, #10b981 100%);

    --badge-count-bg: rgba(255, 255, 255, 0.95);
    --badge-count-border: 1px solid rgba(255, 255, 255, 0.4);
    --badge-alerts-count: #b91c1c;
    --badge-warnings-count: #b45309;
    --badge-insights-count: #047857;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Poppins", sans-serif;
}

/* TourGuide dialog visual tweaks */
.tg-dialog .tg-dialog-body {
    font-size: var(--font-size-14px);
    font-weight: var(--font-weight-400);
    color: var(--black);
}
.tg-dialog .tg-dialog-body p,
.tg-dialog .tg-dialog-body span,
.tg-dialog .tg-dialog-body li,
.tg-dialog .tg-dialog-body div {
    font-size: inherit;
    font-weight: inherit;
    color: inherit;
}

.tg-backdrop.eve-tg-backdrop {
    z-index: 2495 !important;
}

.tg-dialog .tg-arrow {
    display: none !important;
}

.tg-dialog .tg-dialog-footer button.tg-dialog-btn {
    all: unset !important;
    width: 100px !important;
    padding: var(--space-5) !important;
    font-size: var(--font-size-13px) !important;
    font-weight: var(--font-weight-500) !important;
    color: var(--black) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: var(--space-5) !important;
    cursor: pointer !important;
    border-radius: var(--radius-25) !important;
    background: var(--gradient-surface-soft) !important;
    box-shadow: var(--shadow-pressable) !important;
    border: var(--border-default) !important;
}

.tg-dialog .tg-dialog-footer .tg-dialog-footer-sup .tg-step-progress {
    display: inline-block;
    color: var(--light-black) !important;
    font-size: var(--font-size-12px) !important;
    font-weight: var(--font-weight-500) !important;
    letter-spacing: 0 !important;
    opacity: 1 !important;
}

h1 {
    /* Headings & subtitles */
    font-size: var(--font-size-22px);
    font-weight: var(--font-weight-500);
    color: var(--white);
    background: var(--gradient-brand);
    border-radius: var(--radius-50);
    padding: 3px 25px;
    width: max-content;
    margin: 0 0 5px 0;
}

h2 {
    font-size: 22px;
    font-weight: 500;
    color: var(--orange);
    width: max-content;
}

.subtitle {
    font-size: var(--font-size-14px);
    font-weight: var(--font-weight-400);
    color: var(--light-black);
    border-radius: var(--radius-25);
    width: max-content;
    margin: 0 0 0 5px;
}

button {
    transition: 0.3s linear !important;
}

button:hover {
    border: 1px solid var(--orange) !important;
    transition: 0.3s linear !important;
    transform: translateY(-1px) scale(1.03) !important;
}

/* Card shell layout used across sections */
.card {
    width: 80dvw;
    margin: 100px auto;
    background-color: var(--near-white);
    border: var(--border-default);
    border-radius: var(--radius-25);
    box-shadow: var(--shadow-soft);
}

.card-body {
    width: 100%;
    height: 100%;
    padding: var(--space-25);
}

.card-header {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding-bottom: var(--space-30);
}

.card-content {
    display: flex;
    width: 100%;
    padding: 0 var(--space-10);
    column-gap: 20px !important;
    height: 100%;
    justify-content: flex-start;
}

.card-left-side,
.card-right-side {
    width: 50%;
}

.card-left-side > .card-content,
.card-right-side > .card-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}

/* Mode toggle buttons in card sub-headers */
.card-sub-header .modes {
    position: relative;
    display: flex;
    justify-content: center;
    width: 50%;
    gap: var(--space-10);
}

.modes button {
    all: unset;
    width: 100px;
    padding: var(--space-5);
    font-size: var(--font-size-13px);
    font-weight: var(--font-weight-500);
    color: var(--black);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-5);
    cursor: pointer;
    border-radius: var(--radius-25);
    background: var(--gradient-surface-soft);
    box-shadow: var(--shadow-pressable);
    border: var(--border-default);
}

.modes button.is-selected,
.modes button[aria-pressed="true"] {
    border: 1px solid var(--orange);
    transform: translateY(-1px) scale(1.03);
}

.modes button.is-selected .material-symbols-outlined,
.modes button[aria-pressed="true"] .material-symbols-outlined {
    color: var(--orange) !important;
}

/* Child summary: avatar container and overlayed balance chart */
.avatar-wrapper {
    position: relative;
    width: 30%;
    margin: 0;
}

.child-summary img {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: 50%;
    border: 3px solid transparent;
    background: linear-gradient(#fff, #fff) padding-box, var(--gradient-green-border) border-box;
    background-clip: padding-box, border-box;
    margin: 0;
}

.balance-score-chart {
    position: absolute;
    top: 45%;
    right: -45px;
    width: 100px;
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    border-radius: 50%;
}

.balance-score-chart .pie-chart {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.balance-score-content {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 1;
}

.balance-percentage {
    font-size: 20px;
    font-weight: 700;
    color: var(--orange);
    line-height: 1;
    margin-bottom: 2px;
}

.balance-label {
    font-size: 12px;
    font-weight: 500;
    color: var(--light-black);
    text-align: center;
    line-height: 1.1;
    max-width: 50px;
}

.card.child-summary h2 {
    margin: 0 0 30px 0;
}

.card.child-summary {
    position: relative;
    overflow: hidden;
}

.card.child-summary::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.28s ease;
}

.card.child-summary.mode-daytime::after {
    opacity: 0.3;
    background: radial-gradient(circle at 0% 0%, rgba(255, 213, 79, 0.25) 0%, rgba(255, 213, 79, 0) 45%);
}

.card.child-summary.mode-focus::after {
    opacity: 0.3;
    background: radial-gradient(circle at 0% 0%, rgba(14, 165, 233, 0.25) 0%, rgba(14, 165, 233, 0) 45%);
}

.card.child-summary.mode-bedtime::after {
    opacity: 0.3;
    background: radial-gradient(circle at 0% 0%, rgba(109, 40, 217, 0.25) 0%, rgba(109, 40, 217, 0) 45%);
}

.member-summary-card {
    /* Quick stat buttons under avatar */
    display: flex;
    width: 100%;
    gap: var(--space-10);
}

.member-summary-card button {
    all: unset;
    flex: 1;
    padding: var(--space-10);
    font-size: var(--font-size-14px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: var(--space-5);
    cursor: pointer;
    border-radius: var(--radius-25);
    border: var(--border-default);
    background: var(--gradient-surface-soft);
    box-shadow: var(--shadow-pressable);
}

.member-summary-card button p:first-of-type {
    font-size: var(--font-size-14px);
    font-weight: var(--font-weight-500);
    color: var(--black);
}

.member-summary-card button p:last-of-type {
    font-size: var(--font-size-13px);
    font-weight: var(--font-weight-400);
    color: var(--black);
}

/* Alert/Warning/Insight badges and centered AI Reports label */
.card-sub-header .badges {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: var(--space-10);
    position: relative;
    width: 50%;
}

.badges .ai-reports-label {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--badge-warnings-bg);
    font-size: var(--font-size-13px);
    font-weight: var(--font-weight-500);
    position: relative;
    z-index: 1;
    margin-left: 16px;
}

.badges .ai-reports-label .material-symbols-outlined {
    font-size: 24px;
    font-variation-settings: "FILL" 1, "wght" 400, "GRAD" 0, "opsz" 24;
}

.badges .badge-group {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-10);
    position: absolute;
    left: 0;
    right: 0;
    width: 100%;
    pointer-events: none;
}

.badges .badge-group button {
    pointer-events: auto;
}

.badges button {
    all: unset;
    width: 130px;
    height: 25px;
    padding: var(--space-5);
    font-size: var(--font-size-16px);
    font-weight: var(--font-weight-500);
    color: var(--white);
    border-radius: var(--radius-25);
    display: flex;
    align-items: center;
    justify-content: space-around;
    gap: var(--space-6);
    cursor: pointer;
    border: 1px solid transparent;
}

.badges .alerts {
    background: var(--gradient-alert);
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.25);
}

.badges .warnings {
    background: var(--gradient-warning);
    box-shadow: 0 2px 8px rgba(245, 158, 11, 0.25);
}

.badges .insights {
    background: var(--gradient-insight);
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.25);
}

.badge-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
    height: 20px;
    padding: 0 6px;
    border-radius: var(--radius-999);
    background: var(--badge-count-bg);
    font-weight: var(--font-weight-600);
    font-size: var(--font-size-13px);
    border: var(--badge-count-border);
}

.badges .alerts .badge-count {
    color: var(--badge-alerts-count);
}

.badges .warnings .badge-count {
    color: var(--badge-warnings-count);
}

.badges .insights .badge-count {
    color: var(--badge-insights-count);
}

.card-sub-header {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 0 0 30px 0;
}

.app-usage-overview .card-sub-header {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: var(--space-15);
}

/* Scrollable right-side feed container */
.member-live-notifications {
    display: flex;
    flex-direction: column;
    width: 100%;
    max-height: 755px;
    overflow-y: auto;
    padding-right: var(--space-5);
    gap: 15px;
}

.card.child-summary .card-right-side > .card-content {
    position: relative;
}

/* Activity Overview (right feed): fixed bottom fade gradient overlay */
.card.child-summary .card-right-side > .card-content::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 125px;
    pointer-events: none;
    background: linear-gradient(to top, rgba(255,255,255,0.95), rgba(255,255,255,0));
    z-index: 2;
}

.card.app-usage-overview .card-right-side > .card-content {
    position: relative;
}

/* App Usage (right feed): bottom fade gradient overlay */
.card.app-usage-overview .card-right-side > .card-content::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 125px;
    pointer-events: none;
    background: linear-gradient(to top, rgba(255,255,255,0.95), rgba(255,255,255,0));
    z-index: 2;
}

.card.web-activity-insights .card-right-side > .card-content {
    position: relative;
}

/* Web Activity (right feed): bottom fade gradient overlay */
.card.web-activity-insights .card-right-side > .card-content::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 125px;
    pointer-events: none;
    background: linear-gradient(to top, rgba(255,255,255,0.95), rgba(255,255,255,0));
    z-index: 2;
}

.child-summary-bottom-section {
    display: flex;
    flex-direction: column;
    width: 100%;
    gap: 20px;
}

/* Notification list items: shared base styling + animation hooks */
.notification-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: var(--space-10) var(--space-15);
    border-radius: var(--radius-25);
    border: var(--border-default);
    background: var(--gradient-surface-soft);
    box-shadow: var(--shadow-pressable);
    will-change: opacity, transform, filter;
}

.notification-item.delayed {
    display: none !important;
}

.notification-item.fade-in {
    animation: notifFadeIn var(--notif-fade-duration, 2s) var(--notif-fade-ease, cubic-bezier(0.22, 1, 0.36, 1)) forwards;
}

/* Progressive reveal animation for notifications */
@keyframes notifFadeIn {
    from {
        opacity: 0;
        transform: translateY(12px) scale(0.98);
        filter: blur(2px);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
        filter: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    .notification-item.fade-in {
        animation-duration: 0.001s;
        animation-timing-function: linear;
    }
}

.status-dot {
    width: var(--font-size-16px);
    height: var(--font-size-16px);
    border-radius: 50%;
    flex: 0 0 auto;
}

.notification-item.alert .status-dot {
    background: var(--gradient-alert);
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.25);
}

.notification-item.warning .status-dot {
    background: var(--gradient-warning);
    box-shadow: 0 2px 8px rgba(245, 158, 11, 0.25);
}

.notification-item.insight .status-dot {
    background: var(--gradient-insight);
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.25);
}

.notification-content {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: var(--space-5) 10px;
    flex: 1 1 auto;
    position: relative;
}

.notification-title {
    font-size: var(--font-size-14px);
    font-weight: var(--font-weight-500);
    color: var(--black);
    flex: 0 1 auto;
    order: 0;
}

.notification-subtitle {
    font-size: var(--font-size-13px);
    font-weight: var(--font-weight-400);
    color: var(--black);
    flex: 1 1 100%;
    order: 2;
    transition: max-height 0.2s ease;
}

/* Multi-line clamp styling (1-line ellipsis) */
.notification-subtitle.is-clamped {
    display: -webkit-box;
    line-clamp: 2;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: normal;
}

/* Read More / Read Less toggle button */
.notification-read-toggle {
    order: 3;
    margin-left: 0;
    margin-top: 4px;
    background: none;
    border: none;
    padding: 0;
    font-size: var(--font-size-12px);
    font-weight: var(--font-weight-500);
    color: var(--orange);
    cursor: pointer;
    text-transform: none;
    align-self: flex-start;
}

.notification-read-toggle:hover,
.notification-read-toggle:focus {
    border: none !important;
    outline: none !important;
}

.notification-read-toggle:focus-visible {
    border: none !important;
    outline: none !important;
}

.notification-meta {
    display: flex;
    align-items: center;
    gap: 6px;
    justify-content: flex-start;
    flex: 0 0 auto;
    order: 1;
}

/* Separator dash between title & time */
.notification-meta::before {
    content: "-";
    color: var(--light-black);
}

.notification-time {
    color: var(--light-black);
    font-size: var(--font-size-12px);
    font-weight: var(--font-weight-500);
}

.notification-badge {
    order: 1;
    margin-left: 6px;
    align-self: flex-start;
    padding: 2px 8px;
    font-size: 11px;
    line-height: 1.2;
    font-weight: var(--font-weight-600);
    color: var(--near-white);
    border-radius: var(--radius-999);
    box-shadow: var(--shadow-pressable);
    white-space: nowrap;
}

.notification-badge--alert {
    background: var(--gradient-alert);
}

.notification-badge--reminder {
    background: var(--gradient-warning);
}

.notification-badge--insight {
    background: var(--gradient-insight);
}

.notification-app-pill {
    order: 1;
    margin-left: auto;
    align-self: flex-start;
    padding: 2px 8px;
    font-size: 11px;
    line-height: 1.2;
    font-weight: var(--font-weight-600);
    color: var(--near-white);
    border-radius: var(--radius-999);
    background: linear-gradient(45deg, #8f1003, #eb5c3c, #f7a600);
    box-shadow: var(--shadow-pressable);
    white-space: nowrap;
}

.notification-app-label {
    order: 1;
    align-self: flex-start;
    margin-left: auto;
    padding: 2px 8px;
    font-size: 11px;
    line-height: 1.2;
    font-weight: var(--font-weight-600);
    color: var(--near-white);
    border-radius: var(--radius-999);
    background: var(--gradient-brand);
    box-shadow: var(--shadow-pressable);
    white-space: nowrap;
}

.app-usage-overview #appUsageList .notification-badge,
.web-activity-insights #webActivityList .notification-badge {
    order: 1;
    margin-left: 0;
    align-self: center;
}

.app-usage-overview #appUsageList .notification-app-label,
.web-activity-insights #webActivityList .notification-app-label {
    order: 2;
    margin-left: auto;
    align-self: flex-start;
}

.app-usage-overview #appUsageList .notification-badge--reminder,
.app-usage-overview #appUsageList .notification-badge--insight,
.web-activity-insights #webActivityList .notification-badge--reminder,
.web-activity-insights #webActivityList .notification-badge--insight {
    display: none !important;
}

.notification-link {
    font-size: var(--font-size-14px);
    font-weight: var(--font-weight-500);
    color: var(--orange);
    text-decoration: none;
}

.notification-link:hover {
    text-decoration: underline;
}

.card-full-side {
    width: 100%;
}

.card-full-side > .card-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}

html {
    scroll-behavior: smooth;
}
body {
    padding-left: 270px;
}

/* Mobile-only overlay gate (screens <=1024px) */
.mobile-download-gate {
    position: fixed;
    inset: 0;
    background: var(--near-white);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 5000;
    padding: var(--space-24);
    text-align: center;
}

.mobile-download-gate .mdg-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-15);
}

.mobile-download-gate .mdg-logo {
    width: 200px;
    height: auto;
    object-fit: contain;
}

.mobile-download-gate .mdg-title {
    font-size: var(--font-size-18px);
    font-weight: var(--font-weight-600);
    color: var(--black);
}

.mobile-download-gate .mdg-text {
    font-size: var(--font-size-14px);
    font-weight: var(--font-weight-500);
    color: var(--light-black);
}

/* Top navigation bar */
.app-navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    height: 90px;
    display: flex;
    align-items: center;
    padding: 8px 25px;
    background: var(--near-white);
    border-bottom: var(--border-default);
    box-shadow: var(--shadow-soft);
}

.app-navbar .brand {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    background: transparent;
    border: none;
    border-radius: 0;
    box-shadow: none;
    padding: 0;
}

/* Profile menu trigger and dropdown */
.navbar-profile {
    margin-left: auto;
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
}

.profile-trigger {
    all: unset;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 12px;
    border-radius: var(--radius-25);
    border: var(--border-default);
    background: var(--gradient-surface-soft);
    box-shadow: var(--shadow-pressable);
    cursor: pointer;
}

/* Manual Guided Tour trigger */
.start-tour-btn {
    all: unset;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    border-radius: var(--radius-25);
    border: var(--border-default);
    background: var(--gradient-surface-soft);
    box-shadow: var(--shadow-pressable);
    cursor: pointer;
}
.start-tour-btn .material-symbols-outlined {
    font-size: 20px !important;
    color: var(--orange);
}
.start-tour-text {
    font-size: var(--font-size-14px);
    font-weight: var(--font-weight-600);
    color: var(--black);
}

.profile-trigger .material-symbols-outlined {
    font-size: 20px !important;
    color: var(--orange);
    transition: transform 0.2s ease;
}

.profile-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    background: linear-gradient(#fff, #fff) padding-box, var(--gradient-green-border) border-box;
    background-clip: padding-box, border-box;
}

.profile-meta {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.profile-name {
    font-size: var(--font-size-14px);
    font-weight: var(--font-weight-600);
    color: var(--black);
}

.profile-mail {
    font-size: var(--font-size-12px);
    font-weight: var(--font-weight-400);
    color: var(--light-black);
}

.profile-dropdown {
    position: absolute;
    top: 60px;
    right: 0;
    width: 240px;
    background: var(--near-white);
    border: var(--border-default);
    border-radius: var(--radius-25);
    box-shadow: var(--shadow-soft);
    padding: var(--space-15);
    display: none;
    flex-direction: column;
    gap: var(--space-15);
    z-index: 2500;
}

.profile-dropdown.is-open {
    display: flex;
}

.profile-trigger[aria-expanded="true"] .material-symbols-outlined {
    transform: rotate(180deg);
}

.profile-card {
    display: flex;
    align-items: center;
    gap: var(--space-10);
}

.profile-card-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    background: linear-gradient(#fff, #fff) padding-box, var(--gradient-green-border) border-box;
    background-clip: padding-box, border-box;
}

.profile-card-name {
    font-size: var(--font-size-14px);
    font-weight: var(--font-weight-600);
    color: var(--black);
}

.profile-card-mail {
    font-size: var(--font-size-12px);
    font-weight: var(--font-weight-400);
    color: var(--light-black);
}

.profile-actions {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.profile-actions li {
    display: flex;
}

.profile-actions li.separator {
    border-bottom: 1px solid var(--gray-200);
    margin: 6px 0;
}

.profile-actions button {
    all: unset;
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 8px 6px;
    border-radius: var(--radius-25);
    cursor: pointer;
    font-size: var(--font-size-14px);
    font-weight: var(--font-weight-500);
    color: var(--black);
    border: 1px solid transparent !important;
}

.profile-actions button .material-symbols-outlined {
    font-size: 18px !important;
    color: var(--orange);
}

.profile-actions button:hover {
    border: 1px solid var(--orange) !important;
}

.app-navbar .brand-logo {
    width: 200px;
    height: auto;
    aspect-ratio: 3 / 1;
    object-fit: contain;
}

.app-navbar .brand-title {
    font-size: var(--font-size-14px);
    font-weight: var(--font-weight-600);
    color: var(--black);
    line-height: 1;
}

/* Live Location & Trends section adjustments */


.live-location .card-content {
    padding: 0 var(--space-10);
}

/* Fixed left sidebar: member list & controls */
.app-sidebar {
    position: fixed;
    top: 90px;
    left: 0;
    width: 250px;
    bottom: 0px;
    padding: 0 10px 10px 10px;
    border-right: var(--border-default);
    z-index: 2000;
}

.app-sidebar .sidebar-inner {
    height: 100%;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.date-picker-container {
    margin: 50px 0 0 0;
}

.app-sidebar .sidebar-title {
    font-size: var(--font-size-14px);
    font-weight: var(--font-weight-400);
    color: var(--light-black);
    width: max-content;
    margin: 20px 0 0 5px;
    text-align: center;
}

.app-sidebar .member-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.app-sidebar .member-card {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: var(--radius-25);
    border: var(--border-default);
    background: var(--gradient-surface-soft);
    box-shadow: var(--shadow-pressable);
    cursor: pointer;
    transition: 0.3s linear !important;
}

.app-sidebar .member-card.is-active {
    border: 1px solid var(--orange);
    transform: translateY(-1px) scale(1.03);
}

.app-sidebar .member-card:hover {
    border: 1px solid var(--orange);
    transform: translateY(-1px) scale(1.03);
    transition: 0.3s linear !important;
}

.app-sidebar .member-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid transparent;
    background: linear-gradient(#fff, #fff) padding-box, var(--gradient-green-border) border-box;
    background-clip: padding-box, border-box;
}

.app-sidebar .member-name {
    font-size: var(--font-size-14px);
    font-weight: var(--font-weight-500);
    color: var(--black);
    flex: 1 1 auto;
}

.app-sidebar .member-action {
    color: var(--orange);
}



/* Leaflet live map container */
.live-map {
    width: 100%;
    height: 700px;
    border-radius: var(--radius-25);
    overflow: hidden;
    box-shadow: var(--shadow-soft);
    border: var(--border-default);
}

.leaflet-control {
    border-radius: 8px;
    overflow: hidden;
}

.leaflet-control-zoom a {
    box-shadow: none;
}

.leaflet-bottom.leaflet-right .leaflet-control-zoom {
    margin: 0 12px 12px 0;
}

.leaflet-marker-icon.avatar-marker {
    border-radius: 50%;
    border: 3px solid #fff;
    box-shadow: 0 0 6px rgba(0, 0, 0, 0.25);
    object-fit: cover;
}

.place-pin {
    border: none;
    background: transparent;
}

.place-pin .place-emoji {
    font-size: 30px;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.95);
    border: 2px solid var(--orange);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
}

/* Weather sidebar control (Leaflet custom) */
.weather-control {
    background: var(--gradient-surface-soft);
    border: var(--border-default);
    border-radius: var(--radius-25);
    box-shadow: var(--shadow-pressable);
    padding: var(--space-15);
    width: 260px;
    color: var(--black);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.live-map .leaflet-top.leaflet-left,
.live-map .leaflet-top.leaflet-right {
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 12px;
    z-index: 400;
}

.live-map .leaflet-top.leaflet-left {
    left: 10px;
    align-items: flex-start;
}

.live-map .leaflet-top.leaflet-right {
    right: 10px;
    align-items: flex-end;
}

.leaflet-top.leaflet-left .leaflet-control.weather-control,
.leaflet-top.leaflet-right .leaflet-control.locations-control {
    margin: 0;
}

.live-location .leaflet-tooltip {
    font-size: var(--font-size-14px);
    font-weight: var(--font-weight-500);
    color: var(--black);
}

.weather-control .wc-header {
    font-size: var(--font-size-14px);
    font-weight: var(--font-weight-500);
    color: var(--black);
    margin: 0 0 10px 0;
    text-align: center;
}

.weather-control .wc-now {
    display: flex;
    align-items: center;
    gap: var(--space-10);
    padding: var(--space-15);
    border: var(--border-default);
    border-radius: var(--radius-25);
    box-shadow: var(--shadow-soft);
    margin: 0 0 12px 0;
}

.weather-control .wc-now .icon {
    font-size: 28px;
    line-height: 1;
}

.weather-control .wc-now .temp {
    font-size: var(--font-size-24px);
    font-weight: var(--font-weight-700);
}

.weather-control .wc-now .desc {
    font-size: var(--font-size-14px);
    font-weight: var(--font-weight-400);
    opacity: 0.85;
}

.weather-control .wc-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-10);
}

.weather-control .wc-item {
    display: flex;
    align-items: center;
    gap: var(--space-10);
    padding: var(--space-10);
    border: var(--border-default);
    border-radius: var(--radius-25);
    box-shadow: var(--shadow-soft);
}

.weather-control .wc-item .icon {
    font-size: 20px;
    width: 28px;
    text-align: center;
}

.weather-control .wc-item .meta {
    display: flex;
    flex-direction: column;
    gap: var(--space-5);
    flex: 1 1 auto;
}

.weather-control .wc-item .day {
    font-size: var(--font-size-14px);
    font-weight: var(--font-weight-600);
}

.weather-control .wc-item .short {
    font-size: var(--font-size-12px);
    opacity: 1;
}

.weather-control .wc-item .temps {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    min-width: 44px;
}

.weather-control .wc-item .tmax {
    font-size: var(--font-size-14px);
    font-weight: var(--font-weight-600);
}

.weather-control .wc-item .tmin {
    font-size: var(--font-size-12px);
    opacity: 0.8;
}

/* Locations sidebar control */
.locations-control {
    background: var(--gradient-surface-soft);
    border: var(--border-default);
    border-radius: var(--radius-25);
    box-shadow: var(--shadow-pressable);
    padding: var(--space-15);
    width: 260px;
    color: var(--black);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    flex-direction: column;
}

.locations-control .lc-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 0 0 10px 0;
}

.locations-control .lc-title {
    font-size: var(--font-size-14px);
    font-weight: var(--font-weight-500);
    color: var(--black);
    text-align: center;
    width: 100%;
}

.locations-control .lc-list {
    overflow: auto;
    display: flex;
    flex-direction: column;
    gap: var(--space-10);
}

.locations-control .lc-item {
    display: flex;
    align-items: center;
    gap: var(--space-10);
    padding: var(--space-5);
    border: var(--border-default);
    border-radius: var(--radius-25);
    box-shadow: var(--shadow-soft);
    margin: 0 0 12px 0;
    cursor: pointer;
    transition: 0.5s linear;
}

.locations-control .lc-item:hover {
    border: 1px solid var(--orange) !important;
    cursor: pointer;
    transition: 0.5s linear;
}

.locations-control .lc-icon {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-size: 18px;
    background: rgba(255, 255, 255, 0.9);
    border: 2px solid var(--orange);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.locations-control .lc-meta {
    flex: 1 1 auto;
}

.locations-control .lc-name {
    font-size: var(--font-size-14px);
    font-weight: var(--font-weight-600);
}

.locations-control .lc-time {
    font-size: var(--font-size-12px);
    opacity: 1;
}

.locations-control .lc-item.is-current .lc-icon {
    width: 36px;
    height: 36px;
    border: 0;
    box-shadow: none;
    background: transparent;
    padding: 0;
}
.locations-control .lc-item .lc-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    display: block;
}
.locations-control .lc-item.is-current .lc-icon img.lc-avatar {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    border-radius: 50%;
    aspect-ratio: 1/1;
}
.locations-control .lc-item.is-active {
    border-color: var(--orange);
}
/* Two-column content wrappers for trends, app usage, and web activity */
.screen-time-trends .card-content {
    display: flex;
    gap: var(--space-15);
    flex-wrap: nowrap;
    align-items: stretch;
}

.app-usage-overview .card-content {
    display: flex;
    gap: var(--space-15);
    flex-wrap: nowrap;
    align-items: stretch;
}

.app-usage-overview .card-left-side,
.app-usage-overview .card-right-side {
    width: 50%;
    min-width: 0;
    display: flex;
    align-items: flex-start;
    flex-direction: column;
}

.app-usage-overview .card-left-side > .card-content {
    align-items: flex-start;
}

.app-usage-left {
    display: flex;
    align-items: flex-start;
    justify-content: flex-start;
    width: 100%;
    max-height: 600px;
    padding: 0 var(--space-15);
    flex: 1 1 auto;
    position: relative;
    box-sizing: border-box;
}

/* Chart canvases sizing */
#appUsageDoughnut {
    width: 100% !important;
    height: 100% !important;
    max-height: none;
    display: block;
}

/* Web Activity */
/* Web Activity layout */
.web-activity-insights .card-content {
    display: flex;
    gap: var(--space-15);
    flex-wrap: nowrap;
    align-items: stretch;
}

.web-activity-insights .card-left-side,
.web-activity-insights .card-right-side {
    width: 50%;
    min-width: 0;
    display: flex;
    align-items: flex-start;
    flex-direction: column;
}

.screen-time-trends .card-left-side,
.screen-time-trends .card-right-side {
    width: 50%;
    min-width: 0;
    display: flex;
    align-items: flex-start;
    flex-direction: column;
}

.screen-time-trends .card-left-side > .card-content {
    align-items: flex-start;
}

.web-activity-insights .app-usage-left {
    display: flex;
    align-items: flex-start;
    justify-content: flex-start;
    width: 100%;
    max-height: 600px;
    padding: 0 var(--space-15);
    flex: 1 1 auto;
    position: relative;
    box-sizing: border-box;
}

#webActivityRadar {
    width: 100% !important;
    height: 100% !important;
    max-height: none;
    display: block;
}

.web-activity-insights .card-left-side > .card-content {
    align-items: flex-start;
}

.card.child-summary .badges button {
    transition: transform 0.1s ease, box-shadow 0.18s ease, opacity 0.18s ease, filter 0.18s ease;
}

.card.child-summary .badges button.is-active {
    transform: translateY(-1px) scale(1.03);
    box-shadow: 1px solid var(--shadow-pressable);
}

.card.child-summary .badges button.is-muted {
    opacity: 0.5;
    filter: grayscale(0.15) saturate(0.85);
}

.card.child-summary .member-live-notifications .notification-item.is-filter-hidden {
    display: none !important;
}

.material-symbols-outlined {
    font-size: 20px !important;
    line-height: 1;
    display: inline-block;
    vertical-align: middle;
    color: var(--orange);
}

.device-icons .material-symbols-outlined {
    cursor: pointer;
}

/* Compare controls (buttons) */
.compare {
    display: flex;
    justify-content: flex-end;
    width: 100%;
}

.compare button {
    all: unset;
    width: 100px;
    padding: var(--space-5);
    font-size: var(--font-size-13px);
    font-weight: var(--font-weight-500);
    color: var(--black);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-5);
    cursor: pointer;
    border-radius: var(--radius-25);
    background: var(--gradient-surface-soft);
    box-shadow: var(--shadow-pressable);
    border: var(--border-default);
}

.compare button.is-selected,
.compare button[aria-pressed="true"] {
    border: 1px solid var(--orange);
    transform: translateY(-1px) scale(1.03);
}

.leaflet-container .leaflet-control-attribution {
    display: none;
}

#screenTimeChart {
    width: 100%;
    height: 600px;
    max-height: none;
    display: block;
}

.screen-time-trends .card-sub-header .compare {
    justify-content: flex-end;
    gap: 12px;
    position: relative;
}
/* Legends for compare modes (trends/web/app) */
.trends-compare-legend {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
}
.trends-compare-legend .legend-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: var(--font-size-12px);
}
.trends-compare-legend .legend-swatch {
    width: 14px;
    height: 10px;
    border: 2px solid var(--orange);
    border-radius: 4px;
    box-sizing: border-box;
}

.trends-compare-legend .legend-label {
    color: var(--light-black);
    font-size: var(--font-size-12px);
    font-weight: var(--font-weight-500);
}

.web-activity-insights .card-left-side .app-usage-left {
    position: relative;
}

.app-usage-overview .card-left-side .app-usage-left {
    position: relative;
}

/* Legend container for web activity compare */
.web-compare-legend {
    position: static;
    transform: none;
    display: inline-flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}
.web-compare-legend .legend-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: var(--font-size-12px);
}
.web-compare-legend .legend-swatch {
    width: 14px;
    height: 10px;
    border: 2px solid var(--orange);
    border-radius: 4px;
    box-sizing: border-box;
}
.web-compare-legend .legend-label {
    color: var(--light-black);
    font-size: var(--font-size-12px);
    font-weight: var(--font-weight-500);
}

/* Legend container for app usage compare */
.app-compare-legend {
    position: static;
    transform: none;
    display: inline-flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}
.app-compare-legend .legend-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: var(--font-size-12px);
}
.app-compare-legend .legend-swatch {
    width: 14px;
    height: 10px;
    border: 2px solid var(--orange);
    border-radius: 4px;
    box-sizing: border-box;
}
.app-compare-legend .legend-label {
    color: var(--light-black);
    font-size: var(--font-size-12px);
    font-weight: var(--font-weight-500);
}

.app-usage-overview .card-sub-header .app-usage-tabs {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    width: auto;
    margin: 0;
}

.app-usage-overview .card-sub-header .app-usage-tabs button {
    width: 150px;
}

.app-usage-overview .card-sub-header .app-usage-tabs button.is-selected {
    border: 1px solid var(--orange);
    transform: translateY(-1px) scale(1.03);
}

.app-usage-overview .card-sub-header .app-usage-tabs button.is-selected .material-symbols-outlined {
    color: var(--orange);
}

.web-activity-insights .card-sub-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: var(--space-15);
}

.app-usage-overview .card-left-side .compare,
.web-activity-insights .card-left-side .compare {
    position: absolute;
    top: 0;
    left: var(--space-15);
    right: var(--space-15);
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    z-index: 2;
}

.app-usage-overview .card-left-side .compare.has-legend,
.web-activity-insights .card-left-side .compare.has-legend {
    justify-content: space-between;
}

.app-usage-panels {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 0;
}

.app-usage-panels .tab-panel {
    width: 100%;
    display: none;
}

.app-usage-panels .tab-panel.is-active {
    display: block;
}

.app-settings-placeholder {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: var(--space-15);
}

.app-settings-card {
    width: 100%;
    min-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-25);
    border-radius: var(--radius-25);
    border: var(--border-default);
    background: var(--gradient-surface-soft);
    box-shadow: var(--shadow-pressable);
    font-size: var(--font-size-18px);
    font-weight: var(--font-weight-500);
    color: var(--black);
}

/* App Controls: per-app limit summaries and actions */
.app-control-list {
    display: flex;
    flex-direction: column;
    width: 100%;
    max-height: 800px;
    overflow-y: auto;
    padding-right: var(--space-5);
    gap: var(--space-15);
}

.app-control-card {
    background-color: var(--near-white);
    border: var(--border-default);
    border-radius: var(--radius-25);
    box-shadow: var(--shadow-soft);
    padding: var(--space-15);
    display: flex;
    flex-direction: column;
    gap: var(--space-15);
    transition: opacity 0.18s ease, filter 0.18s ease;
}

.app-control-head {
    display: flex;
    align-items: center;
    gap: var(--space-15);
    flex-wrap: wrap;
}

.app-control-icon {
    width: 45px;
    height: 45px;
    border-radius: var(--border-radius-pill);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-25);
    border: var(--border-default);
    background: var(--gradient-surface-soft);
    box-shadow: var(--shadow-pressable);
}

.app-control-icon img {
    width: 28px;
    height: 28px;
    object-fit: contain;
}

.app-control-card.is-blocked .app-control-head,
.app-control-card.is-blocked .app-inner-top,
.app-control-card.is-blocked .app-progress-track,
.app-control-card.is-blocked .app-progress-bar,
.app-control-card.is-blocked .app-adjust-buttons {
    opacity: 0.55;
    filter: grayscale(0.15) saturate(0.85);
}

.app-control-card.is-blocked .app-progress-track {
    background: #e2e8f0;
}

.app-control-card.is-blocked .app-progress-bar {
    background: #c4cbd9;
}

.app-control-card.is-blocked .app-block-btn {
    background: var(--gradient-brand);
    color: var(--white);
    cursor: pointer;
}

.app-control-card.is-blocked .app-adjust-buttons button:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

.app-control-title {
    font-size: var(--font-size-14px);
    font-weight: var(--font-weight-500);
    color: var(--black);
}

.app-control-title .app-title-limit {
    font-size: var(--font-size-12px);
    font-weight: var(--font-weight-500);
    color: var(--light-black);
}

.app-usage-summary {
    font-size: var(--font-size-12px);
    font-weight: var(--font-weight-500);
    color: var(--light-black);
    margin-left: auto;
    text-align: right;
    min-width: 120px;
}

.app-control-inner {
    display: flex;
    flex-direction: column;
    gap: var(--space-15);
}

.app-inner-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-10);
    flex-wrap: wrap;
}

.app-child-name {
    font-size: var(--font-size-13px);
    font-weight: var(--font-weight-600);
    color: var(--black);
}

.app-limit-label {
    font-size: var(--font-size-12px);
    font-weight: var(--font-weight-500);
    color: var(--light-black);
}

.app-progress-track {
    position: relative;
    width: 100%;
    height: 8px;
    border-radius: var(--radius-999);
    background: var(--app-accent-soft);
    overflow: hidden;
}

.app-progress-bar {
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    width: var(--app-progress);
    background: var(--app-accent);
    border-radius: inherit;
    box-shadow: var(--shadow-pressable);
}

.app-inner-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-10);
    flex-wrap: wrap;
}

.app-adjust-buttons {
    display: flex;
    gap: var(--space-10);
    border-radius: var(--border-radius-pill);
}

.app-adjust-buttons button {
    all: unset;
    width: 50px;
    padding: var(--space-5);
    font-size: var(--font-size-13px);
    font-weight: var(--font-weight-500);
    color: var(--black);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-5);
    cursor: pointer;
    border-radius: var(--radius-25);
    border: var(--border-default);
    background: var(--gradient-surface-soft);
    box-shadow: var(--shadow-pressable);
}

.app-block-btn {
    all: unset;
    width: 70px;
    padding: var(--space-5);
    font-size: var(--font-size-13px);
    font-weight: var(--font-weight-500);
    color: var(--black);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-5);
    cursor: pointer;
    border-radius: var(--radius-25);
    border: var(--border-default);
    background: var(--gradient-surface-soft);
    box-shadow: var(--shadow-pressable);
}

/* Per-device quick action buttons (mute, pause, etc.) */
.device-settings {
    display: flex;
    width: 100%;
    gap: var(--space-10);
}

.device-icons {
    gap: 15px;
    display: flex;
}

.device-settings button {
    all: unset;
    flex: 1;
    padding: var(--space-10);
    font-size: var(--font-size-14px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: var(--space-10);
    cursor: pointer;
    border-radius: var(--radius-25);
    border: var(--border-default);
    background: var(--gradient-surface-soft);
    box-shadow: var(--shadow-pressable);
    font-weight: var(--font-weight-500);
    color: var(--black);
    transition: transform 0.1s ease, box-shadow 0.18s ease, opacity 0.18s ease, filter 0.18s ease;
}

.device-settings button.is-active {
    transform: translateY(-1px) scale(1.03);
    box-shadow: var(--shadow-pressable);
    border: 1px solid var(--orange);
}

.device-settings button.is-muted {
    opacity: 0.55;
    filter: grayscale(0.15) saturate(0.85);
}

.current-location-summary-card {
    margin: 0 0 30px 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.demo-container {
    max-width: 1200px;
    margin: 0 auto;
}

.demo-description {
    font-size: var(--font-size-14px);
    color: var(--light-black);
    margin-bottom: var(--space-30);
}

.sidebar-demo {
    width: 300px;
    background: var(--near-white);
    border: var(--border-default);
    border-radius: var(--radius-25);
    padding: var(--space-24);
    box-shadow: var(--shadow-soft);
}

.sidebar-title {
    font-size: var(--font-size-18px);
    font-weight: var(--font-weight-600);
    color: var(--black);
    margin-bottom: var(--space-24);
}

.date-picker-trigger {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px 12px;
    cursor: pointer;
    width: 100%;
    border-radius: var(--radius-25);
    background: var(--gradient-brand);
    box-shadow: var(--shadow-pressable);
    border: var(--border-default);
}

.date-picker-label {
    font-size: var(--font-size-14px);
    font-weight: var(--font-weight-500);
    color: var(--white);
    text-align: center;
    width: auto;
    margin: 0 auto;
    padding: 0 26px;
}

.sidebar-date-picker {
    color: var(--white);
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
}

.date-picker-dropdown {
    position: absolute;
    left: 270px;
    top: 486px;
    transform: translateY(-50%);
    width: 420px;
    max-height: 90vh;
    overflow: hidden;
    display: none;
    flex-direction: column;
    z-index: 3000;
    opacity: 0;
    transform: translateY(-50%) scale(0.95);
    transition: opacity 0.2s ease, transform 0.2s ease;
    border-radius: var(--radius-25);
    border: var(--border-default);
    box-shadow: var(--shadow-pressable);
    background: #fff;
}

.date-picker-dropdown.is-active {
    display: flex;
    opacity: 1;
    transform: translateY(-50%) scale(1);
}
/* Date Picker: floating panel for range selection */

.date-picker-header {
    padding: var(--space-24);
    border-bottom: var(--border-default);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.date-picker-header h3 {
    color: var(--black);
    margin: 0;
    font-size: var(--font-size-18px);
    font-weight: var(--font-weight-500);
}

.date-picker-close {
    background: none;
    border: none;
    cursor: pointer;
    padding: var(--space-5);
    border-radius: var(--radius-25);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid transparent;
}

.date-picker-close .material-symbols-outlined {
    color: var(--black);
    font-size: var(--font-size-20px);
}

.date-picker-body {
    padding: var(--space-24);
    overflow-y: auto;
    flex: 1;
}

.date-picker-presets {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-10);
    margin-bottom: var(--space-24);
}

.preset-btn {
    all: unset;
    padding: var(--space-5);
    font-size: var(--font-size-13px);
    font-weight: var(--font-weight-500);
    color: var(--black);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-5);
    cursor: pointer;
    border-radius: var(--radius-25);
    background: var(--gradient-surface-soft);
    box-shadow: var(--shadow-pressable);
    border: var(--border-default);
}

.preset-btn.is-active {
    border: 1px solid var(--orange);
    transform: translateY(-1px) scale(1.03);
}

.calendar-container {
    padding: var(--space-24);
    margin-bottom: var(--space-24);
    border-radius: var(--radius-25);
    border: var(--border-default);
    background: var(--gradient-surface-soft);
    box-shadow: var(--shadow-pressable);
}

.calendar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--space-24);
}

.calendar-month-year {
    font-size: var(--font-size-16px);
    font-weight: var(--font-weight-600);
    color: var(--black);
}

.nav-btn {
    background: none !important;
    border: none;
    cursor: pointer;
    padding: var(--space-5);
    border-radius: var(--radius-25);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid transparent;
}

.nav-btn:hover {
    background: var(--gray-200);
}

.nav-btn .material-symbols-outlined {
    color: var(--light-black);
    font-size: var(--font-size-20px);
}

.calendar-grid {
    display: flex;
    flex-direction: column;
    gap: var(--space-10);
}
/* Calendar layout for date range selection */

.calendar-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: var(--space-5);
    margin-bottom: var(--space-10);
}

.calendar-weekdays span {
    text-align: center;
    font-size: var(--font-size-12px);
    font-weight: var(--font-weight-600);
    color: var(--light-black);
    padding: var(--space-5) 0;
}

.calendar-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: var(--space-5);
}

.calendar-day {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--font-size-14px);
    font-weight: var(--font-weight-500);
    color: var(--black);
    border-radius: var(--radius-25);
    cursor: pointer;
    border: 1px solid transparent;
    transition: 0.1s linear;
}

.calendar-day:hover {
    background: var(--orange);
    transition: 0.1s linear;
    color: var(--white);
}

.calendar-day.is-disabled {
    color: var(--gray-200);
    cursor: not-allowed;
}

.calendar-day.is-disabled:hover {
    background: none;
}

.calendar-day.is-today {
    border-color: var(--orange);
}

.calendar-day.is-selected {
    background: var(--orange);
    color: var(--near-white);
}

.calendar-day.is-in-range {
    background: rgba(236, 97, 56, 0.1);
    color: var(--orange);
}

.calendar-day.is-range-start,
.calendar-day.is-range-end {
    background: var(--orange);
    color: var(--near-white);
}

.selected-range-display {
    background: rgba(236, 97, 56, 0.05);
    border: 1px solid rgba(236, 97, 56, 0.2);
    border-radius: var(--radius-25);
    padding: var(--space-15) var(--space-24);
}

.range-info {
    display: flex;
    align-items: center;
    gap: var(--space-10);
}

.range-info .material-symbols-outlined {
    color: var(--orange);
    font-size: var(--font-size-20px);
}

.range-info span:last-child {
    font-size: var(--font-size-14px);
    font-weight: var(--font-weight-500);
    color: var(--black);
}

.date-picker-footer {
    padding: var(--space-24);
    border-top: var(--border-default);
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: var(--space-15);
}

.date-picker-btn {
    all: unset;
    padding: var(--space-5);
    font-size: var(--font-size-13px);
    font-weight: var(--font-weight-500);
    color: var(--black);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-5);
    cursor: pointer;
    border-radius: var(--radius-25);
    background: var(--gradient-surface-soft);
    box-shadow: var(--shadow-pressable);
    border: var(--border-default);
    width: 100px;
}

.result-box {
    margin-top: var(--space-30);
    padding: var(--space-24);
    background: var(--near-white);
    border: var(--border-default);
    border-radius: var(--radius-25);
    box-shadow: var(--shadow-soft);
}

.result-title {
    font-size: var(--font-size-16px);
    font-weight: var(--font-weight-600);
    color: var(--black);
    margin-bottom: var(--space-10);
}

.result-text {
    font-size: var(--font-size-14px);
    color: var(--light-black);
    font-family: "Courier New", monospace;
}



.leaflet-control-zoom-in,
.leaflet-control-zoom-out {
    border: var(--border-default) !important;
    background: var(--white) !important;
    box-shadow: var(--shadow-pressable) !important;
    border-top-left-radius: 999px !important;
    border-top-right-radius: 999px !important;
    border-bottom-left-radius: 999px !important;
    border-bottom-right-radius: 999px !important;
}

.leaflet-touch .leaflet-control-layers,
.leaflet-touch .leaflet-bar {
    border: none !important;
    display: flex;
    gap: 10px;
}

.scroll-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    background: var(--gradient-brand);
    box-shadow: var(--shadow-pressable);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1500;
    opacity: 0;
    visibility: hidden;
    border: none;
    transition: 0.2s linear !important;
}

.scroll-to-top:hover {
    border: none !important;
    transition: 0.2s linear !important;
}

.scroll-to-top.visible {
    opacity: 1;
    visibility: visible;
}
/* Scroll-to-top fab button visibility toggle */

.scroll-to-top .material-symbols-outlined {
    color: var(--near-white);
    font-size: 24px !important;
}




@media (max-width: 1024px) {
    /* Mobile breakpoint: hide desktop UI, show gate */
    body {
        padding-left: 0;
    }
    .app-navbar,
    .app-sidebar,
    .card,
    .scroll-to-top {
        display: none !important;
    }
    .mobile-download-gate {
        display: flex;
        z-index: 5000;
    }
}

@media (min-width: 1025px) and (max-width: 1439px) {
    /* Medium desktop layout adjustments */
    .card.child-summary .card-left-side,
    .card.child-summary .card-right-side {
        display: flex;
    }

    .card.child-summary .card-left-side > .card-content,
    .card.child-summary .card-right-side > .card-content {
        flex: 1;
        height: 100%;
    }

    .card.child-summary .card-left-side > .card-content {
        align-items: center;
    }

    .card.child-summary .card-left-side > .card-content .member-summary-card:first-of-type {
        margin-top: auto;
    }

    .card.child-summary .avatar-wrapper,
    .card.child-summary #activeChildName,
    .card.child-summary .current-location-summary-card {
        align-self: center;
    }

    .card.child-summary .card-right-side > .card-content {
        align-items: stretch;
        min-height: 0;
    }
    .card.child-summary .member-live-notifications {
        flex: 1 1 auto;
        min-height: 0;
        max-height: none;
    }
}


@media (min-width: 1025px) and (max-width: 1790px) {
    /* Mid-wide: reposition AI Reports label centrally */
    .card.child-summary .card-sub-header .badges {
        position: relative;
        padding-top: 32px;
    }

    .card.child-summary .card-sub-header .badges .ai-reports-label {
        position: absolute;
        bottom: 25px;
        left: 50%;
        transform: translateX(-50%);
        margin-left: 0;
        z-index: 3;
        pointer-events: none;
    }
}

@media (min-width: 1440px) {
    /* Wide desktop: ensure flex children stretch properly */
    .card.child-summary .card-left-side,
    .card.child-summary .card-right-side {
        display: flex;
    }

    .card.child-summary .card-left-side > .card-content,
    .card.child-summary .card-right-side > .card-content {
        flex: 1;
        height: 100%;
    }

    .card.child-summary .card-left-side > .card-content {
        align-items: center;
    }

    .card.child-summary .card-left-side > .card-content .member-summary-card:first-of-type {
        margin-top: auto;
    }

    .card.child-summary .avatar-wrapper,
    .card.child-summary #activeChildName,
    .card.child-summary .current-location-summary-card {
        align-self: center;
    }

    .card.child-summary .card-right-side > .card-content {
        align-items: stretch;
        min-height: 0;
    }
    .card.child-summary .member-live-notifications {
        flex: 1 1 auto;
        min-height: 0;
        max-height: none;
    }

    .app-usage-overview .card-left-side,
    .app-usage-overview .card-right-side {
        display: flex;
        flex-direction: column;
    }

    .app-usage-overview .card-left-side > .card-content,
    .app-usage-overview .card-right-side > .card-content {
        flex: 1;
        height: 100%;
    }

    .app-usage-overview .card-right-side > .card-content {
        min-height: 0;
    }

    .app-usage-overview .app-usage-panels {
        flex: 1 1 auto;
        min-height: 0;
        display: flex;
        flex-direction: column;
    }

    .app-usage-overview .app-usage-panels .tab-panel {
        flex: 1 1 auto;
        min-height: 0;
    }

    .app-usage-overview #appUsageList {
        max-height: none;
    }

    .screen-time-trends .card-left-side,
    .screen-time-trends .card-right-side {
        display: flex;
        flex-direction: column;
    }

    .screen-time-trends .card-left-side > .card-content,
    .screen-time-trends .card-right-side > .card-content {
        flex: 1;
        height: 100%;
    }

    .screen-time-trends .card-right-side > .card-content {
        min-height: 0;
    }

    .screen-time-trends #screenTimeList {
        max-height: none;
    }
}