/* ========================================
   MASCOTA FELIZ - ADMIN STYLES
   ======================================== */

:root {
    --primary: #2563eb;
    --primary-light: #3b82f6;
    --primary-dark: #1d4ed8;
    --primary-50: #eff6ff;
    --secondary: #10b981;
    --accent: #f59e0b;
    --danger: #ef4444;
    --purple: #8b5cf6;
    --bg-dark: #0f172a;
    --bg-sidebar: #1e293b;
    --bg-main: #f1f5f9;
    --bg-card: #ffffff;
    --text-dark: #0f172a;
    --text-body: #334155;
    --text-muted: #64748b;
    --text-light: #94a3b8;
    --border: #e2e8f0;
    --radius: 12px;
    --radius-lg: 16px;
    --shadow: 0 4px 6px -1px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 25px rgba(0,0,0,0.1);
    --transition: all 0.3s ease;
}

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

body {
    font-family: 'Poppins', sans-serif;
    background: var(--bg-main);
    color: var(--text-body);
    line-height: 1.6;
}

/* ===== LOGIN ===== */
.login-screen {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #0f172a 0%, #1e3a5f 50%, #1e293b 100%);
    padding: 24px;
    position: relative;
}

.login-bg {
    position: absolute;
    inset: 0;
    background: url('https://images.unsplash.com/photo-1548199973-03cce0bbc87b?w=1920&q=60') center/cover;
    opacity: 0.1;
}

.login-card {
    background: white;
    border-radius: var(--radius-lg);
    padding: 48px 40px;
    width: 100%;
    max-width: 420px;
    box-shadow: var(--shadow-lg);
    position: relative;
    z-index: 1;
    text-align: center;
}

.login-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
}

.login-icon i { font-size: 36px; color: white; }

.login-logo h1 {
    font-size: 24px;
    color: var(--text-dark);
    margin-bottom: 4px;
}

.login-logo p {
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 32px;
}

.login-field {
    margin-bottom: 20px;
    text-align: left;
}

.login-field label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 6px;
}

.login-field label i { color: var(--primary); }

.login-field input {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid var(--border);
    border-radius: var(--radius);
    font-family: inherit;
    font-size: 15px;
    outline: none;
    transition: var(--transition);
}

.login-field input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(37,99,235,0.1);
}

.login-error {
    display: block;
    font-size: 12px;
    color: var(--danger);
    margin-top: 6px;
    min-height: 18px;
}

.login-btn {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    border: none;
    border-radius: var(--radius);
    font-family: inherit;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.login-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(37,99,235,0.3);
}

.login-hint {
    font-size: 12px;
    color: var(--text-light);
    margin-top: 20px;
}

.login-hint code {
    background: var(--primary-50);
    padding: 2px 8px;
    border-radius: 4px;
    color: var(--primary);
    font-weight: 600;
}

/* ===== ADMIN LAYOUT ===== */
.admin-panel {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: 260px;
    background: var(--bg-sidebar);
    color: white;
    display: flex;
    flex-direction: column;
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    z-index: 100;
    transition: var(--transition);
}

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

.sidebar-header i {
    font-size: 24px;
    color: var(--primary-light);
}

.sidebar-nav {
    flex: 1;
    padding: 16px 12px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: var(--radius);
    color: rgba(255,255,255,0.6);
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    transition: var(--transition);
}

.sidebar-link:hover {
    color: white;
    background: rgba(255,255,255,0.1);
}

.sidebar-link.active {
    color: white;
    background: var(--primary);
}

.sidebar-link i { width: 20px; text-align: center; }

.sidebar-footer {
    padding: 16px 12px;
    border-top: 1px solid rgba(255,255,255,0.1);
    display: flex;
    flex-direction: column;
    gap: 4px;
}

/* Mobile Header */
.mobile-header {
    display: none;
    background: var(--bg-sidebar);
    color: white;
    padding: 12px 16px;
    align-items: center;
    justify-content: space-between;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 99;
}

.mobile-menu-btn {
    width: 40px;
    height: 40px;
    border: none;
    background: rgba(255,255,255,0.1);
    color: white;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

.mobile-title {
    font-weight: 700;
    font-size: 16px;
}

/* Main Content */
.admin-main {
    flex: 1;
    margin-left: 260px;
    padding: 32px;
    min-height: 100vh;
}

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

.admin-header h1 {
    font-size: 28px;
    color: var(--text-dark);
}

.admin-header p {
    font-size: 14px;
    color: var(--text-muted);
}

.header-actions {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
}

.search-box {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: white;
    border: 2px solid var(--border);
    border-radius: var(--radius);
}

.search-box i { color: var(--text-muted); }

.search-box input {
    border: none;
    outline: none;
    font-family: inherit;
    font-size: 14px;
    width: 200px;
}

.header-actions select {
    padding: 10px 16px;
    border: 2px solid var(--border);
    border-radius: var(--radius);
    font-family: inherit;
    font-size: 14px;
    outline: none;
    background: white;
    cursor: pointer;
}

.admin-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: var(--radius);
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: var(--transition);
}

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

