/* ============================================================
 MCATiers - Staff Panel Styles
 ============================================================ */

/* ── Access Denied ── */
i {
 font-size: 20px;
}
.denied-screen {
 min-height: 100vh;
 display: flex;
 flex-direction: column;
 align-items: center;
 justify-content: center;
 gap: 0.75rem;
 text-align: center;
 padding: 2rem;
}
.denied-icon { font-size: 4rem; margin-bottom: 0.5rem; }
.denied-screen h2 { font-size: 1.5rem; font-weight: 800; }
.denied-screen p { color: var(--text3); font-size: 0.9rem; }

/* ── Layout ── */
.staff-layout {
 display: flex;
 min-height: calc(100vh - 64px);
}

/* ── Sidebar ── */
.staff-sidebar {
 width: 220px;
 flex-shrink: 0;
 background: var(--bg2);
 border-right: 1px solid var(--border);
 display: flex;
 flex-direction: column;
 position: sticky;
 top: 64px;
 height: calc(100vh - 64px);
 overflow-y: auto;
}
.sidebar-header {
 padding: 1.25rem 1rem 1rem;
 border-bottom: 1px solid var(--border);
}
.sidebar-title {
 font-size: 0.875rem;
 font-weight: 800;
 letter-spacing: 0.05em;
 color: var(--accent);
 margin-bottom: 0.375rem;
}
.sidebar-role {
 display: inline-flex;
 padding: 0.15rem 0.5rem;
 background: var(--accent-glow2);
 color: var(--accent);
 border: 1px solid var(--accent);
 border-radius: 9999px;
 font-size: 0.65rem;
 font-weight: 700;
 text-transform: uppercase;
 letter-spacing: 0.05em;
}
.sidebar-nav {
 flex: 1;
 padding: 0.75rem 0.625rem;
 display: flex;
 flex-direction: column;
 gap: 0.2rem;
}
.sidebar-btn {
 display: flex;
 align-items: center;
 gap: 0.5rem;
 width: 100%;
 padding: 0.5rem 0.75rem;
 border-radius: 8px;
 border: none;
 background: none;
 color: var(--text2);
 font-size: 0.825rem;
 font-weight: 600;
 font-family: inherit;
 cursor: pointer;
 text-align: left;
 transition: all 0.15s;
}
.sidebar-btn:hover { background: var(--bg3); color: var(--text); }
.sidebar-btn.active { background: var(--accent-glow2); color: var(--accent); }
.sidebar-btn.danger-btn { color: var(--danger); }
.sidebar-btn.danger-btn:hover { background: rgba(255,68,68,0.08); }
.sidebar-divider { height: 1px; background: var(--border); margin: 0.375rem 0.75rem; }

/* ── Main Content ── */
.staff-main {
 flex: 1;
 padding: 2rem 1.75rem;
 overflow-x: hidden;
 min-width: 0;
}
.staff-section { display: none; }
.staff-section.active { display: block; }
.staff-section-title {
 font-size: 1.375rem;
 font-weight: 800;
 margin-bottom: 1.5rem;
}
.section-title-row {
 display: flex;
 align-items: center;
 justify-content: space-between;
 margin-bottom: 1.5rem;
 flex-wrap: wrap;
 gap: 0.75rem;
}
.staff-user-greeting { color: var(--text3); font-size: 0.875rem; }

/* ── Dashboard Stats ── */
.dash-stats {
 display: grid;
 grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
 gap: 0.875rem;
 margin-bottom: 1.5rem;
}
.dash-stat {
 background: var(--bg3);
 border: 1px solid var(--border);
 border-radius: 12px;
 padding: 1rem;
 text-align: center;
}
.dash-stat .val { font-size: 1.5rem; font-weight: 800; color: var(--accent); font-family: 'JetBrains Mono', monospace; line-height: 1; margin-bottom: 0.25rem; }
.dash-stat .lbl { font-size: 0.7rem; font-weight: 600; color: var(--text3); text-transform: uppercase; letter-spacing: 0.07em; }

.dash-grid {
 display: grid;
 grid-template-columns: 1fr 1fr;
 gap: 1.25rem;
}
.dash-card {
 background: var(--bg3);
 border: 1px solid var(--border);
 border-radius: 14px;
 padding: 1.25rem;
}
.dash-card-title {
 font-size: 0.9rem;
 font-weight: 700;
 margin-bottom: 1rem;
 color: var(--text);
}

