/* ============================================================
   RESELLER PANEL — Design System
   Dark premium theme with glassmorphism + micro-animations
   ============================================================ */

/* ---- Google Fonts ---- */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

/* ---- CSS Variables ---- */
:root {
  /* Backgrounds */
  --bg-base:      #0d0f14;
  --bg-sidebar:   #090b0f;
  --bg-card:      rgba(255,255,255,0.04);
  --bg-card-hover:rgba(255,255,255,0.07);
  --bg-input:     rgba(255,255,255,0.06);
  --bg-table-row: rgba(255,255,255,0.02);
  --bg-table-alt: rgba(255,255,255,0.04);

  /* Borders */
  --border:       rgba(255,255,255,0.08);
  --border-focus: rgba(59,130,246,0.6);

  /* Accent */
  --accent-blue:  #3b82f6;
  --accent-purple:#8b5cf6;
  --accent-grad:  linear-gradient(135deg, #3b82f6, #8b5cf6);
  --accent-glow:  rgba(59,130,246,0.3);

  /* Text */
  --text-primary:   #f1f5f9;
  --text-secondary: #94a3b8;
  --text-muted:     #475569;

  /* Status */
  --green:        #22c55e;
  --green-bg:     rgba(34,197,94,0.12);
  --red:          #ef4444;
  --red-bg:       rgba(239,68,68,0.12);
  --yellow:       #f59e0b;
  --yellow-bg:    rgba(245,158,11,0.12);
  --grey:         #64748b;
  --grey-bg:      rgba(100,116,139,0.12);

  /* Sizing */
  --sidebar-w:    240px;
  --radius:       12px;
  --radius-sm:    8px;
  --radius-pill:  999px;

  /* Transitions */
  --ease:         cubic-bezier(0.4, 0, 0.2, 1);
  --speed:        0.2s;
}

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

html, body {
  height: 100%;
  font-family: 'Inter', -apple-system, sans-serif;
  background: var(--bg-base);
  color: var(--text-primary);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
button { cursor: pointer; font-family: inherit; }
input, select, textarea { font-family: inherit; }

/* ============================================================
   LOGIN PAGE
   ============================================================ */

#login-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  background:
    radial-gradient(ellipse 80% 60% at 50% 0%, rgba(59,130,246,0.12) 0%, transparent 60%),
    radial-gradient(ellipse 60% 40% at 80% 100%, rgba(139,92,246,0.1) 0%, transparent 60%),
    var(--bg-base);
  padding: 20px;
}

.login-card {
  width: 100%;
  max-width: 400px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 48px 40px;
  backdrop-filter: blur(20px);
  box-shadow: 0 40px 80px rgba(0,0,0,0.5);
  animation: fadeUp 0.5s var(--ease) both;
}

.login-logo {
  text-align: center;
  margin-bottom: 36px;
}

.login-logo .logo-icon {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  background: var(--accent-grad);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  margin-bottom: 16px;
  box-shadow: 0 8px 32px var(--accent-glow);
}

.login-logo h1 {
  font-size: 22px;
  font-weight: 700;
  background: var(--accent-grad);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.login-logo p {
  color: var(--text-secondary);
  font-size: 13px;
  margin-top: 4px;
}

.form-group {
  margin-bottom: 16px;
}

.form-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 8px;
}

.form-input {
  width: 100%;
  padding: 12px 16px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 14px;
  transition: border-color var(--speed) var(--ease), box-shadow var(--speed) var(--ease);
  outline: none;
}

.form-input:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(59,130,246,0.12);
}

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

.btn-primary {
  width: 100%;
  padding: 13px 24px;
  background: var(--accent-grad);
  border: none;
  border-radius: var(--radius-sm);
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.01em;
  margin-top: 8px;
  transition: opacity var(--speed) var(--ease), transform var(--speed) var(--ease), box-shadow var(--speed) var(--ease);
  box-shadow: 0 4px 20px rgba(59,130,246,0.35);
}

.btn-primary:hover:not(:disabled) {
  opacity: 0.9;
  transform: translateY(-1px);
  box-shadow: 0 8px 28px rgba(59,130,246,0.45);
}

.btn-primary:active:not(:disabled) { transform: translateY(0); }

.btn-primary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.login-error {
  display: none;
  margin-top: 14px;
  padding: 10px 14px;
  background: var(--red-bg);
  border: 1px solid rgba(239,68,68,0.3);
  border-radius: var(--radius-sm);
  color: var(--red);
  font-size: 13px;
  text-align: center;
  animation: shake 0.3s ease;
}

.login-error.show { display: block; }

/* ============================================================
   DASHBOARD LAYOUT (after login)
   ============================================================ */

