/* ============================================================
 * Kukoo · admin.css  (dashboard.php + review.php)
 *
 * Drop-in replacement for the inline <style> in both admin pages.
 * Every existing class name preserved — no PHP changes needed.
 * Just swap <style>…</style> for the brand.css + admin.css links.
 * ============================================================ */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body{
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--ink);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* ---- App shell ---- */
.app{ display: grid; grid-template-columns: 248px 1fr; min-height: 100vh; }

.sidebar{
  background: linear-gradient(180deg, var(--navy), var(--navy-d));
  color: #fff;
  padding: 22px 16px;
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
}

.side-brand{
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 18px;
  letter-spacing: -.015em;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 10px 22px;
}
.side-brand .brand-mark{
  width: 32px; height: 32px;
  border-radius: 9px;
  background: var(--lime);
  color: var(--navy);
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 14px;
  letter-spacing: -0.04em;
  flex: none;
}

.side-label{
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: rgba(255,255,255,.5);
  font-weight: 700;
  padding: 14px 12px 8px;
}

.nav-item{
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 10px 12px;
  border-radius: 10px;
  color: rgba(255,255,255,.78);
  text-decoration: none;
  font-weight: 500;
  font-size: 13.5px;
  margin-bottom: 2px;
  transition: background .15s, color .15s;
}
.nav-item svg{ width: 16px; height: 16px; flex-shrink: 0; opacity: .9; }
.nav-item:hover{ background: rgba(255,255,255,.08); color: #fff; }
.nav-item.active{
  background: rgba(166,206,57,.16);
  color: #fff;
  font-weight: 600;
  box-shadow: inset 2px 0 0 var(--lime);
}
.nav-item.disabled{ opacity: .5; cursor: default; }
.nav-item .soon{
  margin-left: auto;
  font-size: 9px;
  font-weight: 800;
  background: rgba(255,255,255,.18);
  padding: 2px 6px;
  border-radius: 999px;
  text-transform: uppercase;
}

.main-col{ display: flex; flex-direction: column; min-width: 0; }

.topbar{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 26px;
  background: var(--card);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 5;
}
.page-title{
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 16px;
  letter-spacing: -0.01em;
}
.userbox{
  font-size: 12.5px;
  color: var(--mut);
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 14px;
}
.userbox a{ color: var(--navy); font-weight: 600; text-decoration: none; }
.userbox a + a{ border-left: 1px solid var(--line); padding-left: 14px; }

.content{ padding: 28px 26px 80px; max-width: 1100px; width: 100%; }

/* ---- Typography ---- */
h1{
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--ink);
  margin-bottom: 4px;
}
h2{
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--mut);
  margin: 28px 0 12px;
}
.muted{ color: var(--mut); font-size: 12.5px; }
.link{ color: var(--navy); font-weight: 600; text-decoration: none; }
.link:hover{ color: var(--navy-d); text-decoration: underline; }
code{
  background: var(--line-2);
  padding: 2px 7px;
  border-radius: 6px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px;
  color: var(--navy);
}

/* ---- Cards & forms ---- */
.card{
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 22px;
  box-shadow: var(--shadow);
  margin-bottom: 18px;
}

