/* Buoy Dashboard — Light Mode / nemopoint brand (orange signal #F97316) */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
  --bg:      #F2F5FB;
  --s1:      #FFFFFF;
  --s2:      #F8FAFD;
  --s3:      #EEF2FA;
  --s4:      #E2E8F4;
  --border:  #E0E6F0;
  --border2: #C8D2E8;

  --primary: #F97316;
  --p-dark:  #C2410C;
  --p-light: #FB923C;
  --p-glow:  rgba(249,115,22,.20);
  --p-bg:    rgba(249,115,22,.09);

  --danger:  #EF4B5E;  --d-bg: rgba(239,75,94,.08);
  --warn:    #F59C1A;  --w-bg: rgba(245,156,26,.08);
  --success: #0DC87A;  --s-bg: rgba(13,200,122,.08);
  --info:    #3B82F6;  --i-bg: rgba(59,130,246,.08);

  --text:    #18192E;
  --text2:   #485070;
  --text3:   #94A0BF;

  --sidebar-w: 248px;
  --r: 10px;
  --shadow-sm: 0 1px 3px rgba(18,25,46,.06);
  --shadow:    0 4px 16px rgba(18,25,46,.09);
  --shadow-lg: 0 12px 40px rgba(18,25,46,.14);
  --font: 'Plus Jakarta Sans', system-ui, sans-serif;
  --mono: 'JetBrains Mono', 'Fira Code', monospace;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 14px; }
body { font-family: var(--font); background: var(--bg); color: var(--text); min-height: 100vh; -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border2); border-radius: 3px; }

/* ── LOGIN ── */
.login-page { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: var(--bg); position: relative; overflow: hidden; }
.login-page::before { content: ''; position: absolute; width: 600px; height: 600px; background: radial-gradient(circle, rgba(249,115,22,.12) 0%, transparent 65%); top: -200px; right: -100px; pointer-events: none; }
.login-page::after  { content: ''; position: absolute; width: 400px; height: 400px; background: radial-gradient(circle, rgba(59,130,246,.07) 0%, transparent 65%); bottom: -100px; left: -100px; pointer-events: none; }
.login-card { width: 100%; max-width: 400px; padding: 40px; background: var(--s1); border: 1px solid var(--border); border-radius: 16px; box-shadow: var(--shadow-lg); position: relative; z-index: 1; animation: fadeUp .4s cubic-bezier(.22,1,.36,1); }
.login-logo { display: flex; align-items: center; gap: 12px; margin-bottom: 32px; }
.logo-mark { width: 42px; height: 42px; border-radius: 10px; overflow: hidden; box-shadow: 0 4px 14px rgba(249,115,22,.3); flex-shrink: 0; }
.logo-mark img { width: 100%; height: 100%; object-fit: cover; display: block; }
.logo-name { font-size: 20px; font-weight: 800; letter-spacing: -.5px; color: var(--text); }
.login-title { font-size: 18px; font-weight: 700; margin-bottom: 5px; }
.login-sub   { font-size: 13px; color: var(--text3); margin-bottom: 28px; }

