:root {
    --cal-navy: #1a365d;
    --cal-gold: #c9a227;
    --nav-bg: #0f2744;
}

.app-body {
    background: linear-gradient(160deg, #eef4fb 0%, #f8f9fc 45%, #e8eef5 100%);
    min-height: 100vh;
}

.app-nav {
    background: var(--nav-bg);
}

.login-body {
    background: radial-gradient(circle at 20% 20%, #3b82f6 0%, #0f2744 55%, #0a1628 100%);
}

.login-card {
    width: min(100%, 22rem);
    border-radius: 1rem;
}

.swatch, .dot {
    display: inline-block;
    width: 1.1rem;
    height: 1.1rem;
    border-radius: 0.25rem;
    vertical-align: middle;
    border: 1px solid rgba(0, 0, 0, 0.12);
}

.dot {
    width: 0.55rem;
    height: 0.55rem;
    border-radius: 50%;
    margin-right: 0.35rem;
}

.config-preview {
    max-height: 120px;
    border-radius: 0.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}

.config-preview--round {
    width: 72px;
    height: 72px;
    object-fit: cover;
    border-radius: 50%;
}

.cal-sheet {
    position: relative;
    border-radius: 1rem;
    overflow: hidden;
    background: #fff;
    padding: 1.25rem 1.5rem 1.5rem;
    max-width: 920px;
    margin: 0 auto;
}

.cal-sheet::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: var(--cal-bg-image, linear-gradient(180deg, rgba(186, 230, 253, 0.35), rgba(255, 255, 255, 0.9)));
    background-size: cover;
    background-position: center top;
    opacity: 0.55;
    pointer-events: none;
    z-index: 0;
}

.cal-sheet > * {
    position: relative;
    z-index: 1;
}

.cal-sheet-header {
    display: flex;
    gap: 1rem;
    align-items: center;
    margin-bottom: 1rem;
}

.cal-illus {
    width: 88px;
    height: 88px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #fff;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.15);
}

.cal-illus-placeholder {
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, #bae6fd, #e0f2fe);
    font-size: 1.75rem;
    color: var(--cal-navy);
}

.cal-title {
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    color: var(--cal-navy);
}

.cal-month {
    font-size: clamp(1.35rem, 3vw, 1.85rem);
    font-weight: 700;
    color: var(--cal-gold);
    margin: 0;
}

.cal-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
}

.cal-dow {
    text-align: center;
    font-size: 0.72rem;
    font-weight: 600;
    color: #475569;
    padding: 0.35rem 0;
}

.cal-day {
    border: 1px solid rgba(15, 39, 68, 0.12);
    background: rgba(255, 255, 255, 0.85);
    min-height: 3.1rem;
    border-radius: 0.35rem;
    padding: 0.25rem;
    transition: transform 0.18s ease, box-shadow 0.18s ease;
    cursor: default;
}

.cal-day--empty {
    background: rgba(148, 163, 184, 0.25);
    border-color: transparent;
}

.cal-day--active {
    cursor: pointer;
}

.cal-day--active:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(15, 39, 68, 0.12);
}

.cal-day.has-session {
    color: #fff;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
    font-weight: 600;
}

.cal-day.is-picking {
    animation: pulse-day 0.45s ease;
}

@keyframes pulse-day {
    0% { transform: scale(1); }
    50% { transform: scale(1.06); }
    100% { transform: scale(1); }
}

.cal-day-num {
    font-size: 0.95rem;
}

.cal-sheet-footer {
    display: grid;
    grid-template-columns: 1fr minmax(160px, 220px);
    gap: 1.25rem;
    margin-top: 1.25rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(15, 39, 68, 0.1);
}

.cal-legend-title,
.cal-moon-title {
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: var(--cal-navy);
}

.cal-legend-row {
    display: grid;
    grid-template-columns: 1.25rem auto 1fr;
    gap: 0.5rem;
    align-items: center;
    margin-bottom: 0.35rem;
    font-size: 0.8rem;
}

.cal-legend-swatch {
    width: 100%;
    height: 1rem;
    border-radius: 2px;
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.cal-legend-label {
    background: rgba(241, 245, 249, 0.9);
    padding: 0.15rem 0.4rem;
    border-radius: 2px;
}

.cal-moon {
    background: rgba(255, 255, 255, 0.75);
    border-radius: 0.75rem;
    padding: 0.75rem 1rem;
    border: 1px solid rgba(15, 39, 68, 0.08);
}

.cal-moon-icon {
    font-size: 1.5rem;
    line-height: 1;
    margin-bottom: 0.25rem;
}

.cal-signature {
    text-align: right;
    font-style: italic;
    margin: 0.75rem 0 0;
    color: #64748b;
    font-size: 0.9rem;
}

.tipo-chip {
    border: 2px solid var(--chip-color);
    background: color-mix(in srgb, var(--chip-color) 18%, white);
    color: #1e293b;
    border-radius: 2rem;
    padding: 0.45rem 0.9rem;
    font-size: 0.85rem;
    font-weight: 600;
    transition: transform 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.tipo-chip:hover {
    transform: scale(1.04);
    background: var(--chip-color);
    color: #fff;
    box-shadow: 0 4px 14px color-mix(in srgb, var(--chip-color) 50%, transparent);
}

.tipo-chip.is-loading {
    opacity: 0.6;
    pointer-events: none;
}

.cal-mini-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
    font-size: 0.65rem;
}

.cal-mini-dow {
    text-align: center;
    font-weight: 700;
    color: #94a3b8;
}

.cal-mini-day {
    text-align: center;
    border-radius: 2px;
    min-height: 1.35rem;
    line-height: 1.35rem;
    border: 1px solid rgba(0, 0, 0, 0.06);
}

.cal-mini-day.empty {
    background: #e2e8f0;
}

@media (max-width: 768px) {
    .cal-sheet-footer {
        grid-template-columns: 1fr;
    }
}
