/* ==========================================================================
   MSI Technician — Partner Network
   Shared Design System (assets/css/msi-theme.css)

   One file, reused by every page (admin + partner). Do not fork this file
   per-page — add page-specific rules in a small <style> block on the page
   itself, referencing these variables/classes, never redefine the base.
   ========================================================================== */

@font-face {
  font-family: 'Work Sans';
  src: url('/assets/fonts/WorkSans-Regular.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Work Sans';
  src: url('/assets/fonts/WorkSans-Bold.ttf') format('truetype');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  /* Brand */
  --navy-900: #0B2540;   /* deepest navy — sidebar/header backgrounds */
  --navy-800: #123256;   /* primary navy — buttons, links, active state */
  --navy-700: #1B4066;   /* hover state of primary navy */
  --orange:   #E27327;   /* secondary accent — CTAs, highlights */
  --orange-dark: #C2601C;

  /* Neutrals */
  --white:    #FFFFFF;
  --bg:       #F4F6F9;   /* page background */
  --surface:  #FFFFFF;   /* card/panel background */
  --border:   #E1E5EB;
  --border-strong: #C9D0DA;
  --text:     #1C2B3A;   /* primary text — near-navy, not pure black */
  --text-muted: #64707D;
  --text-faint: #94A0AC;

  /* Semantic */
  --success:      #1B7A4D;
  --success-bg:   #E7F5EE;
  --warning:      #92620B;
  --warning-bg:   #FCF1DC;
  --danger:       #B3261E;
  --danger-bg:    #FBEAE9;
  --info:         #1B4066;
  --info-bg:      #E9EFF5;

  /* Layout */
  --radius-sm: 4px;
  --radius:    6px;
  --radius-lg: 10px;
  --shadow-sm: 0 1px 2px rgba(11, 37, 64, 0.06);
  --shadow:    0 2px 8px rgba(11, 37, 64, 0.08);
  --shadow-lg: 0 8px 24px rgba(11, 37, 64, 0.12);
  --sidebar-w: 248px;
  --header-h: 64px;
  --container: 1180px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'Work Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 { font-weight: 700; color: var(--navy-900); margin: 0 0 8px; line-height: 1.25; }
h1 { font-size: 24px; }
h2 { font-size: 19px; }
h3 { font-size: 16px; }
p  { margin: 0 0 12px; color: var(--text); }
.text-muted { color: var(--text-muted); }
.text-sm { font-size: 13px; }

a { color: var(--navy-800); text-decoration: none; }
a:hover { color: var(--orange); text-decoration: underline; }

/* ---------- Layout shells ---------- */

.msi-auth-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.msi-topbar {
  background: var(--navy-900);
  padding: 16px 24px;
}
.msi-topbar-inner {
  max-width: var(--container);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.msi-brand {
  display: flex;
  align-items: baseline;
  gap: 8px;
  color: var(--white);
}
.msi-brand-name { font-weight: 700; font-size: 18px; letter-spacing: 0.2px; }
.msi-brand-sub { font-size: 12px; color: rgba(255,255,255,0.62); font-weight: 400; }
.msi-brand a { color: var(--white); }
.msi-brand a:hover { color: var(--white); text-decoration: none; opacity: 0.85; }

.msi-auth-main {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 16px;
}

.msi-footer {
  text-align: center;
  padding: 20px 16px;
  color: var(--text-faint);
  font-size: 12px;
}

/* ---------- Card ---------- */

.msi-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 32px;
  width: 100%;
  max-width: 440px;
}
.msi-card-wide { max-width: 620px; }
.msi-card h1 { font-size: 20px; margin-bottom: 4px; }
.msi-card .msi-lede { color: var(--text-muted); font-size: 13.5px; margin-bottom: 20px; }

/* ---------- Forms ---------- */

.msi-field { margin-bottom: 16px; }
.msi-field label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--navy-900);
  margin-bottom: 6px;
}
.msi-field .hint { font-size: 12px; color: var(--text-faint); margin-top: 5px; }

