/* ==============================================================
   M7MFZ SYSTEM - Premium UI Style (Cyan & Red Edition)
   ============================================================== */

   :root {
    /* Color Palette - Ultra Premium Dark */
    --bg-dark: #050508;
    --bg-darker: #020203;
    --bg-card: rgba(10, 15, 25, 0.45);
    --bg-card-hover: rgba(15, 25, 45, 0.65);
    
    --primary-cyan: #00f0ff;
    --primary-cyan-hover: #5eead4;
    --primary-cyan-glow: rgba(0, 240, 255, 0.6);
    
    --accent-red: #ff2a55;
    --accent-red-hover: #ff4d79;
    --accent-red-glow: rgba(255, 42, 85, 0.6);
  
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    
    --border-glass: rgba(255, 255, 255, 0.06);
    
    /* Typography */
    --font-en: 'Poppins', sans-serif;
    --font-ar: 'Cairo', sans-serif;
    
    /* Effects */
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
  }
  
  /* ==============================================================
     Global Styles
     ============================================================== */
  * {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
  }
  
  body {
    font-family: var(--font-ar), var(--font-en);
    background-color: var(--bg-dark);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
  }
  
  /* Animated Particles Background (CSS only effect) */
  .particles-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: radial-gradient(circle at 10% 50%, rgba(0, 240, 255, 0.06), transparent 30%),
                radial-gradient(circle at 90% 30%, rgba(255, 42, 85, 0.05), transparent 30%);
    z-index: -1;
    pointer-events: none;
  }
  
  a {
    text-decoration: none;
    color: inherit;
    transition: color var(--transition-fast);
  }
  
  .highlight-cyan {
    color: var(--primary-cyan);
    text-shadow: 0 0 10px var(--primary-cyan-glow);
  }
  
  .highlight-red {
    color: var(--accent-red);
    text-shadow: 0 0 10px var(--accent-red-glow);
  }
  
  /* ==============================================================
     Buttons
     ============================================================== */
  .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 24px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all var(--transition-normal);
    border: none;
    font-family: inherit;
  }
  
  .btn-lg {
    padding: 14px 32px;
    font-size: 1.1rem;
  }
  
  .btn-sm {
    padding: 6px 16px;
    font-size: 0.9rem;
  }
  
  .btn-primary {
    background: linear-gradient(135deg, var(--primary-cyan), #0284c7);
    color: #000;
    box-shadow: 0 4px 15px var(--primary-cyan-glow);
  }
  
  .btn-primary:hover {
    background: linear-gradient(135deg, var(--primary-cyan-hover), var(--primary-cyan));
    box-shadow: 0 6px 20px rgba(0, 240, 255, 0.8);
    transform: translateY(-2px);
    color: #000;
  }
  
  .btn-danger {
    background: linear-gradient(135deg, var(--accent-red), #b91c1c);
    color: #fff;
    box-shadow: 0 4px 15px var(--accent-red-glow);
  }
  
  .btn-danger:hover {
    background: linear-gradient(135deg, var(--accent-red-hover), var(--accent-red));
    box-shadow: 0 6px 20px rgba(255, 42, 85, 0.8);
    transform: translateY(-2px);
  }
  
  .btn-outline {
    background: transparent;
    border: 2px solid var(--primary-cyan);
    color: var(--primary-cyan);
  }
  
  .btn-outline:hover {
    background: rgba(0, 240, 255, 0.15);
    box-shadow: 0 4px 15px var(--primary-cyan-glow);
    transform: translateY(-2px);
  }
  
  .w-100 {
    width: 100%;
  }
  
  /* ==============================================================
     Navbar
     ============================================================== */
  .main-navbar {
    position: sticky;
    top: 0;
    width: 100%;
    background: rgba(4, 6, 11, 0.8);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-glass);
    z-index: 1000;
  }
  
  .nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
  }
  
  .nav-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.5rem;
    font-weight: 800;
    font-family: var(--font-en);
    letter-spacing: 1px;
  }
  
  .nav-icon {
    color: var(--primary-cyan);
    font-size: 1.8rem;
    filter: drop-shadow(0 0 8px var(--primary-cyan-glow));
  }
  
  .nav-links {
    display: flex;
    gap: 30px;
  }
  
  .nav-link {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-muted);
    position: relative;
  }
  
  .nav-link:hover, .nav-link.active {
    color: var(--text-main);
  }
  
  .nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-cyan);
    transition: width var(--transition-fast);
  }
  
  .nav-link:hover::after, .nav-link.active::after {
    width: 100%;
    box-shadow: 0 0 8px var(--primary-cyan-glow);
  }
  
  .user-profile {
    display: flex;
    align-items: center;
    gap: 12px;
  }
  
  .user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid var(--primary-cyan);
    box-shadow: 0 0 10px var(--primary-cyan-glow);
  }
  
  .user-name {
    font-weight: 600;
    font-family: var(--font-en);
  }
  
  /* ==============================================================
     Hero Section
     ============================================================== */
  .hero-section {
    min-height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 0 20px;
    position: relative;
    overflow: hidden;
  }
  
  .hero-content {
    max-width: 800px;
    position: relative;
    z-index: 2;
  }
  
  .glow-effect {
    position: absolute;
    width: 300px;
    height: 300px;
    border-radius: 50%;
    filter: blur(100px);
    z-index: -1;
    opacity: 0.5;
  }
  
  .cyan-glow {
    background: var(--primary-cyan);
    top: -50px;
    right: -100px;
  }
  
  .red-glow {
    background: var(--accent-red);
    bottom: -50px;
    left: -100px;
  }
  
  .hero-title {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 20px;
    line-height: 1.3;
  }
  
  .hero-subtitle {
    font-size: 1.2rem;
    color: var(--text-muted);
    margin-bottom: 40px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
  }
  
  .hero-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
  }
  
  /* ==============================================================
     Features Section
     ============================================================== */
  .features-section {
    padding: 80px 20px;
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
  }
  
  .section-title {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 50px;
  }
  
  .features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
  }
  
  .feature-card {
    background: var(--bg-card);
    border: 1px solid var(--border-glass);
    backdrop-filter: blur(16px);
    padding: 40px 20px;
    border-radius: 16px;
    transition: all var(--transition-normal);
  }
  
  .feature-card:hover {
    background: var(--bg-card-hover);
    transform: translateY(-10px);
    border-color: var(--primary-cyan);
    box-shadow: 0 10px 30px rgba(14, 165, 233, 0.15);
  }
  
  .feature-icon {
    font-size: 3rem;
    color: var(--accent-red);
    margin-bottom: 20px;
    filter: drop-shadow(0 0 10px var(--accent-red-glow));
  }
  
  .feature-card:hover .feature-icon {
    color: var(--primary-cyan);
    filter: drop-shadow(0 0 10px var(--primary-cyan-glow));
  }
  
  .feature-card h3 {
    font-size: 1.4rem;
    margin-bottom: 15px;
  }
  
  .feature-card p {
    color: var(--text-muted);
    font-size: 0.95rem;
  }
  
  /* ==============================================================
     Footer
     ============================================================== */
  .main-footer {
    background: var(--bg-darker);
    border-top: 1px solid var(--border-glass);
    padding: 60px 20px 20px;
    margin-top: 50px;
  }
  
  .footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 30px;
    margin-bottom: 40px;
  }
  
  .footer-brand h2 {
    font-family: var(--font-en);
    font-weight: 800;
    margin-bottom: 10px;
  }
  
  .footer-brand p {
    color: var(--text-muted);
  }
  
  .footer-social {
    display: flex;
    gap: 15px;
  }
  
  .social-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 45px;
    height: 45px;
    background: var(--bg-card);
    border: 1px solid var(--border-glass);
    border-radius: 50%;
    font-size: 1.2rem;
    color: var(--text-muted);
  }
  
  .social-icon:hover {
    background: var(--primary-cyan);
    color: #fff;
    border-color: var(--primary-cyan);
    box-shadow: 0 0 15px var(--primary-cyan-glow);
    transform: translateY(-3px);
  }
  
  .footer-bottom {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.9rem;
    border-top: 1px solid var(--border-glass);
    padding-top: 20px;
    max-width: 1200px;
    margin: 0 auto;
  }
  
  /* ==============================================================
     Servers Page
     ============================================================== */
  .page-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 60px 20px;
  }
  
  .page-header {
    margin-bottom: 50px;
  }
  
  .page-title {
    font-size: 2.8rem;
    font-weight: 800;
    margin-bottom: 10px;
  }
  
  .page-subtitle {
    color: var(--text-muted);
    font-size: 1.1rem;
  }
  
  .text-center {
    text-align: center;
  }
  
  .glass-card {
    background: var(--bg-card);
    border: 1px solid var(--border-glass);
    backdrop-filter: blur(16px);
    border-radius: 16px;
    padding: 24px;
    transition: all var(--transition-normal);
  }
  
  .servers-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
  }
  
  .server-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    position: relative;
    overflow: hidden;
  }
  
  .server-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--text-muted);
    transition: all var(--transition-normal);
  }
  
  .server-card.active-server::before {
    background: var(--primary-cyan);
    box-shadow: 0 0 10px var(--primary-cyan-glow);
  }
  
  .server-card.inactive-server::before {
    background: var(--accent-red);
    box-shadow: 0 0 10px var(--accent-red-glow);
  }
  
  .server-card:hover {
    transform: translateY(-5px);
    background: var(--bg-card-hover);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  }
  
  .server-card.active-server:hover {
    border-color: var(--primary-cyan);
  }
  
  .server-card.inactive-server:hover {
    border-color: var(--accent-red);
  }
  
  .server-icon-wrapper {
    position: relative;
    margin-bottom: 20px;
    margin-top: 10px;
  }
  
  .server-icon {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--border-glass);
    transition: all var(--transition-normal);
  }
  
  .server-card.active-server:hover .server-icon {
    border-color: var(--primary-cyan);
    box-shadow: 0 0 20px var(--primary-cyan-glow);
  }
  
  .server-icon-placeholder {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    background: var(--bg-darker);
    border: 3px solid var(--border-glass);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--text-muted);
  }
  
  .status-indicator {
    position: absolute;
    bottom: 5px;
    right: 5px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 3px solid var(--bg-card);
  }
  
  .status-indicator.online {
    background-color: var(--primary-cyan);
    box-shadow: 0 0 8px var(--primary-cyan-glow);
  }
  
  .status-indicator.offline {
    background-color: var(--accent-red);
    box-shadow: 0 0 8px var(--accent-red-glow);
  }
  
  .server-info {
    margin-bottom: 25px;
    flex-grow: 1;
  }
  
  .server-name {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 230px;
  }
  
  .server-id {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-family: var(--font-en);
  }
  
  .server-action {
    width: 100%;
  }
  
  .empty-state {
    text-align: center;
    padding: 60px 20px;
    max-width: 500px;
    margin: 0 auto;
  }
  
  .empty-icon {
    font-size: 4rem;
    color: var(--text-muted);
    margin-bottom: 20px;
  }
  
  /* ==============================================================
     Dashboard Global Styles (For other pages)
     ============================================================== */
  .dashboard-wrapper {
    display: flex;
    min-height: calc(100vh - 73px);
  }
  
  .dashboard-sidebar {
    width: 260px;
    background: var(--bg-card);
    border-left: 1px solid var(--border-glass);
    backdrop-filter: blur(16px);
    padding: 20px 0;
    display: flex;
    flex-direction: column;
  }
  
  .sidebar-header {
    padding: 0 20px 20px;
    border-bottom: 1px solid var(--border-glass);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
  }
  
  .sidebar-server-icon {
    width: 45px;
    height: 45px;
    border-radius: 50%;
  }
  
  .sidebar-server-name {
    font-weight: 700;
    font-size: 1.1rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  
  .sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 5px;
    padding: 0 15px;
  }
  
  .sidebar-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 15px;
    border-radius: 8px;
    color: var(--text-muted);
    font-weight: 600;
    transition: all var(--transition-fast);
  }
  
  .sidebar-link i {
    width: 20px;
    text-align: center;
    font-size: 1.1rem;
  }
  
  .sidebar-link:hover, .sidebar-link.active {
    background: rgba(14, 165, 233, 0.1);
    color: var(--primary-cyan);
  }
  
  .sidebar-link.active {
    border-right: 3px solid var(--primary-cyan);
  }
  
  .dashboard-content {
    flex-grow: 1;
    padding: 40px;
    overflow-y: auto;
  }
  
  .dashboard-card {
    background: var(--bg-card);
    border: 1px solid var(--border-glass);
    border-radius: 16px;
    padding: 25px;
    margin-bottom: 25px;
  }
  
  .card-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
  }
  
  .card-title i {
    color: var(--primary-cyan);
  }
  
  /* Forms */
  .form-group {
    margin-bottom: 20px;
  }
  
  .form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--text-muted);
  }
  
  .form-control {
    width: 100%;
    padding: 12px 15px;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border-glass);
    border-radius: 8px;
    color: var(--text-main);
    font-family: inherit;
    transition: all var(--transition-fast);
  }
  
  .form-control:focus {
    outline: none;
    border-color: var(--primary-cyan);
    box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.2);
  }
  
  /* Responsive */
  @media (max-width: 768px) {
    .nav-links {
      display: none;
    }
    .hero-title {
      font-size: 2.5rem;
    }
    .dashboard-wrapper {
      flex-direction: column;
    }
    .dashboard-sidebar {
      width: 100%;
      border-left: none;
      border-bottom: 1px solid var(--border-glass);
    }
    .dashboard-content {
      padding: 20px;
    }
  }