.admin-btn.btn-primary:hover { background: var(--primary-dark); }

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

.admin-btn:not(.btn-primary):not(.btn-secondary) {
    background: white;
    color: var(--text-body);
    border: 2px solid var(--border);
}

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

.stat-card {
    background: white;
    border-radius: var(--radius-lg);
    padding: 24px;
    display: flex;
    align-items: center;
    gap: 16px;
    box-shadow: var(--shadow);
}

.stat-card-icon {
    width: 56px;
    height: 56px;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

.stat-primary .stat-card-icon { background: #eff6ff; color: var(--primary); }
.stat-warning .stat-card-icon { background: #fffbeb; color: var(--accent); }
.stat-success .stat-card-icon { background: #ecfdf5; color: var(--secondary); }
.stat-info .stat-card-icon { background: #f5f3ff; color: var(--purple); }

.stat-card-number {
    display: block;
    font-size: 28px;
    font-weight: 800;
    color: var(--text-dark);
    line-height: 1;
}

.stat-card-label {
    font-size: 13px;
    color: var(--text-muted);
}

/* Charts */
.charts-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 32px;
}

.stats-detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.full-width { grid-column: span 2; }

.chart-card {
    background: white;
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow);
}

.chart-card h3 {
    font-size: 16px;
    color: var(--text-dark);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.chart-card h3 i { color: var(--primary); }

.chart-container { position: relative; }

/* Recent Table */
.recent-card {
    background: white;
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow);
}

.recent-card h3 {
    font-size: 16px;
    color: var(--text-dark);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.recent-card h3 i { color: var(--primary); }

.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.admin-table th {
    padding: 12px 16px;
    text-align: left;
    background: var(--bg-main);
    font-weight: 600;
    color: var(--text-muted);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

.admin-table td {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
}

.admin-table tr:last-child td { border: none; }

.admin-table tr:hover td { background: #f8fafc; }

.empty-msg {
    text-align: center;
    padding: 40px !important;
    color: var(--text-muted);
    font-style: italic;
}

/* Status Badges */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
}

.badge-pending { background: #fffbeb; color: #b45309; }
.badge-confirmed { background: #eff6ff; color: #1d4ed8; }
.badge-progress { background: #f0fdf4; color: #15803d; }
.badge-completed { background: #ecfdf5; color: #047857; }
.badge-cancelled { background: #fef2f2; color: #b91c1c; }

/* Action Buttons */
.table-actions {
    display: flex;
    gap: 6px;
}

.action-btn {
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    transition: var(--transition);
}

.action-btn.btn-edit { background: #eff6ff; color: var(--primary); }
.action-btn.btn-edit:hover { background: var(--primary); color: white; }
.action-btn.btn-delete { background: #fef2f2; color: var(--danger); }
.action-btn.btn-delete:hover { background: var(--danger); color: white; }

/* Tabs */
.tab-content {
    display: none;
    animation: fadeTab 0.3s ease;
}

.tab-content.active { display: block; }

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

/* Modal */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    padding: 24px;
}

.modal-card {
    background: white;
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 460px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

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

.modal-header h3 { font-size: 18px; color: var(--text-dark); }

.modal-header button {
    background: none;
    border: none;
    font-size: 18px;
    color: var(--text-muted);
    cursor: pointer;
}

.modal-body { padding: 24px; }

.modal-body > p {
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 16px;
}

.status-options {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.status-option {
    cursor: pointer;
}

.status-option input { display: none; }

.status-option .status-badge {
    display: block;
    padding: 12px 16px;
    border: 2px solid var(--border);
    border-radius: var(--radius);
    text-align: center;
    transition: var(--transition);
}

.status-option input:checked + .status-badge {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37,99,235,0.1);
}

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

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .charts-grid { grid-template-columns: 1fr; }
    .stats-detail-grid { grid-template-columns: 1fr; }
    .full-width { grid-column: auto; }
}

@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
    }

    .sidebar.open {
        transform: translateX(0);
        box-shadow: 0 0 60px rgba(0,0,0,0.5);
    }

    .mobile-header { display: flex; }

    .admin-main {
        margin-left: 0;
        padding: 80px 16px 32px;
    }

    .admin-header h1 { font-size: 22px; }
    .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
    .stat-card { padding: 16px; }
    .stat-card-number { font-size: 22px; }
    .stat-card-icon { width: 44px; height: 44px; font-size: 18px; }

    .search-box input { width: 140px; }
    .header-actions { width: 100%; }
}

@media (max-width: 480px) {
    .stats-grid { grid-template-columns: 1fr 1fr; }
    .header-actions { flex-direction: column; }
    .search-box { width: 100%; }
    .search-box input { flex: 1; width: auto; }
    .header-actions select { width: 100%; }
}
