/* EPSPK SIS - Main Stylesheet */
/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Tahoma, Arial, sans-serif;
    font-size: 14px;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* Header */
header {
    background-color: #2c3e50;
    color: #fff;
    padding: 15px 0;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

header h1 {
    font-size: 20px;
    font-weight: bold;
    margin-bottom: 5px;
}

.user-info {
    text-align: right;
    font-size: 13px;
}

.user-info span {
    display: block;
    margin-bottom: 3px;
}

/* Navigation */
nav {
    background-color: #34495e;
    padding: 0;
    box-shadow: 0 2px 3px rgba(0,0,0,0.1);
}

nav ul {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
}

nav li {
    margin: 0;
    position: relative;
}

nav a {
    display: block;
    color: #ecf0f1;
    text-decoration: none;
    padding: 12px 18px;
    transition: background-color 0.3s;
}

nav a:hover,
nav a.active {
    background-color: #2c3e50;
}

/* Dropdown Menu Styles */
nav li.has-dropdown {
    position: relative;
}

nav li.has-dropdown > a::after {
    content: " ▼";
    font-size: 10px;
    margin-left: 5px;
}

nav .dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background-color: #2c3e50;
    min-width: 200px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.2);
    z-index: 1000;
    list-style: none;
    padding: 0;
    margin: 0;
}

nav li.has-dropdown:hover .dropdown-menu {
    display: block;
}

nav .dropdown-menu li {
    margin: 0;
    position: static;
}

nav .dropdown-menu a {
    padding: 10px 18px;
    display: block;
    color: #ecf0f1;
    white-space: nowrap;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

nav .dropdown-menu li:last-child a {
    border-bottom: none;
}

nav .dropdown-menu a:hover {
    background-color: #1a252f;
}

/* Main Content */
main {
    background-color: #fff;
    margin: 20px auto;
    padding: 20px;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    min-height: calc(100vh - 200px);
}

/* Alerts */
.alert {
    padding: 12px 15px;
    margin-bottom: 20px;
    border-radius: 4px;
    border: 1px solid transparent;
}

.alert-success {
    background-color: #d4edda;
    border-color: #c3e6cb;
    color: #155724;
}

.alert-error {
    background-color: #f8d7da;
    border-color: #f5c6cb;
    color: #721c24;
}

.alert-info {
    background-color: #d1ecf1;
    border-color: #bee5eb;
    color: #0c5460;
}

/* Forms */
.form-group {
    margin-bottom: 15px;
}

label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    color: #555;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
select,
textarea {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-family: Tahoma, Arial, sans-serif;
    font-size: 14px;
}

textarea {
    resize: vertical;
    min-height: 80px;
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 5px rgba(52, 152, 219, 0.3);
}

input[readonly],
select[disabled],
textarea[readonly] {
    background-color: #f5f5f5;
    cursor: not-allowed;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    font-family: Tahoma, Arial, sans-serif;
    font-size: 14px;
    cursor: pointer;
    text-decoration: none;
    transition: background-color 0.3s;
    text-align: center;
}

.btn-primary {
    background-color: #3498db;
    color: #fff;
}

.btn-primary:hover {
    background-color: #2980b9;
}

.btn-success {
    background-color: #27ae60;
    color: #fff;
}

.btn-success:hover {
    background-color: #229954;
}

.btn-danger {
    background-color: #e74c3c;
    color: #fff;
}

.btn-danger:hover {
    background-color: #c0392b;
}

.btn-secondary {
    background-color: #95a5a6;
    color: #fff;
}

.btn-secondary:hover {
    background-color: #7f8c8d;
}

.btn-block {
    display: block;
    width: 100%;
}

.btn-sm {
    padding: 5px 10px;
    font-size: 12px;
}

/* Search Box */
.search-box {
    margin-bottom: 20px;
}

.search-form {
    display: flex;
    gap: 10px;
}

.search-form input[type="text"] {
    flex: 1;
    min-width: 200px;
}

/* Filter Box */
.filter-box {
    background-color: #f8f9fa;
    padding: 15px;
    border-radius: 4px;
    margin-bottom: 20px;
}

.filter-form {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: flex-end;
}

.filter-form .form-group {
    margin-bottom: 0;
    flex: 1;
    min-width: 150px;
}

/* Table */
table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
}

