:root {
    --primary-color: #b54242;
    --secondary-color: #b54242;
    --accent-color: #f5d1a5;
    --background-color: #fdf8eb;
    --text-color: #4a3a3a;
    --card-bg: #ffffff;
    --border-radius: 12px;
    --shadow: none;
    --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

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

body {
    font-family: 'Nunito', sans-serif;
    background-color: var(--background-color);
    background-image: url('images/pagebackground.png');
    background-size: cover;
    background-position: center top;
    background-repeat: no-repeat;
    background-attachment: fixed;
    color: var(--text-color);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    padding: 2rem 1rem;
}

.app-container {
    max-width: 800px; /* Widened for more fields */
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

/* Header & Navigation */
.app-header {
    text-align: center;
    background: var(--card-bg);
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    border: 4px solid var(--secondary-color);
}

.app-header h1 {
    font-size: 2.5rem;
    font-weight: 900;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    text-shadow: 2px 2px 0px var(--accent-color);
}

nav {
    display: flex;
    justify-content: center;
    gap: 1rem;
}

.nav-btn {
    background: white;
    border: 3px solid var(--text-color);
    padding: 0.8rem 1.5rem;
    border-radius: 50px;
    font-family: 'Nunito', sans-serif;
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--text-color);
    cursor: pointer;
    transition: var(--transition);
}

.nav-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.nav-btn.active {
    background: var(--secondary-color);
    border-color: var(--secondary-color);
    color: white;
}

/* Main Content & Cards */
.view {
    display: none;
    animation: fadeIn 0.4s ease-out forwards;
}

.view.active {
    display: block;
}

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

.card {
    background: var(--card-bg);
    padding: 2.5rem;
    border-radius: var(--border-radius);
    box-shadow: none;
    border: 3px solid var(--primary-color);
}

.card h2 {
    font-size: 2rem;
    color: var(--secondary-color);
    margin-bottom: 0.5rem;
}

.subtitle {
    color: #7f8c8d;
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
}

/* Progress Bar */
.progress-bar-container {
    width: 100%;
    background: #e0e0e0;
    border-radius: 10px;
    height: 10px;
    margin-bottom: 1rem;
    overflow: hidden;
    position: relative;
}

.progress-bar {
    height: 100%;
    background: var(--primary-color);
    width: 25%;
    transition: width 0.4s ease;
}

.step-indicator {
    text-align: right;
    font-size: 0.9rem;
    color: #95a5a6;
    font-weight: bold;
    margin-bottom: 2rem;
}

/* Wizard Steps */
.wizard-step {
    display: none;
    animation: fadeIn 0.3s ease forwards;
}

.wizard-step h3 {
    color: var(--primary-color);
    border-bottom: 2px dashed #e0e0e0;
    padding-bottom: 0.5rem;
    margin-bottom: 1.5rem;
}

.wizard-step.active {
    display: block;
}

.child-card {
    background: #fdf6e3;
    border: 2px solid var(--primary-color);
    border-radius: 10px;
    padding: 1.5rem;
    margin-bottom: 0; /* Add child button connects */
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
}
.child-card h4 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.wizard-step h3 {
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    font-size: 1.4rem;
    border-bottom: 2px dashed #eee;
    padding-bottom: 0.5rem;
}

.wizard-step h4 {
    color: var(--text-color);
    margin: 1.5rem 0 1rem 0;
    font-size: 1.2rem;
}

/* Forms & Grid Layout */
.form-row {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.form-group {
    margin-bottom: 1.5rem;
    flex: 1;
    min-width: 100%;
}

@media (min-width: 600px) {
    .form-group.half { min-width: calc(50% - 1rem); }
    .form-group.third { min-width: calc(33.333% - 1rem); }
    .form-group.quarter { min-width: calc(25% - 1rem); }
}

label {
    display: block;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--text-color);
    font-size: 1.05rem;
}

input[type="text"],
input[type="number"],
input[type="email"],
input[type="tel"],
input[type="date"],
select,
textarea {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid #dcdcdc;
    border-radius: 8px;
    font-family: 'Nunito', sans-serif;
    font-size: 1rem;
    transition: var(--transition);
    background: #ffffff;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.02);
}

textarea {
    resize: vertical;
}

input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 4px rgba(78, 205, 196, 0.2);
}

small {
    display: block;
    margin-top: 0.5rem;
    color: #95a5a6;
    font-size: 0.85rem;
}

.info-text {
    font-size: 0.95rem;
    color: #34495e;
    margin-bottom: 1.5rem;
    background: #f1f2f6;
    padding: 1rem;
    border-radius: 10px;
    border-left: 4px solid var(--accent-color);
}

