:root {
    --bg: #0f0a3a;
    --bg-soft: #1b1263;
    --bg-deep: #0a0727;
    --panel: rgba(27, 19, 93, 0.88);
    --panel-strong: rgba(41, 29, 126, 0.92);
    --line: rgba(255, 255, 255, 0.1);
    --text: #f6f3ff;
    --muted: #b8b4df;
    --accent-blue: #1f8fff;
    --accent-teal: #00d6c9;
    --accent-pink: #ff46d0;
    --accent-indigo: #6d5cff;
    --accent-lime: #5ff2a3;
    --success: #54e4a8;
    --error: #ff7b8b;
    --info: #8ac5ff;
    --shadow: 0 24px 80px rgba(2, 0, 17, 0.38);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--text);
    font-family: "Manrope", sans-serif;
    background:
        radial-gradient(circle at top left, rgba(109, 92, 255, 0.32), transparent 26%),
        radial-gradient(circle at top right, rgba(255, 70, 208, 0.24), transparent 24%),
        radial-gradient(circle at bottom left, rgba(0, 214, 201, 0.18), transparent 28%),
        linear-gradient(180deg, #17104f 0%, #100b3d 42%, #090625 100%);
}

body,
input,
textarea,
select,
button {
    text-wrap: pretty;
}

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

code {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

button,
input,
select,
textarea {
    font: inherit;
}

.landing,
.auth-shell,
.app-shell {
    min-height: 100vh;
}

.landing-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 6vw 0;
}

.landing-header nav {
    display: flex;
    gap: 16px;
    align-items: center;
}

.brand {
    display: inline-flex;
    align-items: center;
}

.brand img {
    display: block;
    width: min(240px, 34vw);
    height: auto;
    object-fit: contain;
}

.hero {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 36px;
    align-items: center;
    padding: 42px 6vw 70px;
}

.hero-copy h1,
.auth-brand h1 {
    margin: 0 0 18px;
    font-family: "Instrument Serif", serif;
    font-size: clamp(3rem, 5vw, 5.4rem);
    line-height: 0.94;
    font-weight: 400;
}

.lead,
.auth-brand p,
.muted {
    color: var(--muted);
}

.auth-logo {
    display: block;
    width: min(280px, 100%);
    height: auto;
    margin: 0 0 18px;
    object-fit: contain;
}

.eyebrow,
.panel-kicker {
    margin: 0 0 10px;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    font-size: 0.72rem;
    font-weight: 800;
    color: #8fcbff;
}

.hero-actions,
.feature-list,
.role-grid,
.chips,
.checkboxes {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 18px;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.05);
    color: var(--text);
    cursor: pointer;
    transition: transform 0.2s ease, background 0.2s ease;
}

.button:hover {
    transform: translateY(-1px);
}

.button.primary {
    background: linear-gradient(135deg, var(--accent-blue), var(--accent-indigo));
    border-color: transparent;
}

.button.secondary {
    background: rgba(255, 255, 255, 0.08);
}

.button.ghost {
    background: rgba(255, 255, 255, 0.03);
}

.button.danger {
    background: linear-gradient(135deg, #ff6c8a, #d63469);
    border-color: transparent;
}

.button.wide {
    width: 100%;
}

.hero-art {
    display: flex;
    justify-content: center;
}

.poster,
.feature-list article,
.role-chip,
.auth-panel,
.panel,
.alert,
.attendance-card,
.mobile-card,
.kpi-card,
.stats-grid article {
    border: 1px solid var(--line);
    background: linear-gradient(180deg, rgba(38, 27, 122, 0.9), rgba(17, 12, 63, 0.88));
    box-shadow: var(--shadow);
}

.poster {
    width: min(420px, 100%);
    min-height: 420px;
    border-radius: 34px;
    padding: 28px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    gap: 10px;
}

.poster strong {
    font-size: 4rem;
    line-height: 1;
}

.poster-kicker,
.panel-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    color: #d8f1ff;
}

