/* ============================================
   XYREON IDM - "Highland Gateway"
   Centered Card + Animated Mesh Gradient
   ============================================ */

@font-face {
    font-family: 'Cinzel';
    src: url('../font/Cinzel-Regular.woff2') format('woff2');
    font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
    font-family: 'Cinzel';
    src: url('../font/Cinzel-SemiBold.woff2') format('woff2');
    font-weight: 600; font-style: normal; font-display: swap;
}
@font-face {
    font-family: 'Cormorant Garamond';
    src: url('../font/CormorantGaramond-Regular.woff2') format('woff2');
    font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
    font-family: 'Cormorant Garamond';
    src: url('../font/CormorantGaramond-Medium.woff2') format('woff2');
    font-weight: 500; font-style: normal; font-display: swap;
}

:root {
    --hg-bg: #111827;
    --hg-surface: rgba(17, 24, 39, 0.65);
    --hg-surface-border: rgba(255, 255, 255, 0.08);
    --hg-cyan: #06b6d4;
    --hg-violet: #8b5cf6;
    --hg-rose: #f43f5e;
    --hg-cyan-soft: rgba(6, 182, 212, 0.15);
    --hg-violet-soft: rgba(139, 92, 246, 0.15);
    --hg-white: #f9fafb;
    --hg-white-60: rgba(249, 250, 251, 0.6);
    --hg-white-30: rgba(249, 250, 251, 0.3);
    --hg-white-10: rgba(249, 250, 251, 0.1);
    --hg-grey: #9ca3af;
    --hg-dark: #1f2937;
    --hg-error: #ef4444;
    --hg-success: #10b981;
    --hg-font-display: 'Cinzel', 'Georgia', serif;
    --hg-font-body: 'Cormorant Garamond', 'Georgia', serif;
    --hg-font-ui: 'Segoe UI', -apple-system, sans-serif;
    --hg-transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ============================================
   Base
   ============================================ */
.xyreon-theme {
    background: var(--hg-bg) !important;
    overflow: hidden !important;
    height: 100vh !important;
}
.xyreon-theme .wrapper.ew-layout { height: 100vh; overflow: hidden; }
.xyreon-theme .main-header.navbar,
.xyreon-theme .main-sidebar,
.xyreon-theme .main-footer { display: none !important; }
.xyreon-theme .content-wrapper {
    margin-left: 0 !important;
    background: transparent !important;
    min-height: 100vh !important;
    display: flex; flex-direction: column;
}
.xyreon-theme .content-wrapper .content-header { display: none; }
.xyreon-theme .content-wrapper .content {
    flex: 1; display: flex; align-items: center; justify-content: center; padding: 2rem;
}
.xyreon-theme .content-wrapper .container-fluid {
    width: 100%; max-width: 460px; padding: 0;
}

/* ============================================
   Mesh Gradient Backdrop
   ============================================ */
.hg-backdrop {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    z-index: -2;
    background: var(--hg-bg);
    overflow: hidden;
}

.hg-blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.5;
    will-change: transform;
}

.hg-blob-1 {
    width: 500px; height: 500px;
    background: var(--hg-cyan);
    top: -10%; left: -5%;
    animation: hg-move1 20s infinite ease-in-out;
}
.hg-blob-2 {
    width: 450px; height: 450px;
    background: var(--hg-violet);
    bottom: -10%; right: -5%;
    animation: hg-move2 25s infinite ease-in-out;
}
.hg-blob-3 {
    width: 350px; height: 350px;
    background: var(--hg-rose);
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    animation: hg-move3 22s infinite ease-in-out;
}

@keyframes hg-move1 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(15vw, 10vh) scale(1.1); }
    66% { transform: translate(5vw, 25vh) scale(0.9); }
}
@keyframes hg-move2 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(-15vw, -10vh) scale(0.9); }
    66% { transform: translate(-5vw, -20vh) scale(1.1); }
}
@keyframes hg-move3 {
    0%, 100% { transform: translate(-50%, -50%) scale(1); }
    33% { transform: translate(-30%, -60%) scale(1.15); }
    66% { transform: translate(-60%, -40%) scale(0.85); }
}