/* ── Config Cards ── */
.config-card {
 background: var(--bg3);
 border: 1px solid var(--border);
 border-radius: 14px;
 padding: 1.25rem;
 margin-bottom: 1rem;
}
.config-card-title {
 font-size: 0.9rem;
 font-weight: 700;
 margin-bottom: 1rem;
 color: var(--text);
 padding-bottom: 0.5rem;
 border-bottom: 1px solid var(--border);
}
.config-form { display: flex; flex-direction: column; gap: 0.75rem; }
.form-row { display: flex; flex-direction: column; gap: 0.3rem; }
.form-label { font-size: 0.78rem; font-weight: 600; color: var(--text2); }

/* ── Table ── */
.table-search-bar { margin-bottom: 0.875rem; }
.staff-table-wrapper { overflow-x: auto; }
.staff-table {
 width: 100%;
 border-collapse: collapse;
 font-size: 0.875rem;
}
.staff-table th {
 text-align: left;
 padding: 0.625rem 0.875rem;
 font-size: 0.72rem;
 font-weight: 700;
 text-transform: uppercase;
 letter-spacing: 0.07em;
 color: var(--text3);
 border-bottom: 1px solid var(--border);
 white-space: nowrap;
}
.staff-table td {
 padding: 0.625rem 0.875rem;
 border-bottom: 1px solid var(--border);
 color: var(--text2);
 vertical-align: middle;
}
.staff-table tr:hover td { background: var(--bg2); }

.action-btns { display: flex; gap: 0.375rem; }
.action-btn {
 padding: 0.2rem 0.5rem;
 border-radius: 6px;
 border: 1px solid var(--border);
 background: var(--bg2);
 color: var(--text2);
 font-size: 0.75rem;
 cursor: pointer;
 font-family: inherit;
 font-weight: 600;
 transition: all 0.15s;
}
.action-btn:hover { border-color: var(--accent); color: var(--accent); }
.action-btn.delete:hover { border-color: var(--danger); color: var(--danger); }

/* ── Tiers Config Grid ── */
.tiers-config-grid {
 display: grid;
 grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
 gap: 1rem;
}
.tier-config-card {
 background: var(--bg3);
 border: 2px solid;
 border-radius: 14px;
 padding: 1.25rem;
}
.tier-config-header {
 display: flex;
 align-items: center;
 gap: 0.75rem;
 margin-bottom: 1rem;
}
.tier-config-label {
 font-size: 1rem;
 font-weight: 800;
 letter-spacing: 0.05em;
}
.tier-config-name { font-size: 0.8rem; color: var(--text3); }
.tier-shiny-toggle {
 margin-left: auto;
 display: flex;
 align-items: center;
 gap: 0.375rem;
 font-size: 0.75rem;
 color: var(--text3);
 cursor: pointer;
}
.tier-color-inputs { display: grid; grid-template-columns: 1fr 1fr; gap: 0.625rem; }
.color-group { display: flex; flex-direction: column; gap: 0.3rem; }
.color-group label { font-size: 0.72rem; color: var(--text3); font-weight: 600; }
.color-group input[type=color] {
 width: 100%; height: 36px;
 border-radius: 8px;
 border: 1px solid var(--border);
 background: none;
 cursor: pointer;
 padding: 2px;
}
.color-group input[type=text] { font-size: 0.8rem; }

/* ── Gamemodes List ── */
.gamemodes-list { display: flex; flex-direction: column; gap: 0.625rem; }
.gamemode-row {
 display: flex;
 align-items: center;
 gap: 1rem;
 padding: 0.875rem 1rem;
 background: var(--bg3);
 border: 1px solid var(--border);
 border-radius: 12px;
 flex-wrap: wrap;
}
.gamemode-row-icon { width: 36px; height: 36px; object-fit: contain; image-rendering: pixelated; }
.gamemode-row-name { font-weight: 700; font-size: 0.9rem; min-width: 80px; }
.gamemode-row-color { width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--border); }
.gamemode-toggle {
 margin-left: auto;
 display: flex;
 align-items: center;
 gap: 0.5rem;
}
.toggle-switch {
 position: relative;
 width: 38px; height: 20px;
 background: var(--border);
 border-radius: 10px;
 cursor: pointer;
 transition: background 0.2s;
}
.toggle-switch.on { background: var(--accent); }
.toggle-switch::after {
 content: '';
 position: absolute;
 top: 2px; left: 2px;
 width: 16px; height: 16px;
 border-radius: 50%;
 background: #fff;
 transition: left 0.2s;
}
.toggle-switch.on::after { left: 20px; }

