/* ===================================================
   Academy Registration System - Main Styles
   =================================================== */

:root {
    --primary: #0d9488;
    --primary-dark: #0f766e;
    --primary-light: #14b8a6;
    --accent: #f59e0b;
    --success: #10b981;
    --danger: #ef4444;
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-500: #6b7280;
    --gray-700: #374151;
    --gray-900: #111827;
    --shadow-sm: 0 1px 2px 0 rgba(0,0,0,.05);
    --shadow:    0 1px 3px 0 rgba(0,0,0,.1), 0 1px 2px -1px rgba(0,0,0,.1);
    --shadow-md: 0 4px 6px -1px rgba(0,0,0,.1), 0 2px 4px -2px rgba(0,0,0,.1);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,.1), 0 4px 6px -4px rgba(0,0,0,.1);
}

* {
    box-sizing: border-box;
}

body {
    font-family: 'Tajawal', 'Cairo', 'Segoe UI', Tahoma, sans-serif;
    background: linear-gradient(135deg, #f0fdfa 0%, #e0f2fe 100%);
    min-height: 100vh;
    color: var(--gray-900);
    direction: rtl;
}

/* ===== Header ===== */
.app-header {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: #fff;
    padding: 1.5rem 0;
    box-shadow: var(--shadow-md);
}

.app-header h1 {
    font-weight: 700;
    margin: 0;
    font-size: 1.5rem;
}

.app-header .logo {
    width: 48px;
    height: 48px;
    background: rgba(255,255,255,.15);
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-left: 12px;
}

/* ===== Wizard Container ===== */
.wizard-container {
    max-width: 900px;
    margin: 2rem auto;
    background: #fff;
    border-radius: 20px;
    box-shadow: var(--shadow-lg);
    overflow: hidden;
}

/* ===== Progress Bar ===== */
.wizard-progress {
    background: var(--gray-50);
    padding: 2rem 2rem 1rem;
    border-bottom: 1px solid var(--gray-200);
}

.steps-indicator {
    display: flex;
    justify-content: space-between;
    position: relative;
    margin-bottom: 1rem;
}

.steps-indicator::before {
    content: '';
    position: absolute;
    top: 22px;
    right: 30px;
    left: 30px;
    height: 3px;
    background: var(--gray-200);
    z-index: 0;
}

.step-progress-line {
    position: absolute;
    top: 22px;
    right: 30px;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--primary-light));
    z-index: 1;
    transition: width .4s ease;
    width: 0;
}

.step-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    z-index: 2;
    flex: 1;
}

.step-circle {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #fff;
    border: 3px solid var(--gray-200);
    color: var(--gray-500);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1rem;
    margin-bottom: .5rem;
    transition: all .3s ease;
}

.step-item.active .step-circle {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
    transform: scale(1.1);
    box-shadow: 0 0 0 4px rgba(13,148,136,.2);
}

.step-item.completed .step-circle {
    background: var(--success);
    border-color: var(--success);
    color: #fff;
}

.step-label {
    font-size: .85rem;
    color: var(--gray-500);
    font-weight: 500;
    text-align: center;
}

.step-item.active .step-label,
.step-item.completed .step-label {
    color: var(--gray-900);
    font-weight: 700;
}

/* ===== Wizard Content ===== */
.wizard-content {
    padding: 2.5rem;
}

.wizard-step {
    display: none;
    animation: fadeIn .4s ease;
}

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

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

.step-title {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--primary-dark);
    margin-bottom: .5rem;
}

.step-subtitle {
    color: var(--gray-500);
    margin-bottom: 2rem;
}

/* ===== Form Controls ===== */
.form-label {
    font-weight: 600;
    color: var(--gray-700);
    margin-bottom: .4rem;
    font-size: .95rem;
}

.form-label .required {
    color: var(--danger);
    margin-right: 2px;
}

.form-control,
.form-select {
    border-radius: 10px;
    border: 2px solid var(--gray-200);
    padding: .65rem 1rem;
    font-size: 1rem;
    transition: all .2s ease;
    background: #fff;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(13,148,136,.15);
    outline: none;
}

.form-control.is-invalid,
.form-select.is-invalid {
    border-color: var(--danger);
}

.form-control.is-valid,
.form-select.is-valid {
    border-color: var(--success);
}

.invalid-feedback {
    color: var(--danger);
    font-size: .85rem;
    margin-top: .25rem;
}

/* ===== Buttons ===== */
.btn {
    border-radius: 10px;
    padding: .65rem 1.5rem;
    font-weight: 600;
    transition: all .2s ease;
    border: none;
}

.btn-primary {
    background: var(--primary);
    color: #fff;
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-outline-primary {
    border: 2px solid var(--primary);
    color: var(--primary);
    background: #fff;
}

.btn-outline-primary:hover {
    background: var(--primary);
    color: #fff;
}

.btn-success {
    background: var(--success);
    color: #fff;
}

.btn-success:hover {
    background: #059669;
}

.btn-danger {
    background: var(--danger);
    color: #fff;
}

.wizard-actions {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--gray-200);
}

