/* ============================================
   NATIONAL UNIVERSITY OFFICIAL COLORS
   ============================================ */
@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@300;400;500;600;700;800&display=swap');

:root {
    --nu-blue: #0056B3;
    --nu-blue-dark: #003366;
    --nu-blue-light: #e8f0fe;
    --nu-gold: #FFC107;
    --nu-gold-dark: #E6A800;
    --nu-white: #FFFFFF;
    --nu-light-bg: #F8FAFE;
    --nu-gray-light: #E9ECEF;
    --nu-gray: #ADB5BD;
    --nu-text-primary: #1A2C3E;
    --nu-text-secondary: #6C757D;
    --nu-success: #28A745;
    --nu-danger: #DC3545;
    --nu-warning: #FFC107;
    --nu-info: #17A2B8;
    --nu-purple: #7B1FA2;
}

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

body {
    font-family: 'Cairo', 'Tahoma', sans-serif;
    background: var(--nu-light-bg);
    direction: rtl;
}

/* Top Accent Bar */
.nu-top-accent {
    height: 4px;
    background: linear-gradient(90deg, var(--nu-gold) 0%, var(--nu-gold-dark) 50%, var(--nu-gold) 100%);
    width: 100%;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1000;
}

/* Page Container */
.nu-page-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

/* Header */
.nu-header {
    background: var(--nu-white);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 25px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    border: 1px solid rgba(0,86,179,0.1);
}

.nu-header h2 {
    color: var(--nu-blue-dark);
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0;
}

.nu-header h2 i {
    color: var(--nu-gold);
    margin-left: 10px;
}

.nu-header p {
    color: var(--nu-text-secondary);
    margin: 5px 0 0 0;
    font-size: 0.85rem;
}

/* Cards */
.nu-card {
    background: var(--nu-white);
    border-radius: 12px;
    margin-bottom: 25px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    border: 1px solid rgba(0,86,179,0.1);
    overflow: hidden;
}

.nu-card-header {
    background: linear-gradient(135deg, var(--nu-blue) 0%, var(--nu-blue-dark) 100%);
    color: white;
    padding: 15px 20px;
    font-weight: 600;
    font-size: 1rem;
}

.nu-card-header i {
    margin-left: 10px;
    color: var(--nu-gold);
}

.nu-card-body {
    padding: 20px;
}

/* Form Elements */
.nu-form-group {
    margin-bottom: 15px;
}

.nu-label {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--nu-text-primary);
    margin-bottom: 5px;
}

.nu-label i {
    color: var(--nu-gold);
    margin-left: 5px;
    width: 20px;
}

.nu-input,
.nu-select {
    width: 100%;
    padding: 10px 12px;
    border: 1.5px solid var(--nu-gray-light);
    border-radius: 8px;
    font-size: 0.85rem;
    font-family: inherit;
    transition: all 0.2s;
    background: var(--nu-white);
}

.nu-input:focus,
.nu-select:focus {
    outline: none;
    border-color: var(--nu-blue);
    box-shadow: 0 0 0 3px rgba(0,86,179,0.1);
}

/* Buttons */
.nu-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 8px 20px;
    font-size: 0.8rem;
    font-weight: 600;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
}

.nu-btn-primary {
    background: var(--nu-blue);
    color: white;
}

.nu-btn-primary:hover {
    background: var(--nu-blue-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0,86,179,0.3);
}

.nu-btn-success {
    background: var(--nu-success);
    color: white;
}

.nu-btn-success:hover {
    background: #1e7e34;
    transform: translateY(-1px);
}

.nu-btn-danger {
    background: var(--nu-danger);
    color: white;
}

.nu-btn-danger:hover {
    background: #c82333;
}

.nu-btn-warning {
    background: var(--nu-warning);
    color: var(--nu-blue-dark);
}

.nu-btn-warning:hover {
    background: #e0a800;
}

.nu-btn-outline {
    background: transparent;
    border: 1.5px solid var(--nu-blue);
    color: var(--nu-blue);
}

.nu-btn-outline:hover {
    background: var(--nu-blue);
    color: white;
}

.nu-btn-sm {
    padding: 5px 12px;
    font-size: 0.7rem;
}

.nu-btn-group {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 20px;
}

/* Table */
.nu-table-wrapper {
    overflow-x: auto;
}

.nu-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.8rem;
}

.nu-table th {
    background: var(--nu-light-bg);
    color: var(--nu-blue-dark);
    padding: 12px 10px;
    text-align: center;
    border-bottom: 2px solid var(--nu-gold);
    font-weight: 700;
    white-space: nowrap;
}

