/* ==========================================================================
   FUOYE Hostel System — Cozy Warm Botanical Design System
   ========================================================================== */

:root {
    --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-display: 'Fraunces', Georgia, serif;

    /* Warm Cozy Neutrals */
    --bg-canvas: #F9F6F0;
    --bg-surface: #FFFFFF;
    --bg-subtle: #F3EFE6;
    --bg-tint: #EDF5F0;
    --border-warm: #E6E0D3;
    --border-strong: #D5CCB8;

    /* Brand Botanical Greens & Warm Amber */
    --brand-900: #0C3B26;
    --brand-800: #114D32;
    --brand-700: #166542;
    --brand-600: #1E7E53;
    --brand-100: #DCF2E6;
    --brand-50: #F0FAF4;

    --accent-gold: #D97706;
    --accent-gold-bg: #FEF3C7;
    --accent-coral: #E11D48;

    /* Ink Typography */
    --ink-900: #1C2520;
    --ink-700: #3D4A42;
    --ink-500: #68756D;
    --ink-400: #8D9A91;

    /* Elevation & Radii */
    --radius-sm: 0.625rem;
    --radius-md: 1rem;
    --radius-lg: 1.375rem;
    --radius-xl: 1.75rem;
    --shadow-cozy: 0 4px 20px -2px rgba(28, 37, 32, 0.05), 0 2px 6px -1px rgba(28, 37, 32, 0.03);
    --shadow-float: 0 14px 34px -6px rgba(17, 77, 50, 0.10), 0 4px 12px -2px rgba(28, 37, 32, 0.05);
}

body {
    font-family: var(--font-sans);
    background-color: var(--bg-canvas);
    background-image:
        radial-gradient(at 12% 8%, rgba(22, 101, 66, 0.05) 0px, transparent 45%),
        radial-gradient(at 88% 12%, rgba(217, 119, 6, 0.05) 0px, transparent 40%);
    color: var(--ink-900);
    letter-spacing: -0.01em;
    line-height: 1.6;
}

h1, h2, h3, .font-display {
    font-family: var(--font-display);
    letter-spacing: -0.02em;
    color: var(--ink-900);
}

h4, h5, h6 {
    font-weight: 700;
    letter-spacing: -0.015em;
}

/* --------------------------------------------------------------------------
   Navigation Shell
   -------------------------------------------------------------------------- */
.cozy-navbar {
    background: rgba(255, 255, 255, 0.88);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--border-warm);
    padding: 0.75rem 0;
    position: sticky;
    top: 0;
    z-index: 1030;
}

.brand-mark {
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    text-decoration: none;
    color: var(--ink-900);
}

.brand-icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--brand-800), var(--brand-600));
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    box-shadow: 0 4px 12px rgba(22, 101, 66, 0.25);
}

.brand-title {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.15rem;
    line-height: 1.1;
    color: var(--ink-900);
}

.brand-subtitle {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--ink-500);
    font-weight: 600;
}

.cozy-navbar .nav-link {
    color: var(--ink-700);
    font-weight: 600;
    font-size: 0.9rem;
    padding: 0.5rem 0.9rem !important;
    border-radius: 999px;
    transition: all 0.18s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.cozy-navbar .nav-link:hover {
    color: var(--brand-800);
    background: var(--bg-subtle);
}

.cozy-navbar .nav-link.active {
    color: var(--brand-800);
    background: var(--brand-100);
}

.user-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    background: var(--bg-subtle);
    border: 1px solid var(--border-warm);
    padding: 0.3rem 0.75rem 0.3rem 0.35rem;
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--ink-700);
}

.avatar-circle {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--brand-800);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 700;
}

/* --------------------------------------------------------------------------
   Cards & Surfaces
   -------------------------------------------------------------------------- */
.card {
    background: var(--bg-surface);
    border: 1px solid var(--border-warm);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-cozy);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card-interactive:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-float);
}

.card-header {
    background: transparent;
    border-bottom: 1px solid var(--border-warm);
    padding: 1.1rem 1.35rem;
    font-weight: 700;
    color: var(--ink-900);
}

.card-body {
    padding: 1.35rem;
}

.cozy-panel {
    background: var(--bg-subtle);
    border: 1px solid var(--border-warm);
    border-radius: var(--radius-md);
    padding: 1rem 1.25rem;
}

/* --------------------------------------------------------------------------
   Hero & Banners
   -------------------------------------------------------------------------- */
