:root {
    --primary: #0052cc;
    --accent: #21ba45;
    --primary-light: #4c8bf5;
    --bg-main: #f0f4f8;
    --card-bg: #ffffff;
    --text-main: #1e293b;
    --text-muted: #64748b;
    --error: #ef4444;
    --success: #22c55e;
    --glass-border: rgba(0, 0, 0, 0.08);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

body.dark-mode {
    --bg-main: #06080c;
    --card-bg: #111827;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --glass-border: rgba(255, 255, 255, 0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
}

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

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

.blob {
    position: absolute;
    width: 400px;
    height: 400px;
    filter: blur(100px);
    opacity: 0.1;
    border-radius: 50%;
}

.blob-1 {
    background: var(--primary);
    top: -100px;
    right: -100px;
    animation: move1 10s infinite alternate;
}

.blob-2 {
    background: var(--accent);
    bottom: -100px;
    left: -100px;
    animation: move2 15s infinite alternate;
}

@keyframes move1 {
    from { transform: translate(0, 0); }
    to { transform: translate(-100px, 100px); }
}

@keyframes move2 {
    from { transform: translate(0, 0); }
    to { transform: translate(100px, -100px); }
}

.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 4rem 1.5rem;
}

/* Header */
.header {
    text-align: center;
    margin-bottom: 3rem;
}

.main-logo {
    max-width: 200px;
    height: auto;
    margin-bottom: 0.5rem;
}

.admin-logo {
    max-width: 140px;
    height: auto;
}

.subtitle {
    color: var(--text-muted);
    font-weight: 300;
}

/* Form Card */
.form-card {
    background: var(--card-bg);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 2.5rem;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.05);
}

.form-section {
    margin-bottom: 2.5rem;
}

.section-title {
    font-size: 1.05rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    padding: 0.6rem 1rem;
    background: rgba(0, 82, 204, 0.1);
    border-left: 4px solid var(--primary);
    color: var(--text-main);
}

/* Inputs */
.input-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

label {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--primary-light);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.2rem;
}

input, select {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 0.8rem 1rem;
    color: var(--text-main);
    font-size: 1rem;
    transition: var(--transition);
}

input:focus, select:focus {
    outline: none;
    border-color: var(--primary);
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 0 0 4px rgba(193, 155, 92, 0.1);
}

input::placeholder {
    color: #555;
    text-transform: none; /* Keep placeholders normal */
}

/* Block Letters for specific inputs */
#fullName, #nameInitials, #occupation, #nomineeName, #bankName, #branchName, #nomineeBank, #nomineeBranch {
    text-transform: uppercase;
}

/* Radio and Checkbox Styling */
.radio-group {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 0.5rem;
}

.radio-item, .checkbox-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    font-size: 0.9rem;
    color: var(--text-main);
}

input[type="radio"], input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--primary);
    cursor: pointer;
}

.mt-1 { margin-top: 1.5rem; }

.section-info {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-style: italic;
    margin-top: -1rem;
    margin-bottom: 1.5rem;
}

.declaration-box {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--glass-border);
    padding: 1.5rem;
    border-radius: 12px;
}

.declaration-box span {
    line-height: 1.5;
}

.support-info {
    text-align: center;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 1.5rem;
}

.support-info a {
    color: var(--primary);
    text-decoration: none;
}

/* Date Inputs */
input[type="date"] {
    color-scheme: light;
}

/* Buttons */
.form-actions {
    margin-top: 1rem;
}

.primary-btn {
    width: 100%;
    background: linear-gradient(135deg, var(--primary), #003d99);
    color: white;
    border: none;
    border-radius: 14px;
    padding: 1.2rem;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.75rem;
}

.primary-btn:hover {
    background: linear-gradient(135deg, var(--primary-light), var(--primary));
    transform: translateY(-2px);
    box-shadow: 0 10px 20px -10px rgba(0, 82, 204, 0.5);
}

.secondary-btn {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: 1px solid var(--glass-border);
    padding: 0.8rem 2rem;
    border-radius: 12px;
    cursor: pointer;
    transition: var(--transition);
}

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

/* Loader */
.loader {
    width: 20px;
    height: 20px;
    border: 3px solid rgba(0, 0, 0, 0.1);
    border-top: 3px solid #000;
    border-radius: 50%;
    display: none;
    animation: spin 0.8s linear infinite;
}

/* Theme Toggle */
.theme-switch {
    position: fixed;
    bottom: 20px;
    left: 20px;
    background: var(--card-bg);
    border: 1px solid var(--glass-border);
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    z-index: 10001;
    font-size: 1.2rem;
    color: var(--text-main);
    transition: var(--transition);
}

.theme-switch:hover {
    transform: scale(1.1);
}

body.dark-mode input, body.dark-mode select {
    background: rgba(255,255,255,0.05);
    border-color: rgba(255,255,255,0.1);
}

body.dark-mode th {
    background: rgba(255,255,255,0.05);
}

/* Modal Dark Adjustments */
body.dark-mode .modal-content {
    background: #111827;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.85);
    backdrop-filter: blur(8px);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    padding: 1rem;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: var(--card-bg);
    border: 1px solid var(--glass-border);
    padding: 3rem;
    border-radius: 32px;
    text-align: center;
    max-width: 450px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.success-icon {
    width: 64px;
    height: 64px;
    background: var(--success);
    color: #000;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 2rem;
    font-weight: bold;
    margin: 0 auto 1.5rem;
}

.modal h2 {
    margin-bottom: 1rem;
}

.modal p {
    color: var(--text-muted);
    margin-bottom: 2rem;
}

.footer {
    text-align: center;
    margin-top: 3rem;
    color: var(--text-muted);
    font-size: 0.875rem;
}

@media (max-width: 640px) {
    .container {
        padding: 2rem 1rem;
    }
    .form-card {
        padding: 1.5rem;
    }
    .input-grid {
        grid-template-columns: 1fr;
    }
}