/* ── Ranks Config ── */
.ranks-config-list { display: flex; flex-direction: column; gap: 0.875rem; }
.rank-config-row {
 display: flex;
 align-items: center;
 gap: 1rem;
 padding: 1rem;
 background: var(--bg3);
 border: 1px solid;
 border-radius: 12px;
 flex-wrap: wrap;
}
.rank-admin-card {
 display: flex;
 flex-direction: column;
 gap: .75rem;
 margin-bottom: 1.25rem;
}
.rank-admin-actions {
 display: flex;
 justify-content: flex-end;
 gap: .5rem;
}
.rank-config-name { font-size: 1rem; font-weight: 800; min-width: 60px; }
.rank-config-price { font-size: 0.875rem; color: var(--text3); font-family: 'JetBrains Mono', monospace; }
.rank-config-duration { font-size: 0.75rem; color: var(--text3); }
/* ranks card design */
.ranks-grid {
 display: grid;
 grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
 gap: 1.25rem;
 padding-bottom: 2rem;
}

.rank-card {
 background: var(--bg3);
 border: 2px solid var(--border);
 border-radius: 18px;
 overflow: hidden;
 transition: transform 0.2s ease, box-shadow 0.2s ease;
 position: relative;
}
.rank-card:hover {
 transform: translateY(-4px);
 box-shadow: 0 12px 40px rgba(0,0,0,0.5);
}

/* Popular badge */
.rank-card.popular::before {
 content: ' Most Popular';
 position: absolute;
 top: 0; left: 50%;
 transform: translateX(-50%);
 background: var(--accent);
 color: #050a05;
 font-size: 0.7rem;
 font-weight: 800;
 padding: 0.2rem 1rem;
 border-radius: 0 0 10px 10px;
 letter-spacing: 0.05em;
 text-transform: uppercase;
 z-index: 2;
}

.rank-card-header {
 padding: 2rem 1.5rem 1.25rem;
 text-align: center;
 position: relative;
}
.rank-name-display {
 font-size: 2rem;
 font-weight: 900;
 letter-spacing: 0.05em;
 margin-bottom: 0.375rem;
 line-height: 1;
}
.rank-price {
 font-size: 1.75rem;
 font-weight: 800;
 color: var(--text);
 margin-bottom: 0.25rem;
}
.rank-price span {
 font-size: 1rem;
 font-weight: 500;
 color: var(--text3);
}
.rank-duration {
 font-size: 0.75rem;
 color: var(--text3);
 font-family: 'JetBrains Mono', monospace;
}

.rank-card-body { padding: 0 1.5rem 1.5rem; }

/* Features list */
.rank-features {
 list-style: none;
 padding: 0;
 margin: 0 0 1.25rem;
 display: flex;
 flex-direction: column;
 gap: 0.5rem;
}
.rank-feature-item {
 display: flex;
 align-items: center;
 gap: 0.5rem;
 font-size: 0.875rem;
 color: var(--text2);
}
.rank-feature-item::before {
 content: '✓';
 color: var(--accent);
 font-weight: 700;
 flex-shrink: 0;
}
.rank-divider {
 display: flex;
 align-items: center;
 gap: 0.5rem;
 margin: 0.375rem 0;
 color: var(--text3);
 font-size: 0.7rem;
 text-transform: uppercase;
 letter-spacing: 0.08em;
}
.rank-divider::before,
.rank-divider::after {
 content: '';
 flex: 1;
 height: 1px;
 background: var(--border);
}
.rank-features {
 list-style: none;
 padding: 0;
 margin: 0 0 1.25rem;
 display: flex;
 flex-direction: column;
 gap: 0.5rem;
}
.rank-feature-item {
 display: flex;
 align-items: center;
 gap: 0.5rem;
 font-size: 0.875rem;
 color: var(--text2);
}
.rank-feature-item::before {
 content: '✓';
 color: var(--accent);
 font-weight: 700;
 flex-shrink: 0;
}
/* ── Cards Design ── */
.cards-design-grid {
 display: grid;
 grid-template-columns: 1fr 1fr;
 gap: 1.25rem;
}