.nu-table td {
    padding: 10px;
    text-align: center;
    border-bottom: 1px solid var(--nu-gray-light);
    color: var(--nu-text-secondary);
    vertical-align: middle;
}

.nu-table tr:hover td {
    background: rgba(0,86,179,0.02);
}

/* Role Badges */
.nu-role-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 600;
    white-space: nowrap;
}

.nu-role-admin { background: linear-gradient(135deg, #0056B3, #003366); color: white; }
.nu-role-committee { background: linear-gradient(135deg, #2E7D32, #1B5E20); color: white; }
.nu-role-accountant { background: linear-gradient(135deg, #F57C00, #E65100); color: white; }
.nu-role-instructor { background: linear-gradient(135deg, #7B1FA2, #4A0072); color: white; }
.nu-role-viewer { background: linear-gradient(135deg, #6C757D, #495057); color: white; }
.nu-role-default { background: #E9ECEF; color: #495057; }

/* Permission Badges */
.nu-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 10px;
    border-radius: 15px;
    font-size: 0.65rem;
    font-weight: 600;
}

.nu-badge-success { background: #28A745; color: white; }
.nu-badge-secondary { background: #6C757D; color: white; }
.nu-badge-info { background: #17A2B8; color: white; }
.nu-badge-warning { background: #FFC107; color: #003366; }
.nu-badge-purple { background: #7B1FA2; color: white; }

/* Action Buttons */
.nu-action-btn {
    width: 30px;
    height: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    border: 1px solid var(--nu-gray-light);
    background: white;
    color: var(--nu-text-secondary);
    cursor: pointer;
    transition: all 0.2s;
    margin: 0 2px;
}

.nu-action-btn:hover {
    border-color: var(--nu-blue);
    color: var(--nu-blue);
    transform: translateY(-2px);
}

.nu-action-btn-danger:hover {
    border-color: var(--nu-danger);
    color: var(--nu-danger);
}

.nu-action-btn-warning:hover {
    border-color: var(--nu-warning);
    color: var(--nu-warning);
}

.nu-action-btn-purple:hover {
    border-color: var(--nu-purple);
    color: var(--nu-purple);
}

/* Statistics Cards */
.nu-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 15px;
    margin-top: 20px;
}

.nu-stat-card {
    background: var(--nu-white);
    border: 1px solid rgba(0,86,179,0.1);
    border-radius: 12px;
    padding: 15px;
    text-align: center;
    transition: all 0.2s;
}

.nu-stat-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
    border-color: var(--nu-gold);
}

.nu-stat-number {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--nu-blue-dark);
    margin: 0;
}

.nu-stat-label {
    font-size: 0.7rem;
    color: var(--nu-text-secondary);
    margin: 5px 0 0;
}

/* College Container */
.nu-college-container {
    background: var(--nu-light-bg);
    border: 1px solid var(--nu-gray-light);
    border-radius: 8px;
    padding: 15px;
    margin-top: 10px;
}

/* Subject Assignment */
.nu-subject-container {
    background: var(--nu-light-bg);
    border-radius: 8px;
    padding: 15px;
    margin-top: 10px;
}

.nu-subject-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    max-height: 200px;
    overflow-y: auto;
    padding: 10px;
}

.nu-subject-tag {
    background: linear-gradient(135deg, var(--nu-blue), var(--nu-blue-dark));
    color: white;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.7rem;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.nu-subject-tag .remove-subject {
    background: rgba(255,255,255,0.2);
    border-radius: 50%;
    width: 18px;
    height: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 0.7rem;
}

.nu-subject-tag .remove-subject:hover {
    background: rgba(255,255,255,0.4);
}

/* Alerts */
.nu-alert {
    padding: 12px 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.nu-alert-success {
    background: #D4EDDA;
    border: 1px solid #28A745;
    color: #155724;
}

.nu-alert-danger {
    background: #F8D7DA;
    border: 1px solid #DC3545;
    color: #721C24;
}

.nu-alert-info {
    background: #D1ECF1;
    border: 1px solid #17A2B8;
    color: #0C5460;
}

/* Modal */
.nu-modal-header {
    background: linear-gradient(135deg, var(--nu-blue), var(--nu-blue-dark));
    color: white;
    padding: 15px 20px;
}

.nu-modal-header .btn-close {
    filter: brightness(0) invert(1);
}

/* Footer */
.nu-footer {
    text-align: center;
    padding: 20px;
    font-size: 0.7rem;
    color: var(--nu-text-secondary);
    border-top: 1px solid var(--nu-gray-light);
    margin-top: 30px;
}

/* Utility */
.text-gold { color: var(--nu-gold); }
.text-blue { color: var(--nu-blue); }
.mb-2 { margin-bottom: 10px; }
.mt-2 { margin-top: 10px; }
.mt-3 { margin-top: 15px; }
.mb-3 { margin-bottom: 15px; }
.me-1 { margin-left: 5px; }
.ms-1 { margin-right: 5px; }
.w-100 { width: 100%; }
.text-center { text-align: center; }
.text-right { text-align: right; }
.d-flex { display: flex; }
.align-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: 10px; }
.gap-3 { gap: 15px; }

/* Responsive */
@media (max-width: 768px) {
    .nu-page-container { padding: 10px; }
    .nu-card-body { padding: 15px; }
    .nu-table th, .nu-table td { font-size: 0.7rem; padding: 6px; }
    .nu-action-btn { width: 26px; height: 26px; }
    .nu-stats { grid-template-columns: repeat(2, 1fr); }
}
/* Additional styles for instructor subjects section */
.nu-subjects-section {
    margin-top: 30px;
    padding: 20px;
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border-radius: 15px;
    border: 1px solid rgba(0,86,179,0.15);
}

.nu-subjects-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--nu-gold);
}

.nu-subjects-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--nu-blue-dark);
}

.nu-subjects-title i {
    color: var(--nu-gold);
    margin-left: 10px;
}

/* Active instructor badge */
.nu-active-instructor {
    background: linear-gradient(135deg, var(--nu-blue), var(--nu-blue-dark));
    color: white;
    padding: 8px 15px;
    border-radius: 30px;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 0.85rem;
}

/* Subject filter bar */
.nu-subject-filter {
    background: var(--nu-light-bg);
    border-radius: 12px;
    padding: 15px;
    margin-bottom: 20px;
}

/* Subject cards grid */
.nu-subjects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 15px;
    max-height: 400px;
    overflow-y: auto;
    padding: 5px;
}

.nu-subject-card {
    background: var(--nu-white);
    border: 1px solid var(--nu-gray-light);
    border-radius: 12px;
    padding: 15px;
    transition: all 0.2s;
    position: relative;
}

.nu-subject-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    border-color: var(--nu-blue);
}

.nu-subject-card.assigned {
    background: linear-gradient(135deg, #e8f5e9, #c8e6c9);
    border-color: #4caf50;
}

.nu-subject-code {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--nu-blue-dark);
    margin-bottom: 5px;
}

.nu-subject-name {
    font-size: 0.8rem;
    color: var(--nu-text-secondary);
    margin-bottom: 10px;
}

.nu-subject-hours {
    font-size: 0.7rem;
    color: var(--nu-gold-dark);
    margin-bottom: 12px;
}

.nu-subject-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.nu-badge-assigned {
    background: #4caf50;
    color: white;
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 0.65rem;
    position: absolute;
    top: 10px;
    right: 10px;
}

/* Search input */
.nu-search-input {
    position: relative;
}

.nu-search-input i {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--nu-gray);
}

.nu-search-input input {
    padding-right: 35px;
}

/* Batch assignment */
.nu-batch-selector {
    background: var(--nu-light-bg);
    border-radius: 10px;
    padding: 12px;
    margin-top: 15px;
}

/* Selected instructor info */
.nu-selected-instructor {
    background: linear-gradient(135deg, var(--nu-gold-light), #ffeaa7);
    border-radius: 12px;
    padding: 15px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 15px;
}

.nu-instructor-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.nu-instructor-avatar {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--nu-blue), var(--nu-blue-dark));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
}

.nu-instructor-details h4 {
    margin: 0;
    font-size: 1rem;
    color: var(--nu-blue-dark);
}

.nu-instructor-details p {
    margin: 5px 0 0;
    font-size: 0.75rem;
    color: var(--nu-text-secondary);
}

/* Quick assign button */
.nu-quick-assign {
    background: linear-gradient(135deg, #4caf50, #45a049);
    color: white;
    border: none;
    padding: 8px 20px;
    border-radius: 25px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.2s;
}

.nu-quick-assign:hover {
    transform: scale(1.05);
    box-shadow: 0 3px 10px rgba(76, 175, 80, 0.3);
}

/* Checkbox styling */
.nu-checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.nu-checkbox input {
    width: 18px;
    height: 18px;
    cursor: pointer;
}