/* Admin Panel - CSS */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    height: 100%;
    overflow: hidden;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

body.dashboard-page {
    background: #f5f7fa !important;
    display: block !important;
    height: 100vh;
    overflow: hidden;
}

.login-container {
    background: white;
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    width: 100%;
    max-width: 400px;
}

.login-container h1 {
    text-align: center;
    color: #333;
    margin-bottom: 30px;
    font-size: 24px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #555;
    font-weight: 500;
}

.form-group input {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 14px;
    transition: border-color 0.3s;
}

.form-group input:focus {
    outline: none;
    border-color: #667eea;
}

.btn {
    width: 100%;
    padding: 12px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s;
}

.btn:hover {
    transform: scale(1.02);
}

.error {
    color: #e74c3c;
    font-size: 14px;
    text-align: center;
    margin-bottom: 20px;
}

.success {
    color: #27ae60;
    font-size: 14px;
    text-align: center;
    margin-bottom: 20px;
}

/* Dashboard Styles */
.dashboard {
    width: 100%;
    height: 100vh;
    background: #f5f7fa;
    display: flex;
    flex-direction: row;
    overflow: hidden;
}

.sidebar {
    width: 250px;
    background: #2c3e50;
    color: white;
    padding: 20px;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
    left: 0;
    top: 0;
    z-index: 1000;
    flex-shrink: 0;
}

.sidebar h2 {
    margin-bottom: 30px;
    font-size: 18px;
    border-bottom: 2px solid #667eea;
    padding-bottom: 10px;
}

.sidebar ul {
    list-style: none;
}

.sidebar ul li {
    margin-bottom: 15px;
}

.sidebar ul li a {
    color: #bdc3c7;
    text-decoration: none;
    display: block;
    padding: 10px 15px;
    border-radius: 5px;
    transition: all 0.3s;
}

.sidebar ul li a:hover,
.sidebar ul li a.active {
    background: #667eea;
    color: white;
}

.main-content {
    margin-left: 250px;
    padding: 20px;
    width: calc(100% - 250px);
    height: 100vh;
    overflow-y: auto;
    overflow-x: hidden;
    background: #f5f7fa;
    display: flex;
    flex-direction: column;
}

.main-content::-webkit-scrollbar {
    width: 8px;
}

.main-content::-webkit-scrollbar-track {
    background: transparent;
}

.main-content::-webkit-scrollbar-thumb {
    background: #bdc3c7;
    border-radius: 4px;
}

.main-content::-webkit-scrollbar-thumb:hover {
    background: #95a5a6;
}

.dashboard-content {
    flex: 1;
    overflow-y: auto;
    padding-right: 5px;
}

.dashboard-content::-webkit-scrollbar {
    width: 6px;
}

.dashboard-content::-webkit-scrollbar-track {
    background: transparent;
}

.dashboard-content::-webkit-scrollbar-thumb {
    background: #d0d0d0;
    border-radius: 3px;
}

.dashboard-content::-webkit-scrollbar-thumb:hover {
    background: #a0a0a0;
}

.header {
    background: white;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.header h1 {
    color: #2c3e50;
    font-size: 24px;
}

.header .user-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.header .logout-btn {
    background: #e74c3c;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    text-decoration: none;
}

.content-card {
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
}

.content-card h2 {
    color: #2c3e50;
    margin-bottom: 20px;
    font-size: 20px;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
}

table thead {
    background: #ecf0f1;
}

table th {
    padding: 12px;
    text-align: left;
    color: #2c3e50;
    font-weight: 600;
    border-bottom: 2px solid #bdc3c7;
}

table td {
    padding: 12px;
    border-bottom: 1px solid #ecf0f1;
}

table tr:hover {
    background: #f8f9fa;
}

.btn-small {
    padding: 6px 12px;
    font-size: 12px;
    margin-right: 5px;
    border: none;
    border-radius: 3px;
    cursor: pointer;
}

.btn-edit {
    background: #3498db;
    color: white;
}

.btn-delete {
    background: #e74c3c;
    color: white;
}

.btn-view {
    background: #27ae60;
    color: white;
}

.btn-info {
    background: #3498db;
    color: white;
    text-decoration: none;
    padding: 6px 12px;
    border-radius: 3px;
    font-size: 12px;
    cursor: pointer;
    border: none;
}

.btn-info:hover {
    background: #2980b9;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.form-group-full {
    grid-column: 1 / -1;
}

.btn-primary {
    background: #667eea;
    color: white;
    padding: 12px 30px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
}

.btn-primary:hover {
    background: #764ba2;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.stat-card {
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.stat-card h3 {
    color: #7f8c8d;
    font-size: 14px;
    margin-bottom: 10px;
}

.stat-card .value {
    color: #667eea;
    font-size: 28px;
    font-weight: bold;
}

.pagination {
    margin-top: 20px;
    text-align: center;
}

.pagination a, .pagination span {
    display: inline-block;
    padding: 8px 12px;
    margin: 0 3px;
    border: 1px solid #bdc3c7;
    border-radius: 5px;
    text-decoration: none;
    color: #667eea;
}

.pagination a:hover {
    background: #667eea;
    color: white;
}

.pagination .active {
    background: #667eea;
    color: white;
    border-color: #667eea;
}

.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
}

.modal-content {
    background-color: #fefefe;
    margin: 5% auto;
    padding: 20px;
    border: 1px solid #888;
    width: 500px;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close:hover {
    color: black;
}

.alert {
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 5px;
    border-left: 4px solid;
}

.alert-success {
    background: #d4edda;
    border-color: #27ae60;
    color: #155724;
}

.alert-error {
    background: #f8d7da;
    border-color: #e74c3c;
    color: #721c24;
}

.alert-info {
    background: #d1ecf1;
    border-color: #3498db;
    color: #0c5460;
}

@media (max-width: 768px) {
    .sidebar {
        width: 100%;
        height: auto;
        position: relative;
    }

    .main-content {
        margin-left: 0;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .modal-content {
        width: 90%;
    }
}
