/* ============================================================
   WScripts - App Stylesheet
   Tema escuro profissional para plataforma de downloads
   ============================================================ */

/* ─── Reset & Base ─────────────────────────────────────────── */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --bg-primary: #0b0d1a;
  --bg-card:   #14172b;
  --bg-elevated: #1a1f3a;
  --border:    rgba(255,255,255,0.06);
  --border-hover: rgba(99,102,241,0.2);
  --text:      #e0e6f0;
  --text-muted:#64748b;
  --text-dim:  #475569;
  --accent:    #6366f1;
  --accent2:   #a855f7;
  --accent3:   #ec4899;
  --success:   #22c55e;
  --error:     #ef4444;
  --warning:   #eab308;
  --info:      #3b82f6;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --shadow:    0 4px 20px rgba(0,0,0,0.2);
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  background: var(--bg-primary);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

/* ─── Container ────────────────────────────────────────────── */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
}

.main-content {
  padding-top: 80px;
  min-height: calc(100vh - 100px);
}

/* ─── Links ────────────────────────────────────────────────── */
a {
  color: #818cf8;
  text-decoration: none;
  transition: color 0.2s;
}
a:hover { color: #a5b4fc; }

/* ─── Navbar ───────────────────────────────────────────────── */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 16px 0;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  background: rgba(11, 13, 26, 0.75);
  border-bottom: 1px solid var(--border);
}

.navbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
}

.navbar__logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-size: 1.3rem;
  font-weight: 700;
  color: #fff !important;
  letter-spacing: -0.5px;
}

.navbar__logo-icon {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.9rem;
  color: #fff;
  box-shadow: 0 0 20px rgba(99, 102, 241, 0.25);
  transition: transform 0.3s, box-shadow 0.3s;
}

.navbar__logo:hover .navbar__logo-icon {
  transform: scale(1.05) rotate(-5deg);
  box-shadow: 0 0 30px rgba(99, 102, 241, 0.4);
}

.navbar__logo span {
  background: linear-gradient(135deg, #c7d2fe, #a78bfa);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.navbar__links {
  display: flex;
  gap: 24px;
  list-style: none;
  align-items: center;
}

.navbar__links a {
  text-decoration: none;
  color: #94a3b8;
  font-size: 0.88rem;
  font-weight: 500;
  transition: color 0.3s;
  position: relative;
  white-space: nowrap;
}

.navbar__links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  transition: width 0.3s;
}

.navbar__links a:hover { color: #e2e8f0; }
.navbar__links a:hover::after { width: 100%; }
.navbar__links a.active { color: #c7d2fe; }
.navbar__links a.active::after { width: 100%; }

.navbar__cta {
  padding: 10px 24px;
  border-radius: 100px;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  color: #fff !important;
  font-weight: 600;
  font-size: 0.85rem;
  transition: transform 0.3s, box-shadow 0.3s;
  box-shadow: 0 4px 15px rgba(99, 102, 241, 0.25);
  border: none;
  cursor: pointer;
}

.navbar__cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(99, 102, 241, 0.35);
}
.navbar__cta::after { display: none !important; }

.navbar__toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  color: #fff;
  font-size: 1.5rem;
  padding: 4px;
}

/* ─── Page Header ──────────────────────────────────────────── */
.page-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 32px;
  flex-wrap: wrap;
  gap: 16px;
  padding-top: 16px;
}

.page-header h1 {
  font-size: clamp(1.4rem, 3vw, 2rem);
  font-weight: 700;
  letter-spacing: -0.5px;
}

.page-header p {
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* ─── Buttons ──────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  border-radius: 100px;
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.3s;
  cursor: pointer;
  border: none;
  white-space: nowrap;
}

.btn--primary {
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  color: #fff !important;
  box-shadow: 0 4px 20px rgba(99, 102, 241, 0.25);
}
.btn--primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(99, 102, 241, 0.35);
}

.btn--secondary {
  background: rgba(255, 255, 255, 0.05);
  color: #e2e8f0 !important;
  border: 1px solid var(--border);
  backdrop-filter: blur(4px);
}
.btn--secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.15);
  transform: translateY(-2px);
}

.btn--full { width: 100%; justify-content: center; }

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none !important;
}

/* ─── Cards ────────────────────────────────────────────────── */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  backdrop-filter: blur(4px);
  transition: border-color 0.3s;
}

