/* ============================================
   ADMIN PANEL - INSTANTETRIPS
   Styles extracted from index.html
   ============================================ */

/* ===========================================
   BASE STYLES
   =========================================== */
body {
    background-color: #f3f4f6;
    color: #111;
    font-family: 'Inter', sans-serif;
    transition: background 0.3s, color 0.3s;
}

body.dark {
    background-color: #0f172a;
    color: #e2e8f0;
}

/* ===========================================
   GLASS / VISUAL UTILITIES
   =========================================== */
.glass-card {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.4);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.15);
}

.dark .glass-card {
    background: rgba(15, 23, 42, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.gradient-bg {
    background: linear-gradient(-45deg, #f3f4f6, #dbeafe, #fce7f3, #ffedd5, #f3f4f6);
    background-size: 400% 400%;
    animation: gradientShift 20s ease infinite;
}

.dark .gradient-bg {
    background: linear-gradient(-45deg, #0f172a, #1e1b4b, #1e293b, #0f172a);
    background-size: 400% 400%;
}

@keyframes gradientShift {
    0%,
    100% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
}

/* ===========================================
   BUTTONS
   =========================================== */
.btn-primary {
    background: linear-gradient(135deg, #171717 0%, #262626 100%);
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
}

.dark .btn-primary {
    background: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

/* ===========================================
   FORM INPUTS
   =========================================== */
.accent-input {
    transition: all 0.2s ease;
    border: 1px solid transparent;
}

.accent-input:focus {
    border-color: #f97316;
    box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.15);
    outline: none;
}

/* ===========================================
   MODALS
   =========================================== */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    z-index: 50;
    display: none;
    place-items: center;
}

.modal-overlay.open {
    display: grid;
}

.modal-content {
    animation: modalSlideUp 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

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

/* ===========================================
   LOADER
   =========================================== */
.loader {
    width: 48px;
    height: 48px;
    border: 5px solid #FFF;
    border-bottom-color: #f97316;
    border-radius: 50%;
    display: inline-block;
    box-sizing: border-box;
    animation: rotation 1s linear infinite;
}

@keyframes rotation {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

/* ===========================================
   SCROLLBAR
   =========================================== */
.hide-scroll::-webkit-scrollbar {
    display: none;
}

/* ===========================================
   DASHBOARD CARDS
   =========================================== */
.dash-card {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.dash-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* ===========================================
   TOURS MANAGER
   =========================================== */
.country-tab {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s;
    font-weight: 600;
    font-size: 0.9rem;
}

.dark .country-tab {
    background: #1e293b;
    border-color: #334155;
}

.country-tab:hover {
    border-color: #f97316;
}

.country-tab.active {
    background: linear-gradient(135deg, #f97316, #ea580c);
    color: #fff;
    border-color: transparent;
}

.country-tab .flag {
    font-size: 1.2rem;
}

.country-tab .count {
    font-size: 0.75rem;
    opacity: 0.7;
}

.tour-card-admin {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.2s;
}

.dark .tour-card-admin {
    background: #1e293b;
    border-color: #334155;
}

.tour-card-admin:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.tour-card-admin .tour-img {
    height: 120px;
    background-size: cover;
    background-position: center;
    position: relative;
}

.tour-card-admin .tour-ciudad {
    position: absolute;
    bottom: 8px;
    left: 8px;
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: capitalize;
}

.tour-card-admin .tour-info {
    padding: 12px;
}

.tour-card-admin .tour-info h4 {
    font-size: 0.95rem;
    font-weight: 700;
    margin-bottom: 6px;
    line-height: 1.3;
}

.tour-card-admin .tour-meta {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    color: #6b7280;
}

.tour-card-admin .tour-meta .precio {
    font-weight: 700;
    color: #10b981;
}

.tour-card-admin .tour-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    padding: 0 12px 12px;
}

.tour-card-admin .btn-edit,
.tour-card-admin .btn-delete {
    padding: 6px;
    border-radius: 8px;
    background: #f3f4f6;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 1rem;
}

.dark .tour-card-admin .btn-edit,
.dark .tour-card-admin .btn-delete {
    background: #374151;
}

.tour-card-admin .btn-edit:hover {
    background: #dbeafe;
    color: #2563eb;
}

.tour-card-admin .btn-delete:hover {
    background: #fee2e2;
    color: #dc2626;
}

.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #6b7280;
}

.empty-state .icon {
    font-size: 4rem;
    margin-bottom: 15px;
    display: block;
}

.empty-state p {
    margin-bottom: 20px;
}

/* Tour Modal Open State */
#tour-modal.open {
    opacity: 1;
    pointer-events: auto;
}

/* Toast Notifications */
.toast {
    position: fixed;
    bottom: 30px;
    right: 30px;
    padding: 12px 24px;
    border-radius: 14px;
    color: #fff;
    font-weight: 600;
    font-size: 0.9rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    z-index: 100;
    animation: toastIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    display: flex;
    align-items: center;
    gap: 10px;
    backdrop-filter: blur(10px);
}

.toast.success {
    background: linear-gradient(135deg, #10b981, #059669);
}

.toast.error {
    background: linear-gradient(135deg, #ef4444, #dc2626);
}

.toast.toast-exit {
    animation: toastOut 0.3s ease forwards;
}

@keyframes toastIn {
    from {
        opacity: 0;
        transform: translateX(100px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes toastOut {
    to {
        opacity: 0;
        transform: translateX(100px);
    }
}

/* ===========================================
   CUSTOM SCROLLBAR
   =========================================== */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.15);
    border-radius: 10px;
}

.dark ::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(249, 115, 22, 0.4);
}

/* ===========================================
   CARD HOVER GLOW (color-coded by section)
   =========================================== */
.dash-card.card-blog:hover {
    border-color: #f97316;
    box-shadow: 0 20px 40px -10px rgba(249, 115, 22, 0.15), 0 0 0 1px rgba(249, 115, 22, 0.1);
}

.dash-card.card-authors:hover {
    border-color: #3b82f6;
    box-shadow: 0 20px 40px -10px rgba(59, 130, 246, 0.15), 0 0 0 1px rgba(59, 130, 246, 0.1);
}

.dash-card.card-stats:hover {
    border-color: #6366f1;
    box-shadow: 0 20px 40px -10px rgba(99, 102, 241, 0.15), 0 0 0 1px rgba(99, 102, 241, 0.1);
}

.dash-card.card-argentina:hover {
    border-color: #0ea5e9;
    box-shadow: 0 20px 40px -10px rgba(14, 165, 233, 0.15), 0 0 0 1px rgba(14, 165, 233, 0.1);
}

.dash-card.card-mexico:hover {
    border-color: #10b981;
    box-shadow: 0 20px 40px -10px rgba(16, 185, 129, 0.15), 0 0 0 1px rgba(16, 185, 129, 0.1);
}

.dash-card.card-espana:hover {
    border-color: #f59e0b;
    box-shadow: 0 20px 40px -10px rgba(245, 158, 11, 0.15), 0 0 0 1px rgba(245, 158, 11, 0.1);
}

.dash-card.card-tours:hover {
    border-color: #f59e0b;
    box-shadow: 0 20px 40px -10px rgba(245, 158, 11, 0.15), 0 0 0 1px rgba(245, 158, 11, 0.1);
}

.dash-card.card-apis:hover {
    border-color: #a855f7;
    box-shadow: 0 20px 40px -10px rgba(168, 85, 247, 0.15), 0 0 0 1px rgba(168, 85, 247, 0.1);
}

/* ===========================================
   ANIMATED HEADER ACCENT
   =========================================== */
.header-accent {
    height: 3px;
    background: linear-gradient(90deg, #f97316, #ef4444, #8b5cf6, #3b82f6, #10b981, #f97316);
    background-size: 200% 100%;
    animation: headerGradient 4s linear infinite;
}

@keyframes headerGradient {
    0% { background-position: 0% 50%; }
    100% { background-position: 200% 50%; }
}

/* ===========================================
   STATUS BADGES
   =========================================== */
.badge-active {
    background: rgba(16, 185, 129, 0.1);
    color: #10b981;
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.badge-construction {
    background: rgba(245, 158, 11, 0.1);
    color: #f59e0b;
    border: 1px solid rgba(245, 158, 11, 0.2);
}

.badge-coming {
    background: rgba(107, 114, 128, 0.1);
    color: #6b7280;
    border: 1px solid rgba(107, 114, 128, 0.2);
}

/* Live pulse for ACTIVE badges */
.badge-pulse::before {
    content: '';
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
    margin-right: 6px;
    animation: badgePulse 2s ease infinite;
}

@keyframes badgePulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.4; transform: scale(0.8); }
}

/* ===========================================
   SECTION HEADER LABELS
   =========================================== */
.section-label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 14px;
    border-radius: 8px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    background: rgba(249, 115, 22, 0.08);
    color: #f97316;
    border: 1px solid rgba(249, 115, 22, 0.15);
}

/* ===========================================
   ANIMATED FADE-IN
   =========================================== */
.animate-fade-in {
    animation: fadeSlideIn 0.5s ease forwards;
}

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

/* ===========================================
   QUICK ACTIONS HOVER
   =========================================== */
.quick-action {
    transition: all 0.2s;
}

.quick-action:hover {
    transform: scale(1.05);
}

/* ===========================================
   GREETING CARD
   =========================================== */
.greeting-card {
    position: relative;
    overflow: hidden;
}

.greeting-card::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 300px;
    height: 300px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(249, 115, 22, 0.06) 0%, transparent 70%);
    pointer-events: none;
}

/* ===========================================
   FOOTER
   =========================================== */
.admin-footer {
    padding: 16px 24px;
    text-align: center;
    font-size: 11px;
    color: #9ca3af;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
}

.dark .admin-footer {
    border-top-color: rgba(255, 255, 255, 0.05);
}
