/* ============================================
   DESIGN SYSTEM - ULTRA MODERN APPLE-STYLE UI
   ============================================ */

/* ============================================
   GLASSMORPHISM DARK PREMIUM CYBERPUNK
   ============================================ */
:root {
  /* === DEEP SPACE BACKGROUND === */
  --bg: #0a0a0f;
  --bg-deep-space: #0a0a0f;
  --bg-space-layer-1: #0f0f15;
  --bg-space-layer-2: #12121a;
  --bg2: #12121a;

  /* === NEON ACCENTS (Couleurs Électriques) === */
  --neon-gold: #FFD700;
  --neon-pink: #ff0080;
  --neon-cyan: #00f2ea;
  --neon-green: #00ff88;
  --neon-purple: #b24bf3;
  
  /* Alias pour compatibilité */
  --accent: #FFD700;
  --accent-gold: #FFD700;
  --accent-soft: rgba(255, 215, 0, 0.18);
  --warning: #FFD700;
  --warning-soft: rgba(255, 215, 0, 0.18);

  /* === NEON GLOWS === */
  --glow-gold: rgba(255, 215, 0, 0.4);
  --glow-pink: rgba(255, 0, 128, 0.4);
  --glow-cyan: rgba(0, 242, 234, 0.4);
  --glow-green: rgba(0, 255, 136, 0.4);
  --glow-purple: rgba(178, 75, 243, 0.4);

  /* === GLASSMORPHISM (Verre Dépoli) === */
  --glass-bg: rgba(20, 20, 28, 0.7);
  --glass-bg-strong: rgba(20, 20, 28, 0.85);
  --glass-border: rgba(255, 255, 255, 0.08);
  --glass-border-glow: rgba(255, 255, 255, 0.15);
  --glass-blur: blur(30px) saturate(150%);
  
  /* Alias pour compatibilité */
  --card: rgba(20, 20, 28, 0.7);
  --glass: rgba(20, 20, 28, 0.7);

  /* === TEXTE HIÉRARCHIE === */
  --text: rgba(255, 255, 255, 0.95);
  --text-primary: rgba(255, 255, 255, 0.95);
  --text-secondary: rgba(255, 255, 255, 0.65);
  --text-tertiary: rgba(255, 255, 255, 0.45);
  --text-muted: rgba(255, 255, 255, 0.3);
  --text-main: rgba(255, 255, 255, 0.95);
  --muted: rgba(255, 255, 255, 0.45);

  /* === COULEURS FONCTIONNELLES === */
  --success: #00ff88;
  --success-soft: rgba(0, 255, 136, 0.18);
  --error: #FF453A;
  --error-soft: rgba(255, 69, 58, 0.18);

  /* === BORDERS === */
  --border: rgba(255, 255, 255, 0.08);

  /* === SUPER-LAYERING (Ombres & Lumières) === */
  --shadow-depth-1: 
      0 0 0 1px rgba(255, 255, 255, 0.03),
      0 8px 16px rgba(0, 0, 0, 0.4),
      0 16px 32px rgba(0, 0, 0, 0.3);
  --shadow-depth-2:
      0 0 0 1px rgba(255, 255, 255, 0.05),
      0 12px 24px rgba(0, 0, 0, 0.5),
      0 24px 48px rgba(0, 0, 0, 0.4);
  --shadow-depth-3:
      0 0 0 1px rgba(255, 255, 255, 0.08),
      0 20px 40px rgba(0, 0, 0, 0.6),
      0 40px 80px rgba(0, 0, 0, 0.5);
  
  /* === INNER SHADOWS (Effet Creusé) === */
  --inner-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.3);
  --inner-light: inset 0 1px 0 rgba(255, 255, 255, 0.08);
  
  /* === FOCUS & INTERACTION === */
  --focus-ring: rgba(255, 215, 0, 0.45);
  --hover-bg: rgba(255, 255, 255, 0.05);
  
  /* === SPACING === */
  --spacing-xs: 4px;
  --spacing-sm: 8px;
  --spacing-md: 12px;
  --spacing-lg: 16px;
  --spacing-xl: 24px;
  --space-xs: 8px;
  --space-sm: 12px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 32px;
  --space-2xl: 48px;
  
  /* === BORDER RADIUS === */
  --radius-sm: 12px;
  --radius-md: 16px;
  --radius-lg: 20px;
  --radius-xl: 24px;
  --radius-2xl: 28px;
  --radius-pill: 999px;
  --radius-card: 24px;
  
  /* === TRANSITIONS (Fluides & Réactives) === */
  --transition-fast: 0.2s ease;
  --transition-base: 0.3s ease;
  --transition-slow: 0.5s ease;
  --trans-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --trans-smooth: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --duration-fast: 200ms;
  --duration-normal: 300ms;
  --duration-slow: 500ms;
  --ease-smooth: cubic-bezier(0.4, 0, 0.2, 1);
  --ease-bounce: cubic-bezier(0.68, -0.55, 0.265, 1.55);
  
  /* === SURFACE === */
  --surface-color: rgba(20, 20, 28, 0.7);
  --surface-border: 1px solid rgba(255, 255, 255, 0.08);
  --surface-blur: blur(30px) saturate(150%);
  --surface-shadow: 
      0 0 0 1px rgba(255, 255, 255, 0.03),
      0 8px 16px rgba(0, 0, 0, 0.4),
      0 16px 32px rgba(0, 0, 0, 0.3);
  --surface-shadow-hover:
      0 0 0 1px rgba(255, 255, 255, 0.05),
      0 12px 24px rgba(0, 0, 0, 0.5),
      0 24px 48px rgba(0, 0, 0, 0.4);
  --surface-inner-light: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