#app {
  display: none;
  height: 100vh;
  overflow: hidden;
}

#app.active {
  display: flex;
}

/* ---- Sidebar ---- */
.sidebar {
  width: var(--sidebar-w);
  min-width: var(--sidebar-w);
  background: var(--bg-sidebar);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  padding: 24px 0;
  position: relative;
  z-index: 10;
}

.sidebar::after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 1px;
  height: 100%;
  background: linear-gradient(to bottom, transparent, rgba(59,130,246,0.3), transparent);
}

.sidebar-logo {
  padding: 0 20px 28px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 16px;
}

.sidebar-logo .logo-mark {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--accent-grad);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  margin-bottom: 10px;
  box-shadow: 0 4px 16px var(--accent-glow);
}

.sidebar-logo .panel-name {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
}

.sidebar-logo .panel-sub {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
}

.sidebar-nav {
  flex: 1;
  padding: 0 12px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background var(--speed) var(--ease), color var(--speed) var(--ease);
  color: var(--text-secondary);
  font-size: 13.5px;
  font-weight: 500;
  user-select: none;
  position: relative;
}

.nav-item .nav-icon {
  width: 20px;
  text-align: center;
  font-size: 16px;
  flex-shrink: 0;
}

.nav-item:hover {
  background: var(--bg-card);
  color: var(--text-primary);
}

.nav-item.active {
  background: rgba(59,130,246,0.12);
  color: var(--accent-blue);
}

.nav-item.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 60%;
  background: var(--accent-grad);
  border-radius: 0 var(--radius-pill) var(--radius-pill) 0;
}

.sidebar-user {
  padding: 16px 20px 0;
  border-top: 1px solid var(--border);
  margin-top: auto;
}

.user-info {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.user-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--accent-grad);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
}

.user-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-credit {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 1px;
}

.btn-logout {
  width: 100%;
  padding: 9px 12px;
  background: rgba(239,68,68,0.1);
  border: 1px solid rgba(239,68,68,0.2);
  border-radius: var(--radius-sm);
  color: var(--red);
  font-size: 12.5px;
  font-weight: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: background var(--speed) var(--ease), border-color var(--speed) var(--ease);
}

.btn-logout:hover {
  background: rgba(239,68,68,0.18);
  border-color: rgba(239,68,68,0.4);
}

/* ---- Main content area ---- */
.main {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--bg-base);
}

.topbar {
  padding: 20px 28px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
  background: rgba(9,11,15,0.6);
  backdrop-filter: blur(10px);
}

.topbar-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
}

.topbar-sub {
  font-size: 12.5px;
  color: var(--text-muted);
  margin-top: 2px;
}

.topbar-actions {
  display: flex;
  gap: 10px;
  align-items: center;
}

.btn-refresh {
  padding: 8px 14px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 12.5px;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all var(--speed) var(--ease);
}

.btn-refresh:hover {
  background: var(--bg-card-hover);
  color: var(--text-primary);
}

.content {
  flex: 1;
  overflow-y: auto;
  padding: 28px;
}

/* Custom scrollbar */
.content::-webkit-scrollbar { width: 6px; }
.content::-webkit-scrollbar-track { background: transparent; }
.content::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }

/* Tab pages */
.tab-page { display: none; animation: fadeIn 0.3s var(--ease) both; }
.tab-page.active { display: block; }

/* ============================================================
   STAT CARDS (Dashboard overview)
   ============================================================ */

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 28px;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 20px;
  transition: transform var(--speed) var(--ease), border-color var(--speed) var(--ease), box-shadow var(--speed) var(--ease);
  position: relative;
  overflow: hidden;
}

.stat-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--accent-grad);
  opacity: 0;
  transition: opacity var(--speed) var(--ease);
}

.stat-card:hover {
  transform: translateY(-2px);
  border-color: rgba(59,130,246,0.2);
  box-shadow: 0 8px 24px rgba(0,0,0,0.3);
}

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

.stat-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  margin-bottom: 14px;
}

.stat-icon.blue   { background: rgba(59,130,246,0.15);  color: var(--accent-blue); }
.stat-icon.purple { background: rgba(139,92,246,0.15);  color: var(--accent-purple); }
.stat-icon.green  { background: var(--green-bg);         color: var(--green); }
.stat-icon.red    { background: var(--red-bg);           color: var(--red); }
.stat-icon.yellow { background: var(--yellow-bg);        color: var(--yellow); }

.stat-value {
  font-size: 28px;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1;
  margin-bottom: 6px;
}