.card__title {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

/* ─── Stats Grid ───────────────────────────────────────────── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 32px;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 24px;
  transition: transform 0.3s, border-color 0.3s;
}

.stat-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-hover);
}

.stat-card__icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  margin-bottom: 16px;
}

.stat-card__icon--purple { background: rgba(99,102,241,0.12); color: #818cf8; }
.stat-card__icon--blue   { background: rgba(59,130,246,0.12); color: #60a5fa; }
.stat-card__icon--green  { background: rgba(34,197,94,0.12);  color: #4ade80; }
.stat-card__icon--orange { background: rgba(249,115,22,0.12); color: #fb923c; }
.stat-card__icon--pink   { background: rgba(236,72,153,0.12); color: #f472b6; }
.stat-card__icon--red    { background: rgba(239,68,68,0.12);  color: #f87171; }

.stat-card__value {
  font-size: 1.6rem;
  font-weight: 800;
  margin-bottom: 4px;
}

.stat-card__label {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* ─── Quick Actions ────────────────────────────────────────── */
.quick-actions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}

.action-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 24px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  text-decoration: none;
  color: var(--text) !important;
  transition: all 0.3s;
}

.action-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-hover);
  box-shadow: 0 8px 30px rgba(0,0,0,0.2);
}

.action-card__icon { font-size: 1.5rem; }
.action-card__title { font-weight: 600; font-size: 1rem; }
.action-card__desc { font-size: 0.8rem; color: var(--text-muted); }

/* ─── Auth Forms ───────────────────────────────────────────── */
.auth-section {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - 180px);
  padding: 40px 0;
}

.auth-card {
  width: 100%;
  max-width: 420px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 40px 32px;
}

.auth-card__header {
  text-align: center;
  margin-bottom: 28px;
}

.auth-card__logo {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1.1rem;
  color: #fff;
  margin: 0 auto 16px;
  box-shadow: 0 0 30px rgba(99, 102, 241, 0.25);
}

.auth-card h1 {
  font-size: 1.4rem;
  margin-bottom: 4px;
}

.auth-card p {
  color: var(--text-muted);
  font-size: 0.85rem;
}

.auth-card__footer {
  text-align: center;
  margin-top: 24px;
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* ─── Form Elements ────────────────────────────────────────── */
.auth-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-group label {
  font-size: 0.8rem;
  font-weight: 500;
  color: #94a3b8;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #e2e8f0;
  font-size: 0.9rem;
  font-family: inherit;
  outline: none;
  transition: border-color 0.3s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--accent);
}

.form-group textarea {
  resize: vertical;
  min-height: 80px;
}

.form-group select {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

/* ─── Alerts ───────────────────────────────────────────────── */
.alert {
  padding: 14px 20px;
  border-radius: var(--radius-md);
  font-size: 0.9rem;
  margin-bottom: 20px;
}

.alert--success {
  background: rgba(34, 197, 94, 0.1);
  border: 1px solid rgba(34, 197, 94, 0.25);
  color: #86efac;
}

.alert--error {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.25);
  color: #fca5a5;
}

.alert--warning {
  background: rgba(234, 179, 8, 0.1);
  border: 1px solid rgba(234, 179, 8, 0.25);
  color: #fde68a;
}

.alert--info {
  background: rgba(59, 130, 246, 0.1);
  border: 1px solid rgba(59, 130, 246, 0.25);
  color: #93c5fd;
}

/* ─── Tables ───────────────────────────────────────────────── */
.table-responsive {
  overflow-x: auto;
}

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}

.table th {
  text-align: left;
  padding: 12px 16px;
  font-weight: 600;
  color: var(--text-muted);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 1px solid var(--border);
}

.table td {
  padding: 12px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.03);
}

.table tr:hover td {
  background: rgba(255,255,255,0.02);
}

/* ─── Status Badges ────────────────────────────────────────── */
.status-badge {
  display: inline-flex;
  padding: 4px 10px;
  border-radius: 100px;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: capitalize;
}

