/* ============================================
   Modern Customer Portal – Clean & Minimal
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&display=swap');

/* ─── Modern Variables ─── */
:root {
--primary: #60a5fa;
--primary-hover: #3b82f6;
--primary-soft: rgba(96, 165, 250, 0.1);

    /* Neutrals */
    --bg-body: #f8fafc;       /* Cool slate white */
    --bg-card: #ffffff;
    --text-main: #0f172a;     /* Almost black */
    --text-muted: #64748b;    /* Slate grey */
    --border-subtle: #e2e8f0; /* Light grey border */

    /* Effects */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-card: 0 10px 15px -3px rgba(0, 0, 0, 0.03), 0 4px 6px -2px rgba(0, 0, 0, 0.02);
    --shadow-hover: 0 20px 25px -5px rgba(0, 0, 0, 0.05), 0 10px 10px -5px rgba(0, 0, 0, 0.02);
    --radius: 16px;
}

/* ─── Global Layout ─── */
body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    /* Applying Outfit to body makes it look instantly more modern */
    font-family: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: var(--bg-body);
    color: var(--text-main);
    font-size: 0.95rem;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

main {
    flex: 1;
    padding-top: 2rem;
}

.footer {
    margin-top: auto;
    background: transparent; /* Removed solid background */
    border-top: 1px solid var(--border-subtle);
    padding: 2rem 0;
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* ─── Modern Cards ─── */
.card {
    background: var(--bg-card);
    border: 1px solid rgba(255,255,255,0.5); /* Glassy subtle border */
    border-radius: var(--radius);
    box-shadow: var(--shadow-card);
    margin-bottom: 2rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    overflow: hidden;
}

/* Optional: Slight lift on hover for interactive cards */
.card.interactive:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-hover);
}

.card-header {
    background: transparent; /* Removed grey/white bg */
    border-bottom: 1px solid var(--border-subtle);
    padding: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.card-header h3,
.card-header .card-title {
    margin: 0;
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--text-main);
}

.card-body {
    padding: 1.5rem;
}

/* ─── Clean Tables ─── */
.table-responsive {
    border-radius: calc(var(--radius) - 4px);
    /* No shadow on table div, let the card handle it */
}

.table {
    margin-bottom: 0;
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

.table thead th {
    background: #f9fafb; /* Very light grey, not blue */
    color: var(--text-muted);
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--border-subtle);
    border-top: none;
}

.table tbody td {
    padding: 1rem 1.5rem;
    vertical-align: middle;
    border-bottom: 1px solid var(--border-subtle);
    color: var(--text-main);
    font-size: 0.9rem;
    background: #fff;
    transition: background 0.15s;
}

/* Hover effect */
.table-hover tbody tr:hover td {
    background-color: #f8fafc;
}

/* Remove bottom border from last row */
.table tbody tr:last-child td {
    border-bottom: none;
}

/* ─── Modern Forms ─── */
.form-label {
    font-weight: 500;
    font-size: 0.9rem;
    color: var(--text-main);
    margin-bottom: 0.5rem;
}

.form-control,
.form-select {
    border-radius: 10px;
    border: 1px solid var(--border-subtle);
    background-color: #fff;
    font-size: 0.95rem;
    padding: 0.65rem 1rem;
    color: var(--text-main);
    transition: all 0.2s ease;
    box-shadow: var(--shadow-sm);
}

.form-control:focus,
.form-select:focus {
    border-color: var(--primary);
    background-color: #fff;
    box-shadow: 0 0 0 3px var(--primary-soft);
    outline: none;
}

/* ─── Buttons ─── */
.btn {
    border-radius: 10px;
    font-weight: 500;
    padding: 0.6rem 1.25rem;
    font-size: 0.95rem;
    letter-spacing: 0.01em;
    transition: all 0.2s ease;
    box-shadow: var(--shadow-sm);
    border: none;
}

.btn-primary {
    background-color: var(--primary);
    color: white;
}

.btn-primary:hover,
.btn-primary:focus {
    background-color: var(--primary-hover);
    transform: translateY(-1px);
    /* Update the shadow color to match the indigo */
    box-shadow: 0 4px 12px rgba(96, 165, 250, 0.3);
}

.btn-outline-primary {
    background: transparent;
    border: 1px solid var(--border-subtle);
    color: var(--text-main);
    box-shadow: none;
}

.btn-outline-primary:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: #fff;
}

/* ─── Alert/Banner Specific Layout ─── */
.alert {
    border-radius: 10px;
    padding: 1rem 1.25rem;
    font-size: 0.95rem;
    font-weight: 500;
    box-shadow: none; /* Flat look is more modern for banners */
}

/* ─── Badges & Status ─── */
/* ─── Badge Specific Layout ─── */
.badge {
    /* Remove the border from badges to keep them tiny and clean */
    border: none !important;
    padding: 0.5em 0.85em;
    font-weight: 600;
    letter-spacing: 0.01em;
}

/* Modern styling for "Primary" badge - using soft background */
.badge.bg-primary,
.badge-primary {
    background-color: var(--primary-soft) !important;
    color: var(--primary) !important;
}

.alert-success,
.badge.bg-success,
.badge-success {
    /* Very pale, cool mint background */
    background-color: #f0fdf4 !important;
    border: 1px solid #dcfce7;
    /* Deep, desaturated evergreen text */
    color: #166534 !important;
}

/* 2. Warning (Yellow) -> Soft Amber/Sand */
.alert-warning,
.badge.bg-warning,
.badge-warning {
    /* Very pale warm beige background */
    background-color: #fffbeb !important;
    border: 1px solid #fde68a;
    /* Deep amber/brown text (no neon yellow) */
    color: #92400e !important;
}

/* 3. Danger (Red) -> Soft Rose (Added for consistency) */
.alert-danger,
.badge.bg-danger,
.badge-danger {
    /* Pale rose background */
    background-color: #fef2f2 !important;
    border: 1px solid #fecaca;
    /* Dark red-clay text */
    color: #991b1b !important;
}


/* 4. Info (Blue) -> Soft Sky */
.alert-info,
.badge.bg-info,
.badge-info {
    background-color: #eff6ff !important;
    border: 1px solid #bfdbfe;
    color: #1e40af !important;
}
/* ─── Navbar / Brand ─── */
.navbar {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(12px); /* Glassmorphism effect */
    border-bottom: 1px solid var(--border-subtle);
    padding: 1rem 0;
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.25rem;
    color: var(--text-main);
    letter-spacing: -0.02em;
}

.navbar-brand img {
    height: 32px;
    width: auto;
}

/* ─── Links ─── */
a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}

a:hover {
    color: var(--primary-hover);
}

/* ─── Dashboard Icons ─── */
.card .bi, .card .fa {
    opacity: 1;
}
.text-primary-soft {
    color: var(--primary);
    background: var(--primary-soft);
    padding: 12px;
    border-radius: 12px;
}