/* ==============================================================
   ADDITIONAL STYLES - Professional Additions
   ============================================================== */

/* Dashboard inner layout (for all inner pages) */
.layout {
  display: flex;
  min-height: 100vh;
  direction: rtl;
  background: var(--bg-dark);
}

.dashboard-sidebar {
  width: 260px;
  background: rgba(10, 15, 25, 0.95);
  border-left: 1px solid var(--border-glass);
  backdrop-filter: blur(20px);
  padding: 20px 0;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  flex-shrink: 0;
  direction: rtl;
}

.content {
  flex: 1;
  overflow-y: auto;
  padding: 32px;
  direction: rtl;
}

.content-head { margin-bottom: 28px; }
.content-head h1 { font-size: 1.8rem; font-weight: 800; margin-bottom: 6px; display: flex; align-items: center; gap: 12px; }
.content-head p { color: var(--text-muted); margin: 0; }
.content-head.between { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; }

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

/* Panel grid */
.panel-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(360px, 1fr)); gap: 24px; }
.auto-grid { grid-template-columns: repeat(auto-fit, minmax(400px, 1fr)); }

.panel {
  background: rgba(15, 23, 42, 0.5);
  border: 1px solid var(--border-glass);
  border-radius: 16px;
  padding: 24px;
  backdrop-filter: blur(12px);
}

