@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&display=swap');

:root {
    --primary: #8e0e38; /* A deeper, richer Unimedic red */
    --primary-light: #fdf2f8;
    --primary-glow: rgba(142, 14, 56, 0.2);
    --secondary: #1d1d42;
    --accent: #e11d48;
    --bg-color: #f1f5f9;
    --card-bg: rgba(255, 255, 255, 0.95);
    --text-main: #0f172a;
    --text-muted: #64748b;
    --border: #e2e8f0;
    --radius-lg: 28px;
    --radius-md: 16px;
    --radius-sm: 12px;
}

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

body {
    font-family: 'Outfit', sans-serif;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 3rem 1rem;
    overflow-x: hidden;
}

/* Premium Card Container */
.container {
    width: 100%;
    max-width: 1400px;
    background: var(--card-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-radius: var(--radius-lg);
    border: 1px solid rgba(255, 255, 255, 0.5);
    box-shadow: 
        0 20px 40px -10px rgba(0, 0, 0, 0.1),
        0 0 20px rgba(142, 14, 56, 0.05);
    overflow: hidden;
    animation: premiumFade 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes premiumFade {
    0% { opacity: 0; transform: translateY(40px) scale(0.98); }
    100% { opacity: 1; transform: translateY(0) scale(1); }
}

/* Stunning Header */
.brand-header {
    background: linear-gradient(135deg, var(--primary) 0%, #4a041a 100%);
    padding: 3.5rem 3rem 4rem;
    color: white;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.main-logo {
    max-height: 80px;
    width: auto;
    margin-bottom: 1rem;
    position: relative;
    z-index: 2;
    filter: drop-shadow(0 4px 6px rgba(0,0,0,0.3));
    animation: premiumFade 1s cubic-bezier(0.16, 1, 0.3, 1);
}

.brand-header::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 60%);
    animation: rotateSlow 20s linear infinite;
}

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

.brand-header::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 60px;
    background: var(--card-bg);
    clip-path: ellipse(60% 100% at 50% 100%);
}

.brand-header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    position: relative;
    z-index: 2;
    text-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

.brand-header p {
    font-size: 1.1rem;
    opacity: 0.9;
    position: relative;
    z-index: 2;
    margin-top: 0.5rem;
    font-weight: 300;
}

.content-body {
    padding: 1rem 4rem 4rem;
}

/* Collapsible Sections */
.collapsible-section {
    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    margin-bottom: 1.5rem;
    overflow: hidden;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.03);
    transition: all 0.3s ease;
}

.collapsible-section:hover {
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.05);
    border-color: rgba(142, 14, 56, 0.2);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 1.5rem;
    cursor: pointer;
    background: #ffffff;
    transition: all 0.3s ease;
    border-left: 4px solid transparent;
}

.section-header.active {
    border-left: 4px solid var(--primary);
    background: var(--primary-light);
}

.section-header:hover {
    background: #fafafa;
}

.section-title-wrapper {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.section-icon {
    color: var(--primary);
    background: var(--primary-light);
    padding: 8px;
    border-radius: 10px;
    width: 40px;
    height: 40px;
    box-shadow: 0 2px 5px var(--primary-glow);
}

.section-header .section-title {
    margin: 0;
    padding: 0;
    border: none;
    font-size: 1.35rem;
    color: var(--secondary);
    font-weight: 600;
}

.chevron {
    color: var(--text-muted);
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    background: #f1f5f9;
    border-radius: 50%;
    padding: 4px;
    width: 32px;
    height: 32px;
}

.section-header.active .chevron {
    color: white;
    background: var(--primary);
    transform: rotate(180deg);
}

.section-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.section-content .form-grid {
    padding: 2rem 1.5rem;
    margin-bottom: 0;
}

/* Form Grid & Inputs */
.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 1.5rem 2rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    position: relative;
}

label {
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--text-main);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    transition: color 0.3s;
}