/* ============================================
   RESET & BASE
   ============================================ */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    margin: 0;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'SF Pro Display', system-ui, sans-serif;
    font-size: 15px;
    line-height: 1.6;
    color: var(--text-primary);
    /* === DEEP SPACE BACKGROUND (Gris foncé teinté) === */
    background: linear-gradient(135deg, 
        var(--bg-deep-space) 0%, 
        var(--bg-space-layer-1) 30%,
        var(--bg-space-layer-2) 60%,
        var(--bg-deep-space) 100%);
    background-attachment: fixed;
    min-height: 100vh;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    position: relative;
    padding: 20px;
}

/* === OVERLAYS NÉONS ATMOSPHÉRIQUES === */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    background: 
        radial-gradient(circle at 10% 20%, var(--glow-pink) 0%, transparent 40%),
        radial-gradient(circle at 90% 80%, var(--glow-cyan) 0%, transparent 40%),
        radial-gradient(circle at 50% 50%, var(--glow-gold) 0%, transparent 50%);
    opacity: 0.08;
    pointer-events: none;
    z-index: 0;
    animation: atmosphericGlow 20s ease-in-out infinite;
}

@keyframes atmosphericGlow {
    0%, 100% { opacity: 0.08; }
    50% { opacity: 0.12; }
}

/* ============================================
   TYPOGRAPHIE
   ============================================ */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    color: var(--text);
    line-height: 1.2;
    letter-spacing: -0.015em;
}

.page-title {
    font-size: 28px;
    font-weight: 600;
    letter-spacing: -0.015em;
    margin: 0;
}

.section-title {
    font-size: 18px;
    font-weight: 600;
    margin: 0;
}

.muted {
    color: var(--muted);
    font-size: 13px;
}

.hint {
    font-size: 13px;
    color: var(--muted);
}

/* ============================================
   LAYOUT
   ============================================ */
.app-layout {
    display: flex;
    height: calc(100vh - 48px);
    position: relative;
    z-index: 1;
    gap: var(--space-lg);
}

.container {
    max-width: 1120px;
    margin: 0 auto;
    padding: 24px;
}

/* ============================================
   SIDEBAR
   ============================================ */
.sidebar {
    width: 280px;
    /* VERRE DÉPOLI avec profondeur */
    background: var(--glass-bg-strong);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-xl);
    /* SUPER-LAYERING : Ombres profondes + lumière interne */
    box-shadow: 
        var(--shadow-depth-2),
        var(--inner-light);
    padding: var(--space-lg);
    display: flex;
    flex-direction: column;
    transition: all var(--duration-normal) var(--ease-smooth);
    position: relative;
    overflow: hidden;
}

/* Bordure lumineuse TOP (Simule lumière du plafond) */
.sidebar::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, 
        transparent 0%, 
        rgba(255, 215, 0, 0.3) 30%,
        rgba(0, 242, 234, 0.3) 70%,
        transparent 100%);
    filter: blur(4px);
}

/* GLOW au hover */
.sidebar:hover {
    box-shadow: 
        var(--shadow-depth-3),
        0 0 40px rgba(255, 215, 0, 0.1),
        var(--inner-light);
    border-color: var(--glass-border-glow);
    transform: translateY(-4px);
}

.sidebar-header {
    margin-bottom: 32px;
}

.sidebar-header h2 {
    font-weight: 600;
    font-size: 20px;
    color: var(--text);
    margin: 0 0 6px 0;
    letter-spacing: -0.01em;
}

.version {
    font-size: 12px;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.nav-links {
    list-style: none;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--text);
    padding: 10px 12px;
    border-radius: var(--radius-md);
    border: 1px solid transparent;
    transition: all var(--transition-base);
    font-weight: 500;
    font-size: 14px;
}

.nav-link:hover {
    background: var(--hover-bg);
}

.nav-link.active {
    background: var(--accent-soft);
    border-color: var(--accent);
    color: var(--accent);
}

.separator {
    height: 1px;
    background: var(--border);
    margin: 12px 0;
}

.logout-link {
    color: var(--error) !important;
}

.logout-link:hover {
    background: var(--error-soft) !important;
    border-color: rgba(255,69,58,0.3) !important;
}

