/* ═══════════════════════════════════════════════════
   Casa Regal — Issues Tracker  |  issues.css
   ═══════════════════════════════════════════════════ */

:root {
  --bg:       #f5f6fa;
  --surface:  #ffffff;
  --border:   #e2e6ef;
  --text:     #1a1d2e;
  --muted:    #7b8299;
  --accent:   #6366f1;
  --radius:   10px;
  --shadow:   0 2px 12px rgba(0,0,0,.08);
  --hdr-h:    56px;

  /* Priority */
  --pri-low:      #22c55e;
  --pri-medium:   #f59e0b;
  --pri-high:     #f97316;
  --pri-critical: #ef4444;

  /* Status */
  --col-open:     #ef4444;
  --col-inprog:   #f59e0b;
  --col-resolved: #22c55e;
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  -webkit-text-size-adjust: 100%;
  overflow-x: hidden;
}

/* ══ SPINNER ═══════════════════════════════════════ */
.spin {
  border: 3px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin .7s linear infinite;
  display: inline-block;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ══ LOGIN ══════════════════════════════════════════ */

#login-screen {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: linear-gradient(135deg, #ede9fe 0%, #f5f6fa 100%);
}

.login-wrap {
  width: 100%;
  max-width: 360px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.login-logo {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.login-icon {
  width: 56px;
  height: 56px;
  background: var(--accent);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  font-weight: 700;
  color: #fff;
  letter-spacing: -.5px;
}

.login-brand {
  font-size: 22px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -.3px;
}

.login-sub {
  font-size: 13px;
  color: var(--muted);
  margin-top: -4px;
}

.login-card {
  background: var(--surface);
  border-radius: 16px;
  padding: 28px 24px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.login-err {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #dc2626;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 13px;
  line-height: 1.4;
}

.field-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.field-lbl {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  letter-spacing: .2px;
}

.field-inp {
  padding: 10px 12px;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  font-size: 14px;
  color: var(--text);
  background: var(--surface);
  outline: none;
  transition: border-color .15s;
  font-family: inherit;
}

.field-inp:focus { border-color: var(--accent); }

.login-btn {
  padding: 12px;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  letter-spacing: .1px;
  font-family: inherit;
  transition: opacity .15s;
}
.login-btn:disabled { opacity: .6; cursor: not-allowed; }
.login-btn:not(:disabled):hover { opacity: .9; }

/* ══ APP SHELL ══════════════════════════════════════ */

#app-shell {
  display: flex;
  flex-direction: column;
  height: 100vh;
  overflow: hidden;
}

/* ── Header ─────────────────────────────────────── */

.iss-hdr {
  height: var(--hdr-h);
  background: #3730a3;
  display: flex;
  align-items: center;
  padding: 0 16px;
  gap: 12px;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(55,48,163,.25);
  z-index: 100;
}

.iss-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 0;
}

.iss-brand-icon {
  width: 32px;
  height: 32px;
  background: rgba(255,255,255,.2);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
}

.iss-brand-name {
  font-size: 17px;
  font-weight: 700;
  color: #fff;
  letter-spacing: -.2px;
}

.iss-brand-sub {
  font-size: 11px;
  color: rgba(255,255,255,.65);
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.iss-hdr-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.iss-new-btn {
  background: rgba(255,255,255,.18);
  border: 1.5px solid rgba(255,255,255,.35);
  color: #fff;
  border-radius: 8px;
  padding: 6px 12px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: background .15s;
  white-space: nowrap;
}
.iss-new-btn:hover { background: rgba(255,255,255,.27); }

.iss-signout {
  background: transparent;
  border: 1px solid rgba(255,255,255,.35);
  color: rgba(255,255,255,.75);
  border-radius: 7px;
  padding: 5px 10px;
  font-size: 12px;
  cursor: pointer;
  font-family: inherit;
  transition: color .15s, border-color .15s;
}
.iss-signout:hover { color: #fff; border-color: rgba(255,255,255,.7); }

/* ── Category filter strip ───────────────────────── */

.cat-strip {
  display: flex;
  gap: 6px;
  padding: 10px 14px;
  overflow-x: auto;
  flex-shrink: 0;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  scrollbar-width: none;
}
.cat-strip::-webkit-scrollbar { display: none; }

.cat-chip {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 6px 10px;
  border-radius: 8px;
  cursor: pointer;
  border: 1.5px solid transparent;
  background: var(--bg);
  transition: all .15s;
  white-space: nowrap;
  flex-shrink: 0;
  user-select: none;
}
.cat-chip-label {
  font-size: 11px;
  color: var(--muted);
  font-weight: 600;
}
.cat-chip-count {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  line-height: 1;
}
.cat-chip.active {
  background: #ede9fe;
  border-color: var(--accent);
}
.cat-chip.active .cat-chip-label { color: var(--accent); }
.cat-chip:hover:not(.active) { background: #f0f1f5; }

/* ── Controls bar ────────────────────────────────── */

.iss-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
  flex-wrap: wrap;
}

.iss-search {
  flex: 1;
  min-width: 160px;
  padding: 7px 10px 7px 30px;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  font-size: 13px;
  font-family: inherit;
  color: var(--text);
  background: var(--bg) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%237b8299' stroke-width='2.5'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cpath d='M21 21l-4.35-4.35'/%3E%3C/svg%3E") no-repeat 9px center;
  outline: none;
  transition: border-color .15s;
}
.iss-search:focus { border-color: var(--accent); background-color: var(--surface); }

.type-filter {
  display: flex;
  gap: 4px;
  flex-shrink: 0;
}
.type-btn {
  padding: 6px 10px;
  border: 1.5px solid var(--border);
  border-radius: 7px;
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  background: var(--bg);
  cursor: pointer;
  font-family: inherit;
  transition: all .12s;
  white-space: nowrap;
}
.type-btn.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
.type-btn:hover:not(.active) { border-color: var(--accent); color: var(--accent); }

/* Assignee dropdown */
.assignee-wrap {
  position: relative;
  flex-shrink: 0;
}
.assignee-trigger {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border: 1.5px solid var(--border);
  border-radius: 7px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
  background: var(--bg);
  cursor: pointer;
  font-family: inherit;
  white-space: nowrap;
}
.assignee-trigger.has-filter {
  background: #ede9fe;
  border-color: var(--accent);
  color: var(--accent);
}
.assignee-panel {
  position: absolute;
  top: calc(100% + 4px);
  right: 0;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0,0,0,.12);
  min-width: 200px;
  z-index: 300;
  overflow: hidden;
}
.assignee-search-inp {
  width: 100%;
  padding: 9px 12px;
  border: none;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
  font-family: inherit;
  color: var(--text);
  outline: none;
  background: var(--bg);
}
.assignee-list {
  max-height: 200px;
  overflow-y: auto;
}
.assignee-opt {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 12px;
  cursor: pointer;
  font-size: 13px;
  transition: background .1s;
}
.assignee-opt:hover { background: #f5f5ff; }
.assignee-opt input[type=checkbox] {
  width: 14px;
  height: 14px;
  accent-color: var(--accent);
  flex-shrink: 0;
}

/* ── Mobile scroll tabs ──────────────────────────── */

.ib-stab-bar {
  display: flex;
  background: var(--surface);
  border-bottom: 2px solid var(--border);
  flex-shrink: 0;
}
.ib-stab {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 4px;
  cursor: pointer;
  border-bottom: 3px solid transparent;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  transition: all .15s;
  user-select: none;
}
.ib-stab .stab-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.ib-stab .stab-count {
  background: #eee;
  border-radius: 10px;
  padding: 1px 6px;
  font-size: 11px;
}
.ib-stab.active { color: var(--accent); border-bottom-color: var(--accent); }
.ib-stab.active .stab-count { background: #ede9fe; color: var(--accent); }

/* ── Kanban board ────────────────────────────────── */

.issues-board {
  flex: 1;
  display: flex;
  overflow-x: auto;
  overflow-y: hidden;
  gap: 12px;
  padding: 14px;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.issues-board::-webkit-scrollbar { display: none; }
.issues-board.ib-dragging .ib-card { pointer-events: none; }

.ib-col {
  flex: 0 0 calc(85vw - 28px);
  max-width: 380px;
  min-width: 280px;
  display: flex;
  flex-direction: column;
  background: #f0f1f8;
  border-radius: 12px;
  overflow: hidden;
  scroll-snap-align: start;
  transition: box-shadow .15s;
}
.ib-col.ib-drop-target {
  box-shadow: 0 0 0 2.5px var(--accent);
  background: #ede9fe;
}

@media (min-width: 900px) {
  .issues-board { padding: 16px; gap: 14px; }
  .ib-col {
    flex: 1;
    max-width: none;
  }
  .ib-stab-bar { display: none; }
}

.ib-col-hdr {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 14px 10px;
  border-bottom: 2px solid var(--border);
  background: var(--surface);
  flex-shrink: 0;
  border-radius: 12px 12px 0 0;
}
.ib-col-hdr.ib-hdr-open    { border-bottom-color: var(--col-open); }
.ib-col-hdr.ib-hdr-inprog  { border-bottom-color: var(--col-inprog); }
.ib-col-hdr.ib-hdr-resolved{ border-bottom-color: var(--col-resolved); }

.ib-col-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  flex: 1;
}
.ib-col-count {
  background: var(--bg);
  border-radius: 10px;
  padding: 2px 8px;
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
}

.ib-cards {
  flex: 1;
  overflow-y: auto;
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  scrollbar-width: thin;
}

.ib-loading {
  display: flex;
  justify-content: center;
  padding: 30px 0;
}
.ib-empty {
  text-align: center;
  padding: 24px 12px;
  font-size: 13px;
  color: var(--muted);
}

/* ── Issue card ──────────────────────────────────── */

.ib-card {
  background: var(--surface);
  border-radius: 10px;
  padding: 12px 12px 10px;
  cursor: pointer;
  border-left: 4px solid var(--border);
  box-shadow: 0 1px 4px rgba(0,0,0,.06);
  transition: box-shadow .15s, transform .1s;
  user-select: none;
  touch-action: manipulation;
  position: relative;
}
.ib-card:hover  { box-shadow: 0 4px 14px rgba(0,0,0,.1); transform: translateY(-1px); }
.ib-card.ib-card-dragging { opacity: .45; transform: rotate(1.5deg); }

/* Priority left-border */
.ib-card.pri-low      { border-left-color: var(--pri-low); }
.ib-card.pri-medium   { border-left-color: var(--pri-medium); }
.ib-card.pri-high     { border-left-color: var(--pri-high); }
.ib-card.pri-critical { border-left-color: var(--pri-critical); }

.ib-card-top {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
  margin-bottom: 7px;
}

.ib-drag-handle {
  color: #ccc;
  cursor: grab;
  font-size: 12px;
  line-height: 1;
  flex-shrink: 0;
}
.ib-drag-handle:active { cursor: grabbing; }

.il-cat-tag {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 6px;
  background: #f0f1f8;
  color: var(--text);
  white-space: nowrap;
}

.il-status-open     { background: #fef2f2; color: #dc2626; }
.il-status-inprog   { background: #fffbeb; color: #d97706; }
.il-status-resolved { background: #f0fdf4; color: #16a34a; }
.il-status-badge {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 6px;
  white-space: nowrap;
}

.ib-pri-badge {
  font-size: 9px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 5px;
  background: #f5f5f5;
  color: var(--text);
  white-space: nowrap;
}
.ib-pri-badge.pri-low      { background: #dcfce7; color: #166534; }
.ib-pri-badge.pri-medium   { background: #fef3c7; color: #92400e; }
.ib-pri-badge.pri-high     { background: #ffedd5; color: #9a3412; }
.ib-pri-badge.pri-critical { background: #fee2e2; color: #991b1b; }

.ib-standalone-badge {
  font-size: 9px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 5px;
  background: #e0e7ff;
  color: #3730a3;
  white-space: nowrap;
}

.ib-card-desc {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.4;
  margin-bottom: 7px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.ib-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-bottom: 5px;
}
.ib-meta-prop,
.ib-meta-guest {
  font-size: 11px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 160px;
}
.ib-guest-call {
  color: #16a34a;
  text-decoration: none;
  font-weight: 600;
}

.ib-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}
.ib-meta-date {
  font-size: 10px;
  color: var(--muted);
}
.ib-meta-assignee {
  font-size: 10px;
  color: var(--accent);
  font-weight: 600;
}

/* Card action row */
.ib-move-row {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
  align-items: center;
}
.ib-move-btn {
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 10px;
  font-weight: 700;
  cursor: pointer;
  border: 1.5px solid var(--border);
  background: var(--bg);
  color: var(--text);
  font-family: inherit;
  transition: all .12s;
  white-space: nowrap;
}
.ib-move-btn:hover { border-color: var(--accent); color: var(--accent); background: #ede9fe; }

.ib-move-fwd  { color: #16a34a; border-color: #bbf7d0; background: #f0fdf4; }
.ib-move-fwd:hover  { border-color: #16a34a; background: #dcfce7; color: #166534; }
.ib-move-back { color: var(--muted); }
.ib-edit-btn  { color: var(--accent); border-color: #e0e7ff; background: #ede9fe; }
.ib-edit-btn:hover { background: #ddd6fe; }
.ib-del-btn   { color: #dc2626; border-color: #fecaca; background: #fef2f2; }
.ib-del-btn:hover { background: #fee2e2; }

/* Expense shortcut button */
.ib-expense-btn {
  margin-left: auto;
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 10px;
  font-weight: 700;
  cursor: pointer;
  border: 1.5px solid #fed7aa;
  background: #fff7ed;
  color: #c2410c;
  font-family: inherit;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  transition: all .12s;
  white-space: nowrap;
}
.ib-expense-btn:hover { background: #ffedd5; border-color: #fb923c; }

/* ══ ISSUE DETAIL DRAWER ════════════════════════════ */

.ib-drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.4);
  z-index: 400;
}

.ib-drawer {
  position: fixed;
  top: 0;
  right: 0;
  width: 100%;
  max-width: 440px;
  height: 100%;
  background: var(--surface);
  z-index: 401;
  display: flex;
  flex-direction: column;
  box-shadow: -4px 0 24px rgba(0,0,0,.16);
  transform: translateX(100%);
  transition: transform .25s cubic-bezier(.4,0,.2,1);
}
.ib-drawer.open { transform: translateX(0); }

@media (max-width: 600px) {
  .ib-drawer {
    max-width: 100%;
    top: auto;
    bottom: 0;
    height: 85vh;
    border-radius: 18px 18px 0 0;
    transform: translateY(100%);
  }
  .ib-drawer.open { transform: translateY(0); }
}

.ib-drawer-hdr {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.ib-drawer-hdr-left {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 1;
  min-width: 0;
  flex-wrap: wrap;
}
.ib-view-booking-btn {
  padding: 5px 10px;
  border: 1.5px solid var(--border);
  border-radius: 7px;
  font-size: 11px;
  font-weight: 600;
  color: var(--text);
  background: var(--bg);
  cursor: pointer;
  font-family: inherit;
  white-space: nowrap;
  flex-shrink: 0;
}
.ib-view-booking-btn:disabled { opacity: .4; cursor: not-allowed; }
.ib-drawer-expense-btn {
  padding: 5px 10px;
  border: 1.5px solid #fed7aa;
  border-radius: 7px;
  font-size: 11px;
  font-weight: 700;
  color: #c2410c;
  background: #fff7ed;
  cursor: pointer;
  font-family: inherit;
  text-decoration: none;
  white-space: nowrap;
  flex-shrink: 0;
}
.ib-drawer-expense-btn:hover { background: #ffedd5; }
.ib-drawer-close {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  border: 1.5px solid var(--border);
  background: var(--bg);
  cursor: pointer;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.ib-drawer-close:hover { background: #eee; }

.ib-drawer-body {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
}

.ibd-section {
  margin-bottom: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}
.ibd-section:last-child { border-bottom: none; margin-bottom: 0; }

.ibd-meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.ibd-meta-item {
  font-size: 12px;
  color: var(--muted);
}
.ibd-meta-item a { color: #16a34a; text-decoration: none; font-weight: 600; }

.ibd-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .5px;
  color: var(--muted);
  margin-bottom: 8px;
}
.ibd-desc, .ibd-resolution {
  font-size: 14px;
  color: var(--text);
  line-height: 1.55;
  white-space: pre-wrap;
}

/* History timeline */
.ibd-history {
  display: flex;
  flex-direction: column;
  gap: 0;
}
.ibd-hist-entry {
  display: flex;
  gap: 10px;
  padding: 6px 0;
  position: relative;
}
.ibd-hist-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
  margin-top: 5px;
}
.ibd-hist-content { flex: 1; }
.ibd-hist-detail {
  font-size: 12px;
  color: var(--text);
  line-height: 1.4;
}
.ibd-hist-meta {
  font-size: 10px;
  color: var(--muted);
  margin-top: 2px;
}
.ibd-hist-empty {
  font-size: 12px;
  color: var(--muted);
  font-style: italic;
}

/* Drawer footer */
.ib-drawer-footer {
  display: flex;
  gap: 8px;
  padding: 12px 16px;
  border-top: 1px solid var(--border);
  flex-wrap: wrap;
  flex-shrink: 0;
}
.ib-drawer-action-btn {
  flex: 1;
  min-width: 100px;
  padding: 10px 8px;
  border-radius: 9px;
  border: none;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  transition: opacity .15s;
}
.ib-drawer-action-btn:disabled { opacity: .4; cursor: not-allowed; }
.ibd-action-claim   { background: #e0e7ff; color: #3730a3; }
.ibd-action-start   { background: #fef3c7; color: #92400e; }
.ibd-action-resolve { background: #dcfce7; color: #166534; }
.ibd-action-reopen  { background: #f3f4f6; color: #374151; }

/* ══ NOTE / TRANSITION MODAL ════════════════════════ */

.ib-note-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.45);
  z-index: 500;
  display: none;
  align-items: flex-end;
  justify-content: center;
  padding: 0;
}
@media (min-width: 600px) {
  .ib-note-overlay {
    align-items: center;
    padding: 16px;
  }
}

.ib-note-modal {
  background: var(--surface);
  border-radius: 18px 18px 0 0;
  padding: 24px 20px 28px;
  width: 100%;
  max-width: 480px;
  box-shadow: 0 -4px 30px rgba(0,0,0,.2);
}
@media (min-width: 600px) {
  .ib-note-modal {
    border-radius: 16px;
    padding: 24px 24px 20px;
  }
}

.ib-note-title {
  font-size: 17px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
}
.ib-note-sub {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 16px;
}
.ib-note-assignee-lbl {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 6px;
}
.ib-note-assignee-sel {
  width: 100%;
  padding: 9px 10px;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  font-size: 13px;
  font-family: inherit;
  color: var(--text);
  background: var(--surface);
  outline: none;
  margin-bottom: 14px;
}
.ib-note-textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1.5px solid var(--border);
  border-radius: 9px;
  font-size: 14px;
  font-family: inherit;
  color: var(--text);
  background: var(--bg);
  outline: none;
  resize: vertical;
  min-height: 90px;
  transition: border-color .15s;
}
.ib-note-textarea:focus { border-color: var(--accent); background: var(--surface); }
.ib-note-actions {
  display: flex;
  gap: 10px;
  margin-top: 14px;
}
.ib-note-cancel {
  flex: 1;
  padding: 11px;
  border: 1.5px solid var(--border);
  border-radius: 9px;
  background: var(--bg);
  font-size: 14px;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
  font-family: inherit;
}
.ib-note-confirm {
  flex: 2;
  padding: 11px;
  border: none;
  border-radius: 9px;
  background: var(--accent);
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  cursor: pointer;
  font-family: inherit;
  transition: opacity .15s;
}
.ib-note-confirm:disabled { opacity: .5; cursor: not-allowed; }

/* ══ ISSUE FORM MODAL ═══════════════════════════════ */

.iss-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.45);
  z-index: 500;
  display: none;
  align-items: flex-end;
  justify-content: center;
}
@media (min-width: 600px) {
  .iss-modal-overlay {
    align-items: center;
    padding: 16px;
  }
}

.iss-modal-card {
  background: var(--surface);
  border-radius: 18px 18px 0 0;
  width: 100%;
  max-width: 520px;
  display: flex;
  flex-direction: column;
  max-height: 90vh;
}
@media (min-width: 600px) {
  .iss-modal-card {
    border-radius: 16px;
    max-height: 85vh;
  }
}

.iss-modal-hdr {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 18px 14px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.iss-modal-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
}
.iss-modal-close {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  border: 1.5px solid var(--border);
  background: var(--bg);
  cursor: pointer;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.iss-modal-body {
  flex: 1;
  overflow-y: auto;
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.iss-field-lbl {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .4px;
  color: var(--muted);
  margin-bottom: 7px;
}

.iss-cat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
}
.iss-cat-btn {
  padding: 8px 4px;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  font-size: 10px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  text-align: center;
  background: var(--bg);
  color: var(--text);
  transition: all .12s;
  line-height: 1.3;
}
.iss-cat-btn.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
.iss-cat-btn:hover:not(.active) { border-color: var(--accent); }

.iss-desc-inp {
  width: 100%;
  padding: 10px 12px;
  border: 1.5px solid var(--border);
  border-radius: 9px;
  font-size: 14px;
  font-family: inherit;
  color: var(--text);
  background: var(--bg);
  outline: none;
  resize: vertical;
  min-height: 80px;
  transition: border-color .15s;
}
.iss-desc-inp:focus { border-color: var(--accent); background: var(--surface); }

.iss-pri-row {
  display: flex;
  gap: 6px;
}
.iss-pri-btn {
  flex: 1;
  padding: 8px 4px;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  font-size: 10px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  text-align: center;
  background: var(--bg);
  color: var(--text);
  transition: all .12s;
}
.iss-pri-btn.active { background: var(--accent); border-color: var(--accent); color: #fff; }

.iss-select {
  width: 100%;
  padding: 10px 12px;
  border: 1.5px solid var(--border);
  border-radius: 9px;
  font-size: 13px;
  font-family: inherit;
  color: var(--text);
  background: var(--surface);
  outline: none;
}
.iss-select:focus { border-color: var(--accent); }

.iss-status-row {
  display: flex;
  gap: 6px;
}
.iss-status-btn {
  flex: 1;
  padding: 8px 4px;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  font-size: 10px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  text-align: center;
  background: var(--bg);
  color: var(--text);
  transition: all .12s;
}
.iss-status-btn.active { background: var(--accent); border-color: var(--accent); color: #fff; }

/* Searchable property picker */
.prop-pick-wrap {
  position: relative;
}
.prop-pick-inp {
  width: 100%;
  padding: 10px 12px;
  border: 1.5px solid var(--border);
  border-radius: 9px;
  font-size: 13px;
  font-family: inherit;
  color: var(--text);
  background: var(--bg);
  outline: none;
  transition: border-color .15s;
}
.prop-pick-inp:focus { border-color: var(--accent); background: var(--surface); }
.prop-pick-list {
  position: absolute;
  top: calc(100% + 2px);
  left: 0;
  right: 0;
  background: var(--surface);
  border: 1.5px solid var(--accent);
  border-radius: 0 0 9px 9px;
  max-height: 180px;
  overflow-y: auto;
  z-index: 600;
  box-shadow: 0 6px 20px rgba(0,0,0,.1);
}
.prop-pick-opt {
  padding: 9px 12px;
  font-size: 13px;
  cursor: pointer;
  color: var(--text);
  border-bottom: 1px solid var(--border);
}
.prop-pick-opt:hover { background: #ede9fe; }
.prop-pick-opt:last-child { border-bottom: none; }

.iss-modal-footer {
  display: flex;
  gap: 10px;
  padding: 14px 18px;
  border-top: 1px solid var(--border);
  flex-shrink: 0;
}
.iss-modal-cancel {
  flex: 1;
  padding: 11px;
  border: 1.5px solid var(--border);
  border-radius: 9px;
  background: var(--bg);
  font-size: 14px;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
  font-family: inherit;
}
.iss-modal-save {
  flex: 2;
  padding: 11px;
  border: none;
  border-radius: 9px;
  background: var(--accent);
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  cursor: pointer;
  font-family: inherit;
  transition: opacity .15s;
}
.iss-modal-save:disabled { opacity: .5; cursor: not-allowed; }

/* ══ TOAST ══════════════════════════════════════════ */

.iss-toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(80px);
  background: #1a1d2e;
  color: #fff;
  padding: 10px 20px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
  box-shadow: 0 4px 20px rgba(0,0,0,.25);
  z-index: 900;
  transition: transform .25s ease, opacity .25s ease;
  opacity: 0;
  white-space: nowrap;
  max-width: calc(100vw - 40px);
}
.iss-toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

/* ══ VENDOR BADGE (on issue cards) ═══════════════════ */
.ib-vendor-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  padding: 5px 10px 4px;
  border-top: 1px solid var(--border);
  font-size: 11px;
  color: #065f46;
  background: #f0fdf4;
  border-radius: 0 0 10px 10px;
}
.ib-vendor-badge-chip {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  background: #d1fae5;
  border: 1px solid #a7f3d0;
  border-radius: 20px;
  padding: 1px 8px;
  font-weight: 600;
  font-size: 11px;
  color: #065f46;
}
