/* =========================================
   Base
   ========================================= */

html {
    font-size: 16px;
    position: relative;
    min-height: 100%;
}

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background-color: #F8FAFC;
    color: #1a202c;
    line-height: 1.6;
    padding-top: 0;
    padding-bottom: 60px;
    margin-bottom: 0;
}

/* =========================================
   Navbar
   ========================================= */

.ymca-navbar {
    background: #0f172a;
    border-bottom: none;
    box-shadow: none;
    padding-top: 10px;
    padding-bottom: 10px;
}

.navbar-logo-ymca {
    height: 72px;
    display: block;
}

.navbar-logo-br {
    height: 44px;
    opacity: 0.85;
    display: block;
}

.navbar-logo-divider {
    width: 1px;
    height: 44px;
    background: rgba(255,255,255,0.18);
    flex-shrink: 0;
}

.navbar-tagline {
    font-size: 1.05rem;
    color: #94a3b8;
    font-weight: 400;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    white-space: nowrap;
    pointer-events: none;
}

.ymca-navbar .nav-link {
    color: #94a3b8 !important;
    font-weight: 500;
    font-size: 0.85rem;
    padding: 6px 12px !important;
    border-radius: 6px;
    transition: background 0.15s, color 0.15s;
}

.ymca-navbar .nav-link:hover,
.ymca-navbar .nav-link:focus {
    color: #e2e8f0 !important;
    background: rgba(255,255,255,0.07);
}

.ymca-navbar .nav-join {
    background: white;
    color: #0f172a !important;
    border-radius: 50px;
    padding: 7px 18px !important;
    font-weight: 700;
    font-size: 0.85rem;
    transition: background 0.15s, transform 0.15s;
}

.ymca-navbar .nav-join:hover {
    background: #e2e8f0 !important;
    color: #0f172a !important;
    transform: translateY(-1px);
}

.ymca-navbar .nav-login {
    color: rgba(255,255,255,0.85) !important;
    border: 1.5px solid rgba(255,255,255,0.3);
    border-radius: 50px;
    padding: 6px 18px !important;
    font-weight: 600;
    font-size: 0.85rem;
    margin-left: 8px;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.ymca-navbar .nav-login:hover {
    background: rgba(255,255,255,0.1) !important;
    color: white !important;
    border-color: rgba(255,255,255,0.6) !important;
}

.ymca-navbar .dropdown-toggle {
    color: #94a3b8 !important;
}

.ymca-navbar .dropdown-menu {
    background: #1e293b;
    border: 1px solid rgba(255,255,255,0.08);
    box-shadow: 0 8px 32px rgba(0,0,0,0.4);
    border-radius: 12px;
    padding: 8px;
}

.ymca-navbar .dropdown-menu .dropdown-item {
    border-radius: 7px;
    font-size: 0.9rem;
    padding: 8px 14px;
    font-weight: 500;
    color: #cbd5e1;
}

.ymca-navbar .dropdown-menu .dropdown-item:hover {
    background: rgba(255,255,255,0.07);
    color: white;
}

.ymca-navbar .dropdown-divider {
    margin: 6px 0;
    border-color: rgba(255,255,255,0.08);
}

.ymca-navbar .navbar-toggler {
    border-color: rgba(255,255,255,0.2);
}

.ymca-navbar .navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28255,255,255,0.6%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

/* =========================================
   Footer
   ========================================= */

.ymca-footer {
    background-color: #003F87;
    color: rgba(255, 255, 255, 0.75);
    font-size: 0.82rem;
    padding: 12px 0;
    font-weight: 500;
}

.ymca-footer .footer-link {
    color: rgba(255, 255, 255, 0.6);
    text-decoration: none;
    transition: color 0.15s;
}

.ymca-footer .footer-link:hover {
    color: #ffffff;
}

/* =========================================
   Typography
   ========================================= */

h1, h2, h3, h4, h5, h6 {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    font-weight: 700;
    letter-spacing: -0.01em;
}

small,
.form-text,
.text-muted {
    color: #555 !important;
}

/* =========================================
   Buttons
   ========================================= */

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus,
.form-control:focus, .form-check-input:focus {
    box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #003F87;
}

.btn-primary {
    background-color: #003F87;
    border-color: #003F87;
}

.btn-primary:hover {
    background-color: #002d63;
    border-color: #002d63;
}

.btn-danger {
    background-color: #E31837;
    border-color: #E31837;
}

.btn-danger:hover {
    background-color: #c0122e;
    border-color: #c0122e;
}

/* =========================================
   Forms — mobile-safe
   ========================================= */

@media (max-width: 768px) {
    input, select, textarea, .form-control {
        font-size: 16px !important;
    }

    .lookup-form .form-control {
        min-height: 48px;
        padding: 12px;
    }

    .lookup-form .btn {
        min-height: 48px;
        font-size: 16px;
    }
}

/* =========================================
   Cards & Surfaces
   ========================================= */

.card {
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    box-shadow: none;
}

/* =========================================
   Mobile layout
   ========================================= */

@media (max-width: 768px) {
    .emergency-block, footer {
        display: block !important;
        width: 100% !important;
    }

    .emergency-block {
        margin-bottom: 20px;
        padding: 0 15px;
    }
}

/* =========================================
   Admin — XML Preview (legacy page)
   ========================================= */

.xml-preview-container {
    min-height: 75vh;
}

.xml-preview-steps {
    width: 240px;
    flex-shrink: 0;
    border-right: 1px solid #e5e5e5;
    padding-right: 1rem;
}

.xml-preview-steps h6 {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #6c757d;
    margin: 0 0 1rem 0;
}

.xml-preview-steps ul {
    list-style: none;
    padding-left: 0;
    margin-bottom: 1.5rem;
}

.xml-preview-steps li {
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}

.xml-step-complete {
    color: #198754;
    font-weight: 600;
}

.xml-step-pending {
    color: #6c757d;
}

.xml-preview-document {
    padding-left: 2.5rem;
}

.xml-preview-document h4 {
    margin: 0 0 1rem 0;
    font-weight: 500;
}

.xml-preview {
    max-height: 75vh;
    overflow-y: auto;
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    padding: 1rem;
    font-family: Consolas, Menlo, Monaco, monospace;
    font-size: 13px;
    white-space: pre-wrap;
}

.steps-actions {
    margin-top: 1rem;
}