.form-group:focus-within label {
    color: var(--primary);
}

input, select, textarea {
    width: 100%;
    padding: 0.9rem 1.25rem;
    background: #f8fafc;
    border: 1px solid #cbd5e1;
    border-radius: var(--radius-sm);
    color: var(--text-main);
    font-family: inherit;
    font-size: 1rem;
    font-weight: 500;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

input::placeholder, select:invalid {
    color: #94a3b8;
    font-weight: 400;
}

input:hover, select:hover, textarea:hover {
    background: #ffffff;
    border-color: #94a3b8;
}

input:focus, select:focus, textarea:focus {
    outline: none;
    background: #ffffff;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px var(--primary-glow);
    transform: translateY(-2px);
}

/* Custom Checkbox */
.checkbox-group {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-direction: row;
    padding: 0.5rem 0;
}

.checkbox-group input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    width: 24px;
    height: 24px;
    border: 2px solid #cbd5e1;
    border-radius: 6px;
    background: #f8fafc;
    cursor: pointer;
    position: relative;
    transition: all 0.2s ease;
    padding: 0;
}

.checkbox-group input[type="checkbox"]:checked {
    background: var(--primary);
    border-color: var(--primary);
}

.checkbox-group input[type="checkbox"]:checked::after {
    content: '';
    position: absolute;
    left: 7px;
    top: 3px;
    width: 6px;
    height: 12px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

/* Modern Submit Button */
.btn-premium {
    width: 100%;
    max-width: 400px;
    margin: 3rem auto 1rem;
    padding: 1.25rem 2rem;
    background: linear-gradient(135deg, var(--primary) 0%, #d81b60 100%);
    color: white;
    border: none;
    border-radius: 50px; /* Pill shape */
    font-size: 1.15rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    box-shadow: 0 10px 20px -5px var(--primary-glow);
    text-transform: uppercase;
}

.btn-premium:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 20px 30px -10px rgba(142, 14, 56, 0.4);
}

.btn-premium:active {
    transform: translateY(-1px);
}

/* Alerts */
.status-alert {
    padding: 1.25rem 1.5rem;
    border-radius: var(--radius-md);
    margin-bottom: 2rem;
    font-weight: 500;
    display: none;
    text-align: center;
    animation: slideDown 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes slideDown {
    0% { opacity: 0; transform: translateY(-10px); }
    100% { opacity: 1; transform: translateY(0); }
}

.success-alert { background: #f0fdf4; color: #166534; border: 1px solid #bbf7d0; box-shadow: 0 4px 12px rgba(22, 101, 52, 0.1); }
.error-alert { background: #fef2f2; color: #991b1b; border: 1px solid #fee2e2; box-shadow: 0 4px 12px rgba(153, 27, 27, 0.1); }
.info-alert { background: #eff6ff; color: #1e3a8a; border: 1px solid #bfdbfe; box-shadow: 0 4px 12px rgba(30, 58, 138, 0.1); }

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

.input-spinner {
    position: absolute;
    right: 1.25rem;
    bottom: 0.95rem;
    color: var(--primary);
    animation: spin 1s linear infinite;
}

/* Consent / Authorization Section */
.consent-section {
    border-color: rgba(16, 185, 129, 0.25);
}

.consent-section:hover {
    border-color: rgba(16, 185, 129, 0.4);
}

.consent-section .section-icon {
    color: #059669;
    background: #ecfdf5;
    box-shadow: 0 2px 5px rgba(16, 185, 129, 0.15);
}

.consent-section .section-header.active {
    border-left-color: #059669;
    background: #ecfdf5;
}

.consent-section .section-header.active .chevron {
    background: #059669;
}

.consent-container {
    padding: 2rem 1.5rem;
}

.consent-legal-text {
    font-size: 0.92rem;
    color: var(--text-muted);
    line-height: 1.7;
    margin-bottom: 1.5rem;
    padding: 1.25rem;
    background: linear-gradient(135deg, #f0fdf4 0%, #ecfdf5 100%);
    border-radius: var(--radius-sm);
    border-left: 4px solid #059669;
}

.consent-legal-text strong {
    color: var(--text-main);
}

.consent-select-all {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.85rem 1.25rem;
    margin-bottom: 1.25rem;
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.3s ease;
}

.consent-select-all:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 12px rgba(5, 150, 105, 0.3);
}

.consent-select-all input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    width: 22px;
    height: 22px;
    border: 2px solid rgba(255, 255, 255, 0.6);
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.15);
    cursor: pointer;
    position: relative;
    transition: all 0.2s ease;
    padding: 0;
    flex-shrink: 0;
}

.consent-select-all input[type="checkbox"]:checked {
    background: #ffffff;
    border-color: #ffffff;
}

.consent-select-all input[type="checkbox"]:checked::after {
    content: '';
    position: absolute;
    left: 6px;
    top: 2px;
    width: 6px;
    height: 11px;
    border: solid #059669;
    border-width: 0 2.5px 2.5px 0;
    transform: rotate(45deg);
}

.consent-select-all label {
    color: #ffffff;
    margin: 0;
    font-weight: 600;
    font-size: 0.95rem;
    text-transform: none;
    letter-spacing: 0;
    cursor: pointer;
}

.consent-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 0.75rem;
}

.consent-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    background: #f8fafc;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    transition: all 0.3s ease;
    cursor: pointer;
}

.consent-item:hover {
    background: #ffffff;
    border-color: #059669;
    box-shadow: 0 4px 8px rgba(5, 150, 105, 0.08);
    transform: translateY(-1px);
}

.consent-item input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    width: 22px;
    height: 22px;
    border: 2px solid #cbd5e1;
    border-radius: 6px;
    background: #ffffff;
    cursor: pointer;
    position: relative;
    transition: all 0.2s ease;
    padding: 0;
    flex-shrink: 0;
}