.status-badge--completed,
.status-badge--success { background: rgba(34,197,94,0.12); color: #4ade80; }
.status-badge--pending,
.status-badge--info    { background: rgba(59,130,246,0.12); color: #60a5fa; }
.status-badge--failed,
.status-badge--error   { background: rgba(239,68,68,0.12); color: #f87171; }
.status-badge--refunded,
.status-badge--warning { background: rgba(234,179,8,0.12); color: #facc15; }
.status-badge--active  { background: rgba(34,197,94,0.12); color: #4ade80; }
.status-badge--admin   { background: rgba(99,102,241,0.12); color: #818cf8; }
.status-badge--user    { background: rgba(59,130,246,0.12); color: #60a5fa; }

/* ─── Products Grid ────────────────────────────────────────── */
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
}

.product-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: all 0.3s;
}

.product-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-hover);
  box-shadow: var(--shadow);
}

.product-card__badge {
  display: inline-flex;
  padding: 4px 12px;
  border-radius: 100px;
  background: rgba(99,102,241,0.08);
  color: #818cf8;
  font-size: 0.72rem;
  font-weight: 600;
  align-self: flex-start;
}

.product-card__title {
  font-size: 1.05rem;
  font-weight: 600;
}

.product-card__desc {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.5;
  flex: 1;
}

.product-card__meta {
  display: flex;
  gap: 16px;
  font-size: 0.75rem;
  color: var(--text-dim);
}

.product-card__footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

.product-card__price {
  font-weight: 700;
  font-size: 1.1rem;
}

.free-badge {
  background: rgba(34,197,94,0.1);
  color: #4ade80;
  padding: 4px 12px;
  border-radius: 100px;
  font-size: 0.75rem;
  font-weight: 600;
}

/* ─── Product Detail ───────────────────────────────────────── */
.product-detail {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 24px;
}

.product-detail__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  font-size: 0.85rem;
  color: #94a3b8;
  margin-bottom: 20px;
}

.product-detail__meta span {
  background: rgba(255,255,255,0.03);
  padding: 6px 14px;
  border-radius: 8px;
}

.product-detail__desc {
  color: #94a3b8;
  font-size: 0.9rem;
  line-height: 1.7;
}

/* ─── Filters Bar ──────────────────────────────────────────── */
.filters-bar {
  margin-bottom: 28px;
}

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

.search-box {
  flex: 1;
  min-width: 200px;
}

.search-box input {
  width: 100%;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  color: #e2e8f0;
  font-size: 0.9rem;
  outline: none;
  transition: border-color 0.3s;
}

.search-box input:focus {
  border-color: var(--accent);
}

.filters-form select {
  padding: 12px 36px 12px 16px;
  border-radius: var(--radius-sm);
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  color: #e2e8f0;
  font-size: 0.9rem;
  outline: none;
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
}

/* ─── Plans Grid ───────────────────────────────────────────── */
.plans-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}

.plan-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 32px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  position: relative;
  transition: all 0.3s;
}

.plan-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-hover);
  box-shadow: var(--shadow);
}

.plan-card--current {
  border-color: var(--accent);
  box-shadow: 0 0 30px rgba(99,102,241,0.1);
}

.plan-card__popular {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 4px 18px;
  border-radius: 100px;
  white-space: nowrap;
}

.plan-card__header {
  text-align: center;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}

