/* Main CSS for University No-Dues System */
:root {
    --primary-color: #2c3e50;
    --secondary-color: #3498db;
    --tertiary-color: #e74c3c;
    --light-color: #ecf0f1;
    --dark-color: #34495e;
    --success-color: #2ecc71;
    --warning-color: #f39c12;
    --danger-color: #e74c3c;
    --text-color: #333;
    --border-radius: 4px;
    --bg-color: #f9f9f9;
    --card-bg: white;
    --table-hover: #f5f5f5;
    --border-color: #ddd;
}

/* Dark mode variables */
.dark-mode {
    --primary-color: #1a2530;
    --secondary-color: #2980b9;
    --tertiary-color: #c0392b;
    --light-color: #2c3e50;
    --dark-color: #1a242f;
    --text-color: #ecf0f1;
    --bg-color: #121212;
    --card-bg: #1e1e1e;
    --table-hover: #2c2c2c;
    --border-color: #444;
}

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--bg-color);
    transition: background-color 0.3s ease, color 0.3s ease;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* Header styles */
header {
    background-color: var(--primary-color);
    padding: 1rem 0;
    color: white;
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: bold;
}

.logo a {
    color: white;
    text-decoration: none;
}

.nav-links {
    display: flex;
    list-style: none;
}

.nav-links li {
    margin-left: 1.5rem;
}

.nav-links a {
    color: white;
    text-decoration: none;
    transition: color 0.3s;
}

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

/* Main content styles */
main {
    padding: 2rem 0;
    margin-top: 80px; /* Add margin to prevent content from being hidden behind fixed header */
}

.card {
    background-color: var(--card-bg);
    border-radius: var(--border-radius);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    margin-bottom: 1.5rem;
    overflow: hidden;
    transition: background-color 0.3s ease;
}

.card-header {
    background-color: var(--primary-color);
    color: white;
    padding: 1rem;
    font-weight: bold;
}

.card-body {
    padding: 1.5rem;
}

/* Form styles */
.form-group {
    margin-bottom: 1rem;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

input[type="text"],
input[type="password"],
input[type="email"],
select,
textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    font-size: 1rem;
    background-color: var(--card-bg);
    color: var(--text-color);
    transition: background-color 0.3s ease, color 0.3s ease;
}

.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: var(--border-radius);
    cursor: pointer;
    text-decoration: none;
    font-size: 1rem;
    transition: background-color 0.3s;
}

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

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

.btn-primary:hover {
    background-color: #2980b9;
}

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

.btn-success:hover {
    background-color: #27ae60;
}

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

.btn-danger:hover {
    background-color: #c0392b;
}

/* Table styles */
.table {
    width: 100%;
    border-collapse: collapse;
}

.table th,
.table td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

.table th {
    background-color: var(--light-color);
    font-weight: 600;
}

.table tr:hover {
    background-color: var(--table-hover);
}

/* Alert styles */
.alert {
    padding: 1rem;
    margin-bottom: 1rem;
    border-radius: var(--border-radius);
    border: none;
    position: relative;
    animation: slideInDown 0.5s ease-out;
}

.alert-success {
    background-color: #d4edda;
    color: #155724;
    border-left: 4px solid #28a745;
    box-shadow: 0 2px 4px rgba(40, 167, 69, 0.1);
}

.alert-danger {
    background-color: #f8d7da;
    color: #721c24;
    border-left: 4px solid #dc3545;
    box-shadow: 0 2px 4px rgba(220, 53, 69, 0.1);
}