label{
  display: block;
  font-weight: 600;
  font-size: 11.5px;
  letter-spacing: 0.02em;
  color: var(--ink);
  margin: 14px 0 6px;
  text-transform: uppercase;
}
input, select{
  width: 100%;
  padding: 10px 12px;
  border: 1.5px solid var(--line);
  border-radius: 10px;
  font-size: 13.5px;
  font-family: inherit;
  background: #fff;
  color: var(--ink);
  transition: border-color .12s, box-shadow .12s, background .12s;
}
input:hover, select:hover{ border-color: #D9D5C2; }
input:focus, select:focus{
  outline: none;
  border-color: var(--navy);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(var(--navy-rgb), .12);
}
.row{ display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

/* ---- Buttons — primary becomes LIME ---- */
.btn{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: none;
  border-radius: 10px;
  padding: 11px 20px;
  font-weight: 700;
  font-size: 13.5px;
  font-family: inherit;
  cursor: pointer;
  background: var(--lime);
  color: var(--ink);
  box-shadow: 0 1px 0 var(--lime-d);
  transition: background .15s, transform .04s, box-shadow .12s;
}
.btn:hover{ background: var(--lime-d); }
.btn:active{ transform: translateY(1px); box-shadow: none; }
.btn.ghost{
  background: #fff;
  color: var(--ink);
  border: 1px solid var(--line);
  box-shadow: none;
}
.btn.ghost:hover{ border-color: var(--navy); color: var(--navy); background: #fff; }

/* ---- Tables ---- */
table{ width: 100%; border-collapse: collapse; font-size: 13px; }
th, td{
  text-align: left;
  padding: 12px 12px;
  border-bottom: 1px solid var(--line-2);
  vertical-align: middle;
}
th{
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--mut);
  font-weight: 700;
  background: #FBFAF4;
  border-bottom: 1px solid var(--line);
}
tbody tr:hover{ background: #FBFAF4; }
tbody tr:last-child td{ border-bottom: none; }

/* ---- Badges ---- */
.badge{
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.b-ok  { background: var(--lime-soft); color: var(--lime-deep); }
.b-warn{ background: var(--warn-bg);   color: var(--warn); }
.b-bad { background: var(--bad-bg);    color: var(--bad); }
.b-mut { background: var(--mut-bg);    color: var(--mut); }

/* ---- Flash messages ---- */
.flash{
  padding: 12px 15px;
  border-radius: 11px;
  font-weight: 600;
  font-size: 13px;
  margin-bottom: 16px;
  border: 1px solid transparent;
}
.flash.ok { background: var(--lime-soft); color: var(--lime-deep); border-color: rgba(166,206,57,.35); }
.flash.err{ background: var(--bad-bg);    color: var(--bad);       border-color: rgba(210,59,94,.2); }

/* ---- Webhook inbox card (matches inline border-color #ffbf43) ---- */
.card[style*="ffbf43"]{
  border: 1px solid #F3D78A !important;
  background: var(--warn-bg);
  position: relative;
}
.card[style*="ffbf43"]::before{
  content: "";
  position: absolute; top: 0; left: 0; right: 0;
  height: 2px;
  background: var(--warn);
  border-radius: 14px 14px 0 0;
}

/* ---- Auth (login) ---- */
.auth{ display: grid; grid-template-columns: 1fr 1fr; min-height: 100vh; }
.auth-aside{
  background: linear-gradient(155deg, var(--navy), var(--navy-d));
  color: #fff;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 48px;
  position: relative;
}
.auth-aside::after{
  content: "";
  position: absolute; bottom: 0; left: 0; right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--lime) 0%, #F6BD60 50%, #E94F37 100%);
}
.auth-aside .logo{
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.02em;
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
}
.auth-aside h3{ font-family: var(--font-display); font-size: 22px; font-weight: 800; margin-bottom: 10px; }
.auth-aside p{ color: rgba(255,255,255,.8); max-width: 340px; font-size: 14px; }
.auth-aside .dots{ display: flex; gap: 7px; margin-top: 30px; }
.auth-aside .dots i{ width: 8px; height: 8px; border-radius: 999px; background: rgba(255,255,255,.4); }
.auth-aside .dots i:first-child{ background: var(--lime); width: 22px; }
.auth-form{
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 24px;
  background: var(--card);
}
.auth-form .inner{ width: 100%; max-width: 360px; }
.auth-form h1{ text-align: center; font-size: 24px; margin-bottom: 6px; }
.auth-form .sub{ text-align: center; color: var(--mut); font-size: 13px; margin-bottom: 22px; }

/* ---- Responsive ---- */
@media (max-width: 880px){
  .app{ grid-template-columns: 1fr; }
  .sidebar{
    position: static;
    height: auto;
    flex-direction: row;
    align-items: center;
    gap: 6px;
    padding: 10px 14px;
    overflow-x: auto;
  }
  .side-brand{ padding: 6px 8px; font-size: 16px; }
  .side-label{ display: none; }
  .nav-item{ margin-bottom: 0; white-space: nowrap; padding: 8px 12px; }
  .content{ padding: 18px 14px 60px; }
  .row{ grid-template-columns: 1fr; }
  .auth{ grid-template-columns: 1fr; }
  .auth-aside{ padding: 34px 24px; }
  table{ font-size: 12px; }
  th, td{ padding: 10px 8px; }
}