.poster-logo {
    display: block;
    width: min(240px, 100%);
    height: auto;
    margin-bottom: 16px;
    object-fit: contain;
}

.info-band,
.roles-strip {
    padding: 0 6vw 72px;
}

.feature-list article,
.role-chip {
    padding: 20px;
    border-radius: 22px;
    flex: 1 1 220px;
}

.role-chip {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.auth-shell {
    display: grid;
    place-items: center;
    padding: 28px 16px;
}

.auth-panel {
    width: min(560px, 100%);
    border-radius: 28px;
    padding: 24px;
}

.register-shell {
    padding-top: 36px;
    padding-bottom: 36px;
}

.register-panel {
    width: min(720px, 100%);
}

.auth-links {
    margin-top: 16px;
    display: flex;
    justify-content: center;
}

.auth-links a {
    color: #bde3ff;
}

.auth-form,
.stack-form {
    display: grid;
    gap: 14px;
}

.register-form {
    gap: 16px;
}

.register-ministry-group {
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 18px;
    padding: 16px;
    margin: 0;
    min-width: 0;
}

.register-ministry-group legend {
    padding: 0 10px;
    color: #d8f1ff;
    font-weight: 700;
}

.selector-helper {
    margin: 0 0 14px;
    color: rgba(218, 232, 255, 0.72);
    font-size: 0.85rem;
    line-height: 1.45;
}

.register-ministry-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.register-check {
    display: block;
    min-width: 0;
    cursor: pointer;
}

.register-check input,
.register-consent input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.register-check-body,
.register-consent-body {
    display: grid;
    grid-template-columns: 24px 1fr;
    align-items: center;
    gap: 14px;
    padding: 16px 18px;
    border-radius: 18px;
    border: 1px solid rgba(166, 202, 255, 0.14);
    background:
        linear-gradient(145deg, rgba(71, 111, 255, 0.18), rgba(126, 74, 255, 0.08)),
        rgba(255, 255, 255, 0.04);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
    transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

.register-check:hover .register-check-body,
.register-consent:hover .register-consent-body {
    transform: translateY(-1px);
    border-color: rgba(132, 203, 255, 0.34);
    box-shadow: 0 18px 32px rgba(4, 7, 32, 0.24);
}

.register-check-copy,
.register-consent-copy {
    display: grid;
    gap: 4px;
    overflow-wrap: anywhere;
}

.register-check-copy strong,
.register-consent-copy strong {
    color: #ffffff;
    font-size: 0.98rem;
}

.register-check-copy small,
.register-consent-copy small {
    color: rgba(218, 232, 255, 0.78);
    font-size: 0.82rem;
    line-height: 1.45;
}

.register-check-ui {
    width: 24px;
    height: 24px;
    border-radius: 8px;
    border: 1px solid rgba(180, 214, 255, 0.32);
    background: rgba(7, 10, 37, 0.62);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
    position: relative;
    transition: border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

.register-check-ui::after {
    content: "";
    position: absolute;
    inset: 5px;
    border-radius: 5px;
    background: linear-gradient(135deg, #40c7ff, #8e62ff);
    opacity: 0;
    transform: scale(0.65);
    transition: opacity 0.18s ease, transform 0.18s ease;
}

.register-check input:checked + .register-check-body,
.register-consent input:checked + .register-consent-body {
    border-color: rgba(84, 205, 255, 0.62);
    background:
        radial-gradient(circle at top right, rgba(102, 237, 255, 0.22), transparent 45%),
        linear-gradient(145deg, rgba(60, 125, 255, 0.24), rgba(159, 70, 255, 0.14)),
        rgba(255, 255, 255, 0.06);
    box-shadow: 0 20px 34px rgba(3, 9, 33, 0.28);
}

.register-check input:checked + .register-check-body .register-check-ui,
.register-consent input:checked + .register-consent-body .register-check-ui {
    border-color: rgba(95, 215, 255, 0.74);
    background: rgba(9, 26, 71, 0.92);
    box-shadow: 0 0 0 4px rgba(64, 199, 255, 0.12);
}

.register-check input:checked + .register-check-body .register-check-ui::after,
.register-consent input:checked + .register-consent-body .register-check-ui::after {
    opacity: 1;
    transform: scale(1);
}

.register-consent {
    display: block;
    cursor: pointer;
}

.register-consent-body {
    align-items: start;
}

.register-consent-body .register-check-ui {
    margin-top: 2px;
}

label {
    display: grid;
    gap: 8px;
    font-weight: 700;
    color: #f1eeff;
}

input,
textarea,
select {
    width: 100%;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    padding: 12px 14px;
    background: rgba(255, 255, 255, 0.08);
    color: var(--text);
}

select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    padding-right: 44px;
    background-image:
        linear-gradient(45deg, transparent 50%, rgba(255, 255, 255, 0.72) 50%),
        linear-gradient(135deg, rgba(255, 255, 255, 0.72) 50%, transparent 50%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.02));
    background-position:
        calc(100% - 19px) calc(50% - 2px),
        calc(100% - 13px) calc(50% - 2px),
        0 0;
    background-size:
        6px 6px,
        6px 6px,
        100% 100%;
    background-repeat: no-repeat;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.05),
        0 16px 28px rgba(4, 7, 32, 0.12);
}

input:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: rgba(95, 215, 255, 0.68);
    box-shadow:
        0 0 0 4px rgba(64, 199, 255, 0.12),
        0 18px 34px rgba(4, 7, 32, 0.24);
}