.stat-label {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* ============================================================
   DATA TABLES
   ============================================================ */

.table-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.table-header {
  padding: 18px 20px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.table-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
}

.table-count {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
}

.table-search {
  padding: 8px 14px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 13px;
  outline: none;
  width: 220px;
  transition: border-color var(--speed) var(--ease);
}

.table-search:focus { border-color: var(--border-focus); }
.table-search::placeholder { color: var(--text-muted); }

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
}

thead th {
  padding: 11px 16px;
  text-align: left;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  background: rgba(0,0,0,0.15);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

tbody tr {
  border-bottom: 1px solid rgba(255,255,255,0.04);
  transition: background var(--speed) var(--ease);
}

tbody tr:last-child { border-bottom: none; }
tbody tr:hover { background: var(--bg-table-alt); }

tbody td {
  padding: 12px 16px;
  font-size: 13px;
  color: var(--text-secondary);
  white-space: nowrap;
}

tbody td.primary { color: var(--text-primary); font-weight: 500; }

/* ---- Badges ---- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.badge-green  { background: var(--green-bg);  color: var(--green);  border: 1px solid rgba(34,197,94,0.2); }
.badge-red    { background: var(--red-bg);    color: var(--red);    border: 1px solid rgba(239,68,68,0.2); }
.badge-yellow { background: var(--yellow-bg); color: var(--yellow); border: 1px solid rgba(245,158,11,0.2); }
.badge-grey   { background: var(--grey-bg);   color: var(--grey);   border: 1px solid rgba(100,116,139,0.2); }
.badge-blue   { background: rgba(59,130,246,0.12); color: var(--accent-blue); border: 1px solid rgba(59,130,246,0.2); }

/* ---- Pagination ---- */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 16px 20px;
  border-top: 1px solid var(--border);
}

.pagination-info {
  font-size: 12px;
  color: var(--text-muted);
  margin-right: auto;
}

.btn-page {
  padding: 6px 14px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 12.5px;
  font-weight: 500;
  transition: all var(--speed) var(--ease);
}

.btn-page:hover:not(:disabled) {
  background: var(--bg-card-hover);
  color: var(--text-primary);
  border-color: rgba(59,130,246,0.3);
}

.btn-page:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

/* ============================================================
   BILLING PAGE
   ============================================================ */

.billing-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 24px;
}

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

.credit-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  position: relative;
  overflow: hidden;
}

.credit-card::before {
  content: '';
  position: absolute;
  top: -40px;
  right: -40px;
  width: 160px;
  height: 160px;
  border-radius: 50%;
  background: var(--accent-grad);
  opacity: 0.07;
}

.credit-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 10px;
}

.credit-amount {
  font-size: 48px;
  font-weight: 800;
  background: var(--accent-grad);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
  margin-bottom: 8px;
}

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

/* ============================================================
   LOADING STATES
   ============================================================ */

.loading-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  gap: 14px;
}

.spinner {
  width: 36px;
  height: 36px;
  border: 3px solid var(--border);
  border-top-color: var(--accent-blue);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.spinner-sm {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255,255,255,0.2);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  display: inline-block;
  margin-right: 6px;
  vertical-align: middle;
}

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

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  color: var(--text-muted);
  gap: 10px;
}

.empty-icon { font-size: 40px; opacity: 0.4; }
.empty-text { font-size: 13px; }

/* ============================================================
   CONNECTION DOT (live indicator)
   ============================================================ */

.live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
  display: inline-block;
  box-shadow: 0 0 0 0 rgba(34,197,94,0.6);
  animation: pulse 2s infinite;
}

/* ============================================================
   SECTION HEADINGS
   ============================================================ */

.section-heading {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 14px;
  margin-top: 6px;
}

/* ============================================================
   TOAST NOTIFICATIONS
   ============================================================ */

#toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 9999;
}

.toast {
  padding: 12px 18px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 500;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.4);
  animation: slideIn 0.3s var(--ease) both;
  min-width: 240px;
}

.toast.success { background: rgba(34,197,94,0.9); }
.toast.error   { background: rgba(239,68,68,0.9); }
.toast.info    { background: rgba(59,130,246,0.9); }
.toast.out     { animation: slideOut 0.3s var(--ease) both; }

/* ============================================================
   ANIMATIONS
   ============================================================ */

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

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

@keyframes spin {
  to { transform: rotate(360deg); }
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20%  { transform: translateX(-6px); }
  40%  { transform: translateX(6px); }
  60%  { transform: translateX(-4px); }
  80%  { transform: translateX(4px); }
}

@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 rgba(34,197,94,0.6); }
  70%  { box-shadow: 0 0 0 8px rgba(34,197,94,0); }
  100% { box-shadow: 0 0 0 0 rgba(34,197,94,0); }
}

@keyframes slideIn {
  from { opacity: 0; transform: translateX(20px); }
  to   { opacity: 1; transform: translateX(0); }
}

