/* Xiaomi Power Tool — Professional Dark Glow Portal */
:root {
    --xpt-bg: #05070d;
    --xpt-card: rgba(10, 16, 28, 0.78);
    --xpt-border: rgba(56, 189, 248, 0.18);
    --xpt-text: #e8eef7;
    --xpt-muted: #8aa0b8;
    --xpt-cyan: #38bdf8;
    --xpt-orange: #ff6a00;
    --xpt-gold: #f5b942;
    --xpt-green: #34d399;
    --xpt-purple: #a78bfa;
}

html, body {
    background: #05070d !important;
    color: var(--xpt-text);
    max-width: 100%;
}

body.xpt-portal {
    min-height: 100vh;
    min-height: 100dvh;
    overflow-x: hidden;
    font-family: "Segoe UI", Inter, -apple-system, BlinkMacSystemFont, Roboto, sans-serif;
    background:
        radial-gradient(1200px 600px at 8% -10%, rgba(255, 106, 0, 0.14), transparent 55%),
        radial-gradient(900px 500px at 100% 0%, rgba(56, 189, 248, 0.12), transparent 50%),
        radial-gradient(800px 500px at 50% 110%, rgba(167, 139, 250, 0.10), transparent 55%),
        #05070d !important;
}

.xpt-orbs {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}
.xpt-shell { position: relative; z-index: 1; overflow: visible; }
.modal { z-index: 2100 !important; }
.modal-backdrop { z-index: 2090 !important; }
body.modal-open .xpt-shell { z-index: 0; }

.xpt-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(2px);
    opacity: 0.85;
    animation: xpt-float 14s ease-in-out infinite;
}

.xpt-orb.o1 {
    width: 340px; height: 340px; left: -90px; top: -80px;
    background: radial-gradient(circle, rgba(255, 106, 0, 0.55) 0%, rgba(255, 106, 0, 0.08) 45%, transparent 70%);
    box-shadow: 0 0 80px rgba(255, 106, 0, 0.28);
}
.xpt-orb.o2 {
    width: 280px; height: 280px; right: -60px; top: 12%;
    background: radial-gradient(circle, rgba(56, 189, 248, 0.5) 0%, rgba(56, 189, 248, 0.08) 48%, transparent 70%);
    box-shadow: 0 0 70px rgba(56, 189, 248, 0.25);
    animation-delay: -3s;
}
.xpt-orb.o3 {
    width: 220px; height: 220px; left: 18%; bottom: -70px;
    background: radial-gradient(circle, rgba(245, 185, 66, 0.42) 0%, rgba(245, 185, 66, 0.06) 48%, transparent 70%);
    box-shadow: 0 0 60px rgba(245, 185, 66, 0.22);
    animation-delay: -6s;
}
.xpt-orb.o4 {
    width: 160px; height: 160px; right: 18%; bottom: 8%;
    background: radial-gradient(circle, rgba(167, 139, 250, 0.45) 0%, rgba(167, 139, 250, 0.06) 50%, transparent 70%);
    box-shadow: 0 0 50px rgba(167, 139, 250, 0.22);
    animation-delay: -8s;
}
.xpt-orb.o5 {
    width: 90px; height: 90px; left: 46%; top: 18%;
    background: radial-gradient(circle, rgba(52, 211, 153, 0.4) 0%, transparent 70%);
    box-shadow: 0 0 30px rgba(52, 211, 153, 0.25);
    animation-delay: -4s;
    animation-duration: 10s;
}

@keyframes xpt-float {
    0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
    50% { transform: translate3d(18px, -22px, 0) scale(1.06); }
}

.xpt-shell {
    position: relative;
    z-index: 1;
    overflow: visible;
}

.xpt-auth-wrap {
    min-height: 100vh;
    min-height: 100dvh;
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
}

.xpt-brand-pane {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 48px 48px 48px 56px;
    min-width: 0;
}

.xpt-logo-mark {
    width: 72px;
    height: 72px;
    border-radius: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(145deg, rgba(255, 106, 0, 0.28), rgba(56, 189, 248, 0.12));
    border: 1px solid rgba(255, 106, 0, 0.45);
    box-shadow: 0 0 32px rgba(255, 106, 0, 0.35), inset 0 0 18px rgba(255, 106, 0, 0.15);
    color: #ffb27a;
    font-size: 32px;
    margin-bottom: 22px;
}