/* ============================================
   MAIN CONTENT
   ============================================ */
.main-content {
    flex: 1;
    padding: var(--space-xl);
    overflow-y: auto;
    overflow-x: hidden;
    box-sizing: border-box;
    width: 100%;
    /* GLASSMORPHISM COCKPIT */
    background: var(--glass-bg-strong);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-xl);
    box-shadow: 
        var(--shadow-depth-2),
        var(--inner-light);
    position: relative;
    z-index: 1;
}

/* Bordure lumineuse TOP */
.main-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg,
        transparent 0%,
        var(--neon-cyan) 30%,
        var(--neon-gold) 70%,
        transparent 100%);
    filter: blur(3px);
}

/* Scrollbar NÉON stylée */
.main-content::-webkit-scrollbar {
    width: 12px;
}

.main-content::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 10px;
}

.main-content::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--neon-gold), var(--neon-pink));
    border-radius: 10px;
    border: 2px solid transparent;
    background-clip: padding-box;
    box-shadow: 0 0 10px var(--glow-gold);
}

.main-content::-webkit-scrollbar-thumb:hover {
    box-shadow: 0 0 20px var(--glow-gold), 0 0 30px var(--glow-pink);
}

.content-section {
    display: block;
}

.content-section.hidden {
    display: none;
}

.page-header {
    margin-bottom: 32px;
    text-align: center; /* CENTRAGE DU CONTENU */
}

.page-header h1 {
    font-size: 28px;
    margin: 0 0 8px 0;
    font-weight: 600;
    letter-spacing: -0.015em;
}

.subtitle {
    color: var(--muted);
    margin: 0;
    font-size: 14px;
}

/* ============================================
   CARDS
   ============================================ */
.card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    padding: 16px;
    transition: all var(--transition-base);
    position: relative;
    overflow: hidden;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, 
        rgba(10,132,255,0.08) 0%, 
        transparent 50%);
    opacity: 0;
    transition: opacity var(--transition-base);
    pointer-events: none;
}

.card:hover {
    border-color: rgba(255,255,255,0.2);
    background: var(--glass);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.3),
                0 0 0 1px rgba(10,132,255,0.1);
}

.card:hover::before {
    opacity: 1;
}

.card-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-bottom: 16px;
    border-bottom: 1px solid var(--border);
    padding-bottom: 12px;
}

.card-header-row .header-text {
    flex: 1;
}

.card-header-row h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: var(--text);
}

.card-subtitle {
    color: var(--muted);
    font-size: 13px;
    margin: 4px 0 0 0;
}

.card-body-vertical {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* ============================================
   BUTTONS
   ============================================ */
.btn {
    height: 36px;
    padding: 0 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border-radius: var(--radius-md);
    font-size: 14px;
    font-weight: 500;
    background: var(--card);
    border: 1px solid var(--border);
    color: var(--text);
    cursor: pointer;
    transition: background var(--transition-base), border-color var(--transition-base), transform 0.05s ease;
    font-family: inherit;
    text-decoration: none;
    position: relative;
    overflow: hidden;
}

.btn:hover {
    background: var(--hover-bg);
}

.btn:active {
    transform: scale(.97);
}

.btn:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px var(--focus-ring);
}

.btn.primary {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
}

.btn.primary:hover {
    background: #0071E3;
    border-color: #0071E3;
}

.btn.secondary {
    background: var(--bg2);
}

.btn.danger {
    background: var(--error);
    border-color: var(--error);
    color: #fff;
}

.btn.danger:hover {
    background: #FF3B30;
    border-color: #FF3B30;
}

.btn.btn--sm {
    height: 32px;
    padding: 0 12px;
    font-size: 13px;
}

.btn.btn--lg {
    height: 44px;
    padding: 0 20px;
    font-size: 15px;
}

.btn-block {
    width: 100%;
}

.btn-group {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

/* Ripple Effect */
.btn-ripple {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    animation: btnRipple 600ms ease-out;
}

@keyframes btnRipple {
    0% { transform: scale(0); opacity: .35; }
    60% { transform: scale(1); opacity: .25; }
    100% { transform: scale(1.2); opacity: 0; }
}

/* ============================================
   INPUT FIELDS
   ============================================ */
.input {
    width: 100%;
    padding: 10px 12px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    background: var(--bg2);
    color: var(--text);
    font-size: 14px;
    font-family: inherit;
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
    outline: none;
}

.input::placeholder {
    color: var(--muted);
}

.input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--focus-ring);
}

.input.is-success {
    border-color: var(--success);
    box-shadow: 0 0 0 3px var(--success-soft);
}

.input.is-error {
    border-color: var(--error);
    box-shadow: 0 0 0 3px var(--error-soft);
}

.input[disabled] {
    opacity: .5;
    cursor: not-allowed;
}

textarea.input {
    resize: vertical;
    min-height: 80px;
    font-family: inherit;
}

