:root {
    --primary-teal: #0D9488;
    --light-teal: #E0F2F1;
    --bg-gray: #F9FAFB;
    --text-dark: #1F2937;
    --text-muted: #6B7280;
    --success-green: #10B981;
    --danger-red: #EF4444;
    --warning-orange: #F59E0B;
    --white: #FFFFFF;
}

* { box-sizing: border-box; margin: 0; padding: 0; font-family: 'Tajawal', sans-serif; -webkit-tap-highlight-color: transparent; }
body { background-color: var(--bg-gray); color: var(--text-dark); height: 100vh; display: flex; flex-direction: column; }

header { background-color: var(--primary-teal); color: var(--white); padding: 20px; display: flex; justify-content: space-between; align-items: center; border-bottom-left-radius: 20px; border-bottom-right-radius: 20px; box-shadow: 0 4px 15px rgba(13, 148, 136, 0.2); position: sticky; top: 0; z-index: 100; }
.header-right { display: flex; align-items: center; gap: 10px; }
.back-btn { background: none; border: none; color: white; font-size: 20px; cursor: pointer; display: none; }
.logo { font-size: 22px; font-weight: 900; }
.subtitle { font-size: 13px; opacity: 0.9; }

.container { padding: 20px; max-width: 500px; margin: 0 auto; width: 100%; flex-grow: 1; padding-bottom: 90px; }
.view { display: none; animation: fadeIn 0.3s ease; }
.view.active { display: block; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

/* النماذج والأزرار */
.form-group { margin-bottom: 15px; }
.form-label { display: block; margin-bottom: 5px; font-weight: 700; font-size: 14px; color: var(--text-dark); }
.form-input { width: 100%; padding: 12px 15px; border: 1px solid #D1D5DB; border-radius: 12px; font-size: 15px; outline: none; transition: border 0.2s; }
.form-input:focus { border-color: var(--primary-teal); }

.primary-btn { width: 100%; background-color: var(--primary-teal); color: white; border: none; padding: 15px; border-radius: 12px; font-size: 16px; font-weight: 700; cursor: pointer; margin-top: 10px; transition: opacity 0.2s; }
.primary-btn:active { opacity: 0.8; }
.btn-outline { background-color: white; color: var(--primary-teal); border: 2px solid var(--primary-teal); }
.btn-danger-outline { background-color: white; color: var(--danger-red); border: 2px solid var(--danger-red); }
.btn-warning-outline { background-color: white; color: var(--warning-orange); border: 2px solid var(--warning-orange); }

.coord-group { display: flex; gap: 10px; }
.coord-group .form-input { font-size: 13px; text-align: left; direction: ltr; }
#map { width: 100%; height: 250px; border-radius: 12px; margin-top: 10px; border: 1px solid #D1D5DB; background-color: #E5E7EB; }
.map-hint { font-size: 12px; color: var(--text-muted); margin-top: 5px; text-align: center; }

/* كروت البداية */
.login-cards { display: flex; flex-direction: column; gap: 15px; margin-top: 40px; }
.role-card { background: var(--white); border: 2px solid transparent; border-radius: 16px; padding: 25px; text-align: center; cursor: pointer; box-shadow: 0 4px 15px rgba(0,0,0,0.04); }
.role-card:active { transform: scale(0.98); border-color: var(--primary-teal); background: var(--light-teal); }
.role-title { font-size: 20px; font-weight: 700; color: var(--primary-teal); }

/* الأزرار العائمة */
.fab-btn { position: fixed; bottom: 30px; left: 30px; background-color: var(--primary-teal); color: white; width: 60px; height: 60px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 30px; box-shadow: 0 4px 15px rgba(13, 148, 136, 0.4); border: none; cursor: pointer; z-index: 10; }
.settings-fab-btn { position: fixed; bottom: 30px; right: 30px; background-color: var(--white); color: var(--primary-teal); width: 60px; height: 60px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 26px; box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1); border: 2px solid var(--primary-teal); cursor: pointer; z-index: 10; }

.empty-state { text-align: center; margin-top: 50px; color: var(--text-muted); }

/* واجهة الأب */
.parent-status-box { background: var(--white); border-radius: 20px; padding: 30px 20px; text-align: center; box-shadow: 0 4px 15px rgba(0,0,0,0.04); margin-top: 20px; transition: all 0.3s ease; }
.status-circle { width: 100px; height: 100px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 40px; margin: 0 auto 15px auto; transition: all 0.3s ease; }
.status-text { font-size: 22px; font-weight: 900; margin-bottom: 5px; }
.status-sub { font-size: 14px; color: var(--text-muted); }
.report-absent-btn { width: 100%; padding: 15px; border-radius: 12px; font-size: 16px; font-weight: 700; margin-top: 30px; cursor: pointer; transition: all 0.2s; }

/* كروت السائق */
.student-card { background: var(--white); border-radius: 16px; padding: 16px; margin-bottom: 16px; box-shadow: 0 2px 10px rgba(0,0,0,0.03); display: flex; flex-direction: column; gap: 10px; border-right: 4px solid var(--primary-teal); }
.student-card.absent { border-right-color: var(--danger-red); opacity: 0.7; }
.student-card.present { border-right-color: var(--success-green); opacity: 0.7; }
.student-info-row { display: flex; justify-content: space-between; align-items: center; }
.student-name { font-size: 18px; font-weight: 700; }
.parent-name { font-size: 13px; color: var(--text-muted); margin-top: 4px; }
.actions-row { display: flex; gap: 5px; }
.small-btn { padding: 8px 12px; border-radius: 8px; text-decoration: none; font-weight: 700; font-size: 13px; border: none; cursor: pointer; }
.btn-loc { background-color: var(--light-teal); color: var(--primary-teal); }
.btn-edit { background-color: #E5E7EB; color: #374151; }

.driver-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 10px; border-top: 1px solid #eee; padding-top: 10px; }
.btn-action { border: none; padding: 10px; border-radius: 8px; font-weight: 700; cursor: pointer; color: white; }
.btn-present { background-color: var(--success-green); }
.btn-absent { background-color: var(--danger-red); }
.status-badge { text-align: center; padding: 8px; border-radius: 8px; font-weight: 700; font-size: 14px; }
/* نظام الإشعارات المنبثقة (Toasts) */
.toast-container {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 90%;
    max-width: 400px;
}

.toast {
    background-color: var(--text-dark);
    color: white;
    padding: 15px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 700;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    display: flex;
    align-items: center;
    justify-content: space-between;
    animation: slideDown 0.3s ease forwards;
}

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