/* Admin Panel Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #1e40af;
    --secondary: #0ea5e9;
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
    --dark: #1e293b;
    --light: #f8fafc;
    --border: #e2e8f0;
    --text: #1e293b;
    --text-light: #64748b;
}

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

/* Login Page */
.login-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
}

.login-container {
    width: 100%;
    max-width: 400px;
    padding: 2rem;
}

.login-card {
    background: white;
    border-radius: 16px;
    padding: 2.5rem;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

.login-header {
    text-align: center;
    margin-bottom: 2rem;
}

.login-header h1 {
    font-size: 2rem;
    color: var(--primary);
    margin-bottom: 0.5rem;
}

.login-header p {
    color: var(--text-light);
}

.login-form .form-group {
    margin-bottom: 1.5rem;
}

.login-form label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--text);
}

.login-form input[type="text"],
.login-form input[type="password"] {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid var(--border);
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s;
}

.login-form input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(30, 64, 175, 0.1);
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
}

.error-message {
    background: #fee2e2;
    color: var(--danger);
    padding: 0.75rem;
    border-radius: 8px;
    margin-top: 1rem;
    text-align: center;
}

/* Admin Layout */
.admin-header {
    background: white;
    padding: 1rem 2rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.sidebar-toggle {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
}

.user-menu {
    position: relative;
    cursor: pointer;
}

.user-dropdown {
    display: none;
    position: absolute;
    right: 0;
    top: 100%;
    background: white;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    border-radius: 8px;
    margin-top: 0.5rem;
    min-width: 150px;
}

.user-dropdown a {
    display: block;
    padding: 0.75rem 1rem;
    text-decoration: none;
    color: var(--text);
    transition: background 0.3s;
}

.user-dropdown a:hover {
    background: var(--light);
}

.user-menu:hover .user-dropdown {
    display: block;
}

/* Sidebar */
.sidebar {
    position: fixed;
    left: 0;
    top: 60px;
    width: 250px;
    height: calc(100vh - 60px);
    background: white;
    box-shadow: 2px 0 4px rgba(0,0,0,0.1);
    overflow-y: auto;
    transition: transform 0.3s;
    z-index: 50;
}

.sidebar-nav {
    padding: 1rem 0;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.5rem;
    text-decoration: none;
    color: var(--text);
    transition: all 0.3s;
    border-left: 3px solid transparent;
}

.nav-item:hover {
    background: var(--light);
    border-left-color: var(--primary);
}

.nav-item.active {
    background: var(--light);
    border-left-color: var(--primary);
    color: var(--primary);
    font-weight: 600;
}

.nav-item .icon {
    font-size: 1.2rem;
}

/* Main Content */
.main-content {
    margin-left: 250px;
    padding: 2rem;
    min-height: calc(100vh - 60px);
}

.page-header {
    margin-bottom: 2rem;
}

.page-header h1 {
    font-size: 2rem;
    color: var(--text);
    margin-bottom: 0.5rem;
}

.page-header p {
    color: var(--text-light);
}

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

.stat-card {
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.stat-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.stat-card-title {
    color: var(--text-light);
    font-size: 0.9rem;
}

.stat-card-icon {
    font-size: 2rem;
}

.stat-card-value {
    font-size: 2rem;
    font-weight: bold;
    color: var(--text);
}

.stat-card-change {
    font-size: 0.85rem;
    margin-top: 0.5rem;
}

.stat-card-change.positive {
    color: var(--success);
}

.stat-card-change.negative {
    color: var(--danger);
}

/* Charts */
.dashboard-charts {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 1.5rem;
}

.chart-card {
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.chart-card h3 {
    margin-bottom: 1rem;
    color: var(--text);
}

/* Buttons */
.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
    display: inline-block;
}

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

.btn-primary:hover {
    background: #1e3a8a;
    transform: translateY(-2px);
}

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

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

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

.btn-block {
    width: 100%;
}

/* Tables */
.table-container {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    overflow: hidden;
}

.table {
    width: 100%;
    border-collapse: collapse;
}

.table thead {
    background: var(--light);
}

.table th {
    padding: 1rem;
    text-align: left;
    font-weight: 600;
    color: var(--text);
    border-bottom: 2px solid var(--border);
}

.table td {
    padding: 1rem;
    border-bottom: 1px solid var(--border);
}

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

/* Forms */
.form-container {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    max-width: 800px;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
    margin-bottom: 1rem;
}

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--text);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid var(--border);
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(30, 64, 175, 0.1);
}

/* Notification Modal */
.notification-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 10000;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease-out;
}

.notification-modal.active {
    display: flex;
}

.notification-modal-content {
    background: white;
    border-radius: 16px;
    padding: 2rem;
    max-width: 400px;
    width: 90%;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    text-align: center;
    animation: slideUp 0.3s ease-out;
    position: relative;
}

.notification-modal-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.notification-modal.success .notification-modal-icon {
    color: var(--success);
}

.notification-modal.error .notification-modal-icon {
    color: var(--danger);
}

.notification-modal.warning .notification-modal-icon {
    color: var(--warning);
}

.notification-modal-message {
    font-size: 1.1rem;
    color: var(--text);
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.notification-modal-button {
    background: var(--primary);
    color: white;
    border: none;
    padding: 0.75rem 2rem;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    width: 100%;
}

.notification-modal-button:hover {
    background: #1e3a8a;
    transform: translateY(-2px);
}

.notification-modal.success .notification-modal-button {
    background: var(--success);
}

.notification-modal.success .notification-modal-button:hover {
    background: #059669;
}

.notification-modal.error .notification-modal-button {
    background: var(--danger);
}

.notification-modal.error .notification-modal-button:hover {
    background: #dc2626;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        transform: translateY(30px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.modal-content {
    background: white;
    border-radius: 16px;
    padding: 2rem;
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.modal-header h2 {
    color: var(--primary);
}

.close-btn {
    font-size: 2rem;
    cursor: pointer;
    color: var(--text-light);
    background: none;
    border: none;
    line-height: 1;
}

.close-btn:hover {
    color: var(--text);
}

/* Responsive */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
    }
    
    .sidebar.open {
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .dashboard-charts {
        grid-template-columns: 1fr;
    }
    
    .notification-modal-content {
        max-width: 90%;
        padding: 1.5rem;
    }
    
    .notification-modal-icon {
        font-size: 3rem;
    }
    
    .notification-modal-message {
        font-size: 1rem;
    }
}

