:root {
    /* High Contrast Universal Palette */
    --primary: #0056b3;       /* Deep Blue - High contrast primary actions */
    --primary-dark: #004085;  /* Hover state for primary actions */
    --primary-light: #e6f2ff; /* Extremely clear active/selected background */
    
    --success: #0f5132;       /* Dark Green for explicit success/completed states */
    --success-bg: #d1e7dd;
    
    --warning: #856404;       /* Dark Amber/Brown for explicit pending/warning states */
    --warning-bg: #fff3cd;
    
    --bg-surface: #f4f6f9;    /* Light gray base background to make white cards pop */
    --bg-card: #ffffff;       /* Pure white for distinct card containers */
    
    --text-main: #212529;     /* Near Black - Maximum readability text */
    --text-muted: #495057;    /* Dark Gray - Secondary text (must still pass WCAG contrast) */
    --text-error: #dc3545;    /* Standard Red - Validation messages */
    
    --border-color: #dee2e6;  /* Standard Gray - Visible dividers and outlines */
    
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
}

body {
    font-family: 'Inter', sans-serif;
    color: var(--text-main);
    background-color: var(--bg-surface);
    font-size: 1.1rem; /* Universal Accessibility: Larger base font */
}

/* Helpers */
.bg-surface { background-color: var(--bg-surface) !important; }
.text-main { color: var(--text-main) !important; }
.text-muted { color: var(--text-muted) !important; }
.text-error { color: var(--text-error) !important; }

/* Clear High Contrast Card */
.accessible-card {
    background-color: var(--bg-card);
    border-radius: var(--radius-md);
    border: 2px solid var(--border-color) !important; /* Thick distinct border */
    box-shadow: 0 .125rem .25rem rgba(0,0,0,.075);
    margin-bottom: 1.5rem;
}

/* Big Obvious Primary Button */
.btn-primary-accessible {
    background-color: var(--primary);
    border: 2px solid var(--primary-dark);
    color: #ffffff;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 1.25rem; /* Massive text */
    padding: 0.75rem 1.5rem;
    transition: background-color 0.2s ease;
}

.btn-primary-accessible:hover, .btn-primary-accessible:focus {
    background-color: var(--primary-dark);
    color: #ffffff;
}

/* Structural Secondary Button */
.btn-secondary-accessible {
    background-color: #e9ecef;
    color: var(--text-main);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 1.1rem;
    padding: 0.5rem 1.25rem;
    transition: background-color 0.2s ease;
}

.btn-secondary-accessible:hover, .btn-secondary-accessible:focus {
    background-color: #dee2e6;
}

/* Standard Header */
.solid-header {
    background-color: #ffffff;
    border-bottom: 2px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 1030;
}

/* Bottom App Bar */
.app-nav {
    display: flex;
    justify-content: space-around;
    background-color: #ffffff;
    border-top: 2px solid var(--border-color);
}

.nav-pill-btn {
    color: var(--text-muted);
    font-weight: 600;
    padding: 0.75rem 0.5rem;
    text-decoration: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.2rem;
    flex: 1;
    text-align: center;
    font-size: 0.95rem;
    border-top: 4px solid transparent; /* Ready for active state */
    transition: all 0.2s;
}

.nav-pill-btn i {
    font-size: 1.4rem;
}

.nav-pill-btn:hover {
    background-color: #f8f9fa;
    color: var(--text-main);
}

.nav-pill-btn.active {
    background-color: var(--primary-light);
    color: var(--primary);
    border-top: 4px solid var(--primary); /* Highly obvious active indicator */
}

/* Signature Pad container */
.sig-pad-box {
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    background-color: #e9ecef; /* Light gray to show it's an input area */
    touch-action: none;
    cursor: crosshair;
}

/* Input sizes override for max readability */
.form-control-lg, .form-select-lg {
    font-size: 1.2rem;
    border: 2px solid var(--border-color);
}
.form-control-lg:focus, .form-select-lg:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 0.25rem rgba(0, 86, 179, 0.25);
}

/* OTP (One-Time Password) Inputs */
.otp-input {
    width: 3.5rem;
    height: 4rem;
    font-size: 1.75rem !important;
    border-radius: var(--radius-sm);
    border: 2px solid var(--border-color);
    box-shadow: none !important;
}
.otp-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(0, 86, 179, 0.25) !important;
}

/* Floating Action Bar (above navigation) */
.sticky-action-bar {
    position: fixed;
    bottom: 60px; /* Sits flush above the bottom nav */
    left: 0;
    right: 0;
    margin: 0 auto;
    max-width: 600px;
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(8px);
    border-top: 2px solid var(--border-color);
    padding: 1.5rem 1.5rem 2.5rem 1.5rem; /* Massive padding on bottom */
    z-index: 1020;
    box-shadow: 0 -4px 10px rgba(0,0,0,0.05);
}