/* ── LAYOUT ── */
.app { display: flex; min-height: 100vh; }
.sidebar { width: var(--sidebar-w); background: var(--s1); border-right: 1px solid var(--border); display: flex; flex-direction: column; position: fixed; top: 0; left: 0; bottom: 0; z-index: 100; box-shadow: var(--shadow-sm); }
.sidebar-brand { display: flex; align-items: center; gap: 10px; padding: 18px 16px; border-bottom: 1px solid var(--border); }
.sidebar-brand .logo-mark { width: 30px; height: 30px; border-radius: 7px; }
.sidebar-brand .logo-name { font-size: 15px; }
.sidebar-nav { flex: 1; padding: 14px 10px; overflow-y: auto; }
.nav-section { margin-bottom: 20px; }
.nav-section-label { font-size: 10px; font-weight: 700; color: var(--text3); text-transform: uppercase; letter-spacing: .08em; padding: 0 10px; margin-bottom: 4px; display: block; }
.nav-item { display: flex; align-items: center; gap: 9px; padding: 9px 10px; border-radius: 8px; cursor: pointer; color: var(--text2); font-size: 13px; font-weight: 500; transition: all .15s; position: relative; }
.nav-item:hover { background: var(--s3); color: var(--text); }
.nav-item.active { background: var(--p-bg); color: var(--p-dark); font-weight: 700; }
.nav-item.active::before { content: ''; position: absolute; left: 0; top: 20%; bottom: 20%; width: 3px; background: var(--primary); border-radius: 0 2px 2px 0; }
.nav-icon { font-size: 15px; width: 20px; text-align: center; }
.nav-badge { margin-left: auto; background: var(--primary); color: #fff; font-size: 10px; font-weight: 700; padding: 1px 6px; border-radius: 10px; }
.sidebar-footer { padding: 14px 16px; border-top: 1px solid var(--border); display: flex; align-items: center; gap: 10px; }
.user-dot { width: 32px; height: 32px; border-radius: 50%; background: linear-gradient(135deg, var(--primary), var(--p-light)); display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; color: #fff; flex-shrink: 0; }
.user-info { flex: 1; min-width: 0; }
.user-info-name { font-size: 12px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-info-role { font-size: 10px; color: var(--text3); text-transform: capitalize; }
.btn-logout-link { color: var(--text3); font-size: 16px; transition: color .15s; display: flex; }
.btn-logout-link:hover { color: var(--danger); }
.main { margin-left: var(--sidebar-w); flex: 1; display: flex; flex-direction: column; }
.topbar { height: 56px; background: var(--s1); border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; padding: 0 28px; position: sticky; top: 0; z-index: 50; box-shadow: var(--shadow-sm); }
.topbar-title { font-size: 15px; font-weight: 700; }
.topbar-actions { display: flex; align-items: center; gap: 10px; }
.content { flex: 1; padding: 28px; }

/* ── FORMS ── */
.form-group { margin-bottom: 18px; }
.form-label { display: block; font-size: 11px; font-weight: 700; color: var(--text3); text-transform: uppercase; letter-spacing: .06em; margin-bottom: 7px; }
.form-input, .form-select, .form-textarea { width: 100%; padding: 10px 13px; background: var(--s1); border: 1.5px solid var(--border); border-radius: 8px; color: var(--text); font-family: var(--font); font-size: 13px; outline: none; transition: border-color .2s, box-shadow .2s; }
.form-input:focus, .form-select:focus, .form-textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 3px var(--p-glow); }
.form-input::placeholder, .form-textarea::placeholder { color: var(--text3); }
.form-textarea { resize: vertical; min-height: 80px; line-height: 1.5; }
.form-select { cursor: pointer; }
.form-hint { font-size: 11px; color: var(--text3); margin-top: 5px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

/* ── BUTTONS ── */
.btn { display: inline-flex; align-items: center; gap: 7px; padding: 9px 16px; border: none; border-radius: 8px; font-family: var(--font); font-size: 13px; font-weight: 600; cursor: pointer; transition: all .15s; white-space: nowrap; }
.btn-primary { background: var(--primary); color: #fff; box-shadow: 0 3px 12px rgba(249,115,22,.35); }
.btn-primary:hover { background: var(--p-dark); }
.btn-secondary { background: var(--s3); color: var(--text2); border: 1.5px solid var(--border); }
.btn-secondary:hover { background: var(--s4); color: var(--text); }
.btn-danger { background: var(--d-bg); color: var(--danger); border: 1.5px solid rgba(239,75,94,.2); }
.btn-danger:hover { background: rgba(239,75,94,.14); }
.btn-success { background: var(--s-bg); color: var(--success); border: 1.5px solid rgba(13,200,122,.2); }
.btn-sm { padding: 6px 11px; font-size: 12px; }

/* ── CARDS ── */
.card { background: var(--s1); border: 1px solid var(--border); border-radius: var(--r); box-shadow: var(--shadow-sm); }
.card-header { padding: 15px 20px; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; background: var(--s2); border-radius: var(--r) var(--r) 0 0; }
.card-title { font-size: 13px; font-weight: 700; }
.card-body { padding: 20px; }

/* ── STATS ── */
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 24px; }
.stat-card { background: var(--s1); border: 1px solid var(--border); border-radius: var(--r); padding: 18px 20px; position: relative; overflow: hidden; box-shadow: var(--shadow-sm); transition: box-shadow .2s, transform .2s; }
.stat-card:hover { box-shadow: var(--shadow); transform: translateY(-1px); }
.stat-card::after { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px; background: linear-gradient(90deg, var(--primary), var(--p-light)); }
.stat-label { font-size: 11px; font-weight: 700; color: var(--text3); text-transform: uppercase; letter-spacing: .06em; margin-bottom: 10px; }
.stat-value { font-size: 28px; font-weight: 800; letter-spacing: -1px; line-height: 1; }
.stat-sub { font-size: 11px; color: var(--text3); margin-top: 6px; }
.stat-icon { position: absolute; right: 16px; top: 50%; transform: translateY(-50%); font-size: 30px; opacity: 1; }

/* ── TABLES ── */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
thead th { padding: 10px 16px; font-size: 11px; font-weight: 700; color: var(--text3); text-transform: uppercase; letter-spacing: .06em; text-align: left; border-bottom: 1.5px solid var(--border); white-space: nowrap; background: var(--s2); }
tbody tr { transition: background .1s; }
tbody tr:hover { background: var(--p-bg); }
tbody td { padding: 12px 16px; font-size: 13px; border-bottom: 1px solid var(--border); vertical-align: middle; color: var(--text2); }
tbody tr:last-child td { border-bottom: none; }

/* ── BADGES ── */
.badge { display: inline-flex; align-items: center; gap: 4px; padding: 3px 9px; border-radius: 20px; font-size: 11px; font-weight: 700; }
.badge-new      { background: var(--i-bg); color: var(--info); }
.badge-progress { background: var(--w-bg); color: var(--warn); }
.badge-resolved { background: var(--s-bg); color: var(--success); }
.badge-wontfix  { background: var(--s3); color: var(--text3); }
.badge-bug         { background: var(--d-bg); color: var(--danger); }
.badge-improvement { background: var(--i-bg); color: var(--info); }
.badge-question    { background: var(--p-bg); color: var(--p-dark); }
.badge-other       { background: var(--s3); color: var(--text3); }
.badge-low      { background: var(--s-bg); color: var(--success); }
.badge-medium   { background: var(--w-bg); color: var(--warn); }
.badge-high     { background: rgba(240,120,60,.1); color: #D95F10; }
.badge-critical { background: var(--d-bg); color: var(--danger); }
.badge-admin       { background: var(--i-bg); color: var(--info); }
.badge-super_admin { background: var(--p-bg); color: var(--p-dark); }
.badge-tester      { background: var(--s3); color: var(--text2); }
.badge-client      { background: var(--w-bg); color: var(--warn); }

/* ── KANBAN ── */
.kanban { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; align-items: start; }
.kanban-col { background: var(--s2); border: 1px solid var(--border); border-radius: var(--r); }
.kanban-header { padding: 13px 15px; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; background: var(--s1); border-radius: var(--r) var(--r) 0 0; }
.kanban-title { font-size: 12px; font-weight: 700; }
.kanban-count { background: var(--s3); color: var(--text3); font-size: 11px; font-weight: 700; padding: 2px 7px; border-radius: 10px; border: 1px solid var(--border); }
.kanban-body { padding: 10px; display: flex; flex-direction: column; gap: 8px; min-height: 100px; }
.report-card { background: var(--s1); border: 1.5px solid var(--border); border-radius: 8px; padding: 13px; cursor: pointer; transition: all .15s; display: block; box-shadow: var(--shadow-sm); }
.report-card:hover { border-color: var(--primary); box-shadow: var(--shadow); transform: translateY(-1px); }
.report-card-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.report-card-desc { font-size: 12px; color: var(--text2); line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin-bottom: 10px; }
.report-card-footer { display: flex; align-items: center; justify-content: space-between; }
.report-card-url { font-size: 10px; color: var(--text3); font-family: var(--mono); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 130px; }
.report-card-date { font-size: 10px; color: var(--text3); white-space: nowrap; }

/* ── REPORT DETAIL ── */
.report-detail-grid { display: grid; grid-template-columns: 1fr 300px; gap: 20px; align-items: start; }
.detail-screenshot { width: 100%; border-radius: 8px; border: 1px solid var(--border); display: block; }
.meta-list { display: flex; flex-direction: column; }
.meta-row { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--border); }
.meta-row:last-child { border-bottom: none; }
.meta-key { font-size: 11px; color: var(--text3); font-weight: 700; text-transform: uppercase; letter-spacing: .05em; white-space: nowrap; }
.meta-val { font-size: 12px; color: var(--text2); text-align: right; word-break: break-all; }
.selector-code { font-family: var(--mono); font-size: 11px; background: var(--s3); padding: 8px 11px; border-radius: 6px; color: var(--p-dark); word-break: break-all; line-height: 1.5; border: 1px solid var(--border); }

/* ── FLASH ── */
.flash { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-radius: 8px; margin-bottom: 20px; font-size: 13px; font-weight: 500; animation: fadeUp .3s ease; }
.flash-success { background: var(--s-bg); border: 1.5px solid rgba(13,200,122,.3); color: #0A9E60; }
.flash-error   { background: var(--d-bg); border: 1.5px solid rgba(239,75,94,.3); color: var(--danger); }
.flash-info    { background: var(--i-bg); border: 1.5px solid rgba(59,130,246,.3); color: var(--info); }

/* ── TOGGLE ── */
.toggle-wrap { display: flex; align-items: center; justify-content: space-between; padding: 14px 0; border-bottom: 1px solid var(--border); }
.toggle-wrap:last-child { border-bottom: none; }
.toggle-info-title { font-size: 13px; font-weight: 600; margin-bottom: 2px; }
.toggle-info-sub   { font-size: 11px; color: var(--text3); }
.switch { position: relative; width: 40px; height: 22px; flex-shrink: 0; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch-slider { position: absolute; inset: 0; background: var(--s4); border-radius: 22px; transition: .25s; cursor: pointer; border: 1.5px solid var(--border2); }
.switch-slider::before { content: ''; position: absolute; width: 14px; height: 14px; bottom: 2px; left: 2px; background: #fff; border-radius: 50%; transition: .25s; box-shadow: 0 1px 3px rgba(0,0,0,.15); }
.switch input:checked + .switch-slider { background: var(--primary); border-color: var(--primary); }
.switch input:checked + .switch-slider::before { transform: translateX(18px); }

/* ── MODAL ── */
.modal-overlay { position: fixed; inset: 0; background: rgba(18,25,46,.35); backdrop-filter: blur(4px); z-index: 1000; display: flex; align-items: center; justify-content: center; animation: fadeIn .2s ease; }
.modal { background: var(--s1); border: 1px solid var(--border); border-radius: 14px; width: 100%; max-width: 480px; max-height: 90vh; overflow-y: auto; box-shadow: var(--shadow-lg); animation: fadeUp .25s cubic-bezier(.22,1,.36,1); }
.modal-header { padding: 20px 24px; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; }
.modal-title { font-size: 15px; font-weight: 700; }
.modal-close { background: var(--s3); border: 1px solid var(--border); color: var(--text2); width: 28px; height: 28px; border-radius: 50%; cursor: pointer; font-size: 14px; display: flex; align-items: center; justify-content: center; transition: all .15s; }
.modal-close:hover { background: var(--s4); color: var(--text); }
.modal-body { padding: 24px; }
.modal-footer { padding: 16px 24px; border-top: 1px solid var(--border); display: flex; justify-content: flex-end; gap: 10px; background: var(--s2); border-radius: 0 0 14px 14px; }

/* ── EMPTY STATE ── */
.empty-state { text-align: center; padding: 60px 20px; color: var(--text3); }
.empty-state-icon { font-size: 40px; margin-bottom: 14px; opacity: .4; }
.empty-state-title { font-size: 15px; font-weight: 700; color: var(--text2); margin-bottom: 6px; }

/* ── PAGE HEADER ── */
.page-header { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 24px; }
.page-title { font-size: 22px; font-weight: 800; letter-spacing: -.4px; }
.page-sub { font-size: 12px; color: var(--text3); margin-top: 4px; }

/* ── ACCESS GRID ── */
.access-grid { display: flex; flex-direction: column; gap: 6px; }
.access-row { display: flex; align-items: center; justify-content: space-between; padding: 10px 14px; background: var(--s2); border-radius: 8px; border: 1.5px solid var(--border); }
.access-project { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 500; }
.access-checks { display: flex; gap: 16px; }
.check-label { display: flex; align-items: center; gap: 5px; font-size: 11px; color: var(--text2); cursor: pointer; user-select: none; font-weight: 500; }
.check-label input { accent-color: var(--primary); }

/* ── MISC ── */
.color-dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; flex-shrink: 0; }
.filter-bar { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 20px; }
.filter-btn { padding: 6px 13px; border-radius: 20px; border: 1.5px solid var(--border); background: var(--s1); color: var(--text2); font-family: var(--font); font-size: 12px; font-weight: 600; cursor: pointer; transition: all .15s; }
.filter-btn:hover { background: var(--s3); color: var(--text); }
.filter-btn.active { background: var(--p-bg); border-color: var(--primary); color: var(--p-dark); }

/* ── ANIMATIONS ── */
@keyframes fadeUp { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.page-enter { animation: fadeUp .3s cubic-bezier(.22,1,.36,1); }

/* ════ DRAG & DROP KANBAN ════ */
.report-card[draggable="true"] { cursor: grab; }
.report-card[draggable="true"]:active { cursor: grabbing; }
.report-card.dragging { opacity: .4; transform: scale(.97); box-shadow: none !important; }
.kanban-col.drag-over .kanban-body {
  background: var(--p-bg);
  border: 2px dashed var(--primary);
  border-radius: 8px;
}
.kanban-col.drag-over .kanban-empty { display: none; }
.kanban-empty { text-align: center; color: var(--text3); font-size: 11px; padding: 20px 0; }
.drop-placeholder {
  height: 60px; border: 2px dashed var(--primary);
  border-radius: 8px; background: var(--p-bg);
  margin-bottom: 8px; pointer-events: none;
}