input[type=text], input[type=email], input[type=tel], input[type=password], input[type=number],
input[type=date], input[type=search], select, textarea {
  width: 100%;
  padding: 10px 12px;
  border-radius: var(--radius);
  border: 1px solid var(--border-strong);
  background: var(--white);
  color: var(--text);
  font-family: inherit;
  font-size: 14px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--navy-800);
  box-shadow: 0 0 0 3px rgba(18, 50, 86, 0.12);
}
input::placeholder { color: var(--text-faint); }

.msi-password-wrap { position: relative; }
.msi-password-wrap input[type=password], .msi-password-wrap input[type=text] { padding-right: 42px; }
.msi-password-eye {
  position: absolute; right: 10px; top: 50%; transform: translateY(-50%);
  background: none; border: none; padding: 4px; cursor: pointer;
  color: var(--text-faint); display: flex; align-items: center; justify-content: center;
  -webkit-tap-highlight-color: transparent;
}
.msi-password-eye:hover { color: var(--navy-800); }

.msi-checkbox-row {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  margin: 18px 0;
}
.msi-checkbox-row input { margin-top: 3px; width: auto; accent-color: var(--navy-800); }
.msi-checkbox-row label { margin: 0; font-size: 13px; color: var(--text); font-weight: 400; }

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: var(--radius);
  border: 1px solid transparent;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s ease, border-color 0.15s ease, opacity 0.15s ease;
}
.btn:hover { text-decoration: none; }
.btn-block { width: 100%; }

.btn-primary { background: var(--navy-800); color: var(--white); }
.btn-primary:hover { background: var(--navy-700); color: var(--white); }

.btn-accent { background: var(--orange); color: var(--white); }
.btn-accent:hover { background: var(--orange-dark); color: var(--white); }

.btn-secondary { background: var(--white); color: var(--navy-800); border-color: var(--border-strong); }
.btn-secondary:hover { background: var(--bg); color: var(--navy-800); }

