/* This file defines the main responsive visual style inspired by a clean calendar workspace UI. */
:root {
    --bg: #eceff3;
    --panel: #ffffff;
    --panel-soft: #f7f8fb;
    --ink: #171b25;
    --ink-muted: #687082;
    --line: #d9dee7;
    --brand: #0f2139;
    --mint: #ddf4ea;
    --blue-soft: #dfeefe;
    --lilac-soft: #efe7ff;
    --radius: 18px;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: "Manrope", sans-serif;
    background: radial-gradient(circle at 10% 10%, #f8fbff, var(--bg) 40%, #dde3eb 100%);
    color: var(--ink);
}

.app-shell {
    min-height: 100vh;
    display: block;
}

.app-shell > .main-panel {
    margin-left: 280px;
    padding: 1.25rem;
    min-height: 100vh;
}

.sidebar {
    background: linear-gradient(180deg, #f5f7fb 0%, #edf1f7 100%);
    border-right: 1px solid var(--line);
    padding: 1.25rem 1rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    position: fixed;
    top: 0;
    left: 0;
    width: 280px;
    height: 100vh;
    overflow-y: auto;
    z-index: 100;
}

.sidebar-compact {
    justify-content: center;
    align-items: center;
}

.logo-box {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.6rem;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.7);
}

.sidebar-logo-img {
    max-height: 44px;
    max-width: 180px;
    object-fit: contain;
}

.logo-badge-fallback {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.logo-badge {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, #091f3c, #274d7c);
    color: #fff;
    border-radius: 12px;
    font-family: "Space Grotesk", sans-serif;
    font-weight: 700;
}

.logo-title {
    font-family: "Space Grotesk", sans-serif;
    font-weight: 700;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.nav-item {
    display: block;
    text-decoration: none;
    color: var(--ink);
    padding: 0.65rem 0.75rem;
    border-radius: 10px;
    transition: background 0.2s ease, transform 0.2s ease;
}

.nav-item:hover {
    background: #fff;
    transform: translateX(2px);
}

.main-panel {
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 1.25rem;
}

.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    border-bottom: 1px solid var(--line);
    padding-bottom: 0.8rem;
}

.topbar-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.notification-bell {
    position: relative;
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    background: var(--panel-soft);
    border: 1px solid var(--line);
    color: var(--ink);
    text-decoration: none;
}

.notification-bell:hover {
    background: #edf3fb;
}

.notification-bell-icon {
    font-size: 1.1rem;
    line-height: 1;
}

.notification-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    background: #204f86;
    color: #fff;
    font-size: 0.7rem;
    font-weight: 700;
}

.page-title {
    margin: 0;
    font-family: "Space Grotesk", sans-serif;
    font-size: 1.7rem;
}

.page-subtitle {
    color: var(--ink-muted);
    font-size: 0.9rem;
}

.user-pill {
    padding: 0.45rem 0.8rem;
    border-radius: 999px;
    background: var(--panel-soft);
    display: flex;
    flex-direction: column;
    border: 1px solid var(--line);
    align-items: flex-end;
}

.card-surface {
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--panel);
    box-shadow: 0 10px 30px rgba(15, 33, 57, 0.04);
}

.btn-ink {
    background: var(--brand);
    color: #fff;
    border: none;
}

.btn-ink:hover {
    background: #162c4b;
    color: #fff;
}

.comment-row {
    padding: 0.65rem 0;
    border-bottom: 1px solid var(--line);
}

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

.auth-card {
    max-width: 520px;
}

/* ── Login standalone page ── */
.login-body {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle at 10% 10%, #f8fbff, var(--bg) 40%, #dde3eb 100%);
}

.login-shell {
    width: 100%;
    max-width: 480px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    padding: 2rem 1rem;
}

.login-logo-box {
    display: flex;
    justify-content: center;
}

.login-logo-img {
    max-height: 80px;
    max-width: 260px;
    object-fit: contain;
}

.login-card {
    width: 100%;
}

.area-card {
    display: block;
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 1rem;
    background: #f6f8fc;
    color: var(--ink);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    min-height: 100%;
}

.area-name-link {
    color: inherit;
    text-decoration: none;
}

.area-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 24px rgba(15, 33, 57, 0.08);
}

