/* Global resets and layout */
:root {
    color-scheme: dark;
    font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: #1f324d;
    background: #f6f8fb;
    --surface: #ffffff;
    --surface-alt: #f3f5f9;
    --border: #d7dce9;
    --text: #1f324d;
    --muted: #5f6d86;
    --primary: #1f3a73;
    --primary-soft: #eaf0ff;
    --shadow: 0 18px 40px rgba(38, 60, 103, 0.08);
}

* {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    min-height: 100%;
    height: 100%;
}

img {
    max-width: 100%;
}

a {
    color: inherit;
    text-decoration: none;
}

button, input, textarea {
    font: inherit;
}

button {
    cursor: pointer;
}

body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    background: #eef2f8;
    line-height: 1.6;
}

.topbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 72px;
    padding: 0 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(255,255,255,0.98);
    border-bottom: 1px solid rgba(227, 234, 246, 0.9);
    box-shadow: 0 12px 24px rgba(22, 38, 70, 0.08);
    backdrop-filter: blur(12px);
    z-index: 20;
}

.topbar__brand .logo {
    font-weight: 700;
    letter-spacing: 0.02em;
    color: var(--primary);
}

.topbar__nav {
    display: flex;
    gap: 24px;
}

.nav-link {
    color: var(--muted);
    font-size: 0.95rem;
    transition: color 0.2s ease, transform 0.2s ease;
}

.nav-link:hover {
    color: var(--primary);
    transform: translateY(-1px);
}

.sidebar {
    flex: 0 0 260px;
    min-width: 260px;
    background: linear-gradient(180deg, #ffffff 0%, #f4f7fb 100%);
    border-right: 1px solid #e5e9f1;
    padding: 32px 24px;
    position: sticky;
    top: 72px;
    height: calc(100vh - 72px);
    overflow-y: auto;
}

.sidebar__section {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-top: 12px;
}

.sidebar__title {
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    color: #7d8aad;
    text-transform: uppercase;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 18px;
    border-radius: 16px;
    color: #374154;
    background: #ffffff;
    border: 1px solid transparent;
    transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.sidebar-link:hover,
.sidebar-link.active {
    background: var(--primary-soft);
    color: var(--primary);
    border-color: rgba(29, 63, 124, 0.16);
    transform: translateX(2px);
}

.nav-link.active {
    color: var(--primary);
    border-bottom: 2px solid var(--primary);
    padding-bottom: 6px;
}

.nav-link {
    color: var(--muted);
    font-size: 0.95rem;
    transition: color 0.2s ease, transform 0.2s ease;
}

.icon {
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    background: rgba(29, 63, 124, 0.08);
    color: var(--primary);
}

.icon svg {
    width: 20px;
    height: 20px;
}

.icon--lock svg {
    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
}

.icon--building svg,
.icon--calendar svg,
.icon--post svg {
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
}

.dashboard-layout {
    display: flex;
    min-height: calc(100vh - 72px);
    margin-top: 72px;
}

.main-content {
    display: flex;
    flex: 1;
    min-width: 0;
    width: auto;
    height: calc(100vh - 72px);
    overflow-y: auto;
    padding: 0;
}

.page-content {
    width: 100%;
    padding: 32px;
    box-sizing: border-box;
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 24px;
    margin-bottom: 30px;
}

.eyebrow {
    margin: 0 0 12px;
    color: var(--primary);
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    font-size: 0.82rem;
}

h1 {
    margin: 0;
    font-size: 2.4rem;
    line-height: 1.05;
    color: var(--text);
}

.lead {
    margin: 16px 0 0;
    color: var(--muted);
}

.grid-two-cards,
.grid-four-cards,
.grid-three-buttons {
    display: grid;
    gap: 20px;
}

.grid-two-cards {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    margin-bottom: 24px;
}

.grid-four-cards {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    margin-bottom: 24px;
}

.grid-three-buttons {
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 24px;
    margin-bottom: 24px;
}

.card,
.hero-card,
.platform-card,
.form-card,
.empty-state-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 24px;
    box-shadow: var(--shadow);
}

.card {
    padding: 28px;
}

.card--highlight {
    background: var(--primary-soft);
    border-color: rgba(32, 61, 131, 0.14);
}

.card--feature {
    padding: 32px;
}

.hero-card {
    display: grid;
    grid-template-columns: 1fr;
    padding: 36px;
    margin-bottom: 24px;
}

.hero-card__content {
    display: grid;
    gap: 22px;
}

.hero-card__stats {
    display: flex;
    gap: 28px;
    flex-wrap: wrap;
}

.stat-value {
    display: block;
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary);
}

.stat-label {
    color: var(--muted);
    font-size: 0.95rem;
}

.platform-card {
    padding: 30px 24px;
    display: grid;
    gap: 18px;
}