select option {
    color: #111;
}

.app-shell {
    display: grid;
    grid-template-columns: 308px 1fr;
}

.sidebar {
    position: sticky;
    top: 0;
    height: 100vh;
    padding: 20px 16px;
    border-right: 1px solid rgba(255, 255, 255, 0.08);
    background: linear-gradient(180deg, rgba(17, 12, 66, 0.94), rgba(9, 7, 39, 0.98));
    z-index: 30;
}

.sidebar-brand {
    display: grid;
    grid-template-columns: auto 1fr;
    align-items: center;
    gap: 12px;
    margin-bottom: 22px;
    text-align: left;
}

.sidebar-brand strong,
.sidebar-brand small {
    display: block;
    overflow-wrap: anywhere;
}

.brand-mark {
    width: 64px;
    height: 64px;
    border-radius: 18px;
    object-fit: cover;
    box-shadow: 0 18px 48px rgba(10, 6, 38, 0.42);
}

.sidebar-nav {
    display: grid;
    gap: 10px;
}

.sidebar-nav a {
    min-height: 46px;
    display: flex;
    align-items: center;
    border-radius: 16px;
    color: var(--muted);
    background: rgba(255, 255, 255, 0.03);
    font-size: 0.95rem;
    padding: 0 14px;
    text-align: left;
}

.sidebar-nav a.active,
.sidebar-nav a:hover {
    background: linear-gradient(135deg, rgba(31, 143, 255, 0.2), rgba(255, 70, 208, 0.12));
    color: var(--text);
}

.sidebar-logout {
    margin-top: 18px;
}

.sidebar-backdrop {
    display: none;
}

.workspace {
    padding: 22px;
    min-width: 0;
}

.workspace-header {
    display: grid;
    grid-template-columns: auto 1fr auto auto;
    align-items: center;
    gap: 18px;
    margin-bottom: 18px;
}

.workspace-header h1 {
    margin: 0;
    font-size: clamp(2rem, 3vw, 3.4rem);
    line-height: 0.96;
    overflow-wrap: anywhere;
}

.menu-toggle {
    display: none;
    border-radius: 14px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.06);
    color: var(--text);
    padding: 10px 14px;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    justify-self: end;
}