/* ── Site Settings ── */
.site-settings-grid {
 display: grid;
 grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
 gap: 1.25rem;
}

/* ── Keys ── */
.key-value-cell {
 font-family: 'JetBrains Mono', monospace;
 font-size: 0.78rem;
 color: var(--accent);
 cursor: pointer;
 user-select: all;
}
.key-used { opacity: 0.5; text-decoration: line-through; }
.key-active { color: var(--success); font-size: 0.75rem; font-weight: 700; }

/* ── Server Integration ── */
.server-int-grid {
 display: grid;
 grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
 gap: 1.25rem;
}

/* ── Mobile sidebar ── */
@media (max-width: 900px) {
 .staff-layout { flex-direction: column; }
 .staff-sidebar { width: 100%; height: auto; position: static; flex-direction: column; border-right: none; border-bottom: 1px solid var(--border); }
 .sidebar-header { border-bottom: 1px solid var(--border); padding: 0.875rem 1rem; flex-direction: row; display: flex; align-items: center; justify-content: space-between; }
 .sidebar-nav { flex-direction: row; flex-wrap: wrap; padding: 0.5rem; gap: 0.25rem; overflow-x: auto; }
 .sidebar-btn { width: auto; font-size: 0.72rem; padding: 0.375rem 0.625rem; flex-shrink: 0; }
 .dash-grid { grid-template-columns: 1fr; }
 .tiers-config-grid { grid-template-columns: 1fr; }
 .cards-design-grid { grid-template-columns: 1fr; }
 .staff-main { padding: 1.25rem 1rem; }
}
@media (max-width: 600px) {
 .dash-stats { grid-template-columns: repeat(2,1fr); }
 .site-settings-grid { grid-template-columns: 1fr; }
 .server-int-grid { grid-template-columns: 1fr; }
}

.badge-accent{background:var(--accent-glow2);color:var(--accent);border:1px solid var(--accent);padding:.15rem .55rem;border-radius:8px;font-size:.65rem;font-weight:700;letter-spacing:.04em;}
#news-content {
    min-height: 120px;
   
}
.news-actions {
    display: flex;
    gap: .5rem;
    flex-wrap: wrap;
   
}
#confirm-modal {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.45);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.confirm-box {
    width: min(420px, 92vw);
    padding: 1.25rem;
    border-radius: 18px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    box-shadow: var(--shadow-lg);
}

.confirm-box h3 {
    margin-bottom: .5rem;
}

.confirm-box p {
    color: var(--text3);
    margin-bottom: 1rem;
}

.confirm-actions {
    display: flex;
    justify-content: flex-end;
    gap: .75rem;
}
@media (max-width: 768px) {
    .news-actions {
        width: 100%;
        justify-content: flex-end;
        margin-top: .75rem;
    }

    .news-actions .btn {
        min-width: 42px;
        height: 42px;
        padding: 0 .85rem;
        border-radius: 12px;
    }
}
#banner-file {
 background: var(--bg2);
}
.btn {
  display:inline-flex; align-items:center; justify-content:center; gap:.6rem;
  padding:.7rem 1.6rem; border-radius:12px; border:none;
  cursor:pointer; font-family:inherit; font-size:.9rem;
  font-weight:600; text-decoration:none; 
  transition:all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  letter-spacing:0.01em; position:relative; overflow:hidden;
}

/* Primary Glass Button - شكل أحترافي ناعم */
.btn-primary {
  background:rgba(255,255,255,0.05);
  backdrop-filter:blur(10px);
  border:1px solid rgba(255,255,255,0.1);
  color:var(--text);
  box-shadow:0 4px 12px rgba(0,0,0,0.1);
}
.btn-primary:hover { 
  background:rgba(var(--accent), 0.1);
  border-color:var(--accent);
  transform:translateY(-2px);
  box-shadow:0 8px 24px rgba(0,0,0,0.2);
}

