/* CSS Reset & Variables */
:root {
    --primary: #1e3a8a; /* Deep trust blue */
    --primary-light: #3b82f6; /* Modern interaction blue */
    --background: #f8fafc; /* Crisp light gray/blue background */
    --surface: rgba(255, 255, 255, 0.75);
    --surface-border: rgba(255, 255, 255, 0.4);
    --text-main: #0f172a;
    --text-muted: #64748b;
    --error: #ef4444;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
}

body {
    background-color: var(--background);
    color: var(--text-main);
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
}

/* Background Animated Blobs */
.background-elements {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    overflow: hidden;
}

.blob {
    position: absolute;
    filter: blur(80px);
    opacity: 0.5;
    animation: float 20s infinite ease-in-out;
}

.blob-1 {
    top: -10%;
    right: -5%;
    width: 50vw;
    height: 50vw;
    max-width: 500px;
    max-height: 500px;
    background: #bfdbfe;
    border-radius: 50%;
}

.blob-2 {
    bottom: -20%;
    left: -10%;
    width: 60vw;
    height: 60vw;
    max-width: 600px;
    max-height: 600px;
    background: #dbeafe;
    border-radius: 50%;
    animation-delay: -5s;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(30px, -50px) scale(1.05); }
    66% { transform: translate(-20px, 20px) scale(0.95); }
}

/* Page Layout */
.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 3rem 1.5rem;
}

.hero {
    text-align: center;
    margin-bottom: 3rem;
    animation: fadeInDown 0.8s ease-out;
}

.hero h1 {
    font-size: clamp(2rem, 5vw, 2.75rem);
    color: var(--primary);
    font-weight: 700;
    letter-spacing: -0.5px;
    margin-bottom: 0.25rem;
}

.hero h2 {
    font-size: clamp(1.2rem, 3vw, 1.5rem);
    color: var(--text-muted);
    font-weight: 500;
}

.hero p {
    color: var(--primary-light);
    margin-top: 1rem;
    font-weight: 500;
}

/* Glassmorphism Form Container */
.form-section {
    background: var(--surface);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--surface-border);
    border-radius: 24px;
    padding: clamp(1.5rem, 5vw, 2.5rem);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.05);
    animation: fadeInUp 0.8s ease-out 0.2s both;
}

.form-header {
    text-align: center;
    margin-bottom: 2.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid rgba(0,0,0,0.05);
}

.form-header h3 {
    font-size: clamp(1.25rem, 4vw, 1.5rem);
    color: var(--primary);
    margin-bottom: 0.5rem;
}

.form-header p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* Individual Form Cards/Blocks */
.form-card {
    background: white;
    border-radius: 16px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 6px rgba(0,0,0,0.02);
    border: 1px solid #f1f5f9;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.form-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 15px rgba(0,0,0,0.04);
}

.form-card h4 {
    color: var(--primary);
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.form-card h4 svg {
    color: var(--primary-light);
}

/* Form Inputs */
.input-group {
    margin-bottom: 1.25rem;
}

.input-group label {
    display: block;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-main);
    margin-bottom: 0.5rem;
}

.input-group input[type="text"],
.input-group input[type="tel"],
.input-group input[type="number"],
.input-group input[type="date"],
.input-group select {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
    color: var(--text-main);
    transition: all 0.2s ease;
    background: #f8fafc;
}

.input-group input:focus,
.input-group select:focus {
    outline: none;
    border-color: var(--primary-light);
    background: white;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1);
}

/* Custom Radio Buttons */
.radio-group {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.radio-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    font-weight: 400 !important;
}

.radio-label input[type="radio"] {
    accent-color: var(--primary);
    width: 1.2rem;
    height: 1.2rem;
    cursor: pointer;
}

.hidden {
    display: none !important;
}

/* Submit Button */
.submit-btn {
    width: 100%;
    padding: 1rem;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
    margin-top: 2rem;
    box-shadow: 0 10px 20px rgba(59, 130, 246, 0.2);
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 25px rgba(59, 130, 246, 0.3);
}

.submit-btn svg {
    width: 20px;
    height: 20px;
    transition: transform 0.3s ease;
}

.submit-btn:hover svg {
    transform: translateX(4px);
}

/* Entry Animations */
@keyframes fadeInDown {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Split Inputs for Headers */
.split-inputs {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

@media (max-width: 480px) {
    .split-inputs {
        flex-direction: column;
        align-items: stretch;
    }
    .split-inputs select, 
    .split-inputs input {
        width: 100% !important;
    }
}

/* Admin Dashboard Overrides */
.admin-box {
    max-width: 450px; 
    margin: 4rem auto; 
    text-align: center;
}

.admin-box-expanded {
    width: 100%;
    margin: 2rem auto;
}

.error {
    color: var(--error);
    margin-bottom: 1rem;
    font-weight: 500;
    padding: 0.75rem;
    background: #fee2e2;
    border-radius: 8px;
    border: 1px solid #fecaca;
}

.empty-state-card {
    background: #f8fafc;
    color: var(--text-muted);
    padding: 4rem 2rem;
    text-align: center;
    border: 2px dashed #cbd5e1;
    border-radius: 16px;
    margin-top: 2rem;
}

.empty-state-card h4 {
    color: var(--text-main);
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

/* Data Table Styling */
.table-responsive {
    width: 100%;
    overflow-x: auto;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.02);
    border: 1px solid var(--surface-border);
    background: white;
    margin-top: 1rem;
    /* Smooth scrollbar for large tables */
    scrollbar-width: thin;
    scrollbar-color: var(--primary-light) #f1f5f9;
}

.table-responsive::-webkit-scrollbar {
    height: 8px;
}

.table-responsive::-webkit-scrollbar-thumb {
    background-color: var(--primary-light);
    border-radius: 10px;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 1200px; /* Forces scrolling on small screens instead of squishing */
}

.data-table th, .data-table td {
    padding: 1.25rem 1rem;
    text-align: left !important;
    border-bottom: 1px solid #f1f5f9;
    font-size: 0.95rem;
    vertical-align: middle;
}

.data-table th {
    background-color: #f8fafc;
    color: #64748b;
    font-weight: 600;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

.data-table tr:hover {
    background-color: #f8fafc;
}

.data-table td.empty-state {
    text-align: center;
    color: var(--text-muted);
    padding: 2rem;
}
