/* ─── RESET & BASE ─────────────────────────────────────── */
* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: #0f1117;
  color: #e1e4ea;
  min-height: 100vh;
}

a { color: #6c8cff; text-decoration: none; }
a:hover { color: #8da6ff; text-decoration: underline; }

/* ─── LOGIN PAGE ───────────────────────────────────────── */
.login-container {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  background: linear-gradient(135deg, #0f1117 0%, #1a1d2e 100%);
}

.login-box {
  background: #1a1d2e;
  padding: 40px;
  border-radius: 12px;
  width: 400px;
  max-width: 90%;
  border: 1px solid #2a2d3e;
}

.login-box h1 {
  text-align: center;
  margin-bottom: 8px;
  color: #fff;
  font-size: 24px;
}

.login-box .subtitle {
  text-align: center;
  color: #888;
  margin-bottom: 30px;
  font-size: 14px;
}

.login-box .error {
  background: #3d1a1a;
  color: #ff6b6b;
  padding: 10px 14px;
  border-radius: 6px;
  margin-bottom: 20px;
  font-size: 14px;
  border: 1px solid #5a2a2a;
}

/* ─── LAYOUT ───────────────────────────────────────────── */
.admin-layout {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  width: 240px;
  background: #12141e;
  border-right: 1px solid #2a2d3e;
  padding: 20px 0;
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  overflow-y: auto;
}

.sidebar .logo {
  padding: 0 20px 20px;
  border-bottom: 1px solid #2a2d3e;
  margin-bottom: 10px;
}

.sidebar .logo h2 {
  color: #fff;
  font-size: 18px;
}

.sidebar .logo span {
  color: #6c8cff;
  font-size: 12px;
}

.sidebar nav a {
  display: block;
  padding: 10px 20px;
  color: #888;
  font-size: 14px;
  border-left: 3px solid transparent;
  transition: all 0.15s;
}

.sidebar nav a:hover {
  background: #1a1d2e;
  color: #e1e4ea;
  text-decoration: none;
}

.sidebar nav a.active {
  color: #6c8cff;
  background: rgba(108, 140, 255, 0.08);
  border-left-color: #6c8cff;
}

.sidebar .sidebar-footer {
  padding: 20px;
  border-top: 1px solid #2a2d3e;
  margin-top: 20px;
}

.sidebar .sidebar-footer .admin-name {
  color: #aaa;
  font-size: 13px;
  margin-bottom: 8px;
}

.sidebar .sidebar-footer a {
  color: #ff6b6b;
  font-size: 13px;
}

.main-content {
  margin-left: 240px;
  flex: 1;
  padding: 30px;
  min-height: 100vh;
}

.page-header {
  margin-bottom: 30px;
}

.page-header h1 {
  color: #fff;
  font-size: 24px;
  font-weight: 600;
}

.page-header p {
  color: #888;
  font-size: 14px;
  margin-top: 4px;
}

/* ─── STAT CARDS ───────────────────────────────────────── */
.stat-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 16px;
  margin-bottom: 30px;
}

.stat-card {
  background: #1a1d2e;
  border: 1px solid #2a2d3e;
  border-radius: 10px;
  padding: 20px;
}

.stat-card .label {
  font-size: 12px;
  color: #888;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 6px;
}

.stat-card .value {
  font-size: 28px;
  font-weight: 700;
  color: #fff;
}

.stat-card.pending .value { color: #fbbf24; }
.stat-card.active .value { color: #34d399; }
.stat-card.expired .value { color: #f87171; }
.stat-card.suspended .value { color: #fb923c; }

/* ─── TABLES ───────────────────────────────────────────── */
.table-container {
  background: #1a1d2e;
  border: 1px solid #2a2d3e;
  border-radius: 10px;
  overflow: hidden;
}

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

thead th {
  background: #12141e;
  padding: 12px 16px;
  text-align: left;
  font-size: 12px;
  font-weight: 600;
  color: #888;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 1px solid #2a2d3e;
}

tbody td {
  padding: 12px 16px;
  font-size: 14px;
  border-bottom: 1px solid #1f2233;
}

tbody tr:hover {
  background: rgba(108, 140, 255, 0.03);
}

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

/* ─── BADGES ───────────────────────────────────────────── */
.badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
}

.badge-pending { background: rgba(251, 191, 36, 0.15); color: #fbbf24; }
.badge-active { background: rgba(52, 211, 153, 0.15); color: #34d399; }
.badge-expired { background: rgba(248, 113, 113, 0.15); color: #f87171; }
.badge-suspended { background: rgba(251, 146, 60, 0.15); color: #fb923c; }
.badge-rejected { background: rgba(248, 113, 113, 0.15); color: #f87171; }

.badge-starter { background: rgba(148, 163, 184, 0.15); color: #94a3b8; }
.badge-pro { background: rgba(108, 140, 255, 0.15); color: #6c8cff; }
.badge-enterprise { background: rgba(168, 85, 247, 0.15); color: #a855f7; }
.badge-all { background: rgba(52, 211, 153, 0.15); color: #34d399; }

/* ─── FORMS ────────────────────────────────────────────── */
.form-group {
  margin-bottom: 18px;
}

.form-group label {
  display: block;
  font-size: 13px;
  color: #aaa;
  margin-bottom: 6px;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 10px 14px;
  background: #0f1117;
  border: 1px solid #2a2d3e;
  border-radius: 6px;
  color: #e1e4ea;
  font-size: 14px;
  outline: none;
  transition: border 0.15s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: #6c8cff;
}

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

/* ─── BUTTONS ──────────────────────────────────────────── */
.btn {
  display: inline-block;
  padding: 8px 18px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all 0.15s;
  text-align: center;
}

.btn-primary { background: #6c8cff; color: #fff; }
.btn-primary:hover { background: #5a7aef; }

.btn-success { background: #34d399; color: #0f1117; }
.btn-success:hover { background: #2bc48a; }

.btn-danger { background: #f87171; color: #fff; }
.btn-danger:hover { background: #e65c5c; }

.btn-warning { background: #fbbf24; color: #0f1117; }
.btn-warning:hover { background: #e5ac1e; }

.btn-secondary { background: #2a2d3e; color: #e1e4ea; }
.btn-secondary:hover { background: #353850; }

.btn-sm { padding: 5px 12px; font-size: 12px; }

/* ─── FILTERS ──────────────────────────────────────────── */
.filters-bar {
  display: flex;
  gap: 12px;
  margin-bottom: 20px;
  flex-wrap: wrap;
  align-items: flex-end;
}

.filters-bar .form-group {
  margin-bottom: 0;
  flex: 1;
  min-width: 150px;
}

.filters-bar .btn {
  align-self: flex-end;
  height: 40px;
}

/* ─── DETAIL SECTION ───────────────────────────────────── */
.detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 30px;
}

.detail-card {
  background: #1a1d2e;
  border: 1px solid #2a2d3e;
  border-radius: 10px;
  padding: 20px;
}

.detail-card h3 {
  color: #fff;
  font-size: 16px;
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid #2a2d3e;
}

.detail-row {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid #1f2233;
}

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

.detail-row .label {
  color: #888;
  font-size: 13px;
}

.detail-row .value {
  color: #e1e4ea;
  font-size: 13px;
  text-align: right;
  word-break: break-all;
  max-width: 60%;
}

/* ─── ACTION BAR ───────────────────────────────────────── */
.action-bar {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

/* ─── PROOF VIEWER ─────────────────────────────────────── */
.proof-text {
  background: #0f1117;
  border: 1px solid #2a2d3e;
  border-radius: 6px;
  padding: 12px;
  font-size: 13px;
  color: #e1e4ea;
  white-space: pre-wrap;
  word-break: break-all;
}

.proof-image {
  max-width: 100%;
  max-height: 300px;
  border-radius: 6px;
  border: 1px solid #2a2d3e;
}

/* ─── MODAL / INLINE FORMS ─────────────────────────────── */
.inline-form {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.inline-form select,
.inline-form input {
  padding: 6px 10px;
  background: #0f1117;
  border: 1px solid #2a2d3e;
  border-radius: 4px;
  color: #e1e4ea;
  font-size: 13px;
}

/* ─── APPROVE FORM CARD ───────────────────────────────── */
.approve-card {
  background: #12141e;
  border: 1px solid #2a2d3e;
  border-radius: 8px;
  padding: 16px;
  margin-top: 12px;
}

.approve-card .row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: flex-end;
}

.approve-card .row .form-group {
  flex: 1;
  min-width: 120px;
}

/* ─── EMPTY STATE ──────────────────────────────────────── */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: #888;
}

.empty-state h3 {
  font-size: 18px;
  color: #aaa;
  margin-bottom: 8px;
}

/* ─── RESPONSIVE ───────────────────────────────────────── */
@media (max-width: 768px) {
  .sidebar { display: none; }
  .main-content { margin-left: 0; }
  .detail-grid { grid-template-columns: 1fr; }
  .stat-cards { grid-template-columns: repeat(2, 1fr); }
}