.disabled-input {
    background-color: #f1f2f6;
    color: #a4b0be;
    cursor: not-allowed;
}

/* Checkboxes & Permissions */
.permission-box {
    background: #f8f9fa;
    padding: 1.2rem;
    border-radius: 10px;
    border: 2px solid #e9ecef;
    margin-bottom: 1.5rem;
}

.checkbox-group {
    display: flex;
    align-items: flex-start;
    gap: 0.8rem;
    margin-bottom: 1rem;
}

.checkbox-group input[type="checkbox"] {
    width: 24px;
    height: 24px;
    margin-top: 0.2rem;
    cursor: pointer;
    accent-color: var(--primary-color);
}

.checkbox-group label {
    font-weight: normal;
    margin: 0;
    cursor: pointer;
    line-height: 1.4;
}

.signature-box {
    margin-bottom: 0;
    border-top: 2px dashed #ddd;
    padding-top: 1rem;
}

.special-needs-optin {
    background: #fff3cd;
    padding: 1.5rem;
    border-radius: 10px;
    border: 2px solid #ffeeba;
    margin-top: 2rem;
}

/* Wizard Navigation Buttons */
.wizard-nav {
    display: flex;
    justify-content: space-between;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 2px solid #eee;
    gap: 1rem;
}

button {
    padding: 1rem 1.5rem;
    border: none;
    border-radius: 12px;
    font-family: 'Nunito', sans-serif;
    font-weight: 900;
    font-size: 1.2rem;
    cursor: pointer;
    transition: var(--transition);
}

button[type="submit"] {
    width: auto;
    flex-grow: 1;
}

.primary-btn {
    background-color: var(--primary-color);
    color: white;
    box-shadow: 0 4px 0 #8c2a2a;
}

.primary-btn:hover {
    transform: translateY(2px);
    box-shadow: 0 2px 0 #8c2a2a;
}

.primary-btn:active {
    transform: translateY(6px);
    box-shadow: none;
}

.secondary-btn {
    background-color: #95a5a6;
    color: white;
    box-shadow: 0 4px 0 #7f8c8d;
}

.add-btn {
    width: 100%;
    background-color: #3b3b3b;
    color: white;
    border: none;
    border-radius: 0 0 10px 10px;
    padding: 1rem;
    box-shadow: none;
    margin-top: 0;
    font-weight: 700;
}
.add-btn:hover {
    background-color: #2a2a2a;
    transform: none;
    box-shadow: none;
}
.add-btn:active {
    transform: none;
    box-shadow: inset 0 3px 5px rgba(0,0,0,0.5);
}

.secondary-btn:hover {
    transform: translateY(2px);
    box-shadow: 0 4px 0 #7f8c8d;
}

.secondary-btn:active {
    transform: translateY(6px);
    box-shadow: none;
}

.update-btn {
    background-color: var(--accent-color);
    color: var(--text-color);
    box-shadow: 0 6px 0 #f1c40f;
    width: 100%;
    margin-top: 1rem;
}

.update-btn:hover { transform: translateY(2px); box-shadow: 0 4px 0 #f1c40f; }
.update-btn:active { transform: translateY(6px); box-shadow: none; }

.danger-btn {
    background-color: #e74c3c;
    color: white;
    box-shadow: 0 6px 0 #c0392b;
    width: 100%;
    margin-top: 1rem;
}

.danger-btn:hover { transform: translateY(2px); box-shadow: 0 4px 0 #c0392b; }
.danger-btn:active { transform: translateY(6px); box-shadow: none; }

/* Animations */
.pulse-animation {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.02); }
    100% { transform: scale(1); }
}

/* Messages */
.message {
    margin-top: 1.5rem;
    padding: 1rem;
    border-radius: 10px;
    font-weight: 700;
    text-align: center;
}

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

.message.error {
    background-color: #f8d7da;
    color: #721c24;
    border: 2px solid #f5c6cb;
}

.hidden {
    display: none !important;
}

hr {
    border: none;
    border-top: 3px dashed #e0e0e0;
    margin: 2rem 0;
}

footer {
    text-align: center;
    color: var(--text-color);
    font-weight: 700;
    font-size: 1.2rem;
    margin-top: 1rem;
}


}

.remove-btn {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: transparent;
    border: none;
    color: var(--primary-color);
    font-size: 0.9rem;
    font-weight: bold;
    cursor: pointer;
    padding: 0;
    box-shadow: none;
}

.remove-btn:hover {
    text-decoration: underline;
    transform: none;
    box-shadow: none;
}

.add-btn {
    margin-bottom: 2rem;
    display: block;
    width: 100%;
}

.checkbox-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    background: white;
    padding: 1rem;
    border-radius: 8px;
    border: 1px solid #ccc;
}

