:root {
    /* Professional Light Palette */
    --bg-gradient: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
    --glass-bg: rgba(255, 255, 255, 0.45);
    --glass-border: rgba(255, 255, 255, 0.6);
    --card-shadow: 0 8px 32px 0 rgba(15, 23, 42, 0.04);
    
    /* Typography & Brand Colors */
    --text-main: #0f172a;
    --text-muted: #475569;
    --text-disabled: #94a3b8;
    --primary-brand: #2563eb; /* Trust Blue */
    --primary-hover: #1d4ed8;
    --accent-success: #059669;
    --accent-error: #dc2626;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
}

body {
    background: var(--bg-gradient);
    color: var(--text-main);
    min-height: 100vh;
    padding: 0;
    display: flex;
    flex-direction: column;
}

/* Subtle, sophisticated background depth orbs */
body::before, body::after {
    content: "";
    position: absolute;
    width: 400px;
    height: 400px;
    border-radius: 50%;
    z-index: -1;
    filter: blur(80px);
    opacity: 0.5;
}
body::before {
    background: radial-gradient(circle, #bfdbfe 0%, rgba(0,0,0,0) 70%);
    top: -10%; left: -5%;
}
body::after {
    background: radial-gradient(circle, #a7f3d0 0%, rgba(0,0,0,0) 70%);
    bottom: -10%; right: -5%;
}

/* Master Glassmorphic Panel Rules */
.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    box-shadow: var(--card-shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/* --- PROFESSIONAL TOP NAVBAR --- */
.navbar {
    width: 100%;
    height: 70px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 2rem;
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.5);
    box-shadow: 0 4px 20px rgba(15, 23, 42, 0.02);
}

.nav-brand {
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: -0.5px;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-brand span {
    color: var(--primary-brand);
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.user-profile-badge {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-muted);
    background: rgba(255,255,255,0.8);
    padding: 0.4rem 0.8rem;
    border-radius: 30px;
    border: 1px solid rgba(0,0,0,0.05);
}

/* --- LAYOUT CONTAINER --- */
.dashboard-container {
    width: 100%;
    max-width: 1100px;
    margin: 2rem auto;
    padding: 0 1.5rem;
}

.auth-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-grow: 1;
    padding: 2rem 1rem;
}

/* --- FORM & AUTH DESIGN --- */
.auth-card {
    width: 100%;
    max-width: 480px;
    padding: 2.5rem;
}

.auth-header h2 {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-main);
    letter-spacing: -0.5px;
    margin-bottom: 0.5rem;
}

.auth-header p {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 2rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    margin-bottom: 1.25rem;
    position: relative;
}

.form-group-row {
    display: flex;
    gap: 1rem;
}

label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="date"],
select {
    background: rgba(255, 255, 255, 0.7);
    border: 1px solid rgba(15, 23, 42, 0.12);
    padding: 0.75rem 1rem;
    border-radius: 10px;
    color: var(--text-main);
    font-size: 0.95rem;
    outline: none;
    transition: all 0.2s ease-in-out;
}

input:focus, select:focus {
    border-color: var(--primary-brand);
    background: #ffffff;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.15);
}

/* Style file uploads elegantly */
input[type="file"] {
    background: rgba(255, 255, 255, 0.5);
    padding: 0.5rem;
    border-radius: 10px;
    border: 1px dashed rgba(15, 23, 42, 0.2);
    font-size: 0.85rem;
    cursor: pointer;
}

/* --- UI BUTTONS --- */
.btn-primary {
    background: var(--primary-brand);
    color: #ffffff;
    border: none;
    padding: 0.85rem;
    border-radius: 10px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.2);
    transition: all 0.2s ease;
    text-align: center;
    text-decoration: none;
}

.btn-primary:hover {
    background: var(--primary-hover);
    box-shadow: 0 6px 16px rgba(37, 99, 235, 0.3);
    transform: translateY(-1px);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-secondary {
    background: transparent;
    color: var(--text-muted);
    border: 1px solid rgba(15, 23, 42, 0.15);
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s ease;
}

.btn-secondary:hover {
    background: rgba(15, 23, 42, 0.05);
    color: var(--text-main);
}

/* --- DASHBOARD ELEMENTS --- */
.metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.metric-card {
    padding: 1.5rem;
}

.metric-card h3 {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.5rem;
}

.metric-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-main);
    letter-spacing: -0.5px;
}

/* Tables UI Update */
.table-container {
    width: 100%;
    overflow-x: auto;
    margin-top: 1rem;
}

table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

th {
    padding: 0.85rem 1rem;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    border-bottom: 2px solid rgba(15, 23, 42, 0.06);
}

td {
    padding: 1rem;
    border-bottom: 1px solid rgba(15, 23, 42, 0.04);
    font-size: 0.9rem;
    color: var(--text-main);
}

.tx-row:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Modern Pill Badges */
.badge {
    display: inline-block;
    padding: 0.25rem 0.6rem;
    border-radius: 30px;
    font-size: 0.75rem;
    font-weight: 600;
}
.badge.paybill { background: #dbeafe; color: #1e40af; }
.badge.till { background: #d1fae5; color: #065f46; }

/* Status Alerts */
.alert {
    padding: 0.85rem 1rem;
    border-radius: 10px;
    font-size: 0.85rem;
    font-weight: 500;
    margin-bottom: 1.5rem;
}
.alert.error { background: #fee2e2; color: var(--accent-error); border: 1px solid #fca5a5; }
.alert.success { background: #d1fae5; color: var(--accent-success); border: 1px solid #6ee7b7; }

/* Mobile Adaptations */
@media(max-width: 768px) {
    .form-group-row { flex-direction: column; gap: 0; }
    .navbar { padding: 0 1rem; }
    .auth-card { padding: 1.5rem; }
}