.hero {
    background:
        radial-gradient(circle at 85% 20%, rgba(251, 191, 36, 0.22), transparent 45%),
        radial-gradient(circle at 15% 85%, rgba(52, 211, 153, 0.18), transparent 50%),
        linear-gradient(135deg, var(--brand-900) 0%, var(--brand-800) 55%, var(--brand-700) 100%);
    color: #fff;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-float);
    position: relative;
    overflow: hidden;
}

.hero h1, .hero h2, .hero .font-display {
    color: #fff;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.22);
    backdrop-filter: blur(8px);
    color: #fff;
    padding: 0.35rem 0.85rem;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 600;
}

.welcome-banner {
    background: linear-gradient(120deg, #FFFFFF 0%, #F1F8F4 100%);
    border: 1px solid var(--border-warm);
    border-radius: var(--radius-lg);
    padding: 1.5rem 1.75rem;
    box-shadow: var(--shadow-cozy);
}

/* --------------------------------------------------------------------------
   Stat Cards & Icons
   -------------------------------------------------------------------------- */
.stat-card {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius-lg);
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-float);
}

.stat-card .value {
    font-family: var(--font-display);
    font-size: 1.85rem;
    font-weight: 700;
    line-height: 1.15;
    margin-top: 0.35rem;
}

