/* ============================================
   PLASTILINO RP - UI Design System
   Centralized Stylesheet
   ============================================
   
   This file contains all design tokens, 
   utility classes, and shared component 
   styles for the Plastilino RP web project.
   
   Usage:
   1. Design tokens are defined in :root
   2. Utility classes for layout, spacing, etc.
   3. Shared component styles (cards, panels, etc.)
   4. Page-specific extensions in separate files
   ============================================ */

/* ============================================
   DESIGN TOKENS
   ============================================ */
:root {
    color-scheme: dark;

    /* Background Colors */
    --ui-bg: #0f172a;
    --ui-bg-soft: rgba(15, 23, 42, 0.5);
    --ui-surface: rgba(15, 23, 42, 0.82);
    --ui-surface-strong: #111827;
    --ui-surface-soft: rgba(255, 255, 255, 0.06);
    --ui-surface-elevated: rgba(17, 24, 39, 0.92);
    --ui-overlay: rgba(2, 8, 23, 0.72);
    --ui-hover: rgba(255, 255, 255, 0.06);
    --ui-hover-accent: rgba(56, 189, 248, 0.12);

    /* Border Colors */
    --ui-border: rgba(148, 163, 184, 0.22);
    --ui-border-strong: rgba(148, 163, 184, 0.38);
    --ui-border-light: rgba(148, 163, 184, 0.14);

    /* Text Colors */
    --ui-text: #e5eefb;
    --ui-text-muted: #9fb0c7;
    --ui-text-light: rgba(229, 238, 251, 0.7);
    --ui-heading: #f8fbff;

    /* Accent Colors */
    --ui-accent: #38bdf8;
    --ui-accent-strong: #0ea5e9;
    --ui-accent-soft: rgba(56, 189, 248, 0.12);
    --ui-accent-border: rgba(56, 189, 248, 0.22);

    /* Semantic Colors */
    --ui-success: #22c55e;
    --ui-success-soft: rgba(34, 197, 94, 0.12);
    --ui-warning: #f59e0b;
    --ui-warning-soft: rgba(245, 158, 11, 0.12);
    --ui-danger: #ef4444;
    --ui-danger-soft: rgba(239, 68, 68, 0.12);
    --ui-info: #6366f1;
    --ui-info-soft: rgba(99, 102, 241, 0.12);

    /* Shadows */
    --ui-shadow-sm: 0 4px 10px rgba(2, 8, 23, 0.16);
    --ui-shadow: 0 12px 34px rgba(2, 8, 23, 0.16);
    --ui-shadow-lg: 0 18px 50px rgba(2, 8, 23, 0.28);
    --ui-shadow-xl: 0 20px 60px rgba(2, 8, 23, 0.35);

    /* Border Radius */
    --ui-radius-sm: 10px;
    --ui-radius-md: 14px;
    --ui-radius-lg: 20px;
    --ui-radius-xl: 24px;
    --ui-radius-full: 9999px;

    /* Navbar Height */
    --ui-navbar-height: 72px;

    /* Transitions */
    --ui-transition-fast: 0.15s ease;
    --ui-transition-base: 0.2s ease;
    --ui-transition-slow: 0.3s ease;

    /* Z-Index Scale */
    --ui-z-dropdown: 1000;
    --ui-z-sticky: 1020;
    --ui-z-fixed: 1030;
    --ui-z-modal-backdrop: 1040;
    --ui-z-modal: 1050;
    --ui-z-popover: 1060;
    --ui-z-tooltip: 1070;

    /* Bootstrap dark contract */
    --bs-body-bg: var(--ui-bg);
    --bs-body-color: var(--ui-text);
    --bs-body-color-rgb: 229, 238, 251;
    --bs-body-bg-rgb: 15, 23, 42;
    --bs-emphasis-color: var(--ui-heading);
    --bs-secondary-color: var(--ui-text-muted);
    --bs-secondary-color-rgb: 159, 176, 199;
    --bs-tertiary-color: var(--ui-text-light);
    --bs-border-color: var(--ui-border);
    --bs-border-color-translucent: var(--ui-border-light);
    --bs-card-bg: var(--ui-surface);
    --bs-card-cap-bg: rgba(255, 255, 255, 0.03);
    --bs-card-color: var(--ui-text);
    --bs-modal-bg: var(--ui-surface-elevated);
    --bs-modal-color: var(--ui-text);
    --bs-dropdown-bg: var(--ui-surface-elevated);
    --bs-dropdown-link-color: var(--ui-text);
    --bs-dropdown-link-hover-color: var(--ui-heading);
    --bs-dropdown-link-hover-bg: var(--ui-hover-accent);
    --bs-dropdown-link-active-bg: rgba(14, 165, 233, 0.92);
    --bs-dropdown-link-active-color: #ffffff;
    --bs-nav-tabs-border-color: var(--ui-border);
    --bs-nav-tabs-link-hover-border-color: rgba(56, 189, 248, 0.26);
    --bs-nav-tabs-link-active-border-color: rgba(56, 189, 248, 0.28);
    --bs-secondary-bg: rgba(148, 163, 184, 0.14);
}

/* ============================================
   BASE STYLES
   ============================================ */
html,
body {
    min-height: 100%;
}

body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    color: var(--ui-text);
    background-color: var(--ui-bg);
    text-rendering: optimizeLegibility;
}

a {
    color: var(--ui-accent);
    transition: color var(--ui-transition-fast);
}

a:hover {
    color: #7dd3fc;
}

/* ============================================
   BACKGROUND & LAYOUT
   ============================================ */
.app-shell {
    position: relative;
    min-height: 100vh;
}

.background-image {
    background-image:
        linear-gradient(180deg, rgba(15, 23, 42, 0.8), rgba(15, 23, 42, 0.88)),
        url("../images/site/background_sa_1.webp");
    background-size: cover;
    background-position: center;
    position: fixed;
    inset: 0;
    z-index: -2;
    opacity: 1;
    filter: blur(2px);
    transform: scale(1.02);
}

.background-image::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at top left, rgba(56, 189, 248, 0.18), transparent 28%),
        radial-gradient(circle at bottom right, rgba(14, 165, 233, 0.12), transparent 34%);
}

/* ============================================
   NAVBAR
   ============================================ */
.site-navbar {
    backdrop-filter: blur(14px);
    background: rgba(15, 23, 42, 0.86) !important;
    border-bottom: 1px solid rgba(148, 163, 184, 0.16);
    box-shadow: 0 14px 40px rgba(2, 8, 23, 0.24);
    height: var(--ui-navbar-height);
}

.site-navbar .navbar-brand,
.site-navbar .nav-link,
.site-navbar .btn-outline-light {
    color: var(--ui-heading);
}

.site-navbar .nav-link {
    border-radius: var(--ui-radius-full);
    padding: 0.55rem 0.9rem;
    transition: background-color var(--ui-transition-base), color var(--ui-transition-base);
}

.site-navbar .container-fluid,
.site-navbar .navbar-collapse,
.site-navbar .navbar-nav {
    min-width: 0;
}

.site-navbar .navbar-collapse {
    align-items: center;
    gap: 0.85rem;
}

.site-navbar .navbar-nav {
    flex-wrap: nowrap;
}

.site-navbar__responsive-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    white-space: nowrap;
}

.site-navbar__label {
    min-width: 0;
}

.site-navbar__utility {
    flex-shrink: 0;
    gap: 0.55rem;
}

.site-navbar__menu-trigger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    border: 1px solid rgba(148, 163, 184, 0.22);
    background: rgba(255, 255, 255, 0.03);
    min-height: 44px;
}

.site-navbar .nav-link:hover,
.site-navbar .nav-link.active {
    color: #fff;
    background: rgba(255, 255, 255, 0.08);
}

.site-navbar .dropdown-menu {
    min-width: 15rem;
    padding: 0.45rem;
    margin-top: 0;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.98), rgba(17, 24, 39, 0.96));
    border: 1px solid var(--ui-border);
    border-radius: var(--ui-radius-sm);
    box-shadow: var(--ui-shadow-lg);
    backdrop-filter: blur(18px);
    transform: translateY(0.35rem);
}

.site-navbar__locale-menu {
    min-width: 12rem;
    width: max-content;
    max-width: min(18rem, calc(100vw - 1rem));
    transform-origin: top right;
}

.site-navbar__locale-menu .dropdown-item {
    white-space: nowrap;
}

.site-navbar .btn-outline-light {
    border-color: rgba(255, 255, 255, 0.22);
}

.site-navbar .btn-outline-light:hover,
.site-navbar .btn-outline-light:focus {
    color: #fff;
    border-color: rgba(255, 255, 255, 0.38);
    background: rgba(255, 255, 255, 0.08);
}

.site-navbar .navbar-toggler {
    border-color: rgba(148, 163, 184, 0.24);
    border-radius: 12px;
    padding: 0.45rem 0.65rem;
}

.site-navbar .navbar-toggler:focus {
    box-shadow: 0 0 0 0.2rem rgba(56, 189, 248, 0.14);
}

.site-navbar--compact .site-navbar__responsive-link {
    justify-content: center;
    gap: 0;
    min-width: 2.85rem;
    padding-inline: 0.75rem;
}

.site-navbar--compact .site-navbar__label {
    display: none;
}

.site-navbar--compact .site-navbar__language-flag {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.site-navbar--compact .site-navbar__responsive-link.dropdown-toggle::after {
    display: none;
}

.site-navbar--compact .site-navbar__responsive-link > i,
.site-navbar--compact .site-navbar__responsive-link > .fas,
.site-navbar--compact .site-navbar__responsive-link > .far,
.site-navbar--compact .site-navbar__responsive-link > .fab,
.site-navbar--compact .site-navbar__responsive-link > .bi {
    margin-right: 0 !important;
}

.dropdown-menu {
    min-width: 14rem;
    max-width: min(22rem, calc(100vw - 1rem));
    padding: 0.45rem;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.98), rgba(17, 24, 39, 0.96));
    border: 1px solid var(--ui-border);
    border-radius: var(--ui-radius-md);
    box-shadow: var(--ui-shadow-lg);
    backdrop-filter: blur(18px);
    overflow: hidden;
}

.dropdown-divider {
    margin: 0.45rem 0;
    border-top-color: rgba(148, 163, 184, 0.16);
    opacity: 1;
}

.dropdown-header {
    padding: 0.55rem 0.85rem 0.35rem;
    color: var(--ui-text-muted);
    font-size: 0.76rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    padding: 0.7rem 0.85rem;
    color: var(--ui-text);
    border-radius: 12px;
    font-weight: 500;
    white-space: normal;
    overflow-wrap: anywhere;
    transition:
        background-color var(--ui-transition-fast),
        color var(--ui-transition-fast),
        transform var(--ui-transition-fast);
}

