/* ================ GLOBAL STYLES ================ */
:root {
    --primary: #3b82f6;
    --secondary: #7c3aed;
    --bg-dark: #010103;
    --glass-border: rgba(255, 255, 255, 0.05);
    --celestial-gradient: linear-gradient(135deg, #1e40af 0%, #7c3aed 100%);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: 'Plus Jakarta Sans', sans-serif;
    background: var(--bg-dark);
    color: #fff;
    overflow-x: hidden;
}

/* ================ BACKGROUND EFFECTS ================ */
.space-bg {
    position: fixed;
    inset: 0;
    background: radial-gradient(circle at 50% 50%, #0a0a1a 0%, #010103 100%);
    z-index: -2;
}

.ambient-glow {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 50% -10%, rgba(59, 130, 246, 0.08) 0%, transparent 60%),
                radial-gradient(circle at 100% 80%, rgba(124, 58, 237, 0.05) 0%, transparent 60%);
    z-index: -1;
    pointer-events: none;
}

.nebula-blur {
    position: fixed;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(59,130,246,0.08) 0%, transparent 70%);
    filter: blur(100px);
    z-index: -1;
    animation: drift 25s infinite alternate;
}

@keyframes drift {
    0% { transform: translate(-10%, -10%) scale(1); }
    100% { transform: translate(10%, 10%) scale(1.2); }
}

#canvas-stars {
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
}

/* ================ GLASS EFFECTS ================ */
.glass {
    background: rgba(10, 10, 20, 0.6);
    backdrop-filter: blur(24px);
    border: 1px solid var(--glass-border);
    transition: all 0.4s;
}

.glass:hover {
    border-color: rgba(59,130,246,0.3);
    transform: translateY(-3px);
    background: rgba(15,15,30,0.7);
}

.glass-card {
    background: linear-gradient(145deg, rgba(12,12,24,0.7), rgba(8,8,18,0.8));
    backdrop-filter: blur(24px);
    border: 1px solid rgba(255,255,255,0.03);
    border-radius: 40px;
    transition: all 0.3s;
}

.glass-card:hover {
    border-color: rgba(59,130,246,0.3);
    transform: translateY(-2px);
}

/* ================ BUTTONS ================ */
.btn-celestial {
    background: var(--celestial-gradient);
    color: white;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 10px 30px -10px rgba(59,130,246,0.5);
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
}

.btn-celestial:hover:not(:disabled) {
    transform: scale(1.01) translateY(-2px);
    box-shadow: 0 15px 40px -10px rgba(59,130,246,0.7);
}