.stat-card .label {
    color: var(--ink-500);
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.icon-orb {
    width: 44px;
    height: 44px;
    border-radius: 13px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.orb-green { background: var(--brand-100); color: var(--brand-800); }
.orb-amber { background: #FEF3C7; color: #B45309; }
.orb-blue  { background: #DBEAFE; color: #1D4ED8; }
.orb-rose  { background: #FFE4E6; color: #BE123C; }
.orb-plum  { background: #F3E8FF; color: #6B21A8; }

/* --------------------------------------------------------------------------
   Buttons & Forms
   -------------------------------------------------------------------------- */
.btn {
    border-radius: var(--radius-sm);
    font-weight: 600;
    padding: 0.55rem 1.1rem;
    transition: all 0.18s ease;
}

.btn-sm {
    padding: 0.35rem 0.75rem;
    font-size: 0.82rem;
    border-radius: 0.5rem;
}

.btn-lg {
    padding: 0.75rem 1.45rem;
    border-radius: 0.85rem;
}

.btn-brand {
    background: linear-gradient(135deg, var(--brand-800), var(--brand-600));
    border: none;
    color: #fff;
    box-shadow: 0 4px 12px rgba(22, 101, 66, 0.22);
}

.btn-brand:hover, .btn-brand:focus {
    background: linear-gradient(135deg, var(--brand-900), var(--brand-700));
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(22, 101, 66, 0.3);
}

.btn-warm {
    background: var(--bg-subtle);
    border: 1px solid var(--border-warm);
    color: var(--ink-900);
}

.btn-warm:hover {
    background: var(--border-warm);
    color: var(--ink-900);
}

.form-control, .form-select {
    background-color: #FCFBF8;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-sm);
    padding: 0.6rem 0.85rem;
    color: var(--ink-900);
    transition: border-color 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}

.form-control:focus, .form-select:focus {
    background-color: #FFFFFF;
    border-color: var(--brand-600);
    box-shadow: 0 0 0 4px rgba(30, 126, 83, 0.12);
}

.form-label {
    font-weight: 600;
    font-size: 0.86rem;
    color: var(--ink-700);
    margin-bottom: 0.35rem;
}

/* --------------------------------------------------------------------------
   Block Selector Cards & Visual Bunk Meter
   -------------------------------------------------------------------------- */
.block-option {
    cursor: pointer;
    transition: all 0.2s ease;
    border: 2px solid var(--border-warm) !important;
    background: var(--bg-surface);
    position: relative;
}

.block-option:hover {
    border-color: var(--brand-600) !important;
    transform: translateY(-3px);
    box-shadow: var(--shadow-float);
}

.block-option.selected,
.block-option:has(input:checked) {
    border-color: var(--brand-700) !important;
    background: linear-gradient(180deg, #FFFFFF 0%, var(--brand-50) 100%);
    box-shadow: 0 0 0 4px rgba(22, 101, 66, 0.12), var(--shadow-float);
}

.block-option.full {
    background: #FAF8F4;
    opacity: 0.88;
}

.bunk-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.bunk-pill {
    width: 18px;
    height: 10px;
    border-radius: 4px;
    background: var(--brand-600);
    opacity: 0.85;
}

.bunk-pill.taken {
    background: var(--border-strong);
    opacity: 0.45;
}

/* --------------------------------------------------------------------------
   Student Application Journey Stepper
   -------------------------------------------------------------------------- */
.journey-stepper {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.journey-step {
    background: var(--bg-subtle);
    border: 1px solid var(--border-warm);
    border-radius: var(--radius-md);
    padding: 0.85rem 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--ink-500);
    font-size: 0.85rem;
    font-weight: 600;
}

.journey-step .step-dot {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: #fff;
    border: 1px solid var(--border-strong);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.8rem;
    flex-shrink: 0;
}

.journey-step.done {
    background: var(--brand-50);
    border-color: #B7E4C7;
    color: var(--brand-800);
}

.journey-step.done .step-dot {
    background: var(--brand-700);
    border-color: var(--brand-700);
    color: #fff;
}

.journey-step.active {
    background: #FFFBEB;
    border-color: #FDE68A;
    color: #92400E;
    box-shadow: var(--shadow-cozy);
}

.journey-step.active .step-dot {
    background: var(--accent-gold);
    border-color: var(--accent-gold);
    color: #fff;
}

@media (max-width: 767px) {
    .journey-stepper {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* --------------------------------------------------------------------------
   Badges, Tables, Progress & Alerts
   -------------------------------------------------------------------------- */
.badge {
    padding: 0.42em 0.78em;
    font-weight: 600;
    letter-spacing: 0.01em;
    border-radius: 999px;
}

.badge-cozy-pending   { background: #FEF3C7; color: #92400E; border: 1px solid #FDE68A; }
.badge-cozy-suggested { background: #E0F2FE; color: #075985; border: 1px solid #BAE6FD; }
.badge-cozy-awaiting  { background: #DBEAFE; color: #1E40AF; border: 1px solid #BFDBFE; }
.badge-cozy-paid      { background: #DCF2E6; color: #0C3B26; border: 1px solid #A7F3D0; }
.badge-cozy-rejected  { background: #FFE4E6; color: #9F1239; border: 1px solid #FECDD3; }
.badge-cozy-expired   { background: #FEE2E2; color: #991B1B; border: 1px solid #FECACA; }
.badge-cozy-neutral   { background: var(--bg-subtle); color: var(--ink-700); border: 1px solid var(--border-warm); }

.badge-gender-male    { background: #EFF6FF; color: #1D4ED8; border: 1px solid #BFDBFE; }
.badge-gender-female  { background: #FFF1F2; color: #BE123C; border: 1px solid #FECDD3; }
.badge-gender-mixed   { background: #F3E8FF; color: #6B21A8; border: 1px solid #E9D5FF; }

.table {
    --bs-table-bg: transparent;
    --bs-table-hover-bg: rgba(243, 239, 230, 0.55);
    border-color: var(--border-warm);
}

.table > thead > tr > th {
    background: var(--bg-subtle);
    color: var(--ink-500);
    font-size: 0.76rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0.85rem 1rem;
    border-bottom: 1px solid var(--border-warm);
}

.table > tbody > tr > td {
    padding: 0.9rem 1rem;
    vertical-align: middle;
    color: var(--ink-900);
}

.progress {
    background-color: var(--bg-subtle);
    border-radius: 999px;
    overflow: hidden;
}

.progress-bar {
    border-radius: 999px;
}

.alert {
    border-radius: var(--radius-md);
    border-width: 1px;
}

.countdown {
    font-variant-numeric: tabular-nums;
    font-weight: 800;
    background: rgba(255, 255, 255, 0.75);
    padding: 0.15rem 0.55rem;
    border-radius: 0.45rem;
    border: 1px solid rgba(0, 0, 0, 0.08);
}

.notes {
    white-space: pre-line;
    font-size: 0.86rem;
    background: var(--bg-subtle) !important;
    border-color: var(--border-warm) !important;
    border-radius: var(--radius-sm);
}

.boarding-pass {
    background: linear-gradient(135deg, #F0FAF4 0%, #FFFFFF 65%, #FEF3C7 100%);
    border: 1px solid #B7E4C7;
    border-radius: var(--radius-lg);
    padding: 1.35rem 1.5rem;
    position: relative;
}

.cozy-footer {
    background: rgba(255, 255, 255, 0.7);
    border-top: 1px solid var(--border-warm) !important;
}

@media print {
    nav, footer, .no-print { display: none !important; }
    body { background: #fff; }
    .card { box-shadow: none; border: 1px solid #ccc; }
}