.dropdown-item i,
.dropdown-item .fas,
.dropdown-item .far,
.dropdown-item .fab,
.dropdown-item .bi {
    width: 1.15rem;
    text-align: center;
    color: var(--ui-text-muted);
    flex-shrink: 0;
}

.dropdown-item:hover,
.dropdown-item:focus {
    color: var(--ui-heading);
    background: rgba(56, 189, 248, 0.12);
    transform: translateX(2px);
}

.dropdown-item:hover i,
.dropdown-item:focus i,
.dropdown-item:hover .fas,
.dropdown-item:focus .fas,
.dropdown-item:hover .far,
.dropdown-item:focus .far,
.dropdown-item:hover .fab,
.dropdown-item:focus .fab,
.dropdown-item:hover .bi,
.dropdown-item:focus .bi {
    color: var(--ui-accent);
}

.dropdown-item.active,
.dropdown-item:active {
    color: #ffffff;
    background: linear-gradient(135deg, rgba(14, 165, 233, 0.92), rgba(37, 99, 235, 0.94));
}

.dropdown-item.active i,
.dropdown-item:active i,
.dropdown-item.active .fas,
.dropdown-item:active .fas,
.dropdown-item.active .far,
.dropdown-item:active .far,
.dropdown-item.active .fab,
.dropdown-item:active .fab,
.dropdown-item.active .bi,
.dropdown-item:active .bi {
    color: #ffffff;
}

.dropdown-item.text-danger {
    color: #fda4af;
}

.dropdown-item.text-danger i,
.dropdown-item.text-danger .fas,
.dropdown-item.text-danger .far,
.dropdown-item.text-danger .fab,
.dropdown-item.text-danger .bi {
    color: #f87171;
}

.dropdown-item.text-danger:hover,
.dropdown-item.text-danger:focus {
    color: #ffe4e6;
    background: rgba(239, 68, 68, 0.14);
}

.dropdown-menu-end,
.site-navbar .dropdown-menu-end {
    right: 0;
    left: auto;
}

.site-navbar .dropdown-menu-end {
    transform-origin: top right;
}

/* ============================================
   LAYOUT COMPONENTS
   ============================================ */
.content-wrapper {
    flex-grow: 1;
    padding: 1.5rem 1rem 0;
}

.page-main {
    padding: 0 0 2rem;
}

.page-container {
    width: min(100%, 1280px);
    margin: 0 auto;
}

/* ============================================
   PAGE HEADER
   ============================================ */
.page-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.page-header__title {
    margin: 0;
    color: var(--ui-heading);
}

.page-header__subtitle {
    margin: 0.35rem 0 0;
    color: var(--ui-text-muted);
}

.page-header__title i.text-primary,
.page-header__title .text-primary {
    color: var(--ui-accent) !important;
}

/* ============================================
   SURFACE COMPONENTS
   ============================================ */
.surface-card,
.stat-card,
.glass-panel {
    background: var(--ui-surface);
    border: 1px solid var(--ui-border);
    border-radius: var(--ui-radius-lg);
    box-shadow: var(--ui-shadow);
}

.surface-card {
    padding: 1.5rem;
}

.glass-panel {
    backdrop-filter: blur(14px);
}

.stat-card {
    overflow: hidden;
}

/* ============================================
   SECTION TITLES
   ============================================ */
.section-title {
    color: var(--ui-heading);
    margin-bottom: 1rem;
}

/* ============================================
   EMPTY STATE
   ============================================ */
.empty-state {
    padding: 2rem;
    text-align: center;
    color: var(--ui-text-muted);
    background: rgba(15, 23, 42, 0.56);
    border: 1px dashed var(--ui-border-strong);
    border-radius: var(--ui-radius-md);
}

/* ============================================
   AUTH PAGES
   ============================================ */
.auth-page {
    width: min(100%, 1100px);
    margin: 0 auto;
}

.auth-panel {
    position: relative;
    overflow: hidden;
    display: grid;
    grid-template-columns: minmax(280px, 0.95fr) minmax(0, 1.05fr);
    min-height: 520px;
}

.auth-panel::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at top left, rgba(56, 189, 248, 0.16), transparent 30%),
        radial-gradient(circle at bottom right, rgba(239, 68, 68, 0.14), transparent 34%);
    pointer-events: none;
}

.auth-panel > * {
    position: relative;
    z-index: 1;
}

.auth-panel__media {
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    gap: 1rem;
    padding: 2rem;
    background:
        linear-gradient(180deg, rgba(2, 6, 23, 0.42), rgba(2, 6, 23, 0.72)),
        url("/static/images/site/background_sa_1.webp") center/cover no-repeat;
    border-right: 1px solid rgba(148, 163, 184, 0.14);
}

.auth-panel__eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #93c5fd;
}

.auth-panel__title {
    margin: 0;
    font-size: clamp(2rem, 4vw, 3.4rem);
    line-height: 0.95;
    color: #f8fafc;
    max-width: 8ch;
}

.auth-panel__lead {
    margin: 0;
    max-width: 28rem;
    color: rgba(226, 232, 240, 0.82);
    font-size: 1rem;
}

.auth-panel__badge-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
}

.auth-panel__badge {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.55rem 0.8rem;
    border-radius: var(--ui-radius-full);
    background: rgba(15, 23, 42, 0.72);
    border: 1px solid rgba(148, 163, 184, 0.18);
    color: #dbeafe;
    font-size: 0.92rem;
}

.auth-panel__content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 2rem;
}

.auth-panel__status {
    margin-bottom: 0.9rem;
    color: #93c5fd;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.auth-panel__content h1 {
    margin: 0 0 0.85rem;
    color: var(--ui-heading);
}

.auth-panel__content p {
    color: var(--ui-text-muted);
    margin-bottom: 0;
}

.auth-panel__stack {
    display: grid;
    gap: 1rem;
}

.auth-panel__note {
    margin-top: 1rem;
    padding: 1rem 1.1rem;
    background: rgba(15, 23, 42, 0.52);
    border: 1px solid rgba(148, 163, 184, 0.14);
    border-radius: var(--ui-radius-md);
    color: var(--ui-text-light);
}

.auth-actions {
    display: grid;
    gap: 0.75rem;
    margin-top: 1.5rem;
}

.auth-actions--split {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.auth-actions .btn {
    width: 100%;
    min-height: 50px;
    padding: 0.85rem 1rem;
    border-radius: var(--ui-radius-full);
}

/* ============================================
   UTILITY CLASSES
   ============================================ */
.ui-hidden {
    display: none !important;
}

.ui-select-inline {
    width: auto;
}

.ui-media-thumb {
    display: inline-block;
    overflow: hidden;
    border-radius: 10px;
}

.ui-media-thumb img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ui-media-thumb--vehicle {
    width: 96px;
    height: 54px;
}

.ui-text-break {
    word-break: break-word;
}

.ui-scroll-panel {
    max-height: 200px;
    overflow-y: auto;
}

/* ============================================
   CARD & MODAL ENHANCEMENTS
   ============================================ */
.card,
.modal-content,
.table-responsive {
    border-radius: var(--ui-radius-md);
}

.card,
.modal-content {
    border: 1px solid var(--ui-border);
    box-shadow: var(--ui-shadow-sm);
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.94), rgba(17, 24, 39, 0.9));
    color: var(--ui-text);
}

.modal-content {
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.98), rgba(17, 24, 39, 0.96));
    color: var(--ui-text);
}

/* ============================================
   PUBLIC SEO PAGES
   ============================================ */
.homepage-shell,
.public-page {
    width: min(100%, 1280px);
    margin: 0 auto;
}

.homepage-shell {
    display: grid;
    gap: 1.5rem;
    padding-bottom: 6rem;
}

.home-hero,
.public-hero {
    position: relative;
    overflow: hidden;
    display: grid;
    gap: 1.5rem;
}

.home-hero {
    grid-template-columns: minmax(0, 1.3fr) minmax(280px, 0.7fr);
    padding: 2.2rem;
    min-height: 560px;
    border: 1px solid rgba(125, 211, 252, 0.12);
    background:
        linear-gradient(135deg, rgba(2, 6, 23, 0.94), rgba(15, 23, 42, 0.82)),
        url('/static/images/site/background_sa_1.webp') center/cover no-repeat;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.05),
        0 30px 80px rgba(2, 6, 23, 0.45);
}

.home-hero::before,
.public-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(2, 6, 23, 0.86) 0%, rgba(2, 6, 23, 0.48) 54%, rgba(2, 6, 23, 0.2) 100%),
        radial-gradient(circle at top left, rgba(56, 189, 248, 0.24), transparent 30%),
        radial-gradient(circle at bottom right, rgba(239, 68, 68, 0.2), transparent 35%);
    pointer-events: none;
}

.home-hero > *,
.public-hero > * {
    position: relative;
    z-index: 1;
}

.home-hero__content,
.home-hero__aside {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.home-hero__eyebrow,
.public-hero__eyebrow,
.home-section__eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    font-size: 0.8rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #93c5fd;
    margin-bottom: 0.8rem;
}

.home-hero h1,
.public-hero h1 {
    font-size: clamp(2.2rem, 5vw, 4.35rem);
    line-height: 0.95;
    margin: 0;
    max-width: 11ch;
    color: #f8fafc;
    text-shadow: 0 12px 30px rgba(2, 6, 23, 0.42);
}

.home-hero__lead,
.public-hero__lead {
    max-width: 62ch;
    color: rgba(226, 232, 240, 0.82);
    font-size: 1.05rem;
    margin: 1rem 0 0;
}

.home-hero__trust-line {
    font-weight: 600;
    color: #f8fafc;
}

.home-hero__cta,
.public-hero__actions,
.featured-server-card__cta,
.home-action-strip {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 1.35rem;
}

.home-hero__quick-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.85rem;
    margin-top: 1rem;
}

.home-hero__quick-links a {
    color: #e2e8f0;
    text-decoration: none;
    font-weight: 600;
    padding: 0.45rem 0.8rem;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.46);
    border: 1px solid rgba(148, 163, 184, 0.16);
}

.home-hero__trust-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.7rem;
    list-style: none;
    padding: 0;
    margin: 1.2rem 0 0;
}

.home-hero__trust-list li {
    padding: 0.5rem 0.8rem;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.58);
    border: 1px solid rgba(125, 211, 252, 0.14);
    color: #e2e8f0;
    font-size: 0.92rem;
}

.home-stat-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.9rem;
}

