:root{
  --green-700:#1e7a3f;     /* primary bar (richer but lighter than dark) */
  --green-600:#2ca357;     /* main nav */
  --green-500:#38b56b;
  --green-400:#63c88b;
  --green-100:#eaf6ee;
  --green-050:#f4fbf6;
  --text:#1b1d1f;
  --muted:#6b7280;
  --card:#ffffff;
  --border:#e8edf0;
  --danger:#c62828;
  --purple:#8e24aa;
}

*{box-sizing:border-box}
html,body{margin:0;padding:0;background:var(--green-050);color:var(--text);font-family:Inter,system-ui,-apple-system,Segoe UI,Roboto,Helvetica,Arial,sans-serif;line-height:1.45}
a{color:#0b6cda;text-decoration:none}
a:hover{text-decoration:underline}

.site-header{
  /* OLD */
  /* background:linear-gradient(90deg,#061a14,#0b3325); */

  /* NEW – matches your site greens */
  background:linear-gradient(120deg,var(--green-700),var(--green-500));
  color:#fff;
  padding:10px 18px;
}

/* New inner container for logo + nav in one row */
.site-header-inner{
  max-width:1200px;
  margin:0 auto;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:32px;
}

.brand{
  display:flex;
  align-items:center;
  gap:12px;
}

/* New wrapper that controls header height */
.logo-wrap{
  height:64px;           /* this is your effective bar height */
  display:flex;
  align-items:center;
  overflow:hidden;       /* crops extra glow/background */
}

/* Actual logo can be larger than the wrapper to feel “big” */
.logo{
  height:200px;          /* visual size of the graphic */
  width:auto;
  display:block;
  filter:
    drop-shadow(0 1px 1px rgba(0,0,0,.35))
    drop-shadow(0 0 3px rgba(255,255,255,.4))
    contrast(1.15)
    brightness(1.1)
    saturate(1.1);
}

.logo-fallback{height:42px;width:42px;border-radius:10px;background:#fff1;border:1px solid #fff3;display:flex;align-items:center;justify-content:center;font-weight:700}
.brand-text .brand-title{font-weight:800;font-size:20px;margin-bottom:2px}
.brand-text .brand-sub{font-size:12px;opacity:.95}
.role-badge{display:inline-block;padding:2px 8px;border-radius:999px;background:#fff2;color:#fff;border:1px solid #fff3;font-size:11px;margin-left:6px;text-transform:lowercase}
.role-badge.admin{background:#fff1}
.role-badge.manager{background:#fff1}
.role-badge.employee{background:#fff1}

.store-badge{
  display:inline-block;
  padding:2px 8px;
  border-radius:999px;
  font-size:11px;
  margin-left:6px;
  background:#111827;
  color:#e5e7eb;
  border:1px solid rgba(255,255,255,0.18);
  text-transform:none;
}

.main-nav{
  display:flex;
  gap:16px;
  justify-content:center;
  align-items:center;
  flex-wrap:wrap;
  margin-top:0; /* keep nav aligned with logo in the same bar */
}

.main-nav a{color:#fff;font-weight:600;padding:8px 10px;border-radius:8px}
.main-nav a:hover{background:#ffffff22}
.main-nav a.active{
  background:#ffffff;
  color:#1b5e20;
  box-shadow:0 0 0 1px #ffffff44;
}

.badge{background:#fff;color:#0b6c0b;border-radius:999px;padding:2px 7px;font-size:11px;margin-left:6px}

.manager-bar{
  background:transparent;
  color:#1b5e20;
  padding:8px 14px 0;
  display:flex;
  gap:8px;
  justify-content:flex-start;
  flex-wrap:wrap;
}
.manager-bar a{
  color:#1b5e20;
  font-weight:600;
  padding:4px 8px;
  border-radius:999px;
  background:#eaf6ee;
}
.manager-bar a:hover{
  background:#d6eee1;
}


.page{max-width:1200px;margin:18px auto;padding:0 14px}
.container{display:block}
.card{
  background:var(--card);
  border:1px solid var(--border);
  border-radius:12px;
  padding:14px;
  margin-bottom:12px;
  box-shadow:0 1px 0 rgba(16,24,40,.04);
}
.list>.card{margin-bottom:8px}

h1,h2,h3{margin:0 0 10px 0}
h2{font-size:22px}
h3{font-size:18px}
.muted{color:var(--muted);font-size:12px}

.btn, button, .button{
  appearance:none;border:none;background:var(--green-600);color:#fff;
  padding:8px 12px;border-radius:8px;font-weight:700;cursor:pointer;
  box-shadow:0 1px 0 rgba(0,0,0,.05);
}
.btn:hover, button:hover{background:var(--green-700)}
.btn.secondary{background:#e2e8f0;color:#1b1d1f}
.btn.purple{background:var(--purple)}

.ok{background:#ecfdf3;border:1px solid #bbf7d0;color:#166534;padding:8px 10px;border-radius:8px;margin-bottom:8px}
.error{background:#fef2f2;border:1px solid #fecaca;color:#991b1b;padding:8px 10px;border-radius:8px;margin-bottom:8px}

input,select,textarea{
  width:100%;padding:9px 10px;border:1px solid var(--border);border-radius:8px;
  background:#fff; color:var(--text); outline:none;
}
input:focus,select:focus,textarea:focus{border-color:var(--green-400);box-shadow:0 0 0 3px #63c88b33}

.table{width:100%;border-collapse:separate;border-spacing:0}
.table th,.table td{padding:10px;border-bottom:1px solid var(--border);text-align:left;vertical-align:top}
.table thead th{font-size:12px;color:var(--muted);text-transform:uppercase;letter-spacing:.03em}

.site-footer{max-width:1200px;margin:20px auto 40px;padding:0 14px;color:var(--muted);font-size:12px}

@media (max-width:800px){
  .main-nav{gap:8px}
  .manager-bar{gap:8px}
  .page{padding:0 10px}
  .card{padding:12px}
}

.nav-bubble{
  display:inline-block;
  margin-left:6px;
  min-width:18px;
  padding:2px 6px;
  font-size:12px;
  font-weight:700;
  line-height:1;
  color:#fff;
  background:var(--red-500, #e11d48);
  border-radius:999px;
  vertical-align:middle;
}
/* ===== Messages premium (surgical, scoped to .messages-ui) ===== */
.messages-ui .card { border-radius: 12px; }

/* Left pane: Start form polish */
.messages-ui .start-form select[multiple]{
  width:100%; border:1px solid #d1d5db; border-radius:10px; padding:6px 8px;
}
.messages-ui .start-form input[name="group_name"]{
  width:100%; border:1px solid #d1d5db; border-radius:10px; padding:8px 10px;
}
.messages-ui .btn.primary{
  background:#0b7a3d; color:#fff; border:0; border-radius:10px; padding:10px 14px; font-weight:800;
}
.messages-ui .btn.subtle.danger{
  background:#fee2e2; color:#991b1b; border:0; border-radius:10px; padding:8px 12px; font-weight:700;
}

/* Threads list: make it feel like a modern list */
.messages-ui .threads{
  list-style:none; margin:0; padding:0;
  max-height: 60vh; overflow:auto;
}
.messages-ui .threads li{ padding:8px 6px; border-bottom:1px solid rgba(0,0,0,.06); }
.messages-ui .threads li a{
  display:block; font-weight:700; text-decoration:none; color:#0b7a3d;
  padding:6px 8px; border-radius:10px;
}
.messages-ui .threads li a:hover{ background:#eef7f1; }
.messages-ui .threads li a.active{ background:#0b7a3d; color:#fff; }
.messages-ui .threads li .muted{ margin-left:8px; }

/* Chat side: message cards get light “bubble” treatment */
.messages-ui .list{
  max-height: 56vh; overflow:auto; scroll-behavior:smooth;
}
.messages-ui .list .msg{ border-radius:12px; }
.messages-ui .list .msg.me{
  background: linear-gradient(180deg, rgba(10,155,84,.10), rgba(10,155,84,.06));
  border:1px solid rgba(10,155,84,.15);
}
.messages-ui .list .msg.other{
  background:#f5f7f6;
}

/* Inline delete as link */
.messages-ui .list .msg .link{
  background:none; border:0; padding:0; color:#0b7a3d; cursor:pointer;
  font-size:12px; text-decoration:underline;
}

/* Composer polish */
.messages-ui .composer{
  display:flex; gap:8px; align-items:flex-end;
}
.messages-ui .composer textarea{
  flex:1; resize:vertical; min-height:40px; max-height:160px;
  border:1px solid #d1d5db; border-radius:10px; padding:10px 12px; font-size:14px;
}

/* A11y helper */
.sr-only{
  position:absolute !important; width:1px !important; height:1px !important;
  padding:0 !important; margin:-1px !important; overflow:hidden !important;
  clip:rect(0,0,0,0) !important; white-space:nowrap !important; border:0 !important;
}
/* === SOP viewing hardening (scoped) — 2025-11-12 === */
.sop-view.no-copy,
.sop-view.no-copy * {
  -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none;
}

.sop-overlay-block {
  position: absolute; inset: 0; pointer-events: none;
  background-image: repeating-linear-gradient(
    45deg,
    rgba(0,0,0,0.03) 0, rgba(0,0,0,0.03) 10px, transparent 10px, transparent 20px
  );
}

.sop-watermark {
  position: absolute; inset: 0; pointer-events: none;
  display: grid; place-items: center; opacity: .12; font: 700 48px/1.2 system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  transform: rotate(-18deg); color: #0a3;
  text-shadow: 0 1px 1px rgba(0,0,0,.2);
}

/* Block clicks on Chrome PDF toolbar (top-right area) */
.sop-toolbar-block {
  position: absolute;
  top: 0;
  right: 0;
  height: 60px;   /* approximate toolbar height */
  width: 260px;   /* covers zoom, download, print buttons */
  pointer-events: auto;
  background: transparent;
}
.ann-view-acks-btn {
    display: inline-block;
    padding: 4px 10px;
    background: #f0f4f7;
    color: #244;
    border: 1px solid #d3d9de;
    border-radius: 6px;
    font-size: 0.82rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s;
    margin-top: 6px;
}

.ann-view-acks-btn:hover {
    background: #e5eaee;
    border-color: #c8ced3;
}




/* Manager Dashboard tiles: fix hover color overlay */
.tile {
    background:#f8fbf9;
    border:1px solid #e3efe6;
    color:#165c35;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.tile:hover {
    background:#f1f7f3 !important;
    border-color:#cfe5d8 !important;
    color:#165c35 !important;
}

.tile:hover * {
    color:#165c35 !important;
}

.tile .btn,
.tile .btn:hover {
    background:transparent !important;
    border-color:#2e7d32 !important;
    color:#2e7d32 !important;
}
/* Manage Announcements — compact action buttons */
.table-manage-announcements td.ann-actions {
  white-space: nowrap;
}

.table-manage-announcements td.ann-actions .btn {
  font-size: 12px;
  padding: 4px 10px;
  margin-right: 6px;
}

.table-manage-announcements td.ann-actions .btn:last-child {
  margin-right: 0;
}

.table-manage-announcements td.ann-actions .inline-delete {
  display: inline;
}

.table-manage-announcements td.ann-actions .btn-danger {
  background: var(--danger);
}

.table-manage-announcements td.ann-actions .btn-danger:hover {
  background: #a61b1b;
}
.kb-actions {
  white-space: nowrap;
}

.table-manage-knowledge td.kb-actions .btn {
  font-size: 12px;
  padding: 4px 10px;
  margin-right: 6px;
}

.table-manage-knowledge td.kb-actions .btn:last-child {
  margin-right: 0;
}

.table-manage-knowledge td.kb-actions .inline-delete {
  display: inline;
}

.table-manage-knowledge td.kb-actions .btn-danger {
  background: var(--danger);
}

.table-manage-knowledge td.kb-actions .btn-danger:hover {
  background: #a61b1b;
}
/* Product Reviews */
  .reviews-header-actions {
    display:flex;
    flex-wrap:wrap;
    gap:10px;
    align-items:center;
    justify-content:space-between;
    margin-bottom:10px;
  }

  .reviews-stars {
    display:inline-flex;
    align-items:center;
    gap:2px;
  }

  .reviews-stars .star {
    font-size:1rem;
    color:#f6b400;
  }

  .reviews-stars .star.inactive {
    color:#d1d5db;
  }

  .reviews-rating-badge {
    display:inline-flex;
    align-items:center;
    padding:2px 6px;
    border-radius:999px;
    background:var(--green-100);
    font-size:0.75rem;
    color:var(--text);
  }

  .reviews-card-grid {
    display:grid;
    grid-template-columns:repeat(auto-fit,minmax(260px,1fr));
    gap:12px;
  }

  .reviews-card {
    border-radius:10px;
    border:1px solid var(--border);
    padding:10px 12px;
    background:var(--card);
  }

  .reviews-product-image {
    max-width:100%;
    border-radius:8px;
    margin-top:8px;
  }

  .list-unstyled {
    list-style:none;
    padding-left:0;
  }

  .review-form-rating {
    margin-top:6px;
    display:flex;
    align-items:center;
    gap:6px;
    flex-wrap:wrap;
  }

  .review-form-rating select {
    padding:6px 8px;
  }
/* Limit display size of uploaded review images */
.reviews-product-image {
    max-width: 450px;
    max-height: 450px;
    width: auto;
    height: auto;
    object-fit: contain;
    display: block;
    margin: 12px auto;
}

/* Tier 3 messaging enhancements */
.messages-ui .threads li {
  margin-bottom: 4px;
}
.messages-ui .threads li .badge {
  display:inline-block;
  min-width:18px;
  padding:2px 6px;
  border-radius:999px;
  font-size:11px;
  background:#0b7a3d;
  color:#fff;
  text-align:center;
  margin-left:6px;
}

.messages-ui #thread-filter {
  font-size:13px;
}

/* Date separators and "new messages" divider */
.messages-ui .msg-date-separator {
  text-align:center;
  font-size:11px;
  color:#6b7280;
  margin:6px 0;
}
.messages-ui .msg-new-divider {
  text-align:center;
  font-size:11px;
  color:#0b7a3d;
  margin:4px 0 8px;
  font-weight:600;
}

/* Attachments row */
.messages-ui .msg-attachments {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}
.messages-ui .attachment-chip {
  display: inline-flex;
  align-items: center;
  font-size: 11px;
  padding: 3px 6px;
  border-radius: 999px;
  border: 1px solid #d1d5db;
  background: #f9fafb;
  text-decoration: none;
  color: #111827;
}
.messages-ui .attachment-chip:hover {
  background: #eef2ff;
}
.messages-ui .attachment-meta {
  margin-left: 4px;
  color: #6b7280;
}

/* Messaging Pro: thread badges, reply preview, attachments, edited tag */
.messages-ui .threads li{
  display:flex;
  flex-direction:column;
  gap:2px;
}
.messages-ui .threads li a{
  display:flex;
  justify-content:space-between;
  align-items:center;
}
.messages-ui .threads .thread-pin,
.messages-ui .threads .thread-muted{
  margin-left:6px;
  font-size:12px;
}
.messages-ui .badge-unread{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width:18px;
  padding:0 6px;
  border-radius:999px;
  background:#dc2626;
  color:#fff;
  font-size:11px;
  font-weight:700;
  margin-left:6px;
}

.messages-ui .reply-preview{
  border-radius:10px;
  border:1px solid #d1d5db;
  padding:8px 10px;
  background:#f9fafb;
  margin-bottom:6px;
  font-size:13px;
}
.messages-ui .reply-preview-header{
  display:flex;
  justify-content:space-between;
  align-items:center;
  margin-bottom:4px;
  font-weight:600;
}
.messages-ui .reply-preview-title{
  color:#064e3b;
}
.messages-ui .reply-preview-cancel{
  background:none;
  border:0;
  font-size:12px;
  cursor:pointer;
  color:#991b1b;
  text-decoration:underline;
}
.messages-ui .reply-preview-snippet{
  color:#4b5563;
  font-size:12px;
  white-space:pre-wrap;
}

.messages-ui .msg-attachments{
  display:flex;
  flex-wrap:wrap;
  gap:6px;
}
.messages-ui .attachment-chip{
  display:inline-flex;
  align-items:center;
  padding:4px 8px;
  border-radius:999px;
  border:1px solid #d1d5db;
  font-size:12px;
  text-decoration:none;
  color:#111827;
  background:#ffffff;
}
.messages-ui .attachment-chip:hover{
  background:#f3f4f6;
}
.messages-ui .attachment-chip .attachment-meta{
  margin-left:6px;
  color:#6b7280;
  font-size:11px;
}

.messages-ui .edited-tag{
  font-size:11px;
  color:#6b7280;
  margin-left:4px;
}

.btn.subtle.small{
  padding:4px 8px;
  font-size:12px;
}
/* ===== Profile Links – Dark Green + Pill Hover ===== */
.profile-link {
  color: #336b45;           /* NA deep green */
  font-weight: 600;
  text-decoration: none;
  padding: 2px 6px;
  border-radius: 6px;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.profile-link:hover {
  background-color: #e6efe9;   /* soft green-tinted light pill */
  color: #16321f;              /* slightly deeper green on hover */
}

.profile-link:active {
  background-color: #d3e5d9;   /* pressed pill look */
  color: #0f2615;
}

.manager-bar{
  max-width:1200px;
  margin:0 auto;
  padding:4px 14px 0;
  background:transparent;
  font-size:13px;
  color:#165c35;
}

.manager-bar a{
  display:inline-flex;
  align-items:center;
  padding:3px 10px;
  border-radius:999px;
  background:#eaf6ee;
  font-weight:600;
}

.manager-bar a:hover{
  background:#d6eee1;
}
@media (max-width: 768px){
  .logo-wrap{
    height:120px !important;
  }
  .logo{
    height:180px !important;
  }
}
/* Premium role badge */
.role-badge {
    display:inline-flex;
    align-items:center;
    padding:4px 10px;
    font-size:12px;
    font-weight:600;
    border-radius:999px;
    background:#e5f5ec;     /* soft mint */
    color:#166534;          /* deep green */
    border:1px solid #c9e9d6;
}
.role-admin {
    background:#fef3c7;
    color:#92400e;
    border:1px solid #fde68a;
}

.role-manager {
    background:#e0e7ff;
    color:#3730a3;
    border:1px solid #c7d2fe;
}

.role-ownership {
    background:#fef2f2;
    color:#991b1b;
    border:1px solid #fecaca;
}

.role-employee {
    background:#e5f5ec;
    color:#166534;
    border:1px solid #c9e9d6;
}
/* PRINT-ONLY MODE FOR INVENTORY FLOOR AUDIT */
@media print {

  /* Hide everything on the page by default */
  body * {
    display: none !important;
  }

  /* Show ONLY the audit results area */
  .audit-print-area,
  .audit-print-area * {
    display: block !important;
  }

  /* Make sure the block sits at the top of the page */
  .audit-print-area {
    position: absolute !important;
    top: 0;
    left: 0;
    width: 100%;
  }
}
/* Global NA back-link pattern */
.na-backwrap {
  max-width: 1000px;
  margin: 12px auto 0;
  padding: 0 16px;
}

.na-backlink {
  display: inline-block;
  padding: 6px 14px;
  font-size: 13px;
  border-radius: 8px;
  background: #ffffff;
  border: 1px solid #14532d; /* NA deep green */
  color: #14532d;
  text-decoration: none;
  transition: background 0.15s ease, transform 0.15s ease;
}

.na-backlink:hover {
  background: #e8f5e9; /* pale green tint */
  transform: translateY(-1px);
}