/* Accent Button - التركيز العالي */
.btn-accent {
  background:linear-gradient(135deg, var(--accent) 0%, var(--accent2) 100%);
  color:white;
  box-shadow:0 4px 15px var(--accent-glow);
  border:none;
}
.btn-accent:hover {
  transform:translateY(-2px);
  box-shadow:0 8px 25px var(--accent-glow);
  filter:brightness(1.1);
}
.input {
  background:rgba(0,0,0,0.2);
  border:1px solid var(--border);
  border-radius:12px; padding:.75rem 1rem;
  color:var(--text); font-size:1rem;
  transition:all 0.3s ease;
}
.input:focus { 
  background:rgba(0,0,0,0.3);
  border-color:var(--accent); 
  box-shadow:0 0 0 4px rgba(var(--accent), 0.1); 
}
.glass-card {
  background:rgba(255, 255, 255, 0.03);
  backdrop-filter:blur(24px) saturate(180%);
  -webkit-backdrop-filter:blur(24px) saturate(180%);
  border:1px solid rgba(255, 255, 255, 0.08);
  border-radius:20px;
  padding:1.5rem;
  position:relative;
  transition:all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
/* إضافة إضاءة خفيفة جداً للحواف */
.glass-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 20px;
  padding: 1px;
  background: linear-gradient(135deg, rgba(255,255,255,0.1), transparent);
  
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}
.glass-card:hover {
  transform:translateY(-5px);
  border-color:var(--accent);
  box-shadow:0 20px 40px rgba(0,0,0,0.3);
}
/* زر حذف ناعم وأنيق */
.btn-trash {
    background: rgba(248, 113, 113, 0.05); /* أحمر شفاف جداً */
    border: 1px solid rgba(248, 113, 113, 0.2);
    color: var(--danger);
    padding: 8px 12px;
    border-radius: 10px;
    transition: all 0.3s ease;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-trash:hover {
    background: var(--danger);
    color: white;
    box-shadow: 0 4px 12px rgba(248, 113, 113, 0.3);
    transform: translateY(-2px);
}
.badges-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.badge-card {
    display: flex;
    flex-direction: column;
    background: var(--bg2);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 1.1rem;
    gap: .75rem;
    transition: border-color .2s, transform .2s, box-shadow .2s;
}

.badge-card:hover {
    border-color: var(--accent);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0,0,0,.3);
}

.badge-card-header {
    display: flex;
    align-items: center;
    gap: .75rem;
}