.xpt-nav-logo {
    width: 46px;
    height: 46px;
    border-radius: 14px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 12px;
    letter-spacing: 0.4px;
    color: #fff;
    background: linear-gradient(145deg, rgba(255, 106, 0, 0.42), rgba(56, 189, 248, 0.16));
    border: 1px solid rgba(255, 150, 60, 0.65);
    box-shadow:
        0 0 18px rgba(255, 106, 0, 0.55),
        0 0 8px rgba(56, 189, 248, 0.25),
        inset 0 0 12px rgba(255, 106, 0, 0.22);
    text-shadow: 0 0 10px rgba(255, 180, 80, 0.95);
    animation: xpt-logo-pulse 2.6s ease-in-out infinite;
}
.xpt-nav-logo span {
    background: linear-gradient(90deg, #ffb27a, #fff, #7dd3fc);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    filter: drop-shadow(0 0 6px rgba(255, 106, 0, 0.8));
}
@keyframes xpt-logo-pulse {
    0%, 100% {
        box-shadow: 0 0 14px rgba(255, 106, 0, 0.4), 0 0 6px rgba(56, 189, 248, 0.2), inset 0 0 10px rgba(255, 106, 0, 0.15);
    }
    50% {
        box-shadow: 0 0 28px rgba(255, 106, 0, 0.75), 0 0 14px rgba(56, 189, 248, 0.4), inset 0 0 14px rgba(255, 106, 0, 0.3);
    }
}

.xpt-brand-title {
    font-size: 38px;
    font-weight: 800;
    letter-spacing: -0.6px;
    color: #fff;
    margin: 0 0 8px;
    text-shadow: 0 0 24px rgba(255, 106, 0, 0.35);
}
.xpt-brand-title span {
    background: linear-gradient(90deg, #ff8a3d, #38bdf8);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.xpt-brand-sub {
    color: var(--xpt-muted);
    font-size: 15px;
    max-width: 440px;
    margin-bottom: 28px;
}

.xpt-feature {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    margin-bottom: 14px;
    color: #c9d6e5;
    font-size: 14px;
}
.xpt-feature i {
    color: var(--xpt-cyan);
    text-shadow: 0 0 10px rgba(56, 189, 248, 0.6);
    margin-top: 2px;
}

.xpt-form-pane {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 32px;
    min-width: 0;
}

.auth-card, .xpt-glass {
    background: linear-gradient(180deg, rgba(12, 18, 32, 0.88) 0%, rgba(8, 12, 22, 0.92) 100%);
    backdrop-filter: blur(22px);
    border: 1px solid rgba(56, 189, 248, 0.22);
    border-radius: 24px;
    box-shadow:
        0 24px 60px rgba(0, 0, 0, 0.55),
        0 0 40px rgba(255, 106, 0, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.04);
    width: 100%;
    max-width: 460px;
    padding: 36px 32px;
    position: relative;
}
.auth-card-register {
    max-width: 520px;
}

.auth-card::before {
    content: "";
    position: absolute;
    inset: -1px;
    border-radius: 24px;
    padding: 1px;
    background: linear-gradient(135deg, rgba(255, 106, 0, 0.45), rgba(56, 189, 248, 0.25), transparent 60%);
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
}

.xpt-icon-glow {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(56, 189, 248, 0.1);
    border: 1px solid rgba(56, 189, 248, 0.35);
    box-shadow: 0 0 24px rgba(56, 189, 248, 0.28);
    color: #7dd3fc;
}

.xpt-portal .input-group {
    min-width: 0;
}
.xpt-portal .input-group > .form-control {
    min-width: 0;
}
.xpt-portal .form-control,
.xpt-portal .form-select {
    background: #070b14 !important;
    border: 1px solid rgba(56, 189, 248, 0.18) !important;
    color: #f1f5f9 !important;
    border-radius: 12px;
}
.xpt-portal .form-control:focus,
.xpt-portal .form-select:focus {
    background: #050910 !important;
    border-color: #38bdf8 !important;
    box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.15), 0 0 18px rgba(56, 189, 248, 0.28) !important;
    color: #fff !important;
}
.xpt-portal .input-group-text {
    background: #070b14 !important;
    border: 1px solid rgba(56, 189, 248, 0.18) !important;
    color: #7dd3fc !important;
}
.xpt-portal .form-label {
    color: #9fb3c8 !important;
}

.btn-glow-primary {
    background: linear-gradient(135deg, #ff6a00 0%, #ff8a3d 42%, #0284c7 100%);
    border: 1px solid rgba(255, 180, 120, 0.45);
    color: #fff !important;
    font-weight: 700;
    border-radius: 12px;
    padding: 12px;
    box-shadow: 0 8px 24px rgba(255, 106, 0, 0.35), 0 0 20px rgba(56, 189, 248, 0.18);
    transition: all 0.2s ease;
}
.btn-glow-primary:hover {
    filter: brightness(1.08);
    box-shadow: 0 10px 30px rgba(255, 106, 0, 0.5), 0 0 28px rgba(56, 189, 248, 0.28);
    color: #fff !important;
}

.btn-toggle-eye {
    border-color: rgba(56, 189, 248, 0.18) !important;
    background: #070b14 !important;
    color: #94a3b8 !important;
}
.btn-toggle-eye:hover {
    background: #101827 !important;
    color: #f5b942 !important;
}

.navbar-custom {
    background: rgba(8, 12, 22, 0.88) !important;
    backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(56, 189, 248, 0.16) !important;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.35);
}
.navbar-custom .container-fluid {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.stat-card {
    background: linear-gradient(180deg, rgba(12, 18, 32, 0.9), rgba(8, 12, 22, 0.92));
    border: 1px solid rgba(56, 189, 248, 0.16);
    border-radius: 18px;
    padding: 24px;
    position: relative;
    overflow: hidden;
    transition: all 0.25s ease;
}
.stat-card::after {
    content: "";
    position: absolute;
    width: 120px;
    height: 120px;
    right: -30px;
    top: -40px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(56, 189, 248, 0.18), transparent 70%);
}
.stat-card:hover {
    transform: translateY(-3px);
    border-color: rgba(255, 106, 0, 0.35);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.4), 0 0 22px rgba(56, 189, 248, 0.16);
}