input[type="datetime-local"] {
    font-family: inherit;
}

.input-container {
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon {
    position: absolute;
    left: 12px;
    color: var(--muted);
    font-size: 16px;
    pointer-events: none;
}

.input-container .input {
    padding-left: 36px;
}

label {
    display: flex;
    flex-direction: column;
    gap: 6px;
    color: var(--text);
    font-weight: 500;
    font-size: 14px;
}

/* ============================================
   STATUS BADGES
   ============================================ */
.status-badge {
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-badge.online {
    background: var(--success-soft);
    border: 1px solid var(--success);
    color: var(--success);
}

.status-badge.offline {
    background: var(--error-soft);
    border: 1px solid var(--error);
    color: var(--error);
}

/* ============================================
   STAT CARDS
   ============================================ */
.stat-card {
    text-align: center;
}

.stat-card h3 {
    font-size: 14px;
    font-weight: 500;
    color: var(--muted);
    margin-bottom: 12px;
}

.big-number {
    font-size: 40px;
    font-weight: 600;
    color: var(--accent);
    line-height: 1;
    margin: 12px 0;
    letter-spacing: -0.02em;
}

.trend {
    font-size: 12px;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ============================================
   GIFT & CHAT LISTS
   ============================================ */
.scroll-list {
    list-style: none;
    padding: 0;
    margin: 0;
    max-height: 400px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.scroll-list::-webkit-scrollbar {
    width: 6px;
}

.scroll-list::-webkit-scrollbar-track {
    background: transparent;
}

.scroll-list::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 3px;
}

.scroll-list::-webkit-scrollbar-thumb:hover {
    background: rgba(255,255,255,0.2);
}

.empty-item {
    text-align: center;
    color: var(--muted);
    padding: 40px 20px;
    font-style: italic;
}

.gift-list {
    gap: 8px;
}

.gift-item-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    transition: all var(--transition-base);
    position: relative;
}

.gift-item-row::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: var(--accent);
    opacity: 0;
    transition: opacity var(--transition-base);
    border-radius: 0 3px 3px 0;
}

.gift-item-row:hover {
    border-color: rgba(255,255,255,0.22);
    background: var(--glass);
    transform: translateX(4px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.gift-item-row:hover::before {
    opacity: 1;
}

.gift-img {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-md);
    object-fit: cover;
    flex-shrink: 0;
}

.gift-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.gift-user {
    font-size: 12px;
    color: var(--muted);
    font-weight: 500;
}

.gift-name {
    font-size: 14px;
    font-weight: 500;
    color: var(--text);
}

.gift-count-badge {
    background: var(--accent);
    color: #fff;
    padding: 3px 8px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 600;
}

.chat-list {
    gap: 8px;
}

.chat-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    transition: all var(--transition-base);
}

.chat-item:hover {
    border-color: rgba(255,255,255,0.22);
    background: var(--glass);
    transform: translateX(4px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.chat-item img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
}

.chat-item-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.chat-item-username {
    font-size: 12px;
    font-weight: 500;
    color: var(--text);
}

.chat-item-message {
    font-size: 13px;
    color: var(--muted);
}

/* ============================================
   GOLD TEXT (remplacé par accent)
   ============================================ */
.gold-text {
    color: var(--accent);
    font-weight: 500;
}

/* ============================================
   DASHBOARD GRID
   ============================================ */
.dashboard-grid {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.top-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.bottom-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

/* ============================================
   WIDGETS & CONFIG PANEL
   ============================================ */
.widget-item {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    overflow: hidden;
    margin-top: 16px;
    transition: all var(--transition-base);
    position: relative;
}

.widget-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, 
        var(--accent) 0%, 
        transparent 100%);
    opacity: 0;
    transition: opacity var(--transition-base);
}

.widget-item:hover {
    border-color: rgba(255,255,255,0.22);
    background: var(--glass);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.3),
                0 0 0 1px rgba(10,132,255,0.1);
}

.widget-item:hover::before {
    opacity: 1;
}

.widget-summary {
    display: flex;
    align-items: center;
    padding: 16px;
    justify-content: space-between;
    gap: 16px;
}

.widget-icon {
    font-size: 24px;
}

.widget-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.widget-info h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: var(--text);
}

.status.active {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--success);
    font-size: 11px;
    font-weight: 600;
    padding: 3px 10px;
    background: var(--success-soft);
    border: 1px solid var(--success);
    border-radius: 12px;
    width: fit-content;
}

.status.active::before {
    content: '●';
    font-size: 8px;
    animation: pulse 2s infinite;
}

.widget-preview-mini {
    margin: 0 16px;
    width: 200px;
    opacity: 0.8;
    transition: opacity 0.3s ease;
}

.mini-progress-bar {
    width: 100%;
    height: 6px;
    background: rgba(255,255,255,0.1);
    border-radius: 3px;
    overflow: hidden;
    position: relative;
    border: none;
}