table th,
table td {
    padding: 10px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

table th {
    background-color: #34495e;
    color: #fff;
    font-weight: bold;
}

table tr:hover {
    background-color: #f5f5f5;
}

table img {
    max-width: 60px;
    height: auto;
    border-radius: 4px;
}

.table-actions {
    white-space: nowrap;
}

.table-actions a,
.table-actions button {
    margin-right: 5px;
}

/* Student Profile */
.student-profile {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 20px;
    margin-bottom: 30px;
}

.student-photo {
    text-align: center;
}

.student-photo img {
    max-width: 261px;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.student-details {
    padding: 10px;
}

.student-details h2 {
    margin-bottom: 20px;
    color: #2c3e50;
    border-bottom: 2px solid #3498db;
    padding-bottom: 10px;
}

.detail-group {
    margin-bottom: 15px;
}

.detail-label {
    font-weight: bold;
    color: #555;
    margin-bottom: 3px;
}

.detail-value {
    color: #333;
    padding-left: 10px;
}

/* Comments Section */
.comments-section {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 2px solid #ddd;
}

.comment {
    background-color: #f8f9fa;
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 15px;
    border-left: 3px solid #3498db;
}

.comment-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 12px;
    color: #666;
}

.comment-author {
    font-weight: bold;
    color: #2c3e50;
}

.comment-text {
    color: #333;
    line-height: 1.5;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 5px;
    margin-top: 20px;
}

.pagination a,
.pagination span {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    text-decoration: none;
    color: #333;
}

.pagination a:hover {
    background-color: #3498db;
    color: #fff;
    border-color: #3498db;
}

.pagination .active {
    background-color: #2c3e50;
    color: #fff;
    border-color: #2c3e50;
}

.pagination .disabled {
    color: #999;
    cursor: not-allowed;
}

/* Login Page */
.login-page {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.login-container {
    width: 100%;
    max-width: 400px;
    padding: 15px;
}

.login-box {
    background-color: #fff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

.login-box h1 {
    font-size: 18px;
    text-align: center;
    color: #2c3e50;
    margin-bottom: 10px;
}

.login-box h2 {
    font-size: 22px;
    text-align: center;
    color: #333;
    margin-bottom: 25px;
}

.login-footer {
    margin-top: 20px;
    text-align: center;
    font-size: 12px;
    color: #666;
}

/* Footer */
footer {
    background-color: #2c3e50;
    color: #ecf0f1;
    text-align: center;
    padding: 15px 0;
    margin-top: 30px;
}

/* Utility Classes */
.text-center {
    text-align: center;
}

.text-right {
    text-align: right;
}

.mt-20 {
    margin-top: 20px;
}

.mb-20 {
    margin-bottom: 20px;
}

.flex {
    display: flex;
}

.flex-between {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.flex-wrap {
    flex-wrap: wrap;
}

.gap-10 {
    gap: 10px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        text-align: center;
    }
    
    .user-info {
        text-align: center;
        margin-top: 10px;
    }
    
    nav ul {
        flex-direction: column;
    }
    
    nav a {
        padding: 10px 15px;
        border-bottom: 1px solid #2c3e50;
    }
    
    .student-profile {
        grid-template-columns: 1fr;
    }
    
    .search-form {
        flex-direction: column;
    }
    
    .filter-form {
        flex-direction: column;
    }
    
    .filter-form .form-group {
        width: 100%;
    }
    
    table {
        font-size: 12px;
    }
    
    table th,
    table td {
        padding: 8px 5px;
    }
    
    .btn {
        padding: 6px 12px;
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    header h1 {
        font-size: 16px;
    }
    
    main {
        padding: 15px;
        margin: 10px auto;
    }
    
    .student-photo img {
        max-width: 100%;
    }
}

/* Print Styles */
@media print {
    header, nav, footer, .no-print {
        display: none;
    }
    
    main {
        box-shadow: none;
        margin: 0;
    }
}