.plan-card__name {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.plan-card__price {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 4px;
}

.plan-card__value {
  font-size: 2.2rem;
  font-weight: 800;
  background: linear-gradient(135deg, #818cf8, #a78bfa);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.plan-card__period {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.plan-card__desc {
  color: var(--text-muted);
  font-size: 0.82rem;
  margin-top: 8px;
}

.plan-card__features {
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: 1;
}

.plan-card__downloads {
  font-size: 0.9rem;
  padding: 8px 12px;
  background: rgba(99,102,241,0.06);
  border-radius: 8px;
  text-align: center;
}

.plan-card__feature {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.85rem;
  color: #94a3b8;
}

.plan-card__footer {
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

/* ─── Empty State ──────────────────────────────────────────── */
.empty-state {
  text-align: center;
  padding: 60px 20px;
}

.empty-state__icon {
  font-size: 3rem;
  margin-bottom: 16px;
}

.empty-state h3 {
  font-size: 1.2rem;
  margin-bottom: 8px;
}

.empty-state p {
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* ─── Profile Grid ─────────────────────────────────────────── */
.profile-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.history-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

/* ─── Admin Layout ─────────────────────────────────────────── */
.admin-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.admin-grid-3 {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 24px;
}

.admin-nav {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

/* ─── Admin Sidebar ─────────────────────────────────────────── */
.admin-layout {
  display: flex;
  min-height: calc(100vh - 80px);
}

.admin-wrapper {
  display: flex;
  min-height: calc(100vh - 80px);
}

.admin-sidebar {
  width: 240px;
  min-width: 240px;
  background: var(--bg-card);
  border-right: 1px solid var(--border);
  padding: 20px 0;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 80px;
  height: calc(100vh - 80px);
  overflow-y: auto;
  transition: width 0.3s, min-width 0.3s, transform 0.3s;
  z-index: 50;
}

.admin-sidebar.collapsed {
  width: 60px;
  min-width: 60px;
}

.admin-sidebar.collapsed .admin-sidebar__label,
.admin-sidebar.collapsed .admin-sidebar__title,
.admin-sidebar.collapsed .admin-sidebar__brand {
  display: none;
}

.admin-sidebar__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 16px 20px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 8px;
}

.admin-sidebar__logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none !important;
  color: var(--text) !important;
}

.admin-sidebar__brand {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.8rem;
  color: #fff;
  flex-shrink: 0;
}

.admin-sidebar__title strong {
  display: block;
  font-size: 0.9rem;
  line-height: 1.2;
}

.admin-sidebar__title span {
  font-size: 0.7rem;
  color: var(--text-muted);
}

.admin-sidebar__toggle {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 1.1rem;
  padding: 4px;
  border-radius: 6px;
  transition: background 0.2s;
}

.admin-sidebar__toggle:hover {
  background: rgba(255,255,255,0.05);
}

.admin-sidebar__nav {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 8px;
}

.admin-sidebar__link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  color: #94a3b8 !important;
  text-decoration: none !important;
  font-size: 0.85rem;
  font-weight: 500;
  transition: all 0.2s;
  white-space: nowrap;
  overflow: hidden;
}

.admin-sidebar__link:hover {
  background: rgba(255,255,255,0.04);
  color: #e2e8f0 !important;
}

.admin-sidebar__link.active {
  background: rgba(99,102,241,0.1);
  color: #818cf8 !important;
  font-weight: 600;
}

.admin-sidebar__link--danger:hover {
  color: #ef4444 !important;
  background: rgba(239,68,68,0.08);
}

.admin-sidebar__icon {
  font-size: 1.1rem;
  flex-shrink: 0;
  width: 24px;
  text-align: center;
}

.admin-sidebar__label {
  overflow: hidden;
  text-overflow: ellipsis;
}

.admin-sidebar__footer {
  padding: 8px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 2px;
}

/* ─── Admin Content ────────────────────────────────────────── */
.admin-content {
  flex: 1;
  padding: 24px 32px;
  min-width: 0;
  margin-left: 240px;
}

.admin-sidebar.collapsed ~ .admin-content {
  margin-left: 60px;
}

@media (max-width: 768px) {
  .admin-content {
    margin-left: 0 !important;
  }
}

/* ─── Mobile Admin Nav ─────────────────────────────────────── */
.admin-mobile-nav {
  display: none;
  margin-bottom: 16px;
}

.admin-mobile-nav__toggle {
  width: 100%;
  padding: 12px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 0.9rem;
  cursor: pointer;
  text-align: left;
}

.admin-mobile-nav__links {
  display: none;
  flex-direction: column;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  margin-top: 4px;
  overflow: hidden;
}

.admin-mobile-nav.open .admin-mobile-nav__links {
  display: flex;
}

.admin-mobile-nav__links a {
  padding: 10px 16px;
  color: #94a3b8 !important;
  text-decoration: none !important;
  font-size: 0.85rem;
  border-bottom: 1px solid rgba(255,255,255,0.03);
}

.admin-mobile-nav__links a:last-child {
  border-bottom: none;
}

.admin-mobile-nav__links a.active {
  color: #818cf8 !important;
  background: rgba(99,102,241,0.06);
}

.admin-mobile-nav__links a:hover {
  background: rgba(255,255,255,0.03);
}

/* ─── Admin Dashboard ──────────────────────────────────────── */
.dashboard-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  flex-wrap: wrap;
  gap: 12px;
}

.dashboard-header h1 {
  font-size: 1.5rem;
  font-weight: 700;
}

.dashboard-header p {
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-top: 4px;
}

.dashboard-charts {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 24px;
  margin-bottom: 32px;
}

.activity-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.activity-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid rgba(255,255,255,0.03);
}

.activity-item:last-child {
  border-bottom: none;
}

.activity-item__icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: rgba(99,102,241,0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.activity-item__info {
  flex: 1;
  min-width: 0;
}

.activity-item__text {
  font-size: 0.85rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.activity-item__time {
  font-size: 0.72rem;
  color: var(--text-dim);
  margin-top: 2px;
}

/* ─── Pagination ───────────────────────────────────────────── */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 24px 0;
}

.pagination__item {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 36px;
  padding: 0 10px;
  border-radius: var(--radius-sm);
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border);
  color: #94a3b8 !important;
  text-decoration: none !important;
  font-size: 0.82rem;
  font-weight: 500;
  transition: all 0.2s;
}

.pagination__item:hover {
  background: rgba(255,255,255,0.08);
  border-color: rgba(255,255,255,0.12);
  color: #e2e8f0 !important;
}