.install-app-button,
.notification-trigger {
    min-height: 44px;
    border-radius: 14px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.06);
    color: var(--text);
    padding: 10px 14px;
}

.install-app-button {
    cursor: pointer;
}

.notification-shell {
    position: relative;
}

.notification-trigger {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}

.notification-trigger strong {
    min-width: 24px;
    height: 24px;
    border-radius: 999px;
    display: inline-grid;
    place-items: center;
    background: linear-gradient(135deg, var(--accent-pink), var(--accent-indigo));
    font-size: 0.76rem;
}

.notification-panel {
    position: absolute;
    top: calc(100% + 12px);
    right: 0;
    width: min(420px, calc(100vw - 32px));
    border-radius: 24px;
    border: 1px solid var(--line);
    background: linear-gradient(180deg, rgba(27, 19, 93, 0.97), rgba(11, 8, 39, 0.98));
    box-shadow: var(--shadow);
    padding: 18px;
    z-index: 25;
}

.notification-panel-head {
    display: flex;
    align-items: start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}

.notification-panel-head h3 {
    margin: 4px 0 0;
}

.notification-list {
    display: grid;
    gap: 12px;
    max-height: 440px;
    overflow-y: auto;
    padding-right: 2px;
}

.notification-item {
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.04);
    padding: 14px;
    display: grid;
    gap: 10px;
}

.notification-item.is-unread {
    border-color: rgba(95, 215, 255, 0.34);
    background: linear-gradient(180deg, rgba(29, 61, 122, 0.32), rgba(255, 255, 255, 0.05));
}

.notification-item-copy {
    display: grid;
    gap: 6px;
}

.notification-item-copy p,
.notification-item-copy small {
    margin: 0;
    color: var(--muted);
}

.notification-item-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.notification-tag {
    display: inline-flex;
    width: fit-content;
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    color: #d9fbff;
    font-size: 0.76rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 800;
}

.notification-empty {
    padding: 18px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.04);
    color: var(--muted);
}

.header-kpis {
    display: flex;
    gap: 12px;
}

.header-kpis div {
    min-width: 118px;
    padding: 12px 14px;
    border-radius: 18px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.05);
}

.header-kpis span {
    display: block;
    color: var(--muted);
    font-size: 0.8rem;
}

.header-kpis strong {
    display: block;
    margin-top: 4px;
    font-size: 1.35rem;
}

.workspace-header .muted {
    max-width: 64ch;
    overflow-wrap: anywhere;
}

.top-tabs {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding: 0 0 12px;
    margin-bottom: 14px;
    scrollbar-width: thin;
}

.top-tabs a {
    white-space: nowrap;
    border-radius: 999px;
    padding: 10px 14px;
    border: 1px solid var(--line);
    color: var(--muted);
    background: rgba(255, 255, 255, 0.04);
}

.top-tabs a.active {
    color: var(--text);
    background: linear-gradient(135deg, rgba(31, 143, 255, 0.26), rgba(255, 70, 208, 0.18));
}

.alert {
    padding: 14px 16px;
    border-radius: 18px;
    margin-bottom: 18px;
}

.alert.success { color: var(--success); }
.alert.error { color: var(--error); }
.alert.info { color: var(--info); }

.kpi-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 18px;
}

.kpi-card {
    padding: 20px;
    border-radius: 24px;
    overflow: hidden;
    position: relative;
}

.kpi-card::after {
    content: "";
    position: absolute;
    inset: auto -20px -20px auto;
    width: 140px;
    height: 140px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.12);
    filter: blur(4px);
}

.kpi-card span,
.kpi-card small {
    position: relative;
    z-index: 1;
}

.kpi-card strong {
    position: relative;
    z-index: 1;
    display: block;
    margin: 10px 0 8px;
    font-size: clamp(2rem, 3.4vw, 3.1rem);
}