.mini-progress-fill {
    height: 100%;
    background: var(--accent);
    border-radius: 3px;
    transition: width 0.5s ease;
}

.mini-progress-text {
    font-size: 12px;
    font-weight: 500;
    color: var(--text);
    text-align: center;
    padding: 4px 0;
    letter-spacing: 0.2px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
}

.mini-progress-text::before {
    content: '';
    width: 5px;
    height: 5px;
    background: var(--accent);
    border-radius: 50%;
    animation: pulse 2s infinite;
}

.timer-preview {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    width: 100%;
}

.timer-display-preview {
    font-size: 28px;
    font-weight: 600;
    color: var(--accent);
    font-family: 'SF Mono', monospace;
    letter-spacing: 2px;
}

.timer-hint {
    font-size: 11px;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Actions & Events Preview */
.actions-preview,
.events-preview {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 60px;
}

.actions-preview-text,
.events-preview-text {
    font-size: 13px;
    color: var(--muted);
    text-align: center;
    font-style: italic;
}

/* ============================================
   ACTIONS TABLE
   ============================================ */
.actions-control-bar {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border);
}

.actions-control-bar .checkbox {
    margin-left: auto;
    padding: 0;
    background: transparent;
    border: none;
}

.search-container {
    position: relative;
    flex: 1;
    max-width: 300px;
    margin-left: auto;
}

.search-container .input-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--muted);
    font-size: 18px;
    pointer-events: none;
    font-family: 'Material Symbols Rounded';
    font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
}

.search-container .input {
    padding-left: 40px;
}

.actions-table {
    width: 100%;
}

.actions-table-header {
    display: grid;
    grid-template-columns: 160px 1fr 1.5fr 1.5fr;
    gap: 16px;
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
    font-size: 12px;
    font-weight: 600;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.actions-table-body {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 8px;
}

.actions-table-row {
    display: grid;
    grid-template-columns: 160px 1fr 1.5fr 1.5fr;
    gap: 16px;
    padding: 12px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    transition: all var(--transition-base);
    align-items: center;
}

.actions-table-row:hover {
    border-color: rgba(255,255,255,0.22);
    background: var(--glass);
    transform: translateX(4px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.actions-table-col-actions {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: nowrap;
    min-width: 0;
}

.action-icon-btn {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    color: var(--text);
    cursor: pointer;
    transition: all var(--transition-base);
    font-size: 16px;
}

.action-icon-btn:hover {
    background: var(--hover-bg);
    border-color: var(--accent);
    color: var(--accent);
}

.action-icon-btn.danger:hover {
    border-color: var(--error);
    color: var(--error);
}

.actions-table-col-name {
    font-weight: 600;
    color: var(--text);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0;
}

.actions-table-col-desc {
    font-size: 13px;
    color: var(--muted);
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    min-width: 0;
    line-height: 1.4;
}

.actions-table-col-events {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
    min-width: 0;
}

.actions-empty {
    text-align: center;
    padding: 40px 20px;
    color: var(--muted);
    font-style: italic;
}

/* ============================================
   MODAL
   ============================================ */
.modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: modalFadeIn 0.2s ease-out;
}

.modal.hidden {
    display: none;
}

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

.modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.45);
    backdrop-filter: blur(6px);
}

.modal-card {
    position: relative;
    width: min(500px, 92vw);
    max-height: 90vh;
    background: var(--bg2);
    border: 1px solid var(--border);
    border-radius: var(--radius-2xl);
    padding: 24px;
    box-shadow: 0 24px 60px rgba(0,0,0,0.45);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    z-index: 1;
    animation: modalSlideUp 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

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

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border);
}

.modal-header h3 {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
    color: var(--text);
}

.modal-close {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    color: var(--text);
    cursor: pointer;
    font-size: 20px;
    line-height: 1;
    transition: all var(--transition-base);
}

.modal-close:hover {
    background: var(--hover-bg);
    border-color: var(--error);
    color: var(--error);
}

.modal-body {
    flex: 1;
    overflow-y: auto;
    padding-right: 8px;
}

.modal-body::-webkit-scrollbar {
    width: 6px;
}

.modal-body::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 3px;
}

.modal-footer {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    margin-top: 24px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
}

/* Action Type Panel */
.action-type-panel {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 8px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    max-height: 200px;
    overflow-y: auto;
}

.action-type-panel::-webkit-scrollbar {
    width: 6px;
}

.action-type-panel::-webkit-scrollbar-thumb {
    background: var(--accent);
    border-radius: 3px;
}

.action-type-panel .radio {
    margin: 0;
    padding: 10px 12px;
    position: relative;
}

