/* admin.css — small additions on top of the design's style.css:
   login error banner, PNG KPI icons, and real inputs styled as the .field pills. */

/* Login error banner */
.login-error {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #b0322f;
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 14px;
  margin-bottom: 18px;
}

/* KPI card icon: render your PNG inside the design's 25x25 icon box */
.kpi-ico img { width: 100%; height: 100%; object-fit: contain; display: block; }

/* Real <input>/<select> dressed as the design's .field pills */
.field { cursor: pointer; }
.field input,
.field select {
  border: none;
  outline: none;
  background: transparent;
  font-family: inherit;
  font-size: 13.5px;
  color: #4b4e55;
  flex: 1;
  min-width: 0;
  cursor: pointer;
}
.field.date input { color: #2f3137; }
.field input::placeholder { color: #9aa0aa; }

/* Only the <select> gets its native arrow removed (the design draws its own
   chevron). IMPORTANT: never apply appearance:none to a date input — WebKit
   then hides the date value and the box looks empty. */
.field select {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
}

/* Hide only the little native calendar button (the design shows its own icon).
   The value text stays visible. */
.field input[type="date"]::-webkit-calendar-picker-indicator { opacity: 0; cursor: pointer; }

/* range-toggle items are submit buttons here — keep them looking like the toggle */
.range-toggle button { font-family: inherit; cursor: pointer; border: none; }
.btn-outline { cursor: pointer; }

/* Centered, minimal login (logo + email + password only) */
.login-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 24px;
  background: var(--page-bg);
}
.login-logo { display: block; height: 34px; width: auto; margin: 0 auto 30px; }

/* Proper login card: white panel holding the logo + form */
.login-wrap .login-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 42px 38px 40px;
  box-shadow: 0 12px 34px rgba(17, 18, 20, .08);
}
.login-wrap .login-card .btn-primary { margin-top: 4px; }

/* Keep inputs clean/white even when the browser autofills them */
.input-wrap input:-webkit-autofill,
.input-wrap input:-webkit-autofill:hover,
.input-wrap input:-webkit-autofill:focus {
  -webkit-box-shadow: 0 0 0 1000px #fff inset;
  box-shadow: 0 0 0 1000px #fff inset;
  -webkit-text-fill-color: var(--text);
  caret-color: var(--text);
}

/* Audience card icons (your PNGs) inside the 22x22 .card-ico box */
.card-ico img { width: 100%; height: 100%; object-fit: contain; display: block; }

/* Hover tooltip for charts (shows the count) */
.chart-tip {
  position: fixed;
  z-index: 200;
  pointer-events: none;
  background: #1c1d20;
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  padding: 5px 9px;
  border-radius: 7px;
  opacity: 0;
  transform: translateY(2px);
  transition: opacity .12s ease, transform .12s ease;
  white-space: nowrap;
  box-shadow: 0 4px 14px rgba(0,0,0,.2);
}
.chart-tip.show { opacity: 1; transform: translateY(0); }
.vbar, .hfill, .ofill, .donut circle[data-tip] { cursor: pointer; }

/* Top-bar avatar as a button + logout dropdown */
button.avatar { border: none; font-family: inherit; padding: 0; cursor: pointer; }
.user-menu { position: relative; }
.user-dropdown {
  position: absolute;
  right: 0;
  top: calc(100% + 10px);
  min-width: 210px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 14px 34px rgba(17, 18, 20, .14);
  padding: 6px;
  z-index: 80;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: opacity .14s ease, transform .14s ease;
}
.user-dropdown.open { opacity: 1; visibility: visible; transform: translateY(0); }
.user-dropdown-head { padding: 10px 12px 12px; border-bottom: 1px solid var(--border); margin-bottom: 4px; }
.user-dropdown-name { display: block; font-size: 14px; font-weight: 600; color: #1c1d20; }
.user-dropdown-role { display: block; font-size: 12px; color: var(--faint); margin-top: 2px; }
.user-dropdown-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; border-radius: 8px;
  font-size: 14px; color: #2f3137; text-decoration: none;
}
.user-dropdown-item:hover { background: #f4f5f6; }
.user-dropdown-item svg { width: 18px; height: 18px; stroke: currentColor; stroke-width: 1.8; fill: none; stroke-linecap: round; stroke-linejoin: round; flex: none; }
