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

:root {
  --bg:       #0d1117;
  --bg-2:     #161b22;
  --bg-3:     #21262d;
  --border:   #30363d;
  --red:      #c0392b;
  --red-dark: #a93226;
  --green:    #27ae60;
  --blue:     #3498db;
  --text:     #e6edf3;
  --text-2:   #8b949e;
  --text-3:   #6e7681;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  font-size: 15px;
  line-height: 1.5;
}

a { color: var(--red); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ── Nav ── */
nav {
  background: #000;
  border-bottom: 1px solid var(--border);
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  position: sticky;
  top: 0;
  z-index: 100;
}

.brand {
  font-size: 18px;
  font-weight: 700;
  color: white !important;
  text-decoration: none !important;
  letter-spacing: -0.3px;
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.nav-user {
  font-size: 13px;
  color: var(--text-2);
}

.btn-nav {
  font-size: 13px;
  color: var(--text-2);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 5px 12px;
  text-decoration: none;
  transition: .15s;
}
.btn-nav:hover { color: var(--text); border-color: #666; text-decoration: none; }

/* ── Auth pages ── */
main { min-height: calc(100vh - 56px); }

.auth-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - 56px);
  padding: 24px 16px;
}

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

.auth-logo { font-size: 48px; text-align: center; margin-bottom: 12px; }
.auth-card h1 { font-size: 24px; text-align: center; margin-bottom: 4px; }
.auth-sub { text-align: center; color: var(--text-2); font-size: 14px; margin-bottom: 24px; }
.auth-link { text-align: center; font-size: 13px; color: var(--text-2); margin-top: 16px; }

/* ── Form fields ── */
.field { margin-bottom: 16px; }
.field label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-2);
  margin-bottom: 6px;
}
.field input, .f-group input, .f-group select {
  width: 100%;
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 9px 12px;
  font-size: 14px;
  color: var(--text);
  transition: border-color .15s;
  outline: none;
}
.field input:focus, .f-group input:focus {
  border-color: var(--red);
  box-shadow: 0 0 0 3px rgba(192,57,43,.15);
}

/* ── Buttons ── */
.btn-primary {
  background: var(--red);
  color: white;
  border: none;
  border-radius: 6px;
  padding: 10px 20px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: background .15s;
}
.btn-primary:hover { background: var(--red-dark); }
.btn-primary.full { width: 100%; padding: 12px; }

.btn-outline {
  background: transparent;
  color: var(--text-2);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 8px 16px;
  font-size: 14px;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
  transition: .15s;
}
.btn-outline:hover { color: var(--text); border-color: #666; text-decoration: none; }

.btn-sm {
  padding: 5px 12px;
  font-size: 13px;
  border-radius: 5px;
  border: none;
  cursor: pointer;
  font-weight: 600;
}
.btn-success { background: #1a4d2e; color: #4ade80; }
.btn-success:hover { background: #1e5c36; }
.btn-danger  { background: #4d1a1a; color: #f87171; }
.btn-danger:hover { background: #5c1e1e; }
.btn-warn    { background: #4d3800; color: #fbbf24; }
.btn-warn:hover { background: #5c4300; }

/* ── Alerts ── */
.alert {
  border-radius: 6px;
  padding: 10px 14px;
  font-size: 14px;
  margin-bottom: 14px;
  border-left: 4px solid;
}
.alert-error   { background: #2a1a1a; color: #f87171; border-color: var(--red); }
.alert-success { background: #1a2a1a; color: #4ade80; border-color: var(--green); }
.alert-info    { background: #1a2333; color: #93c5fd; border-color: var(--blue); }

/* ── Badges ── */
.badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 700;
}
.badge-admin { background: #2a1a4d; color: #a78bfa; }
.badge-warn  { background: #4d3800; color: #fbbf24; }
.badge-soon  { background: var(--bg-3); color: var(--text-3); font-weight: 500; }

/* ── Tags ── */
.tag {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 700;
}
.tag-paid    { background: #1a3a2a; color: #4ade80; }
.tag-unpaid  { background: #3a1a1a; color: #f87171; }
.tag-account { background: #1a2a4d; color: #93c5fd; }
.tag-cash    { background: #3a2a00; color: #fbbf24; }
.tag-wn      { background: #2a1a4d; color: #c084fc; }

/* ── Page layout ── */
.page-wrap { max-width: 1000px; margin: 0 auto; padding: 24px 20px; }
.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}
.page-header h1 { font-size: 22px; }

/* ── Section cards ── */
.section-card {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 20px;
  margin-bottom: 20px;
}
.section-card h2 { font-size: 16px; margin-bottom: 16px; }

/* ── Data table ── */
.data-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.data-table th {
  text-align: left;
  padding: 8px 12px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .5px;
  color: var(--text-3);
  border-bottom: 1px solid var(--border);
}
.data-table td { padding: 10px 12px; border-bottom: 1px solid #21262d; }
.data-table tr:last-child td { border-bottom: none; }
.empty { text-align: center; color: var(--text-3); font-style: italic; }
.muted { color: var(--text-3); font-size: 13px; }

/* ── Admin bar ── */
.admin-bar { display: flex; justify-content: flex-end; }
.admin-notice {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #2a1f00;
  border: 1px solid #4d3800;
  border-radius: 8px;
  padding: 10px 16px;
  margin-bottom: 16px;
  font-size: 14px;
  color: #fbbf24;
}

/* ── Homepage ── */
.home-wrap { max-width: 900px; margin: 0 auto; padding: 32px 20px; }
.home-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 32px;
}
.home-header h1 { font-size: 26px; }
.home-sub { color: var(--text-2); font-size: 15px; margin-top: 4px; }
.home-logo { height: 48px; opacity: .8; }

.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

.tool-card {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
  display: flex;
  align-items: flex-start;
  gap: 14px;
  text-decoration: none;
  color: var(--text);
  transition: .2s;
  position: relative;
}
.tool-active:hover {
  border-color: var(--red);
  background: #1a1214;
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(192,57,43,.15);
}
.tool-coming { opacity: .6; cursor: default; }

.tool-icon {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  flex-shrink: 0;
}
.tool-body { flex: 1; }
.tool-body h3 { font-size: 15px; font-weight: 700; margin-bottom: 4px; }
.tool-body p { font-size: 13px; color: var(--text-2); line-height: 1.4; }
.tool-arrow { color: var(--red); font-size: 18px; align-self: center; }

/* ── Responsive ── */
@media (max-width: 700px) {
  nav { padding: 0 12px; height: 48px; }
  .brand { font-size: 14px; }
  .nav-right { gap: 8px; }
  .btn-nav { padding: 4px 8px; font-size: 12px; }
  .nav-user { font-size: 12px; }
  .home-wrap { padding: 20px 14px; }
  .home-header { flex-direction: column; align-items: flex-start; gap: 12px; }
  .home-logo { display: none; }
  .page-wrap { padding: 16px; }
  .page-header { flex-direction: column; align-items: flex-start; gap: 10px; }
  .data-table { font-size: 12px; }
  .data-table th, .data-table td { padding: 6px 8px; }
  .section-card { padding: 14px; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .tools-grid { grid-template-columns: 1fr; }
  .btn-sm { padding: 6px 10px; font-size: 12px; }
}
