/* بوابة المعلم — أولوية للجوال (بدون تدرج أخضر) */

:root {
    --primary-color: #334155;
    --primary-hover: #1e293b;
    --text-main: #1e293b;
    --text-muted: #64748b;
    --bg-body: #e2e8f0;
    --bg-card: #ffffff;
    --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.08);
    --border-radius: 10px;
    --font-family: "Cairo", system-ui, sans-serif;
}

.tp-body {
    margin: 0;
    min-height: 100vh;
    font-family: "Cairo", system-ui, sans-serif;
    background: linear-gradient(180deg, #e8ecf4 0%, #dce3ee 38%, #f1f4f8 38%, #f8fafc 100%);
    color: #1e293b;
}

.tp-topbar {
    position: sticky;
    top: 0;
    z-index: 100;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 0.65rem 1rem;
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 2px 12px rgba(15, 23, 42, 0.08);
    border-bottom: 1px solid rgba(148, 163, 184, 0.35);
}

.tp-brand {
    font-weight: 700;
    color: #0f172a;
    text-decoration: none;
    font-size: 1rem;
}

.tp-brand i {
    margin-inline-end: 0.35rem;
    color: #475569;
    font-style: normal;
}

.tp-nav {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem;
}

.tp-nav-link {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.4rem 0.65rem;
    border-radius: 999px;
    font-size: 0.85rem;
    color: #334155;
    text-decoration: none;
    background: #e2e8f0;
    font-style: normal;
}

.tp-nav-link:hover {
    background: #cbd5e1;
    color: #0f172a;
}

.tp-nav-out {
    background: #fef2f2;
    color: #b91c1c;
}

.tp-main {
    max-width: 640px;
    margin: 0 auto;
    padding: 1rem 1rem 2.5rem;
}

.tp-hero {
    background: #fff;
    border-radius: 1rem;
    padding: 1.1rem 1.25rem;
    margin-bottom: 1rem;
    box-shadow: 0 4px 20px rgba(15, 23, 42, 0.06);
    border: 1px solid rgba(148, 163, 184, 0.25);
}

.tp-hero h1 {
    font-size: 1.25rem;
    margin: 0 0 0.25rem;
    color: #0f172a;
}

.tp-hero p {
    margin: 0;
    font-size: 0.9rem;
    color: #64748b;
}

.tp-student-list {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.tp-card {
    display: block;
    background: #fff;
    border-radius: 0.85rem;
    padding: 1rem 1.1rem;
    text-decoration: none;
    color: inherit;
    box-shadow: 0 2px 14px rgba(15, 23, 42, 0.06);
    border: 1px solid rgba(148, 163, 184, 0.28);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.tp-card:active {
    transform: scale(0.99);
}

.tp-card:hover {
    box-shadow: 0 6px 22px rgba(15, 23, 42, 0.1);
}

.tp-card-name {
    font-weight: 700;
    font-size: 1.05rem;
    margin-bottom: 0.35rem;
    color: #0f172a;
}

.tp-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1rem;
    font-size: 0.82rem;
    color: #64748b;
}

.tp-card-meta i {
    color: #64748b;
    font-style: normal;
}

.tp-card-go {
    margin-top: 0.65rem;
    font-size: 0.88rem;
    font-weight: 600;
    color: #334155;
}

.tp-empty {
    text-align: center;
    padding: 2rem 1rem;
    background: #fff;
    border-radius: 1rem;
    color: #64748b;
    border: 1px solid rgba(148, 163, 184, 0.25);
}

/* صفحة تسجيل الدخول فقط — خلفية هادئة، بدون خط مائل أخضر */
.tp-login-page--auth {
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    font-family: "Cairo", system-ui, sans-serif;
    background: #f1f5f9;
    background-image: radial-gradient(ellipse 120% 80% at 50% -20%, #e2e8f0 0%, #f1f5f9 45%, #f8fafc 100%);
    color: #1e293b;
}

.tp-login-page--auth .tp-login-card {
    width: 100%;
    max-width: 400px;
    background: #fff;
    border-radius: 1.1rem;
    padding: 1.5rem 1.35rem;
    box-shadow: 0 12px 40px rgba(15, 23, 42, 0.1);
    border: 1px solid rgba(148, 163, 184, 0.35);
}

.tp-login-page--auth .tp-login-card h1 {
    font-size: 1.2rem;
    text-align: center;
    margin: 0 0 0.35rem;
    color: #0f172a;
    font-style: normal;
}

.tp-login-page--auth .tp-login-card h1 i {
    color: #475569;
    font-style: normal;
    margin-inline-end: 0.35rem;
}

.tp-login-page--auth .sub {
    text-align: center;
    font-size: 0.88rem;
    color: #64748b;
    margin-bottom: 1.25rem;
    font-style: normal;
}

.tp-login-page--auth .tp-login-submit {
    background: #334155;
    border-color: #334155;
}

.tp-login-page--auth .tp-login-submit:hover {
    background: #1e293b;
    border-color: #1e293b;
}

.tp-login-page--auth .tp-login-backlink a {
    color: #475569;
    font-style: normal;
}

.tp-login-page--auth .tp-login-backlink a:hover {
    color: #0f172a;
    text-decoration: underline !important;
}

/* حقول الإدخال في واجهة المعلم: النص والكتابة لليمين */
.tp-body input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="file"]):not([type="hidden"]),
.tp-body textarea,
.tp-body select,
.tp-login-page--auth input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="file"]):not([type="hidden"]),
.tp-login-page--auth textarea,
.tp-login-page--auth select {
    direction: rtl;
    text-align: right;
}

.tp-body input::placeholder,
.tp-body textarea::placeholder,
.tp-login-page--auth input::placeholder,
.tp-login-page--auth textarea::placeholder {
    text-align: right;
    direction: rtl;
}

@media (min-width: 768px) {
    .tp-main {
        max-width: 720px;
    }
}