.home-stat-card {
    padding: 1.05rem;
    border-radius: var(--ui-radius-md);
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.72), rgba(15, 23, 42, 0.48));
    border: 1px solid rgba(148, 163, 184, 0.14);
    min-height: 120px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    backdrop-filter: blur(16px);
}

.home-stat-card--accent {
    background: linear-gradient(160deg, rgba(239, 68, 68, 0.18), rgba(245, 158, 11, 0.18));
}

.home-stat-card__label {
    color: rgba(191, 219, 254, 0.82);
    font-size: 0.9rem;
}

.home-stat-card__value {
    font-size: clamp(1.5rem, 3vw, 2.4rem);
    color: #f8fafc;
}

.homepage-grid,
.public-grid,
.knowledge-grid,
.retention-grid,
.guide-layout {
    display: grid;
    gap: 1.5rem;
}

.homepage-grid,
.public-grid,
.guide-layout {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.homepage-grid--secondary,
.knowledge-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.homepage-grid--secondary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.retention-grid {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.home-section {
    padding: 1.5rem;
    border: 1px solid rgba(148, 163, 184, 0.14);
    background:
        linear-gradient(180deg, rgba(15, 23, 42, 0.76), rgba(15, 23, 42, 0.56));
    backdrop-filter: blur(14px);
}

.home-section--wide {
    padding: 1.5rem;
}

.home-section__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.home-section__header h2,
.guide-content__section h2,
.guide-sidebar h3,
.public-grid h2,
.ranking-row h2 {
    margin: 0;
    color: var(--ui-heading);
}

.home-section__summary {
    margin: 0.75rem 0 0;
    max-width: 64ch;
    color: rgba(226, 232, 240, 0.76);
}

.featured-server-grid,
.content-link-list {
    display: grid;
    gap: 1rem;
}

.featured-server-grid {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.featured-server-card,
.content-link-card,
.knowledge-card,
.onboarding-step,
.activity-feed__item,
.ranking-row,
.guide-sidebar .faq-list article,
.retention-grid article {
    border: 1px solid rgba(148, 163, 184, 0.18);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(15, 23, 42, 0.24));
    border-radius: var(--ui-radius-md);
    transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.featured-server-card,
.knowledge-card,
.content-link-card,
.retention-grid article {
    padding: 1.15rem;
}

.featured-server-card:hover,
.knowledge-card:hover,
.content-link-card:hover,
.retention-grid article:hover,
.activity-feed__item:hover,
.onboarding-step:hover {
    transform: translateY(-2px);
    border-color: rgba(125, 211, 252, 0.24);
    box-shadow: 0 16px 40px rgba(2, 6, 23, 0.22);
}

.retention-grid article {
    min-width: 0;
}

.retention-grid h3 {
    margin: 0 0 0.75rem;
    line-height: 1.15;
    text-wrap: balance;
}

.retention-grid p {
    margin: 0;
    color: var(--ui-text-muted);
}

.featured-server-card__top,
.featured-server-card__stats,
.featured-server-card__tags,
.content-link-card__meta,
.guide-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.featured-server-card__headline {
    font-weight: 700;
    color: #f8fafc;
    margin-bottom: 0.6rem;
}

.featured-server-card__platform,
.featured-server-card__uptime,
.featured-server-card__tags span,
.content-link-card__meta span,
.seo-breadcrumbs,
.guide-meta span {
    font-size: 0.85rem;
    color: var(--ui-text-muted);
}

.featured-server-card__tags span {
    padding: 0.25rem 0.65rem;
    border-radius: 999px;
    background: rgba(56, 189, 248, 0.12);
}

.onboarding-steps {
    display: grid;
    gap: 0.85rem;
}

.onboarding-step {
    display: grid;
    grid-template-columns: 52px minmax(0, 1fr);
    gap: 1rem;
    padding: 1rem;
}

.onboarding-step span {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(239, 68, 68, 0.18);
    color: #fecaca;
    font-weight: 800;
    box-shadow: 0 0 0 8px rgba(239, 68, 68, 0.08);
}

.activity-feed {
    display: grid;
    gap: 0.9rem;
}

.activity-feed__item {
    display: grid;
    grid-template-columns: 18px minmax(0, 1fr);
    gap: 1rem;
    padding: 1rem;
}

.activity-feed__pulse {
    width: 2.5rem;
    height: 2.5rem;
    margin-top: 0.15rem;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(34, 197, 94, 0.28), rgba(15, 23, 42, 0.16));
    color: #86efac;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.3);
    animation: pulse 2s infinite;
}

.activity-feed__metric {
    display: inline-block;
    margin-bottom: 0.45rem;
    color: #93c5fd;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 0.78rem;
    font-weight: 700;
}

.activity-feed__item h3,
.knowledge-card h3,
.featured-server-card h3 {
    color: #f8fafc;
}

.path-card {
    position: relative;
    overflow: hidden;
}

.path-card::before {
    content: "";
    position: absolute;
    inset: auto -20% -35% auto;
    width: 180px;
    height: 180px;
    border-radius: 50%;
    filter: blur(24px);
    opacity: 0.22;
    pointer-events: none;
}

.path-card--danger::before {
    background: #ef4444;
}

.path-card--law::before {
    background: #38bdf8;
}

.path-card--speed::before {
    background: #f59e0b;
}

.path-card--money::before {
    background: #22c55e;
}

.path-card--neutral::before {
    background: #a78bfa;
}

.home-recommendation {
    margin-top: 1rem;
    padding: 1rem;
    border-radius: var(--ui-radius-md);
    background: linear-gradient(160deg, rgba(56, 189, 248, 0.12), rgba(99, 102, 241, 0.09));
}

.home-section--final-cta {
    background:
        linear-gradient(135deg, rgba(127, 29, 29, 0.28), rgba(15, 23, 42, 0.88)),
        linear-gradient(180deg, rgba(15, 23, 42, 0.76), rgba(15, 23, 42, 0.56));
}

.home-sticky-cta {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    display: none;
    gap: 0.65rem;
    padding: 0.8rem 0.9rem calc(0.8rem + env(safe-area-inset-bottom));
    background: rgba(2, 6, 23, 0.92);
    backdrop-filter: blur(16px);
    border-top: 1px solid rgba(148, 163, 184, 0.16);
    z-index: 1040;
}

.home-sticky-cta .btn {
    flex: 1 1 0;
    min-width: 0;
}

.seo-breadcrumbs {
    margin: 1rem 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
}

.seo-breadcrumbs a {
    color: var(--ui-text-muted);
    text-decoration: none;
}

.guide-layout {
    align-items: start;
}

.guide-content,
.guide-sidebar,
.ranking-table {
    padding: 1.5rem;
}

.guide-content__section + .guide-content__section {
    margin-top: 1.2rem;
}

.faq-list {
    margin-top: 1rem;
    display: grid;
    gap: 0.75rem;
}

.faq-list article {
    padding: 0.85rem;
}

.ranking-table {
    display: grid;
    gap: 0.75rem;
}

.ranking-row {
    display: grid;
    grid-template-columns: 64px minmax(0, 1fr) auto auto;
    gap: 1rem;
    align-items: center;
    padding: 1rem;
}

.ranking-row__position {
    font-size: 1.4rem;
    font-weight: 800;
    color: #fca5a5;
}

.ranking-row__stats,
.content-bullet-list {
    color: var(--ui-text-muted);
}

.content-bullet-list {
    margin: 0;
    padding-left: 1.2rem;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.42);
    }
    70% {
        box-shadow: 0 0 0 12px rgba(34, 197, 94, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(34, 197, 94, 0);
    }
}

@media (max-width: 992px) {
    .site-navbar {
        height: auto;
        min-height: var(--ui-navbar-height);
    }

    .site-navbar .navbar-collapse {
        align-items: stretch;
        padding: 0.85rem 0 1rem;
    }

    .site-navbar .navbar-nav {
        flex-wrap: wrap;
    }

    .site-navbar__utility {
        flex-wrap: wrap;
        justify-content: flex-start;
    }

    .site-navbar__responsive-link {
        justify-content: flex-start;
        gap: 0.5rem;
    }

    .site-navbar__locale-menu {
        width: min(100%, 18rem);
        max-width: calc(100vw - 2rem);
    }

    .home-hero,
    .homepage-grid,
    .public-grid,
    .guide-layout,
    .homepage-grid--secondary,
    .knowledge-grid,
    .retention-grid,
    .ranking-row {
        grid-template-columns: 1fr;
    }

    .home-stat-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 640px) {
    .home-hero,
    .public-hero,
    .home-section,
    .guide-content,
    .guide-sidebar,
    .ranking-table {
        padding: 1.1rem;
    }

    .home-stat-grid {
        grid-template-columns: 1fr;
    }

    .home-hero h1,
    .public-hero h1 {
        max-width: none;
    }

    .featured-server-card__cta,
    .home-action-strip,
    .public-hero__actions,
    .home-hero__cta {
        flex-direction: column;
    }

    .featured-server-card__cta .btn,
    .home-action-strip .btn,
    .public-hero__actions .btn,
    .home-hero__cta .btn {
        width: 100%;
    }

    .home-sticky-cta {
        display: flex;
    }

    .home-hero__trust-list {
        flex-direction: column;
    }
}

@media (prefers-reduced-motion: reduce) {
    .activity-feed__pulse,
    .featured-server-card,
    .knowledge-card,
    .content-link-card,
    .retention-grid article,
    .activity-feed__item,
    .onboarding-step {
        animation: none !important;
        transition: none !important;
    }
}

.modal-header,
.modal-footer {
    border-color: rgba(148, 163, 184, 0.14);
}

.modal-header:not(.bg-danger):not(.bg-success):not(.bg-warning) {
    background: rgba(15, 23, 42, 0.78);
}

.modal-title {
    color: var(--ui-heading);
}

.modal .btn-close {
    filter: invert(1) grayscale(1);
    opacity: 0.85;
}

.modal .btn-close:hover {
    opacity: 1;
}

.modal .alert {
    border-radius: var(--ui-radius-md);
}

.modal .form-control,
.modal .form-select,
.modal textarea {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(148, 163, 184, 0.18);
    color: var(--ui-text);
}

.modal .form-control::placeholder,
.modal textarea::placeholder {
    color: rgba(159, 176, 199, 0.72);
}

.modal .form-control:focus,
.modal .form-select:focus,
.modal textarea:focus {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(56, 189, 248, 0.34);
    color: var(--ui-heading);
    box-shadow: 0 0 0 0.2rem rgba(56, 189, 248, 0.14);
}

.modal .form-label,
.modal .form-text {
    color: var(--ui-text-muted);
}

.card-header {
    background: rgba(255, 255, 255, 0.03);
    border-bottom-color: rgba(148, 163, 184, 0.14);
}

.card-footer {
    background: rgba(255, 255, 255, 0.02);
    border-top-color: rgba(148, 163, 184, 0.14);
}

.nav-tabs {
    border-bottom-color: rgba(148, 163, 184, 0.16);
    gap: 0.45rem;
}

.nav-tabs .nav-link {
    color: var(--ui-text-muted);
    border: 1px solid transparent;
    border-bottom: none;
    border-radius: var(--ui-radius-sm) var(--ui-radius-sm) 0 0;
    background: transparent;
    transition:
        color var(--ui-transition-fast),
        border-color var(--ui-transition-fast),
        background-color var(--ui-transition-fast);
}

.nav-tabs .nav-link:hover,
.nav-tabs .nav-link:focus {
    color: var(--ui-heading);
    border-color: rgba(56, 189, 248, 0.2);
    background: rgba(255, 255, 255, 0.03);
}

.nav-tabs .nav-link.active,
.nav-tabs .nav-item.show .nav-link {
    color: var(--ui-heading);
    background: rgba(56, 189, 248, 0.12);
    border-color: rgba(56, 189, 248, 0.28);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.btn-outline-system,
.btn-outline-secondary {
    color: var(--ui-heading);
    border-color: rgba(148, 163, 184, 0.3);
    background: rgba(255, 255, 255, 0.02);
}

.btn-outline-system:hover,
.btn-outline-system:focus,
.btn-outline-system:active,
.btn-outline-secondary:hover,
.btn-outline-secondary:focus,
.btn-outline-secondary:active {
    color: #ffffff;
    border-color: rgba(56, 189, 248, 0.34);
    background: rgba(56, 189, 248, 0.12);
}

.btn-outline-system.active,
.btn-outline-secondary.active {
    color: #ffffff;
    border-color: rgba(56, 189, 248, 0.4);
    background: rgba(56, 189, 248, 0.18);
}

.btn-secondary {
    color: var(--ui-heading);
    background: rgba(148, 163, 184, 0.18);
    border-color: rgba(148, 163, 184, 0.22);
}

.btn-secondary:hover,
.btn-secondary:focus {
    color: #ffffff;
    background: rgba(148, 163, 184, 0.28);
    border-color: rgba(148, 163, 184, 0.3);
}

.form-check-input {
    background-color: rgba(15, 23, 42, 0.7);
    border-color: rgba(148, 163, 184, 0.3);
}

.form-check-input:checked {
    background-color: var(--ui-accent);
    border-color: var(--ui-accent);
}

.form-check-input:focus {
    box-shadow: 0 0 0 0.2rem rgba(56, 189, 248, 0.16);
}

.form-check-label,
.text-muted,
.text-secondary,
small.text-muted,
small.text-secondary {
    color: var(--ui-text-muted) !important;
}

.badge.bg-light,
.bg-light {
    background: rgba(148, 163, 184, 0.14) !important;
    color: var(--ui-heading) !important;
    border-color: rgba(148, 163, 184, 0.22);
}

.text-dark {
    color: #0f172a !important;
}

.alert {
    border-radius: var(--ui-radius-md);
    border-color: transparent;
    color: var(--ui-text);
}

.alert-success {
    background: rgba(21, 128, 61, 0.18);
    border-color: rgba(34, 197, 94, 0.3);
}

.alert-danger {
    background: rgba(127, 29, 29, 0.26);
    border-color: rgba(248, 113, 113, 0.28);
}

.alert-warning {
    background: rgba(146, 64, 14, 0.26);
    border-color: rgba(251, 191, 36, 0.3);
    color: #fef3c7;
}

.alert-info {
    background: rgba(30, 64, 175, 0.2);
    border-color: rgba(96, 165, 250, 0.3);
}

/* ============================================
   SEARCH SHELL
   ============================================ */
.ui-section {
    margin-bottom: 1.5rem;
}

.ui-search-shell,
.ui-pagination-shell,
.ui-floating-tools .btn-group-vertical {
    background: var(--ui-surface);
    border: 1px solid var(--ui-border);
    border-radius: var(--ui-radius-lg);
    box-shadow: var(--ui-shadow);
}

.ui-search-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 1.25rem;
    color: var(--ui-heading);
    background: rgba(15, 23, 42, 0.8);
    border-bottom: 1px solid rgba(148, 163, 184, 0.14);
}

.ui-search-header h6 {
    margin: 0;
}

.ui-search-body,
.ui-pagination-body {
    padding: 1.25rem;
}

.ui-search-results {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
}

.ui-search-results__actions,
.ui-filter-actions,
.ui-pagination-jump {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.ui-search-shell .form-label,
.ui-search-shell .form-text,
.ui-pagination-shell small {
    color: var(--ui-text-muted);
}

.ui-search-shell .form-control,
.ui-search-shell .form-select,
.ui-pagination-shell .form-control {
    background: rgba(15, 23, 42, 0.55);
    border-color: rgba(148, 163, 184, 0.18);
    color: var(--ui-text);
}

.ui-search-shell .form-control::placeholder {
    color: rgba(159, 176, 199, 0.8);
}

.ui-search-shell hr {
    border-color: rgba(148, 163, 184, 0.14);
}

.ui-search-results .alert {
    margin-bottom: 0;
    background: var(--ui-accent-soft);
    border-color: var(--ui-accent-border);
    color: #d8eefc;
}

/* ============================================
   PAGINATION
   ============================================ */
.ui-pagination-topline {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
}

.ui-pagination-shell {
    position: relative;
    overflow: hidden;
    background:
        linear-gradient(180deg, rgba(15, 23, 42, 0.92), rgba(15, 23, 42, 0.82)),
        radial-gradient(circle at top right, rgba(56, 189, 248, 0.14), transparent 30%);
}

.ui-pagination-shell::before {
    content: "";
    position: absolute;
    inset: 0 0 auto;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(56, 189, 248, 0.5), transparent);
}

.ui-pagination-summary {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.ui-pagination-summary__results {
    color: var(--ui-text-muted);
}

.ui-pagination-summary__badge {
    display: inline-flex;
    align-items: center;
    min-height: 32px;
    padding: 0.35rem 0.75rem;
    border: 1px solid rgba(56, 189, 248, 0.24);
    border-radius: var(--ui-radius-full);
    background: rgba(56, 189, 248, 0.12);
    color: #dff7ff;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.ui-pagination-jump__label,
.ui-pagination-jump__limit {
    color: var(--ui-text-muted);
}

.ui-pagination-jump .form-control {
    width: 88px;
    border-radius: 12px;
    border-color: rgba(56, 189, 248, 0.18);
    text-align: center;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.ui-pagination-jump .form-control:focus {
    border-color: rgba(56, 189, 248, 0.4);
    box-shadow: 0 0 0 0.22rem rgba(56, 189, 248, 0.18);
}

.ui-pagination-jump__submit {
    min-width: 54px;
    border-radius: 12px;
    border: 1px solid rgba(56, 189, 248, 0.28);
    background: linear-gradient(180deg, rgba(56, 189, 248, 0.22), rgba(14, 165, 233, 0.16));
    color: #eaf8ff;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.ui-pagination-jump__submit:hover,
.ui-pagination-jump__submit:focus {
    color: #fff;
    background: linear-gradient(180deg, rgba(56, 189, 248, 0.32), rgba(14, 165, 233, 0.24));
    border-color: rgba(56, 189, 248, 0.44);
}

.ui-pagination-shell .pagination {
    margin-bottom: 0;
    gap: 0.35rem;
    flex-wrap: wrap;
}

.ui-pagination-shell .page-link {
    min-width: 44px;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.55rem 0.8rem;
    margin: 0;
    border-radius: 14px;
    border: 1px solid rgba(148, 163, 184, 0.18);
    background: linear-gradient(180deg, rgba(30, 41, 59, 0.94), rgba(15, 23, 42, 0.84));
    color: #d8e6f7;
    font-weight: 700;
    box-shadow: 0 10px 24px rgba(2, 8, 23, 0.16);
    transition: transform var(--ui-transition-fast),
                background var(--ui-transition-fast),
                border-color var(--ui-transition-fast),
                color var(--ui-transition-fast),
                box-shadow var(--ui-transition-fast);
}

.ui-pagination-shell .page-link:hover {
    background: linear-gradient(180deg, rgba(56, 189, 248, 0.24), rgba(14, 165, 233, 0.16));
    border-color: rgba(56, 189, 248, 0.34);
    color: #fff;
    box-shadow: 0 14px 30px rgba(14, 165, 233, 0.18);
    transform: translateY(-2px);
}

.ui-pagination-shell .page-item.active .page-link {
    background: linear-gradient(180deg, #38bdf8, #0ea5e9);
    border-color: rgba(125, 211, 252, 0.85);
    color: #fff;
    box-shadow: 0 16px 34px rgba(14, 165, 233, 0.32);
}

.ui-pagination-shell .page-item-edge .page-link {
    min-width: 48px;
    color: #bfeeff;
}

.ui-pagination-shell .page-item.disabled .page-link {
    color: rgba(159, 176, 199, 0.65);
    background: rgba(15, 23, 42, 0.4);
    border-color: rgba(148, 163, 184, 0.12);
    box-shadow: none;
}

.ui-pagination-shell .page-item.disabled .page-link:hover {
    transform: none;
    color: rgba(159, 176, 199, 0.65);
    background: rgba(15, 23, 42, 0.4);
    border-color: rgba(148, 163, 184, 0.12);
    box-shadow: none;
}

/* ============================================
   DETAIL PAGE LAYOUT
   ============================================ */
.detail-page {
    width: min(100%, 1320px);
    margin: 0 auto;
}

.detail-hero {
    display: grid;
    grid-template-columns: minmax(0, 1.7fr) minmax(280px, 1fr);
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.detail-summary {
    padding: 1.75rem;
}

.detail-summary__eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.35rem 0.75rem;
    border-radius: var(--ui-radius-full);
    border: 1px solid var(--ui-accent-border);
    background: var(--ui-accent-soft);
    color: #d7efff;
    font-size: 0.85rem;
    margin-bottom: 0.9rem;
}

.detail-summary__title {
    margin: 0;
    color: var(--ui-heading);
}

.detail-summary__subtitle {
    margin: 0.5rem 0 0;
    color: var(--ui-text-muted);
}

.detail-summary__actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-top: 1.25rem;
}

.detail-media {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 220px;
    padding: 1rem;
    background: linear-gradient(180deg, rgba(56, 189, 248, 0.12), rgba(15, 23, 42, 0.1));
    border-radius: var(--ui-radius-md);
    border: 1px solid rgba(148, 163, 184, 0.16);
}

.detail-media img {
    max-width: 100%;
    height: auto;
}

.detail-kpi-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.detail-kpi-card {
    padding: 1.25rem;
}

.detail-kpi-card__value {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--ui-heading);
}

.detail-kpi-card__label {
    margin-top: 0.25rem;
    color: var(--ui-text-muted);
    font-size: 0.9rem;
}

.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.7fr) minmax(320px, 1fr);
    gap: 1.5rem;
}

.detail-main,
.detail-sidebar {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.detail-card {
    overflow: hidden;
}

.detail-card__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid rgba(148, 163, 184, 0.14);
    background: rgba(15, 23, 42, 0.7);
}

.detail-card__title {
    margin: 0;
    color: var(--ui-heading);
    font-size: 1rem;
}

.detail-card__body {
    padding: 1.25rem;
}

.detail-info-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem 1.5rem;
}

.detail-info-block {
    padding: 1rem;
    border-radius: var(--ui-radius-md);
    border: 1px solid rgba(148, 163, 184, 0.14);
    background: rgba(255, 255, 255, 0.03);
}

.detail-info-block h6 {
    margin: 0 0 0.9rem;
    color: var(--ui-heading);
}

.detail-facts {
    display: grid;
    gap: 0.75rem;
}

.detail-fact {
    display: grid;
    grid-template-columns: 140px minmax(0, 1fr);
    align-items: start;
    gap: 1rem;
}

.detail-fact__label {
    color: var(--ui-text-muted);
    font-size: 0.92rem;
}

.detail-fact__value {
    color: var(--ui-text);
    min-width: 0;
}

.detail-stack {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.detail-side-item {
    padding: 0.9rem 1rem;
    border-radius: var(--ui-radius-md);
    border: 1px solid rgba(148, 163, 184, 0.14);
    background: rgba(255, 255, 255, 0.03);
}

.detail-side-item__label {
    display: block;
    margin-bottom: 0.25rem;
    color: var(--ui-text-muted);
    font-size: 0.85rem;
}

.detail-side-item__value {
    color: var(--ui-heading);
    font-weight: 600;
}

.detail-text-panel {
    padding: 1rem;
    border-radius: var(--ui-radius-md);
    border: 1px solid rgba(148, 163, 184, 0.14);
    background: rgba(255, 255, 255, 0.03);
}

.detail-table-card .table {
    margin-bottom: 0;
}

.detail-table-card .table thead th {
    border-bottom-width: 1px;
}

.detail-table-card .table :not(caption)>*>* {
    padding: 0.85rem 1rem;
}

.detail-action-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.detail-action-list .btn {
    width: 100%;
}

.detail-feed {
    display: flex;
    flex-direction: column;
}

.detail-feed--compact .detail-feed__item {
    padding: 0.85rem 0;
}

.detail-feed__item {
    padding: 1rem 0;
    border-bottom: 1px solid rgba(148, 163, 184, 0.12);
}

.detail-feed__item:first-child {
    padding-top: 0;
}

.detail-feed__item:last-child {
    padding-bottom: 0;
    border-bottom: 0;
}

/* ============================================
   BULK ACTIONS
   ============================================ */
.ui-bulk-actions {
    display: none;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 1.25rem;
    margin-bottom: 1rem;
    background: var(--ui-warning-soft);
    border: 1px solid rgba(245, 158, 11, 0.28);
    border-radius: var(--ui-radius-lg);
    box-shadow: var(--ui-shadow);
}

.ui-bulk-actions.is-visible {
    display: flex;
}

.ui-bulk-actions__title {
    color: var(--ui-heading);
    font-weight: 600;
}

.ui-bulk-actions__meta {
    color: var(--ui-text-muted);
    font-size: 0.92rem;
}

/* ============================================
   FLOATING TOOLS
   ============================================ */
.ui-floating-tools {
    position: fixed;
    right: 20px;
    bottom: 20px;
    z-index: var(--ui-z-fixed);
}

.ui-floating-tools .btn {
    border-radius: var(--ui-radius-md);
}

.saved-search-card {
    transition: transform var(--ui-transition-fast), box-shadow var(--ui-transition-fast), border-color var(--ui-transition-fast);
}

.saved-search-card:hover {
    transform: translateY(-1px);
    border-color: rgba(56, 189, 248, 0.24);
    box-shadow: var(--ui-shadow);
}

.search-history-item:hover {
    transform: translateY(-1px);
}

.saved-search-toast {
    top: 20px;
    right: 20px;
    z-index: 9999;
    min-width: min(320px, calc(100vw - 2rem));
    box-shadow: var(--ui-shadow-lg);
    backdrop-filter: blur(16px);
}

/* ============================================
   FOOTER
   ============================================ */
.site-footer {
    margin-top: auto;
    border-top: 1px solid rgba(148, 163, 184, 0.14);
    background: rgba(15, 23, 42, 0.92) !important;
    backdrop-filter: blur(14px);
}

.site-footer a {
    color: #dbeafe;
}

.site-footer a:hover {
    color: #fff;
}

/* ============================================
   CABINET PAGE
   ============================================ */
.cabinet-page .nav-tabs {
    flex-wrap: nowrap;
    gap: 0.5rem;
    overflow-x: auto;
    overflow-y: hidden;
    padding-bottom: 0.35rem;
    scrollbar-width: thin;
}

.cabinet-page .nav-tabs .nav-link {
    white-space: nowrap;
}

.cabinet-page {
    width: min(100%, 1240px);
    margin: 0 auto;
}

.cabinet-shell,
.cabinet-active-panel,
.cabinet-character-card {
    background: var(--ui-surface);
    border: 1px solid var(--ui-border);
    box-shadow: var(--ui-shadow);
}

.cabinet-shell .detail-card__body,
.cabinet-active-panel .detail-card__body,
.cabinet-character-card .detail-card__body {
    padding: 1.35rem;
}

.cabinet-page h4,
.cabinet-page h5,
.cabinet-page h6,
.cabinet-page .card-title {
    color: var(--ui-heading);
}

.cabinet-page .table {
    --bs-table-bg: transparent;
    --bs-table-color: var(--ui-text);
    --bs-table-border-color: var(--ui-border-light);
}

.cabinet-page .table th {
    color: var(--ui-heading);
    font-weight: 600;
}

.cabinet-page .table td {
    color: var(--ui-text);
}

.cabinet-page .table.table-borderless > :not(caption) > * > * {
    border-bottom-width: 0;
}

.cabinet-page .alert-sm {
    padding: 0.75rem 0.9rem;
    font-size: 0.88rem;
}

.cabinet-skin-hero {
    max-height: 240px;
    width: auto;
    object-fit: contain;
}

.cabinet-skin-card {
    max-height: 160px;
    width: auto;
    object-fit: contain;
}

.bindings-avatar {
    width: 44px;
    height: 44px;
    object-fit: contain;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.04);
}

/* ============================================
   RESPONSIVE BREAKPOINTS
   ============================================ */
@media (max-width: 991.98px) {
    .content-wrapper {
        padding-top: 1rem;
    }

    .site-navbar {
        height: auto;
        min-height: var(--ui-navbar-height);
    }

    .site-navbar .container-fluid {
        padding-left: 0.85rem;
        padding-right: 0.85rem;
    }

    .site-navbar .navbar-brand {
        font-size: 1.2rem;
        max-width: calc(100% - 64px);
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .site-navbar .navbar-collapse {
        margin-top: 0.85rem;
        padding: 0.85rem;
        border: 1px solid rgba(148, 163, 184, 0.16);
        border-radius: 18px;
        background: rgba(15, 23, 42, 0.92);
        box-shadow: var(--ui-shadow);
    }

    .site-navbar .navbar-nav {
        gap: 0.2rem;
    }

    .site-navbar .nav-link,
    .site-navbar .dropdown-toggle {
        width: 100%;
        border-radius: 14px;
        padding: 0.72rem 0.9rem;
    }

    .site-navbar .dropdown-menu {
        position: static !important;
        transform: none !important;
        min-width: 100%;
        margin-top: 0.45rem;
        box-shadow: none;
    }

    .site-navbar .navbar-collapse > .d-flex.align-items-center {
        margin-top: 0.85rem;
        padding-top: 0.85rem;
        border-top: 1px solid rgba(148, 163, 184, 0.12);
        flex-direction: column;
        align-items: stretch !important;
        gap: 0.75rem;
    }

    .site-navbar .navbar-collapse > .d-flex.align-items-center > .dropdown,
    .site-navbar .navbar-collapse > .d-flex.align-items-center > form,
    .site-navbar .navbar-collapse > .d-flex.align-items-center > a {
        width: 100%;
    }

    .site-navbar .navbar-collapse > .d-flex.align-items-center .btn {
        width: 100%;
        justify-content: center;
    }

    .site-navbar__utility {
        flex-direction: column;
        align-items: stretch !important;
        width: 100%;
        gap: 0.75rem;
    }

    .site-navbar__utility .dropdown,
    .site-navbar__utility .site-navbar__menu-trigger {
        width: 100%;
    }

    .detail-hero,
    .detail-layout,
    .auth-panel {
        grid-template-columns: 1fr;
    }

    .auth-panel__media {
        min-height: 240px;
        border-right: 0;
        border-bottom: 1px solid rgba(148, 163, 184, 0.14);
    }

    .detail-kpi-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 767.98px) {
    .page-header {
        flex-direction: column;
    }

    .page-header__title {
        font-size: clamp(2rem, 7vw, 2.8rem);
        line-height: 1.08;
    }

    .page-header__subtitle {
        font-size: 0.98rem;
    }

    .auth-panel__media,
    .auth-panel__content {
        padding: 1.35rem;
    }

    .auth-panel__title {
        max-width: none;
        font-size: clamp(1.8rem, 9vw, 2.6rem);
    }

    .auth-actions--split {
        grid-template-columns: 1fr;
    }

    .detail-info-grid,
    .detail-kpi-grid {
        grid-template-columns: 1fr;
    }

    .detail-fact {
        grid-template-columns: 1fr;
        gap: 0.35rem;
    }

    .ui-bulk-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .ui-bulk-actions .btn-group,
    .ui-bulk-actions .btn,
    .detail-summary__actions .btn,
    .detail-action-list .btn {
        width: 100%;
    }

    .content-wrapper {
        padding-left: 0.75rem;
        padding-right: 0.75rem;
    }

    .page-header {
        flex-direction: column;
        align-items: stretch;
    }

    .admin-toolbar,
    .page-header .btn-group,
    .results-panel__header .btn-group {
        width: 100%;
    }

    .admin-toolbar .btn,
    .page-header .btn-group > .btn,
    .results-panel__header .btn-group > .btn {
        flex: 1 1 auto;
    }

    .results-panel__header,
    .ui-search-header {
        align-items: stretch;
    }

    .results-panel__title,
    .results-panel__subtitle {
        word-break: break-word;
    }

    .ui-search-results,
    .ui-pagination-topline,
    .ui-pagination-jump {
        flex-direction: column;
        align-items: stretch;
    }

    .ui-pagination-summary {
        justify-content: center;
        text-align: center;
    }

    .ui-pagination-jump form {
        width: 100%;
        justify-content: center;
    }

    .ui-floating-tools {
        right: 12px;
        bottom: 12px;
    }

    .table-responsive table {
        min-width: 640px;
    }

    .leaderboard-grid > * {
        grid-column: span 12;
    }

    .summary-card {
        min-height: 104px;
        padding: 1rem;
    }

    .summary-card__value {
        font-size: clamp(1.25rem, 1rem + 1.2vw, 1.7rem);
    }
}

@media (max-width: 575.98px) {
    .content-wrapper {
        padding-left: 0.6rem;
        padding-right: 0.6rem;
    }

    .page-wrapper,
    .admin-page {
        width: 100%;
    }

    .page-header__title {
        font-size: clamp(1.8rem, 8vw, 2.35rem);
    }

    .admin-toolbar,
    .page-header .btn-group,
    .results-panel__header .btn-group {
        flex-direction: column;
    }

    .admin-toolbar .btn,
    .page-header .btn-group > .btn,
    .results-panel__header .btn-group > .btn {
        width: 100%;
    }

    .ui-search-header,
    .results-panel__header {
        padding: 0.9rem 1rem;
    }

    .surface-card,
    .filter-card,
    .filter-panel,
    .results-panel,
    .ui-search-shell {
        border-radius: 16px;
    }

    .table-responsive table {
        min-width: 580px;
    }
}

/* ============================================
   CABINET PAGE MOBILE
   ============================================ */
@media (max-width: 767.98px) {

    .cabinet-page .card-header .d-flex,
    .cabinet-page .btn-group {
        flex-direction: column;
        align-items: stretch;
        gap: 0.75rem;
    }

    .cabinet-page .btn-group>.btn {
        width: 100%;
    }

    .cabinet-page .tab-pane .table,
    .cabinet-page .table.table-sm {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }
}

/* ============================================
   SHARED COMPONENT CLASSES
   Centralized replacements for inline styles
   ============================================ */

/* Page wrapper - replaces inline width/margin centering */
.page-wrapper {
    width: min(100%, 1320px);
    margin: 0 auto;
}

.admin-page {
    width: min(100%, 1320px);
    margin: 0 auto;
}

.admin-toolbar {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.summary-card {
    position: relative;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.2rem 1.25rem;
    min-height: 118px;
    overflow: hidden;
}

.summary-card::after {
    content: "";
    position: absolute;
    inset: auto -18px -18px auto;
    width: 82px;
    height: 82px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(56, 189, 248, 0.18), transparent 70%);
    pointer-events: none;
}

.summary-card__label {
    display: block;
    margin-bottom: 0.45rem;
    color: var(--ui-text-muted);
    font-size: 0.82rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.summary-card__value {
    color: var(--ui-heading);
    font-size: clamp(1.4rem, 1.2rem + 0.6vw, 2rem);
    font-weight: 800;
    line-height: 1.05;
}

.summary-card__meta {
    margin-top: 0.35rem;
    color: var(--ui-text-muted);
    font-size: 0.84rem;
}

.summary-card__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    border-radius: 14px;
    border: 1px solid rgba(56, 189, 248, 0.18);
    background: rgba(56, 189, 248, 0.12);
    color: #8ae0ff;
    font-size: 1.15rem;
    flex-shrink: 0;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.filter-card,
.filter-panel,
.results-panel {
    background: var(--ui-surface);
    border: 1px solid var(--ui-border);
    border-radius: var(--ui-radius-lg);
    box-shadow: var(--ui-shadow);
}

.filter-card,
.filter-panel {
    padding: 1.1rem 1.25rem;
}

.results-panel__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid rgba(148, 163, 184, 0.14);
}

.results-panel__title {
    margin: 0;
    color: var(--ui-heading);
    font-size: 1rem;
    font-weight: 700;
}

.results-panel__subtitle {
    margin: 0.2rem 0 0;
    color: var(--ui-text-muted);
    font-size: 0.86rem;
}

.results-panel .table-responsive {
    border-radius: 0 0 var(--ui-radius-lg) var(--ui-radius-lg);
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
}

.results-panel .card-body {
    padding: 0;
}

/* Surface card - shared background/border/shadow */
.surface {
    background: var(--ui-surface);
    border: 1px solid var(--ui-border);
    box-shadow: var(--ui-shadow);
    border-radius: var(--ui-radius-lg);
}

/* Surface strong - for more prominent surfaces */
.surface--strong {
    background: var(--ui-surface-strong);
    border-color: var(--ui-border-strong);
    box-shadow: var(--ui-shadow-lg);
}

/* Glass effect - for frosted glass panels */
.surface--glass {
    backdrop-filter: blur(14px);
}

/* Heading with system color */
.text-heading {
    color: var(--ui-heading);
}

.text-system {
    color: var(--ui-text);
}

.text-muted-system {
    color: var(--ui-text-muted);
}

/* Border utility */
.border-system {
    border: 1px solid var(--ui-border);
}

.border-system-strong {
    border: 1px solid var(--ui-border-strong);
}

.border-none-system {
    border: none;
}

/* Shadow utilities */
.shadow-system {
    box-shadow: var(--ui-shadow);
}

.shadow-system-sm {
    box-shadow: var(--ui-shadow-sm);
}

.shadow-system-lg {
    box-shadow: var(--ui-shadow-lg);
}

.shadow-system-xl {
    box-shadow: var(--ui-shadow-xl);
}

/* Radius utilities */
.rounded-system {
    border-radius: var(--ui-radius-md);
}

.rounded-system-lg {
    border-radius: var(--ui-radius-lg);
}

.rounded-system-sm {
    border-radius: var(--ui-radius-sm);
}

/* Gradient backgrounds for stat cards */
.gradient-accent {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

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

.gradient-warning {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
}

.gradient-danger {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
}

.gradient-info {
    background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
}

/* Badge variants using system colors */
.badge-accent {
    background: var(--ui-accent-soft);
    color: var(--ui-accent);
    border: 1px solid var(--ui-accent-border);
}

.badge-success {
    background: var(--ui-success-soft);
    color: var(--ui-success);
    border: 1px solid rgba(34, 197, 94, 0.22);
}

.badge-warning {
    background: var(--ui-warning-soft);
    color: var(--ui-warning);
    border: 1px solid rgba(245, 158, 11, 0.22);
}

.badge-danger {
    background: var(--ui-danger-soft);
    color: var(--ui-danger);
    border: 1px solid rgba(239, 68, 68, 0.22);
}

.badge-info {
    background: var(--ui-info-soft);
    color: var(--ui-info);
    border: 1px solid rgba(99, 102, 241, 0.22);
}

.list-id-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.7rem;
    padding: 0.32rem 0.62rem;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.16);
    border: 1px solid rgba(148, 163, 184, 0.24);
    color: var(--ui-heading);
    font-size: 0.82rem;
    font-weight: 700;
    line-height: 1;
    text-decoration: none;
}

a.list-id-badge:hover,
a.list-id-badge:focus {
    color: #ffffff;
    background: rgba(56, 189, 248, 0.16);
    border-color: rgba(56, 189, 248, 0.3);
}

.ui-content-link {
    color: var(--ui-heading);
    font-weight: 600;
    text-decoration: none;
    transition: color var(--ui-transition-fast);
}

.ui-content-link:hover,
.ui-content-link:focus {
    color: #7dd3fc;
    text-decoration: none;
}

/* Value color utilities */
.value-high {
    color: var(--ui-success);
    font-weight: bold;
    font-size: 1.1em;
}

.value-medium {
    color: var(--ui-warning);
    font-weight: bold;
}

.value-low {
    color: var(--ui-text-muted);
}

/* Table system styling */
.table-system {
    --bs-table-bg: transparent;
    --bs-table-color: var(--ui-text);
    --bs-table-border-color: var(--ui-border-light);
    --bs-table-striped-bg: rgba(255, 255, 255, 0.02);
    --bs-table-hover-bg: rgba(255, 255, 255, 0.04);
}

.table-system thead th {
    color: var(--ui-heading);
    border-bottom-color: var(--ui-border-strong);
    background: rgba(15, 23, 42, 0.92);
    white-space: nowrap;
}

.table-system tbody td {
    color: var(--ui-text);
    border-color: var(--ui-border-light);
}

.table-system tbody tr:hover {
    background-color: rgba(56, 189, 248, 0.04);
}

.table-hover > tbody > tr:hover > * {
    color: var(--ui-heading);
    background-color: rgba(56, 189, 248, 0.05);
}

.table-system code {
    color: #c7f0ff;
}

.ui-sort-link {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    color: var(--ui-heading);
    font-weight: 600;
}

.ui-sort-link:hover {
    color: #ffffff;
}

/* Form system styling */
.form-system .form-control,
.form-system .form-select {
    background: rgba(15, 23, 42, 0.55);
    border-color: var(--ui-border-light);
    color: var(--ui-text);
}

.form-system .form-control::placeholder,
.form-system .form-select::placeholder {
    color: var(--ui-text-muted);
    opacity: 0.7;
}

.form-system .form-control:focus,
.form-system .form-select:focus {
    background: rgba(15, 23, 42, 0.65);
    border-color: var(--ui-accent);
    color: var(--ui-heading);
    box-shadow: 0 0 0 0.2rem rgba(56, 189, 248, 0.14);
}

.form-system .form-label {
    color: var(--ui-heading);
}

.form-system .input-group-text {
    background: rgba(15, 23, 42, 0.72);
    border-color: var(--ui-border-light);
    color: var(--ui-text-muted);
}

.form-system .form-text {
    color: var(--ui-text-muted);
}

.form-system .input-group > .btn {
    border-color: var(--ui-border-light);
}

/* Button system variants */
.btn-system {
    background: var(--ui-accent);
    border-color: var(--ui-accent);
    color: #0f172a;
    font-weight: 600;
    border-radius: var(--ui-radius-sm);
    transition: all var(--ui-transition-fast);
}

.btn-system:hover {
    background: var(--ui-accent-strong);
    border-color: var(--ui-accent-strong);
    color: #fff;
    transform: translateY(-1px);
}

.btn-system-outline {
    background: transparent;
    border: 1px solid var(--ui-border);
    color: var(--ui-text);
    border-radius: var(--ui-radius-sm);
}

.btn-system-outline:hover {
    background: var(--ui-surface-soft);
    border-color: var(--ui-accent);
    color: var(--ui-accent);
}

.filter-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.3rem 0.75rem;
    border-radius: var(--ui-radius-full);
    border: 1px solid rgba(56, 189, 248, 0.18);
    background: rgba(56, 189, 248, 0.08);
    color: #d7f5ff;
    font-size: 0.84rem;
}