.beta-badge {
    display: inline-block;
    margin-left: 8px;
    padding: 2px 8px;
    background: var(--warning-soft);
    border: 1px solid var(--warning);
    border-radius: 10px;
    font-size: 10px;
    font-weight: 600;
    color: var(--warning);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ============================================
   EVENTS TABLE
   ============================================ */
.events-table {
    width: 100%;
}

.events-table-header {
    display: grid;
    grid-template-columns: 80px 1fr 2fr 120px;
    gap: 16px;
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
    font-size: 12px;
    font-weight: 600;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.events-table-body {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 8px;
}

.events-table-row {
    display: grid;
    grid-template-columns: 80px 1fr 2fr 120px;
    gap: 16px;
    padding: 12px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    transition: all var(--transition-base);
    align-items: center;
}

.events-table-row:hover {
    border-color: rgba(255,255,255,0.22);
    background: var(--glass);
    transform: translateX(4px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.events-table-col-active {
    display: flex;
    align-items: center;
    gap: 8px;
}

.events-table-col-active .checkbox {
    margin: 0;
    padding: 0;
    background: transparent;
    border: none;
}

.events-table-col-trigger {
    font-weight: 600;
    color: var(--text);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0;
}

.events-table-col-actions {
    font-size: 13px;
    color: var(--muted);
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    min-width: 0;
    overflow: hidden;
}

.events-table-col-actions-btns {
    display: flex;
    gap: 8px;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: nowrap;
    min-width: 0;
}

.event-action-badge {
    display: inline-block;
    padding: 4px 10px;
    background: var(--accent-soft);
    border: 1px solid var(--accent);
    border-radius: 12px;
    font-size: 12px;
    color: var(--accent);
    font-weight: 500;
}

.event-trigger-badge {
    display: inline-block;
    padding: 4px 10px;
    background: rgba(88, 86, 214, 0.15);
    border: 1px solid rgba(88, 86, 214, 0.4);
    border-radius: 12px;
    font-size: 11px;
    color: #a5a3ff;
    font-weight: 500;
    white-space: nowrap;
}

.events-empty {
    text-align: center;
    padding: 60px 20px;
    color: var(--muted);
}

.events-empty p {
    font-size: 16px;
    font-weight: 500;
    margin: 8px 0;
    color: var(--text);
}

.events-empty-hint {
    font-size: 13px;
    color: var(--muted);
    font-style: italic;
    margin-top: 4px;
}

/* Actions Select Panel */
.actions-select-panel {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 12px;
    min-height: 120px;
    max-height: 200px;
    overflow-y: auto;
}

.actions-select-panel::-webkit-scrollbar {
    width: 6px;
}

.actions-select-panel::-webkit-scrollbar-thumb {
    background: var(--accent);
    border-radius: 3px;
}

.actions-select-panel .checkbox {
    margin: 0;
    padding: 8px 10px;
    background: transparent;
    border: none;
}

.actions-select-panel .checkbox:hover {
    background: var(--hover-bg);
    border-radius: var(--radius-md);
}

.actions-select-empty {
    text-align: center;
    padding: 20px;
    color: var(--muted);
    font-style: italic;
    font-size: 13px;
}

.card-subtitle {
    font-size: 13px;
    color: var(--muted);
    margin-top: 4px;
    line-height: 1.5;
}

.config-panel {
    background: var(--bg2);
    border-top: 1px solid var(--border);
    padding: 20px;
    animation: slideDown 0.3s ease;
}

.config-panel.hidden {
    display: none;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.panel-content {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.config-section {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 16px;
    transition: all var(--transition-base);
    position: relative;
}

.config-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, 
        var(--accent) 0%, 
        transparent 100%);
    opacity: 0;
    transition: opacity var(--transition-base);
}

.config-section:hover {
    border-color: rgba(255,255,255,0.22);
    background: var(--glass);
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(0,0,0,0.2);
}

.config-section:hover::before {
    opacity: 1;
}

.config-section-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--accent);
    margin: 0 0 12px 0;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border);
    letter-spacing: 0.2px;
}

.form-row {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.group {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 150px;
}

.preview-container {
    background: rgba(0,0,0,0.3);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 16px;
    text-align: center;
}

.url-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.url-group label {
    color: var(--accent);
    font-weight: 600;
}

.url-group input {
    font-family: 'SF Mono', monospace;
    letter-spacing: 0.3px;
    font-size: 12px;
}

/* Color Input Wrapper */
.color-input-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
}

.color-input-wrapper input[type="color"] {
    width: 50px;
    height: 50px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    cursor: pointer;
    background: var(--bg2);
    transition: all var(--transition-base);
    flex-shrink: 0;
}

.color-input-wrapper input[type="color"]:hover {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--focus-ring);
}

.color-label {
    font-family: 'SF Mono', monospace;
    font-size: 12px;
    color: var(--muted);
    background: var(--card);
    padding: 6px 10px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    flex: 1;
}

/* Checkbox Group */
.checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.checkbox {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: all var(--transition-base);
}

.checkbox:hover {
    background: var(--hover-bg);
    border-color: rgba(255,255,255,0.18);
}

.checkbox input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--accent);
    flex-shrink: 0;
}

