/* Official Federal Reserve Bank Corporate Light Style stylesheet */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
    --bg-main: #f8fafc;           /* Light blue-slate background */
    --bg-card: #ffffff;           /* Clean white card background */
    --border-color: #cbd5e1;      /* Crisp light border */
    --text-primary: #0f172a;      /* Dark slate primary text */
    --text-secondary: #475569;    /* Medium slate secondary text */
    --text-muted: #64748b;        /* Muted slate text */
    
    /* Official Federal Reserve color tokens */
    --accent-blue: #06c;          /* Classic Fed Blue */
    --accent-blue-hover: #036;    /* Dark Navy Blue */
    --accent-blue-light: #3472bf;  /* Bright active blue */
    --accent-blue-glow: rgba(0, 102, 204, 0.15);
    
    --accent-green: #388038;      /* Fed Green */
    --accent-green-hover: #04a004;/* Fed Light Green */
    --accent-green-glow: rgba(56, 128, 56, 0.15);
    
    --accent-red: #d4403a;        /* Fed Red */
    --accent-red-hover: #ef4444;
    
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
    
    --border-radius-sm: 6px;       /* Sleeker corners for corporate look */
    --border-radius-md: 8px;
    --border-radius-lg: 10px;
    
    --transition-smooth: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--bg-main);
    color: var(--text-primary);
    font-family: var(--font-sans);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}

/* Base Layout Container */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
    flex-grow: 1;
}

/* Header & Navigation */
header {
    background: rgba(36, 41, 50, 0.85); /* Official brand dark slate #242932 with opacity */
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-link {
    color: var(--text-primary);
    text-decoration: none;
    font-size: 1.25rem;
    font-weight: 800;
    letter-spacing: -0.025em;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.logo-icon {
    width: 28px;
    height: 28px;
    background: linear-gradient(135deg, var(--accent-blue), var(--accent-green));
    border-radius: 6px;
    display: inline-block;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    list-style: none;
}

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 400; /* Official menu weight 300/400 */
    text-transform: uppercase; /* Official style */
    letter-spacing: 0.05em;
    transition: var(--transition-smooth);
    padding: 0.5rem 0.75rem;
    border-radius: var(--border-radius-sm);
}

.nav-link:hover {
    color: #fff;
    background: var(--accent-blue-hover); /* Official hover background #036 */
}

.nav-link.active {
    color: #fff;
    background: var(--accent-blue); /* Official active background #06c */
}

.nav-link.admin-pill {
    background: rgba(56, 128, 56, 0.15);
    color: hsl(120, 39%, 75%);
    border: 1px solid rgba(56, 128, 56, 0.3);
}

.nav-link.admin-pill:hover {
    background: var(--accent-green);
    color: #fff;
}

/* User Profile Widget in Nav */
.user-menu {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.user-tag {
    font-size: 0.85rem;
    color: var(--text-secondary);
    background: rgba(255, 255, 255, 0.04);
    padding: 0.35rem 0.75rem;
    border-radius: 50px;
    border: 1px solid var(--border-color);
}

/* Clean Corporate Cards */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    padding: 2rem;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.04);
    margin-bottom: 2rem;
    transition: var(--transition-smooth);
}

.card:hover {
    border-color: #a5b4fc;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.06);
}

.card-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Typography & Layout Utilities */
h1 {
    font-size: 2.25rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    margin-bottom: 1.5rem;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

@media (max-width: 768px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-sans);
    font-size: 0.95rem;
    font-weight: 600;
    padding: 0.75rem 1.5rem;
    border-radius: var(--border-radius-md);
    border: none;
    cursor: pointer;
    transition: var(--transition-smooth);
    text-decoration: none;
    gap: 0.5rem;
}

.btn-primary {
    background: var(--accent-blue);
    color: #fff;
    box-shadow: 0 4px 14px var(--accent-blue-glow);
}

.btn-primary:hover {
    background: var(--accent-blue-hover);
    box-shadow: 0 6px 20px var(--accent-blue-glow);
    transform: translateY(-1px);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
}

.btn-success {
    background: var(--accent-green);
    color: #fff;
    box-shadow: 0 4px 14px var(--accent-green-glow);
}

.btn-success:hover {
    background: var(--accent-green-hover);
    box-shadow: 0 6px 20px var(--accent-green-glow);
    transform: translateY(-1px);
}

.btn-danger {
    background: var(--accent-red);
    color: #fff;
}

.btn-danger:hover {
    background: var(--accent-red-hover);
}

.btn-sm {
    padding: 0.4rem 0.8rem;
    font-size: 0.85rem;
    border-radius: var(--border-radius-sm);
}

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

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

