:root {
    --primary-color: #E55722;
    --secondary-color: #bf360c;
    --accent-color: #ffca28;
    --text-color: #333;
    --bg-color: #f4f7f6;
    --card-bg: #ffffff;
    --border-radius: 12px;
    --box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;

    /* Responsive font sizes using clamp(min, preferred, max) */
    --fs-body: clamp(0.875rem, 1.5vw, 1rem);
    /* 14px → 16px */
    --fs-small: clamp(0.75rem, 1.2vw, 0.9rem);
    /* 12px → 14.4px */
    --fs-h2: clamp(1.1rem, 2.5vw, 1.6rem);
    /* 17.6px → 25.6px */
    --fs-h3: clamp(0.95rem, 2vw, 1.25rem);
    /* 15.2px → 20px */
    --fs-value: clamp(1rem, 2vw, 1.2rem);
    /* 16px → 19.2px */
    --fs-btn: clamp(0.85rem, 1.5vw, 1rem);
    /* 13.6px → 16px */
    --fs-table: clamp(0.78rem, 1.3vw, 0.95rem);
    /* 12.5px → 15.2px */
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-family);
    background-color: var(--bg-color);
    color: var(--text-color);
    font-size: var(--fs-body);
    font-weight: bold;
    line-height: 1.6;
    direction: rtl;
    /* Default for Arabic content */
}

a {
    text-decoration: none;
    color: var(--primary-color);
    transition: color 0.3s;
}

a:hover {
    color: var(--secondary-color);
}

/* Layout Utilities */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.text-center {
    text-align: center;
}

.font-weight-bold {
    font-weight: 700;
}

/* Card Component */
.card {
    background: var(--card-bg);
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    padding: 2rem;
    margin-bottom: 2rem;
    border-top: 5px solid var(--primary-color);
}

/* Header & Logos */
header {
    background: #fff;
    padding: 1rem 0;
    margin-bottom: 2rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: nowrap;
    gap: 1rem;
}

.logo-img {
    max-height: 100px;
    width: auto;
}

.college-info {
    text-align: center;
    flex-grow: 1;
}

.college-info h2 {
    color: var(--primary-color);
    font-size: var(--fs-h2);
    margin-bottom: 0.5rem;
}

.college-info h3 {
    font-size: var(--fs-h3);
}

.college-info p {
    font-size: var(--fs-body);
}

.login-logo {
    max-width: 120px;
    height: auto;
    margin-bottom: 1rem;
    transition: transform 0.3s ease;
}

.login-logo:hover {
    transform: scale(1.05);
}

/* Login Form */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 80vh;
}

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

.form-group {
    margin-bottom: 1.5rem;
}

.input-field {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: var(--fs-btn);
    transition: border-color 0.3s;
}

.input-field:focus {
    border-color: var(--primary-color);
    outline: none;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
    padding: 12px 25px;
    border: none;
    border-radius: 8px;
    font-size: var(--fs-btn);
    cursor: pointer;
    width: 100%;
    transition: background-color 0.3s;
}

.btn-primary:hover {
    background-color: var(--secondary-color);
}

/* Result Tables */
.result-table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
    overflow: hidden;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
}

.result-table thead tr {
    background-color: var(--primary-color);
    color: #ffffff;
    text-align: center;
    font-weight: bold;
}

.result-table th,
.result-table td {
    padding: 10px 12px;
    border-bottom: 1px solid #ddd;
    font-size: var(--fs-table);
}

.result-table tbody tr:last-of-type {
    border-bottom: 2px solid var(--primary-color);
}

.result-table tbody tr:hover {
    background-color: #f1f1f1;
}

/* Result Summary Info */
.student-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.info-item {
    background: #e3f2fd;
    padding: 1rem;
    border-radius: 8px;
    text-align: center;
}

.info-label {
    display: block;
    font-size: var(--fs-small);
    color: #666;
    margin-bottom: 0.3rem;
}

.info-value {
    font-size: var(--fs-value);
    color: var(--primary-color);
    font-weight: bold;
}

/* Footer & Buttons */
.logout-btn {
    display: inline-block;
    padding: 8px 16px;
    background-color: #dc3545;
    color: white;
    border-radius: 6px;
    font-size: var(--fs-btn);
}

.logout-btn:hover {
    background-color: #c82333;
    color: white;
}

/* Responsive */
@media (max-width: 768px) {
    .header-row {
        flex-direction: row;
        text-align: right;
    }



    .card {
        padding: 1.2rem;
    }

    .student-summary {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 10px;
    }

    .card {
        padding: 1rem;
        margin-bottom: 1rem;
    }

    .logo-img {
        max-height: 70px;
    }

    .student-summary {
        grid-template-columns: 1fr;
    }

    .result-table th,
    .result-table td {
        padding: 8px 8px;
    }
}