.badge-card-icon {
    width: 44px;
    height: 44px;
    background: var(--accent-glow2);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.badge-card-icon i { font-size: 1.2rem; }
.badge-card-icon img { width: 24px; height: 24px; object-fit: contain; border-radius: 4px; }

.badge-card-name {
    font-size: .95rem;
    font-weight: 700;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.badge-card-desc {
    font-size: .8rem;
    color: var(--text3);
    flex: 1;
    line-height: 1.5;
}

.badge-card-footer {
    margin-top: auto;
}

.badge-card-footer .btn-trash {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .4rem;
    padding: .45rem;
    background: rgba(248,113,113,.08);
    border: 1px solid rgba(248,113,113,.2);
    border-radius: 8px;
    color: var(--danger);
    cursor: pointer;
    font-size: .8rem;
    transition: background .2s, border-color .2s;
}

.badge-card-footer .btn-trash:hover {
    background: rgba(248,113,113,.18);
    border-color: var(--danger);
}
/* ══════════════════════════════════════
   THEMES TAB
══════════════════════════════════════ */
.themes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.theme-card {
    display: flex;
    flex-direction: column;
    background: var(--bg2);
    border: 1px solid var(--border);
    border-radius: 14px;
    overflow: hidden;
    transition: border-color .2s, transform .2s, box-shadow .2s;
}

.theme-card:hover {
    border-color: var(--accent);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0,0,0,.3);
}

.theme-card-thumb {
    position: relative;
    height: auto;
    background: var(--bg3);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 1rem;
}

.theme-palette-grid {
    animation: fadeIn 0.4s ease;
}

.theme-palette-grid > div:hover {
    transform: scale(1.2);
    z-index: 2;
    border-color: rgba(255,255,255,0.4) !important;
}

.theme-card-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.theme-card-thumb-empty {
    color: var(--text3);
    font-size: 1.6rem;
    opacity: .5;
}

.theme-card-status {
    position: absolute;
    top: .5rem;
    right: .5rem;
    font-size: .58rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
    padding: .2rem .55rem;
    border-radius: 9999px;
    backdrop-filter: blur(6px);
}

.theme-card-status.on { background: rgba(74,222,128,.18); color: #4ade80; border: 1px solid rgba(74,222,128,.35); }
.theme-card-status.off { background: rgba(248,113,113,.18); color: #f87171; border: 1px solid rgba(248,113,113,.35); }

.theme-card-body {
    align-items: flex-start;
    padding: .9rem 1rem 0;
    display: flex;
    flex-direction: column;
    gap: .3rem;
    flex: 1;
    width: 100%;
}

.theme-card-name {
    font-size: .95rem;
    font-weight: 700;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.theme-card-desc {
    font-size: .78rem;
    color: var(--text3);
    line-height: 1.5;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.theme-card-price {
    font-size: .72rem;
    font-weight: 700;
    color: var(--accent);
}

.theme-card-footer {
    margin-top: .75rem;
    display: flex;
    gap: .5rem;
    padding: 0 1rem 1rem;
}

.theme-card-footer button {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .35rem;
    padding: .45rem;
    border-radius: 8px;
    cursor: pointer;
    font-size: .75rem;
    transition: background .2s, border-color .2s;
    border: 1px solid var(--glass-border);
    background: var(--bg3);
    color: var(--text2);
}

.theme-card-footer button:hover { border-color: var(--accent); color: var(--accent); }

.theme-card-footer .btn-trash {
    background: rgba(248,113,113,.08);
    border: 1px solid rgba(248,113,113,.2);
    color: var(--danger);
}

.theme-card-footer .btn-trash:hover {
    background: rgba(248,113,113,.18);
    border-color: var(--danger);
    color: var(--danger);
}

.theme-code-input {
    tab-size: 2;
}

.theme-preview-frame-wrap {
    border: 1px solid var(--border);
    border-radius: 10px;
    overflow: hidden;
    background: #0b0e14;
}

.theme-preview-frame {
    width: 100%;
    height: 260px;
    border: none;
    display: block;
    background: #0b0e14;
}
#news-items-container .news-admin-card {
    color: white !important;
    background: var(--bg2) !important;

}
.staff-section {
    min-height: 500px; /* جرب هذا حتى تتأكد */
}
#rank-modal .modal{
    max-width:900px;
    max-height:90vh;
    overflow-y:auto;
}
/* Sort gamemodes */
.sort-item{
    display:flex;
    align-items:center;
    gap:10px;

    padding:12px;
    margin-bottom:8px;

    background:var(--bg3);
    border:1px solid var(--border);
    border-radius:10px;

    cursor:grab;
    transition:.2s;
}

.sort-item:hover{
    border-color:var(--accent);
}

.sort-item i{
    opacity:.7;
}
.gamemode-row.drag-over {
    border: 2px dashed var(--accent);
    background: rgba(79,158,255,0.08);
    border-radius: 10px;
}
.gamemode-row[draggable="true"] {
    transition: opacity 0.2s;
}
/* ── Player Modal Responsive ── */
#player-modal .modal {
  max-width: 520px;
  max-height: 90vh;
  overflow-y: auto;
  width: 100%;
  border-radius: 12px;
}

#player-modal .modal-header {

  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;

  top: 0;
  background: var(--glass-bg);
  backdrop-filter: blur(24px);
  z-index: 10;
  padding-bottom: .75rem;
  border-bottom: 1px solid var(--border);
}

#player-modal .modal-close {
  background: none;
  border: none;
  color: var(--text3);
  font-size: 1.25rem;
  cursor: pointer;
  padding: .25rem .5rem;
  border-radius: 8px;
  transition: all .2s;
  line-height: 1;
}

#player-modal .modal-close:hover {
  color: var(--danger);
  background: rgba(248,113,113,.1);
}