.form-control {
    width: 100%;
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: var(--border-radius-md);
    padding: 0.75rem 1rem;
    color: var(--text-primary);
    font-family: var(--font-sans);
    font-size: 1rem;
    transition: var(--transition-smooth);
}

.form-control:focus {
    outline: none;
    border-color: var(--accent-blue);
    box-shadow: 0 0 0 3px var(--accent-blue-glow);
}

.form-control::placeholder {
    color: var(--text-muted);
}

.form-select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2394a3b8'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 1.25rem;
    padding-right: 2.5rem;
}

/* Custom Checkbox / Radio styling */
.form-check {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Tables */
.table-container {
    overflow-x: auto;
    border-radius: var(--border-radius-md);
    border: 1px solid var(--border-color);
    background: #ffffff;
}

tr.clickable-row {
    cursor: pointer;
    transition: var(--transition-smooth);
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95rem;
    text-align: left;
}

th {
    background: var(--accent-blue); /* Official Fed Table Header Background #06c */
    color: #fff;                     /* Official Table Header Text */
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 1rem;
    border-bottom: 2px solid rgba(0, 0, 0, 0.2);
}

td {
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-primary);
}

tr:last-child td {
    border-bottom: none;
}

tr:nth-child(even) td {
    background: rgba(255, 255, 255, 0.015); /* Alternating striped rows */
}

tr:hover td {
    background: rgba(206, 242, 206, 0.12); /* Official hover green #cef2ce in dark-theme opacity */
}

/* Balance Hero Display (Auth Deep Navy Style) */
.balance-hero {
    background: linear-gradient(135deg, #0e2354, #0a1625);
    border: 1px solid #1e293b;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem 2rem;
    text-align: center;
}

.balance-amount {
    font-size: 3.5rem;
    font-weight: 800;
    letter-spacing: -0.04em;
    color: #ffffff;
    margin: 1rem 0;
}

.balance-account-details {
    display: flex;
    gap: 1.5rem;
    color: #cbd5e1;
    font-size: 0.9rem;
    background: rgba(255, 255, 255, 0.08);
    padding: 0.5rem 1.25rem;
    border-radius: 50px;
    border: 1px solid rgba(255, 255, 255, 0.15);
}

/* Masked Account Reveal Toggle */
.account-reveal {
    background: none;
    border: none;
    color: var(--accent-blue);
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: underline;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

/* Transaction States & Indicators */
.tx-credit {
    color: var(--accent-green);
    font-weight: 600;
}

.tx-debit {
    color: var(--accent-red);
    font-weight: 600;
}

.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.6rem;
    font-size: 0.8rem;
    font-weight: 600;
    border-radius: 4px;
    text-transform: capitalize;
}

.badge-pending {
    background: rgba(234, 179, 8, 0.15);
    color: hsl(45, 93%, 65%);
    border: 1px solid rgba(234, 179, 8, 0.3);
}

.badge-completed {
    background: rgba(16, 185, 129, 0.15);
    color: hsl(142, 70%, 70%);
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.badge-cancelled {
    background: rgba(239, 68, 68, 0.15);
    color: hsl(350, 70%, 75%);
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.badge-requested {
    background: rgba(249, 115, 22, 0.15);
    color: hsl(25, 95%, 70%);
    border: 1px solid rgba(249, 115, 22, 0.3);
}

/* Flash Messages / Toasts */
.toast-container {
    position: fixed;
    top: 5.5rem;
    right: 1.5rem;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    pointer-events: none;
}

.toast {
    background: #ffffff;
    border: 1px solid #cbd5e1;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    padding: 1rem 1.25rem;
    border-radius: var(--border-radius-md);
    color: var(--text-primary);
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    pointer-events: auto;
    min-width: 300px;
    max-width: 450px;
    animation: slideIn 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.toast-success {
    border-left: 4px solid var(--accent-green);
}

.toast-error {
    border-left: 4px solid var(--accent-red);
}

.toast-warning {
    border-left: 4px solid hsl(45, 93%, 65%);
}

.toast-close {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    margin-left: auto;
}

/* Login Page Styling */
.login-body {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 1.5rem;
}

.login-card {
    width: 100%;
    max-width: 420px;
    padding: 2.5rem;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
}

.login-header {
    text-align: center;
    margin-bottom: 2rem;
}

.login-logo {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--accent-blue), var(--accent-green));
    border-radius: 12px;
    margin-bottom: 1rem;
}

/* Pagination show more button block */
.pagination-block {
    display: flex;
    justify-content: center;
    margin-top: 1.5rem;
}

/* PDF layout and printing stylesheet hooks */
@media print {
    body {
        background: #fff;
        color: #000;
    }
    .card {
        border: none;
        box-shadow: none;
        background: none;
        padding: 0;
    }
}
