/**
 * HCMC Tourism Dashboard - Admin Panel Styles
 */

@import url('https://fonts.googleapis.com/css2?family=Be+Vietnam+Pro:wght@300;400;500;600;700&display=swap');

:root {
    --admin-primary: #7B2CBF;
    --admin-primary-dark: #5A1E8C;
    --admin-secondary: #00B4D8;
    --admin-success: #10B981;
    --admin-warning: #F59E0B;
    --admin-danger: #EF4444;
    --admin-bg: #F3F4F6;
    --admin-card: #FFFFFF;
    --admin-sidebar: #1F2937;
    --admin-text: #374151;
    --admin-text-light: #6B7280;
    --admin-border: #E5E7EB;
}

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

body {
    font-family: 'Be Vietnam Pro', sans-serif;
    background: var(--admin-bg);
    color: var(--admin-text);
    min-height: 100vh;
}

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

.login-card {
    background: white;
    padding: 40px;
    border-radius: 16px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    width: 100%;
    max-width: 400px;
}

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

.login-logo img {
    width: 80px;
    border-radius: 12px;
}

.login-logo h1 {
    font-size: 1.5rem;
    color: var(--admin-primary);
    margin-top: 15px;
}

.login-logo p {
    color: var(--admin-text-light);
    font-size: 0.9rem;
}

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

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

.form-group input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--admin-border);
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
    font-family: inherit;
}

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

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
}

.btn-primary {
    background: var(--admin-primary);
    color: white;
    width: 100%;
}

.btn-primary:hover {
    background: var(--admin-primary-dark);
    transform: translateY(-2px);
}

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

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

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

.btn-sm {
    padding: 8px 16px;
    font-size: 0.875rem;
}

.alert {
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 0.9rem;
}

.alert-error {
    background: #FEE2E2;
    color: #DC2626;
    border: 1px solid #FECACA;
}

.alert-success {
    background: #D1FAE5;
    color: #059669;
    border: 1px solid #A7F3D0;
}

/* Admin Layout */
.admin-layout {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.admin-sidebar {
    width: 260px;
    background: var(--admin-sidebar);
    color: white;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
}

.sidebar-header {
    padding: 20px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    display: flex;
    align-items: center;
    gap: 12px;
}

.sidebar-header img {
    width: 40px;
    height: 40px;
    border-radius: 8px;
}

.sidebar-header h2 {
    font-size: 1rem;
    font-weight: 600;
}

.sidebar-header p {
    font-size: 0.75rem;
    opacity: 0.7;
}

.sidebar-nav {
    padding: 20px 0;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    color: rgba(255,255,255,0.7);
    text-decoration: none;
    transition: all 0.3s ease;
    border-left: 3px solid transparent;
}

.nav-item:hover,
.nav-item.active {
    background: rgba(255,255,255,0.1);
    color: white;
    border-left-color: var(--admin-primary);
}

.nav-item i {
    width: 20px;
    text-align: center;
}

/* Main Content */
.admin-main {
    flex: 1;
    margin-left: 260px;
    padding: 30px;
}

.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.admin-header h1 {
    font-size: 1.75rem;
    color: var(--admin-text);
}

.user-menu {
    display: flex;
    align-items: center;
    gap: 15px;
}

.user-info {
    text-align: right;
}

.user-info .name {
    font-weight: 600;
    color: var(--admin-text);
}

.user-info .role {
    font-size: 0.8rem;
    color: var(--admin-text-light);
}

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

.admin-stat-card {
    background: white;
    padding: 24px;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.admin-stat-card .icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 16px;
}

.admin-stat-card .icon.purple { background: rgba(123,44,191,0.1); }
.admin-stat-card .icon.blue { background: rgba(0,180,216,0.1); }
.admin-stat-card .icon.green { background: rgba(16,185,129,0.1); }
.admin-stat-card .icon.orange { background: rgba(245,158,11,0.1); }

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

.admin-stat-card .label {
    color: var(--admin-text-light);
    font-size: 0.9rem;
    margin-top: 4px;
}

/* Cards */
.card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    margin-bottom: 20px;
}

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

.card-header h3 {
    font-size: 1.1rem;
    color: var(--admin-text);
}

.card-body {
    padding: 24px;
}

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

.table th,
.table td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid var(--admin-border);
}

.table th {
    font-weight: 600;
    color: var(--admin-text-light);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

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

.table .actions {
    display: flex;
    gap: 8px;
}

/* Forms */
.form-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.form-group textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--admin-border);
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
    resize: vertical;
    min-height: 100px;
}

.form-group textarea:focus {
    outline: none;
    border-color: var(--admin-primary);
}

.form-group select {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--admin-border);
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
    background: white;
}

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

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

.modal {
    background: white;
    border-radius: 16px;
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
}

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

.modal-header h3 {
    font-size: 1.2rem;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--admin-text-light);
}

.modal-body {
    padding: 24px;
}

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

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

@media (max-width: 768px) {
    .admin-sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        z-index: 1000;
    }
    
    .admin-sidebar.active {
        transform: translateX(0);
    }
    
    .admin-main {
        margin-left: 0;
    }
    
    .admin-stats {
        grid-template-columns: 1fr;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
}
