/* ════════════════════════════════════════════════
   TOOLZONE — ADMIN STYLESHEET
   ════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Sora:wght@400;500;600;700;800;900&display=swap');

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: 'Sora', sans-serif; background: #F7F6F3; color: #0F0F1A; min-height: 100vh; }

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

/* ── SIDEBAR ── */
.adm-sidebar {
  width: 240px; background: #0F0F1A;
  display: flex; flex-direction: column;
  flex-shrink: 0; position: fixed;
  top: 0; left: 0; height: 100vh; overflow-y: auto;
  z-index: 100;
}
.adm-main { margin-left: 240px; flex: 1; padding: 32px; min-height: 100vh; }

.adm-sidebar-logo {
  display: flex; align-items: center; gap: 12px;
  padding: 22px 20px 20px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.adm-sidebar-mark {
  width: 34px; height: 34px;
  background: linear-gradient(135deg,#FF6B1A,#C84B00);
  border-radius: 9px;
  display: flex; align-items: center; justify-content: center;
  font-weight: 900; font-size: 12px; color: #fff; flex-shrink: 0;
}
.adm-sidebar-title { font-size: 14px; font-weight: 800; color: #fff; }
.adm-sidebar-role { font-size: 10px; color: rgba(255,255,255,0.3); text-transform: uppercase; letter-spacing: 1px; }

.adm-nav-label {
  font-size: 10px; font-weight: 700; color: rgba(255,255,255,0.25);
  text-transform: uppercase; letter-spacing: 1.5px;
  padding: 20px 20px 8px;
}
.adm-nav-link {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 20px; color: rgba(255,255,255,0.45);
  font-size: 13px; font-weight: 500; text-decoration: none;
  border-left: 2px solid transparent; transition: all 0.15s;
}
.adm-nav-link:hover { background: rgba(255,255,255,0.05); color: rgba(255,255,255,0.8); text-decoration: none; }
.adm-nav-link.active { background: rgba(200,75,0,0.15); color: #FF8147; border-left-color: #FF8147; }
.adm-nav-link svg { flex-shrink: 0; opacity: 0.7; }
.adm-nav-link.active svg { opacity: 1; }

.adm-badge {
  background: #C84B00; color: #fff;
  font-size: 10px; font-weight: 700;
  padding: 2px 7px; border-radius: 10px; margin-left: auto;
}

.adm-sidebar-bottom {
  margin-top: auto; padding: 16px;
  border-top: 1px solid rgba(255,255,255,0.06);
}
.adm-clock { font-size: 11px; color: rgba(255,255,255,0.25); margin-bottom: 12px; text-align: center; }
.adm-user-pill {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; background: rgba(255,255,255,0.05);
  border-radius: 10px; margin-bottom: 10px;
}
.adm-user-avatar {
  width: 30px; height: 30px;
  background: linear-gradient(135deg,#FF6B1A,#C84B00);
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 800; color: #fff; flex-shrink: 0;
}
.adm-user-name { font-size: 12px; font-weight: 700; color: #fff; }
.adm-user-role { font-size: 10px; color: rgba(255,255,255,0.3); }

.adm-site-btn, .adm-logout-btn {
  display: flex; align-items: center; gap: 7px;
  width: 100%; padding: 9px 12px;
  border-radius: 8px; font-family: 'Sora', sans-serif;
  font-size: 12px; font-weight: 600; cursor: pointer;
  transition: all 0.15s; border: none; text-decoration: none;
  margin-bottom: 6px;
}
.adm-site-btn { background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.08); color: rgba(255,255,255,0.5); }
.adm-site-btn:hover { background: rgba(255,255,255,0.1); color: #fff; text-decoration: none; }
.adm-logout-btn { background: rgba(200,75,0,0.1); border: 1px solid rgba(200,75,0,0.2); color: #FF8147; }
.adm-logout-btn:hover { background: rgba(200,75,0,0.2); }

/* ── PAGE HEADER ── */
.adm-page-header { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 24px; gap: 16px; }
.adm-page-title { font-size: 22px; font-weight: 800; letter-spacing: -0.5px; margin-bottom: 4px; }
.adm-page-sub { font-size: 13px; color: #888; }

/* ── CARDS ── */
.adm-card { background: #fff; border-radius: 14px; padding: 22px; box-shadow: 0 1px 4px rgba(0,0,0,0.05); margin-bottom: 16px; }
.adm-card-title { font-size: 14px; font-weight: 700; margin-bottom: 16px; }

/* ── STAT GRID ── */
.adm-stat-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 14px; margin-bottom: 20px; }
.adm-stat {
  background: #fff; border-radius: 14px; padding: 20px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.05);
  border-bottom: 3px solid var(--c, #C84B00);
}
.adm-stat-icon { width: 40px; height: 40px; border-radius: 10px; display: flex; align-items: center; justify-content: center; margin-bottom: 14px; }
.adm-stat-val { font-size: 30px; font-weight: 900; letter-spacing: -1px; line-height: 1; }
.adm-stat-label { font-size: 11px; color: #999; text-transform: uppercase; letter-spacing: 0.5px; margin-top: 4px; font-weight: 600; }
.adm-stat-tag { display: inline-block; margin-top: 10px; font-size: 11px; font-weight: 700; padding: 3px 9px; border-radius: 20px; }
.tag-green { background: #E8F5EE; color: #1A6B3C; }
.tag-orange { background: #FEF0E8; color: #C84B00; }
.tag-muted { background: #F5F4F1; color: #888; }

/* ── TOOLS LIST ── */
.adm-tool-cat-label { font-size: 11px; font-weight: 700; color: #999; text-transform: uppercase; letter-spacing: 1px; margin: 18px 0 8px; padding-bottom: 8px; border-bottom: 1px solid #eee; }
.adm-tool-row {
  background: #fff; border-radius: 11px; padding: 13px 16px;
  display: flex; align-items: center; gap: 12px;
  margin-bottom: 8px; box-shadow: 0 1px 3px rgba(0,0,0,0.05);
  transition: box-shadow 0.15s;
}
.adm-tool-row:hover { box-shadow: 0 3px 10px rgba(0,0,0,0.08); }
.adm-toggle { position: relative; width: 38px; height: 21px; flex-shrink: 0; }
.adm-toggle input { opacity: 0; width: 0; height: 0; position: absolute; }
.adm-toggle-slider {
  position: absolute; inset: 0; background: #E0DDD8;
  border-radius: 21px; cursor: pointer; transition: background 0.2s;
}
.adm-toggle-slider::before {
  content: ''; position: absolute; width: 15px; height: 15px;
  left: 3px; bottom: 3px; background: #fff; border-radius: 50%;
  transition: transform 0.2s; box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}
.adm-toggle input:checked + .adm-toggle-slider { background: #1A6B3C; }
.adm-toggle input:checked + .adm-toggle-slider::before { transform: translateX(17px); }

/* ── MESSAGES ── */
.adm-msg { background: #fff; border-radius: 12px; padding: 18px 20px; margin-bottom: 10px; box-shadow: 0 1px 3px rgba(0,0,0,0.05); border-left: 3px solid transparent; }
.adm-msg.unread { border-left-color: #C84B00; }
.adm-msg-avatar { width: 36px; height: 36px; border-radius: 10px; background: linear-gradient(135deg,#C84B00,#FF6B1A); display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 14px; color: #fff; flex-shrink: 0; }

/* ── FORMS ── */
.adm-field { margin-bottom: 14px; }
.adm-label { display: block; font-size: 11px; font-weight: 700; color: #888; text-transform: uppercase; letter-spacing: 0.6px; margin-bottom: 6px; }
.adm-input {
  width: 100%; padding: 10px 13px; background: #F7F6F3;
  border: 1.5px solid #E8E5E0; border-radius: 9px;
  font-family: 'Sora', sans-serif; font-size: 13px; color: #0F0F1A;
  transition: border-color 0.15s;
}
.adm-input:focus { outline: none; border-color: #C84B00; background: #fff; }
textarea.adm-input { resize: vertical; font-family: monospace; font-size: 12px; }

/* ── BUTTONS ── */
.adm-btn { padding: 10px 20px; border-radius: 9px; font-family: 'Sora', sans-serif; font-size: 13px; font-weight: 700; cursor: pointer; transition: all 0.15s; border: none; display: inline-flex; align-items: center; gap: 7px; }
.adm-btn-primary { background: linear-gradient(135deg,#C84B00,#FF6B1A); color: #fff; box-shadow: 0 3px 10px rgba(200,75,0,0.25); }
.adm-btn-primary:hover { transform: translateY(-1px); box-shadow: 0 5px 16px rgba(200,75,0,0.35); }
.adm-btn-outline { background: #fff; color: #666; border: 1.5px solid #E8E5E0; }
.adm-btn-outline:hover { border-color: #C84B00; color: #C84B00; }
.adm-btn-danger { background: #FFF0F0; color: #c00; border: 1px solid #FFCDD2; }
.adm-btn-danger:hover { background: #c00; color: #fff; }
.adm-btn-sm { padding: 6px 13px; font-size: 11px; }
.adm-btn-green { background: #E8F5EE; color: #1A6B3C; border: none; }
.adm-btn-green:hover { background: #1A6B3C; color: #fff; }

/* ── FLASH ── */
.flash { padding: 12px 16px; border-radius: 9px; font-size: 13px; font-weight: 600; margin-bottom: 18px; }
.flash-success { background: #E8F5EE; color: #1A6B3C; }
.flash-error { background: #FFF0F0; color: #c00; }
.flash-info { background: #E8EEF8; color: #1A3A8F; }

/* ── QUICK ACTIONS ── */
.adm-qa-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.adm-qa-btn { display: flex; align-items: center; gap: 8px; padding: 12px 14px; border: none; border-radius: 10px; font-family: 'Sora', sans-serif; font-size: 12px; font-weight: 700; cursor: pointer; text-decoration: none; transition: all 0.15s; }
.adm-qa-btn:hover { filter: brightness(0.95); transform: translateY(-1px); text-decoration: none; }

/* ── CHART BARS ── */
.chart-row { display: flex; align-items: center; gap: 10px; margin-bottom: 7px; }
.chart-label { width: 120px; font-size: 11px; font-weight: 600; color: #888; text-align: right; flex-shrink: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chart-track { flex: 1; background: #F0EEE9; border-radius: 4px; height: 18px; overflow: hidden; }
.chart-bar { height: 100%; border-radius: 4px; display: flex; align-items: center; padding-left: 7px; width: 0; transition: width 0.7s cubic-bezier(.4,0,.2,1); }
.chart-bar span { font-size: 10px; font-weight: 800; color: #fff; opacity: 0.9; }

/* ── LOGIN ── */
.adm-login-wrap { min-height: 100vh; background: #0F0F1A; display: flex; }
.adm-login-left { width: 42%; position: relative; overflow: hidden; display: flex; align-items: center; justify-content: center; padding: 48px; }
.adm-login-left::before { content: ''; position: absolute; inset: 0; background: radial-gradient(ellipse at 30% 50%, rgba(200,75,0,0.2) 0%, transparent 65%); }
.adm-login-inner { position: relative; z-index: 1; }
.adm-login-brand { font-size: 28px; font-weight: 900; color: #fff; letter-spacing: -1px; margin-bottom: 4px; }
.adm-login-brand span { color: #FF8147; }
.adm-login-tagline { font-size: 12px; color: rgba(255,255,255,0.3); text-transform: uppercase; letter-spacing: 2px; margin-bottom: 40px; }
.adm-login-feature { display: flex; align-items: center; gap: 12px; font-size: 13px; color: rgba(255,255,255,0.5); margin-bottom: 14px; }
.adm-login-dot { width: 7px; height: 7px; border-radius: 50%; background: #FF8147; flex-shrink: 0; }
.adm-deco { position: absolute; border-radius: 50%; }
.adm-deco-1 { width: 400px; height: 400px; border: 1px solid rgba(255,255,255,0.03); bottom: -200px; right: -200px; }
.adm-deco-2 { width: 200px; height: 200px; border: 1px solid rgba(255,255,255,0.04); top: 5%; left: -100px; }
.adm-login-right { flex: 1; background: #fff; display: flex; align-items: center; justify-content: center; padding: 48px; }
.adm-login-form { width: 100%; max-width: 360px; }
.adm-login-heading { font-size: 26px; font-weight: 800; color: #0F0F1A; letter-spacing: -0.8px; margin-bottom: 6px; }
.adm-login-sub { font-size: 13px; color: #888; margin-bottom: 32px; }
.adm-login-err { display: none; background: #FFF0F0; border: 1px solid #FFCDD2; border-radius: 8px; padding: 10px 14px; font-size: 12px; color: #c00; margin-bottom: 14px; }
.adm-login-err.show { display: block; }
.adm-login-btn { width: 100%; padding: 14px; background: linear-gradient(135deg,#C84B00,#FF6B1A); border: none; border-radius: 11px; color: #fff; font-family: 'Sora', sans-serif; font-size: 14px; font-weight: 700; cursor: pointer; box-shadow: 0 4px 16px rgba(200,75,0,0.3); transition: all 0.2s; display: flex; align-items: center; justify-content: center; gap: 8px; }
.adm-login-btn:hover { transform: translateY(-1px); box-shadow: 0 8px 24px rgba(200,75,0,0.4); }
.adm-login-hint { text-align: center; font-size: 11px; color: #bbb; margin-top: 14px; }

/* ── RESPONSIVE ── */
@media (max-width: 900px) {
  .adm-sidebar { transform: translateX(-240px); transition: transform 0.25s; }
  .adm-sidebar.open { transform: translateX(0); }
  .adm-main { margin-left: 0; }
  .adm-stat-grid { grid-template-columns: repeat(2,1fr); }
  .adm-login-left { display: none; }
}