.ui-table-row-accent-danger {
    box-shadow: inset 4px 0 0 rgba(239, 68, 68, 0.9);
}

.ui-table-row-accent-warning {
    box-shadow: inset 4px 0 0 rgba(245, 158, 11, 0.9);
}

.ui-table-row-accent-info {
    box-shadow: inset 4px 0 0 rgba(99, 102, 241, 0.9);
}

.ui-table-row-accent-success {
    box-shadow: inset 4px 0 0 rgba(34, 197, 94, 0.9);
}

.ui-table-row-accent-muted {
    box-shadow: inset 4px 0 0 rgba(148, 163, 184, 0.55);
}

.login-risk-high,
.severity-critical,
.log-severity-high {
    box-shadow: inset 4px 0 0 rgba(239, 68, 68, 0.9);
}

.login-risk-medium,
.severity-high,
.log-severity-medium {
    box-shadow: inset 4px 0 0 rgba(245, 158, 11, 0.9);
}

.login-risk-low,
.severity-low,
.log-severity-low {
    box-shadow: inset 4px 0 0 rgba(34, 197, 94, 0.9);
}

.severity-medium {
    box-shadow: inset 4px 0 0 rgba(251, 191, 36, 0.9);
}

.session-indicator {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
}

.device-icon,
.log-icon {
    width: 20px;
    text-align: center;
}

