:root {
  --bg-color: #0b0c10;
  --bg-darker: #050608;
  --card-bg: rgba(20, 22, 28, 0.65);
  --card-hover: rgba(26, 29, 36, 0.8);
  --border-color: rgba(255, 215, 0, 0.12);
  --border-focus: rgba(255, 215, 0, 0.4);
  --gold: #ffd700;
  --gold-hover: #ffe552;
  --gold-glow: rgba(255, 215, 0, 0.08);
  
  --text-main: #f1f3f7;
  --text-muted: #959dae;
  
  --blue: #3b82f6;
  --blue-bg: rgba(59, 130, 246, 0.15);
  --green: #10b981;
  --green-bg: rgba(16, 185, 129, 0.15);
  --yellow: #f59e0b;
  --yellow-bg: rgba(245, 158, 11, 0.15);
  --red: #ef4444;
  --red-bg: rgba(239, 68, 68, 0.15);
  --red-hover: #dc2626;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Outfit', sans-serif;
  background-color: var(--bg-color);
  background-image: radial-gradient(circle at 10% 20%, rgba(26, 28, 38, 0.8) 0%, var(--bg-color) 90%);
  color: var(--text-main);
  min-height: 100vh;
  padding: 30px;
  line-height: 1.5;
}

/* Wrapper & Layout */
.dashboard-wrapper {
  max-width: 1300px;
  margin: 0 auto;
}

/* Main Header */
.main-header {
  background: var(--card-bg);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 20px 30px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3), 0 0 40px var(--gold-glow);
}

.brand-section {
  display: flex;
  align-items: center;
  gap: 15px;
}

