/* ===========================
   Global Styles
   =========================== */

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

:root {
    --primary-color: #1a1a2e;
    --accent-color: #e94560;
    --secondary-color: #0f3460;
    --highlight-color: #16213e;
    --success-color: #27ae60;
    --warning-color: #f39c12;
    --danger-color: #e74c3c;
    --light-bg: #f0f2f5;
    --white: #ffffff;
    --text-dark: #1a1a2e;
    --text-light: #6c757d;
    --border-color: #dee2e6;
    --shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
    --shadow-hover: 0 8px 25px rgba(0, 0, 0, 0.2);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    background: var(--white);
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
    overflow: hidden;
}

/* ===========================
   Header
   =========================== */

header {
    background: linear-gradient(135deg, #1a1a2e 0%, #0f3460 100%);
    color: var(--white);
    text-align: center;
    padding: 40px 30px;
    position: relative;
    overflow: hidden;
}

header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 18px;
    height: 100%;
    background: linear-gradient(180deg,
        #B22234 0%, #B22234 33.33%,
        #FFFFFF 33.33%, #FFFFFF 66.66%,
        #3C3B6E 66.66%, #3C3B6E 100%
    );
}

header::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 18px;
    height: 100%;
    background: linear-gradient(180deg,
        #B22234 0%, #B22234 33.33%,
        #FFFFFF 33.33%, #FFFFFF 66.66%,
        #3C3B6E 66.66%, #3C3B6E 100%
    );
}

header h1 {
    font-size: 2.5rem;
    color: var(--white);
    margin-bottom: 8px;
    position: relative;
    text-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

header .subtitle {
    color: rgba(255,255,255,0.75);
    font-size: 1.1rem;
    position: relative;
}

/* ===========================
   Main Content
   =========================== */

main {
    padding: 35px 30px;
    background: var(--light-bg);
}

/* ===========================
   Typography
   =========================== */

h1 { font-size: 2.5rem; color: var(--primary-color); margin-bottom: 10px; }
h2 { font-size: 1.8rem; color: var(--primary-color); margin-bottom: 15px; }
h3 { font-size: 1.3rem; color: var(--primary-color); margin-bottom: 10px; }

.subtitle {
    font-size: 1.1rem;
    color: var(--text-light);
    margin-bottom: 20px;
}

/* ===========================
   Cards & Grid
   =========================== */

.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.card {
    background: var(--white);
    border: none;
    border-radius: 12px;
    padding: 25px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    border-top: 4px solid var(--accent-color);
}

.card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-hover);
}

.card-icon { font-size: 3rem; margin-bottom: 15px; }
.card h2 { font-size: 1.5rem; margin-bottom: 10px; }
.card p { color: var(--text-light); margin-bottom: 15px; }

/* ===========================
   Buttons
   =========================== */

.btn {
    display: inline-block;
    padding: 12px 24px;
    font-size: 1rem;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    border: 2px solid transparent;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
    letter-spacing: 0.3px;
}

.btn-primary {
    background: linear-gradient(135deg, #e94560, #c0392b);
    color: var(--white);
    border-color: transparent;
    box-shadow: 0 4px 15px rgba(233, 69, 96, 0.4);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #c0392b, #a93226);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(233, 69, 96, 0.5);
}

.btn-secondary {
    background: linear-gradient(135deg, #27ae60, #1e8449);
    color: var(--white);
    border-color: transparent;
}

.btn-secondary:hover {
    background: linear-gradient(135deg, #1e8449, #196f3d);
    transform: translateY(-2px);
}

.btn-outline {
    background: transparent;
    color: var(--secondary-color);
    border-color: var(--secondary-color);
}

.btn-outline:hover {
    background: var(--secondary-color);
    color: var(--white);
}

.btn-large { padding: 15px 40px; font-size: 1.1rem; }
.btn-group { display: flex; gap: 10px; flex-wrap: wrap; }
.btn:disabled { opacity: 0.6; cursor: not-allowed; transform: none !important; }

/* ===========================
   Forms
   =========================== */

.form-container {
    max-width: 800px;
    margin: 0 auto;
}

fieldset {
    border: none;
    border-radius: 12px;
    padding: 25px 30px;
    margin-bottom: 20px;
    background: var(--white);
    box-shadow: 0 4px 15px rgba(0,0,0,0.07);
    position: relative;
}

fieldset::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 5px;
    height: 100%;
    background: linear-gradient(180deg, #e94560, #0f3460);
    border-radius: 12px 0 0 12px;
}

legend {
    font-size: 1rem;
    font-weight: 700;
    color: var(--secondary-color);
    padding: 0 10px;
    letter-spacing: 0.3px;
}

.form-group { margin-bottom: 20px; }

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-dark);
    font-size: 0.95rem;
}

.required { color: var(--accent-color); }

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="date"],
input[type="time"],
input[type="number"],
select,
textarea {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
    transition: all 0.3s;
    background: #fafbfc;
    color: var(--text-dark);
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--accent-color);
    background: var(--white);
    box-shadow: 0 0 0 3px rgba(233, 69, 96, 0.1);
}

