@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

:root {
    --bg-color: #0e0e10;
    --surface-color: #1a1a1e;
    --surface-hover: #222226;
    --primary-color: #8ab4f8;
    --primary-hover: #aecbfa;
    --text-color: #e3e3e8;
    --text-muted: #8e8e93;
    --accent-blue: #8ab4f8;
    --danger: #f28b82;
    --success: #81c995;
    --border-color: rgba(255, 255, 255, 0.06);
    --glow: rgba(138, 180, 248, 0.08);
}

*, *::before, *::after {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: #0e0e10 radial-gradient(circle at center, #151e36 0%, #0e0e10 75%) no-repeat center center fixed;
    color: var(--text-color);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    overflow-y: scroll;
    overscroll-behavior-y: none;
    -webkit-overflow-scrolling: touch;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
    font-weight: 400;
    letter-spacing: 0.01em;
    line-height: 1.6;
}

input, textarea, select {
    user-select: auto;
}

/* ── Navbar ── */
.navbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1.5rem;
    background-color: var(--bg-color);
    border-bottom: 1px solid var(--border-color);
}

.navbar .brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-color);
    letter-spacing: -0.02em;
}

.navbar .brand img {
    height: 32px;
    border-radius: 8px;
}

.navbar a {
    color: var(--text-muted);
    text-decoration: none;
    margin-left: 0.5rem;
    font-weight: 500;
    font-size: 0.875rem;
    transition: color 0.2s;
    background-color: transparent;
    padding: 0.5rem 0.75rem;
    border-radius: 20px;
    border: none;
}

.navbar a:hover {
    color: var(--text-color);
    background-color: var(--surface-color);
}

/* ── Layout ── */
.container {
    max-width: 800px;
    margin: 2rem auto;
    padding: 0 1rem;
    flex-grow: 1;
}

/* ── Card ── */
.card {
    background-color: var(--surface-color);
    border-radius: 16px;
    padding: 1.5rem;
    border: 1px solid var(--border-color);
    box-shadow: none;
}

h1, h2, h3 {
    margin-top: 0;
    font-weight: 600;
    letter-spacing: -0.02em;
}

h2 {
    font-size: 1.35rem;
    color: var(--text-color);
}

h3 {
    font-size: 1.1rem;
    color: var(--text-muted);
    font-weight: 500;
}

/* ── Buttons ── */
.btn {
    display: inline-block;
    background-color: var(--primary-color);
    color: #0e0e10;
    padding: 0.75rem 1.5rem;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: 'Inter', sans-serif;
    font-size: 0.95rem;
    text-align: center;
}

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

.btn:disabled {
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--text-muted);
    cursor: not-allowed;
    transform: none;
}

/* ── Forms ── */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-muted);
    font-size: 0.875rem;
}

.form-group input {
    width: 100%;
    padding: 0.75rem 1rem;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    background-color: var(--surface-color);
    color: var(--text-color);
    font-family: 'Inter', sans-serif;
    outline: none;
    transition: border-color 0.2s;
    box-sizing: border-box;
    font-size: 0.95rem;
}

.form-group input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px var(--glow);
}

/* ── Flash Messages ── */
.flash-messages {
    margin-bottom: 1rem;
}

.flash-message {
    padding: 0.75rem 1rem;
    background-color: rgba(242, 139, 130, 0.12);
    color: var(--danger);
    border-radius: 12px;
    margin-bottom: 0.5rem;
    border: 1px solid rgba(242, 139, 130, 0.15);
    font-size: 0.9rem;
}

/* ── Animations ── */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
}

.animate-fade-in {
    animation: fadeIn 0.35s ease-out forwards;
}

/* ── Calendar Wizard ── */
.wizard-steps {
    display: flex;
    justify-content: space-between;
    margin-bottom: 2rem;
    color: var(--text-muted);
    font-weight: 500;
    border-bottom: 1px solid var(--border-color);
    font-size: 0.875rem;
}

.wizard-step {
    padding-bottom: 0.75rem;
    flex: 1;
    text-align: center;
    transition: color 0.2s;
}

.wizard-step.active {
    color: var(--primary-color);
    border-bottom: 2px solid var(--primary-color);
}

.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.calendar-month-year {
    font-weight: 600;
    font-size: 1rem;
    color: var(--text-color);
}

.icon-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 8px;
    transition: all 0.2s;
}

.icon-btn:hover {
    color: var(--text-color);
    background-color: var(--surface-hover);
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 0.5rem 0;
    margin-bottom: 2rem;
}

.calendar-day-header {
    text-align: center;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.calendar-day {
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: transparent;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    font-weight: 400;
    transition: all 0.15s;
    user-select: none;
    font-size: 0.95rem;
    width: 40px;
    height: 40px;
    margin: 0 auto;
    color: var(--text-color);
    touch-action: manipulation;
}

.calendar-day:hover {
    background-color: var(--surface-hover);
}

.calendar-day.other-month {
    color: #333338;
}

.calendar-day.blocked {
    background-color: var(--danger);
    color: white;
}

.calendar-day.holiday {
    background-color: #fdd663;
    color: #0e0e10;
}

.calendar-day.preferred {
    background-color: rgba(138, 180, 248, 0.15);
    color: var(--accent-blue);
}

.calendar-day.preferred-work {
    background-color: rgba(129, 201, 149, 0.15);
    color: var(--success);
}

.status-text {
    text-align: center;
    margin-bottom: 1.5rem;
    font-weight: 500;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.wizard-actions {
    display: flex;
    justify-content: space-between;
}

/* ── Responsive ── */
@media (max-width: 768px) {
    .navbar {
        padding: 0.75rem 1rem;
        flex-direction: column;
        gap: 0.75rem;
    }
    .navbar .nav-links {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 0.5rem;
    }
    .navbar a {
        margin-left: 0;
        padding: 0.25rem 0.5rem;
    }
    .card {
        padding: 1rem;
        border-radius: 12px;
    }
    .calendar-grid {
        gap: 0.25rem 0;
        margin-bottom: 1.5rem;
    }
    .calendar-day {
        width: 35px;
        height: 35px;
        font-size: 0.9rem;
    }
    .btn {
        padding: 0.6rem 1rem;
        font-size: 0.95rem;
    }
    .container {
        padding: 0 1rem;
        margin: 1.5rem auto;
    }
}