.panel h2 { font-size: 1.2rem; font-weight: 700; margin-bottom: 20px; display: flex; align-items: center; gap: 10px; }

/* Section title row */
.section-title-row { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }

/* Form elements */
label { display: block; margin-bottom: 6px; font-weight: 600; color: var(--text-muted); font-size: 0.9rem; }
input[type="text"],
input[type="number"],
input[type="color"],
input[type="file"],
textarea,
select {
  width: 100%;
  padding: 11px 14px;
  background: rgba(0,0,0,0.3);
  border: 1px solid var(--border-glass);
  border-radius: 10px;
  color: var(--text-main);
  font-family: var(--font-ar), var(--font-en);
  font-size: 0.95rem;
  margin-bottom: 16px;
  transition: border-color 0.2s, box-shadow 0.2s;
  outline: none;
}
input:focus, textarea:focus, select:focus {
  border-color: var(--primary-cyan);
  box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.15);
}
select option { background: #0f172a; }
textarea { resize: vertical; min-height: 100px; }
input[type="color"] { padding: 4px; height: 42px; cursor: pointer; }

/* Switch */
.switch-row { display: flex; justify-content: space-between; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--border-glass); margin-bottom: 12px; }
.switch-row > span:first-child { font-weight: 600; }
.switch { position: relative; display: inline-block; width: 48px; height: 26px; flex-shrink: 0; }
.switch input { opacity: 0; width: 0; height: 0; }
.slider { position: absolute; inset: 0; background: rgba(255,255,255,0.1); border-radius: 999px; transition: 0.3s; cursor: pointer; border: 1px solid var(--border-glass); }
.slider::before { content: ''; position: absolute; width: 18px; height: 18px; left: 3px; top: 3px; background: white; border-radius: 50%; transition: 0.3s; }
input:checked + .slider { background: linear-gradient(135deg, var(--primary-cyan), #0284c7); border-color: var(--primary-cyan); box-shadow: 0 0 10px var(--primary-cyan-glow); }
input:checked + .slider::before { transform: translateX(22px); }

/* Save button */
.save-btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 24px;
  background: linear-gradient(135deg, var(--primary-cyan), #0284c7);
  color: #fff; border: none; border-radius: 10px;
  font-weight: 700; font-size: 1rem;
  cursor: pointer; width: 100%; justify-content: center;
  margin-top: 8px; transition: all 0.2s;
  box-shadow: 0 4px 15px var(--primary-cyan-glow);
  font-family: inherit;
  text-decoration: none;
}
.save-btn:hover { transform: translateY(-2px); box-shadow: 0 8px 20px var(--primary-cyan-glow); }

/* Hint box */
.hint-box {
  background: rgba(14, 165, 233, 0.08);
  border: 1px solid rgba(14, 165, 233, 0.2);
  border-radius: 10px; padding: 12px 16px;
  color: var(--text-muted); font-size: 0.85rem; margin-bottom: 16px;
  display: flex; align-items: flex-start; gap: 8px;
}

/* Vars */
.vars { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.vars div { padding: 5px 12px; background: rgba(255,255,255,0.05); border-radius: 20px; font-size: 0.8rem; color: var(--text-muted); border: 1px solid var(--border-glass); }

/* Dimensions grid */
.dimensions { display: grid; gap: 12px; margin-bottom: 12px; }
.dimensions.two { grid-template-columns: 1fr 1fr; }
.dimensions.three { grid-template-columns: 1fr 1fr 1fr; }

/* Sub-box */
.sub-box { background: rgba(0,0,0,0.2); border-radius: 10px; padding: 16px; margin-bottom: 16px; border: 1px solid var(--border-glass); }

/* Stats Grid */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 16px; margin-bottom: 28px; }
.stat-card { background: rgba(15, 23, 42, 0.6); border: 1px solid var(--border-glass); border-radius: 14px; padding: 20px 16px; text-align: center; transition: all 0.25s; }
.stat-card:hover { transform: translateY(-4px); }
.stat-icon { font-size: 1.6rem; margin-bottom: 8px; }
.stat-title { font-size: 0.8rem; color: var(--text-muted); margin-bottom: 6px; }
.stat-value { font-size: 2rem; font-weight: 800; margin-bottom: 4px; }
.stat-note { font-size: 0.75rem; color: var(--text-muted); }
.accent-blue .stat-value, .accent-blue .stat-icon { color: var(--primary-cyan); }
.accent-green .stat-value, .accent-green .stat-icon { color: #10b981; }
.accent-pink .stat-value, .accent-pink .stat-icon { color: #ec4899; }
.accent-orange .stat-value, .accent-orange .stat-icon { color: #f59e0b; }
.accent-cyan .stat-value, .accent-cyan .stat-icon { color: #22d3ee; }
.accent-violet .stat-value, .accent-violet .stat-icon { color: #a855f7; }

/* Flash messages */
.flash-success { background: rgba(16, 185, 129, 0.15); border: 1px solid rgba(16, 185, 129, 0.3); border-radius: 10px; padding: 14px 16px; margin-bottom: 20px; color: #6ee7b7; display: flex; align-items: center; gap: 10px; }
.flash-error { background: rgba(239, 68, 68, 0.15); border: 1px solid rgba(239, 68, 68, 0.3); border-radius: 10px; padding: 14px 16px; margin-bottom: 20px; color: #fca5a5; display: flex; align-items: center; gap: 10px; }

/* Ticket Styles */
.ticket-search-bar { display: flex; gap: 10px; margin-bottom: 16px; align-items: center; }
.ticket-search-input-wrap { flex: 1; display: flex; align-items: center; gap: 10px; background: rgba(0,0,0,0.3); border: 1px solid var(--border-glass); border-radius: 10px; padding: 0 14px; }
.ticket-search-input-wrap i { color: var(--text-muted); }
.ticket-search-input-wrap input { flex: 1; background: transparent; border: none; margin: 0; padding: 11px 0; color: var(--text-main); }
.ticket-search-input-wrap input:focus { box-shadow: none; }

.tickets-toggle-row { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }

.stack-list { display: flex; flex-direction: column; gap: 12px; }
.mini-panel { background: rgba(10, 15, 25, 0.6); border: 1px solid var(--border-glass); border-radius: 12px; padding: 16px; transition: all 0.2s; }
.mini-panel:hover { border-color: var(--primary-cyan); background: rgba(14, 165, 233, 0.05); }
.ticket-log-card { }
.ticket-log-title { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.ticket-log-title strong { font-size: 1rem; }
.ticket-log-title code { background: rgba(255,255,255,0.08); padding: 2px 8px; border-radius: 6px; font-size: 0.78rem; color: var(--text-muted); }

.embed-list-tag { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: 20px; font-size: 0.78rem; font-weight: 600; background: rgba(255,255,255,0.08); }
.tag-green { background: rgba(16, 185, 129, 0.15); color: #6ee7b7; border: 1px solid rgba(16, 185, 129, 0.3); }
.tag-gray { background: rgba(255,255,255,0.05); color: var(--text-muted); border: 1px solid var(--border-glass); }

.ticket-log-grid { display: grid; grid-template-columns: 1fr auto; gap: 16px; margin-bottom: 14px; }
.ticket-log-meta { display: flex; gap: 16px; flex-wrap: wrap; }
.ticket-member-box { min-width: 140px; }
.ticket-member-title { font-size: 0.75rem; color: var(--text-muted); margin-bottom: 4px; text-transform: uppercase; letter-spacing: 0.5px; }
.ticket-member-box strong { display: block; font-size: 0.9rem; }
.ticket-member-box small { color: var(--text-muted); font-size: 0.78rem; font-family: var(--font-en); }
.ticket-channel-meta { font-size: 0.82rem; color: var(--text-muted); line-height: 2; }
.ticket-channel-meta code { background: rgba(255,255,255,0.08); padding: 1px 6px; border-radius: 4px; }
.ticket-log-actions { display: flex; gap: 10px; }
.ticket-log-switches { display: flex; flex-direction: column; }

.empty-box { text-align: center; padding: 40px 20px; color: var(--text-muted); background: rgba(0,0,0,0.2); border-radius: 10px; display: flex; flex-direction: column; align-items: center; gap: 10px; font-size: 1.1rem; }
.empty-box i { font-size: 2rem; opacity: 0.4; }

/* Welcome Preview Resize */
.preview-wrap { overflow: auto; padding: 10px 0; }
.larger-preview-wrap { position: relative; margin-bottom: 12px; }
.preview-resizable-container { 
  position: relative; 
  display: inline-block; 
  transition: transform 0.1s; 
  padding: 6px; /* Space for the active border */
  margin: 0;
  border: 2px dashed transparent;
  border-radius: 16px;
}
.preview-resizable-container.active {
  border-color: var(--primary-cyan);
  background: rgba(14, 165, 233, 0.05);
  box-shadow: 0 0 20px rgba(14, 165, 233, 0.15);
}
.preview { 
  background-size: cover; background-position: center;
  position: relative; overflow: hidden;
  border: 2px solid var(--border-glass);
  border-radius: 12px;
  pointer-events: auto;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.preview-resizable-container.active .preview {
  border-color: var(--primary-cyan);
  box-shadow: 0 0 15px var(--primary-cyan-glow);
}
.preview-resize-handle {
  position: absolute; bottom: -8px; left: -8px;
  width: 26px; height: 26px;
  background: var(--primary-cyan); 
  border-radius: 50%;
  display: none; 
  align-items: center; 
  justify-content: center;
  cursor: nesw-resize; /* Correct cursor for bottom-left corner */
  color: #fff; 
  font-size: 0.75rem;
  box-shadow: 0 0 12px var(--primary-cyan-glow);
  z-index: 10;
  transition: transform 0.2s;
}
.preview-resize-handle:hover {
  transform: scale(1.15);
}
.preview-resizable-container.active .preview-resize-handle {
  display: flex;
}

.preview-zoom-hint { font-size: 0.78rem; color: var(--text-muted); margin-bottom: 8px; display: flex; align-items: center; gap: 6px; }

/* Welcome draggable elements */
.avatar-preview { position: absolute; cursor: grab; }
.avatar-preview:active { cursor: grabbing; }
.avatar-preview img { width: 100%; height: 100%; object-fit: cover; }
.avatar-preview.circle img { border-radius: 50%; }
.username-preview { position: absolute; cursor: grab; white-space: nowrap; font-weight: 700; text-shadow: 0 1px 4px rgba(0,0,0,0.6); }
.username-preview:active { cursor: grabbing; }

/* Chip selector - Role Tags */
.chip-selector { margin-bottom: 16px; }
.chip-selector-selected { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 10px; min-height: 42px; padding: 6px 0; }

/* Role/Channel chips - selector-chip and chip-tag */
.selector-chip,
.chip-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.15), rgba(2, 132, 199, 0.1));
  border: 1.5px solid rgba(14, 165, 233, 0.35);
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 600;
  color: #e0f2fe;
  box-shadow: 0 2px 8px rgba(14, 165, 233, 0.1);
  transition: all 0.2s ease;
  max-width: 280px;
  margin: 4px;
  direction: rtl;
}
.selector-chip:hover,
.chip-tag:hover {
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.25), rgba(2, 132, 199, 0.18));
  border-color: var(--primary-cyan);
  box-shadow: 0 3px 12px rgba(14, 165, 233, 0.25);
}

/* Draggable elements active state */
.draggable {
  position: absolute;
  cursor: grab;
  user-select: none;
  border: 2px solid transparent;
  transition: border-color 0.2s ease;
}
.draggable.active-element {
  border: 2px dashed var(--primary-cyan);
  z-index: 10;
}
.draggable.active-element .resize-handle {
  display: block;
}
.resize-handle {
  display: none;
  position: absolute;
  width: 14px;
  height: 14px;
  background: var(--primary-cyan);
  border: 2px solid #fff;
  border-radius: 50%;
  bottom: -7px;
  left: -7px;
  cursor: nwse-resize;
  z-index: 20;
  box-shadow: 0 0 6px rgba(14, 165, 233, 0.6);
}

/* Red X remove button - vivid and prominent for all chips */
.selector-chip button,
.chip-tag button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  background: #ff2a55;
  border: none;
  border-radius: 50%;
  color: #fff !important;
  cursor: pointer;
  font-size: 1.1rem;
  font-weight: 900;
  padding: 0;
  line-height: 1;
  transition: all 0.2s ease;
  flex-shrink: 0;
  appearance: none;
  -webkit-appearance: none;
  box-shadow: 0 0 5px rgba(255, 42, 85, 0.4);
}
.selector-chip button:hover,
.chip-tag button:hover {
  background: #dc2626;
  color: #fff !important;
  transform: scale(1.15) rotate(90deg);
  box-shadow: 0 0 10px rgba(239, 68, 68, 0.8);
}

.chip-selector-source-row { display: flex; gap: 10px; }
.chip-selector-source { flex: 1; }
.chip-selector-add { flex-shrink: 0; padding: 10px 16px; }

/* Games - new design */
.games-hero-banner {
  position: relative; border-radius: 16px; overflow: hidden;
  padding: 40px 32px; margin-bottom: 28px;
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.15), rgba(239, 68, 68, 0.1));
  border: 1px solid var(--border-glass);
  display: flex; justify-content: space-between; align-items: center;
}
.games-hero-bg { position: absolute; inset: 0; background: radial-gradient(circle at 80% 50%, rgba(14,165,233,0.1), transparent 60%); }
.games-hero-content { position: relative; z-index: 1; }
.games-hero-badge { display: inline-flex; align-items: center; gap: 6px; padding: 4px 14px; background: rgba(14,165,233,0.15); border: 1px solid rgba(14,165,233,0.3); border-radius: 20px; font-size: 0.82rem; color: var(--primary-cyan); margin-bottom: 12px; }
.games-hero-banner h2 { font-size: 1.6rem; font-weight: 800; margin-bottom: 8px; }
.games-hero-banner p { color: var(--text-muted); margin: 0; }
.games-hero-icons { font-size: 3.5rem; display: flex; gap: 16px; position: relative; z-index: 1; opacity: 0.8; }

.games-catalog-grid-new { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px; }
.game-card-new {
  background: rgba(15, 23, 42, 0.6); border: 1px solid var(--border-glass);
  border-radius: 16px; overflow: hidden; display: flex; flex-direction: column;
  transition: all 0.3s; position: relative;
}
.game-card-new::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px; }
.game-card-new.game-active::before { background: linear-gradient(90deg, var(--primary-cyan), #0284c7); }
.game-card-new.game-inactive::before { background: rgba(255,255,255,0.1); }
.game-card-new:hover { transform: translateY(-6px); border-color: var(--primary-cyan); box-shadow: 0 12px 30px rgba(14,165,233,0.15); }

.game-card-header { display: flex; justify-content: space-between; align-items: center; padding: 20px 20px 12px; }
.game-card-icon { font-size: 2.5rem; }
.game-status-badge { display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px; border-radius: 20px; font-size: 0.78rem; font-weight: 700; }
.status-on { background: rgba(16, 185, 129, 0.15); color: #6ee7b7; border: 1px solid rgba(16, 185, 129, 0.3); }
.status-off { background: rgba(255,255,255,0.05); color: var(--text-muted); border: 1px solid var(--border-glass); }

.game-card-body { padding: 0 20px 16px; flex: 1; }
.game-card-body h2 { font-size: 1.3rem; font-weight: 800; margin-bottom: 8px; }
.game-card-body p { color: var(--text-muted); font-size: 0.9rem; margin-bottom: 16px; }
.game-card-meta { display: flex; flex-direction: column; gap: 8px; }
.game-meta-item { display: flex; align-items: center; gap: 8px; font-size: 0.85rem; color: var(--text-muted); }
.game-meta-item i { color: var(--primary-cyan); width: 16px; }
.game-meta-item code { background: rgba(255,255,255,0.08); padding: 2px 8px; border-radius: 5px; color: var(--text-main); font-family: var(--font-en); }

.game-card-btn {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  padding: 14px 20px; margin: 0 20px 20px;
  background: linear-gradient(135deg, var(--primary-cyan), #0284c7);
  color: #fff; border-radius: 10px; font-weight: 700;
  text-decoration: none; transition: all 0.2s;
  box-shadow: 0 4px 12px var(--primary-cyan-glow);
}
.game-card-btn:hover { transform: translateY(-2px); box-shadow: 0 6px 20px var(--primary-cyan-glow); }

/* Index page additions */
.hero-bg-grid {
  position: absolute; inset: 0;
  background-image: 
    linear-gradient(rgba(14, 165, 233, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(14, 165, 233, 0.03) 1px, transparent 1px);
  background-size: 40px 40px;
  z-index: 0;
}

.hero-badge-pill.chip-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  background: rgba(14, 165, 233, 0.15);
  border: 1px solid rgba(14, 165, 233, 0.3);
  border-radius: 6px;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--primary-cyan);
  margin-bottom: 20px; animation: pulse 2s infinite;
}
@keyframes pulse { 0%,100%{ box-shadow: 0 0 0 0 rgba(14,165,233,0.3); } 50%{ box-shadow: 0 0 0 8px rgba(14,165,233,0); } }

.pulse-btn { animation: btnPulse 2.5s infinite; }
@keyframes btnPulse { 0%,100%{ box-shadow: 0 4px 15px var(--primary-cyan-glow); } 50%{ box-shadow: 0 4px 30px rgba(14,165,233,0.8); } }

.hero-stats { display: flex; align-items: center; gap: 24px; justify-content: center; margin-top: 40px; flex-wrap: wrap; }
.hero-stat { text-align: center; }
.hero-stat-num { display: block; font-size: 2rem; font-weight: 800; color: var(--primary-cyan); }
.hero-stat-label { font-size: 0.82rem; color: var(--text-muted); }
.hero-stat-divider { width: 1px; height: 40px; background: var(--border-glass); }

.section-badge { display: inline-flex; padding: 4px 14px; background: rgba(239,68,68,0.1); border: 1px solid rgba(239,68,68,0.2); border-radius: 20px; font-size: 0.8rem; color: var(--accent-red); margin-bottom: 12px; }
.section-header { text-align: center; margin-bottom: 40px; }
.section-subtitle { color: var(--text-muted); font-size: 1rem; max-width: 500px; margin: 0 auto; }

/* How it works */
.howto-section { padding: 80px 20px; max-width: 900px; margin: 0 auto; }
.howto-steps { display: flex; align-items: center; justify-content: center; gap: 16px; flex-wrap: wrap; }
.howto-step { flex: 1; min-width: 180px; max-width: 220px; background: rgba(15,23,42,0.5); border: 1px solid var(--border-glass); border-radius: 16px; padding: 28px 20px; text-align: center; }
.step-number { font-size: 2.5rem; font-weight: 900; color: var(--primary-cyan); opacity: 0.3; margin-bottom: 12px; font-family: var(--font-en); }
.step-content h3 { font-size: 1.1rem; margin-bottom: 8px; }
.step-content p { font-size: 0.85rem; color: var(--text-muted); margin: 0; }
.howto-arrow { color: var(--text-muted); font-size: 1.4rem; flex-shrink: 0; }

/* CTA Section */
.cta-section { position: relative; padding: 80px 20px; text-align: center; margin: 40px 0; overflow: hidden; }
.cta-glow { position: absolute; width: 500px; height: 300px; background: radial-gradient(circle, rgba(14,165,233,0.15), transparent 70%); top: 50%; left: 50%; transform: translate(-50%, -50%); pointer-events: none; }
.cta-content { position: relative; z-index: 1; max-width: 600px; margin: 0 auto; }
.cta-content h2 { font-size: 2.2rem; font-weight: 800; margin-bottom: 16px; }
.cta-content p { color: var(--text-muted); margin-bottom: 32px; font-size: 1.05rem; }
.cta-buttons { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }

/* Footer additions */
.footer-logo { display: flex; align-items: center; gap: 12px; font-size: 1.4rem; font-weight: 800; margin-bottom: 12px; font-family: var(--font-en); }
.footer-logo i { color: var(--primary-cyan); }
.footer-links-group h4 { margin-bottom: 12px; color: var(--text-muted); font-size: 0.85rem; text-transform: uppercase; letter-spacing: 1px; }

/* Navbar scroll effect */
.main-navbar.scrolled { background: rgba(4, 6, 11, 0.97); box-shadow: 0 4px 20px rgba(0,0,0,0.3); }

/* Head actions */
.head-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }

/* sub-btn */
.sub-btn { display: inline-flex; align-items: center; gap: 6px; padding: 8px 16px; border-radius: 8px; border: 1px solid var(--border-glass); background: rgba(255,255,255,0.05); color: var(--text-main); cursor: pointer; font-family: inherit; font-size: 0.9rem; transition: all 0.2s; text-decoration: none; }
.sub-btn:hover { background: rgba(255,255,255,0.1); border-color: var(--primary-cyan); }

/* Responsive */
@media (max-width: 900px) {
  .nav-links { display: none; }
  .hero-title { font-size: 2rem; }
  .games-hero-icons { display: none; }
  .howto-arrow { display: none; }
  .layout { flex-direction: column; }
  .dashboard-sidebar { width: 100%; height: auto; position: static; border-left: none; border-bottom: 1px solid var(--border-glass); }
  .sidebar-nav { flex-direction: row; overflow-x: auto; padding: 0 15px 10px; flex-wrap: nowrap; gap: 8px; }
  .sidebar-link { white-space: nowrap; }
  .content { padding: 20px 16px; }
  .panel-grid, .auto-grid { grid-template-columns: 1fr; }
  .ticket-log-grid { grid-template-columns: 1fr; }
  .hero-buttons { flex-direction: column; align-items: center; }
  .cta-buttons { flex-direction: column; align-items: center; }
  .footer-content { flex-direction: column; text-align: center; }
  .footer-social { justify-content: center; }
}
/* ==============================================================
   STATS & WELCOME ZOOM ADDITIONS
   ============================================================== */

/* Top Users Leaderboard in Stats */
.top-users-list { display: flex; flex-direction: column; gap: 14px; margin-top: 10px; }
.top-user-card {
  display: flex; align-items: center; gap: 16px;
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid var(--border-glass);
  border-radius: 16px; padding: 14px 20px;
  transition: all 0.25s ease;
  backdrop-filter: blur(12px);
}
.top-user-card:hover {
  transform: translateX(-4px);
  border-color: var(--primary-cyan);
  background: rgba(14, 165, 233, 0.06);
  box-shadow: 0 8px 24px rgba(0,0,0,0.3);
}

.top-user-rank { flex-shrink: 0; min-width: 44px; text-align: center; }
.rank-badge {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 6px 14px; border-radius: 20px; font-weight: 800; font-size: 0.95rem;
}
.rank-1 { background: linear-gradient(135deg, #f59e0b, #d97706); color: #fff; box-shadow: 0 0 15px rgba(245, 158, 11, 0.4); }
.rank-2 { background: linear-gradient(135deg, #94a3b8, #64748b); color: #fff; box-shadow: 0 0 12px rgba(148, 163, 184, 0.3); }
.rank-3 { background: linear-gradient(135deg, #b45309, #78350f); color: #fff; box-shadow: 0 0 12px rgba(180, 83, 9, 0.3); }
.rank-normal { background: rgba(255,255,255,0.06); border: 1px solid var(--border-glass); color: var(--text-muted); font-size: 0.85rem; }

.top-user-avatar-wrap { position: relative; flex-shrink: 0; }
.top-user-avatar { width: 50px; height: 50px; border-radius: 50%; object-fit: cover; border: 2px solid var(--border-glass); }

.top-user-details { flex: 1; min-width: 140px; }
.top-user-name { display: block; font-size: 1.05rem; font-weight: 700; color: var(--text-main); margin-bottom: 2px; }
.top-user-id-badge { color: var(--text-muted); font-size: 0.78rem; font-family: var(--font-en); display: inline-flex; align-items: center; gap: 4px; }

.top-user-metrics { display: flex; gap: 12px; flex-wrap: wrap; flex-shrink: 0; }
.metric-chip {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 14px; border-radius: 12px;
  background: rgba(0,0,0,0.3); border: 1px solid var(--border-glass);
}
.metric-chip i { font-size: 1.1rem; }
.text-chip i { color: var(--primary-cyan); }
.voice-chip i { color: var(--accent-red); }
.metric-label { font-size: 0.7rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; }
.metric-val { font-size: 0.88rem; font-weight: 700; color: var(--text-main); }
.metric-val small { font-size: 0.75rem; color: var(--text-muted); font-weight: 400; }

/* Zoom control box in welcome */
.zoom-control-box {
  background: rgba(14, 165, 233, 0.08);
  border: 1px solid rgba(14, 165, 233, 0.2);
  border-radius: 12px; padding: 14px 18px;
  margin-bottom: 16px;
}
.zoom-control-box label { font-size: 0.9rem; font-weight: 700; color: var(--text-main); margin-bottom: 8px; display: flex; align-items: center; gap: 8px; }
.zoom-slider-row { display: flex; align-items: center; gap: 16px; }
.zoom-slider-row input[type="range"] {
  flex: 1; margin: 0; accent-color: var(--primary-cyan); cursor: pointer; height: 6px;
}
#zoomPercentBadge {
  padding: 4px 12px; background: var(--primary-cyan); color: #fff;
  border-radius: 20px; font-weight: 800; font-size: 0.85rem;
  box-shadow: 0 0 10px var(--primary-cyan-glow); min-width: 55px; text-align: center;
}

@media (max-width: 768px) {
  .top-user-card { flex-wrap: wrap; }
  .top-user-metrics { width: 100%; justify-content: space-between; }
  .metric-chip { flex: 1; }
}

/* ==============================================================
   Danger Button (حذف) - Premium Red Style
   ============================================================== */

.danger-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 8px 18px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 0.88rem;
  font-family: inherit;
  cursor: pointer;
  border: 1.5px solid #ef4444;
  background: linear-gradient(135deg, #ef4444, #b91c1c);
  color: #fff;
  box-shadow: 0 2px 10px rgba(239, 68, 68, 0.2), inset 0 1px 0 rgba(255,255,255,0.05);
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.danger-btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, #ef4444, #b91c1c);
  opacity: 0;
  transition: opacity 0.25s ease;
  border-radius: inherit;
}

.danger-btn:hover {
  color: #fff;
  border-color: #ef4444;
  box-shadow: 0 4px 20px rgba(239, 68, 68, 0.55), 0 0 0 3px rgba(239, 68, 68, 0.15);
  transform: translateY(-2px) scale(1.02);
}

.danger-btn:hover::before {
  opacity: 1;
}

.danger-btn > * {
  position: relative;
  z-index: 1;
}

.danger-btn:active {
  transform: translateY(0) scale(0.98);
  box-shadow: 0 2px 8px rgba(239, 68, 68, 0.4);
}

/* Add trash icon automatically if no icon inside */
.danger-btn:not(:has(i))::after {
  content: '🗑';
  font-size: 0.9em;
}

/* Pulse animation on hover for extra drama */
@keyframes danger-pulse {
  0%, 100% { box-shadow: 0 4px 20px rgba(239,68,68,0.55), 0 0 0 3px rgba(239,68,68,0.15); }
  50%       { box-shadow: 0 4px 25px rgba(239,68,68,0.75), 0 0 0 5px rgba(239,68,68,0.1); }
}
.danger-btn:hover {
  animation: danger-pulse 1.8s ease-in-out infinite;
}

/* ==============================================================
   File Input - Custom Styled Upload Button
   ============================================================== */

input[type="file"] {
  width: 100%;
  padding: 0;
  background: transparent;
  border: none;
  color: transparent;
  font-size: 0;
  cursor: pointer;
  position: relative;
}

/* Wrap the file input in a styled container via ::file-selector-button */
input[type="file"]::file-selector-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 22px;
  background: linear-gradient(135deg, #ef4444, #b91c1c);
  color: #fff;
  border: 1.5px solid #ef4444;
  border-radius: 8px;
  font-weight: 700;
  font-size: 0.9rem;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 2px 10px rgba(14, 165, 233, 0.15);
  letter-spacing: 0.02em;
  white-space: nowrap;
  content: '📁 اختر ملف';
  margin-inline-end: 12px;
  margin-bottom: 0;
}

input[type="file"]::file-selector-button:hover {
  background: linear-gradient(135deg, #f87171, #ef4444);
  color: #fff;
  border-color: #f87171;
  box-shadow: 0 4px 18px rgba(239, 68, 68, 0.45);
  transform: translateY(-1px);
}

/* File name display after selection */
input[type="file"]:not(:placeholder-shown)::file-selector-button {
  background: linear-gradient(135deg, #b91c1c, #991b1b);
}

/* Wrapper for file inputs to show filename nicely */
.file-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(255,255,255,0.03);
  border: 1.5px dashed rgba(239, 68, 68, 0.25);
  border-radius: 10px;
  padding: 12px 16px;
  transition: border-color 0.25s ease, background 0.25s ease;
}

.file-input-wrapper:hover {
  border-color: rgba(239, 68, 68, 0.5);
  background: rgba(239, 68, 68, 0.05);
}

.file-input-wrapper input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  width: 100%;
  height: 100%;
  z-index: 2;
}

.file-input-wrapper .file-label {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-muted);
  font-size: 0.9rem;
  pointer-events: none;
}

.file-input-wrapper .file-label i {
  color: var(--accent-red);
  font-size: 1.2rem;
}

/* ==============================================================
   Roulette & Games Layout Fixes
   ============================================================== */

.games-layout {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  align-items: flex-start;
}

.games-preview-side {
  flex: 1;
  min-width: 350px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.games-settings-side {
  flex: 1.2;
  min-width: 350px;
}

.roulette-preview-stage {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at 50% 50%, rgba(14,165,233,0.05), rgba(0,0,0,0.25));
  border-radius: 16px;
  overflow: hidden;   /* ← HARD clip — canvas never overflows */
  border: 1px solid var(--border-glass);
  max-height: 420px; /* Sensible cap so it doesn't eat the page */
}

.roulette-preview-stage canvas {
  /* Fill the square container, keeping aspect ratio, never overflow */
  width: 100%  !important;
  height: 100% !important;
  max-width: 100%  !important;
  max-height: 100% !important;
  display: block;
  object-fit: contain;
}

/* Preview footer stats row */
.games-preview-foot {
  display: flex;
  gap: 0;
  border-top: 1px solid var(--border-glass);
  margin-top: 14px;
  padding-top: 14px;
}
.games-preview-foot > div {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 6px;
  border-right: 1px solid var(--border-glass);
}
.games-preview-foot > div:last-child { border-right: none; }
.games-preview-foot span { font-size: 0.75rem; color: var(--text-muted); text-align: center; }
.games-preview-foot strong { font-size: 0.9rem; color: var(--primary-cyan); }


.games-preview-card {
  padding: 24px;
  background: rgba(15, 23, 42, 0.4);
  border-radius: 16px;
  border: 1px solid var(--border-glass);
}

/* Main action button */
.main-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 22px;
  background: linear-gradient(135deg, var(--primary-cyan), #0284c7);
  color: #fff;
  border: none;
  border-radius: 10px;
  font-weight: 700;
  font-size: 0.95rem;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.25s ease;
  box-shadow: 0 3px 12px var(--primary-cyan-glow);
  letter-spacing: 0.02em;
}
.main-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px var(--primary-cyan-glow);
  background: linear-gradient(135deg, var(--primary-cyan-hover), var(--primary-cyan));
}

/* Reward row styling */
.reward-row {
  background: rgba(15, 23, 42, 0.5);
  border: 1px solid var(--border-glass);
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 12px;
}
.reward-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
  align-items: end;
}
.reward-actions {
  display: flex;
  gap: 8px;
  align-items: end;
  padding-bottom: 16px;
}
.reward-delete-form {
  display: inline;
  margin-top: -8px;
  margin-bottom: 12px;
}

/* Command card styling for moderation */
.command-card {
  background: rgba(15, 23, 42, 0.5);
  border: 1px solid var(--border-glass);
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 12px;
}
.command-card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  gap: 12px;
}
.command-card-title {
  font-size: 1.1rem;
  color: var(--primary-cyan);
}
.command-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
}

/* Reply card styling */
.reply-card {
  background: rgba(15, 23, 42, 0.5);
  border: 1px solid var(--border-glass);
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 12px;
}
.reply-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 12px;
}
.reply-title {
  font-size: 0.95rem;
  margin-bottom: 6px;
}
.reply-body {
  color: var(--text-muted);
  font-size: 0.9rem;
}
.reply-actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}
.reply-meta {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 0.8rem;
  color: var(--text-muted);
}
.reply-meta span {
  padding: 3px 10px;
  background: rgba(255,255,255,0.05);
  border-radius: 20px;
  border: 1px solid var(--border-glass);
}

/* Modal styling */
.modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  backdrop-filter: blur(4px);
}
.modal.hidden {
  display: none;
}
.modal-card {
  background: rgba(15, 23, 42, 0.95);
  border: 1px solid var(--border-glass);
  border-radius: 16px;
  padding: 28px;
  width: 90%;
  max-width: 600px;
  max-height: 85vh;
  overflow-y: auto;
}
.modal-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}
.modal-head h2 {
  margin: 0;
}

/* Hidden utility */
.hidden {
  display: none !important;
}

/* Log row styling */
.log-row {
  background: rgba(15, 23, 42, 0.5);
  border: 1px solid var(--border-glass);
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 12px;
}
.log-row-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}