.platform-card__icon {
    width: 52px;
    height: 52px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    background: var(--primary-soft);
    font-size: 1.4rem;
    color: var(--primary);
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 0 22px;
    border: none;
    border-radius: 14px;
    background: #eef2f8;
    color: var(--text);
    font-weight: 600;
    transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.button:hover {
    transform: translateY(-1px);
    box-shadow: 0 12px 24px rgba(30, 66, 126, 0.12);
}

.button--primary {
    background: var(--primary);
    color: #ffffff;
}

.form-card {
    display: grid;
    gap: 24px;
    padding: 32px;
}

.form-section {
    display: grid;
    gap: 18px;
    padding: 24px;
    background: var(--surface-alt);
    border-radius: 20px;
    border: 1px solid transparent;
}

.form-section__header h2 {
    margin: 0;
    font-size: 1.2rem;
}

.form-section__header p {
    margin: 8px 0 0;
    color: var(--muted);
}

.field-group {
    display: grid;
    gap: 10px;
}

.field-group label,
.field-group span {
    color: var(--text);
}

.field-group input,
.field-group textarea {
    width: 100%;
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 16px;
    background: #ffffff;
    color: var(--text);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.field-group textarea {
    min-height: 190px;
    resize: vertical;
}

.field-group input:focus,
.field-group textarea:focus,
.field-group input:hover,
.field-group textarea:hover {
    outline: none;
    border-color: rgba(30, 64, 128, 0.28);
    box-shadow: inset 0 0 0 1px rgba(30, 64, 128, 0.08);
}

.field-note,
.field-meta {
    display: flex;
    justify-content: space-between;
    color: var(--muted);
    font-size: 0.92rem;
}

.field-error {
    color: #bf2d2d;
    font-size: 0.92rem;
    min-height: 1.3em;
}

.form-actions {
    display: flex;
    align-items: center;
    gap: 18px;
}

.calendar {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 10px;
    padding: 12px;
    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: 18px;
}

.calendar-day {
    min-height: 62px;
    padding: 10px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    background: var(--surface-alt);
    color: var(--text);
    transition: transform 0.15s ease, background 0.15s ease;
}

.calendar-day:hover {
    transform: translateY(-1px);
    background: var(--primary-soft);
}

.calendar-day.selected {
    background: var(--primary);
    color: #ffffff;
}

.selected-dates-panel {
    padding: 18px 16px;
    background: var(--surface);
    border-radius: 18px;
    border: 1px solid var(--border);
}

.selected-dates {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 10px;
}

.selected-dates li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 14px;
    border-radius: 14px;
    background: var(--surface-alt);
    color: var(--text);
}

.selected-dates button {
    border: none;
    background: transparent;
    color: var(--primary);
    font-size: 0.95rem;
}

.empty-state-card {
    width: 100%;
    text-align: center;
    padding: 56px 40px;
}

.empty-state-card__icon {
    width: 96px;
    height: 96px;
    margin: 0 auto 20px;
}

.empty-state-illustration {
    width: 100%;
    height: 100%;
    border-radius: 22px;
    background: linear-gradient(135deg, rgba(29, 63, 124, 0.12), rgba(255, 255, 255, 0.45));
    box-shadow: inset 0 14px 30px rgba(29, 63, 124, 0.08);
}

@media (max-width: 1100px) {
    .grid-four-cards,
    .grid-three-buttons,
    .grid-two-cards {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 820px) {
    .dashboard-layout {
        flex-direction: column;
        width: 100%;
    }

    .topbar {
        left: 0;
        padding: 0 20px;
    }

    .sidebar {
        position: relative;
        width: 100%;
        min-width: 0;
        height: auto;
        border-right: none;
        border-bottom: 1px solid #e5e9f1;
        top: 0;
    }

    .main-content {
        width: 100%;
        min-height: auto;
        height: auto;
        overflow: visible;
    }

    .page-header {
        flex-direction: column;
        gap: 16px;
    }

    .grid-four-cards,
    .grid-three-buttons,
    .grid-two-cards {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 620px) {
    .topbar {
        height: auto;
        padding: 18px 20px;
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }

    .topbar__nav {
        flex-wrap: wrap;
        gap: 14px;
    }

    .sidebar {
        padding: 22px 18px;
    }

    .main-content {
        padding: 116px 16px 16px;
    }

    .button {
        width: 100%;
    }
}

/* Authentication Pages */

.auth-page {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 32px 20px;
}

.auth-container {
    width: 100%;
    max-width: 600px;   /* Wider */
}

.auth-title {
    text-align: center;
    margin-bottom: 4px;
}

.auth-subtitle {
    text-align: center;
    color: var(--muted);
    margin-bottom: 20px;
}

.auth-footer {
    text-align: center;
    color: var(--muted);
    margin-top: 8px;
}

.auth-footer a {
    color: var(--primary);
    font-weight: 600;
}

.form-card {
    padding: 28px 36px; /* Less height, more width */
    gap: 18px;
}

.form-card .button {
    width: 100%;
}

.field-group {
    gap: 8px;
}

.field-group input {
    padding: 12px 16px; /* Slightly shorter inputs */
}

.form-actions {
    margin-top: 6px;
}

.auth-divider {
    text-align: center;
    color: var(--muted);
    margin: 4px 0;
}


#timezone-select {
    width: 100%;
    height: 42px;
    min-height: 42px;
    max-height: 42px;
    padding: 0 12px;
    border: 1px solid #ccc;
    border-radius: 6px;
    background: #fff;
    color: #222;
    font-size: 14px;
    line-height: normal;
    box-sizing: border-box;
    display: block;
}

.pdf-template-button {
    display: inline-block;
    padding: 10px 16px;
    border: 1px solid #2563eb;
    border-radius: 8px;
    background: #eff6ff;
    color: #2563eb;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s ease;
}

.pdf-template-button:hover {
    background: #2563eb;
    color: white;
}