/* CG Bot MLM Portal — style.css */

*, *::before, *::after { box-sizing: border-box; }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: #f4f6f9;
  color: #333;
  margin: 0;
  padding: 0;
}

/* ── nav ── */
nav {
  background: #1a1a2e;
  color: #fff;
  padding: 12px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
nav a { margin-left: 8px; }

/* ── container ── */
.container {
  max-width: 480px;
  margin: 48px auto;
  background: #fff;
  border-radius: 8px;
  padding: 32px;
  box-shadow: 0 2px 12px rgba(0,0,0,.08);
}
.container.wide { max-width: 900px; }

h1 { margin-top: 0; font-size: 1.6rem; }
h2 { font-size: 1.2rem; margin-top: 28px; }

.subtitle {
  color: #666;
  margin-top: -12px;
  margin-bottom: 24px;
}

/* ── forms ── */
.form-group {
  margin-bottom: 18px;
}
.form-group label {
  display: block;
  font-weight: 600;
  margin-bottom: 6px;
  font-size: .9rem;
}
.form-group input,
.form-group select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 1rem;
}
.form-group input:focus,
.form-group select:focus {
  outline: none;
  border-color: #4a90d9;
  box-shadow: 0 0 0 3px rgba(74,144,217,.15);
}
.form-group small {
  display: block;
  margin-top: 4px;
  color: #888;
  font-size: .82rem;
}

/* ── buttons ── */
.btn {
  display: inline-block;
  padding: 10px 22px;
  background: #1a1a2e;
  color: #fff;
  border: none;
  border-radius: 6px;
  font-size: .95rem;
  cursor: pointer;
  text-decoration: none;
  transition: background .2s;
}
.btn:hover { background: #2d2d50; }
.btn.btn-secondary {
  background: #e8e8f0;
  color: #333;
}
.btn.btn-secondary:hover { background: #d0d0e0; }
.btn.btn-sm { padding: 6px 14px; font-size: .85rem; }
.btn-group { margin-top: 20px; display: flex; gap: 10px; }

/* ── alerts ── */
.alert {
  padding: 12px 16px;
  border-radius: 6px;
  margin-bottom: 20px;
  font-size: .93rem;
}
.alert-error   { background: #fde8e8; color: #b00020; border: 1px solid #f5c6c6; }
.alert-success { background: #e8f5e9; color: #1b5e20; border: 1px solid #c8e6c9; }
.alert-token   {
  background: #e8f4fd;
  color: #0d47a1;
  border: 1px solid #bbdefb;
  font-size: 1.1rem;
  font-family: monospace;
  letter-spacing: .1em;
}

/* ── stats ── */
.stats {
  display: flex;
  gap: 16px;
  margin-bottom: 28px;
  flex-wrap: wrap;
}
.stat-box {
  flex: 1;
  min-width: 140px;
  background: #f4f6f9;
  border-radius: 8px;
  padding: 16px 20px;
  text-align: center;
}
.stat-label { display: block; font-size: .82rem; color: #666; margin-bottom: 6px; }
.stat-value { display: block; font-size: 1.8rem; font-weight: 700; color: #1a1a2e; }

/* ── table ── */
table {
  width: 100%;
  border-collapse: collapse;
  font-size: .92rem;
}
th {
  background: #f4f6f9;
  text-align: left;
  padding: 10px 12px;
  font-weight: 600;
  border-bottom: 2px solid #e0e0e0;
}
td {
  padding: 10px 12px;
  border-bottom: 1px solid #f0f0f0;
}
tr:hover td { background: #fafafa; }

.active  { color: #2e7d32; font-weight: 600; }
.expired { color: #c62828; }
.pending { color: #e65100; font-weight: 600; }

/* ── misc ── */
.link { margin-top: 20px; font-size: .9rem; color: #666; text-align: center; }
.link a { color: #4a90d9; text-decoration: none; }
.link a:hover { text-decoration: underline; }

/* ── language selector ── */
.lang-selector {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 16px;
  justify-content: flex-end;
}
.lang-selector a {
  font-size: .8rem;
  color: #666;
  text-decoration: none;
  padding: 2px 6px;
  border-radius: 4px;
  border: 1px solid #ddd;
  transition: background .15s;
}
.lang-selector a:hover { background: #f0f0f0; }
.lang-selector .lang-current {
  font-size: .8rem;
  font-weight: 700;
  color: #1a1a2e;
  padding: 2px 6px;
  border-radius: 4px;
  border: 1px solid #1a1a2e;
  background: #e8e8f0;
}
nav .lang-selector { margin-bottom: 0; }