@media (max-width: 600px) {
  #player-modal .modal {
    max-width: 100%;
    max-height: 95vh;
    border-radius: 16px 16px 0 0;
    margin-top: auto;
  }

  #player-modal.modal-backdrop {
    align-items: flex-end;
    padding: 0;
  }
}
.upload-box{
    width:100%;
    min-height:180px;

    display:flex;
    flex-direction:column;
    justify-content:center;
    align-items:center;
    gap:10px;

    margin-top:8px;
    padding:28px 20px;

    background:var(--bg2);
    border:2px dashed var(--border);
    border-radius:16px;

    cursor:pointer;
    transition:.25s ease;
    user-select:none;
}

.upload-box:hover{
    border-color:var(--accent);
    background:rgba(59,130,246,.05);
}

.upload-box.dragover{
    border-color:var(--accent);
    background:rgba(59,130,246,.12);
    transform:scale(1.01);
}

.upload-icon{
    width:62px;
    height:62px;

    display:flex;
    align-items:center;
    justify-content:center;

    border-radius:50%;
    background:rgba(59,130,246,.12);

    color:var(--accent);
    font-size:28px;
}

.upload-content{
    display:flex;
    flex-direction:column;
    align-items:center;
    gap:4px;
    text-align:center;
}

.upload-title{
    font-size:18px;
    font-weight:700;
    color:var(--text);
}

.upload-subtitle{
    font-size:14px;
    color:var(--text3);
}

.upload-file-name{
    margin-top:10px;
    padding:8px 14px;

    max-width:100%;

    border-radius:999px;
    background:var(--bg3);

    color:var(--accent);
    font-size:13px;
    font-weight:600;

    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap;
}
.checkbox-row{
    display:flex;
    gap:18px;
    margin-top:18px;
    flex-wrap:wrap;
    margin-bottom: 9px;
}

.toggle{
    display:flex;
    align-items:center;
    gap:12px;
    padding:12px 16px;

    background:var(--bg2);

    border:1px solid var(--border);
    border-radius:14px;

    cursor:pointer;

    transition:.2s;
}

.toggle:hover{
    border-color:var(--accent);
}

.toggle input{
    display:none;
}

.toggle-slider{
    position:relative;

    width:48px;
    height:26px;

    border-radius:999px;

    background:#4b5563;

    transition:.25s;
}

.toggle-slider::before{

    content:"";

    position:absolute;

    top:3px;
    left:3px;

    width:20px;
    height:20px;

    border-radius:50%;

    background:#fff;

    transition:.25s;
}
#category-table-body tr.drag-over {
    border-top: 2px solid var(--accent);
    background: var(--accent-glow2);
}
.toggle input:checked + .toggle-slider{
    background:var(--accent);
}

.toggle input:checked + .toggle-slider::before{
    transform:translateX(22px);
}

.toggle-label{
    font-size:14px;
    font-weight:600;
    color:var(--text);
}
/* themes*/
.themes-list{
    display:flex;
    flex-direction:column;
    gap:16px;
}

.theme-card{
    display:flex;
    justify-content:space-between;
    align-items:center;
    gap:20px;

    padding:18px;

    border:1px solid var(--border);
    border-radius:16px;

    background:var(--surface);
}

.theme-card-info h4{
    margin:0;
}

.theme-card-info p{
    margin-top:6px;
    color:var(--text3);
    font-size:.9rem;
}

.theme-card-actions{
    display:flex;
    gap:10px;
}
/* ══════════════════════════════════════
   SHULKER BOX BUILDER (Survival Shop kits)
══════════════════════════════════════ */
.shulker-grid {
    display: grid;
    grid-template-columns: repeat(9, 1fr);
    gap: 4px;
    background: var(--glass-bg);
    border: 4px solid var(--glass-border);
    border-radius: 6px;
    padding: 8px;
    margin-top: .4rem;
    flex: 1;
    min-width: 280px;
}

.shulker-slot {
    aspect-ratio: 1 / 1;
    background: var(--bg2);
    border-top: 2px solid var(--glass-border);
    border-left: 2px solid var(--glass-border);
    border-bottom: 2px solid var(--accent-glow);
    border-right: 2px solid var(--accent-glow);
    border-radius: 2px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    cursor: pointer;
    transition: filter .15s;
}
.shulker-slot:hover { filter: brightness(1.2); }
.shulker-slot.filled { background: var(--bg3); }
.shulker-slot.drag-over {
    outline: 2px solid var(--accent);
    outline-offset: -2px;
}