.checkbox span {
    font-size: 14px;
    color: var(--text);
    font-weight: 500;
    flex: 1;
}

.checkbox input[type="checkbox"]:checked + span {
    color: var(--accent);
}

/* Radio Group */
.radio-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.radio {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: all var(--transition-base);
}

.radio:hover {
    background: var(--hover-bg);
    border-color: rgba(255,255,255,0.18);
}

.radio input[type="radio"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--accent);
    flex-shrink: 0;
}

.radio span {
    font-size: 14px;
    color: var(--text);
    font-weight: 500;
    flex: 1;
}

.radio input[type="radio"]:checked + span {
    color: var(--accent);
}

.radio:has(input[type="radio"]:checked) {
    border-color: var(--accent);
    background: var(--accent-soft);
}

/* Range Input (Slider) */
.input-range {
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: rgba(255,255,255,0.1);
    outline: none;
    -webkit-appearance: none;
    appearance: none;
    cursor: pointer;
}

.input-range::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--accent);
    cursor: pointer;
    box-shadow: 0 0 0 2px var(--bg), 0 2px 4px rgba(0,0,0,0.2);
    transition: all 0.2s ease;
}

.input-range::-webkit-slider-thumb:hover {
    transform: scale(1.1);
    box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--focus-ring);
}

.input-range::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--accent);
    cursor: pointer;
    border: 2px solid var(--bg);
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    transition: all 0.2s ease;
}

.input-range::-moz-range-thumb:hover {
    transform: scale(1.1);
}

.input-range::-moz-range-track {
    height: 6px;
    border-radius: 3px;
    background: rgba(255,255,255,0.1);
}

#glow-intensity-container.hidden {
    display: none;
}

/* Icon dans les boutons */
.btn .icon,
.action-icon-btn .icon {
    font-family: 'Material Symbols Rounded';
    font-size: 18px;
    line-height: 1;
    font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
}

.action-icon-btn .icon {
    font-size: 16px;
}

/* ============================================
   GALLERY
   ============================================ */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 16px;
    padding: 20px 0;
}

.gift-catalog-item {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    padding: 14px;
    transition: all var(--transition-base);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    backdrop-filter: blur(12px);
}

.gift-catalog-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, 
        rgba(10,132,255,0.1) 0%, 
        transparent 60%);
    opacity: 0;
    transition: opacity var(--transition-base);
    pointer-events: none;
}

.gift-catalog-item:hover {
    border-color: rgba(255,255,255,0.22);
    background: var(--glass);
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.25),
                0 0 0 1px rgba(10,132,255,0.15);
}

.gift-catalog-item:hover::before {
    opacity: 1;
}

.gift-catalog-image-container {
    width: 100%;
    height: 130px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,0.04);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    margin-bottom: 12px;
    overflow: hidden;
    position: relative;
    flex-shrink: 0;
}

.gift-catalog-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 8px;
    transition: transform 0.3s ease;
}

.gift-catalog-item:hover .gift-catalog-image {
    transform: scale(1.05);
}

