:root {
    --primary: #0f5e9c;
    --primary-dark: #0b4a7d;
    --success: #1e8e3e;
    --error: #d93025;
    --bg: #f4f6f8;
    --border: #dfe3e8;
    --text: #1f2937;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: "Segoe UI", Tahoma, Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
    direction: rtl;
}

.page-center {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.page-wrap {
    max-width: 900px;
    margin: 0 auto;
    padding: 16px;
}

.card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}

.login-card { max-width: 420px; width: 100%; text-align: center; }

h1 { font-size: 1.4rem; color: var(--primary-dark); margin-bottom: 8px; }
h2 { font-size: 1.1rem; color: var(--primary-dark); margin-top: 0; }
.subtitle { color: #667085; font-size: 0.9rem; margin-bottom: 20px; }

form { display: flex; flex-direction: column; text-align: right; }
label { font-size: 0.85rem; margin: 10px 0 4px; color: #475467; }
input[type="text"], input[type="password"] {
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 1rem;
}

.btn {
    border: none;
    border-radius: 8px;
    padding: 10px 16px;
    font-size: 0.95rem;
    cursor: pointer;
}
.btn-primary { background: var(--primary); color: #fff; margin-top: 16px; }
.btn-primary:hover { background: var(--primary-dark); }
.btn-select { background: var(--primary); color: #fff; width: 100%; margin-top: 10px; }
.btn-select:disabled { background: #b0b7c2; cursor: not-allowed; }
.btn-link { color: var(--primary); text-decoration: none; font-size: 0.9rem; }

.topbar {
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: 16px; font-weight: 600; color: var(--primary-dark);
}

.alert { padding: 12px 16px; border-radius: 8px; margin-bottom: 16px; font-size: 0.9rem; }
.alert-error { background: #fdecea; color: var(--error); border: 1px solid #f6c4bf; }
.alert-success { background: #e8f5e9; color: var(--success); border: 1px solid #b6e0bb; }

.info-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; }
.info-grid .label { display: block; font-size: 0.78rem; color: #667085; }
.info-grid .value { display: block; font-size: 1rem; font-weight: 600; margin-top: 2px; }

.colleges-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; }
.college-item {
    border: 1px solid var(--border); border-radius: 10px; padding: 14px;
    display: flex; flex-direction: column; justify-content: space-between;
}
.college-item.current { border-color: var(--success); background: #f4fbf5; }
.college-item.full { opacity: 0.75; }
.college-name { font-weight: 600; margin-bottom: 8px; }
.college-meta { display: flex; flex-wrap: wrap; gap: 6px; }
.tag { background: #eef2f6; color: #475467; font-size: 0.75rem; padding: 3px 8px; border-radius: 20px; }
.tag-full { background: #fdecea; color: var(--error); }
.tag-current { background: #e8f5e9; color: var(--success); }

.modal-overlay {
    position: fixed; inset: 0; background: rgba(15,23,42,0.5);
    display: flex; align-items: center; justify-content: center; z-index: 50;
}
.modal-box { background: #fff; border-radius: 12px; padding: 28px; width: 90%; max-width: 360px; text-align: center; }
.modal-icon { font-size: 2.2rem; color: var(--success); margin-bottom: 8px; }
.modal-error .modal-icon { color: var(--error); }