.area-tone-0 {
    background: linear-gradient(180deg, #f2f4f8, #e8ebf1);
    border-color: #d6dbe3;
}

.area-tone-1 {
    background: linear-gradient(180deg, #edf5ff, #e1efff);
    border-color: #cfe1f8;
}

.area-tone-2 {
    background: linear-gradient(180deg, #e0f0ff, #d1e7ff);
    border-color: #b7d4f5;
}

.area-tone-3 {
    background: linear-gradient(180deg, #d4e8ff, #c2ddff);
    border-color: #9fc4ee;
}

.area-tone-4 {
    background: linear-gradient(180deg, #c4dcff, #b4d0ff);
    border-color: #89afde;
}

.area-tone-5 {
    background: linear-gradient(180deg, #aacfff, #94bcf2);
    border-color: #76a0d7;
}

.area-name {
    font-family: "Space Grotesk", sans-serif;
    font-weight: 700;
    font-size: 1.05rem;
}

.area-meta {
    color: var(--ink-muted);
    font-size: 0.9rem;
    margin-top: 0.2rem;
}

.area-count {
    font-family: "Space Grotesk", sans-serif;
    font-weight: 700;
    font-size: 1rem;
    white-space: nowrap;
}

.area-progress {
    width: 100%;
    height: 8px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.55);
    overflow: hidden;
}

.area-progress-bar {
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, #1e4d84, #6aa7f2);
}

.metric-box {
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--panel-soft);
    padding: 0.75rem 0.9rem;
}

.metric-label {
    color: var(--ink-muted);
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.metric-value {
    font-family: "Space Grotesk", sans-serif;
    font-weight: 700;
    font-size: 1.5rem;
    line-height: 1.1;
    margin-top: 0.25rem;
}

.view-toggle .btn.active {
    background: var(--brand);
    color: #fff;
}

.month-nav {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.month-label {
    min-width: 135px;
    text-align: center;
    font-weight: 700;
    font-family: "Space Grotesk", sans-serif;
}

.calendar-scroll {
    overflow-x: auto;
}

.calendar-grid {
    min-width: 880px;
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 0.5rem;
}

.weekday-header {
    font-size: 0.8rem;
    color: var(--ink-muted);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    padding: 0.25rem 0.3rem;
}

.calendar-cell {
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #fff;
    min-height: 130px;
    padding: 0.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}

.calendar-cell.is-outside {
    background: #f5f7fb;
    opacity: 0.7;
}

.calendar-date {
    font-size: 0.8rem;
    color: var(--ink-muted);
    font-weight: 700;
}

.calendar-events-stack {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.day-event-card {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 0.4rem;
    align-items: center;
    text-decoration: none;
    border-radius: 8px;
    padding: 0.35rem 0.45rem;
    color: #08233f;
    border: 1px solid #bed5ee;
}

.day-event-card:hover {
    transform: translateY(-1px);
}

.priority-low {
    background: #eaf4ff;
    border-color: #cfe4fb;
}

.priority-medium {
    background: #d4e8ff;
    border-color: #b7d7fb;
}

.priority-high {
    background: #b9d8fb;
    border-color: #96c2f0;
}

.event-time {
    font-size: 0.68rem;
    font-weight: 700;
    color: #114272;
}

.event-title {
    font-size: 0.72rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.calendar-day {
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 0.75rem;
    background: var(--panel-soft);
    margin-bottom: 0.8rem;
}

.calendar-day-title {
    font-weight: 700;
    margin-bottom: 0.5rem;
    font-family: "Space Grotesk", sans-serif;
}

.calendar-chip {
    text-decoration: none;
    color: var(--ink);
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #fff;
    padding: 0.5rem 0.6rem;
    display: flex;
    justify-content: space-between;
}

.calendar-chip:nth-child(3n + 1) {
    background: var(--blue-soft);
}

.calendar-chip:nth-child(3n + 2) {
    background: var(--lilac-soft);
}

.calendar-chip:nth-child(3n + 3) {
    background: var(--mint);
}

.tag-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.5rem;
}

.tag-option {
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 0.55rem;
    display: flex;
    gap: 0.5rem;
    align-items: center;
    background: var(--panel-soft);
}

.tag-pill {
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 0.2rem 0.55rem;
    background: var(--panel-soft);
}

.badge-complete {
    text-decoration: none;
    color: var(--ink);
    border: 1px solid var(--line);
    background: var(--mint);
    border-radius: 999px;
    padding: 0.35rem 0.6rem;
}

.notification-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.notification-row {
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--panel-soft);
    padding: 0.9rem 1rem;
}

.notification-row.is-unread {
    background: #eaf3ff;
    border-color: #bfd7f7;
}

.notification-message {
    font-weight: 600;
    color: var(--ink);
}

.profile-avatar-link {
    text-decoration: none;
}

.profile-avatar {
    width: 44px;
    height: 44px;
    border-radius: 999px;
    object-fit: cover;
    border: 1px solid var(--line);
    background: var(--panel-soft);
}

.profile-avatar.initials {
    display: grid;
    place-items: center;
    font-weight: 700;
    color: var(--brand);
}

.profile-image-preview {
    width: 120px;
    height: 120px;
    border-radius: 999px;
    object-fit: cover;
    border: 1px solid var(--line);
}

.profile-image-preview.placeholder {
    display: grid;
    place-items: center;
    background: #e2edfb;
    color: var(--brand);
    font-family: "Space Grotesk", sans-serif;
    font-size: 2rem;
    font-weight: 700;
}

@media (max-width: 980px) {
    .app-shell > .main-panel {
        margin-left: 0;
        padding: 0.75rem;
    }

    .sidebar {
        position: static;
        width: 100%;
        height: auto;
        flex-direction: row;
        flex-wrap: wrap;
        align-items: center;
    }

    .sidebar-nav {
        flex-direction: row;
        flex-wrap: wrap;
    }

    .main-panel {
        padding: 1rem;
    }

    .calendar-grid {
        min-width: 760px;
    }
}