.brand-section h2 {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: 0.5px;
  background: linear-gradient(135deg, #fff 0%, var(--gold) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.brand-section p {
  font-size: 12px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 600;
}

.logo {
  width: 44px;
  height: 44px;
  background: linear-gradient(135deg, var(--gold) 0%, #b39700 100%);
  border-radius: 10px;
  display: flex;
  justify-content: center;
  align-items: center;
  box-shadow: 0 5px 15px rgba(255, 215, 0, 0.15);
}

.logo svg {
  width: 22px;
  height: 22px;
  fill: #000;
}

.user-control {
  display: flex;
  align-items: center;
  gap: 20px;
  font-size: 14px;
  color: var(--text-muted);
}

.user-control strong {
  color: #fff;
}

.btn-logout {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: rgba(255, 77, 77, 0.08);
  border: 1px solid rgba(255, 77, 77, 0.2);
  border-radius: 8px;
  color: #ff4d4d;
  text-decoration: none;
  font-weight: 600;
  font-size: 13px;
  transition: all 0.3s ease;
}

.btn-logout:hover {
  background: #ff4d4d;
  color: #fff;
  box-shadow: 0 4px 12px rgba(255, 77, 77, 0.2);
}

/* Stats Cards Grid */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
  margin-bottom: 30px;
}

.stat-card {
  background: var(--card-bg);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.stat-info h3 {
  font-size: 13px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 600;
  margin-bottom: 8px;
}

.stat-number {
  font-size: 32px;
  font-weight: 800;
  color: #fff;
}

.stat-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.bg-blue { background: var(--blue-bg); color: var(--blue); }
.bg-green { background: var(--green-bg); color: var(--green); }
.bg-yellow { background: var(--yellow-bg); color: var(--yellow); }
.bg-red { background: var(--red-bg); color: var(--red); }

.text-green { color: var(--green); }
.text-yellow { color: var(--yellow); }
.text-red { color: var(--red); }

/* Dashboard Content Grid */
.dashboard-main {
  display: grid;
  grid-template-columns: 1fr;
  gap: 30px;
}

@media (min-width: 1024px) {
  .dashboard-main {
    grid-template-columns: 350px 1fr;
    align-items: start;
  }
}

/* Base Card Style */
.card {
  background: var(--card-bg);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 10px 25px rgba(0,0,0,0.2);
}

.card-header {
  padding: 20px 25px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.card-header h3 {
  font-size: 16px;
  font-weight: 700;
  color: #fff;
}

/* Generator Form Styling */
.generator-form {
  padding: 25px;
}

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

label {
  display: block;
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 6px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

select, input {
  width: 100%;
  padding: 11px 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  color: #fff;
  font-family: inherit;
  font-size: 14px;
  transition: all 0.3s ease;
}

select:focus, input:focus {
  outline: none;
  border-color: var(--gold);
  background: rgba(255, 255, 255, 0.08);
}

select option {
  background-color: var(--bg-darker);
  color: #fff;
}

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

.btn-primary {
  width: 100%;
  padding: 12px;
  background: linear-gradient(135deg, var(--gold) 0%, #cca300 100%);
  border: none;
  border-radius: 8px;
  color: #000;
  font-family: inherit;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(255, 215, 0, 0.12);
  transition: all 0.3s ease;
}

.btn-primary:hover {
  background: linear-gradient(135deg, var(--gold-hover) 0%, var(--gold) 100%);
  box-shadow: 0 6px 18px rgba(255, 215, 0, 0.2);
  transform: translateY(-1px);
}

/* Generation Output Result */
.generation-result {
  padding: 0 25px 25px;
  border-top: 1px dashed rgba(255, 255, 255, 0.06);
  margin-top: 5px;
  padding-top: 20px;
}

.generation-result h4 {
  font-size: 14px;
  color: #fff;
  margin-bottom: 4px;
}

.generation-result .desc {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.keys-box {
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  padding: 12px;
  max-height: 180px;
  overflow-y: auto;
  font-family: monospace;
  font-size: 13px;
  color: var(--gold);
  line-height: 1.8;
  white-space: pre-wrap;
  margin-bottom: 12px;
}

.btn-copy-all {
  width: 100%;
  padding: 10px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  color: #fff;
  font-family: inherit;
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn-copy-all:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
}

/* Table Card list-header & filters */
.list-header {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

@media (min-width: 768px) {
  .list-header {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }
}

.filter-form {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.filter-form select {
  width: 130px;
  padding: 8px 12px;
  font-size: 13px;
}

.search-input-wrapper {
  position: relative;
  width: 220px;
}

.search-input-wrapper input {
  padding: 8px 35px 8px 12px;
  font-size: 13px;
  border-radius: 8px;
}

.btn-search {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  transition: color 0.3s ease;
}

.btn-search:hover {
  color: #fff;
}

.btn-clear {
  padding: 8px 12px;
  font-size: 13px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 8px;
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s ease;
}

.btn-clear:hover {
  background: rgba(255,255,255,0.08);
  color: #fff;
}

/* Licenses Table */
.table-responsive {
  width: 100%;
  overflow-x: auto;
}

.licenses-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 14px;
}

.licenses-table th, 
.licenses-table td {
  padding: 16px 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  vertical-align: middle;
}

.licenses-table th {
  background-color: rgba(0, 0, 0, 0.15);
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

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

.licenses-table tbody tr:hover {
  background-color: rgba(255, 255, 255, 0.015);
}

.key-column {
  display: flex;
  align-items: center;
  gap: 10px;
}

.license-code {
  font-family: monospace;
  font-size: 13px;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  padding: 4px 8px;
  border-radius: 6px;
  color: var(--text-main);
  letter-spacing: 0.3px;
}

.btn-copy {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
}

.btn-copy:hover {
  color: var(--gold);
  transform: scale(1.1);
}

.email-cell {
  max-width: 150px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.device-cell {
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.device-tag {
  font-size: 11px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.08);
  padding: 2px 6px;
  border-radius: 4px;
  font-family: monospace;
  color: #fff;
}

.none {
  color: rgba(255,255,255,0.25);
  font-style: italic;
}

.gold-text {
  color: var(--gold);
  font-weight: 600;
}

/* Badges */
.badge {
  display: inline-block;
  padding: 3px 8px;
  font-size: 11px;
  font-weight: 700;
  border-radius: 6px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.badge-gold {
  background: rgba(255, 215, 0, 0.12);
  border: 1px solid rgba(255, 215, 0, 0.25);
  color: var(--gold);
}

.badge-normal {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #fff;
}

.badge-status {
  display: inline-block;
  padding: 4px 10px;
  font-size: 11px;
  font-weight: 700;
  border-radius: 30px;
  text-align: center;
}

.bg-active {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.25);
}

.bg-inactive {
  background: rgba(245, 158, 11, 0.12);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.2);
}

.bg-revoked {
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.25);
}

.bg-expired {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-muted);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Actions Row Buttons */
.actions-column {
  text-align: right;
}

.actions-btn-group {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.btn-action {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  padding: 6px 12px;
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-main);
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-action-unbind:hover {
  background: var(--blue-bg);
  border-color: rgba(59, 130, 246, 0.4);
  color: #60a5fa;
}

.btn-action-revoke:hover {
  background: var(--red-bg);
  border-color: rgba(239, 68, 68, 0.4);
  color: #f87171;
}

.btn-action-reactivate:hover {
  background: var(--green-bg);
  border-color: rgba(16, 185, 129, 0.4);
  color: #34d399;
}

.btn-action-reset:hover {
  background: rgba(245, 158, 11, 0.12);
  border-color: rgba(245, 158, 11, 0.4);
  color: #fbbf24;
}

.btn-action-delete:hover {
  background: var(--red);
  border-color: var(--red-hover);
  color: #000;
  font-weight: 700;
}

.empty-state {
  text-align: center;
  padding: 40px !important;
  color: var(--text-muted);
  font-style: italic;
}