/* Dot grid overlay */
.hg-dotgrid {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    z-index: -1;
    background-image: radial-gradient(rgba(255,255,255,0.07) 1px, transparent 1px);
    background-size: 28px 28px;
    pointer-events: none;
}

/* ============================================
   Login Box
   ============================================ */
.xyreon-theme .ew-login-box {
    display: flex; flex-direction: column; align-items: center;
    width: 100%;
    animation: hg-cardIn 0.8s cubic-bezier(0.4,0,0.2,1);
}

@keyframes hg-cardIn {
    from { opacity: 0; transform: scale(0.92) translateY(24px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

/* Logo area */
.xyreon-theme .login-logo {
    text-align: center;
    margin-bottom: 0;
}

.hg-logo-container {
    display: flex; flex-direction: column; align-items: center; gap: 0.4rem;
    margin-bottom: 1.5rem;
}

.hg-logo-image {
    max-width: 330px; height: auto;
    filter: drop-shadow(0 0 20px rgba(6, 182, 212, 0.3));
}

.hg-logo-title {
    font-family: var(--hg-font-display);
    font-size: 2rem; font-weight: 600;
    letter-spacing: 0.2em;
    background: linear-gradient(135deg, var(--hg-cyan), var(--hg-violet));
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
    background-clip: text; color: transparent;
    margin: 0;
}

.hg-logo-tagline {
    font-family: var(--hg-font-ui);
    font-size: 0.75rem; letter-spacing: 0.2em;
    color: var(--hg-grey); text-transform: uppercase;
}

/* ============================================
   Card — Frosted Glass
   ============================================ */
.xyreon-theme .ew-login-card {
    background: var(--hg-surface) !important;
    border: 1px solid var(--hg-surface-border) !important;
    border-radius: 24px !important;
    backdrop-filter: blur(40px) saturate(1.5);
    -webkit-backdrop-filter: blur(40px) saturate(1.5);
    box-shadow: 0 25px 60px rgba(0,0,0,0.4) !important;
    overflow: visible;
    width: 100%; max-width: 440px;
    position: relative;
}

.xyreon-theme .ew-login-card::before {
    content: '';
    position: absolute; top: -1px; left: 20%; right: 20%; height: 2px;
    background: linear-gradient(90deg, transparent, var(--hg-cyan), var(--hg-violet), transparent);
    border-radius: 2px;
}
.xyreon-theme .ew-login-card::after { display: none; }

.xyreon-theme .ew-login-card .card-body {
    padding: 2.5rem 2.5rem 2rem;
    position: relative;
}

/* ============================================
   Login Title
   ============================================ */
.xyreon-theme .login-box-msg {
    font-family: var(--hg-font-display) !important;
    font-size: 1.3rem !important;
    font-weight: 400 !important;
    color: var(--hg-white) !important;
    text-align: center;
    margin-bottom: 2rem !important;
    letter-spacing: 0.03em;
    padding-bottom: 1.2rem;
    position: relative;
}

.xyreon-theme .login-box-msg::after {
    content: '';
    position: absolute; bottom: 0; left: 50%; transform: translateX(-50%);
    width: 50px; height: 2px;
    background: linear-gradient(90deg, var(--hg-cyan), var(--hg-violet));
    border-radius: 2px;
}

/* ============================================
   Form Rows
   ============================================ */
.xyreon-theme .ew-login-form .row {
    margin-bottom: 1.3rem;
    opacity: 0;
    animation: hg-rowIn 0.5s ease forwards;
}
.xyreon-theme .ew-login-form .row:nth-child(1) { animation-delay: 0.2s; }
.xyreon-theme .ew-login-form .row:nth-child(2) { animation-delay: 0.3s; }

.xyreon-theme .ew-login-form .d-grid {
    opacity: 0; animation: hg-rowIn 0.5s ease forwards; animation-delay: 0.4s;
}

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

/* ============================================
   Inputs
   ============================================ */
.xyreon-theme .ew-login-form .form-control {
    height: 52px !important;
    padding: 0.9rem 1.1rem !important;
    background: rgba(255,255,255,0.05) !important;
    border: 1px solid var(--hg-white-10) !important;
    border-radius: 12px !important;
    font-family: var(--hg-font-ui) !important;
    font-size: 0.95rem !important;
    color: var(--hg-white) !important;
    transition: var(--hg-transition) !important;
}

.xyreon-theme .ew-login-form .form-control::placeholder { color: var(--hg-grey) !important; opacity: 0.6 !important; }
.xyreon-theme .ew-login-form .form-control:hover { border-color: var(--hg-white-30) !important; }
.xyreon-theme .ew-login-form .form-control:focus {
    outline: none !important;
    border-color: var(--hg-cyan) !important;
    box-shadow: 0 0 0 3px var(--hg-cyan-soft), 0 0 20px var(--hg-cyan-soft) !important;
    background: rgba(255,255,255,0.07) !important;
}

.xyreon-theme .ew-login-form .input-group { border-radius: 12px; overflow: visible; }
.xyreon-theme .ew-login-form .input-group .form-control {
    border-radius: 12px 0 0 12px !important; border-right: none !important;
}

.xyreon-theme .ew-toggle-password {
    background: rgba(255,255,255,0.05) !important;
    border: 1px solid var(--hg-white-10) !important;
    border-left: none !important;
    border-radius: 0 12px 12px 0 !important;
    color: var(--hg-grey) !important;
    padding: 0 1rem !important; height: 52px !important;
    transition: var(--hg-transition) !important;
}
.xyreon-theme .ew-toggle-password:hover { color: var(--hg-cyan) !important; }
.xyreon-theme .input-group:focus-within .ew-toggle-password {
    border-color: var(--hg-cyan) !important;
}

/* ============================================
   Button — Vibrant Gradient
   ============================================ */
.xyreon-theme .ew-login-form .btn-primary {
    height: 52px !important;
    font-family: var(--hg-font-ui) !important;
    font-size: 0.9rem !important;
    font-weight: 600 !important;
    letter-spacing: 0.1em !important;
    text-transform: uppercase !important;
    color: var(--hg-white) !important;
    background: linear-gradient(135deg, var(--hg-cyan) 0%, var(--hg-violet) 100%) !important;
    border: none !important;
    border-radius: 12px !important;
    transition: var(--hg-transition) !important;
    position: relative; overflow: hidden;
    margin-top: 0.8rem;
}
.xyreon-theme .ew-login-form .btn-primary::before { display: none; }

.xyreon-theme .ew-login-form .btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(6,182,212,0.35), 0 8px 30px rgba(139,92,246,0.25) !important;
}
.xyreon-theme .ew-login-form .btn-primary:active:not(:disabled) { transform: translateY(0); }
.xyreon-theme .ew-login-form .btn-primary:disabled { opacity: 0.4 !important; cursor: not-allowed; }

/* Resort badge */
.hg-resort-badge {
    text-align: center;
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid var(--hg-white-10);
}
.hg-resort-badge span {
    font-family: var(--hg-font-ui);
    font-size: 0.7rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--hg-grey);
    opacity: 0.6;
}

/* ============================================
   Spinner
   ============================================ */
.hg-btn-spinner {
    display: inline-block; width: 16px; height: 16px;
    border: 2px solid rgba(255,255,255,0.3); border-top-color: #fff;
    border-radius: 50%; animation: hg-spin 0.8s linear infinite;
    vertical-align: middle; margin-right: 8px;
}
@keyframes hg-spin { to { transform: rotate(360deg); } }

/* ============================================
   Validation
   ============================================ */
.xyreon-theme .invalid-feedback { color: var(--hg-error) !important; font-family: var(--hg-font-ui) !important; font-size: 0.8rem !important; margin-top: 0.4rem !important; }
.xyreon-theme .valid-feedback { color: var(--hg-success) !important; font-family: var(--hg-font-ui) !important; font-size: 0.8rem !important; }
.xyreon-theme .form-control.is-invalid { border-color: var(--hg-error) !important; }

/* ============================================
   Links / Social
   ============================================ */
.xyreon-theme .social-auth-links { margin-top: 1.5rem; padding-top: 1rem; border-top: 1px solid var(--hg-white-10); }
.xyreon-theme .social-auth-links p { font-family: var(--hg-font-ui) !important; color: var(--hg-grey) !important; font-size: 0.85rem !important; }
.xyreon-theme .social-auth-links .btn {
    border-radius: 10px !important; border: 1px solid var(--hg-white-10) !important;
    background: transparent !important; color: var(--hg-white) !important; transition: var(--hg-transition) !important;
}
.xyreon-theme .social-auth-links .btn:hover { border-color: var(--hg-cyan) !important; color: var(--hg-cyan) !important; }

.hg-social-label {
    font-family: var(--hg-font-ui) !important;
    font-size: 0.75rem !important;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--hg-grey) !important;
    margin-bottom: 0.6rem !important;
    text-align: center;
}