.shulker-slot .slot-icon {
    font-size: 2.15rem;
    line-height: 1;
    filter: drop-shadow(1px 1px 0 rgba(0,0,0,.6));
    pointer-events: none;
}

.shulker-slot .slot-count {
    position: absolute;
    bottom: 1px;
    right: 3px;
    font-size: .62rem;
    font-weight: 800;
    color: #fff;
    text-shadow: 1px 1px 0 #000, -1px -1px 0 #000;
    pointer-events: none;
}

.shulker-slot .slot-icon-img {
    width: 36px;
    height: 36px;
    image-rendering: pixelated;
    pointer-events: none;
    filter: drop-shadow(1px 1px 0 rgba(0,0,0,.4));
}

.enchant-row .input { padding: .4rem .6rem; font-size: .8rem; }

/* ── Shulker item library (drag & drop / tap-to-place) ── */
.shulker-builder-layout {
    display: flex;
    gap: .75rem;
    margin-top: .4rem;
    align-items: flex-start;
    flex-wrap: wrap;
}

.shulker-library {
    width: 230px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: .5rem;
}

.shulker-library.drag-over {
    outline: 2px dashed var(--danger);
    outline-offset: 4px;
    border-radius: 8px;
}

.shulker-library-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 4px;
    max-height: 320px;
    overflow-y: auto;
    background: var(--glass-bg);
    border: 3px solid var(--glass-border);
    border-radius: 6px;
    padding: 6px;
    align-content: start;
}

.shulker-lib-group-title {
    grid-column: 1 / -1;
    font-size: .62rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--text3);
    padding: .3rem .1rem 0;
}

.shulker-lib-item {
    aspect-ratio: 1 / 1;
    background: var(--bg2);
    border-top: 2px solid var(--glass-border);
    border-left: 2px solid var(--glass-border);
    border-bottom: 2px solid var(--accent-glow);
    border-right: 2px solid var(--accent-glow);
    border-radius: 2px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: grab;
    transition: filter .15s;
}
.shulker-lib-item:hover { filter: brightness(1.25); }
.shulker-lib-item:active { cursor: grabbing; }
.shulker-lib-item.selected {
    outline: 2px solid var(--accent);
    outline-offset: -2px;
    filter: brightness(1.3);
}
.shulker-lib-item img {
    width: 49px;
    height: 49px;
    image-rendering: pixelated;
    pointer-events: none;
}
.shulker-lib-empty {
    grid-column: 1 / -1;
    color: var(--text3);
    font-size: .75rem;
    text-align: center;
    padding: 1rem .5rem;
}
/* ══════════════════════════════════════
   THEME VARIABLE INPUTS (one input per CSS var)
══════════════════════════════════════ */
.theme-var-group {
    margin-bottom: 1rem;
    padding: .85rem .9rem;
    background: var(--bg3);
    border: 1px solid var(--border);
    border-radius: 12px;
}
.theme-var-group-title {
    font-size: .72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--text3);
    margin-bottom: .65rem;
}
.theme-vars-input-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
    gap: .75rem;
}
.theme-var-item { display: flex; flex-direction: column; gap: .3rem; }
.theme-var-label { display: flex; flex-direction: column; gap: .1rem; }
.theme-var-name { font-family: 'JetBrains Mono', monospace; font-size: .7rem; color: var(--accent2); }
.theme-var-desc { font-size: .72rem; color: var(--text3); }
.theme-var-controls { display: flex; align-items: center; gap: .5rem; }
.theme-var-swatch {
    width: 34px; height: 34px; flex-shrink: 0; padding: 0;
    border: 1px solid var(--border); border-radius: 8px; background: none; cursor: pointer;
}
.theme-var-swatch::-webkit-color-swatch-wrapper { padding: 2px; }
.theme-var-swatch::-webkit-color-swatch { border: none; border-radius: 6px; }
.theme-var-preview {
    width: 34px; height: 34px; flex-shrink: 0; border-radius: 8px;
    border: 1px solid var(--border); background-size: cover;
}
.theme-var-input { flex: 1; min-width: 0; padding: .45rem .6rem; font-size: .78rem; font-family: 'JetBrains Mono', monospace; }