/* 1win Brandbook tokens — https://1win.design/palette, /logotype, /structure-and-grids */
:root {
  --brand-blue: #00A3FF;    /* primary, 40% */
  --deep-blue: #0029D9;     /* secondary, 30% */
  --deep-blue-hover: #001FA8;
  --brand-blue-hover: #0089D6;
  --ink: #000000;           /* Outline Black, 20% */
  --white: #FFFFFF;         /* 10% */

  --text-primary: #0E1011;
  --text-secondary: #272B30;
  --text-tertiary: #6B7076;
  --border: #ECEDF1;
  --border-strong: #E9EBEF;
  --bg-app: #F7F8FA;
  --bg-panel: #FFFFFF;
  --sidebar-bg: #0E1011;

  /* semantic (state) colors — kept separate from brand identity colors on purpose */
  --success-bg: #E5F8EC; --success-text: #12B857;
  --warning-bg: #FFF4E0; --warning-text: #FC5415;
  --error-bg: #FDE9EA;   --error-text: #E0245E;
}

* { box-sizing: border-box; }

html {
  background: var(--bg-app);
}

body {
  margin: 0;
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--bg-app);
  color: var(--text-primary);
}

h1, h2, h3 { font-family: 'Inter', system-ui, sans-serif; font-weight: 700; letter-spacing: -0.02em; margin: 0; }
a { color: var(--deep-blue); text-decoration: none; }
a:hover { color: var(--deep-blue-hover); }
table.list a:visited { color: var(--deep-blue); }

.app-shell { display: flex; min-height: 100vh; }

/* Sidebar */
.sidebar {
  width: 248px; flex-shrink: 0; background: var(--sidebar-bg);
  display: flex; flex-direction: column; padding: 24px 16px; position: sticky; top: 0; height: 100vh;
}
.sidebar-brand { padding: 4px 8px 8px 8px; }
.sidebar-brand img { display: block; height: 22px; width: auto; }
.sidebar-brand-sub {
  font-size: 11px; font-weight: 500; color: #7C828A; text-transform: uppercase;
  letter-spacing: 0.08em; padding: 0 8px 24px 8px;
}
.sidebar-nav { display: flex; flex-direction: column; gap: 2px; }
.sidebar-link {
  display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 9px;
  color: #9AA0A6; font-size: 14px; font-weight: 500;
}
.sidebar-link svg { flex-shrink: 0; }
.sidebar-link.active { background: rgba(0, 163, 255, 0.14); color: var(--white); font-weight: 600; }
.sidebar-link:hover { color: var(--white); }
.sidebar-footer {
  margin-top: auto; display: flex; align-items: center; gap: 10px; padding: 12px 8px;
  border-top: 1px solid rgba(255,255,255,0.08);
}
.sidebar-avatar {
  width: 34px; height: 34px; border-radius: 50%; background: var(--brand-blue);
  display: flex; align-items: center; justify-content: center; font-family: 'Inter', sans-serif;
  font-weight: 700; font-size: 13px; color: var(--white); overflow: hidden;
}
.sidebar-avatar img { width: 100%; height: 100%; object-fit: cover; }
.sidebar-user-name { font-size: 13px; font-weight: 600; color: var(--white); line-height: 1.3; }
.sidebar-user-points { font-size: 11.5px; color: #9AA0A6; line-height: 1.3; margin-top: 1px; }
.sidebar-logout { font-size: 11.5px; color: #9AA0A6; margin-left: auto; }
.sidebar-logout:hover { color: var(--white); }

/* Main content */
.main { flex: 1; padding: 36px 40px; min-width: 0; }
.page-header { margin-bottom: 26px; }
.page-title { font-size: 26px; font-weight: 700; letter-spacing: -0.01em; }
.page-subtitle { font-size: 14px; color: var(--text-tertiary); margin-top: 5px; }

/* Stat cards */
.stat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-bottom: 28px; }
.stat-card {
  background: var(--bg-panel); border: 1px solid var(--border); border-radius: 14px;
  padding: 20px 22px; display: flex; flex-direction: column; gap: 14px;
}
.stat-card-label {
  font-size: 12.5px; font-weight: 600; color: var(--text-tertiary);
  text-transform: uppercase; letter-spacing: 0.04em;
}
.stat-card-value { font-family: 'Inter', sans-serif; font-size: 30px; font-weight: 700; }

/* Card / table */
.card { background: var(--bg-panel); border: 1px solid var(--border); border-radius: 14px; overflow: hidden; }
.card-header { padding: 22px 22px 14px 22px; font-size: 15px; font-weight: 600; }
table.list { width: 100%; border-collapse: collapse; }
table.list th {
  text-align: left; padding: 13px 22px; border-bottom: 1px solid var(--border);
  font-size: 11.5px; font-weight: 600; color: var(--text-tertiary); text-transform: uppercase;
  letter-spacing: 0.04em;
}
table.list td { padding: 16px 22px; border-bottom: 1px solid var(--border); font-size: 13.5px; vertical-align: middle; }
table.list tr:last-child td { border-bottom: none; }

.badge {
  display: inline-flex; align-items: center; gap: 6px; width: fit-content; padding: 4px 9px;
  border-radius: 7px; font-size: 12px; font-weight: 600;
}
.pill {
  display: inline-flex; align-items: center; gap: 6px; width: fit-content; padding: 5px 11px;
  border-radius: 20px; font-size: 12px; font-weight: 600;
}
.pill-dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }

.campaign-logo {
  width: 40px; height: 40px; border-radius: 10px; display: flex; align-items: center;
  justify-content: center; font-family: 'Inter', sans-serif; font-weight: 700; font-size: 13px;
}
.campaign-logo img { width: 60%; height: 60%; object-fit: contain; }
.campaign-title { font-size: 14.5px; font-weight: 600; }
.campaign-brand { font-size: 12.5px; color: var(--text-tertiary); margin-top: 2px; }

.progress-track { height: 8px; border-radius: 5px; background: var(--border); overflow: hidden; }
.progress-fill { height: 100%; background: var(--brand-blue); }

/* Buttons */
.btn {
  display: inline-block; padding: 10px 20px; border-radius: 10px; font-size: 14px; font-weight: 700;
  border: none; cursor: pointer; text-align: center;
}
.btn-primary { background: var(--brand-blue); color: var(--white); }
.btn-primary:hover { background: var(--brand-blue-hover); }
.btn-secondary { background: transparent; border: 1.5px solid var(--border-strong); color: var(--text-secondary); }
.btn-approve { background: var(--success-text); color: white; }
.btn-reject { background: var(--error-text); color: white; }
.btn-small { padding: 6px 14px; font-size: 13px; border-radius: 6px; }

.error { color: var(--error-text); margin-top: 10px; }
.empty { color: var(--text-tertiary); font-size: 14px; padding: 20px 22px; }

textarea, input[type=text], input[type=password], input[type=number], input[type=date], select, textarea.field {
  width: 100%; padding: 10px 12px; font-size: 14px; box-sizing: border-box;
  border: 1.5px solid var(--border-strong); border-radius: 9px; font-family: inherit;
}
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--brand-blue); }
label { display: block; font-size: 12.5px; font-weight: 600; color: var(--text-tertiary);
  text-transform: uppercase; letter-spacing: 0.04em; margin-bottom: 8px; }
.field-group { margin-bottom: 18px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

/* Auth pages (login / admin login / pending) */
.auth-page {
  min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px;
  background:
    radial-gradient(circle at 15% 20%, rgba(0,163,255,0.12), transparent 45%),
    radial-gradient(circle at 85% 85%, rgba(0,41,217,0.12), transparent 45%),
    var(--bg-app);
}
.auth-card {
  position: relative;
  width: 100%; max-width: 400px; background: var(--bg-panel); border: 1px solid var(--border);
  border-radius: 20px; box-shadow: 0 30px 60px rgba(14,16,17,0.10), 0 4px 14px rgba(14,16,17,0.05);
  padding: 44px 40px; text-align: center; box-sizing: border-box;
}
.icon-btn {
  position: absolute; top: 14px; right: 14px; width: 34px; height: 34px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; color: var(--text-tertiary);
  background: transparent; transition: background 0.15s ease, color 0.15s ease;
}
.icon-btn:hover { background: var(--bg-app); color: var(--text-primary); }
.icon-btn-inline {
  flex-shrink: 0; width: 28px; height: 28px; border-radius: 50%; border: none;
  display: flex; align-items: center; justify-content: center; color: var(--text-tertiary);
  background: transparent; cursor: pointer; padding: 0; transition: background 0.15s ease, color 0.15s ease;
}
.icon-btn-inline:hover { background: var(--bg-app); color: var(--brand-blue); }
.auth-logo { height: 56px; width: auto; margin-bottom: 28px; }
.auth-eyebrow {
  font-size: 11px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--text-tertiary); margin-bottom: 28px;
}
.auth-card .auth-eyebrow:has(+ .auth-title) { margin-bottom: 10px; }
.auth-title { font-size: 20px; font-weight: 700; letter-spacing: -0.01em; margin-bottom: 10px; }
.auth-subtitle { font-size: 14px; color: var(--text-tertiary); line-height: 1.5; margin-bottom: 28px; }
.auth-card form { text-align: left; }

.x-btn {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  width: 100%; padding: 14px; font-size: 15px; font-weight: 600; background: #000; color: white;
  border: none; border-radius: 12px; cursor: pointer; text-decoration: none; box-sizing: border-box;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.x-btn:hover { background: #1a1a1a; color: white; transform: translateY(-1px); box-shadow: 0 10px 24px rgba(0,0,0,0.18); }

/* Modal-style campaign detail */
.modal-header { display: flex; align-items: flex-start; justify-content: space-between; padding: 26px 26px 20px 26px;
  border-bottom: 1px solid var(--border); }
.modal-body { padding: 22px 26px; }
.modal-footer { display: flex; gap: 10px; padding: 18px 26px; border-top: 1px solid var(--border); }
.reward-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 20px; }
.reward-box { background: var(--bg-app); border-radius: 11px; padding: 14px 16px; }
.reward-box-label { font-size: 11.5px; color: var(--text-tertiary); margin-bottom: 6px; }
.reward-box-value { font-size: 16px; font-weight: 700; }
.requirement-item { display: flex; align-items: flex-start; gap: 9px; font-size: 13.5px; margin-bottom: 8px; }