.hg-social-row {
    display: flex;
    justify-content: center;
    gap: 0.7rem;
}

.hg-social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid var(--hg-white-10);
    background: rgba(255, 255, 255, 0.05);
    color: var(--hg-grey);
    text-decoration: none;
    transition: var(--hg-transition);
}
.hg-social-link:hover {
    border-color: var(--hg-cyan);
    color: var(--hg-cyan);
    background: rgba(6, 182, 212, 0.1);
    box-shadow: 0 0 12px rgba(6, 182, 212, 0.2);
    transform: translateY(-2px);
}

.xyreon-theme .login-page-links { margin-top: 1.2rem; }
.xyreon-theme .login-page-links .card-link {
    font-family: var(--hg-font-ui) !important; font-size: 0.85rem !important;
    color: var(--hg-grey) !important; text-decoration: none !important; transition: var(--hg-transition) !important;
}
.xyreon-theme .login-page-links .card-link::after { display: none; }
.xyreon-theme .login-page-links .card-link:hover { color: var(--hg-cyan) !important; }

/* ============================================
   Alerts
   ============================================ */
.xyreon-theme .alert { border-radius: 10px !important; font-family: var(--hg-font-ui) !important; padding: 0.8rem 1rem !important; margin-bottom: 1.2rem !important; border: none !important; }
.xyreon-theme .alert-danger { background: rgba(239,68,68,0.12) !important; color: #fca5a5 !important; border-left: 3px solid var(--hg-error) !important; }
.xyreon-theme .alert-success { background: rgba(16,185,129,0.12) !important; color: #6ee7b7 !important; border-left: 3px solid var(--hg-success) !important; }

/* ============================================
   Overlay / Focus / Selection / SweetAlert
   ============================================ */
.xyreon-theme .ew-overlay { background: rgba(17,24,39,0.85) !important; backdrop-filter: blur(8px); border-radius: 16px; }
.xyreon-theme .ew-overlay .spinner-border { color: var(--hg-cyan) !important; }
.xyreon-theme :focus-visible { outline: 2px solid var(--hg-cyan) !important; outline-offset: 2px; }
.xyreon-theme ::selection { background: rgba(6,182,212,0.25); color: var(--hg-white); }

.xyreon-theme .swal2-popup { background: rgba(17,24,39,0.95) !important; border: 1px solid var(--hg-white-10) !important; border-radius: 16px !important; backdrop-filter: blur(20px); }
.xyreon-theme .swal2-title { font-family: var(--hg-font-display) !important; color: var(--hg-white) !important; }
.xyreon-theme .swal2-html-container { font-family: var(--hg-font-ui) !important; color: var(--hg-grey) !important; }
.xyreon-theme .swal2-confirm { background: linear-gradient(135deg, var(--hg-cyan), var(--hg-violet)) !important; color: var(--hg-white) !important; border-radius: 8px !important; }

/* ============================================
   Responsive
   ============================================ */
@media (max-width: 576px) {
    .xyreon-theme .content-wrapper .content { padding: 1rem; }
    .xyreon-theme .ew-login-card .card-body { padding: 2rem 1.5rem 1.5rem; }
    .hg-logo-image { max-width: 140px; }
    .hg-logo-title { font-size: 1.5rem; }
    .hg-blob { filter: blur(80px); }
}

@media print {
    .hg-backdrop, .hg-dotgrid { display: none !important; }
}