.kpi-blue { background: linear-gradient(135deg, #1888f9, #4b56d8); }
.kpi-teal { background: linear-gradient(135deg, #04cfb8, #1873c9); }
.kpi-pink { background: linear-gradient(135deg, #ff41d3, #8b39ff); }
.kpi-indigo { background: linear-gradient(135deg, #5147ff, #233e95); }

.dashboard-grid {
    display: grid;
    grid-template-columns: 1.25fr 0.75fr;
    gap: 16px;
    margin-bottom: 18px;
}

.wide-panel {
    grid-column: 1 / -1;
}

.panel {
    border-radius: 26px;
    padding: 20px;
    min-width: 0;
}

.record-grid,
.admin-list {
    display: grid;
    gap: 14px;
    margin-top: 16px;
}

.record-card {
    border: 1px solid var(--line);
    background: linear-gradient(180deg, rgba(38, 27, 122, 0.72), rgba(17, 12, 63, 0.76));
    border-radius: 22px;
    padding: 16px;
}

.record-card.compact {
    display: grid;
    gap: 6px;
}

.record-card summary {
    cursor: pointer;
    display: grid;
    gap: 6px;
    list-style: none;
}

.record-card summary::-webkit-details-marker {
    display: none;
}

.record-card span,
.record-card small {
    color: var(--muted);
    overflow-wrap: anywhere;
}

.detail-form {
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.form-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.settings-spacer {
    margin-top: 22px;
}

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

.panel-head {
    display: flex;
    align-items: start;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 16px;
}

.chart-panel {
    overflow: hidden;
}

.trend-lines {
    height: 140px;
    position: relative;
    margin-bottom: 10px;
    border-radius: 18px;
    background:
        linear-gradient(180deg, rgba(255,255,255,0.08), rgba(255,255,255,0.01)),
        linear-gradient(0deg, rgba(255,255,255,0.05), rgba(255,255,255,0.02));
}

.trend-lines span {
    position: absolute;
    left: 6%;
    right: 6%;
    bottom: 18%;
    height: 2px;
    background: transparent;
    border-radius: 999px;
}

.trend-lines span:nth-child(1) {
    bottom: 30%;
    background: linear-gradient(90deg, transparent, #84f9ff 6%, #84f9ff 35%, #fff 48%, #fff 58%, transparent 100%);
    transform: skewY(-9deg);
}

.trend-lines span:nth-child(2) {
    bottom: 46%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.18) 10%, rgba(255,255,255,0.4) 60%, transparent);
    transform: skewY(8deg);
}

.trend-lines span:nth-child(3) {
    bottom: 12%;
    background: linear-gradient(90deg, rgba(255,255,255,0.12), rgba(255,255,255,0.55), rgba(255,255,255,0.12));
    transform: skewY(-4deg);
}

.metric-list {
    display: grid;
    gap: 10px;
}

.metric-list div {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.metric-list.featured strong {
    font-size: 1.4rem;
}

.scope-mini-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin-top: 18px;
}

.scope-mini-grid div {
    border-radius: 18px;
    padding: 14px;
    background: rgba(255, 255, 255, 0.05);
}

.scope-mini-grid span {
    display: block;
    color: var(--muted);
}

.scope-mini-grid strong {
    display: block;
    margin-top: 6px;
    font-size: clamp(1rem, 2vw, 1.3rem);
    line-height: 1.15;
    overflow-wrap: anywhere;
}

.scope-mini-grid div {
    min-width: 0;
}

.calendar-panel {
    padding-bottom: 24px;
}

.calendar-head {
    align-items: end;
}

.calendar-note {
    margin: 0;
    max-width: 34ch;
    color: var(--muted);
    text-align: right;
}

.calendar-shell {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(320px, 0.8fr);
    gap: 18px;
    align-items: start;
}

.calendar-board,
.calendar-inspector {
    min-width: 0;
}

.calendar-toolbar {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: center;
    margin-bottom: 18px;
}

.calendar-toolbar-group {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.calendar-nav {
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.05);
    color: var(--text);
    border-radius: 999px;
    padding: 10px 14px;
    cursor: pointer;
    transition: transform 0.18s ease, background 0.18s ease;
}

.calendar-nav:hover {
    transform: translateY(-1px);
    background: rgba(255, 255, 255, 0.1);
}

.calendar-toolbar-copy {
    display: grid;
    justify-items: end;
    gap: 4px;
    text-align: right;
}

.calendar-toolbar-copy strong {
    font-size: clamp(1.3rem, 2vw, 1.8rem);
}

.calendar-toolbar-copy span {
    color: var(--muted);
}

.calendar-weekdays {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 10px;
}

.calendar-weekdays span {
    padding: 0 8px 8px;
    color: #aeadde;
    font-size: 0.84rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 10px;
}

.calendar-day {
    position: relative;
    min-height: 108px;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: linear-gradient(180deg, rgba(26, 18, 84, 0.9), rgba(13, 10, 45, 0.95));
    padding: 14px 12px;
    text-align: left;
    color: var(--text);
    cursor: pointer;
    transition: transform 0.16s ease, border-color 0.16s ease, background 0.16s ease;
}

.calendar-day:hover {
    transform: translateY(-2px);
    border-color: rgba(138, 197, 255, 0.38);
}

.calendar-day.is-outside {
    opacity: 0.4;
}

.calendar-day.is-today {
    border-color: rgba(95, 242, 163, 0.55);
}

.calendar-day.is-selected {
    background: linear-gradient(180deg, rgba(53, 31, 154, 0.96), rgba(28, 20, 88, 0.98));
    border-color: rgba(255, 255, 255, 0.25);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.calendar-day-top {
    display: flex;
    justify-content: space-between;
    align-items: start;
    gap: 8px;
    margin-bottom: 12px;
}

.calendar-day-number {
    font-size: 1.08rem;
    font-weight: 800;
}

.calendar-day-count {
    min-width: 28px;
    height: 28px;
    border-radius: 999px;
    display: inline-grid;
    place-items: center;
    background: rgba(255, 255, 255, 0.1);
    color: #d9fbff;
    font-size: 0.82rem;
}

.calendar-day-list {
    display: grid;
    gap: 8px;
}

.calendar-day-item {
    display: grid;
    gap: 2px;
}

.calendar-day-item strong,
.calendar-day-item span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.calendar-day-item strong {
    font-size: 0.88rem;
}

.calendar-day-item span {
    color: var(--muted);
    font-size: 0.78rem;
}

.calendar-inspector {
    border-left: 1px solid rgba(255, 255, 255, 0.08);
    padding-left: 18px;
}

.calendar-inspector-head {
    margin-bottom: 16px;
}

.calendar-inspector-head h3 {
    margin: 6px 0 0;
    font-size: clamp(1.25rem, 2vw, 1.7rem);
}

.calendar-inspector-list {
    display: grid;
    gap: 12px;
}

.calendar-event-card {
    padding: 16px;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.04);
    display: grid;
    gap: 8px;
}

.calendar-event-card strong,
.calendar-event-card span,
.calendar-event-card small,
.calendar-event-card p {
    overflow-wrap: anywhere;
}

.calendar-event-card span,
.calendar-event-card small {
    color: var(--muted);
}

.calendar-event-card p {
    margin: 0;
    color: #ece9ff;
}

.calendar-empty {
    padding: 18px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.04);
    color: var(--muted);
}

.split {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 18px;
}

.inline-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.table-wrap {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th,
td {
    padding: 12px 10px;
    text-align: left;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    vertical-align: top;
}

th {
    color: #d6d1ff;
    font-size: 0.84rem;
}

.chips span {
    padding: 10px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
}

.checkboxes label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
}

.inline-form {
    display: flex;
    gap: 8px;
    align-items: center;
}

.mobile-cards {
    display: none;
    gap: 12px;
    margin-top: 14px;
    flex-direction: column;
}

.mobile-card {
    padding: 16px;
    border-radius: 18px;
    display: grid;
    gap: 6px;
}

.mobile-card strong {
    font-size: 1rem;
}

.mobile-card span,
.mobile-card small {
    color: var(--muted);
}

.attendance-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.attendance-card {
    padding: 14px;
    border-radius: 18px;
    display: grid;
    gap: 10px;
}

@media (max-width: 1180px) {
    .kpi-grid,
    .dashboard-grid,
    .split {
        grid-template-columns: 1fr;
    }

    .calendar-shell {
        grid-template-columns: 1fr;
    }

    .calendar-inspector {
        border-left: 0;
        border-top: 1px solid rgba(255, 255, 255, 0.08);
        padding-left: 0;
        padding-top: 18px;
    }
}

@media (max-width: 920px) {
    body.sidebar-open {
        overflow: hidden;
    }

    .hero {
        grid-template-columns: 1fr;
    }

    .app-shell {
        grid-template-columns: 1fr;
    }

    .sidebar {
        position: fixed;
        inset: 0 auto 0 0;
        width: min(88vw, 340px);
        transform: translateX(-100%);
        transition: transform 0.28s ease;
        z-index: 40;
        height: 100dvh;
        overflow-y: auto;
    }

    .sidebar.is-open {
        transform: translateX(0);
    }

    .sidebar-backdrop {
        display: block;
        position: fixed;
        inset: 0;
        border: 0;
        background: rgba(3, 2, 17, 0.62);
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.2s ease;
        z-index: 35;
    }

    .sidebar-backdrop.is-visible {
        opacity: 1;
        pointer-events: auto;
    }

    .sidebar-nav a {
        padding: 12px 14px;
        font-size: 0.92rem;
    }

    .menu-toggle {
        display: inline-flex;
    }

    .workspace {
        padding: 16px;
    }

    .workspace-header {
        grid-template-columns: auto 1fr;
        align-items: start;
    }

    .header-actions,
    .header-kpis {
        grid-column: 1 / -1;
        justify-self: stretch;
    }

    .header-actions {
        flex-wrap: wrap;
    }

    .notification-panel {
        position: static;
        width: 100%;
        margin-top: 10px;
    }

    .header-kpis {
        overflow-x: auto;
        padding-bottom: 2px;
    }

    .top-tabs {
        padding-bottom: 4px;
    }

    .form-actions {
        flex-direction: column;
    }

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

    .calendar-head,
    .calendar-toolbar {
        flex-direction: column;
        align-items: start;
    }

    .calendar-note,
    .calendar-toolbar-copy {
        text-align: left;
        justify-items: start;
    }
}

@media (max-width: 720px) {
    .landing-header {
        flex-direction: column;
        gap: 14px;
    }

    .landing-header nav {
        flex-wrap: wrap;
        justify-content: center;
    }

    .auth-panel,
    .panel,
    .kpi-card,
    .poster {
        border-radius: 22px;
    }

    .workspace-header h1 {
        font-size: 2.15rem;
    }

    .kpi-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .inline-grid,
    .attendance-grid,
    .scope-mini-grid,
    .register-ministry-list {
        grid-template-columns: 1fr;
    }

    .calendar-grid {
        gap: 8px;
    }

    .calendar-day {
        min-height: 86px;
        padding: 12px 10px;
        border-radius: 18px;
    }

    .calendar-day-item:nth-child(n+2) {
        display: none;
    }

    .calendar-weekdays span {
        font-size: 0.72rem;
        padding-bottom: 4px;
    }

    .desktop-table {
        display: none;
    }

    .mobile-cards {
        display: flex;
    }

    .top-tabs {
        margin-left: -4px;
        margin-right: -4px;
        padding-left: 4px;
        padding-right: 4px;
    }

    .header-kpis div {
        min-width: 140px;
    }
}
