/* ==========================================================================
   Architectural Ledger - Core Styles (Stitch Design System)
   ========================================================================== */

body {
    background-color: var(--sol-surface) !important;
    background-image: none !important;
    font-family: var(--sol-font-family);
    color: var(--sol-on-surface);
}

body::before {
    display: none !important; /* Remove legacy blurred background */
}

.section {
    padding: 3rem 0;
}

.section-hero {
    padding: 5rem 0;
}

/* --------------------------------------------------------------------------
   THE HARD-EDGE RULE (0px Radius)
   -------------------------------------------------------------------------- */
.card, .btn, .form-control, .form-select, .badge, .alert, .modal-content, 
.nav-pills .nav-link, .rounded, .rounded-3, .rounded-pill, 
.rounded-circle {
    border-radius: var(--sol-radius-base) !important;
}

/* --------------------------------------------------------------------------
   TONAL LAYERING & SURFACES (No-Line Rule)
   -------------------------------------------------------------------------- */
.card {
    background-color: var(--sol-surface-container-lowest) !important;
    border: var(--sol-ghost-border) !important;
    box-shadow: none !important;
}

.bg-light, .bg-white {
    background-color: var(--sol-surface-container-low) !important;
}

/* Custom shadow utility for ambient depth (used sparingly) */
.shadow-soft, .shadow-sm {
    box-shadow: var(--sol-shadow-soft) !important;
}

/* --------------------------------------------------------------------------
   COMPONENTS
   -------------------------------------------------------------------------- */

/* Buttons */
.btn {
    font-weight: 500;
    padding: 0.875rem 1.5rem;
    letter-spacing: 0.02em;
    border: none;
    transition: background-color 0.2s ease;
}

.btn-primary {
    background-color: var(--sol-primary) !important;
    color: var(--sol-on-primary) !important;
}

.btn-primary:hover {
    background-color: var(--sol-primary-container) !important;
}

.google-btn {
    border: 1px solid var(--sol-outline-variant) !important;
    background-color: transparent !important;
    color: var(--sol-on-surface) !important;
}

/* Carbon Fluid Form Inputs */
.form-control, .form-select {
    background-color: var(--sol-surface-container-low) !important;
    color: var(--sol-on-surface) !important;
    border: none !important;
    border-bottom: 1px solid var(--sol-outline-variant) !important;
    padding: 1.5rem 1rem 0.5rem 1rem; /* Space for inner label */
    transition: border-bottom-color 0.2s ease, background-color 0.2s ease;
}

.form-control:focus, .form-select:focus {
    background-color: var(--sol-surface-container-high) !important;
    border-bottom: 2px solid var(--sol-primary) !important;
    box-shadow: none !important;
    outline: none !important;
}

/* Label styling to look like Carbon Fluid inputs */
.form-label {
    position: absolute;
    top: 0.5rem;
    left: 1rem;
    font-size: 0.75rem !important;
    color: var(--sol-on-surface);
    opacity: 0.7;
    z-index: 5;
    pointer-events: none;
    font-weight: 500;
}

.mb-3, .mb-4 {
    /* Since labels are absolute inside inputs, we must ensure parent is relative */
    position: relative;
}

/* --------------------------------------------------------------------------
   GLASSMORPHISM
   -------------------------------------------------------------------------- */
.glass-panel {
    background-color: rgba(252, 249, 248, 0.8) !important; /* surface @ 80% */
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border-bottom: var(--sol-ghost-border);
}

/* --------------------------------------------------------------------------
   LOADER OVERLAY
   -------------------------------------------------------------------------- */
.loader-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(252, 249, 248, 0.8);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.loader-overlay.active {
    opacity: 1;
    visibility: visible;
}

.spinner-custom {
    width: 3.5rem;
    height: 3.5rem;
    border: 4px solid var(--sol-surface-container-high);
    border-left-color: var(--sol-primary);
    border-radius: 50% !important; /* Spinner MUST remain circular */
    animation: spin 1s linear infinite;
}

@keyframes spin {
    100% { transform: rotate(360deg); }
}

.loader-text {
    margin-top: 1.5rem;
    font-weight: 500;
    font-size: 1.1rem;
    letter-spacing: 0.5px;
}