* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background: #f4f7fc;
    display: flex;
    justify-content: center;
    padding: 30px 20px;
}

.portal-container {
    max-width: 1400px;
    width: 100%;
    background: white;
    border-radius: 28px;
    box-shadow: 0 20px 40px rgba(0, 20, 50, 0.15);
    padding: 30px 30px 40px;
}

.portal-header {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 28px;
    border-bottom: 2px solid #eef3f8;
    padding-bottom: 20px;
}

.portal-header h1 {
    font-weight: 600;
    font-size: 2rem;
    color: #0b2a4a;
    letter-spacing: -0.5px;
}

.portal-header h1 i {
    color: #2a7de1;
    margin-right: 12px;
}

.header-actions {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
}

.btn {
    padding: 10px 22px;
    border: none;
    border-radius: 40px;
    font-weight: 600;
    font-size: 0.95rem;
    background: white;
    color: #1e3a5f;
    transition: 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    text-decoration: none;
    border: 1px solid #d9e2ec;
}

.btn-primary {
    background: #1a5bbf;
    border: 1px solid #1a5bbf;
    color: white;
    box-shadow: 0 6px 14px rgba(26, 91, 191, 0.25);
}

.btn-primary i { color: white; }
.btn-primary:hover { background: #1348a0; border-color: #1348a0; transform: translateY(-2px); }

.btn-outline { background: transparent; }
.btn-outline:hover { background: #eef5fe; border-color: #b6cae0; }

.btn-success {
    background: #1f9d6a;
    border: 1px solid #1f9d6a;
    color: white;
}
.btn-success:hover { background: #188055; border-color: #188055; }

.btn-danger {
    background: #d1454b;
    border: 1px solid #d1454b;
    color: white;
}
.btn-danger:hover { background: #b5373d; border-color: #b5373d; }

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 18px;
    margin-bottom: 30px;
}

.stat-card {
    background: #f9fcff;
    border-radius: 20px;
    padding: 16px 18px;
    border: 1px solid #e2edf7;
    display: flex;
    align-items: center;
    gap: 14px;
}

.stat-card i {
    font-size: 2.2rem;
    color: #2a7de1;
    opacity: 0.7;
}

.stat-info h4 { font-size: 0.9rem; color: #4f6f8f; font-weight: 500; }
.stat-info span { font-size: 1.8rem; font-weight: 700; color: #0b2a4a; }

.section-title {
    font-size: 1.3rem;
    font-weight: 600;
    color: #0f2c47;
    margin: 30px 0 16px 0;
    display: flex;
    align-items: center;
    gap: 12px;
}

.section-title i { color: #2a7de1; }

.table-wrapper {
    overflow-x: auto;
    border-radius: 18px;
    border: 1px solid #e3edf5;
    background: white;
    margin-bottom: 20px;
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
    min-width: 700px;
}

th {
    background: #f2f8fe;
    color: #1d3c5e;
    font-weight: 600;
    padding: 16px 14px;
    text-align: left;
    border-bottom: 2px solid #d9e6f2;
}

td {
    padding: 14px 14px;
    border-bottom: 1px solid #e9f0f7;
    color: #1f3b57;
    vertical-align: middle;
}

tr:last-child td { border-bottom: none; }

.action-icons a {
    margin: 0 6px;
    color: #5f7f9f;
    text-decoration: none;
    transition: 0.15s;
    font-size: 1.1rem;
}

.action-icons a:hover { color: #1a5bbf; }
.action-icons a:last-child:hover { color: #d1454b; }

.empty-row td { text-align: center; padding: 28px; color: #6b8aa8; font-style: italic; }

/* Form Styles */
.form-container {
    padding: 20px 0;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    font-weight: 600;
    color: #1d3c5e;
    margin-bottom: 6px;
    font-size: 0.9rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    padding: 10px 14px;
    border: 1px solid #d9e2ec;
    border-radius: 10px;
    font-size: 0.95rem;
    transition: 0.2s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #2a7de1;
    box-shadow: 0 0 0 3px rgba(42, 125, 225, 0.15);
}

.form-group textarea {
    min-height: 80px;
    resize: vertical;
}

.form-actions {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    padding-top: 10px;
}

.alert {
    padding: 15px 20px;
    border-radius: 12px;
    margin-bottom: 20px;
}

.alert-error {
    background: #ffe8e8;
    color: #b5373d;
    border: 1px solid #f5c6c6;
}

/* Badge styles */
.badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    color: #1d3c5e;
}

.badge-admin {
    background: #dbeafe;
    color: #1a5bbf;
}

.badge-staff {
    background: #d1fae5;
    color: #065f46;
}

.badge-student {
    background: #fef3c7;
    color: #92400e;
}
@media (max-width: 700px) {
    .portal-container { padding: 18px; }
    .portal-header { flex-direction: column; align-items: start; gap: 14px; }
    .header-actions { width: 100%; justify-content: start; flex-wrap: wrap; }
    .form-grid { grid-template-columns: 1fr; }
}