/*  seegars-core.css  —  Shared design-system for the Seegars Fence intranet
    ========================================================================
    Loaded by every page so every module shares one look-and-feel.
    Page-specific overrides stay in inline <style> blocks.                  */

/* ── CSS Custom Properties ────────────────────────────────────────────── */
:root {
  --sg-black: #1a1a1a;
  --sg-green: #2d8e54;
  --sg-green-dark: #163a28;
  --sg-green-light: #3aad66;
  --sg-green-glow: rgba(45, 142, 84, 0.2);
  --sg-lime: #3aad66;
  --sg-navy: #1a1a1a;
  --sg-gray: #6b7280;
  --sg-offwhite: #f4f5f2;
  --sg-surface: rgba(255,255,255,0.85);
  --sg-surface-solid: #FFFFFF;
  --sg-shadow: 0 4px 20px rgba(26,26,26,0.08), 0 1px 3px rgba(26,26,26,0.06);
  --sg-glass: rgba(255,255,255,0.75);
  --sg-glass-border: rgba(209,213,219,0.5);
  --sg-text: #1a1a1a;
  --sg-text-muted: rgba(26,26,26,0.55);
  --sg-glow: rgba(45,142,84,0.25);
  --sg-radius: 20px;
  --sg-grad: linear-gradient(to right, #163a28 0%, #2d8e54 55%, #3aad66 100%);
}

/* ── Base Reset & Typography ──────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
}

html, body {
  margin: 0;
  padding: 0;
  min-height: 100vh;
  background: #efefef;
  color: var(--sg-text);
  font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
  font-size: 0.95rem;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

a { color: var(--sg-green); text-decoration: none; }
a:hover { color: #3aad66; }

::selection { background: rgba(45,142,84,0.2); color: #1a1a1a; }

/* ── Top Navigation (shared by .top-nav and .app-header) ──────────────── */
.top-nav,
.app-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: linear-gradient(to right, #163a28 0%, #2d8e54 55%, #3aad66 100%);
  color: #fff;
  border-bottom: 1px solid rgba(26,26,26,0.15);
  padding: 0 1.5rem 0 0.5rem;
  height: 80px;
  display: flex;
  align-items: center;
}

/* Offset body content below the fixed nav */
body {
  padding-top: 80px;
}

.app-header { z-index: 1020; }

.top-nav .nav-inner,
.app-header .nav-inner {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 1rem;
  padding-left: 0;
}

.top-nav .nav-links,
.app-header .nav-links {
  display: flex;
  gap: 0.15rem;
  flex: 1;
  align-items: center;
}

/* ── Role Switcher (Super Admin only) ─────────────────────────────────── */
.role-switcher {
  display: flex; align-items: center; gap: 0.3rem;
  padding: 0 0.25rem;
  margin-right: 0.25rem;
}
.role-sw-label {
  font-size: 0.68rem; font-weight: 600; color: rgba(255,255,255,0.5);
  margin-right: 0.15rem; white-space: nowrap;
}
.role-sw-label i { font-size: 0.7rem; margin-right: 0.15rem; }
.role-sw-btn {
  font-size: 0.68rem; font-weight: 700;
  padding: 0.2rem 0.55rem; border-radius: 6px;
  color: rgba(255,255,255,0.55); text-decoration: none;
  transition: all 0.15s; white-space: nowrap;
  background: transparent;
  border: 1px solid rgba(255,255,255,0.2);
  box-shadow: 0 1px 4px rgba(0,0,0,0.15);
}
.role-sw-btn:hover {
  color: #fff;
  border-color: rgba(255,255,255,0.4);
  box-shadow: 0 1px 8px rgba(255,255,255,0.12);
}
.role-sw-btn.role-sw-active {
  color: #fff; background: transparent;
  border-color: var(--rc);
  box-shadow: 0 0 10px color-mix(in srgb, var(--rc) 40%, transparent), 0 1px 4px rgba(0,0,0,0.15);
}

.top-nav .nav-link,
.app-header .nav-link {
  color: rgba(255,255,255,0.7);
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 500;
  padding: 0.4rem 0.85rem;
  border-radius: 10px;
  transition: all 0.25s;
  position: relative;
  white-space: nowrap;
}

.top-nav .nav-link:hover,
.app-header .nav-link:hover {
  color: #fff;
  background: rgba(255,255,255,0.1);
}

.top-nav .nav-link.active,
.app-header .nav-link.active {
  color: #fff;
  background: rgba(45,142,84,0.3);
}

.top-nav .nav-link.active::after,
.app-header .nav-link.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 25%;
  right: 25%;
  height: 2px;
  background: var(--sg-green);
  border-radius: 2px;
}

/* Brand mark (used by all nav bars) */
.brand,
.brand-mark {
  font-weight: 800;
  font-size: 1.1rem;
  color: #fff;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  letter-spacing: -0.02em;
  white-space: nowrap;
}

.brand:hover,
.brand-mark:hover {
  color: #fff;
  text-decoration: none;
}

.brand-icon {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--sg-green), var(--sg-green-dark));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  color: #fff;
  box-shadow: 0 2px 10px var(--sg-glow);
}

.brand-logo {
  height: 56px;
  width: auto;
}

/* ── Back Link ────────────────────────────────────────────────────────── */
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--sg-text-muted);
  text-decoration: none;
  font-size: 0.9rem;
  margin-bottom: 1.5rem;
  transition: color 0.2s;
}
.back-link:hover { color: var(--sg-green); }

/* ── Breadcrumb Bar ──────────────────────────────────────────────────── */
.breadcrumb-bar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}
.breadcrumb-back {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--sg-text-muted);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  padding: 0.35rem 0.75rem;
  border-radius: 8px;
  transition: color 0.2s, background 0.2s;
}
.breadcrumb-back:hover {
  color: var(--sg-green);
  background: rgba(45,142,84,0.08);
}
.breadcrumb-home {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--sg-green);
  background: #fff;
  border: 1px solid rgba(45,142,84,0.3);
  border-radius: 20px;
  padding: 0.3rem 0.85rem;
  text-decoration: none;
  transition: all 0.2s;
}
.breadcrumb-home:hover {
  background: rgba(45,142,84,0.06);
  border-color: var(--sg-green);
  color: var(--sg-green-dark);
}

/* ── Site Breadcrumb (compact path indicator) ────────────────────────── */
.site-breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.82rem;
  margin-top: 0.6rem;
  flex-wrap: wrap;
}
.site-breadcrumb a {
  color: var(--sg-text-muted);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s;
}
.site-breadcrumb a:hover {
  color: var(--sg-green);
}
.site-breadcrumb .bc-sep {
  color: rgba(163,188,182,0.5);
  font-size: 0.65rem;
  display: flex;
  align-items: center;
}
.site-breadcrumb .bc-current {
  color: var(--sg-text);
  font-weight: 600;
}

/* ── Animations ───────────────────────────────────────────────────────── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Page Loader ──────────────────────────────────────────────────────── */
.page-loader {
  position: fixed; inset: 0; z-index: 9999;
  background: #f4f5f2;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 1.5rem;
  opacity: 0; visibility: hidden; pointer-events: none;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}
