@import url('https://fonts.googleapis.com/css2?family=Readex+Pro:wght@300;400;500;600;700&display=swap');

:root {
  --bg-main: #F4F6F9;
  --bg-card: #FFFFFF;
  --bg-dark: #0B0F17;
  --bg-sidebar: #111827;
  --text-main: #0F172A;
  --text-muted: #64748B;
  --brand: #D97706;
  --brand-light: #FEF3C7;
  --brand-hover: #B45309;
  --border: #E2E8F0;
  --success: #059669;
  --danger: #DC2626;
  --radius-lg: 18px;
  --radius-md: 12px;
  --shadow: 0 4px 20px -2px rgba(15, 23, 42, 0.06);
}

* { box-sizing: border-box; margin: 0; padding: 0; font-family: 'Readex Pro', sans-serif; }
body { background-color: var(--bg-main); color: var(--text-main); line-height: 1.6; direction: rtl; }
a { text-decoration: none; color: inherit; }

/* Buttons & Inputs */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 12px 22px; border-radius: var(--radius-md); font-weight: 600; font-size: 14px; border: none; cursor: pointer; transition: all 0.2s ease; }
.btn-brand { background: linear-gradient(135deg, #F59E0B 0%, #D97706 100%); color: #090D16; box-shadow: 0 4px 14px rgba(217, 119, 6, 0.25); }
.btn-brand:hover { transform: translateY(-1px); box-shadow: 0 6px 20px rgba(217, 119, 6, 0.35); }
.btn-dark { background: var(--bg-sidebar); color: #FFFFFF; }
.btn-dark:hover { background: #1E293B; }
.btn-outline { background: #FFFFFF; color: var(--text-main); border: 1px solid var(--border); }
.btn-outline:hover { background: #F8FAFC; border-color: #CBD5E1; }
.btn-danger { background: #FEE2E2; color: var(--danger); }
.btn-success { background: #D1FAE5; color: var(--success); }

.input-group { margin-bottom: 16px; }
.input-group label { display: block; font-size: 12px; font-weight: 600; color: #334155; margin-bottom: 6px; }
.input-control { width: 100%; padding: 12px 14px; border-radius: var(--radius-md); border: 1px solid #CBD5E1; background: #F8FAFC; font-size: 14px; color: var(--text-main); outline: none; transition: 0.2s; }
.input-control:focus { background: #FFFFFF; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.15); }

/* Dashboard Layout with Sidebar */
.app-layout { display: grid; grid-template-columns: 270px 1fr; min-height: 100vh; }
.sidebar { background: var(--bg-sidebar); color: #FFFFFF; padding: 24px 18px; display: flex; flex-direction: column; justify-content: space-between; position: sticky; top: 0; height: 100vh; }
.brand-box { display: flex; align-items: center; gap: 12px; padding-bottom: 22px; border-bottom: 1px solid rgba(255,255,255,0.08); margin-bottom: 22px; }
.brand-logo { width: 42px; height: 42px; border-radius: 12px; background: linear-gradient(135deg, #F59E0B, #D97706); display: flex; align-items: center; justify-content: center; color: #000; font-weight: 800; font-size: 20px; }
.nav-menu { list-style: none; display: flex; flex-direction: column; gap: 6px; }
.nav-item { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-radius: var(--radius-md); color: #94A3B8; font-size: 14px; font-weight: 500; cursor: pointer; transition: 0.2s; }
.nav-item:hover { background: rgba(255,255,255,0.05); color: #FFFFFF; }
.nav-item.active { background: linear-gradient(135deg, #F59E0B, #D97706); color: #090D16; font-weight: 700; }

.main-content { padding: 32px; max-width: 1400px; width: 100%; margin: 0 auto; }
.topbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 28px; background: #FFFFFF; padding: 18px 24px; border-radius: var(--radius-lg); border: 1px solid var(--border); box-shadow: var(--shadow); }

/* Cards & Stats */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 20px; margin-bottom: 28px; }
.stat-card { background: #FFFFFF; padding: 22px; border-radius: var(--radius-lg); border: 1px solid var(--border); box-shadow: var(--shadow); }
.stat-label { font-size: 12px; color: var(--text-muted); font-weight: 600; }
.stat-value { font-size: 28px; font-weight: 700; color: var(--text-main); margin-top: 6px; }
.card-box { background: #FFFFFF; border-radius: var(--radius-lg); border: 1px solid var(--border); padding: 24px; box-shadow: var(--shadow); margin-bottom: 24px; }
.card-title { font-size: 17px; font-weight: 700; margin-bottom: 18px; padding-bottom: 12px; border-bottom: 1px solid var(--border); display: flex; justify-content: space-between; align-items: center; }

/* Tables */
.data-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.data-table th { text-align: right; padding: 12px 14px; background: #F8FAFC; color: var(--text-muted); font-weight: 600; border-bottom: 1px solid var(--border); }
.data-table td { padding: 14px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.badge { padding: 4px 10px; border-radius: 99px; font-size: 11px; font-weight: 700; display: inline-block; }
.badge-active { background: #D1FAE5; color: #065F46; }
.badge-suspended { background: #FEE2E2; color: #991B1B; }
.badge-plan { background: #FEF3C7; color: #92400E; }

.hidden { display: none !important; }

@media (max-width: 900px) {
  .app-layout { grid-template-columns: 1fr; }
  .sidebar { height: auto; position: relative; }
  .main-content { padding: 16px; }
}