.pagination__item.active {
  background: rgba(99,102,241,0.15);
  border-color: var(--accent);
  color: #818cf8 !important;
  font-weight: 600;
}

.pagination__item--disabled {
  opacity: 0.3;
  pointer-events: none;
}

.pagination__info {
  font-size: 0.78rem;
  color: var(--text-dim);
  margin: 0 12px;
}

/* ─── Tabs ─────────────────────────────────────────────────── */
.tabs {
  display: flex;
  gap: 4px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 24px;
  overflow-x: auto;
}

.tab-link {
  padding: 10px 20px;
  color: #94a3b8 !important;
  text-decoration: none !important;
  font-size: 0.85rem;
  font-weight: 500;
  border-bottom: 2px solid transparent;
  transition: all 0.2s;
  white-space: nowrap;
}

.tab-link:hover {
  color: #e2e8f0 !important;
}

.tab-link.active {
  color: #818cf8 !important;
  border-bottom-color: var(--accent);
}

/* ─── Info Row ─────────────────────────────────────────────── */
.info-row {
  display: flex;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid rgba(255,255,255,0.03);
  font-size: 0.85rem;
}

.info-row:last-child {
  border-bottom: none;
}

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

.info-row__value {
  font-weight: 500;
  text-align: right;
}

/* ─── Progress Bar ─────────────────────────────────────────── */
.progress-bar {
  width: 100%;
  height: 8px;
  background: rgba(255,255,255,0.06);
  border-radius: 100px;
  overflow: hidden;
}

.progress-bar__fill {
  height: 100%;
  border-radius: 100px;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  transition: width 0.5s ease;
}

/* ─── Modal ────────────────────────────────────────────────── */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 999;
  background: rgba(0,0,0,0.7);
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(4px);
}

.modal-overlay.open {
  display: flex;
}

.modal-box {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 32px;
  width: 90%;
  max-width: 520px;
  border: 1px solid var(--border);
  max-height: 90vh;
  overflow-y: auto;
}

.modal-box h3 {
  font-size: 1.15rem;
  font-weight: 600;
  margin-bottom: 20px;
}

.modal-actions {
  display: flex;
  gap: 12px;
  margin-top: 20px;
}

/* ─── Tag / Chip ───────────────────────────────────────────── */
.chip {
  display: inline-flex;
  padding: 3px 10px;
  border-radius: 100px;
  background: rgba(255,255,255,0.04);
  font-size: 0.72rem;
  color: var(--text-muted);
}

.chip--accent {
  background: rgba(99,102,241,0.08);
  color: #818cf8;
}

/* ─── Responsive Admin ─────────────────────────────────────── */
@media (max-width: 1024px) {
  .dashboard-charts {
    grid-template-columns: 1fr;
  }

  .admin-grid-3 {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 768px) {
  .admin-sidebar {
    display: none;
  }

  .admin-mobile-nav {
    display: block;
  }

  .admin-layout {
    flex-direction: column;
  }

  .admin-content {
    padding: 16px;
  }

  .admin-grid-2,
  .admin-grid-3 {
    grid-template-columns: 1fr;
  }
}

/* ─── Footer ───────────────────────────────────────────────── */
.footer {
  padding: 40px 0;
  border-top: 1px solid var(--border);
  text-align: center;
  color: var(--text-dim);
  font-size: 0.85rem;
  margin-top: 60px;
}

.footer span { color: #818cf8; }

/* ─── Responsive ───────────────────────────────────────────── */
@media (max-width: 1023px) {
  .admin-grid-3 {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 768px) {
  .navbar__links {
    overflow: hidden;
    max-height: 0;
    opacity: 0;
    flex-direction: column;
    align-items: center;
    width: 100%;
    gap: 20px;
    padding: 0;
    transition: max-height 0.4s ease, opacity 0.3s ease, padding 0.3s ease;
  }

  .navbar__links.open {
    max-height: 500px !important;
    opacity: 1 !important;
    padding: 20px 0 !important;
  }

  .navbar__toggle { display: block; }

  .product-detail {
    grid-template-columns: 1fr;
  }

  .profile-grid,
  .history-grid,
  .admin-grid-2 {
    grid-template-columns: 1fr;
  }

  .admin-grid-3 {
    grid-template-columns: 1fr;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .plans-grid {
    grid-template-columns: 1fr;
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .filters-form {
    flex-direction: column;
  }

  .search-box {
    min-width: 100%;
  }
}

@media (max-width: 480px) {
  .stats-grid {
    grid-template-columns: 1fr;
  }

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