* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background: linear-gradient(135deg, #eef2ff, #bfdbfe);
    direction: rtl;
    min-height: 100vh;
}

.container {
    max-width: 1400px;
    margin: auto;
    padding: 1rem;
}

/* Navbar */
.navbar {
    background: #1e40af;
    border-radius: 2rem;
    padding: 0.8rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    color: white;
    margin-bottom: 2rem;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.nav-brand {
    font-size: 1.4rem;
    font-weight: bold;
}

.nav-links a, .navbar a {
    color: white;
    text-decoration: none;
    margin-right: 1rem;
}

/* Buttons */
.btn {
    background: #2563eb;
    border: none;
    color: white;
    padding: 0.5rem 1.2rem;
    border-radius: 2rem;
    cursor: pointer;
    font-weight: bold;
    transition: 0.2s;
}

.btn:hover {
    background: #1d4ed8;
    transform: translateY(-2px);
}

.btn-sm {
    padding: 0.2rem 0.8rem;
    font-size: 0.8rem;
    background: #e2e8f0;
    color: black;
}

.btn-danger {
    background: #dc2626;
}

/* Forms */
.form-input, select, textarea {
    width: 100%;
    padding: 0.6rem;
    margin: 0.5rem 0;
    border: 1px solid #cbd5e1;
    border-radius: 1rem;
    background: white;
}

/* Tables */
.data-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 1rem;
    overflow: hidden;
    margin-top: 1rem;
}

.data-table th {
    background: #1e40af;
    color: white;
    padding: 0.6rem;
    text-align: right;
}

.data-table td {
    padding: 0.5rem;
    border-bottom: 1px solid #e2e8f0;
}

/* Cards */
.dashboard-card {
    background: white;
    border-radius: 1.5rem;
    padding: 1.2rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.school-ad {
    background: linear-gradient(120deg, #1e3a8a, #3b82f6);
    border-radius: 1rem;
    padding: 0.8rem 1.2rem;
    color: white;
    margin-bottom: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.hero {
    background: linear-gradient(135deg, #1e3a8a, #3b82f6);
    border-radius: 2rem;
    padding: 3rem 2rem;
    text-align: center;
    color: white;
    margin-bottom: 2rem;
}

.hero h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.news-card {
    background: white;
    border-radius: 1rem;
    overflow: hidden;
    cursor: pointer;
    transition: 0.2s;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.news-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.15);
}

.news-img {
    width: 100%;
    height: 180px;
    object-fit: cover;
}

.square-news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

.news-square {
    background: white;
    border-radius: 1rem;
    overflow: hidden;
    cursor: pointer;
    transition: 0.2s;
}

.news-square:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.15);
}

.news-square-img {
    width: 100%;
    height: 180px;
    object-fit: cover;
}

.login-wrapper {
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    background: linear-gradient(135deg, #1e3a8a, #60a5fa);
}

.login-card {
    background: white;
    border-radius: 2rem;
    padding: 2rem;
    width: 400px;
    max-width: 90%;
    text-align: center;
}

.tab {
    display: inline-block;
    padding: 0.4rem 1rem;
    background: #e2e8f0;
    border-radius: 2rem;
    margin: 0.2rem;
    cursor: pointer;
}

.tab.active {
    background: #2563eb;
    color: white;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

.preview-img {
    max-width: 150px;
    max-height: 150px;
    margin-top: 0.5rem;
    border-radius: 0.5rem;
}

@media (max-width: 768px) {
    .navbar {
        flex-direction: column;
        text-align: center;
    }
    .hero h1 {
        font-size: 1.8rem;
    }
}