.table-dark-custom {
    background: rgba(10, 16, 28, 0.85);
    border: 1px solid rgba(56, 189, 248, 0.16);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
    max-width: 100%;
}
.table-responsive {
    -webkit-overflow-scrolling: touch;
}

.modal-content {
    background: #0b1220 !important;
    border: 1px solid rgba(56, 189, 248, 0.22) !important;
    color: #e8eef7 !important;
    box-shadow: 0 0 40px rgba(56, 189, 248, 0.12);
}

.shield-badge {
    font-size: 11px;
    color: #7d93aa;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.xpt-hub-page {
    padding-left: 1.25rem;
    padding-right: 1.25rem;
}
.xpt-copy-group .form-control {
    font-size: 12px;
}

@media (min-width: 1400px) {
    .xpt-auth-wrap { max-width: 1360px; }
    .xpt-brand-pane { padding: 64px 72px; }
}

@media (max-width: 1199px) and (min-width: 992px) {
    .xpt-brand-pane { padding: 36px 32px; }
    .xpt-brand-title { font-size: 30px; }
    .xpt-form-pane { padding: 28px 20px; }
    .auth-card { padding: 28px 24px; }
}

@media (max-width: 991px) {
    .xpt-auth-wrap {
        grid-template-columns: 1fr;
        min-height: auto;
        padding-bottom: 24px;
    }
    .xpt-brand-pane {
        padding: 28px 18px 10px;
        text-align: center;
        align-items: center;
    }
    .xpt-logo-mark {
        width: 52px;
        height: 52px;
        font-size: 22px;
        border-radius: 16px;
        margin-bottom: 12px;
    }
    .xpt-brand-title { font-size: 26px; }
    .xpt-brand-sub {
        margin-left: auto;
        margin-right: auto;
        margin-bottom: 8px;
        font-size: 13px;
        max-width: 420px;
    }
    .xpt-feature { display: none; }
    .xpt-form-pane {
        padding: 8px 14px 28px;
        align-items: flex-start;
    }
    .auth-card, .xpt-glass {
        max-width: 100%;
        padding: 22px 16px;
        border-radius: 18px;
    }
    .auth-card-register { max-width: 100%; }
    .xpt-orb.o1, .xpt-orb.o2 { width: 220px; height: 220px; }
    .xpt-orb.o3, .xpt-orb.o4 { width: 140px; height: 140px; }
    .xpt-hub-page {
        padding-left: 0.85rem;
        padding-right: 0.85rem;
    }
}

@media (max-width: 767px) {
    .navbar-custom {
        padding-top: 10px !important;
        padding-bottom: 10px !important;
    }
    .navbar-custom .container-fluid {
        padding-left: 12px !important;
        padding-right: 12px !important;
        gap: 8px;
    }
    .navbar-custom h5 {
        font-size: 15px;
    }
    .xpt-hub-actions {
        width: 100%;
    }
    .xpt-hub-actions .btn {
        flex: 1 1 100%;
        width: 100%;
    }
    .xpt-search-form {
        width: 100%;
    }
    .xpt-search-form .form-control {
        flex: 1 1 auto;
        width: auto;
    }
    .xpt-copy-group {
        flex-wrap: wrap !important;
    }
    .xpt-copy-group .form-control {
        width: 100%;
        border-radius: 10px 10px 0 0 !important;
        font-size: 11px;
    }
    .xpt-copy-group .btn {
        width: 100%;
        border-radius: 0 0 10px 10px !important;
    }
    .stat-card {
        padding: 18px;
    }
    .stat-card h2 {
        font-size: 1.6rem;
    }
    .modal-dialog {
        margin: 0.6rem;
        max-width: calc(100% - 1.2rem);
    }
    .shield-badge {
        flex-wrap: wrap;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .xpt-brand-title { font-size: 22px; }
    .xpt-form-pane { padding: 4px 10px 20px; }
    .auth-card, .xpt-glass { padding: 18px 12px; }
}