.gift-catalog-info {
    text-align: center;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.gift-catalog-name {
    font-size: 13px;
    font-weight: 500;
    color: var(--text);
    margin: 0;
    line-height: 1.3;
    min-height: 2.6em;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gift-catalog-value {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    color: var(--accent);
    font-weight: 600;
    font-size: 14px;
    padding: 4px 10px;
    background: var(--accent-soft);
    border-radius: 10px;
    border: 1px solid rgba(10,132,255,0.3);
    margin-top: auto;
}

/* ============================================
   ROW ITEM (pour listes Actions/Events)
   ============================================ */
.row-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    transition: all var(--transition-base);
}

.row-item:hover {
    border-color: rgba(255,255,255,0.22);
    background: var(--glass);
    transform: translateX(4px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

/* ============================================
   ANIMATIONS
   ============================================ */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(6px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.7; transform: scale(0.95); }
}

@keyframes shimmer {
    0% { transform: translateX(-100%) skewX(-10deg); opacity: 0; }
    40% { opacity: .35; }
    60% { opacity: .25; }
    100% { transform: translateX(120%) skewX(-10deg); opacity: 0; }
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 1024px) {
    .top-row {
        grid-template-columns: 1fr;
    }
    
    .bottom-row {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .app-layout {
        flex-direction: column;
    }
    
    .sidebar {
        width: 100%;
        height: auto;
        position: relative;
    }
    
    .main-content {
        padding: 20px;
    }
    
    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 12px;
    }
    
    /* Ajustements pour les tables d'actions et événements sur mobile */
    .actions-table-header,
    .actions-table-row {
        grid-template-columns: 140px 1fr 1.2fr 1.2fr;
        gap: 12px;
    }
    
    .events-table-header,
    .events-table-row {
        grid-template-columns: 70px 1fr 1.5fr 100px;
        gap: 12px;
    }
    
    .action-icon-btn {
        width: 28px;
        height: 28px;
        font-size: 14px;
    }
    
    .actions-table-col-actions,
    .events-table-col-actions-btns {
        gap: 6px;
    }
}

@media (max-width: 480px) {
    /* Sur très petits écrans, réduire encore plus */
    .actions-table-header,
    .actions-table-row {
        grid-template-columns: 120px 1fr;
        gap: 8px;
    }
    
    .events-table-header,
    .events-table-row {
        grid-template-columns: 60px 1fr 80px;
        gap: 8px;
    }
    
    /* Cacher la colonne description et événements sur très petits écrans */
    .actions-table-col-desc,
    .actions-table-col-events {
        display: none;
    }
    
    /* Cacher la colonne actions (badges) sur événements */
    .events-table-col-actions {
        display: none;
    }
    
    .action-icon-btn {
        width: 26px;
        height: 26px;
        font-size: 13px;
    }
    
    .checkbox-container input[type="checkbox"] {
        width: 16px;
        height: 16px;
    }
}

/* ============================================
   ACCESSIBILITY
   ============================================ */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

*:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px var(--focus-ring);
    border-radius: var(--radius-sm);
}

/* ============================================
   CUSTOM GIFT SELECT (avec images)
   ============================================ */
.custom-gift-select {
    position: relative;
    width: 100%;
}

.custom-gift-select-trigger {
    width: 100%;
    padding: 12px 16px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    color: var(--text);
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: all 0.2s ease;
    text-align: left;
}

.custom-gift-select-trigger:hover {
    background: var(--glass);
    border-color: rgba(255,255,255,0.2);
}

.custom-gift-select-trigger:focus {
    outline: none;
    box-shadow: 0 0 0 3px var(--focus-ring);
}

.custom-gift-select-trigger.active {
    border-color: var(--accent);
    background: var(--accent-soft);
}

.custom-gift-select-placeholder {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 10px;
}

.custom-gift-select-placeholder img {
    width: 24px;
    height: 24px;
    object-fit: contain;
    border-radius: 4px;
}

.custom-gift-select-arrow {
    font-size: 10px;
    color: var(--muted);
    transition: transform 0.2s ease;
    margin-left: 12px;
}

.custom-gift-select-trigger.active .custom-gift-select-arrow {
    transform: rotate(180deg);
}

.custom-gift-select-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    background: var(--bg2);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    box-shadow: 0 8px 32px rgba(0,0,0,0.4);
    z-index: 1000;
    max-height: 400px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.custom-gift-select-search {
    padding: 12px;
    border-bottom: 1px solid var(--border);
}

.custom-gift-select-list {
    max-height: 320px;
    overflow-y: auto;
    padding: 8px;
}

.custom-gift-select-list::-webkit-scrollbar {
    width: 6px;
}

.custom-gift-select-list::-webkit-scrollbar-track {
    background: transparent;
}

.custom-gift-select-list::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 3px;
}

.custom-gift-select-list::-webkit-scrollbar-thumb:hover {
    background: rgba(255,255,255,0.2);
}

.custom-gift-select-item {
    padding: 10px 12px;
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    border-radius: var(--radius-sm);
    transition: all 0.2s ease;
    margin-bottom: 4px;
}

.custom-gift-select-item:hover {
    background: var(--glass);
}

.custom-gift-select-item.selected {
    background: var(--accent-soft);
    border: 1px solid var(--accent);
}

.custom-gift-select-item-image {
    width: 32px;
    height: 32px;
    object-fit: contain;
    border-radius: 6px;
    flex-shrink: 0;
    background: var(--card);
    padding: 2px;
    display: block;
}

.custom-gift-select-item-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.custom-gift-select-item-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.custom-gift-select-item-name {
    font-size: 14px;
    font-weight: 500;
    color: var(--text);
}

.custom-gift-select-item-diamonds {
    font-size: 12px;
    color: var(--muted);
}

.custom-gift-select-loading,
.custom-gift-select-empty {
    padding: 20px;
    text-align: center;
    color: var(--muted);
    font-size: 14px;
}

/* ==========================================
   MODAL OVERLAY SYSTEM
   ========================================== */

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: all;
}

.modal-overlay.hidden {
    display: none;
}

.modal-overlay .modal-content {
    background: var(--card);
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow: hidden;
    transform: scale(0.9);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.modal-overlay.active .modal-content {
    transform: scale(1);
}

.modal-overlay .modal-header {
    padding: 24px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal-overlay .modal-header h3 {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
    color: var(--text);
}

.modal-overlay .modal-close {
    background: none;
    border: none;
    font-size: 32px;
    color: var(--muted);
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.modal-overlay .modal-close:hover {
    background: var(--danger-soft);
    color: var(--danger);
}

.modal-overlay .modal-body {
    padding: 24px;
    max-height: calc(90vh - 160px);
    overflow-y: auto;
}

.modal-overlay .modal-footer {
    padding: 20px 24px;
    border-top: 1px solid var(--border-color);
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}