.time-badge {
    font-size: 0.7rem;
}

.badge-sm {
    font-size: 0.72rem;
}

.log-category-badge {
    font-size: 0.75rem;
}

.log-text-preview {
    max-width: 300px;
}

.ui-break-word {
    word-break: break-word;
}

.ui-truncate-200 {
    max-width: 200px;
}

.leaderboard-grid {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: 1rem;
}

.leaderboard-grid > * {
    grid-column: span 4;
}

.leaderboard-hero-stat {
    text-align: center;
}

.leaderboard-rank-badge {
    min-width: 44px;
    justify-content: center;
}

.leaderboard-value {
    font-weight: 700;
    color: var(--ui-heading);
}

.ui-preformatted-panel {
    margin: 0;
    white-space: pre-wrap;
    word-break: break-word;
    color: var(--ui-text);
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(148, 163, 184, 0.14);
    border-radius: var(--ui-radius-md);
    padding: 1rem;
}

/* ============================================
   VEHICLE COMPONENT STYLES
   Centralized from vehicles.css
   ============================================ */

/* Vehicle Images */
.vehicle-image {
    transition: transform var(--ui-transition-base) ease-in-out;
    border: 2px solid var(--ui-border);
}

.vehicle-image:hover {
    transform: scale(1.05);
    border-color: var(--ui-accent);
}