/* ==============================================================
   Discord Embed Preview Styles
   ============================================================== */
.embed-preview-card {
  background: #2b2d31;
  border-radius: 4px;
  border-right: 4px solid #202225; /* RTL: left in Discord is right here */
  padding: 12px 16px 16px 16px;
  max-width: 520px;
  color: #dbdee1;
  font-family: 'gg sans', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  text-align: right;
  margin: 10px 0;
  display: flex;
  flex-direction: column;
}

.embed-content-container {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
}

.embed-main-content {
  display: flex;
  flex-direction: column;
  flex: 1;
}

.embed-author {
  display: flex;
  align-items: center;
  margin-bottom: 8px;
}

.embed-author-icon {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  margin-left: 8px;
  object-fit: cover;
}

.embed-author-name {
  font-size: 14px;
  font-weight: 600;
  color: #ffffff;
}

.embed-title {
  font-size: 16px;
  font-weight: 700;
  color: #00A8FC;
  margin-bottom: 8px;
  word-break: break-word;
}

.embed-description {
  font-size: 14px;
  line-height: 1.375;
  white-space: pre-wrap;
  margin-bottom: 16px;
  word-break: break-word;
}

.embed-thumbnail {
  width: 80px;
  height: 80px;
  border-radius: 4px;
  object-fit: cover;
  margin-right: 16px;
  flex-shrink: 0;
}

.embed-main-image-wrap {
  margin-top: 16px;
  border-radius: 4px;
  overflow: hidden;
  max-width: 400px;
}

.embed-main-image {
  max-width: 100%;
  max-height: 300px;
  border-radius: 4px;
  object-fit: contain;
  display: block;
}

.embed-footer {
  display: flex;
  align-items: center;
  margin-top: 16px;
}

.embed-footer-icon {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  margin-left: 8px;
  object-fit: cover;
}

.embed-footer-text {
  font-size: 12px;
  font-weight: 500;
  color: #dbdee1;
}

.embed-outside-text {
  font-size: 14px;
  color: #dbdee1;
  margin-bottom: 4px;
  margin-top: 10px;
  word-break: break-word;
}

.embed-outside-text.bottom {
  margin-top: 8px;
  margin-bottom: 0;
}

.menu-preview-box {
  margin-top: 8px;
  max-width: 520px;
}
.menu-preview-label {
  background: #2b2d31;
  color: #dbdee1;
  padding: 10px 12px;
  border-radius: 4px;
  font-size: 14px;
  border: 1px solid #1e1f22;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.menu-preview-label::after {
  content: '▼';
  font-size: 10px;
  color: #949ba4;
}