.btn-danger { background: var(--danger); color: var(--white); }
.btn-danger:hover { background: #92211b; color: var(--white); }

.btn[disabled] { opacity: 0.55; cursor: not-allowed; }

/* ---------- Alerts ---------- */

.alert { padding: 11px 14px; border-radius: var(--radius); font-size: 13.5px; margin-bottom: 14px; border: 1px solid transparent; }
.alert-error   { background: var(--danger-bg);  color: var(--danger);  border-color: rgba(179,38,30,0.18); }
.alert-warning { background: var(--warning-bg); color: var(--warning); border-color: rgba(146,98,11,0.18); }
.alert-success { background: var(--success-bg); color: var(--success); border-color: rgba(27,122,77,0.18); }
.alert-info    { background: var(--info-bg);    color: var(--info);    border-color: rgba(27,64,102,0.18); }

/* ---------- Badges ---------- */

.badge { display: inline-block; padding: 3px 10px; border-radius: 100px; font-size: 12px; font-weight: 600; line-height: 1.6; }
.badge-success { background: var(--success-bg); color: var(--success); }
.badge-warning { background: var(--warning-bg); color: var(--warning); }
.badge-danger  { background: var(--danger-bg);  color: var(--danger); }
.badge-info    { background: var(--info-bg);    color: var(--info); }
.badge-neutral { background: var(--bg); color: var(--text-muted); border: 1px solid var(--border); }

/* ---------- Misc ---------- */

.msi-divider { border: none; border-top: 1px solid var(--border); margin: 20px 0; }

.msi-meta-links { font-size: 13px; color: var(--text-muted); margin-top: 18px; }
.msi-meta-links a { font-weight: 600; }

@media (max-width: 480px) {
  .msi-card { padding: 24px 20px; }
  .msi-topbar { padding: 14px 16px; }
}

/* ==========================================================================
   App shell — admin + partner interior pages (sidebar + topbar + content)
   ========================================================================== */

.msi-app { min-height: 100vh; }

.msi-sidebar {
  position: fixed;
  top: 0; left: 0; bottom: 0;
  width: var(--sidebar-w);
  background: var(--navy-900);
  color: var(--white);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  z-index: 45;
  transition: transform 0.2s ease;
}
.msi-sidebar-brand {
  padding: 20px 22px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.msi-sidebar-brand .msi-brand-name { display: block; color: var(--white); font-size: 16px; }
.msi-sidebar-brand .msi-brand-sub { display: block; margin-top: 2px; }
.msi-sidebar-nav { padding: 14px 10px; flex: 1; }
.msi-sidebar-section-label {
  font-size: 11px; text-transform: uppercase; letter-spacing: 0.5px;
  color: rgba(255,255,255,0.38); font-weight: 600; padding: 14px 12px 6px;
}
.msi-sidebar-nav a {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; border-radius: var(--radius);
  color: rgba(255,255,255,0.92); font-size: 15px; font-weight: 500;
  margin-bottom: 2px;
}
.msi-sidebar-nav a:hover { background: rgba(255,255,255,0.07); color: var(--white); text-decoration: none; }
.msi-sidebar-nav a.active { background: var(--orange); color: var(--white); }
.msi-sidebar-nav .ic { width: 19px; text-align: center; flex-shrink: 0; opacity: 1; display: inline-block; }
.msi-sidebar-foot {
  padding: 14px 20px 18px; border-top: 1px solid rgba(255,255,255,0.08);
  font-size: 12.5px; color: rgba(255,255,255,0.55);
}
.msi-sidebar-foot a { color: rgba(255,255,255,0.85); }

.msi-logout-btn {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--orange); color: var(--white) !important;
  font-weight: 700; font-size: 15px;
  padding: 10px 20px; border-radius: var(--radius);
  text-decoration: none !important; text-align: center;
  transition: background 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}
.msi-logout-btn:hover {
  background: var(--danger);
  box-shadow: 0 6px 16px rgba(179,38,30,0.35);
  animation: msiLogoutPop 0.35s ease;
}
@keyframes msiLogoutPop {
  0%   { transform: scale(1); }
  45%  { transform: scale(1.1); }
  100% { transform: scale(1.05); }
}
.msi-logout-btn:hover { transform: scale(1.05); }

.msi-sidebar-watermark {
  text-align: center; margin-top: 12px;
  font-size: 11px; color: rgba(255,255,255,0.35);
}
.msi-sidebar-watermark a { color: rgba(255,255,255,0.5); }
.msi-sidebar-watermark a:hover { color: var(--orange); }

/* Support chat reply bar — WhatsApp/Google-Messages style rounded bar */
.msi-chatbar {
  border: none; border-radius: 22px;
  background: var(--white); padding: 8px 14px 8px 16px;
  box-shadow: 0 0 0 1px rgba(11,37,64,0.06), 0 1px 3px rgba(11,37,64,0.05);
  display: flex; flex-direction: column; gap: 2px;
}
.msi-chatbar-input {
  border: none; outline: none; resize: none; background: transparent;
  font-family: inherit; font-size: 14.5px; width: 100%;
  min-height: 24px; max-height: 140px; padding: 6px 0;
}
.msi-chatbar-tools { display: flex; align-items: center; gap: 2px; }
.msi-chatbar-icon-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 32px; height: 32px; border-radius: 50%; flex-shrink: 0;
  border: none; background: transparent; cursor: pointer;
  font-size: 18px; color: var(--text-muted); padding: 0;
}
.msi-chatbar-icon-btn:hover { background: var(--bg); }
.msi-chatbar-send {
  width: 34px; height: 34px; border-radius: 50%; flex-shrink: 0;
  border: none; background: var(--orange); color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer; transition: background 0.15s ease, transform 0.15s ease;
}
.msi-chatbar-send:hover { background: var(--orange-dark); transform: scale(1.06); }
.msi-chatbar-filename {
  align-items: center; gap: 6px; align-self: flex-start;
  font-size: 12px; color: var(--text-muted);
  background: var(--bg); border-radius: 12px; padding: 3px 6px 3px 10px; margin-bottom: 2px;
}
.msi-chatbar-filename img { width: 22px; height: 22px; border-radius: 4px; object-fit: cover; }
.msi-chatbar-filename button {
  background: none; border: none; cursor: pointer; color: var(--text-faint);
  font-size: 15px; line-height: 1; padding: 0 4px;
}