.alert-info {
    background-color: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

.alert-dismissible {
    padding-right: 3rem;
}

.alert-dismissible .close {
    position: absolute;
    top: 0;
    right: 0;
    padding: 1rem;
    color: inherit;
    background: none;
    border: none;
    font-size: 1.5rem;
    font-weight: bold;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.3s;
}

.alert-dismissible .close:hover {
    opacity: 1;
}

.alert i {
    margin-right: 0.5rem;
    font-size: 1.1rem;
}

/* Alert animations */
@keyframes slideInDown {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Dark mode alert adjustments */
.dark-mode .alert-success {
    background-color: #1e4d2b;
    color: #d4edda;
    border-left-color: #28a745;
}

.dark-mode .alert-danger {
    background-color: #4d1e1e;
    color: #f8d7da;
    border-left-color: #dc3545;
}

/* Dashboard specific styles */
.dashboard-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.dashboard-card {
    background-color: white;
    border-radius: var(--border-radius);
    padding: 1.5rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.dashboard-card h3 {
    margin-bottom: 0.5rem;
    color: var(--primary-color);
}

.dashboard-card p {
    font-size: 2rem;
    font-weight: bold;
    color: var(--secondary-color);
}

/* Section containers */
.section-container {
    margin-bottom: 3rem;
}

.section-title {
    color: var(--primary-color);
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--secondary-color);
}

/* Management cards */
.management-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.management-card {
    background-color: white;
    border-radius: 15px;
    padding: 2rem;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.management-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
}

.management-card-icon {
    background: linear-gradient(135deg, var(--secondary-color), var(--primary-color));
    color: white;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    flex-shrink: 0;
}

.management-card-content {
    flex: 1;
}

.management-card-content h4 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    font-size: 1.3rem;
}

.management-card-content p {
    color: var(--text-color);
    margin-bottom: 1rem;
    line-height: 1.5;
}

.management-card-content .btn {
    margin-top: 0.5rem;
}

/* Status indicators */
.status {
    display: inline-block;
    padding: 0.35rem 0.75rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

.status-pending {
    background-color: #ffeeba;
    color: #856404;
}

.status-approved {
    background-color: #d4edda;
    color: #155724;
}

.status-rejected {
    background-color: #f8d7da;
    color: #721c24;
}

/* Footer styles */
footer {
    background-color: var(--primary-color);
    color: white;
    padding: 1.5rem 0;
    text-align: center;
    margin-top: 2rem;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .navbar {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .nav-links {
        margin-top: 1rem;
        flex-direction: column;
    }
    
    .nav-links li {
        margin-left: 0;
        margin-bottom: 0.5rem;
    }
    
    .dashboard-cards {
        grid-template-columns: 1fr;
    }
}

/* Dark mode toggle */
.theme-toggle {
    display: flex;
    align-items: center;
    margin-left: 1.5rem;
    cursor: pointer;
}

.theme-toggle-icon {
    font-size: 1.2rem;
    margin-right: 5px;
}

/* Enhanced Table Styles */
.table-responsive {
    overflow-x: auto;
    border-radius: var(--border-radius);
}

.table {
    margin-bottom: 0;
}

.table-header th {
    background: linear-gradient(135deg, var(--primary-color), var(--dark-color));
    color: white;
    font-weight: 600;
    padding: 1rem 0.75rem;
    border: none;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.table-header th i {
    margin-right: 0.5rem;
    opacity: 0.8;
}

.table-row {
    transition: all 0.3s ease;
    border-bottom: 1px solid var(--border-color);
}

.table-row:hover {
    background-color: rgba(52, 152, 219, 0.05);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.table-row td {
    padding: 1rem 0.75rem;
    vertical-align: middle;
    border: none;
}

/* User Info Styles */
.user-info, .user-name, .user-email, .department-info {
    display: flex;
    align-items: center;
}

.username {
    font-weight: 600;
    color: var(--primary-color);
}

.user-name {
    font-weight: 500;
    color: var(--text-color);
}

.user-email {
    color: var(--secondary-color);
    font-size: 0.9rem;
}

.department-info {
    color: var(--text-color);
    font-size: 0.9rem;
}

/* Role Badge Styles */
.role-badge {
    display: inline-block;
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.role-clerk {
    background-color: #e3f2fd;
    color: #1976d2;
}

.role-hod {
    background-color: #f3e5f5;
    color: #7b1fa2;
}

.role-hostel-admin {
    background-color: #e8f5e8;
    color: #388e3c;
}

.role-mess-admin {
    background-color: #fff3e0;
    color: #f57c00;
}

.role-sports-admin {
    background-color: #fce4ec;
    color: #c2185b;
}

.role-library-admin {
    background-color: #e0f2f1;
    color: #00796b;
}

/* Action Buttons */
.action-buttons {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
}

.action-btn {
    padding: 0.5rem 1rem;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    transition: all 0.3s ease;
    font-size: 0.85rem;
    font-weight: 500;
    gap: 0.3rem;
    min-width: 80px;
}

.action-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.action-btn i {
    font-size: 0.8rem;
}

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

.action-btn.btn-primary:hover {
    background-color: #2980b9;
}

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

.action-btn.btn-danger:hover {
    background-color: #c0392b;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--text-color);
}

.empty-icon {
    font-size: 4rem;
    color: var(--border-color);
    margin-bottom: 1rem;
}

.empty-state h5 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.empty-state p {
    color: var(--text-color);
    opacity: 0.7;
    max-width: 400px;
    margin: 0 auto;
    line-height: 1.6;
}

/* Badge Styles */
.badge {
    display: inline-block;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Dark mode adjustments */
.dark-mode .table-header th {
    background: linear-gradient(135deg, var(--dark-color), var(--primary-color));
}

.dark-mode .table-row:hover {
    background-color: rgba(52, 152, 219, 0.1);
}

.dark-mode .role-badge {
    opacity: 0.9;
}

.dark-mode .empty-icon {
    color: var(--border-color);
}

/* Department Info Styles */
.department-info, .department-code, .department-description {
    display: flex;
    align-items: center;
}

.department-name {
    font-weight: 600;
    color: var(--primary-color);
}

.department-code {
    justify-content: center;
}

.code-badge {
    background-color: var(--secondary-color);
    color: white;
    padding: 0.3rem 0.6rem;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.department-description {
    color: var(--text-color);
    font-size: 0.9rem;
    line-height: 1.4;
}

/* Dark mode adjustments */
.dark-mode .code-badge {
    background-color: var(--secondary-color);
    opacity: 0.9;
}

/* Facility Info Styles */
.facility-info, .facility-type, .facility-location, .facility-capacity, .facility-status {
    display: flex;
    align-items: center;
}

.facility-name {
    font-weight: 600;
    color: var(--primary-color);
}

.facility-type {
    justify-content: center;
}

.type-badge {
    padding: 0.3rem 0.6rem;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.type-hostel {
    background-color: #e8f5e8;
    color: #388e3c;
}

.type-mess {
    background-color: #fff3e0;
    color: #f57c00;
}

.type-sports {
    background-color: #fce4ec;
    color: #c2185b;
}

.facility-location {
    color: var(--text-color);
    font-size: 0.9rem;
}

.facility-capacity {
    justify-content: center;
}

.capacity-badge {
    background-color: var(--secondary-color);
    color: white;
    padding: 0.3rem 0.6rem;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 600;
}

.facility-status {
    justify-content: center;
}

.status-badge {
    padding: 0.3rem 0.6rem;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-active {
    background-color: #d4edda;
    color: #155724;
}

.status-inactive {
    background-color: #f8d7da;
    color: #721c24;
}

.status-maintenance {
    background-color: #fff3cd;
    color: #856404;
}

/* Dark mode adjustments */
.dark-mode .type-badge {
    opacity: 0.9;
}

.dark-mode .capacity-badge {
    background-color: var(--secondary-color);
    opacity: 0.9;
}

.dark-mode .status-badge {
    opacity: 0.9;
}

/* Departments grid for clerk dashboard */
.departments-grid {
    display: grid;
    grid-template-columns: repeat(1, 1fr);
    gap: 1.2rem;
    align-items: stretch;
}

@media (min-width: 600px) {
    .departments-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
@media (min-width: 900px) {
    .departments-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}
@media (min-width: 1200px) {
    .departments-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

.department-card-grid-item,
.department-card-grid-item > a,
.department-card-grid-item .dashboard-card {
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* Enhanced Department Card Grid Item Styles */
.departments-grid .dashboard-card {
    height: 100%;
    display: flex;
    align-items: center;
    border: 1.5px solid var(--border-color);
    border-radius: var(--border-radius);
    box-shadow: 0 2px 6px rgba(44, 62, 80, 0.06);
    background: white;
    transition: box-shadow 0.25s, transform 0.18s, background 0.18s, border-color 0.18s;
    cursor: pointer;
}
.departments-grid .dashboard-card:hover {
    box-shadow: 0 8px 24px rgba(52, 152, 219, 0.18), 0 1.5px 6px rgba(44, 62, 80, 0.10);
    transform: translateY(-4px) scale(1.035);
    background: var(--light-color);
    border-color: var(--secondary-color);
}

.departments-grid .dashboard-card i {
    transition: color 0.18s;
}
.departments-grid .dashboard-card:hover i {
    color: var(--primary-color);
} 