/* ============================================================
   Kindling Store Issue Tracker — prototype styles
   ============================================================ */

:root {
  --bg: #f4f6f3;
  --surface: #ffffff;
  --surface-2: #fafbf8;
  --sidebar: #163a25;
  --sidebar-2: #1f4a2f;
  --border: #e5e9e3;
  --border-strong: #d4dacd;
  --text: #15211a;
  --text-muted: #5f6b62;
  --text-faint: #93a095;

  /* Kindling brand: deep forest green primary + lime accent */
  --ember: #1f472d;       /* primary (forest green) */
  --ember-dark: #163521;  /* primary hover (darker) */
  --ember-soft: #e8f0e9;  /* light green tint */
  --lime: #9ecb2e;        /* lime accent (logo mark, highlights) */
  --lime-dark: #5f8a12;   /* lime for text on light backgrounds */

  --blue: #2563eb;
  --blue-soft: #e8efff;
  --green: #16a34a;
  --green-soft: #e7f6ed;
  --amber: #d97706;
  --amber-soft: #fdf2dd;
  --red: #dc2626;
  --red-soft: #fdeaea;
  --gray-soft: #eef0f3;

  --radius: 14px;
  --radius-sm: 10px;
  --shadow-sm: 0 1px 2px rgba(16, 18, 23, .05), 0 1px 3px rgba(16, 18, 23, .04);
  --shadow-md: 0 4px 16px rgba(16, 18, 23, .08);
  --shadow-lg: 0 18px 50px rgba(16, 18, 23, .18);
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body { height: 100%; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  font-size: 14px;
  line-height: 1.5;
}

button { font-family: inherit; cursor: pointer; border: none; background: none; }
input, select, textarea { font-family: inherit; font-size: 14px; }
a { color: inherit; text-decoration: none; }

/* ---------------- Icons ---------------- */
.ic { display: inline-block; vertical-align: middle; flex-shrink: 0; }
.btn .ic { margin-top: -1px; }
.qu-arrow { color: var(--ember); display: inline-flex; opacity: .6; transition: transform .15s, opacity .15s; }
.quick-user:hover .qu-arrow { opacity: 1; transform: translateX(2px); }
.fd-label { display: inline-flex; align-items: center; gap: 8px; justify-content: center; }
.foot-note { display: inline-flex; align-items: center; gap: 6px; }

/* category icon picker */
.icon-pick-grid { display: flex; flex-wrap: wrap; gap: 8px; }
.icon-pick { width: 46px; height: 42px; border: 1px solid var(--border-strong); border-radius: var(--radius-sm); background: var(--surface); color: var(--text-muted); display: grid; place-items: center; transition: all .12s; }
.icon-pick:hover { border-color: var(--text-faint); color: var(--text); }
.icon-pick.active { border-color: var(--ember); background: var(--ember-soft); color: var(--ember); }

/* ---------------- Buttons ---------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 40px; padding: 0 18px; border-radius: var(--radius-sm);
  font-weight: 600; font-size: 14px; transition: all .15s ease;
  white-space: nowrap;
}
.btn-primary { background: var(--ember); color: #fff; box-shadow: 0 1px 2px rgba(31,71,45,.35); }
.btn-primary:hover { background: var(--ember-dark); transform: translateY(-1px); }
.btn-ghost { background: var(--surface); color: var(--text); border: 1px solid var(--border-strong); }
.btn-ghost:hover { background: var(--surface-2); border-color: var(--text-faint); }
.btn-subtle { background: var(--gray-soft); color: var(--text); }
.btn-subtle:hover { background: #e3e6ea; }
.btn-danger { background: var(--red-soft); color: var(--red); }
.btn-danger:hover { background: #fbdcdc; }
.btn-sm { height: 32px; padding: 0 12px; font-size: 13px; }
.btn-block { width: 100%; }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }

/* ============================================================
   LOGIN
   ============================================================ */
.login-wrap {
  min-height: 100vh; display: grid; grid-template-columns: 1.1fr 1fr;
}
.login-hero {
  background: radial-gradient(1200px 600px at 10% -10%, #26593a 0%, var(--sidebar) 55%);
  color: #fff; padding: 64px; display: flex; flex-direction: column; justify-content: space-between;
  position: relative; overflow: hidden;
}
.login-hero::after {
  content: ""; position: absolute; right: -120px; bottom: -120px;
  width: 420px; height: 420px; border-radius: 50%;
  background: radial-gradient(circle, rgba(158,203,46,.40), transparent 70%);
  filter: blur(10px);
}
.brand { display: flex; align-items: center; gap: 12px; font-weight: 800; font-size: 18px; }
.brand .flame {
  width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center;
  background: linear-gradient(160deg, #b6e34a, var(--lime)); box-shadow: 0 6px 18px rgba(158,203,46,.5);
  font-size: 22px; color: var(--ember); font-weight: 900;
}
.hero-eyebrow { display: inline-block; font-size: 12px; font-weight: 700; letter-spacing: 1.4px; text-transform: uppercase; color: var(--lime); background: rgba(158,203,46,.12); border: 1px solid rgba(158,203,46,.25); padding: 5px 12px; border-radius: 20px; margin-bottom: 18px; }
/* Kindling brand logos */
.hero-logo { width: 168px; height: auto; display: block; }
.card-logo { width: 150px; height: auto; display: none; margin-bottom: 26px; }
.brand-mark { width: 34px; height: 34px; object-fit: contain; flex-shrink: 0; }
.brand-lockup { display: flex; flex-direction: column; line-height: 1.05; }
.brand-name { color: #fff; font-weight: 800; font-size: 18px; letter-spacing: -.3px; }
.brand-sub { color: var(--lime); font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 1.6px; margin-top: 2px; }
.email-sender { display: flex; align-items: center; gap: 14px; padding: 14px 18px; margin-bottom: 14px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.email-sender-logo { height: 30px; width: auto; border-radius: 6px; }
.es-from { font-weight: 700; }
.es-addr { font-size: 12px; }

.login-hero h1 { font-size: 46px; line-height: 1.06; font-weight: 800; letter-spacing: -1.4px; }
.login-hero .sub { color: #b6c2bb; font-size: 16px; max-width: 44ch; margin-top: 18px; line-height: 1.6; }
.hero-points { display: flex; flex-direction: column; gap: 14px; margin-top: 8px; }
.hero-point { display: flex; gap: 12px; align-items: center; color: #d4ddd6; font-size: 14.5px; }
.hero-point .hp-ico { width: 30px; height: 30px; border-radius: 8px; background: rgba(158,203,46,.14); color: var(--lime); display: grid; place-items: center; flex-shrink: 0; }

.login-panel { display: flex; align-items: center; justify-content: center; padding: 48px; }
.login-card { width: 100%; max-width: 400px; }
.login-card h2 { font-size: 24px; font-weight: 700; letter-spacing: -.5px; }
.login-card .muted { color: var(--text-muted); margin-top: 6px; margin-bottom: 28px; }

.field { margin-bottom: 16px; }
.field label { display: block; font-weight: 600; font-size: 13px; margin-bottom: 7px; }
.field input, .field select, .field textarea {
  width: 100%; height: 44px; padding: 0 14px; border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm); background: var(--surface); transition: border .15s, box-shadow .15s;
}
.field textarea { height: auto; padding: 12px 14px; resize: vertical; min-height: 96px; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--ember); box-shadow: 0 0 0 3px rgba(31,71,45,.14);
}

.quick-login { margin-top: 26px; }
.quick-login .label { font-size: 12px; font-weight: 700; color: var(--text-faint); text-transform: uppercase; letter-spacing: .6px; margin-bottom: 12px; }
.quick-user {
  display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px 12px;
  border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface);
  margin-bottom: 8px; text-align: left; transition: all .15s;
}
.quick-user:hover { border-color: var(--ember); background: var(--ember-soft); transform: translateX(2px); }
.quick-user .meta { flex: 1; min-width: 0; }
.quick-user .name { font-weight: 600; }
.quick-user .email { font-size: 12px; color: var(--text-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------------- Avatars ---------------- */
.avatar {
  width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center;
  font-weight: 700; font-size: 14px; color: #fff; flex-shrink: 0;
}
.avatar.sm { width: 30px; height: 30px; font-size: 12px; border-radius: 8px; }
.avatar.lg { width: 46px; height: 46px; font-size: 17px; border-radius: 12px; }

/* ============================================================
   APP SHELL
   ============================================================ */
.shell { display: grid; grid-template-columns: 256px 1fr; min-height: 100vh; }

.sidebar {
  background: var(--sidebar); color: #cfd2da; padding: 22px 16px; display: flex; flex-direction: column;
  position: sticky; top: 0; height: 100vh;
}
.sidebar .brand { color: #fff; padding: 4px 8px 22px; font-size: 16px; line-height: 1.2; }
.nav-section { font-size: 11px; text-transform: uppercase; letter-spacing: .8px; color: #6b7280; font-weight: 700; padding: 16px 12px 8px; }
.nav-item {
  display: flex; align-items: center; gap: 11px; width: 100%; padding: 10px 12px; border-radius: 10px;
  color: #cfd2da; font-weight: 500; font-size: 14px; transition: all .12s; text-align: left;
}
.nav-item:hover { background: var(--sidebar-2); color: #fff; }
.nav-item.active { background: linear-gradient(100deg, rgba(158,203,46,.22), rgba(158,203,46,.06)); color: #fff; box-shadow: inset 2px 0 0 var(--lime); }
.nav-item.active .ico { color: var(--lime); opacity: 1; }
.nav-item .ico { width: 20px; display: inline-flex; align-items: center; justify-content: center; opacity: .85; flex-shrink: 0; }
.nav-item:hover .ico { opacity: 1; }
.nav-item .badge { margin-left: auto; background: var(--lime); color: var(--ember); font-size: 11px; font-weight: 800; padding: 1px 8px; border-radius: 20px; }

.sidebar-footer { margin-top: auto; border-top: 1px solid #262932; padding-top: 14px; }
.user-chip { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 10px; }
.user-chip .meta { flex: 1; min-width: 0; }
.user-chip .name { color: #fff; font-weight: 600; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-chip .role { color: #6b7280; font-size: 12px; }
.logout-btn { color: #9ca3af; padding: 6px; border-radius: 8px; }
.logout-btn:hover { color: #fff; background: var(--sidebar-2); }

/* ---------------- Main ---------------- */
.main { padding: 32px 40px 64px; max-width: 1180px; width: 100%; }
.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin-bottom: 26px; }
.page-head h1 { font-size: 26px; font-weight: 750; letter-spacing: -.6px; }
.page-head .sub { color: var(--text-muted); margin-top: 4px; }
.breadcrumb { color: var(--text-faint); font-size: 13px; font-weight: 600; margin-bottom: 8px; }
.breadcrumb a:hover { color: var(--ember); }

/* ---------------- Cards / grids ---------------- */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.card-pad { padding: 20px; }

.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 16px; margin-bottom: 28px; }
.stat { display: block; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px 20px; box-shadow: var(--shadow-sm); color: inherit; text-decoration: none; transition: box-shadow .15s, transform .15s, border-color .15s; }
a.stat { cursor: pointer; }
a.stat:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); border-color: var(--border-strong); }
.stat .k { font-size: 12px; color: var(--text-muted); font-weight: 600; text-transform: uppercase; letter-spacing: .4px; display: flex; align-items: center; gap: 4px; }
.stat .k .ic { opacity: 0; transition: opacity .15s; }
a.stat:hover .k .ic { opacity: .55; }
.stat .v { font-size: 30px; font-weight: 750; letter-spacing: -1px; margin-top: 6px; }
.stat .v small { font-size: 14px; color: var(--text-faint); font-weight: 600; }
.stat .accent { color: var(--ember); }

.store-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.store-card {
  position: relative;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 20px; box-shadow: var(--shadow-sm); transition: all .15s; cursor: pointer; text-align: left;
}
.store-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); border-color: var(--border-strong); }
.card-edit {
  position: absolute; top: 12px; right: 12px; width: 30px; height: 30px; border-radius: 8px;
  display: grid; place-items: center; color: var(--text-faint); background: var(--surface);
  opacity: 0; transition: all .15s;
}
.store-card:hover .card-edit { opacity: 1; }
.card-edit:hover { background: var(--ember-soft); color: var(--ember); }
.card-grip {
  position: absolute; top: 15px; right: 48px; width: 22px; height: 28px;
  display: grid; place-items: center; color: var(--text-faint); cursor: grab;
  opacity: 0; transition: opacity .15s;
}
.store-card:hover .card-grip { opacity: 1; }
.card-grip:hover { color: var(--text); }
.card-grip:active { cursor: grabbing; }
.store-card.dragging { opacity: .5; box-shadow: var(--shadow-lg); border-color: var(--ember); }
.store-card.dragging .card-grip { cursor: grabbing; }
.store-card .top { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.store-card .name { font-weight: 700; font-size: 16px; }
.store-card .loc { color: var(--text-muted); font-size: 13px; }
.store-card .row { display: flex; align-items: center; justify-content: space-between; padding-top: 14px; border-top: 1px solid var(--border); margin-top: 4px; }
.store-card .managers { color: var(--text-muted); font-size: 12px; }
.pill-count { display: inline-flex; align-items: center; gap: 6px; background: var(--ember-soft); color: var(--ember-dark); font-weight: 700; font-size: 13px; padding: 4px 10px; border-radius: 20px; }
.pill-count.zero { background: var(--green-soft); color: var(--green); }

/* ---------------- Category buttons (store page) ---------------- */
.cat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; }
.cat-btn {
  display: flex; align-items: center; gap: 14px; padding: 18px; border-radius: var(--radius);
  border: 1px solid var(--border); background: var(--surface); box-shadow: var(--shadow-sm);
  transition: all .15s; text-align: left;
}
.cat-btn:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); border-color: var(--ember); }
.cat-ico { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; flex-shrink: 0; }
.cat-btn .ctitle { font-weight: 700; font-size: 15px; }
.cat-btn .csub { font-size: 12px; color: var(--text-muted); }
.cat-btn .plus { margin-left: auto; color: var(--ember); display: inline-flex; opacity: .55; transition: opacity .15s, transform .15s; }
.cat-btn:hover .plus { opacity: 1; transform: scale(1.15); }

/* ---------------- Tables / issue list ---------------- */
.toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 22px 0 16px; }
.toolbar .spacer { flex: 1; }
.seg { display: inline-flex; background: var(--gray-soft); border-radius: 10px; padding: 3px; gap: 2px; }
.seg button { padding: 6px 14px; border-radius: 8px; font-weight: 600; font-size: 13px; color: var(--text-muted); }
.seg button.active { background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm); }
.mini-select { height: 38px; padding: 0 12px; border: 1px solid var(--border-strong); border-radius: var(--radius-sm); background: var(--surface); font-weight: 500; }
.search { position: relative; }
.search input { height: 38px; padding: 0 14px 0 38px; border: 1px solid var(--border-strong); border-radius: var(--radius-sm); width: 240px; background: var(--surface); }
.search .s-ico { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--text-faint); display: inline-flex; }

.issue-list { display: flex; flex-direction: column; gap: 10px; }
.issue {
  display: grid; grid-template-columns: auto 1fr auto; gap: 16px; align-items: center;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 16px 18px; box-shadow: var(--shadow-sm); transition: all .15s; cursor: pointer;
}
.issue:hover { border-color: var(--border-strong); box-shadow: var(--shadow-md); }
.issue .cat-ico { width: 40px; height: 40px; }
.issue .body { min-width: 0; }
.issue .title { font-weight: 650; font-size: 15px; }
.issue .desc { color: var(--text-muted); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.issue .meta-row { display: flex; gap: 8px; align-items: center; margin-top: 7px; flex-wrap: wrap; }
.issue .right { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
.issue .when { color: var(--text-faint); font-size: 12px; white-space: nowrap; }

.tag { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 650; padding: 3px 10px; border-radius: 20px; }
.tag.cat { background: var(--gray-soft); color: var(--text); }
.status { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; padding: 4px 11px; border-radius: 20px; }
.status .dot { width: 7px; height: 7px; border-radius: 50%; }
.status.open { background: var(--amber-soft); color: var(--amber); }
.status.open .dot { background: var(--amber); }
.status.progress { background: var(--blue-soft); color: var(--blue); }
.status.progress .dot { background: var(--blue); }
.status.resolved { background: var(--green-soft); color: var(--green); }
.status.resolved .dot { background: var(--green); }


.attach-chip { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; color: var(--text-muted); font-weight: 600; }

/* ---------------- Generic table ---------------- */
.table { width: 100%; border-collapse: collapse; }
.table th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .4px; color: var(--text-faint); font-weight: 700; padding: 0 16px 12px; }
.table td { padding: 14px 16px; border-top: 1px solid var(--border); vertical-align: middle; }
.table tr:hover td { background: var(--surface-2); }
.cell-user { display: flex; align-items: center; gap: 10px; }
.cell-user .name { font-weight: 600; }
.cell-user .email { font-size: 12px; color: var(--text-muted); }

/* ---------------- Access control (team page) ---------------- */
.acc-badge { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 700; padding: 4px 11px; border-radius: 20px; }
.acc-badge.active { background: var(--green-soft); color: var(--green); }
.acc-badge.disabled { background: var(--red-soft); color: var(--red); }
.acc-actions { display: inline-flex; gap: 8px; justify-content: flex-end; }
.code-box {
  font-family: 'SFMono-Regular', ui-monospace, Menlo, monospace; font-size: 28px; font-weight: 700;
  letter-spacing: 5px; text-align: center; padding: 18px; border-radius: var(--radius-sm);
  background: var(--ember-soft); color: var(--ember-dark); border: 1px dashed var(--ember);
}

/* ---------------- Empty state ---------------- */
.empty { text-align: center; padding: 64px 20px; color: var(--text-muted); }
.empty .ico { width: 64px; height: 64px; margin: 0 auto; border-radius: 18px; background: var(--gray-soft); color: var(--text-faint); display: grid; place-items: center; }
.empty h3 { color: var(--text); margin: 16px 0 6px; font-weight: 700; }

/* ---------------- Email log ---------------- */
.email-row { display: flex; gap: 14px; padding: 16px 18px; border-bottom: 1px solid var(--border); align-items: flex-start; }
.email-row:last-child { border-bottom: none; }
.email-icon { width: 38px; height: 38px; border-radius: 10px; background: var(--ember-soft); color: var(--ember); display: grid; place-items: center; flex-shrink: 0; }
.email-row .to { font-weight: 600; }
.email-row .subj { color: var(--text); margin-top: 2px; }
.email-row .preview { color: var(--text-muted); font-size: 13px; margin-top: 4px; }
.email-row .when { margin-left: auto; color: var(--text-faint); font-size: 12px; white-space: nowrap; }

/* ============================================================
   MODAL
   ============================================================ */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(16,18,23,.5); backdrop-filter: blur(3px);
  display: grid; place-items: center; padding: 24px; z-index: 100; animation: fade .15s ease;
}
.modal {
  background: var(--surface); border-radius: 18px; box-shadow: var(--shadow-lg);
  width: 100%; max-width: 560px; max-height: 90vh; overflow: auto; animation: pop .18s ease;
}
.modal.wide { max-width: 680px; }
.modal-head { display: flex; align-items: center; gap: 14px; padding: 22px 24px; border-bottom: 1px solid var(--border); position: sticky; top: 0; background: var(--surface); }
.modal-head .ctitle { font-size: 18px; font-weight: 700; }
.modal-head .csub { font-size: 13px; color: var(--text-muted); }
.modal-head .x { margin-left: auto; color: var(--text-faint); width: 34px; height: 34px; border-radius: 8px; display: grid; place-items: center; font-size: 20px; }
.modal-head .x:hover { background: var(--gray-soft); color: var(--text); }
.modal-body { padding: 22px 24px; }
.modal-foot { display: flex; justify-content: flex-end; gap: 10px; padding: 18px 24px; border-top: 1px solid var(--border); position: sticky; bottom: 0; background: var(--surface); }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

.file-drop {
  border: 1.5px dashed var(--border-strong); border-radius: var(--radius-sm); padding: 18px;
  text-align: center; color: var(--text-muted); cursor: pointer; transition: all .15s;
}
.file-drop:hover { border-color: var(--ember); background: var(--ember-soft); color: var(--ember-dark); }
.file-drop.has-file { border-style: solid; border-color: var(--green); background: var(--green-soft); color: var(--green); font-weight: 600; }

.checkbox-row { display: flex; align-items: center; gap: 10px; padding: 10px 0; }
/* attachment thumbnails + lightbox */
.attach-grid { display: flex; flex-wrap: wrap; gap: 8px; }
.attach-thumb { width: 66px; height: 66px; border-radius: 9px; overflow: hidden; border: 1px solid var(--border); padding: 0; cursor: zoom-in; background: var(--surface-2); transition: border-color .12s, transform .12s; }
.attach-thumb:hover { border-color: var(--ember); transform: translateY(-1px); }
.attach-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
/* upload/video thumbnail states */
.attach-thumb.up { position: relative; cursor: default; display: grid; place-items: center; }
.attach-thumb .up-vid { width: 100%; height: 100%; display: grid; place-items: center; background: #15211a; color: #fff; }
.attach-thumb .up-x { position: absolute; top: -6px; right: -6px; width: 20px; height: 20px; border-radius: 50%; background: var(--red); color: #fff; display: grid; place-items: center; cursor: pointer; box-shadow: var(--shadow-sm); }
.up-spin { width: 22px; height: 22px; border-radius: 50%; border: 2.5px solid var(--border-strong); border-top-color: var(--ember); animation: kcspin .7s linear infinite; }
@keyframes kcspin { to { transform: rotate(360deg); } }
.lightbox { position: fixed; inset: 0; background: rgba(8,12,9,.9); backdrop-filter: blur(4px); display: grid; place-items: center; z-index: 300; padding: 32px; cursor: zoom-out; animation: fade .15s ease; }
.lightbox img { max-width: 92vw; max-height: 88vh; border-radius: 10px; box-shadow: var(--shadow-lg); }
.lb-close { position: fixed; top: 18px; right: 22px; width: 42px; height: 42px; border-radius: 11px; background: rgba(255,255,255,.14); color: #fff; display: grid; place-items: center; }
.lb-close:hover { background: rgba(255,255,255,.26); }

/* ticket types manager */
.table tr.row-click { cursor: pointer; }
.tt-list { display: flex; flex-direction: column; gap: 8px; }
.tt-row { display: flex; align-items: center; gap: 12px; padding: 8px 12px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface-2); }

.pass-row { display: flex; gap: 8px; align-items: center; }
.pass-row input { flex: 1; }
.pass-row .btn { height: 44px; flex-shrink: 0; }

/* store-access checklist (assign manager to stores) */
.store-check-list { max-height: 320px; overflow-y: auto; border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 6px; display: flex; flex-direction: column; gap: 2px; }
.store-check { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: var(--radius-sm); cursor: pointer; transition: background .12s; }
.store-check:hover { background: var(--surface-2); }
.store-check input { width: 18px; height: 18px; accent-color: var(--ember); cursor: pointer; }
.store-check .sc-icon { font-size: 18px; }
.store-check .sc-name { font-weight: 600; display: block; }
.store-check .sc-loc { font-size: 12px; color: var(--text-muted); }

/* info banner (manager view-only) */
.info-banner { display: flex; gap: 14px; align-items: center; padding: 16px 20px; }
.info-banner .ib-ico { width: 40px; height: 40px; border-radius: 11px; background: var(--ember-soft); color: var(--ember); display: grid; place-items: center; flex-shrink: 0; }

/* resolution log / timeline */
.log-head { font-weight: 700; font-size: 15px; margin: 24px 0 14px; padding-top: 20px; border-top: 1px solid var(--border); }
.timeline { display: flex; flex-direction: column; gap: 16px; }
.timeline-empty { padding: 6px 0 2px; font-size: 13px; }
.tl-item { display: flex; gap: 12px; align-items: flex-start; }
.tl-body { flex: 1; min-width: 0; }
.tl-meta { font-size: 13px; }
.tl-status { font-size: 13px; margin-top: 5px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.tl-text { background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 10px 12px; margin-top: 7px; white-space: pre-wrap; font-size: 13.5px; }

.composer { margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--border); }
.composer-row { display: flex; align-items: center; gap: 10px; }

/* detail view rows */
.detail-grid { display: grid; grid-template-columns: 120px 1fr; gap: 14px 18px; }
.detail-grid .k { color: var(--text-muted); font-weight: 600; font-size: 13px; }
.detail-desc { background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 14px; color: var(--text); white-space: pre-wrap; }

/* ---------------- Toasts ---------------- */
.toast-stack { position: fixed; right: 22px; bottom: 22px; display: flex; flex-direction: column; gap: 10px; z-index: 200; }
.toast {
  display: flex; gap: 12px; align-items: flex-start; background: var(--sidebar); color: #fff;
  padding: 14px 16px; border-radius: 12px; box-shadow: var(--shadow-lg); max-width: 360px;
  animation: slidein .25s ease;
}
.toast .ti { font-size: 18px; }
.toast .tt { font-weight: 600; }
.toast .ts { color: #aeb2bd; font-size: 13px; margin-top: 2px; }
.toast.success .ti { color: #4ade80; }

@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { opacity: 0; transform: translateY(8px) scale(.98); } }
@keyframes slidein { from { opacity: 0; transform: translateX(20px); } }

.hide { display: none !important; }
.muted { color: var(--text-muted); }
.mt-8 { margin-top: 8px; } .mt-16 { margin-top: 16px; } .mt-24 { margin-top: 24px; }

@media (max-width: 900px) {
  .shell { grid-template-columns: 1fr; }
  .sidebar { position: static; height: auto; flex-direction: row; flex-wrap: wrap; align-items: center; }
  .sidebar-footer { margin: 0 0 0 auto; border: none; padding: 0; }
  .nav-section { display: none; }
  .login-wrap { grid-template-columns: 1fr; }
  .login-hero { display: none; }
  .card-logo { display: block; }
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .main { padding: 24px 18px 48px; }
}

/* ============================================================
   WordPress embed: break the app out of the theme's content
   column and render it full-screen.
   ============================================================ */
#kc-app {
  position: fixed !important;
  inset: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  margin: 0 !important;
  padding: 0 !important;
  max-width: none !important;
  z-index: 2147483600 !important;
  overflow: auto !important;
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