.btn-gradient {
    background: linear-gradient(135deg, #2563eb, #7c3aed);
}

/* ================ STATS CARDS ================ */
.stat-card {
    background: linear-gradient(165deg, rgba(18,18,35,0.6), rgba(10,10,22,0.8));
    backdrop-filter: blur(16px);
    border: 1px solid rgba(255,255,255,0.03);
    border-radius: 24px;
    padding: 16px 8px;
    transition: all 0.3s;
}

.stat-card:hover {
    border-color: rgba(59,130,246,0.3);
    transform: translateY(-2px);
}

/* ================ BADGES ================ */
.owner-badge {
    background: linear-gradient(145deg, #8b5cf6, #6366f1);
    color: white;
    padding: 4px 14px;
    border-radius: 40px;
    font-size: 10px;
    font-weight: 900;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.admin-badge {
    background: linear-gradient(145deg, #3b82f6, #2563eb);
    color: white;
    padding: 4px 14px;
    border-radius: 40px;
    font-size: 10px;
    font-weight: 900;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.badge-owner {
    background: linear-gradient(145deg, #8b5cf6, #6366f1);
    color: white;
    border-radius: 40px;
    padding: 2px 10px;
    font-size: 7px;
    font-weight: 900;
    letter-spacing: 2px;
    box-shadow: 0 5px 15px -5px #8b5cf6;
    text-transform: uppercase;
}

.badge-admin {
    background: linear-gradient(145deg, #3b82f6, #2563eb);
    color: white;
    border-radius: 40px;
    padding: 2px 10px;
    font-size: 7px;
    font-weight: 900;
    letter-spacing: 2px;
    box-shadow: 0 5px 15px -5px #3b82f6;
    text-transform: uppercase;
}

/* ================ INPUTS ================ */
input, textarea, select {
    background: rgba(5, 5, 15, 0.9) !important;
    border: 1px solid rgba(59,130,246,0.15) !important;
    color: white !important;
    backdrop-filter: blur(12px);
    transition: all 0.3s;
}

input:focus, textarea:focus, select:focus {
    background: rgba(8, 8, 20, 0.95) !important;
    border-color: rgba(59,130,246,0.5) !important;
    box-shadow: 0 0 0 3px rgba(59,130,246,0.1) !important;
    outline: none;
}

input::placeholder, textarea::placeholder {
    color: rgba(255,255,255,0.2);
    font-size: 10px;
    font-weight: 500;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.input-dark {
    background: rgba(5,5,15,0.9) !important;
    border: 1px solid rgba(59,130,246,0.15) !important;
    color: white !important;
}

.input-dark:focus {
    border-color: rgba(59,130,246,0.5) !important;
    box-shadow: 0 0 0 3px rgba(59,130,246,0.1) !important;
    outline: none;
}

/* ================ SCROLLBAR ================ */
::-webkit-scrollbar {
    width: 4px;
}

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

::-webkit-scrollbar-thumb {
    background: #1e40af;
    border-radius: 10px;
}

/* ================ ANIMATIONS ================ */
.reveal {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.6s;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

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

.anim-up {
    animation: slideUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    opacity: 0;
}

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

@keyframes slideDown {
    from { opacity: 0; transform: translate(-50%, -20px); }
    to { opacity: 1; transform: translate(-50%, 0); }
}

/* ================ LOADER ================ */
#global-loader {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: #010103;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: all 0.8s cubic-bezier(0.87, 0, 0.13, 1);
}

.loader-logo-container {
    position: relative;
    width: 70px;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.loader-logo-brand {
    width: 50px;
    height: 50px;
    background: var(--celestial-gradient);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    font-style: italic;
    font-size: 28px;
    color: white;
    box-shadow: 0 0 30px rgba(59,130,246,0.5);
    z-index: 2;
    animation: pulse-brand 2s infinite;
}

.loader-outer-ring {
    position: absolute;
    width: 80px;
    height: 80px;
    border: 2px solid rgba(59,130,246,0.1);
    border-top-color: #3b82f6;
    border-radius: 35%;
    animation: spin 1.5s infinite linear;
}

@keyframes pulse-brand {
    0%,100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.loader-hidden {
    opacity: 0;
    visibility: hidden;
    transform: scale(1.1);
}

/* ================ MODAL ================ */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.95);
    backdrop-filter: blur(16px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: fadeIn 0.3s ease;
}

.modal-content {
    max-width: 500px;
    width: 100%;
    animation: slideUp 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

/* ================ TOAST ================ */
.toast {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(10,10,20,0.95);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(59,130,246,0.3);
    border-radius: 40px;
    padding: 12px 24px;
    z-index: 9999;
    animation: slideDown 0.3s ease;
}

/* ================ STATUS BADGES ================ */
.status-badge {
    padding: 6px 14px;
    border-radius: 40px;
    font-size: 8px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 2px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.status-success {
    background: rgba(34, 197, 94, 0.1);
    color: #22c55e;
    border: 1px solid rgba(34, 197, 94, 0.2);
}

.status-pending {
    background: rgba(59, 130, 246, 0.1);
    color: #3b82f6;
    border: 1px solid rgba(59, 130, 246, 0.2);
}

.status-canceled {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.2);
}

/* ================ COPY BUTTON ================ */
.copy-btn {
    padding: 4px 8px;
    border-radius: 8px;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    font-size: 8px;
    font-weight: 900;
    text-transform: uppercase;
    transition: all 0.2s;
}

.copy-btn:hover {
    background: rgba(59,130,246,0.2);
    border-color: #3b82f6;
}

/* ================ UTILITY CLASSES ================ */
.text-xs { font-size: 0.75rem; }
.text-xxs { font-size: 0.65rem; }