/* "+" attachment category menu */
.msi-plus-menu {
  display: none; position: absolute; bottom: 100%; left: 0; margin-bottom: 6px;
  flex-direction: column; min-width: 190px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg); padding: 6px; z-index: 30;
}
.msi-plus-menu.open { display: flex; }
.msi-plus-menu button {
  display: flex; align-items: center; gap: 10px;
  background: none; border: none; text-align: left; cursor: pointer;
  padding: 9px 10px; border-radius: var(--radius); font-size: 13.5px; color: var(--text);
}
.msi-plus-menu button:hover { background: var(--bg); }
.msi-plus-menu .ic { font-size: 17px; width: 20px; text-align: center; }

/* Emoji + GIF picker (tabbed) */
.msi-picker {
  display: none; position: absolute; bottom: 100%; left: 0; margin-bottom: 6px;
  width: 300px; max-width: 90vw;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg); z-index: 30; overflow: hidden;
}
.msi-picker.open { display: block; }
.msi-picker-tabs { display: flex; border-bottom: 1px solid var(--border); }
.msi-picker-tabs button {
  flex: 1; background: none; border: none; cursor: pointer;
  padding: 9px 0; font-size: 13px; font-weight: 600; color: var(--text-muted);
  border-bottom: 2px solid transparent;
}
.msi-picker-tabs button.active { color: var(--navy-800); border-bottom-color: var(--orange); }
.msi-picker-panel { padding: 8px; }
.msi-picker-search {
  width: 100%; box-sizing: border-box; padding: 7px 10px; margin-bottom: 6px;
  border: 1px solid var(--border-strong); border-radius: 100px; font-size: 12.5px; font-family: inherit;
}
.msi-emoji-cats { display: flex; gap: 2px; margin-bottom: 4px; overflow-x: auto; }
.msi-emoji-cats button {
  flex-shrink: 0; background: none; border: none; cursor: pointer;
  font-size: 16px; padding: 5px 7px; border-radius: var(--radius); opacity: 0.5;
}
.msi-emoji-cats button.active { opacity: 1; background: var(--bg); }
.msi-emoji-grid {
  display: grid; grid-template-columns: repeat(7, 1fr); gap: 0;
  max-height: 210px; overflow-y: auto; box-sizing: border-box;
}
.msi-emoji-grid button {
  box-sizing: border-box; width: 100%; aspect-ratio: 1;
  background: none; border: none; font-size: 19px; line-height: 1;
  cursor: pointer; border-radius: 6px; padding: 0;
  display: flex; align-items: center; justify-content: center;
}
.msi-emoji-grid button:hover { background: var(--bg); }
.msi-emoji-grid .msi-emoji-section-label {
  grid-column: 1 / -1; font-size: 10.5px; font-weight: 700; text-transform: uppercase;
  color: var(--text-faint); padding: 6px 2px 2px;
}
.msi-emoji-empty, .msi-gif-empty { grid-column: 1/-1; font-size: 12.5px; color: var(--text-faint); text-align: center; padding: 20px 8px; }
.msi-gif-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 4px;
  max-height: 260px; overflow-y: auto;
}
.msi-gif-grid img {
  width: 100%; height: 90px; object-fit: cover; border-radius: var(--radius);
  cursor: pointer; display: block; background: var(--bg);
}
.msi-gif-grid img:hover { outline: 2px solid var(--orange); }

/* Unread badge in sidebar nav (e.g. Notifications count) */
.msi-nav-badge {
  margin-left: auto; flex-shrink: 0;
  background: var(--danger); color: #fff;
  font-size: 11px; font-weight: 700; line-height: 1;
  min-width: 18px; height: 18px; border-radius: 9px;
  display: inline-flex; align-items: center; justify-content: center;
  padding: 0 5px;
  animation: msiNavBadgePulse 1.8s ease-in-out infinite;
}
@keyframes msiNavBadgePulse {
  0%, 100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(179,38,30,0.5); }
  50% { transform: scale(1.15); box-shadow: 0 0 0 4px rgba(179,38,30,0); }
}
/* Subtle periodic "ring" on the icon itself when it has an unread badge */
.msi-sidebar-nav .ic.ring { animation: msiBellRing 2.6s ease-in-out infinite; transform-origin: 50% 0%; }
@keyframes msiBellRing {
  0%, 85%, 100% { transform: rotate(0deg); }
  87% { transform: rotate(-12deg); }
  89% { transform: rotate(10deg); }
  91% { transform: rotate(-7deg); }
  93% { transform: rotate(4deg); }
  95% { transform: rotate(0deg); }
}