/* ===== Child Card ===== */
.child-card {
    background: var(--gray-50);
    border: 2px solid var(--gray-200);
    border-radius: 14px;
    padding: 1.5rem;
    margin-bottom: 1.25rem;
    position: relative;
    transition: all .2s ease;
}

.child-card:hover {
    border-color: var(--primary-light);
}

.child-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.25rem;
    padding-bottom: .75rem;
    border-bottom: 1px solid var(--gray-200);
}

.child-card-title {
    font-weight: 700;
    color: var(--primary-dark);
    margin: 0;
    font-size: 1.05rem;
    display: flex;
    align-items: center;
    gap: .5rem;
}

.child-card-title .badge {
    background: var(--primary);
    color: #fff;
    font-size: .8rem;
}

.btn-remove {
    background: #fee2e2;
    color: var(--danger);
    border: none;
    padding: .35rem .85rem;
    border-radius: 8px;
    font-size: .85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all .2s ease;
}

.btn-remove:hover {
    background: var(--danger);
    color: #fff;
}

.add-child-btn {
    width: 100%;
    border: 2px dashed var(--primary);
    background: rgba(13,148,136,.05);
    color: var(--primary);
    padding: 1rem;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all .2s ease;
}

.add-child-btn:hover {
    background: rgba(13,148,136,.1);
}

/* ===== Skill Cards ===== */
.skill-child-block {
    background: #fff;
    border: 2px solid var(--gray-200);
    border-radius: 14px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.skill-child-name {
    font-weight: 700;
    color: var(--primary-dark);
    font-size: 1.1rem;
    margin-bottom: 1.25rem;
    padding-bottom: .75rem;
    border-bottom: 2px solid var(--gray-100);
}

.skill-row {
    display: grid;
    grid-template-columns: 140px 1fr;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
    padding: .85rem;
    background: var(--gray-50);
    border-radius: 10px;
}

.skill-label {
    font-weight: 600;
    color: var(--gray-700);
}

.skill-options {
    display: flex;
    gap: .5rem;
    flex-wrap: wrap;
}

.skill-option {
    flex: 1;
    min-width: 100px;
}

.skill-option input[type="radio"] {
    display: none;
}

.skill-option label {
    display: block;
    padding: .55rem .85rem;
    background: #fff;
    border: 2px solid var(--gray-200);
    border-radius: 8px;
    text-align: center;
    cursor: pointer;
    font-weight: 600;
    font-size: .9rem;
    color: var(--gray-700);
    transition: all .2s ease;
    user-select: none;
}

.skill-option label:hover {
    border-color: var(--primary-light);
}

.skill-option input[type="radio"]:checked + label {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
    box-shadow: 0 4px 6px rgba(13,148,136,.25);
}

/* ===== Success Page ===== */
.success-card {
    text-align: center;
    padding: 3rem 2rem;
}

.success-icon {
    width: 100px;
    height: 100px;
    background: linear-gradient(135deg, var(--success), #059669);
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    color: #fff;
    font-size: 3rem;
    animation: scaleIn .5s ease;
}

@keyframes scaleIn {
    from { transform: scale(0); }
    to   { transform: scale(1); }
}

/* ===== Mobile ===== */
@media (max-width: 768px) {
    .wizard-content { padding: 1.5rem 1rem; }
    .wizard-progress { padding: 1.5rem 1rem .75rem; }
    .step-label { font-size: .7rem; }
    .step-circle { width: 36px; height: 36px; font-size: .9rem; }
    .steps-indicator::before, .step-progress-line { top: 18px; }
    .skill-row { grid-template-columns: 1fr; gap: .5rem; }
    .wizard-actions { flex-direction: column-reverse; }
    .wizard-actions .btn { width: 100%; }
}

/* ===== Admin Dashboard ===== */
.admin-sidebar {
    background: linear-gradient(180deg, var(--primary-dark), var(--primary));
    color: #fff;
    min-height: 100vh;
    padding: 1.5rem 0;
}

.admin-sidebar .nav-link {
    color: rgba(255,255,255,.85);
    padding: .75rem 1.5rem;
    border-radius: 0;
    transition: all .2s ease;
}

.admin-sidebar .nav-link:hover,
.admin-sidebar .nav-link.active {
    background: rgba(255,255,255,.15);
    color: #fff;
}

.stat-card {
    background: #fff;
    border-radius: 14px;
    padding: 1.5rem;
    box-shadow: var(--shadow);
    border-right: 4px solid var(--primary);
}

.stat-card .stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-dark);
}

.stat-card .stat-label {
    color: var(--gray-500);
    font-size: .9rem;
}

.data-table {
    background: #fff;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: var(--shadow);
}

.data-table table {
    margin: 0;
}

.data-table th {
    background: var(--gray-50);
    color: var(--gray-700);
    font-weight: 700;
    border: none;
    padding: 1rem;
}

.data-table td {
    padding: 1rem;
    vertical-align: middle;
    border-color: var(--gray-100);
}

.login-card {
    max-width: 420px;
    margin: 5rem auto;
    background: #fff;
    border-radius: 20px;
    padding: 2.5rem;
    box-shadow: var(--shadow-lg);
}
