:root {
  --bg: #f4f6fb;
  --card: #ffffff;
  --text: #1f2a44;
  --muted: #5b6780;
  --primary: #0d6efd;
  --border: #dfe5f2;
}

* {
  box-sizing: border-box;
}

.admin-body,
body {
  margin: 0;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  color: var(--text);
  background: linear-gradient(135deg, #e9eef9 0%, #f8fbff 45%, #f6f8fc 100%);
}

.auth-bg {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 16px;
}

.auth-card {
  width: 100%;
  max-width: 420px;
}

.layout {
  max-width: 1200px;
}

main {
  margin-top: 100px;
  margin-bottom: 40px;
}

.header-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
  gap: 16px;
}

.header-brand {
  font-size: 18px;
  font-weight: 700;
}

.header-links .nav-link {
  color: #334155;
  font-weight: 600;
}

.header-links .nav-link:not(.active):not(.disabled):hover {
  background: #eef4ff;
  color: #0b57d0;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}

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

.crud-actions .btn {
  min-width: 170px;
}

.swal-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  text-align: left;
}

.swal-field-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.swal-field-full {
  grid-column: 1 / -1;
}

.swal-field-row label {
  margin: 0;
  font-size: 13px;
  color: var(--muted);
  font-weight: 600;
}

.swal-field-row .swal2-input,
.swal-field-row .swal2-select {
  margin: 0;
  width: 100%;
}

/* Dashboard Stat Cards */
.stat-card {
  border-radius: 12px;
  padding: 24px;
  color: white;
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
  border: none;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.stat-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.stat-card::before {
  content: "";
  position: absolute;
  top: -50%;
  right: -50%;
  width: 200px;
  height: 200px;
  border-radius: 50%;
  opacity: 0.1;
}

.stat-card-users {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.stat-card-applications {
  background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.stat-card-billings {
  background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

.stat-card-icon {
  font-size: 32px;
  margin-bottom: 12px;
  opacity: 0.8;
  display: flex;
  align-items: center;
  justify-content: flex-start;
}

.stat-card-icon i {
  width: 40px;
  height: 40px;
  stroke-width: 1.5;
}

.stat-card-label {
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  opacity: 0.9;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}

.stat-card-value {
  font-size: 36px;
  font-weight: 700;
  display: block;
}

.stat-card-subtitle {
  font-size: 12px;
  opacity: 0.8;
  margin-top: 8px;
}

/* Latest Users Table */
.table-container {
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

.table {
  margin-bottom: 0;
}

.table thead {
  background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
}

.table thead th {
  font-weight: 700;
  text-transform: uppercase;
  font-size: 11px;
  letter-spacing: 0.5px;
  padding: 16px;
  border: none;
  color: #2d3748;
}

.table tbody td {
  padding: 14px 16px;
  border-bottom: 1px solid #e2e8f0;
  color: #4a5568;
}

.table tbody tr {
  transition: background-color 0.2s ease;
}

.table tbody tr:hover {
  background-color: #f7fafc;
}

.table tbody tr:last-child td {
  border-bottom: none;
}

.user-name {
  font-weight: 600;
  color: #2d3748;
}

.user-email {
  color: #718096;
  font-size: 13px;
}

.table-header-section {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 2px solid #e2e8f0;
}

.table-header-section h5 {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  color: #2d3748;
}

@media (max-width: 900px) {
  .header-nav {
    flex-direction: column;
    align-items: flex-start;
  }

  .actions {
    width: 100%;
    justify-content: flex-end;
  }

  .crud-actions .btn {
    min-width: auto;
  }

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