.msi-sidebar-backdrop {
  display: none; position: fixed; inset: 0;
  background: rgba(11,37,64,0.45); z-index: 40;
}
.msi-sidebar-backdrop.open { display: block; }

.msi-app-main { margin-left: var(--sidebar-w); min-height: 100vh; display: flex; flex-direction: column; }
.msi-app-topbar {
  height: var(--header-h); background: var(--surface); border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 24px; position: sticky; top: 0; z-index: 20;
}
.msi-topbar-left { display: flex; align-items: center; gap: 14px; }
.msi-topbar-title { font-size: 17px; font-weight: 700; color: var(--navy-900); }
.msi-menu-toggle {
  display: none; background: none; border: 1px solid var(--border-strong); border-radius: var(--radius);
  cursor: pointer; padding: 7px 9px; color: var(--navy-900);
}
.msi-topbar-user { display: flex; align-items: center; gap: 12px; font-size: 13.5px; color: var(--text-muted); }
.msi-topbar-user .role-badge { font-size: 11px; }

.msi-topbar-profile-btn {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--navy-900); color: var(--white);
  font-weight: 700; font-size: 14px;
  padding: 9px 18px; border-radius: var(--radius);
  text-decoration: none;
}
.msi-topbar-profile-btn:hover { background: var(--navy-700); color: var(--white); text-decoration: none; }
.msi-app-content { padding: 24px; flex: 1; max-width: 1240px; width: 100%; }

@media (max-width: 900px) {
  .msi-sidebar { transform: translateX(-100%); }
  .msi-sidebar.open { transform: translateX(0); }
  .msi-app-main { margin-left: 0; }
  .msi-menu-toggle { display: inline-flex; align-items: center; }
  .msi-app-content { padding: 16px; }
  .msi-app-topbar { padding: 0 14px; }
}

/* ---------- Stat cards ---------- */

.msi-stat-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 14px; margin-bottom: 22px;
}
.msi-stat-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 16px 18px; }
.msi-stat-card .label { font-size: 12px; color: var(--text-muted); font-weight: 600; text-transform: uppercase; letter-spacing: 0.3px; margin-bottom: 6px; }
.msi-stat-card .value { font-size: 23px; font-weight: 700; color: var(--navy-900); line-height: 1.2; }
.msi-stat-card .sub { font-size: 12px; color: var(--text-faint); margin-top: 4px; }
.msi-stat-card.accent { border-top: 3px solid var(--orange); }

/* ---------- Panels / sections ---------- */

.msi-panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 20px 22px; margin-bottom: 20px; }
.msi-panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.msi-panel-head h2 { margin: 0; }
.msi-panel-head .actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* ---------- Tables ---------- */

.msi-table-wrap { overflow-x: auto; margin: 0 -2px; }
table.msi-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.msi-table th {
  text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: 0.3px;
  color: var(--text-muted); font-weight: 700; padding: 10px 12px; border-bottom: 1px solid var(--border);
  background: var(--bg); white-space: nowrap;
}
.msi-table td { padding: 12px; border-bottom: 1px solid var(--border); color: var(--text); vertical-align: middle; }
.msi-table tbody tr:hover td { background: rgba(18,50,86,0.025); }
.msi-table .num { text-align: right; font-variant-numeric: tabular-nums; }
.msi-table .actions-cell { white-space: nowrap; }
.msi-table .actions-cell .btn { padding: 6px 12px; font-size: 12.5px; }

/* ---------- Filters row ---------- */