textarea { resize: vertical; }

small {
    display: block;
    color: var(--text-light);
    font-size: 0.85rem;
    margin-top: 5px;
}

.checkbox-group {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 10px;
    margin-top: 10px;
}

.checkbox-group label {
    display: flex;
    align-items: center;
    font-weight: 400;
    cursor: pointer;
    padding: 10px 12px;
    border-radius: 8px;
    transition: all 0.2s;
    border: 2px solid transparent;
    background: var(--light-bg);
}

.checkbox-group label:hover {
    background: #e8eaf0;
    border-color: var(--accent-color);
}

.checkbox-group input[type="checkbox"] {
    width: auto;
    margin-right: 8px;
    cursor: pointer;
    accent-color: var(--accent-color);
}

.form-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 30px;
    padding: 20px 0;
}

/* ===========================
   Day Rows
   =========================== */

.day-row {
    border-left: 4px solid var(--accent-color) !important;
    border-radius: 8px;
    background: #fafbfc !important;
}

/* ===========================
   Messages & Alerts
   =========================== */

.form-message {
    padding: 15px 20px;
    border-radius: 8px;
    margin-top: 20px;
    font-weight: 500;
}

.form-message.success {
    background-color: #d4edda;
    color: #155724;
    border: 2px solid #c3e6cb;
}

.form-message.error {
    background-color: #fde8ea;
    color: #c0392b;
    border: 2px solid #f5c6cb;
}

.form-message.warning {
    background-color: #fff3cd;
    color: #856404;
    border: 2px solid #ffeeba;
}

.status-banner {
    background: linear-gradient(135deg, #0f3460 0%, #e94560 100%);
    color: var(--white);
    padding: 25px;
    border-radius: 12px;
    margin-bottom: 30px;
    text-align: center;
}

.status-banner h3 { color: var(--white); margin-bottom: 10px; }
.status-detail { font-size: 0.9rem; opacity: 0.9; }

/* ===========================
   Lists & Links
   =========================== */

.link-list { list-style: none; padding: 0; }
.link-list li { margin-bottom: 12px; }

.link-list a {
    color: var(--accent-color);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
}

.link-list a:hover { color: var(--primary-color); text-decoration: underline; }

.help-text { font-size: 0.9rem; color: var(--text-light); margin-top: 10px; }

/* ===========================
   Steps & Process
   =========================== */

.info-section {
    margin: 40px 0;
    padding: 30px;
    background: var(--white);
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.07);
}

.steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 25px;
    margin-top: 25px;
}

.step {
    background: var(--light-bg);
    padding: 20px;
    border-radius: 10px;
    text-align: center;
}

.step-number {
    display: inline-block;
    width: 50px;
    height: 50px;
    line-height: 50px;
    background: linear-gradient(135deg, #e94560, #0f3460);
    color: var(--white);
    border-radius: 50%;
    font-size: 1.5rem;
    font-weight: bold;
    margin-bottom: 15px;
}

.step h3 { font-size: 1.2rem; margin-bottom: 10px; }
.step p { color: var(--text-light); font-size: 0.95rem; }

/* ===========================
   Help Section
   =========================== */

.help-section {
    background: #fff9e6;
    border-left: 4px solid var(--warning-color);
    padding: 20px;
    margin-top: 30px;
    border-radius: 8px;
}

.help-section h3 { color: var(--warning-color); margin-bottom: 10px; }
.help-section ul { margin-left: 20px; margin-top: 10px; }
.help-section li { margin-bottom: 8px; }

/* ===========================
   Footer
   =========================== */

footer {
    text-align: center;
    padding: 25px 30px;
    background: var(--primary-color);
    color: rgba(255,255,255,0.6);
    font-size: 0.9rem;
}

.footer-links { margin-top: 10px; }

.footer-links a {
    color: var(--accent-color);
    text-decoration: none;
    margin: 0 10px;
}

.footer-links a:hover { text-decoration: underline; }

/* ===========================
   Loading Spinner
   =========================== */

.spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    border-top-color: var(--white);
    animation: spin 0.8s linear infinite;
    margin-left: 10px;
    vertical-align: middle;
}

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

/* ===========================
   Responsive Design
   =========================== */

@media (max-width: 768px) {
    body { padding: 10px; }
    header { padding: 25px 20px; }
    header h1 { font-size: 1.8rem; }
    main { padding: 20px 15px; }
    .form-row { grid-template-columns: 1fr; }
    .checkbox-group { grid-template-columns: 1fr 1fr; }
    .steps { grid-template-columns: 1fr; }
    .btn-group { flex-direction: column; }
    .form-actions { flex-direction: column; }
    .btn { width: 100%; }
}

@media (max-width: 480px) {
    header h1 { font-size: 1.5rem; }
    .card { padding: 15px; }
    fieldset { padding: 15px; }
    .checkbox-group { grid-template-columns: 1fr; }
}

/* ===========================
   Print Styles
   =========================== */

@media print {
    body { background: white; }
    .container { box-shadow: none; }
    .btn, .form-actions { display: none; }
}