@keyframes slideOut {
  from { opacity: 1; transform: translateX(0); }
  to   { opacity: 0; transform: translateX(20px); }
}

/* ============================================================
   CODES FILTERS (search + period select + status pills)
   ============================================================ */

.codes-filters {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.filter-select {
  padding: 8px 12px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 13px;
  font-family: 'Inter', sans-serif;
  outline: none;
  cursor: pointer;
  transition: border-color var(--speed) var(--ease);
  min-width: 140px;
  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='%2364748b' stroke-width='2.5'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  padding-right: 30px;
}

.filter-select:focus {
  border-color: var(--border-focus);
}

.filter-select option {
  background: #1a1f2e;
  color: var(--text-primary);
}

.filter-pills {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}

.filter-pill {
  padding: 6px 12px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 500;
  font-family: 'Inter', sans-serif;
  cursor: pointer;
  transition: all var(--speed) var(--ease);
  white-space: nowrap;
}

.filter-pill:hover {
  background: var(--bg-card-hover);
  color: var(--text-secondary);
  border-color: rgba(255,255,255,0.15);
}

/* Active states per pill */
.filter-pill.active[data-status=""]         { background: rgba(59,130,246,0.15);  color: var(--accent-blue);   border-color: rgba(59,130,246,0.4); }
.filter-pill.active[data-status="available"]{ background: rgba(100,116,139,0.15); color: #94a3b8;              border-color: rgba(100,116,139,0.4); }
.filter-pill.active[data-status="online"]   { background: rgba(34,197,94,0.15);   color: var(--green);         border-color: rgba(34,197,94,0.4); }
.filter-pill.active[data-status="inuse"]    { background: rgba(59,130,246,0.12);  color: var(--accent-blue);   border-color: rgba(59,130,246,0.4); }
.filter-pill.active[data-status="expired"]  { background: rgba(239,68,68,0.15);   color: var(--red);           border-color: rgba(239,68,68,0.4); }



.action-btns {
  display: flex;
  align-items: center;
  gap: 3px;
}

.action-btn {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: transparent;
  color: rgba(255, 255, 255, 0.75);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--speed) var(--ease);
  position: relative;
  flex-shrink: 0;
}

.action-btn svg {
  pointer-events: none;
}

.action-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 3px 10px rgba(0,0,0,0.35);
}

/* Each button gets its own accent color on hover */
.action-btn.edit:hover {
  color: var(--accent-blue);
  background: rgba(59,130,246,0.12);
  border-color: rgba(59,130,246,0.35);
}
.action-btn.reset:hover {
  color: var(--accent-purple);
  background: rgba(139,92,246,0.12);
  border-color: rgba(139,92,246,0.35);
}
.action-btn.disable:hover {
  color: var(--yellow);
  background: rgba(245,158,11,0.12);
  border-color: rgba(245,158,11,0.35);
}
.action-btn.renew:hover {
  color: var(--green);
  background: rgba(34,197,94,0.12);
  border-color: rgba(34,197,94,0.35);
}
.action-btn.delete:hover {
  color: var(--red);
  background: rgba(239,68,68,0.12);
  border-color: rgba(239,68,68,0.35);
}

/* CSS Tooltip */
.action-btn[title]::after {
  content: attr(title);
  position: absolute;
  bottom: calc(100% + 7px);
  left: 50%;
  transform: translateX(-50%) scale(0.9);
  background: #1e2433;
  color: var(--text-primary);
  font-size: 11px;
  font-family: 'Inter', sans-serif;
  font-weight: 500;
  white-space: nowrap;
  padding: 5px 9px;
  border-radius: 6px;
  border: 1px solid var(--border);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.15s ease, transform 0.15s ease;
  z-index: 200;
  box-shadow: 0 4px 12px rgba(0,0,0,0.4);
}

.action-btn[title]:hover::after {
  opacity: 1;
  transform: translateX(-50%) scale(1);
}


/* ============================================================
   MOBILE (basic responsiveness)
   ============================================================ */

@media (max-width: 768px) {
  :root { --sidebar-w: 60px; }
  .sidebar-logo, .nav-item span, .panel-name, .panel-sub,
  .user-name, .user-credit, .btn-logout span { display: none; }
  .sidebar-logo { padding: 0 10px 20px; }
  .sidebar-logo .logo-mark { margin: 0 auto; }
  .nav-item { justify-content: center; padding: 12px; }
  .nav-item .nav-icon { margin: 0; font-size: 18px; }
  .sidebar-user { padding: 12px; }
  .user-avatar { margin: 0 auto; }
  .user-info { justify-content: center; }
  .content { padding: 16px; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
}
