/* Admin Panel Styles */

:root {
    --primary: #ef4444;
    --primary-dark: #dc2626;
    --secondary: #1f2937;
    --text: #374151;
    --text-light: #6b7280;
    --border: #e5e7eb;
    --bg-light: #f9fafb;
    --white: #ffffff;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg-light);
    color: var(--text);
}

/* Login Page */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #fef2f2 0%, #ffffff 50%, #eff6ff 100%);
    padding: 20px;
}

.login-card {
    width: 100%;
    max-width: 450px;
    background: var(--white);
    padding: 50px;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.1);
}

.login-logo {
    text-align: center;
    margin-bottom: 40px;
}

.login-logo-icon {
    width: 70px;
    height: 70px;
    background: var(--primary);
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
    margin-bottom: 16px;
}

.login-title {
    font-size: 28px;
    font-weight: 700;
    color: var(--secondary);
    margin-bottom: 8px;
}

.login-subtitle {
    color: var(--text-light);
    margin-bottom: 30px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-weight: 500;
    margin-bottom: 8px;
    color: var(--text);
}

.form-group input {
    width: 100%;
    padding: 14px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 15px;
    transition: all 0.3s;
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

.btn {
    width: 100%;
    padding: 14px;
    background: var(--primary);
    color: var(--white);
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.btn:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

.back-link {
    text-align: center;
    margin-top: 20px;
}

.back-link a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
}

.back-link a:hover {
    text-decoration: underline;
}

/* Dashboard Layout */
.dashboard-header {
    background: var(--white);
    border-bottom: 1px solid var(--border);
    padding: 20px 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.dashboard-header .container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.dashboard-logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.dashboard-logo-icon {
    width: 45px;
    height: 45px;
    background: var(--primary);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    color: var(--white);
}

.dashboard-logo-text {
    font-size: 22px;
    font-weight: 700;
    color: var(--secondary);
}

.dashboard-actions {
    display: flex;
    gap: 12px;
}

.btn-sm {
    padding: 10px 20px;
    font-size: 14px;
    width: auto;
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--primary);
    color: var(--primary);
}

.btn-outline:hover {
    background: var(--primary-light);
    transform: translateY(0);
}

/* Dashboard Content */
.dashboard-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 40px 30px;
}

/* Stats Cards */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    margin-bottom: 40px;
}

.stat-card {
    background: var(--white);
    padding: 24px;
    border-radius: 12px;
    border: 2px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.stat-info .stat-label {
    font-size: 14px;
    color: var(--text-light);
    margin-bottom: 8px;
}

.stat-info .stat-value {
    font-size: 32px;
    font-weight: 700;
    color: var(--secondary);
}

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
}

.stat-icon.blue { background: #dbeafe; }
.stat-icon.green { background: #d1fae5; }
.stat-icon.red { background: #fee2e2; }
.stat-icon.purple { background: #ede9fe; }

/* Table Card */
.table-card {
    background: var(--white);
    border-radius: 12px;
    border: 2px solid var(--border);
    overflow: hidden;
}

.table-header {
    padding: 24px;
    border-bottom: 2px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.table-title {
    font-size: 22px;
    font-weight: 700;
    color: var(--secondary);
}

.table-container {
    overflow-x: auto;
}

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

thead {
    background: var(--bg-light);
}

thead th {
    padding: 16px;
    text-align: left;
    font-weight: 600;
    color: var(--secondary);
    font-size: 14px;
}

tbody tr {
    border-bottom: 1px solid var(--border);
    transition: background 0.2s;
}

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

tbody td {
    padding: 16px;
    font-size: 14px;
}

/* Badge */
.badge {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
}

.badge-blue {
    background: #dbeafe;
    color: #1e40af;
}

.badge-yellow {
    background: #fef3c7;
    color: #92400e;
}

.badge-green {
    background: #d1fae5;
    color: #065f46;
}

/* Action Buttons */
.action-buttons {
    display: flex;
    gap: 8px;
}

.btn-icon {
    width: 32px;
    height: 32px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
}

.btn-edit {
    background: #dbeafe;
    color: #1e40af;
    border: 1px solid #93c5fd;
}

.btn-edit:hover {
    background: #bfdbfe;
}

.btn-delete {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.btn-delete:hover {
    background: #fecaca;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal.show {
    display: flex;
}

.modal-content {
    background: var(--white);
    border-radius: 16px;
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-header {
    padding: 24px;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-title {
    font-size: 22px;
    font-weight: 700;
    color: var(--secondary);
}

.modal-close {
    background: none;
    border: none;
    font-size: 28px;
    cursor: pointer;
    color: var(--text-light);
    width: 32px;
}

.modal-body {
    padding: 24px;
}

.modal-footer {
    padding: 24px;
    border-top: 1px solid var(--border);
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

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

.btn-secondary:hover {
    background: var(--border);
    transform: translateY(0);
}

/* Alert */
.alert {
    padding: 16px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.alert-success {
    background: #d1fae5;
    border: 1px solid #86efac;
    color: #065f46;
}

.alert-error {
    background: #fee2e2;
    border: 1px solid #fecaca;
    color: #991b1b;
}

/* Responsive */
@media (max-width: 1024px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .table-container {
        overflow-x: scroll;
    }
    
    .dashboard-header .container {
        flex-direction: column;
        gap: 16px;
    }
}