.page-loader.active {
  opacity: 1; visibility: visible; pointer-events: auto;
}
.page-loader.loaded {
  opacity: 0; visibility: hidden; pointer-events: none;
}
.loader-icon {
  width: 120px; height: 120px; border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  animation: loaderPulse 1.8s ease-in-out infinite;
}
.loader-logo {
  width: 100%; height: 100%; object-fit: contain;
}
@keyframes loaderPulse {
  0%, 100% { transform: scale(1); }
  50%      { transform: scale(1.08); }
}
.loader-text {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.95rem; font-weight: 600;
  color: #1a1a1a;
}
.loader-dots { display: inline-flex; gap: 4px; margin-left: 2px; }
.loader-dots span {
  width: 5px; height: 5px; border-radius: 50%;
  background: #2d8e54; opacity: 0.3;
  animation: dotBounce 1.4s ease-in-out infinite;
}
.loader-dots span:nth-child(2) { animation-delay: 0.2s; }
.loader-dots span:nth-child(3) { animation-delay: 0.4s; }
@keyframes dotBounce {
  0%, 80%, 100% { opacity: 0.3; transform: translateY(0); }
  40%           { opacity: 1; transform: translateY(-4px); }
}
.loader-bar {
  width: 180px; height: 3px; border-radius: 3px;
  background: rgba(163,188,182,0.3);
  overflow: hidden;
}
.loader-bar-fill {
  height: 100%; border-radius: 3px;
  background: linear-gradient(90deg, #2d8e54, #3aad66);
  animation: loaderProgress 2s ease-in-out infinite;
}
@keyframes loaderProgress {
  0%   { width: 0%;  margin-left: 0; }
  50%  { width: 70%; margin-left: 15%; }
  100% { width: 0%;  margin-left: 100%; }
}

/* ── Form Controls ────────────────────────────────────────────────────── */
.form-control, .form-select {
  border-radius: 12px;
  border: 1px solid rgba(163,188,182,0.5);
  padding: 0.65rem 0.95rem;
  background: #FFFFFF;
  color: var(--sg-text);
}

.form-select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='none' stroke='%233C403D' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M4 6l4 4 4-4'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.9rem center;
  background-size: 0.75rem;
  padding-right: 2.5rem;
}

.form-select option {
  background: #FFFFFF;
  color: var(--sg-text);
}

.form-control:focus, .form-select:focus {
  border-color: rgba(45,142,84,0.6);
  box-shadow: 0 0 0 .25rem rgba(45,142,84,0.15);
  background: #FFFFFF;
  color: var(--sg-text);
  outline: none;
}

.form-control::placeholder { color: var(--sg-text-muted); }

/* ── Gradient Button (common) ─────────────────────────────────────────── */
.btn-green {
  background: linear-gradient(135deg, var(--sg-green), var(--sg-green-dark));
  color: #fff; border: none; border-radius: 10px; padding: 0.5rem 1.25rem;
  font-weight: 600; transition: all 0.2s; cursor: pointer;
}
.btn-green:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(45,142,84,0.25);
  color: #fff;
}