.consent-item input[type="checkbox"]:checked {
    background: #059669;
    border-color: #059669;
}

.consent-item input[type="checkbox"]:checked::after {
    content: '';
    position: absolute;
    left: 6px;
    top: 2px;
    width: 6px;
    height: 11px;
    border: solid white;
    border-width: 0 2.5px 2.5px 0;
    transform: rotate(45deg);
}

.consent-item:has(input:checked) {
    background: #ecfdf5;
    border-color: #059669;
}

.consent-item label {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 0.88rem;
    font-weight: 500;
    color: var(--text-main);
    cursor: pointer;
    margin: 0;
    text-transform: none;
    letter-spacing: 0;
    line-height: 1.4;
}

.consent-item label svg {
    color: var(--text-muted);
    flex-shrink: 0;
    transition: color 0.3s;
}

.consent-item:has(input:checked) label svg {
    color: #059669;
}

.consent-disclaimer {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 1.25rem;
    padding: 0.85rem 1rem;
    font-size: 0.82rem;
    color: var(--text-muted);
    background: #f8fafc;
    border-radius: 8px;
    border: 1px dashed #cbd5e1;
}

.consent-disclaimer svg {
    flex-shrink: 0;
    color: #94a3b8;
}

@media (max-width: 768px) {
    body { padding: 1rem 0; }
    .container { border-radius: 0; border: none; box-shadow: none; }
    .content-body { padding: 1.5rem; }
    .brand-header { padding: 3rem 1.5rem 3.5rem; }
    .form-grid { grid-template-columns: 1fr; gap: 1.25rem; }
    .section-content .form-grid { padding: 1.5rem 1rem; }
    .btn-premium { width: 100%; border-radius: var(--radius-md); }
    .consent-grid { grid-template-columns: 1fr; }
    .consent-container { padding: 1.5rem 1rem; }
    .consent-legal-text { font-size: 0.85rem; padding: 1rem; }
}