.vehicle-thumbnail {
    border-radius: 6px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.vehicle-image-fallback {
    background: linear-gradient(45deg, #f8f9fa, #e9ecef);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6c757d;
    font-size: 0.8rem;
}

/* Enhanced Model Card */
.model-card {
    transition: all var(--ui-transition-slow) cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid var(--ui-border);
    border-radius: var(--ui-radius-md);
    overflow: hidden;
    height: 100%;
    background: var(--ui-surface);
    position: relative;
}

.model-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--ui-shadow-lg);
    border-color: var(--ui-accent);
}

.model-card:hover .model-image {
    transform: scale(1.05);
}

.model-image-container {
    position: relative;
    height: 180px;
    overflow: hidden;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.model-image-container--detail {
    height: 200px;
    border-radius: 10px;
}

.model-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--ui-transition-slow) ease;
}

.model-image-fallback {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    color: #6c757d;
    font-size: 3rem;
}

/* Badge Styles */
.price-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background: rgba(0, 0, 0, 0.85);
    color: white;
    padding: 6px 12px;
    border-radius: var(--ui-radius-full);
    font-size: 0.85rem;
    font-weight: 600;
    backdrop-filter: blur(10px);
}

.class-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    padding: 4px 10px;
    border-radius: var(--ui-radius-full);
    font-size: 0.75rem;
    font-weight: 600;
    color: white;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