.msi-filters { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 18px; align-items: flex-end; }
.msi-filters .msi-field { margin-bottom: 0; min-width: 150px; }
.msi-filters .msi-field label { font-size: 11.5px; }

/* ---------- Empty states ---------- */

.msi-empty { text-align: center; padding: 44px 20px; color: var(--text-muted); }
.msi-empty .ic { font-size: 26px; margin-bottom: 10px; opacity: 0.45; }
.msi-empty .title { font-weight: 600; color: var(--navy-900); margin-bottom: 4px; }
.msi-empty p { color: var(--text-muted); font-size: 13.5px; }

/* ---------- Pagination ---------- */

.msi-pagination { display: flex; gap: 6px; justify-content: center; margin-top: 18px; flex-wrap: wrap; }
.msi-pagination a, .msi-pagination span {
  padding: 6px 12px; border-radius: var(--radius); border: 1px solid var(--border-strong);
  font-size: 13px; color: var(--text); min-width: 34px; text-align: center;
}
.msi-pagination a:hover { background: var(--bg); text-decoration: none; }
.msi-pagination .current { background: var(--navy-800); color: var(--white); border-color: var(--navy-800); }
.msi-pagination .disabled { opacity: 0.4; pointer-events: none; }

/* ---------- Modal (confirm dialogs) ---------- */

.msi-modal-backdrop { display: none; position: fixed; inset: 0; background: rgba(11,37,64,0.45); z-index: 60; align-items: center; justify-content: center; padding: 16px; }
.msi-modal-backdrop.open { display: flex; }
.msi-modal { background: var(--surface); border-radius: var(--radius-lg); padding: 24px; max-width: 420px; width: 100%; box-shadow: var(--shadow-lg); }
.msi-modal h3 { margin-bottom: 8px; }
.msi-modal p { font-size: 13.5px; color: var(--text-muted); }
.msi-modal-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 20px; }

/* ---------- Notification / ticket list rows ---------- */

.msi-list-row {
  display: flex; align-items: flex-start; gap: 12px; padding: 14px 16px;
  border-bottom: 1px solid var(--border);
}
.msi-list-row:last-child { border-bottom: none; }
.msi-list-row.unread { background: var(--info-bg); }
.msi-list-row .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--orange); margin-top: 6px; flex-shrink: 0; }
.msi-list-row .dot.hidden { visibility: hidden; }
.msi-list-row .body { flex: 1; min-width: 0; }
.msi-list-row .title { font-weight: 600; font-size: 14px; color: var(--navy-900); margin-bottom: 2px; }
.msi-list-row .meta { font-size: 12px; color: var(--text-faint); }

@media (max-width: 700px) {
  .msi-table thead { display: none; }
  .msi-table, .msi-table tbody, .msi-table tr, .msi-table td { display: block; width: 100%; }
  .msi-table tr { border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: 10px; padding: 8px 4px; }
  .msi-table td { border-bottom: none; padding: 6px 10px; }
  .msi-table td[data-label]::before {
    content: attr(data-label); display: block; font-size: 10.5px; font-weight: 700;
    text-transform: uppercase; color: var(--text-faint); margin-bottom: 2px;
  }
}

/* ---------- Avatar thumbnail + click-to-enlarge lightbox ---------- */

.msi-avatar-thumb {
  width: 40px; height: 40px; border-radius: 50%; object-fit: cover;
  border: 1px solid var(--border); cursor: zoom-in; display: block;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.msi-avatar-thumb:hover { transform: scale(1.08); box-shadow: var(--shadow); }
.msi-avatar-placeholder {
  width: 40px; height: 40px; border-radius: 50%; background: var(--bg); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center; color: var(--text-faint); font-size: 16px;
}

.msi-lightbox-backdrop {
  display: none; position: fixed; inset: 0; background: rgba(11,37,64,0.78);
  z-index: 90; align-items: center; justify-content: center; padding: 24px; cursor: zoom-out;
}
.msi-lightbox-backdrop.open { display: flex; }
.msi-lightbox-backdrop img {
  max-width: min(560px, 90vw); max-height: 85vh; border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg); cursor: default; background: #fff;
}
