/* استبيان كاميرات المعاهد — هوية مستقلة: كحلي + أزرق فولاذي (طابع أمني/مراقبة) */

:root {
    --ink: #121826;
    --ink-light: #1c2436;
    --blue: #3a6ea5;
    --blue-light: #5b8bc2;
    --bg: #f1f3f6;
    --card: #ffffff;
    --border: #dde1e7;
    --text: #1b2230;
    --text-muted: #636d7a;
    --danger: #a3342f;
    --success: #1f6f4a;
    --radius: 8px;
}

* { box-sizing: border-box; max-width: 100%; }
html { direction: rtl; }

body {
    margin: 0;
    font-family: 'Tahoma', 'Cairo', sans-serif;
    background: var(--bg);
    color: var(--text);
    font-size: 15px;
    line-height: 1.7;
    overflow-x: hidden;
    -webkit-text-size-adjust: 100%;
}

a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
a, button, .btn { -webkit-tap-highlight-color: transparent; touch-action: manipulation; }

.site-header {
    background: var(--ink);
    color: #fff;
    padding: 0.9rem 1.5rem;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    border-bottom: 3px solid var(--blue);
}
.site-header .brand { display: flex; flex-direction: column; min-width: 0; }
.site-header .brand .ministry { font-size: 0.78rem; color: #c3c9d4; }
.site-header .brand .title { font-size: 1.05rem; font-weight: 700; }
.site-header nav { display: flex; flex-wrap: wrap; gap: 0.2rem 0.4rem; }
.site-header nav a { color: #fff; font-size: 0.9rem; padding: 0.4rem 0.5rem; display: inline-block; }

.main-content { padding: 1.5rem; max-width: 820px; margin: 0 auto; }

.card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.4rem 1.5rem;
    margin-bottom: 1.2rem;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}
.card h1, .card h2, .card h3 { margin-top: 0; color: var(--ink); }

.field { margin-bottom: 1.1rem; }
label { display: block; font-size: 0.9rem; margin-bottom: 0.35rem; color: var(--text-muted); font-weight: 600; }
input[type=text], input[type=tel], input[type=number], input[type=password], textarea {
    width: 100%;
    padding: 0.65rem 0.8rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-family: inherit;
    font-size: 16px;
    background: #fff;
    color: var(--text);
}
textarea { min-height: 5rem; resize: vertical; }
input:focus, textarea:focus { outline: none; border-color: var(--blue); }

/* honeypot: hidden from real visitors, still reachable/fillable by bots that ignore CSS */
.hp-field { position: absolute; left: -9999px; top: -9999px; }

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 2.3rem;
    padding: 0.6rem 1.4rem;
    border-radius: var(--radius);
    border: 1px solid transparent;
    font-size: 0.95rem;
    cursor: pointer;
    font-family: inherit;
    background: var(--blue);
    color: #fff;
}
.btn:hover { background: var(--blue-light); }

.alert { padding: 0.75rem 1rem; border-radius: var(--radius); margin-bottom: 1rem; font-size: 0.9rem; }
.alert-error { background: #f4e3e2; color: var(--danger); border: 1px solid #e0bcba; }
.alert-success { background: #e2f0ea; color: var(--success); border: 1px solid #bcdccb; }
.alert ul { margin: 0; padding-right: 1.2rem; }

.login-wrap {
    max-width: 380px;
    margin: 4rem auto;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 2rem;
}
.login-wrap h1 { text-align: center; color: var(--ink); font-size: 1.05rem; margin-bottom: 1.5rem; font-weight: 700; }

.site-footer { text-align: center; padding: 1.2rem; font-size: 0.8rem; color: var(--text-muted); border-top: 1px solid var(--border); background: #fff; }

.toolbar { display: flex; flex-wrap: wrap; gap: 0.6rem; align-items: center; justify-content: space-between; margin-bottom: 1rem; }
.toolbar input[type=text] { max-width: 260px; }

table { width: 100%; max-width: 100%; border-collapse: collapse; background: #fff; }
th, td { padding: 0.55rem 0.7rem; border-bottom: 1px solid var(--border); text-align: start; font-size: 0.85rem; word-break: break-word; }
th { background: var(--bg); color: var(--ink); font-weight: 700; }

@media (max-width: 480px) {
    .site-header { padding: 0.7rem 1rem; }
    .main-content { padding: 1rem; }
    .card { padding: 1.1rem; }
    .login-wrap { margin: 2rem auto; padding: 1.5rem; max-width: calc(100% - 2rem); }
}