/* Vehicle Statistics */
.vehicle-stats {
    display: flex;
    justify-content: space-between;
    margin-top: 15px;
    padding: 10px 0;
    border-top: 1px solid rgba(241, 243, 244, 0.5);
}

.stat-item {
    text-align: center;
    flex: 1;
    padding: 0 8px;
}

.stat-value {
    font-weight: 700;
    color: var(--ui-accent);
    font-size: 1.1rem;
    display: block;
}

.stat-label {
    font-size: 0.7rem;
    color: var(--ui-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 2px;
}

/* Search and Filter Styles */
.search-filters {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: var(--ui-radius-md);
    padding: 25px;
    margin-bottom: 30px;
    border: 1px solid var(--ui-border);
}

.view-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    margin-bottom: 0;
    padding: 0.35rem;
    background: rgba(15, 23, 42, 0.82);
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 12px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.view-toggle .btn {
    border: 0;
    background: transparent;
    color: var(--ui-text-muted);
    border-radius: 10px;
    padding: 0.5rem 0.85rem;
    transition: all var(--ui-transition-base);
}

.view-toggle .btn:hover,
.view-toggle .btn:focus,
.view-toggle .btn.active {
    background: linear-gradient(180deg, #38bdf8, #0ea5e9);
    color: #fff;
    box-shadow: 0 10px 24px rgba(14, 165, 233, 0.22);
}

@media (max-width: 1199.98px) {
    .leaderboard-grid > * {
        grid-column: span 6;
    }
}

.view-btn {
    padding: 0.5rem 0.85rem;
    border: 1px solid transparent;
    background: transparent;
    border-radius: 10px;
    cursor: pointer;
    transition: all var(--ui-transition-base) ease;
    color: var(--ui-text-muted);
}

.view-btn:hover {
    border-color: rgba(56, 189, 248, 0.26);
    color: #7dd3fc;
    transform: translateY(-1px);
}

.view-btn.active {
    background: linear-gradient(180deg, #38bdf8, #0ea5e9);
    color: white;
    border-color: rgba(125, 211, 252, 0.8);
    box-shadow: 0 10px 24px rgba(14, 165, 233, 0.22);
}

/* Color preview circles */
.color-circle {
    border: 2px solid #fff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
    transition: transform var(--ui-transition-base) ease;
}

.color-circle:hover {
    transform: scale(1.1);
}

/* Vehicle card enhancements */
.vehicle-card {
    transition: box-shadow var(--ui-transition-slow) ease;
}

.vehicle-card:hover {
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

/* Table View Enhancements */
.table-view {
    animation: fadeIn var(--ui-transition-slow) ease;
}

.users-loading,
.toast-notification {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.9rem 1.1rem;
    border-radius: var(--ui-radius-md);
    border: 1px solid var(--ui-accent-border);
    background: rgba(15, 23, 42, 0.92);
    box-shadow: var(--ui-shadow);
    color: var(--ui-heading);
}

.users-loading {
    display: none;
    margin-bottom: 1rem;
    color: var(--ui-text-muted);
    background: rgba(56, 189, 248, 0.08);
}

.toast-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: var(--ui-z-tooltip);
    animation: slideIn var(--ui-transition-slow) ease;
}

.toast-notification--success {
    border-color: rgba(34, 197, 94, 0.28);
    background: rgba(21, 128, 61, 0.94);
}

.ui-table-actions {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.ui-media-thumb--table {
    width: 60px;
    height: 45px;
}

.skin-card {
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 12px;
    transition: all var(--ui-transition-slow) ease;
    background: rgba(15, 23, 42, 0.82);
    overflow: hidden;
    height: 100%;
}

.skin-card:hover {
    border-color: rgba(56, 189, 248, 0.42);
    box-shadow: 0 15px 35px rgba(2, 8, 23, 0.28);
    transform: translateY(-4px);
}

.skin-image-container {
    position: relative;
    height: 120px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.skin-image {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    transition: transform var(--ui-transition-slow) ease;
}

.skin-card:hover .skin-image {
    transform: scale(1.1);
}

.skin-info {
    padding: 0.9rem;
}

.skin-id {
    font-weight: 700;
    color: #7dd3fc;
    font-size: 0.9rem;
}

.skin-details {
    margin-top: 0.35rem;
    font-size: 0.78rem;
    color: var(--ui-text-muted);
}

.skin-price {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(0, 0, 0, 0.82);
    color: white;
    padding: 0.28rem 0.55rem;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.04em;
}

.skin-badge {
    font-size: 0.72rem;
    padding: 0.28rem 0.48rem;
    border-radius: 999px;
    font-weight: 600;
}

.table-view .skin-image {
    width: 60px;
    height: 60px;
    border-radius: 10px;
    object-fit: cover;
}

.forbidden-overlay {
    position: absolute;
    inset: 0;
    background: rgba(220, 53, 69, 0.78);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 0.85rem;
    letter-spacing: 0.04em;
}

.image-placeholder {
    width: 80px;
    height: 80px;
    background: rgba(255, 255, 255, 0.08);
    border: 2px dashed rgba(148, 163, 184, 0.22);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--ui-text-muted);
    font-size: 0.875rem;
}

.table-hover tbody tr:hover {
    background-color: rgba(56, 189, 248, 0.05);
    transform: scale(1.01);
    transition: all var(--ui-transition-base) ease;
}

/* Quick Stats Cards */
.quick-stat-card {
    background: var(--ui-surface);
    border-radius: var(--ui-radius-sm);
    padding: 20px;
    text-align: center;
    border: 1px solid var(--ui-border);
    transition: all var(--ui-transition-slow) ease;
}

.quick-stat-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--ui-shadow);
}

.quick-stat-value {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 5px;
}

.quick-stat-label {
    color: var(--ui-text-muted);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Loading States */
.btn-loading {
    position: relative;
    pointer-events: none;
    opacity: 0.7;
}

.btn-loading:before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 16px;
    height: 16px;
    border: 2px solid transparent;
    border-top: 2px solid currentColor;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* Admin interface image styling */
.admin-vehicle-image {
    border: 1px solid var(--ui-border);
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* Image overlay for additional info */
.vehicle-image-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.7));
    color: white;
    padding: 0.5rem;
    border-radius: 0 0 6px 6px;
    font-size: 0.75rem;
}

/* Category badge positioning */
.vehicle-category-badge {
    position: absolute;
    top: 0;
    right: 0;
    z-index: 1;
}

/* Focus states for accessibility */
.model-card:focus-within {
    outline: 2px solid var(--ui-accent);
    outline-offset: 2px;
}

.view-btn:focus {
    outline: 2px solid var(--ui-accent);
    outline-offset: 2px;
}

/* Loading animation for images */
.vehicle-image-loading {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes spin {
    to {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

@keyframes slideUp {
    from {
        transform: translateY(100%);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* ============================================
   HOUSE COMPONENT STYLES
   Centralized from houses.css
   ============================================ */

/* Houses Management */
.houses-management {
    background:
        radial-gradient(circle at top left, rgba(56, 189, 248, 0.12), transparent 26%),
        linear-gradient(135deg, rgba(15, 23, 42, 0.96) 0%, rgba(17, 24, 39, 0.92) 100%);
    min-height: 100vh;
    padding: 20px 0;
}

.house-card {
    transition: all var(--ui-transition-slow) ease;
    border: none;
    box-shadow: var(--ui-shadow-sm);
}

.house-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--ui-shadow);
}

/* Stats Card Gradient */
.stats-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: var(--ui-radius-md);
    overflow: hidden;
}

.stats-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, rgba(255, 255, 255, 0.1) 0%, transparent 100%);
    pointer-events: none;
}

/* Filter Badge */
.filter-badge {
    background-color: var(--ui-surface-soft);
    color: var(--ui-text);
    padding: 0.25rem 0.75rem;
    border-radius: var(--ui-radius-full);
    font-size: 0.875rem;
    margin: 0.125rem;
    display: inline-block;
    border: 1px solid var(--ui-border);
}

/* Coordinates Text */
.coordinates-text {
    font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
    font-size: 0.78rem;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.9), rgba(15, 23, 42, 0.72));
    color: #d9f4ff;
    padding: 0.45rem 0.65rem;
    border-radius: 12px;
    border: 1px solid rgba(148, 163, 184, 0.16);
}