/* ── Bootstrap Overrides ──────────────────────────────────────────────── */
.btn-primary {
  background: linear-gradient(145deg, #2d8e54, #163a28);
  border-color: #163a28;
  border-radius: 12px;
  font-weight: 700;
  padding-inline: 1.3rem;
  color: #fff;
  box-shadow: 0 4px 14px rgba(45,142,84,0.15);
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}
.btn-primary:hover {
  background: linear-gradient(145deg, #163a28, #0f2a1d);
  border-color: #0f2a1d;
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(45,142,84,0.2);
}

.btn-outline-light { border-radius: 12px; }

.btn-outline-dark {
  border-radius: 12px;
  border-color: rgba(163,188,182,0.4);
  color: var(--sg-text);
  font-weight: 600;
}
.btn-outline-dark:hover,
.btn-outline-dark:focus-visible {
  background: rgba(163,188,182,0.15);
  color: #1a1a1a;
  border-color: rgba(45,142,84,0.3);
  box-shadow: 0 4px 12px rgba(26,26,26,0.08);
}

.btn-light { background: rgba(163,188,182,0.12); color: #1a1a1a; border: 1px solid rgba(163,188,182,0.35); }
.btn-light:hover { background: rgba(163,188,182,0.22); color: #1a1a1a; border-color: rgba(45,142,84,0.3); }

.btn-outline-secondary { border-color: rgba(163,188,182,0.4); color: var(--sg-text-muted); }
.btn-outline-secondary:hover { background: rgba(163,188,182,0.15); color: var(--sg-text); border-color: rgba(163,188,182,0.5); }

.btn-outline-primary { border-color: var(--sg-green); color: var(--sg-green); }
.btn-outline-primary:hover { background: var(--sg-green); color: #fff; border-color: var(--sg-green); }

.btn-outline-warning { border-color: rgba(255,193,7,0.4); color: #997404; }
.btn-outline-warning:hover { background: rgba(255,193,7,0.1); color: #997404; border-color: rgba(255,193,7,0.5); }

.btn-dark { background: #1a1a1a; color: #fff; border-color: #1a1a1a; }
.btn-dark:hover { background: #111111; color: #fff; }

.btn-close { filter: none; }

.btn-link { color: var(--sg-green); }
.btn-link:hover { color: #3aad66; }

.btn-danger { background-color: #dc3545; border-color: #dc3545; }
.btn-danger:hover { background-color: #bb2d3b; border-color: #b02a37; }
.btn-outline-danger { border-color: rgba(220,53,69,0.5); color: #dc3545; }
.btn-outline-danger:hover { background-color: rgba(220,53,69,0.08); color: #dc3545; border-color: rgba(220,53,69,0.6); }
.btn-success { background-color: var(--sg-green); border-color: var(--sg-green); }
.btn-warning { background-color: #ffc107; border-color: #ffc107; color: #000; }
.btn-warning:hover { background-color: #ffca2c; }

/* Text utilities */
.text-secondary { color: var(--sg-text-muted) !important; }
.text-dark { color: var(--sg-text) !important; }
.text-muted { color: var(--sg-text-muted) !important; }
.text-body { color: var(--sg-text) !important; }
.text-warning-emphasis { color: #997404 !important; }
.text-black-50, .text-white-50 { color: var(--sg-text-muted) !important; }

/* Background utilities */
.bg-light { background-color: rgba(163,188,182,0.1) !important; }
.bg-white { background-color: #FFFFFF !important; }
.bg-body { background-color: transparent !important; }
.bg-warning-subtle { background-color: rgba(255,193,7,0.1) !important; }
.bg-body-tertiary { background-color: rgba(163,188,182,0.08) !important; }

/* Border utilities */
.border { border-color: rgba(163,188,182,0.35) !important; }
.border-bottom { border-bottom-color: rgba(163,188,182,0.35) !important; }
.border-light-subtle { border-color: rgba(163,188,182,0.35) !important; }
.border-warning-subtle { border-color: rgba(255,193,7,0.25) !important; }

/* Badge overrides */
.badge.bg-light { background-color: rgba(163,188,182,0.12) !important; color: var(--sg-text) !important; }
.badge.bg-warning { background-color: rgba(255,193,7,0.15) !important; color: #997404 !important; }
.bg-success-subtle { background-color: rgba(25,135,84,0.1) !important; }
.text-success { color: #198754 !important; }
.bg-secondary-subtle { background-color: rgba(108,117,125,0.1) !important; }
.bg-primary-subtle { background-color: rgba(13,110,253,0.1) !important; }
.text-primary { color: #0d6efd !important; }
.bg-danger-subtle { background-color: rgba(220,53,69,0.1) !important; }
.text-danger { color: #dc3545 !important; }

/* Modal */
.modal-content {
  background: #FFFFFF;
  border: 1px solid rgba(163,188,182,0.35);
  color: var(--sg-text);
}
.modal-header { border-bottom-color: rgba(163,188,182,0.3); }
.modal-footer { border-top-color: rgba(163,188,182,0.3); }

/* Form extras */
.form-label { color: var(--sg-text-muted); }
.form-check-input { background-color: #FFFFFF; border-color: rgba(163,188,182,0.5); }
.form-check-input:checked { background-color: var(--sg-green); border-color: var(--sg-green); }
.form-check-label { color: var(--sg-text); }
.form-text { color: var(--sg-text-muted) !important; }
.invalid-feedback { color: #dc3545; }

/* Card */
.card { background: #FFFFFF; border-color: rgba(163,188,182,0.35); color: var(--sg-text); }
.card-header { background: rgba(163,188,182,0.08); border-bottom-color: rgba(163,188,182,0.3); }
.card-body { color: var(--sg-text); }

/* Table */
.table { color: var(--sg-text); }
.table > :not(caption) > * > * { color: var(--sg-text); border-bottom-color: rgba(163,188,182,0.3); }
.table-hover > tbody > tr:hover > * { background-color: rgba(163,188,182,0.08); color: var(--sg-text); }

/* Misc Bootstrap components */
.small, small { color: inherit; }
.spinner-border.text-success { color: var(--sg-green) !important; }

.list-group-item { background-color: #FFFFFF; border-color: rgba(163,188,182,0.3); color: var(--sg-text); }
.list-group-item:hover { background-color: rgba(163,188,182,0.08); }

.accordion-item { background-color: #FFFFFF; border-color: rgba(163,188,182,0.3); color: var(--sg-text); }
.accordion-button { background-color: #FFFFFF; color: var(--sg-text); }
.accordion-button:not(.collapsed) { background-color: rgba(45,142,84,0.06); color: #2d8e54; }

.dropdown-menu { background-color: #FFFFFF; border-color: rgba(163,188,182,0.35); box-shadow: 0 8px 20px rgba(26,26,26,0.1); }
.dropdown-item { color: var(--sg-text); }
.dropdown-item:hover, .dropdown-item:focus { background-color: rgba(163,188,182,0.12); color: var(--sg-text); }
.dropdown-divider { border-top-color: rgba(163,188,182,0.3); }

.nav-tabs { border-bottom-color: rgba(163,188,182,0.3); }
.nav-tabs .nav-link { color: var(--sg-text-muted); }
.nav-tabs .nav-link:hover { border-color: rgba(163,188,182,0.3); color: var(--sg-text); }
.nav-tabs .nav-link.active { background-color: #FFFFFF; border-color: rgba(163,188,182,0.3); color: var(--sg-text); }

.alert { border-color: rgba(163,188,182,0.3); color: var(--sg-text); background-color: #FFFFFF; }
.alert-success { background-color: rgba(25,135,84,0.08); border-color: rgba(25,135,84,0.2); color: #198754; }
.alert-danger { background-color: rgba(220,53,69,0.08); border-color: rgba(220,53,69,0.2); color: #dc3545; }
.alert-warning { background-color: rgba(255,193,7,0.08); border-color: rgba(255,193,7,0.2); color: #997404; }
.alert-info { background-color: rgba(13,110,253,0.06); border-color: rgba(13,110,253,0.15); color: #0d6efd; }
.alert-link { color: inherit; font-weight: 600; }

.input-group-text { background-color: rgba(163,188,182,0.1); border-color: rgba(163,188,182,0.4); color: var(--sg-text-muted); }

.page-link { background-color: #FFFFFF; border-color: rgba(163,188,182,0.3); color: var(--sg-text); }
.page-link:hover { background-color: rgba(163,188,182,0.1); border-color: rgba(163,188,182,0.4); color: var(--sg-text); }
.page-item.active .page-link { background-color: var(--sg-green); border-color: var(--sg-green); color: #fff; }
.page-item.disabled .page-link { background-color: rgba(163,188,182,0.06); color: var(--sg-text-muted); }

.progress { background-color: rgba(163,188,182,0.15); }

hr { border-color: rgba(163,188,182,0.3); opacity: 0.5; }

/* ── Nav Profile Dropdown ─────────────────────────────────────────────── */
.nav-profile {
  position: relative;
}
.nav-profile-toggle {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.3rem 0.5rem;
  border-radius: 10px;
  transition: background 0.2s;
  color: #fff;
}
.nav-profile-toggle:hover {
  background: rgba(255,255,255,0.1);
}
.nav-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(255,255,255,0.3);
  flex-shrink: 0;
}
.nav-avatar-initials {
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--sg-green), var(--sg-green-dark));
  color: #fff;
  font-weight: 700;
  font-size: 0.8rem;
  letter-spacing: 0.02em;
}
.nav-profile-info {
  display: flex;
  flex-direction: column;
  text-align: left;
  line-height: 1.2;
}
.nav-profile-name {
  font-size: 0.82rem;
  font-weight: 600;
  color: #fff;
}
.nav-profile-title {
  font-size: 0.7rem;
  color: rgba(255,255,255,0.55);
}
.nav-profile-chevron {
  opacity: 0.5;
  transition: transform 0.2s;
  flex-shrink: 0;
}
.nav-profile.open .nav-profile-chevron {
  transform: rotate(180deg);
}
.nav-profile-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  min-width: 200px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 8px 30px rgba(26,26,26,0.15), 0 2px 8px rgba(26,26,26,0.08);
  border: 1px solid rgba(163,188,182,0.3);
  padding: 0.35rem;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: opacity 0.2s, visibility 0.2s, transform 0.2s;
  z-index: 1050;
}
.nav-profile.open .nav-profile-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.nav-profile-item {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.55rem 0.75rem;
  color: var(--sg-text);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 500;
  border-radius: 8px;
  transition: background 0.15s;
}
.nav-profile-item:hover {
  background: rgba(163,188,182,0.12);
  color: var(--sg-text);
}
.nav-profile-item svg {
  flex-shrink: 0;
  opacity: 0.5;
}
.nav-profile-divider {
  height: 1px;
  background: rgba(163,188,182,0.3);
  margin: 0.25rem 0.5rem;
}

/* ── Nav Quick Links ─────────────────────────────────────────────────── */
.nav-quicklinks {
  position: relative;
  margin-right: 0.25rem;
}
.nav-quicklinks-toggle {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.4rem 0.85rem;
  background: none;
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 10px;
  cursor: pointer;
  color: rgba(255,255,255,0.7);
  font-size: 0.85rem;
  font-weight: 500;
  white-space: nowrap;
  transition: all 0.2s;
}
.nav-quicklinks-toggle:hover {
  background: rgba(255,255,255,0.1);
  color: #fff;
}
.nav-quicklinks.open .nav-quicklinks-toggle {
  background: rgba(255,255,255,0.15);
  color: #fff;
}
.nav-quicklinks-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  min-width: 210px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 8px 30px rgba(26,26,26,0.15), 0 2px 8px rgba(26,26,26,0.08);
  border: 1px solid rgba(163,188,182,0.3);
  padding: 0.35rem;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: opacity 0.2s, visibility 0.2s, transform 0.2s;
  z-index: 1050;
}
.nav-quicklinks.open .nav-quicklinks-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.nav-quicklinks-header {
  padding: 0.4rem 0.75rem 0.25rem;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--sg-text-muted);
}

/* ── Nav Search ──────────────────────────────────────────────────────── */
.nav-search {
  position: relative;
  margin-right: auto;
  margin-left: 0.75rem;
}
.nav-search-box {
  display: flex;
  align-items: center;
  background: #f4f5f2;
  border: 1.5px solid #D2FF00;
  border-radius: 50px;
  padding: 0 0.85rem;
  height: 42px;
  transition: background 0.2s, border-color 0.2s, box-shadow 0.2s;
}
.nav-search-box:focus-within {
  background: #fff;
  border-color: #D2FF00;
  box-shadow: 0 0 0 2px rgba(210,255,0,0.25);
}
.nav-search-icon {
  color: var(--sg-text-muted);
  flex-shrink: 0;
}
.nav-search-input {
  background: none;
  border: none;
  outline: none;
  color: var(--sg-text);
  font-size: 0.85rem;
  padding: 0.5rem 0.6rem;
  width: 280px;
  transition: width 0.25s;
}
.nav-search-input::placeholder {
  color: var(--sg-text-muted);
}
.nav-search-input:focus {
  width: 380px;
}
.nav-search-results {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  min-width: 360px;
  max-height: 420px;
  overflow-y: auto;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 8px 30px rgba(26,26,26,0.15), 0 2px 8px rgba(26,26,26,0.08);
  border: 1px solid rgba(163,188,182,0.3);
  z-index: 1050;
}
.nav-search-results:empty {
  display: none;
}
.nav-search-result {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  padding: 0.65rem 0.85rem;
  text-decoration: none;
  color: var(--sg-text);
  border-bottom: 1px solid rgba(163,188,182,0.15);
  transition: background 0.15s;
}
.nav-search-result:last-child {
  border-bottom: none;
}
.nav-search-result:hover {
  background: rgba(163,188,182,0.08);
  color: var(--sg-text);
}
.nav-search-result-type {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--sg-green);
}
.nav-search-result-title {
  font-size: 0.88rem;
  font-weight: 600;
  line-height: 1.3;
}
.nav-search-result-meta {
  font-size: 0.75rem;
  color: var(--sg-text-muted);
}
.nav-search-empty {
  padding: 1rem;
  text-align: center;
  color: var(--sg-text-muted);
  font-size: 0.88rem;
}
.nav-search-action {
  background: rgba(45,142,84,0.04);
  border-left: 3px solid var(--sg-green);
}
.nav-search-action:hover {
  background: rgba(45,142,84,0.1);
}
.nav-search-action-type {
  color: var(--sg-green-dark) !important;
}

/* ── Left Sidebar ────────────────────────────────────────────────────── */
:root {
  --sidebar-width: 240px;
  --sidebar-collapsed-width: 62px;
  --sidebar-bg: #1a1a2e;
  --sidebar-text: rgba(255,255,255,0.9);
  --sidebar-text-hover: #fff;
  --sidebar-active-bg: rgba(45,142,84,0.25);
  --sidebar-active-text: #3aad66;
  --sidebar-divider: rgba(255,255,255,0.08);
}

.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: var(--sidebar-width);
  background: var(--sidebar-bg);
  z-index: 110;
  display: flex;
  flex-direction: column;
  transition: width 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: visible;
}

.sidebar.collapsed {
  width: var(--sidebar-collapsed-width);
}
.sidebar-inner {
  display: flex;
  flex-direction: column;
  height: 100%;
  width: 100%;
  overflow: hidden;
  background: var(--sidebar-bg);
}

/* Sidebar brand area */
.sidebar-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.85rem 1rem;
  height: 80px;
  border-bottom: 1px solid var(--sidebar-divider);
  flex-shrink: 0;
  text-decoration: none;
}
.sidebar-logo-full {
  height: 48px;
  width: auto;
  display: block;
}
.sidebar-logo-icon {
  height: 36px;
  width: auto;
  display: none;
}
.sidebar.collapsed .sidebar-logo-full {
  display: none;
}
.sidebar.collapsed .sidebar-logo-icon {
  display: block;
}
.sidebar-brand-text {
  font-size: 0.82rem;
  font-weight: 700;
  color: #fff;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  opacity: 1;
  transition: opacity 0.2s;
}
.sidebar.collapsed .sidebar-brand-text {
  opacity: 0;
  width: 0;
}

/* Sidebar nav links */
.sidebar-nav {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 0.5rem 0;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.1) transparent;
  min-height: 0;
}
.sidebar-nav::-webkit-scrollbar { width: 4px; }
.sidebar-nav::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 4px; }

.sidebar-section {
  padding: 0.6rem 1rem 0.25rem;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(255,255,255,0.35);
  white-space: nowrap;
  overflow: hidden;
}
.sidebar.collapsed .sidebar-section {
  text-indent: -999px;
  padding: 0.6rem 0 0.25rem;
}
.sidebar.collapsed .sidebar-section::after {
  content: '';
  display: block;
  width: 24px;
  height: 1px;
  background: var(--sidebar-divider);
  margin: 0 auto;
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.55rem 1rem;
  margin: 1px 0.5rem;
  border-radius: 8px;
  color: var(--sidebar-text);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 500;
  white-space: nowrap;
  transition: background 0.15s, color 0.15s;
  position: relative;
}
.sidebar-link:hover {
  background: rgba(209,213,219,0.12);
  color: #fff;
}
.sidebar-link:hover i {
  color: #D2FF00;
}
.sidebar-link.active {
  background: linear-gradient(135deg, #2d8e54, #3aad66);
  color: #fff;
  font-weight: 700;
}
.sidebar-link.active i {
  color: #fff;
  transform: rotate(15deg);
}
.sidebar-link.active::before {
  display: none;
}

/* Pulsating red glow for Suggestions */
.sidebar-link-pulse {
  margin-top: 0.5rem;
  margin-bottom: 0.5rem;
  border: 1px solid rgba(229,57,53,0.5);
  animation: sidebarPulse 2s ease-in-out infinite;
}
.sidebar-link-pulse i {
  color: #e53935;
}
.sidebar-link-pulse:hover {
  background: rgba(229,57,53,0.15) !important;
  border-color: rgba(229,57,53,0.7);
}
.sidebar-link-pulse:hover i {
  color: #ff5252 !important;
}
@keyframes sidebarPulse {
  0%, 100% {
    box-shadow: 0 0 6px rgba(229,57,53,0.3), 0 0 12px rgba(229,57,53,0.15);
  }
  50% {
    box-shadow: 0 0 12px rgba(229,57,53,0.5), 0 0 24px rgba(229,57,53,0.25);
  }
}
.sidebar-link i {
  font-size: 1.05rem;
  width: 22px;
  text-align: center;
  flex-shrink: 0;
  transition: transform 0.2s ease;
}
.sidebar-link-text {
  overflow: hidden;
  opacity: 1;
  transition: opacity 0.2s;
}
.sidebar.collapsed .sidebar-link-text {
  opacity: 0;
  width: 0;
}
.sidebar-link .sidebar-badge {
  margin-left: auto;
  background: #e53935;
  color: #fff;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 0.1rem 0.45rem;
  border-radius: 10px;
  line-height: 1.3;
}
.sidebar.collapsed .sidebar-badge {
  position: absolute;
  top: 2px;
  right: 2px;
  margin: 0;
  padding: 0.05rem 0.3rem;
  font-size: 0.55rem;
}

/* External link indicator */
.sidebar-link-external::after {
  content: '\F1C5';
  font-family: 'bootstrap-icons';
  font-size: 0.6rem;
  opacity: 0.4;
  margin-left: auto;
}
.sidebar.collapsed .sidebar-link-external::after {
  display: none;
}

/* Sidebar collapse toggle — bottom button (hidden, kept for fallback) */
.sidebar-toggle {
  display: none;
}

/* Sidebar edge collapse tab — visible tab on right edge, centered vertically */
.sidebar-collapse-tab {
  position: fixed;
  left: var(--sidebar-width);
  top: 50%;
  transform: translateY(-50%);
  width: 24px;
  height: 64px;
  background: var(--sidebar-bg);
  border: 1px solid rgba(255,255,255,0.15);
  border-left: none;
  border-radius: 0 8px 8px 0;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255,255,255,0.6);
  font-size: 0.85rem;
  transition: left 0.25s cubic-bezier(0.4, 0, 0.2, 1), color 0.15s, background 0.15s;
  z-index: 112;
}
body.has-sidebar.sidebar-is-collapsed .sidebar-collapse-tab {
  left: var(--sidebar-collapsed-width);
}
.sidebar-collapse-tab:hover {
  color: #fff;
  background: rgba(45,142,84,0.5);
}
.sidebar-collapse-tab i {
  transition: transform 0.25s;
}
.sidebar.collapsed .sidebar-collapse-tab i {
  transform: rotate(180deg);
}

/* Tooltip for collapsed sidebar */
.sidebar.collapsed .sidebar-link {
  position: relative;
}
.sidebar.collapsed .sidebar-link::after {
  content: attr(data-tooltip);
  position: absolute;
  left: calc(100% + 12px);
  top: 50%;
  transform: translateY(-50%);
  background: #1a1a1a;
  color: #fff;
  padding: 0.35rem 0.65rem;
  border-radius: 6px;
  font-size: 0.78rem;
  font-weight: 500;
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.15s, visibility 0.15s;
  z-index: 200;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}
.sidebar.collapsed .sidebar-link-external::after {
  /* Override external icon with tooltip in collapsed mode */
  content: attr(data-tooltip);
  position: absolute;
  left: calc(100% + 12px);
  top: 50%;
  transform: translateY(-50%);
  background: #1a1a1a;
  color: #fff;
  padding: 0.35rem 0.65rem;
  border-radius: 6px;
  font-size: 0.78rem;
  font-weight: 500;
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.15s, visibility 0.15s;
  z-index: 200;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
  margin-left: 0;
}
.sidebar.collapsed .sidebar-link:hover::after {
  opacity: 1;
  visibility: visible;
}

/* ── Layout adjustments for sidebar ──────────────────────────────────── */
/* When sidebar is present, shift the top nav and body content */
body.has-sidebar {
  padding-top: 80px;
}
body.has-sidebar .top-nav,
body.has-sidebar .app-header {
  left: var(--sidebar-width);
  transition: left 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}
body.has-sidebar.sidebar-is-collapsed .top-nav,
body.has-sidebar.sidebar-is-collapsed .app-header {
  left: var(--sidebar-collapsed-width);
}

body.has-sidebar .main-content-area,
body.has-sidebar .page-container,
body.has-sidebar .main-container,
body.has-sidebar .app-shell {
  margin-left: var(--sidebar-width);
  max-width: none !important;
  width: auto !important;
  transition: margin-left 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}
body.has-sidebar.sidebar-is-collapsed .main-content-area,
body.has-sidebar.sidebar-is-collapsed .page-container,
body.has-sidebar.sidebar-is-collapsed .main-container,
body.has-sidebar.sidebar-is-collapsed .app-shell {
  margin-left: var(--sidebar-collapsed-width);
}

/* Remove max-width from nested containers when sidebar is active */
body.has-sidebar .page-container .container-custom,
body.has-sidebar .main-container .container-custom,
body.has-sidebar .dash-container,
body.has-sidebar .fm-header,
body.has-sidebar .fm-body {
  max-width: none !important;
  width: auto !important;
}

body.has-sidebar .site-footer {
  margin-left: var(--sidebar-width);
  transition: margin-left 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}
body.has-sidebar.sidebar-is-collapsed .site-footer {
  margin-left: var(--sidebar-collapsed-width);
}

/* Mobile sidebar — overlay mode */
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 105;
  opacity: 0;
  transition: opacity 0.25s;
}
.sidebar-overlay.active {
  opacity: 1;
}

/* Mobile hamburger button */
.sidebar-mobile-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: none;
  border: none;
  color: #fff;
  font-size: 1.3rem;
  cursor: pointer;
  border-radius: 8px;
  transition: background 0.15s;
  margin-right: 0.5rem;
}
.sidebar-mobile-toggle:hover {
  background: rgba(255,255,255,0.1);
}

@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
    width: var(--sidebar-width) !important;
    z-index: 1100;
  }
  .sidebar.mobile-open {
    transform: translateX(0);
  }
  .sidebar-overlay {
    display: block;
  }
  .sidebar-mobile-toggle {
    display: flex;
  }
  body.has-sidebar .top-nav,
  body.has-sidebar .app-header {
    left: 0 !important;
  }
  body.has-sidebar .main-content-area,
  body.has-sidebar .page-container,
  body.has-sidebar .main-container,
  body.has-sidebar .app-shell,
  body.has-sidebar .site-footer {
    margin-left: 0 !important;
  }
  .sidebar-collapse-tab {
    display: none !important;
  }
}

/* ── Site footer ─────────────────────────────────────────────────────── */
.site-footer {
  text-align: center;
  padding: 1.5rem 1rem;
  font-size: 0.8rem;
  color: var(--sg-text-muted);
  border-top: 1px solid rgba(163,188,182,0.2);
  margin-top: 2rem;
}

/* ── Responsive nav breakpoints ───────────────────────────────────────── */
@media (max-width: 768px) {
  .top-nav .nav-links { gap: 0; }
  .top-nav .nav-link { padding: 0.35rem 0.5rem; font-size: 0.82rem; }
  .top-nav .brand { font-size: 0.95rem; }
  .nav-profile-info { display: none; }
  .nav-profile-chevron { display: none; }
  .nav-search-input { width: 160px; }
  .nav-search-input:focus { width: 220px; }
  .nav-search-results { min-width: 280px; }
}
@media (max-width: 480px) {
  .top-nav .brand span:not(.brand-icon) { display: none; }
  .top-nav { padding: 0 0.75rem; }
  .brand-logo { height: 36px; }
}
@media (max-width: 575px) {
  .app-header { padding: 0 0.75rem; }
  .app-header .nav-links { gap: 0; }
  .app-header .nav-link { padding: 0.35rem 0.5rem; font-size: 0.82rem; }
  .brand-mark span:not(.brand-icon) { display: none; }
  .app-header .nav-profile-info { display: none; }
  .app-header .nav-profile-chevron { display: none; }
}

/* ── AI Chat Widget ──────────────────────────────────────────────────── */
.chat-fab {
  position: fixed; bottom: 1.5rem;
  left: calc(var(--sidebar-width) + 1.5rem); z-index: 9990;
  width: 56px; height: 56px; border-radius: 50%;
  background: linear-gradient(135deg, var(--sg-green), var(--sg-green-dark));
  color: #fff; border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem;
  box-shadow: 0 4px 16px rgba(45,142,84,0.35);
  transition: left 0.25s cubic-bezier(0.4,0,0.2,1), transform 0.2s, box-shadow 0.2s;
}
body.sidebar-is-collapsed .chat-fab {
  left: calc(var(--sidebar-collapsed-width) + 1.5rem);
}
.chat-fab:hover { transform: scale(1.08); box-shadow: 0 6px 24px rgba(45,142,84,0.45); }
.chat-fab.has-open { display: none; }
.chat-panel {
  position: fixed; bottom: 1.5rem;
  left: calc(var(--sidebar-width) + 1.5rem); z-index: 9991;
  width: min(420px, calc(100vw - var(--sidebar-width) - 3rem));
  height: min(600px, calc(100vh - 6rem));
  background: #fff; border-radius: 16px;
  box-shadow: 0 12px 48px rgba(0,0,0,0.18);
  display: none; flex-direction: column;
  overflow: hidden;
  transition: left 0.25s cubic-bezier(0.4,0,0.2,1), width 0.25s cubic-bezier(0.4,0,0.2,1);
}
body.sidebar-is-collapsed .chat-panel {
  left: calc(var(--sidebar-collapsed-width) + 1.5rem);
  width: min(420px, calc(100vw - var(--sidebar-collapsed-width) - 3rem));
}
.chat-panel.open { display: flex; }
.chat-header {
  display: flex; align-items: center; gap: 0.5rem;
  padding: 0.85rem 1rem;
  background: linear-gradient(135deg, var(--sg-green), var(--sg-green-dark));
  color: #fff; flex-shrink: 0;
}
.chat-header-title { font-weight: 700; font-size: 0.95rem; flex: 1; }
.chat-header-sub { font-size: 0.7rem; opacity: 0.7; }
.chat-close {
  background: rgba(255,255,255,0.15); border: none; color: #fff;
  width: 30px; height: 30px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; font-size: 1rem; transition: background 0.15s;
}
.chat-close:hover { background: rgba(255,255,255,0.3); }
.chat-new {
  background: rgba(255,255,255,0.15); border: none; color: #fff;
  padding: 0.2rem 0.5rem; border-radius: 6px;
  font-size: 0.7rem; font-weight: 600; cursor: pointer;
  transition: background 0.15s;
}
.chat-new:hover { background: rgba(255,255,255,0.3); }
.chat-messages {
  flex: 1; overflow-y: auto; padding: 1rem;
  display: flex; flex-direction: column; gap: 0.75rem;
}
.chat-msg {
  max-width: 85%; padding: 0.65rem 0.85rem;
  border-radius: 12px; font-size: 0.85rem; line-height: 1.5;
  word-wrap: break-word;
}
.chat-msg.user {
  align-self: flex-end;
  background: linear-gradient(135deg, var(--sg-green), var(--sg-green-dark));
  color: #fff; border-bottom-right-radius: 4px;
}
.chat-msg.assistant {
  align-self: flex-start;
  background: #f3f4f6; color: var(--sg-text);
  border-bottom-left-radius: 4px;
}
.chat-msg.assistant p { margin: 0 0 0.4rem; }
.chat-msg.assistant p:last-child { margin: 0; }
.chat-msg.assistant ul, .chat-msg.assistant ol { margin: 0.3rem 0; padding-left: 1.2rem; }
.chat-msg.assistant strong { font-weight: 700; }
.chat-msg.assistant code { background: rgba(0,0,0,0.06); padding: 0.1rem 0.3rem; border-radius: 4px; font-size: 0.8rem; }
.chat-msg.error {
  align-self: center; background: rgba(239,68,68,0.08);
  color: #dc2626; font-size: 0.8rem; text-align: center;
}
.chat-msg .chat-report { margin-top: 0.5rem; }
.chat-msg .chat-report h3 { font-size: 0.9rem; font-weight: 700; margin: 0 0 0.5rem; }
.chat-msg .chat-report table { width: 100%; border-collapse: collapse; font-size: 0.78rem; }
.chat-msg .chat-report th, .chat-msg .chat-report td { padding: 0.3rem 0.5rem; border: 1px solid #e5e7eb; text-align: left; }
.chat-msg .chat-report th { background: #f9fafb; font-weight: 700; }
.chat-typing {
  align-self: flex-start;
  padding: 0.65rem 0.85rem; background: #f3f4f6;
  border-radius: 12px; border-bottom-left-radius: 4px;
  display: none; gap: 0.3rem; align-items: center;
}
.chat-typing.show { display: flex; }
.chat-typing-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: #9ca3af;
  animation: chatTyping 1.2s ease-in-out infinite;
}
.chat-typing-dot:nth-child(2) { animation-delay: 0.2s; }
.chat-typing-dot:nth-child(3) { animation-delay: 0.4s; }
@keyframes chatTyping {
  0%, 60%, 100% { opacity: 0.3; transform: translateY(0); }
  30% { opacity: 1; transform: translateY(-3px); }
}
.chat-input-area {
  display: flex; gap: 0.5rem; padding: 0.75rem 1rem;
  border-top: 1px solid rgba(163,188,182,0.2); flex-shrink: 0;
}
.chat-input {
  flex: 1; padding: 0.55rem 0.75rem; border-radius: 10px;
  border: 1px solid rgba(163,188,182,0.3);
  font-size: 0.85rem; resize: none; min-height: 38px; max-height: 100px;
  font-family: inherit;
}
.chat-input:focus { outline: none; border-color: var(--sg-green); }
.chat-send {
  width: 38px; height: 38px; border-radius: 10px;
  background: linear-gradient(135deg, var(--sg-green), var(--sg-green-dark));
  color: #fff; border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem; transition: all 0.15s; flex-shrink: 0;
}
.chat-send:hover { transform: scale(1.05); }
.chat-send:disabled { opacity: 0.4; cursor: default; transform: none; }
.chat-welcome {
  text-align: center; padding: 2rem 1.5rem; color: var(--sg-text-muted);
}
.chat-welcome i { font-size: 2.5rem; color: var(--sg-green); opacity: 0.5; display: block; margin-bottom: 0.75rem; }
.chat-welcome h4 { font-size: 1rem; font-weight: 700; color: var(--sg-text); margin: 0 0 0.3rem; }
.chat-welcome p { font-size: 0.82rem; margin: 0; }
@media (max-width: 768px) {
  .chat-fab,
  body.sidebar-is-collapsed .chat-fab { left: 1rem; }
  .chat-panel,
  body.sidebar-is-collapsed .chat-panel {
    left: 0.5rem; width: calc(100vw - 1rem);
  }
}
@media (max-width: 480px) {
  .chat-panel,
  body.sidebar-is-collapsed .chat-panel {
    bottom: 0.5rem; height: calc(100vh - 5rem);
  }
  .chat-fab { bottom: 1rem; }
}

/* ── Make It Better (MIB) — clone of seegars360 UI ────────────────────── */
.mib-tab {
  position: fixed; right: 0; bottom: 6rem; z-index: 50;
  background: linear-gradient(180deg, #f59e0b, #ea580c);
  color: #fff; border: none; cursor: pointer;
  padding: 1rem 0.5rem;
  border-top-left-radius: 8px; border-bottom-left-radius: 8px;
  font-family: 'DM Sans', system-ui, sans-serif;
  font-weight: 700; font-size: 0.95rem; letter-spacing: 0.1em;
  line-height: 1; text-transform: uppercase;
  writing-mode: vertical-rl; text-orientation: mixed;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
  text-rendering: geometricPrecision;
  box-shadow: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -4px rgba(0,0,0,0.1);
  transition: padding-right 0.2s, box-shadow 0.2s;
  user-select: none;
}
.mib-tab:hover { padding-right: 0.75rem; box-shadow: 0 20px 25px -5px rgba(0,0,0,0.15), 0 8px 10px -6px rgba(0,0,0,0.1); }
.mib-tab.hidden { display: none; }
.mib-panel {
  position: fixed; right: 1rem; bottom: 1.5rem; z-index: 50;
  width: 340px; max-width: calc(100vw - 1.5rem);
  background: #fff; border-radius: 1rem;
  box-shadow: 0 25px 50px -12px rgba(0,0,0,0.25);
  border: 1px solid #e5e7eb;
  overflow: hidden;
  display: none;
  animation: mibPanelIn 0.18s ease-out;
}
.mib-panel.open { display: block; }
@keyframes mibPanelIn { from { transform: translateY(8px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
.mib-panel-head {
  background: linear-gradient(90deg, #f59e0b, #ea580c);
  padding: 0.75rem 1rem;
  display: flex; align-items: flex-start; justify-content: space-between; gap: 0.5rem;
}
.mib-panel-head h3 { color: #fff; font-weight: 700; font-size: 0.875rem; line-height: 1.15; margin: 0; }
.mib-panel-head p { color: #fef3c7; font-size: 10px; margin: 0; }
.mib-panel-close {
  background: none; border: none; color: rgba(255,255,255,0.85);
  cursor: pointer; padding: 0; line-height: 0;
  transition: color 0.15s;
}
.mib-panel-close:hover { color: #fff; }
.mib-panel-close i { font-size: 1.15rem; }
.mib-intro { padding: 0.75rem 1rem 0.5rem; }
.mib-intro-card {
  background: #fffbeb; border: 1px solid #fde68a;
  border-radius: 0.75rem; padding: 0.75rem;
  font-size: 0.75rem; color: #78350f;
  line-height: 1.55;
}
.mib-intro-card p.lead { font-weight: 600; color: #92400e; margin: 0 0 0.35rem; }
.mib-intro-card p { margin: 0 0 0.35rem; }
.mib-intro-card ul { list-style: none; padding: 0; margin: 0.3rem 0 0.4rem 0.25rem; }
.mib-intro-card ul li { display: flex; align-items: flex-start; gap: 0.35rem; margin-bottom: 0.1rem; }
.mib-intro-card ul li::before { content: '•'; color: #f97316; font-weight: 700; margin-top: -1px; }
.mib-intro-card p.note { font-size: 10px; color: #b45309; margin: 0.25rem 0 0; }
.mib-intro-cta {
  width: 100%; margin-top: 0.5rem;
  display: flex; align-items: center; justify-content: center; gap: 0.25rem;
  background: none; border: none;
  color: #ea580c; font-weight: 500; font-size: 0.75rem;
  padding: 0.25rem 0; cursor: pointer;
  transition: color 0.15s;
}
.mib-intro-cta:hover { color: #c2410c; }
.mib-intro-cta i { font-size: 0.85rem; }
.mib-form-body { padding: 1rem; display: flex; flex-direction: column; gap: 0.75rem; }
.mib-textarea {
  width: 100%; padding: 0.5rem 0.75rem;
  border: 1px solid #e5e7eb; border-radius: 0.5rem;
  font-size: 0.875rem; font-family: inherit; resize: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.mib-textarea:focus { outline: none; border-color: #fbbf24; box-shadow: 0 0 0 2px rgba(251,191,36,0.4); }
.mib-actions-row { display: flex; align-items: center; gap: 0.5rem; }
.mib-action-btn {
  display: inline-flex; align-items: center; gap: 0.375rem;
  padding: 0.375rem 0.75rem; border-radius: 0.5rem;
  background: #f3f4f6; border: 1px solid transparent;
  color: #374151; font-size: 0.75rem; font-weight: 600;
  cursor: pointer; transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.mib-action-btn:hover { background: #e5e7eb; }
.mib-action-btn:disabled { opacity: 0.5; cursor: not-allowed; }
.mib-action-btn i { font-size: 0.85rem; }
.mib-action-btn.recording {
  background: #ef4444; color: #fff;
}
.mib-action-btn.recording:hover { background: #dc2626; }
.mib-action-btn.has-audio { background: #dcfce7; color: #15803d; border-color: #bbf7d0; }
.mib-action-btn.has-screenshot { background: #dbeafe; color: #1d4ed8; border-color: #bfdbfe; }
.mib-action-btn .mib-spinner { display: inline-block; width: 0.85rem; height: 0.85rem; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: mibSpin 0.6s linear infinite; }
@keyframes mibSpin { to { transform: rotate(360deg); } }
.mib-screenshot-preview { position: relative; }
.mib-screenshot-preview img { width: 100%; border-radius: 0.5rem; border: 1px solid #e5e7eb; display: block; }
.mib-screenshot-preview .mib-remove-shot {
  position: absolute; top: 0.25rem; right: 0.25rem;
  background: rgba(0,0,0,0.5); color: #fff; border: none; border-radius: 50%;
  width: 1.1rem; height: 1.1rem; cursor: pointer;
  display: flex; align-items: center; justify-content: center; padding: 0;
}
.mib-screenshot-preview .mib-remove-shot i { font-size: 0.7rem; }
.mib-page-line { font-size: 10px; color: #9ca3af; margin: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mib-form-footer { padding: 0 1rem 1rem; }
.mib-submit {
  width: 100%;
  display: flex; align-items: center; justify-content: center; gap: 0.5rem;
  padding: 0.625rem 1rem;
  background: linear-gradient(90deg, #f59e0b, #ea580c);
  color: #fff; border: none; border-radius: 0.5rem;
  font-weight: 700; font-size: 0.875rem; cursor: pointer;
  transition: opacity 0.15s;
}
.mib-submit:hover { opacity: 0.9; }
.mib-submit:disabled { opacity: 0.4; cursor: not-allowed; }
.mib-submit i { font-size: 1rem; }
.mib-toast {
  position: fixed; top: 1rem; left: 50%; transform: translateX(-50%) translateY(-20px);
  background: #15803d; color: #fff;
  padding: 0.55rem 1rem; border-radius: 0.5rem;
  font-size: 0.85rem; font-weight: 500;
  box-shadow: 0 10px 15px -3px rgba(0,0,0,0.1);
  z-index: 60; opacity: 0; pointer-events: none;
  transition: opacity 0.2s, transform 0.2s;
}
.mib-toast.error { background: #dc2626; }
.mib-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
@media (max-width: 480px) {
  .mib-panel { right: 0.5rem; bottom: 0.5rem; width: calc(100vw - 1rem); }
  .mib-tab { bottom: 5rem; }
}

/* ── SeegarsONE Feedback Admin Page ───────────────────────────────────── */
.s1f-page { padding: 1.5rem 2rem 4rem; max-width: 1200px; margin: 0 auto; }
.s1f-header { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.25rem; }
.s1f-header h1 { font-size: clamp(1.5rem, 3vw, 2.1rem); font-weight: 800; margin: 0; line-height: 1.2; }
.s1f-header .gradient-text { background: linear-gradient(135deg, #f97316, #ea580c); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.s1f-header p { color: var(--sg-text-muted); font-size: 0.9rem; margin: 0.3rem 0 0; }
.s1f-stats { display: flex; gap: 0.6rem; flex-wrap: wrap; margin-bottom: 1.25rem; }
.s1f-stat { background: #fff; border: 1px solid rgba(163,188,182,0.3); border-radius: 12px; padding: 0.7rem 1rem; min-width: 110px; }
.s1f-stat-label { font-size: 0.7rem; font-weight: 700; color: var(--sg-text-muted); text-transform: uppercase; letter-spacing: 0.06em; }
.s1f-stat-value { font-size: 1.4rem; font-weight: 800; color: var(--sg-text); margin-top: 0.15rem; }
.s1f-filters { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-bottom: 1rem; }
.s1f-filter-chip { padding: 0.45rem 0.95rem; border-radius: 999px; border: 1px solid rgba(163,188,182,0.35); background: #fff; color: var(--sg-text-muted); font-weight: 600; font-size: 0.83rem; text-decoration: none; transition: all 0.15s; }
.s1f-filter-chip:hover { border-color: #f97316; color: #ea580c; }
.s1f-filter-chip.active { background: linear-gradient(135deg, #f97316, #ea580c); color: #fff; border-color: transparent; }
.s1f-list { display: flex; flex-direction: column; gap: 0.85rem; }
.s1f-card { background: #fff; border: 1px solid rgba(163,188,182,0.3); border-radius: 14px; padding: 1rem 1.2rem; transition: box-shadow 0.15s; }
.s1f-card:hover { box-shadow: 0 6px 18px rgba(0,0,0,0.06); }
.s1f-card.status-resolved { border-left: 3px solid #15803d; }
.s1f-card.status-in_progress { border-left: 3px solid #2563eb; }
.s1f-card.status-dismissed { border-left: 3px solid #6b7280; opacity: 0.75; }
.s1f-card.status-new { border-left: 3px solid #f97316; }
.s1f-card-head { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; flex-wrap: wrap; margin-bottom: 0.6rem; }
.s1f-card-meta { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; font-size: 0.78rem; color: var(--sg-text-muted); }
.s1f-card-meta .by { color: var(--sg-text); font-weight: 700; }
.s1f-card-status { font-size: 0.7rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; padding: 0.2rem 0.55rem; border-radius: 999px; }
.s1f-card-status.new { background: rgba(249,115,22,0.12); color: #c2410c; }
.s1f-card-status.in_progress { background: rgba(37,99,235,0.12); color: #1d4ed8; }
.s1f-card-status.resolved { background: rgba(21,128,61,0.12); color: #15803d; }
.s1f-card-status.dismissed { background: rgba(107,114,128,0.14); color: #4b5563; }
.s1f-message { font-size: 0.92rem; color: var(--sg-text); white-space: pre-wrap; line-height: 1.55; margin: 0.4rem 0; }
.s1f-attachments { display: flex; gap: 0.5rem; flex-wrap: wrap; margin: 0.6rem 0; }
.s1f-attachment { display: inline-flex; align-items: center; gap: 0.35rem; padding: 0.4rem 0.7rem; border-radius: 8px; background: #f9fafb; border: 1px solid #e5e7eb; font-size: 0.8rem; color: var(--sg-text); text-decoration: none; }
.s1f-attachment:hover { background: #f3f4f6; }
.s1f-attachment audio { height: 30px; max-width: 240px; }
.s1f-attachment img { max-width: 80px; max-height: 60px; border-radius: 4px; object-fit: cover; }
.s1f-actions { display: flex; gap: 0.4rem; flex-wrap: wrap; margin-top: 0.7rem; padding-top: 0.7rem; border-top: 1px solid rgba(163,188,182,0.18); }
.s1f-act-btn { padding: 0.35rem 0.75rem; border-radius: 7px; border: 1px solid rgba(163,188,182,0.35); background: #fff; font-size: 0.78rem; font-weight: 600; color: var(--sg-text-muted); cursor: pointer; transition: all 0.15s; }
.s1f-act-btn:hover { background: #f9fafb; color: var(--sg-text); }
.s1f-act-btn.s1f-act-resolve { border-color: rgba(21,128,61,0.35); color: #15803d; }
.s1f-act-btn.s1f-act-resolve:hover { background: rgba(21,128,61,0.08); }
.s1f-act-btn.s1f-act-progress { border-color: rgba(37,99,235,0.35); color: #1d4ed8; }
.s1f-act-btn.s1f-act-progress:hover { background: rgba(37,99,235,0.08); }
.s1f-act-btn.s1f-act-dismiss { border-color: rgba(107,114,128,0.35); }
.s1f-act-btn.s1f-act-delete { border-color: rgba(220,38,38,0.35); color: #b91c1c; margin-left: auto; }
.s1f-act-btn.s1f-act-delete:hover { background: rgba(220,38,38,0.08); }
.s1f-empty { text-align: center; padding: 3rem 1rem; color: var(--sg-text-muted); background: #fff; border-radius: 12px; border: 1px dashed rgba(163,188,182,0.4); }
.s1f-empty i { font-size: 2.4rem; opacity: 0.4; display: block; margin-bottom: 0.5rem; }
.s1f-notes { margin-top: 0.6rem; }
.s1f-notes-textarea { width: 100%; min-height: 50px; padding: 0.5rem 0.65rem; border-radius: 8px; border: 1px solid rgba(163,188,182,0.3); font-size: 0.85rem; font-family: inherit; resize: vertical; }
.s1f-notes-saved { font-size: 0.75rem; color: #15803d; margin-left: 0.5rem; opacity: 0; transition: opacity 0.2s; }
.s1f-notes-saved.show { opacity: 1; }