/* House Row Hover */
.house-row {
    transition: background-color var(--ui-transition-base) ease;
}

.house-row:hover {
    background-color: rgba(0, 123, 255, 0.05);
}

/* Analytics Chart */
.analytics-chart {
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.94), rgba(17, 24, 39, 0.92));
    border-radius: var(--ui-radius-sm);
    padding: 20px;
    box-shadow: var(--ui-shadow-sm);
    border: 1px solid var(--ui-border);
}

/* Search Header */
.search-header {
    background: linear-gradient(135deg, #343a40 0%, #495057 100%);
    border-radius: var(--ui-radius-md) var(--ui-radius-md) 0 0;
}

/* Table Container */
.table-container {
    border-radius: var(--ui-radius-md);
    overflow: hidden;
    box-shadow: var(--ui-shadow);
}

/* Custom Scrollbar */
.table-responsive::-webkit-scrollbar {
    height: 8px;
}

.table-responsive::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
}

.table-responsive::-webkit-scrollbar-thumb {
    background: var(--ui-text-muted);
    border-radius: 4px;
}

.table-responsive::-webkit-scrollbar-thumb:hover {
    background: var(--ui-text);
}

/* Loading Skeleton */
.loading-skeleton {
    background: linear-gradient(90deg, rgba(148, 163, 184, 0.14) 25%, rgba(148, 163, 184, 0.24) 50%, rgba(148, 163, 184, 0.14) 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

/* Enhanced Modal */
.modal-enhanced {
    border-radius: var(--ui-radius-md);
    border: none;
    box-shadow: var(--ui-shadow-xl);
}

.modal-enhanced .modal-header {
    background: linear-gradient(135deg, var(--ui-accent) 0%, var(--ui-accent-strong) 100%);
    color: white;
    border-radius: var(--ui-radius-md) var(--ui-radius-md) 0 0;
    border-bottom: none;
}

.modal-enhanced .modal-body {
    padding: 2rem;
}

/* Tooltip Customization */
.tooltip {
    font-size: 0.875rem;
}

.tooltip-inner {
    max-width: 300px;
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
}

/* ============================================
   MAP COMPONENT STYLES
   Centralized from SanMap.css references
   ============================================ */
.map-container {
    position: relative;
    width: 100%;
    height: 100vh;
    overflow: hidden;
    background: var(--ui-bg);
}

.map-tile {
    position: absolute;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

/* ============================================
   WELCOME PAGE
   Centralized from templates/ucp/welcome.html
   ============================================ */
.welcome-page {
    width: min(100%, 1240px);
    margin: 0 auto;
    padding: 1rem 0 2rem;
}

.welcome-hero {
    padding: 2rem;
    overflow: hidden;
    position: relative;
}

.welcome-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at top right, rgba(56, 189, 248, 0.18), transparent 24%),
        radial-gradient(circle at bottom left, rgba(239, 68, 68, 0.14), transparent 28%);
    pointer-events: none;
}

.welcome-hero__content,
.welcome-hero__stats,
.welcome-grid,
.welcome-about {
    position: relative;
    z-index: 1;
}

.welcome-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.45rem 0.85rem;
    border-radius: 999px;
    background: rgba(56, 189, 248, 0.14);
    color: #bae6fd;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 1rem;
}

.welcome-hero h1 {
    color: var(--ui-heading);
    font-size: clamp(2.3rem, 5vw, 4.4rem);
    line-height: 1.05;
    margin-bottom: 1rem;
}

.welcome-lead {
    max-width: 700px;
    color: #d8e6f7;
    font-size: 1.1rem;
    line-height: 1.7;
    margin-bottom: 1.5rem;
}

.welcome-cta-group {
    display: flex;
    flex-wrap: wrap;
    gap: 0.9rem;
    margin-bottom: 1.75rem;
}

.welcome-cta-group .btn {
    border-radius: 999px;
    padding: 0.9rem 1.2rem;
}

.welcome-stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1rem;
    margin-top: 1.5rem;
}

.welcome-stat {
    padding: 1rem 1.1rem;
    border-radius: var(--ui-radius-md);
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(148, 163, 184, 0.16);
}

.welcome-stat__value {
    display: block;
    color: #fff;
    font-size: 1.5rem;
    font-weight: 700;
}

.welcome-stat__label {
    color: var(--ui-text-muted);
    font-size: 0.9rem;
}

.welcome-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.25rem;
    margin-top: 1.5rem;
}

.welcome-card {
    height: 100%;
    padding: 1.5rem;
}

.welcome-card__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    margin-bottom: 1rem;
    border-radius: 14px;
    background: rgba(56, 189, 248, 0.12);
    color: #7dd3fc;
    font-size: 1.2rem;
}

.welcome-card h2 {
    color: var(--ui-heading);
    font-size: 1.1rem;
    margin-bottom: 0.7rem;
}

.welcome-card p,
.welcome-card li {
    color: var(--ui-text-muted);
}

.welcome-steps {
    padding-left: 1.1rem;
    margin: 0;
}

.welcome-steps li + li {
    margin-top: 0.5rem;
}

.welcome-card .btn,
.welcome-card .btn-group {
    margin-top: 1rem;
}

.welcome-card .btn {
    border-radius: 999px;
}

.welcome-about {
    margin-top: 1.5rem;
    padding: 1.75rem;
}

.welcome-about h2 {
    color: var(--ui-heading);
    margin-bottom: 0.75rem;
}

.welcome-about__lead {
    color: #d8e6f7;
    max-width: 900px;
    line-height: 1.7;
}

.welcome-about__body {
    margin-top: 1rem;
}

.scroll-box {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(148, 163, 184, 0.14);
    max-height: 280px;
    overflow-y: auto;
    line-height: 1.7;
    font-size: 0.95rem;
    color: #d7e3f4;
    scrollbar-width: thin;
    scrollbar-color: #64748b transparent;
}

.scroll-box::-webkit-scrollbar {
    width: 8px;
}

.scroll-box::-webkit-scrollbar-thumb {
    background-color: #64748b;
    border-radius: 999px;
}

/* ============================================
   ANIMATIONS & TRANSITIONS
   Shared animation utilities
   ============================================ */
.animate-fade-in {
    animation: fadeIn var(--ui-transition-slow) ease;
}

.animate-fade-out {
    animation: fadeOut var(--ui-transition-slow) ease;
}

.animate-slide-up {
    animation: slideUp var(--ui-transition-slow) ease;
}

.animate-slide-down {
    animation: slideDown var(--ui-transition-slow) ease;
}

.animate-scale-in {
    animation: scaleIn var(--ui-transition-base) ease;
}

/* ============================================
   ACCESSIBILITY
   Reduced motion support
   ============================================ */
@media (prefers-reduced-motion: reduce) {

    .model-card,
    .vehicle-image,
    .view-btn,
    .ui-pagination-shell .page-link,
    .model-card:hover {
        transition: none;
        transform: none;
    }

    .vehicle-image-loading {
        animation: none;
        background: #f0f0f0;
    }

    .model-card:hover {
        transform: none;
    }
}

@media (max-width: 991.98px) {
    .welcome-stats,
    .welcome-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 767.98px) {
    .welcome-page {
        padding-top: 0.5rem;
    }

    .welcome-hero,
    .welcome-card,
    .welcome-about {
        padding: 1.25rem;
    }

    .welcome-stats,
    .welcome-grid {
        grid-template-columns: 1fr;
    }

    .welcome-cta-group {
        flex-direction: column;
    }

    .welcome-cta-group .btn {
        width: 100%;
    }
}

/* ============================================
   HIGH CONTRAST MODE
   ============================================ */
@media (prefers-contrast: high) {
    .model-card {
        border-width: 2px;
    }

    .model-card:hover {
        border-width: 3px;
    }

    .price-badge,
    .class-badge {
        border: 1px solid white;
    }

    .surface-card,
    .stat-card,
    .glass-panel {
        border-width: 2px;
    }
}

/* ============================================
   PRINT STYLES
   ============================================ */
@media print {

    .site-navbar,
    .site-footer,
    .ui-floating-tools,
    .ui-bulk-actions {
        display: none !important;
    }

    body {
        background: white !important;
        color: black !important;
    }

    .surface-card,
    .stat-card,
    .glass-panel {
        background: white !important;
        border: 1px solid #ccc !important;
        box-shadow: none !important;
    }
}
