@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@300;400;500;600;700&family=IBM+Plex+Mono:wght@400;500&display=swap');

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

/* ══════════════════════════════════════════════
   RASED BRAND TOKENS
   Primary  : #0d2d4a  (deep navy)
   Mid      : #1a5276  (medium blue)
   Accent   : #2e86ab  (brand teal-blue)
   Highlight: #4fc3d4  (light teal)
   BG       : #f0f4f8  (cool off-white)
   ══════════════════════════════════════════════ */
:root {
  /* Brand */
  --navy:      #0d2d4a;
  --navy2:     #1a5276;
  --navy3:     #1f618d;
  --accent:    #2e86ab;
  --accent2:   #1a6a8a;
  --teal:      #4fc3d4;
  --teal-dim:  rgba(79,195,212,0.12);

  /* Surface */
  --bg:        #f0f4f8;
  --bg2:       #e3eaf2;
  --white:     #ffffff;
  --border:    #dce5ef;

  /* Text */
  --text:      #0d2031;
  --text2:     #4a6080;
  --text3:     #8fa5be;

  /* Status */
  --success:   #0ea069;
  --warn:      #f0a500;
  --danger:    #e53935;

  /* Misc */
  --radius:    10px;
  --sidebar:   260px;
  --font:      'Cairo', Arial, sans-serif;
  --mono:      'IBM Plex Mono', monospace;

  /* Sidebar gradient */
  --sidebar-bg: linear-gradient(180deg, #0a2540 0%, #0d3158 60%, #0f3d6e 100%);
}

html, body { height: 100%; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  display: flex;
  -webkit-font-smoothing: antialiased;
}

/* ══════════════════════════════════════════════
   SIDEBAR
   ══════════════════════════════════════════════ */
.sidebar {
  width: var(--sidebar);
  background: var(--sidebar-bg);
  height: 100vh;
  position: fixed;
  top: 0; left: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  z-index: 100;
  box-shadow: 4px 0 24px rgba(13,45,74,0.18);
}

/* ── Logo area ── */
.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 22px 20px 18px;
  border-bottom: 1px solid rgba(79,195,212,0.15);
  position: relative;
  color: inherit;
  text-decoration: none;
  cursor: pointer;
}

/* Subtle teal glow behind logo */
.sidebar-logo::after {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--teal), transparent);
  opacity: 0.6;
}

.sidebar-logo .logo-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--accent), var(--teal));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 700;
  color: white;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(46,134,171,0.4);
}

.sidebar-logo span {
  font-size: 19px;
  font-weight: 700;
  color: #fff;
  letter-spacing: 3px;
}

.sidebar-logo small {
  display: block;
  font-size: 10px;
  color: rgba(255,255,255,0.38);
  letter-spacing: 0.4px;
  margin-top: 1px;
  font-weight: 400;
}

/* ── Nav ── */
.sidebar-nav {
  flex: 1;
  padding: 12px 10px;
  overflow-y: auto;
  scrollbar-width: none;
}
.sidebar-nav::-webkit-scrollbar { display: none; }

.nav-section {
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 1.8px;
  color: rgba(79,195,212,0.5);
  padding: 18px 10px 7px;
  text-transform: uppercase;
}

.sidebar-nav a {
  display: flex;
  align-items: center;
  gap: 11px;
  color: rgba(255,255,255,0.55);
  text-decoration: none;
  padding: 9px 12px;
  border-radius: 9px;
  font-size: 13.5px;
  font-weight: 500;
  transition: all 0.17s ease;
  margin-bottom: 1px;
  position: relative;
}

.sidebar-nav a svg {
  width: 17px;
  height: 17px;
  flex-shrink: 0;
  opacity: 0.65;
  transition: opacity 0.17s;
}

.sidebar-nav a:hover {
  background: rgba(79,195,212,0.1);
  color: #fff;
}
.sidebar-nav a:hover svg { opacity: 1; }

.sidebar-nav a.active {
  background: linear-gradient(90deg, rgba(46,134,171,0.9), rgba(31,97,141,0.7));
  color: #fff;
  font-weight: 600;
  box-shadow: 0 2px 12px rgba(46,134,171,0.25);
}

/* Active left-border indicator */
.sidebar-nav a.active::before {
  content: "";
  position: absolute;
  left: 0; top: 20%; bottom: 20%;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: var(--teal);
}

.sidebar-nav a.active svg { opacity: 1; }

.sidebar-nav .nav-item-disabled {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 2px 8px;
  padding: 11px 14px;
  border-radius: 10px;
  color: rgba(255,255,255,0.42);
  font-size: 14px;
  font-weight: 500;
  cursor: not-allowed;
}

/* App launch screen */
.app-launch-screen {
  position: fixed;
  inset: 0;
  z-index: 100000;
  display: grid;
  place-items: center;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 42%, rgba(59, 172, 203, .16), transparent 31%),
    linear-gradient(145deg, #061b2b 0%, #0b354d 52%, #0c4560 100%);
  color: #fff;
  opacity: 1;
  visibility: visible;
  transition: opacity .46s ease, visibility .46s ease;
}

.app-launch-screen.is-complete {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.app-launch-aura {
  position: absolute;
  width: min(72vw, 850px);
  aspect-ratio: 1;
  border: 1px solid rgba(157, 220, 235, .08);
  border-radius: 50%;
  animation: launchAura 5.5s ease-in-out infinite;
}

.app-launch-aura::before,
.app-launch-aura::after {
  content: "";
  position: absolute;
  border: 1px solid rgba(157, 220, 235, .07);
  border-radius: inherit;
}

.app-launch-aura::before { inset: 12%; }
.app-launch-aura::after { inset: 26%; }
.app-launch-aura-two { width: min(48vw, 570px); animation-delay: -2.75s; }

.app-launch-content {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  flex-direction: column;
  width: min(86vw, 360px);
  text-align: center;
}

.app-launch-mark {
  position: relative;
  display: grid;
  place-items: center;
  width: 132px;
  height: 132px;
  margin-bottom: 22px;
}

.app-launch-mark img {
  position: relative;
  z-index: 2;
  width: 76px;
  height: 76px;
  object-fit: contain;
  filter: brightness(0) invert(1) drop-shadow(0 12px 24px rgba(0,0,0,.28));
  animation: launchLogo 2.2s ease-in-out infinite;
}

.app-launch-ring {
  position: absolute;
  inset: 7px;
  border: 1px solid rgba(151, 225, 240, .32);
  border-top-color: #76d8e8;
  border-radius: 50%;
  animation: launchSpin 2.4s linear infinite;
}

.app-launch-ring-two {
  inset: 19px;
  border-color: rgba(151, 225, 240, .16);
  border-bottom-color: rgba(255,255,255,.7);
  animation-duration: 1.8s;
  animation-direction: reverse;
}

.app-launch-content > strong {
  font-size: 25px;
  font-weight: 800;
  letter-spacing: .28em;
  text-indent: .28em;
}

.app-launch-subtitle {
  margin-top: 4px;
  color: rgba(221, 242, 247, .65);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.app-launch-progress {
  width: 190px;
  height: 3px;
  margin-top: 28px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255,255,255,.12);
}

.app-launch-progress i {
  display: block;
  width: 45%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, transparent, #78d6e7, #fff, transparent);
  animation: launchProgress 1.35s ease-in-out infinite;
}

.app-launch-content > small {
  margin-top: 12px;
  color: rgba(225, 243, 248, .56);
  font-size: 11px;
  letter-spacing: .04em;
}

@keyframes launchSpin { to { transform: rotate(360deg); } }
@keyframes launchLogo { 0%,100% { transform: scale(.96); opacity: .9; } 50% { transform: scale(1.05); opacity: 1; } }
@keyframes launchAura { 0%,100% { transform: scale(.9); opacity: .35; } 50% { transform: scale(1.08); opacity: .7; } }
@keyframes launchProgress { 0% { transform: translateX(-115%); } 100% { transform: translateX(260%); } }

@media (prefers-reduced-motion: reduce) {
  .app-launch-aura,
  .app-launch-mark img,
  .app-launch-ring,
  .app-launch-progress i { animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}

.sidebar-nav .nav-item-disabled svg {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  opacity: .48;
}

.sidebar-nav .nav-item-disabled small {
  margin-left: auto;
  padding: 2px 7px;
  border: 1px solid rgba(255,255,255,0.16);
  border-radius: 999px;
  color: rgba(255,255,255,0.48);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.nav-unread-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 6px;
  margin-left: auto;
  border-radius: 999px;
  background: #ef4444;
  color: #fff;
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 800;
  line-height: 1;
  box-shadow: 0 0 0 2px rgba(255,255,255,0.12);
}
.nav-unread-badge[hidden] { display: none !important; }

/* ── Footer ── */
.sidebar-footer {
  padding: 14px;
  border-top: 1px solid rgba(255,255,255,0.06);
}

.app-version {
  margin-bottom: 10px;
  padding: 7px 10px;
  border: 1px solid rgba(255,255,255,0.09);
  border-radius: 8px;
  background: rgba(255,255,255,0.05);
  color: rgba(255,255,255,0.46);
  font-family: var(--mono);
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.2px;
  text-align: center;
  white-space: nowrap;
}

/* ══════════════════════════════════════════════
   MAIN
   ══════════════════════════════════════════════ */
.main {
  margin-left: var(--sidebar);
  flex: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  padding-top: 60px;
}

/* ══════════════════════════════════════════════
   TOPBAR
   ══════════════════════════════════════════════ */
.topbar {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  padding: 0 28px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: fixed;
  top: 0;
  left: var(--sidebar);
  right: 0;
  z-index: 90;
  box-shadow: 0 2px 14px rgba(13,45,74,0.08);
}

/* Thin teal underline on topbar */
.topbar::after {
  content: "";
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), var(--teal), transparent 70%);
  opacity: 0.5;
}

.topbar-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Breadcrumb-style dot before title */
.topbar-title::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  display: inline-block;
  flex-shrink: 0;
}

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

.topbar-icon-btn {
  width: 36px;
  height: 36px;
  border: 1px solid var(--border);
  border-radius: 11px;
  background: var(--bg);
  color: var(--text2);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s, transform 0.15s;
}
.topbar-icon-btn:hover {
  background: var(--bg2);
  border-color: rgba(125,182,207,0.65);
  color: var(--accent);
  transform: translateY(-1px);
}
.topbar-icon-btn svg {
  width: 18px;
  height: 18px;
}
.topbar-icon-btn .fullscreen-exit-icon { display: none; }
.topbar-icon-btn.is-fullscreen .fullscreen-enter-icon { display: none; }
.topbar-icon-btn.is-fullscreen .fullscreen-exit-icon { display: block; }

.topbar-user {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 5px 12px 5px 5px;
  border-radius: 50px;
  background: var(--bg);
  border: 1px solid var(--border);
  transition: background 0.15s;
}
.topbar-user:hover { background: var(--bg2); }

/* ══════════════════════════════════════════════
   AVATAR
   ══════════════════════════════════════════════ */
.avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--teal));
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  flex-shrink: 0;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(46,134,171,0.3);
}

.avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

/* ══════════════════════════════════════════════
   PAGE CONTENT
   ══════════════════════════════════════════════ */
.page {
  padding: 26px 28px;
  flex: 1;
}

.page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 24px;
  gap: 16px;
}

.page-title {
  font-size: 21px;
  font-weight: 700;
  color: var(--navy);
  line-height: 1.2;
}

.page-subtitle {
  font-size: 13px;
  color: var(--text3);
  margin-top: 3px;
  font-weight: 400;
}

/* ══════════════════════════════════════════════
   CARDS
   ══════════════════════════════════════════════ */
.card {
  background: var(--white);
  border-radius: 12px;
  border: 1px solid var(--border);
  padding: 22px 24px;
  margin-bottom: 20px;
  box-shadow: 0 1px 4px rgba(13,45,74,0.04);
  transition: box-shadow 0.2s;
}
.card:hover { box-shadow: 0 4px 16px rgba(13,45,74,0.07); }

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
}

.card-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--navy);
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Accent dot on card title */
.card-title::before {
  content: "";
  width: 4px;
  height: 14px;
  border-radius: 2px;
  background: linear-gradient(180deg, var(--accent), var(--teal));
  display: inline-block;
  flex-shrink: 0;
}

/* ══════════════════════════════════════════════
   STAT CARDS
   ══════════════════════════════════════════════ */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.stat-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px 22px;
  display: flex;
  align-items: center;
  gap: 16px;
  transition: all 0.2s;
  position: relative;
  overflow: hidden;
}

.stat-card::after {
  content: "";
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 3px;
  opacity: 0;
  transition: opacity 0.2s;
}

.stat-card:hover { box-shadow: 0 6px 20px rgba(13,45,74,0.09); transform: translateY(-1px); }
.stat-card:hover::after { opacity: 1; }

.stat-icon {
  width: 46px;
  height: 46px;
  border-radius: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.stat-icon.blue   { background: #e8f4fd; color: #1a7cb5; }
.stat-icon.green  { background: #e6f9f2; color: #0a8a5c; }
.stat-icon.amber  { background: #fef8e6; color: #c78a00; }
.stat-icon.rose   { background: #fdecea; color: #c0392b; }
.stat-icon.purple { background: #f2eafa; color: #7d3c98; }
.stat-icon.teal   { background: var(--teal-dim); color: var(--accent); }

.stat-icon svg { width: 22px; height: 22px; }

.stat-info { flex: 1; min-width: 0; }

.stat-value {
  font-size: 28px;
  font-weight: 700;
  color: var(--navy);
  line-height: 1;
  font-variant-numeric: tabular-nums;
  font-family: var(--mono);
}

.stat-label {
  font-size: 12px;
  color: var(--text2);
  margin-top: 5px;
  font-weight: 500;
}

/* ══════════════════════════════════════════════
   FORMS
   ══════════════════════════════════════════════ */
.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
}

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

.form-group.full { grid-column: 1 / -1; }

label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text2);
  letter-spacing: 0.6px;
  text-transform: uppercase;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="tel"],
input[type="number"],
input[type="date"],
input[type="file"],
select,
textarea {
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  font-size: 14px;
  font-family: var(--font);
  color: var(--text);
  background: var(--white);
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}

input:focus, select:focus, textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(46,134,171,0.12);
}

input::placeholder { color: var(--text3); }
select { cursor: pointer; }

/* ══════════════════════════════════════════════
   BUTTONS
   ══════════════════════════════════════════════ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 18px;
  border-radius: 8px;
  font-size: 13.5px;
  font-weight: 600;
  font-family: var(--font);
  cursor: pointer;
  border: 1.5px solid transparent;
  transition: all 0.15s;
  text-decoration: none;
  white-space: nowrap;
}

.btn svg { width: 15px; height: 15px; flex-shrink: 0; }

.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--navy3));
  color: white;
  border-color: transparent;
  box-shadow: 0 3px 10px rgba(46,134,171,0.3);
}
.btn-primary:hover {
  background: linear-gradient(135deg, var(--accent2), var(--navy2));
  box-shadow: 0 4px 14px rgba(46,134,171,0.4);
  transform: translateY(-1px);
}

.btn-outline {
  background: transparent;
  color: var(--text);
  border-color: var(--border);
}
.btn-outline:hover { background: var(--bg); border-color: var(--accent); color: var(--accent); }

.btn-danger {
  background: #fdecea;
  color: var(--danger);
  border-color: #f5c6c6;
}
.btn-danger:hover { background: var(--danger); color: white; border-color: var(--danger); }

.btn-sm { padding: 6px 12px; font-size: 12px; }

/* ── Icon-only action button (Edit / Delete) ── */
.btn-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  padding: 0;
  border-radius: 7px;
  border: 1.5px solid var(--border);
  background: var(--white);
  color: var(--text2);
  cursor: pointer;
  transition: background 0.13s, border-color 0.13s, color 0.13s, box-shadow 0.13s;
  flex-shrink: 0;
}
.btn-icon svg { width: 13px; height: 13px; flex-shrink: 0; }
.btn-icon:hover { background: var(--bg2); border-color: var(--accent); color: var(--accent); }
.btn-icon.btn-icon-danger { border-color: #fecaca; background: #fff5f5; color: #dc2626; }
.btn-icon.btn-icon-danger:hover { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn-icon-wrap { display: flex; align-items: center; gap: 5px; justify-content: flex-end; }

/* ══════════════════════════════════════════════
   TABLE
   ══════════════════════════════════════════════ */
.table-wrapper { overflow-x: auto; }

table { width: 100%; border-collapse: collapse; }

thead th {
  font-size: 10.5px;
  font-weight: 700;
  color: var(--text2);
  text-transform: uppercase;
  letter-spacing: 0.9px;
  padding: 10px 16px;
  background: var(--bg);
  border-bottom: 2px solid var(--border);
  text-align: left;
  white-space: nowrap;
}

tbody tr {
  border-bottom: 1px solid var(--border);
  transition: background 0.1s;
}

tbody tr:last-child { border-bottom: none; }

tbody tr:hover { background: #f4f8fc; }

td {
  padding: 12px 16px;
  font-size: 13.5px;
  color: var(--text);
  vertical-align: middle;
}

.td-muted { color: var(--text2); font-size: 13px; }

.cell-user {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* ══════════════════════════════════════════════
   BADGES
   ══════════════════════════════════════════════ */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}

.badge-green  { background: #d4f5e8; color: #0a7a52; }
.badge-red    { background: #fde8e8; color: #b71c1c; }
.badge-amber  { background: #fef3cd; color: #9a6700; }
.badge-blue   { background: #ddeffe; color: #155a9e; }
.badge-purple { background: #ede5f8; color: #6a1ba0; }
.badge-gray   { background: #edf1f7; color: #455470; }
.badge-teal   { background: var(--teal-dim); color: var(--accent2); }

/* ================================================================
   FM OPERATIONS DASHBOARD
   ================================================================ */
.fm-dashboard { max-width: 1680px; width: 100%; margin: 0 auto; }
.fm-dashboard-header { align-items: center; }
.fm-header-actions { display: flex; align-items: center; gap: 10px; }
.fm-live-pill {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 6px 10px; border: 1px solid #cdeee1; border-radius: 20px;
  background: #effbf6; color: #08764e; font-size: 11px; font-weight: 600;
}
.fm-live-pill span { width: 7px; height: 7px; border-radius: 50%; background: #0ea069; box-shadow: 0 0 0 3px rgba(14,160,105,0.14); }

.fm-filter-bar {
  display: grid; grid-template-columns: minmax(210px, 1.25fr) repeat(4, minmax(125px, 0.8fr));
  align-items: end; gap: 12px; margin-bottom: 18px; padding: 14px 16px;
  border: 1px solid var(--border); border-radius: 12px; background: var(--white);
  box-shadow: 0 1px 4px rgba(13,45,74,0.04);
}
.fm-filter-heading { display: flex; align-items: center; gap: 10px; padding-bottom: 2px; }
.fm-filter-heading strong { display: block; color: var(--navy); font-size: 13px; }
.fm-filter-heading small { display: block; color: var(--text3); font-size: 10px; margin-top: 1px; }
.fm-filter-icon {
  display: flex; width: 34px; height: 34px; align-items: center; justify-content: center;
  color: var(--accent); background: var(--teal-dim); border-radius: 9px;
}
.fm-filter-icon svg { width: 17px; height: 17px; }
.fm-filter-field { gap: 4px; }
.fm-filter-field span { font-size: 9px; color: var(--text3); letter-spacing: 0.7px; text-transform: uppercase; }
.fm-filter-field select { min-height: 36px; padding: 7px 10px; font-size: 12px; }
.fm-filter-field select:disabled { color: var(--text3); background: #f8fafc; cursor: not-allowed; }

.fm-kpi-grid {
  display: grid; grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px; margin-bottom: 18px;
}
.fm-kpi-card {
  min-height: 156px; padding: 15px; border: 1px solid var(--border);
  border-radius: 12px; background: var(--white); overflow: hidden;
  transition: transform .18s, box-shadow .18s, border-color .18s;
}
.fm-kpi-card:hover { border-color: #c5d9e8; box-shadow: 0 8px 22px rgba(13,45,74,0.08); transform: translateY(-2px); }
.fm-kpi-card.muted { background: #fbfcfe; }
.fm-kpi-card.muted .fm-kpi-value { color: #a4b2c2; }
.fm-kpi-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 18px; }
.fm-kpi-icon { display: flex; width: 32px; height: 32px; align-items: center; justify-content: center; border-radius: 9px; }
.fm-kpi-icon svg { width: 17px; height: 17px; }
.fm-kpi-icon.teal { color: var(--accent); background: var(--teal-dim); }
.fm-kpi-icon.blue { color: #1a7cb5; background: #e8f4fd; }
.fm-kpi-icon.purple { color: #7d3c98; background: #f2eafa; }
.fm-kpi-icon.amber { color: #b77d00; background: #fef8e6; }
.fm-kpi-icon.rose { color: #c0392b; background: #fdecea; }
.fm-kpi-icon.green { color: #0a8a5c; background: #e6f9f2; }
.fm-kpi-tag { color: var(--text3); font-size: 9px; font-weight: 700; letter-spacing: 0.8px; text-transform: uppercase; }
.fm-kpi-value { color: var(--navy); font-family: var(--mono); font-size: 29px; font-weight: 700; line-height: 1; }
.fm-kpi-label { color: var(--text2); font-size: 12px; font-weight: 600; margin-top: 6px; }
.fm-kpi-foot { color: var(--text3); font-size: 10px; margin-top: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fm-kpi-foot .good { color: #08764e; }

.fm-dashboard-grid { display: grid; grid-template-columns: 1.2fr 0.8fr; gap: 18px; }
.fm-dashboard-grid.lower { grid-template-columns: 1fr 1fr; }
.fm-dashboard-grid .card { min-width: 0; }
.fm-card-subtitle { color: var(--text3); font-size: 11px; margin-top: 3px; }

.fm-site-list { display: grid; gap: 5px; }
.fm-site-row { display: flex; align-items: center; gap: 11px; padding: 10px; border-radius: 9px; transition: background .15s; }
.fm-site-row:hover { background: #f6f9fc; }
.fm-site-avatar {
  display: flex; width: 34px; height: 34px; align-items: center; justify-content: center;
  flex-shrink: 0; border-radius: 9px; color: var(--accent2); background: var(--teal-dim);
  font-family: var(--mono); font-size: 13px; font-weight: 700;
}
.fm-site-copy { min-width: 0; flex: 1; }
.fm-site-copy strong, .fm-site-copy small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fm-site-copy strong { color: var(--text); font-size: 12px; }
.fm-site-copy small { color: var(--text3); font-size: 10px; margin-top: 2px; }
.fm-health-status { display: inline-flex; align-items: center; gap: 6px; font-size: 10px; font-weight: 600; white-space: nowrap; }
.fm-health-status span { width: 7px; height: 7px; border-radius: 50%; }
.fm-health-status.good { color: #08764e; }
.fm-health-status.good span { background: #0ea069; }
.fm-health-status.review { color: #a36c00; }
.fm-health-status.review span { background: #f0a500; }

.fm-empty-module { display: flex; min-height: 214px; align-items: center; justify-content: center; flex-direction: column; padding: 20px; text-align: center; }
.fm-empty-module.compact { min-height: 112px; }
.fm-empty-module-icon {
  display: flex; width: 46px; height: 46px; align-items: center; justify-content: center;
  margin-bottom: 12px; border-radius: 50%; color: #0a8a5c; background: #e6f9f2;
}
.fm-empty-module-icon svg { width: 22px; height: 22px; }
.fm-empty-module strong { color: var(--navy); font-size: 13px; }
.fm-empty-module p { max-width: 350px; color: var(--text3); font-size: 11px; line-height: 1.7; margin-top: 5px; }

.fm-service-list { display: grid; gap: 16px; padding: 2px 0; }
.fm-service-meta { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 7px; }
.fm-service-meta strong { color: var(--text); font-size: 12px; }
.fm-service-meta span { color: var(--text3); font-size: 10px; }
.fm-service-track { height: 6px; overflow: hidden; border-radius: 8px; background: #eaf0f6; }
.fm-service-track span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--accent), var(--teal)); }

.fm-readiness-list { display: grid; }
.fm-readiness-list > div { display: grid; grid-template-columns: 12px 1fr; align-items: center; column-gap: 9px; padding: 10px 0; border-bottom: 1px solid var(--border); }
.fm-readiness-list > div:last-child { border-bottom: none; }
.fm-readiness-dot { grid-row: 1 / span 2; width: 9px; height: 9px; border: 2px solid #b7c5d3; border-radius: 50%; }
.fm-readiness-dot.ready { border-color: #0ea069; background: #0ea069; box-shadow: 0 0 0 3px rgba(14,160,105,0.12); }
.fm-readiness-list strong { color: var(--text); font-size: 12px; }
.fm-readiness-list small { color: var(--text3); font-size: 10px; margin-top: 2px; }

@media (max-width: 1380px) {
  .fm-kpi-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 1100px) {
  .fm-filter-bar { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .fm-filter-heading { grid-column: 1 / -1; }
  .fm-dashboard-grid, .fm-dashboard-grid.lower { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .fm-dashboard-header { align-items: flex-start; flex-direction: column; }
  .fm-header-actions { width: 100%; justify-content: space-between; }
  .fm-kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ================================================================
   RASID ADMIN THEME
   Login-aligned palette, scoped so the client portal is unchanged.
   ================================================================ */
body:is(.rasid-admin, .client-eye-shell) {
  --navy:      #103d55;
  --navy2:     #0f5675;
  --navy3:     #176f94;
  --accent:    #176f94;
  --accent2:   #0f5675;
  --teal:      #7db6cf;
  --teal-dim:  rgba(125,182,207,0.14);
  --bg:        #f4f7f5;
  --bg2:       #e9efec;
  --border:    #d9e2dd;
  --text:      #16201b;
  --text2:     #52635c;
  --text3:     #8b9a94;
  --success:   #2f8f68;
  --warn:      #bd8525;
  --danger:    #b94a48;
  --sidebar-bg: linear-gradient(180deg, #0e3147 0%, #0f4b68 56%, #0f5675 100%);
  background:
    radial-gradient(circle at 92% 4%, rgba(125,182,207,0.13), transparent 25%),
    #f4f7f5;
}

body:is(.rasid-admin, .client-eye-shell).theme-executive {
  --navy:      #081827;
  --navy2:     #14314a;
  --navy3:     #315c7a;
  --accent:    #315c7a;
  --accent2:   #23475f;
  --teal:      #d7b56d;
  --teal-dim:  rgba(215,181,109,0.16);
  --bg:        #f3f5f7;
  --bg2:       #e6ebef;
  --border:    #d7dfe6;
  --text:      #111827;
  --text2:     #536170;
  --text3:     #8b98a6;
  --success:   #2f7d62;
  --warn:      #b78935;
  --danger:    #b84a4a;
  --sidebar-bg: linear-gradient(180deg, #071522 0%, #0c2438 58%, #14314a 100%);
  background:
    radial-gradient(circle at 92% 4%, rgba(215,181,109,0.16), transparent 24%),
    #f3f5f7;
}

body:is(.rasid-admin, .client-eye-shell).theme-sand {
  --navy:      #3f3529;
  --navy2:     #725437;
  --navy3:     #9b6a3f;
  --accent:    #b98245;
  --accent2:   #8d6139;
  --teal:      #d7a764;
  --teal-dim:  rgba(185,130,69,0.14);
  --bg:        #f8f3ec;
  --bg2:       #efe4d6;
  --border:    #e4d4c1;
  --text:      #251f19;
  --text2:     #665847;
  --text3:     #9b8c7a;
  --success:   #477a56;
  --warn:      #b98245;
  --danger:    #aa5149;
  --sidebar-bg: linear-gradient(180deg, #33271f 0%, #60452e 58%, #7a5735 100%);
  background:
    radial-gradient(circle at 92% 4%, rgba(215,167,100,0.18), transparent 24%),
    #f8f3ec;
}

body:is(.rasid-admin, .client-eye-shell).theme-arctic {
  --navy:      #18324a;
  --navy2:     #214963;
  --navy3:     #2f80a8;
  --accent:    #2f80a8;
  --accent2:   #246b8d;
  --teal:      #93c8df;
  --teal-dim:  rgba(47,128,168,0.14);
  --bg:        #f2f7fa;
  --bg2:       #e3eef4;
  --border:    #d2e1e9;
  --text:      #162534;
  --text2:     #536879;
  --text3:     #8a9cac;
  --success:   #2f8065;
  --warn:      #b48a36;
  --danger:    #b44e56;
  --sidebar-bg: linear-gradient(180deg, #10283c 0%, #183f59 58%, #245b76 100%);
  background:
    radial-gradient(circle at 92% 4%, rgba(147,200,223,0.2), transparent 24%),
    #f2f7fa;
}

body:is(.rasid-admin, .client-eye-shell).theme-forest {
  --navy:      #10251c;
  --navy2:     #1f4734;
  --navy3:     #2f6f4e;
  --accent:    #2f6f4e;
  --accent2:   #24583e;
  --teal:      #a8d5b8;
  --teal-dim:  rgba(47,111,78,0.16);
  --bg:        #f1f6f0;
  --bg2:       #e1ebdf;
  --border:    #d2dfcf;
  --text:      #17231b;
  --text2:     #516150;
  --text3:     #879684;
  --success:   #2f7d55;
  --warn:      #a98533;
  --danger:    #a94c4a;
  --sidebar-bg: linear-gradient(180deg, #0d2118 0%, #173a2b 58%, #24583e 100%);
  background:
    radial-gradient(circle at 92% 4%, rgba(168,213,184,0.2), transparent 24%),
    #f1f6f0;
}

.rasid-admin .sidebar { box-shadow: 5px 0 24px rgba(14,49,71,0.14); }
.rasid-admin .sidebar-logo { border-bottom-color: rgba(125,182,207,0.2); }
.rasid-admin .sidebar-logo::after {
  background: linear-gradient(90deg, transparent, rgba(125,182,207,0.88), transparent);
}
.rasid-admin .sidebar-logo .logo-icon { box-shadow: 0 4px 12px rgba(15,86,117,0.25); }
.rasid-admin .nav-section { color: rgba(166,214,229,0.62); }
.rasid-admin .sidebar-nav a { color: rgba(255,255,255,0.68); }
.rasid-admin .sidebar-nav a:hover { background: rgba(125,182,207,0.13); }
.rasid-admin .sidebar-nav a.active {
  background: rgba(255,255,255,0.14);
  box-shadow: inset 0 0 0 1px rgba(190,225,235,0.12);
}
.rasid-admin .sidebar-nav a.active::before { background: #a6d6e5; }

.rasid-admin .topbar {
  border-bottom-color: rgba(217,226,221,0.9);
  box-shadow: 0 2px 12px rgba(17,38,31,0.04);
}
.rasid-admin .topbar::after {
  background: linear-gradient(90deg, var(--accent), var(--teal), transparent 68%);
  opacity: 0.52;
}
.rasid-admin .topbar-title::before { background: var(--accent); }
.rasid-admin .topbar-icon-btn { background: var(--bg); }
.rasid-admin .topbar-icon-btn:hover {
  background: var(--bg2);
  color: var(--accent);
  border-color: var(--teal);
}
.rasid-admin .topbar-user { background: var(--bg); }
.rasid-admin .topbar-user:hover { background: var(--bg2); }

body.is-rtl {
  direction: rtl;
  text-align: right;
}
body.is-rtl .sidebar {
  left: auto;
  right: 0;
  box-shadow: -4px 0 24px rgba(13,45,74,0.18);
}
body.is-rtl .main {
  margin-left: 0;
  margin-right: var(--sidebar);
}
body.is-rtl .topbar {
  left: 0;
  right: var(--sidebar);
}
body.is-rtl .sidebar-nav a.active::before {
  left: auto;
  right: 0;
}
body.is-rtl .topbar-title::before,
body.is-rtl .card-title::before {
  order: 0;
}
body.is-rtl .theme-card,
body.is-rtl .custom-color-field {
  text-align: right;
}

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

.theme-card {
  padding: 14px;
  border: 1.5px solid var(--border);
  border-radius: 14px;
  background: var(--white);
  color: var(--text);
  font-family: var(--font);
  text-align: left;
  cursor: pointer;
  transition: border-color .16s, box-shadow .16s, transform .16s;
}

.theme-card:hover {
  border-color: var(--teal);
  box-shadow: 0 10px 22px rgba(17,38,31,.08);
  transform: translateY(-2px);
}

.theme-card.active {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 14%, transparent), 0 10px 24px rgba(17,38,31,.08);
}

.theme-card strong,
.theme-card small { display: block; }
.theme-card strong { margin-top: 10px; color: var(--navy); font-size: 13.5px; }
.theme-card small { margin-top: 3px; color: var(--text2); font-size: 11px; line-height: 1.5; }

.theme-preview {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 5px;
  height: 34px;
}

.theme-preview i { display: block; border-radius: 8px; }
.theme-preview-rasid i:nth-child(1) { background:#103d55; }
.theme-preview-rasid i:nth-child(2) { background:#176f94; }
.theme-preview-rasid i:nth-child(3) { background:#7db6cf; }
.theme-preview-executive i:nth-child(1) { background:#081827; }
.theme-preview-executive i:nth-child(2) { background:#315c7a; }
.theme-preview-executive i:nth-child(3) { background:#d7b56d; }
.theme-preview-sand i:nth-child(1) { background:#3f3529; }
.theme-preview-sand i:nth-child(2) { background:#b98245; }
.theme-preview-sand i:nth-child(3) { background:#e8d8c2; }
.theme-preview-arctic i:nth-child(1) { background:#18324a; }
.theme-preview-arctic i:nth-child(2) { background:#2f80a8; }
.theme-preview-arctic i:nth-child(3) { background:#b7d8ea; }
.theme-preview-forest i:nth-child(1) { background:#10251c; }
.theme-preview-forest i:nth-child(2) { background:#2f6f4e; }
.theme-preview-forest i:nth-child(3) { background:#a8d5b8; }

.custom-palette-panel {
  margin-top: 14px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--bg);
}

.custom-palette-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}

.custom-color-field {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--white);
}

.custom-color-field input {
  width: 42px;
  height: 34px;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.custom-color-field strong,
.custom-color-field span { display: block; }
.custom-color-field strong { color: var(--navy); font-size: 12px; }
.custom-color-field span { margin-top: 2px; color: var(--text3); font-size: 11px; }
.custom-palette-actions { display: flex; gap: 10px; flex-wrap: wrap; }

.terminology-settings {
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

.terminology-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 12px;
}

.terminology-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.terminology-actions input {
  width: min(260px, 100%);
  min-height: 36px;
  padding: 8px 11px;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: var(--white);
  color: var(--text);
  font-family: var(--font);
}

.terminology-note {
  margin-bottom: 10px;
  padding: 9px 11px;
  border-radius: 9px;
  background: var(--bg);
  color: var(--text2);
  font-size: 11px;
  line-height: 1.5;
}

.terminology-table-wrap {
  max-height: 520px;
  overflow: auto;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--white);
}

.terminology-table {
  width: 100%;
  min-width: 780px;
  border-collapse: collapse;
}

.terminology-table th {
  position: sticky;
  top: 0;
  z-index: 2;
  padding: 10px;
  border-bottom: 1px solid var(--border);
  background: var(--bg2);
  color: var(--text2);
  font-size: 10px;
  letter-spacing: .06em;
  text-align: left;
  text-transform: uppercase;
}

.terminology-table td {
  padding: 7px;
  border-bottom: 1px solid var(--border);
}

.terminology-table tr:last-child td { border-bottom: 0; }
.terminology-table tr[hidden] { display: none; }

.terminology-table input {
  width: 100%;
  min-height: 36px;
  padding: 8px 10px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 12px;
}

.terminology-table input:focus {
  border-color: var(--accent);
  outline: none;
  background: var(--white);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 12%, transparent);
}

.terminology-table input[readonly] {
  color: var(--text2);
  cursor: default;
}

.terminology-reset {
  width: 30px;
  height: 30px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--white);
  color: var(--danger);
  font-size: 18px;
  cursor: pointer;
}

.terminology-reset:hover { background: #fff1f1; border-color: #f2b9b9; }

body.is-rtl .terminology-table th { text-align: right; }

@media (max-width: 760px) {
  .terminology-head { align-items: stretch; flex-direction: column; }
  .terminology-actions { justify-content: stretch; }
  .terminology-actions input { width: 100%; }
  .terminology-actions .btn { flex: 1 1 auto; }
  .terminology-table-wrap { max-height: 460px; }
}

body.is-rtl .eye-sidebar-search svg { left: auto; right: 12px; }
body.is-rtl .eye-sidebar-search input { padding: 0 36px 0 40px; }
body.is-rtl .eye-sidebar-search kbd { left: 10px; right: auto; }
body.is-rtl .eye-nav-group-toggle { text-align: right; }

.rasid-admin .card,
.rasid-admin .fm-filter-bar,
.rasid-admin .fm-kpi-card {
  border-color: rgba(217,226,221,0.96);
  box-shadow: 0 4px 16px rgba(17,38,31,0.035);
}
.rasid-admin .card:hover,
.rasid-admin .fm-kpi-card:hover {
  border-color: rgba(125,182,207,0.56);
  box-shadow: 0 10px 24px rgba(17,38,31,0.07);
}
.rasid-admin .card-title::before {
  background: linear-gradient(180deg, var(--accent), var(--teal));
}
.rasid-admin .fm-kpi-card.muted { background: #fbfcfb; }
.rasid-admin .fm-kpi-icon.teal { color: #176f94; background: rgba(125,182,207,0.18); }
.rasid-admin .fm-kpi-icon.blue { color: #176f94; background: #e6f1f5; }
.rasid-admin .fm-kpi-icon.purple { color: #77659a; background: #f0edf6; }
.rasid-admin .fm-kpi-icon.amber { color: #a36c00; background: #fbf3df; }
.rasid-admin .fm-kpi-icon.rose { color: #a84745; background: #f8e8e7; }
.rasid-admin .fm-kpi-icon.green { color: #287b59; background: #e5f3ed; }
.rasid-admin .fm-live-pill { border-color: #cfe6dc; background: #f0f8f4; color: #287b59; }
.rasid-admin .fm-live-pill span { background: #2f8f68; box-shadow: 0 0 0 3px rgba(47,143,104,0.13); }
.rasid-admin .fm-site-avatar { color: #0f5675; background: rgba(125,182,207,0.18); }
.rasid-admin .fm-service-track { background: #e9efec; }
.rasid-admin .fm-service-track span { background: linear-gradient(90deg, #176f94, #7db6cf); }
.rasid-admin .fm-empty-module-icon { color: #287b59; background: #e5f3ed; }
.rasid-admin .fm-readiness-dot.ready { border-color: #2f8f68; background: #2f8f68; box-shadow: 0 0 0 3px rgba(47,143,104,0.12); }

.rasid-admin .btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--navy2));
  box-shadow: 0 3px 10px rgba(15,86,117,0.22);
}
.rasid-admin .btn-primary:hover {
  background: linear-gradient(135deg, var(--navy3), var(--navy2));
  box-shadow: 0 5px 14px rgba(15,86,117,0.28);
}
.rasid-admin input:focus,
.rasid-admin select:focus,
.rasid-admin textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(23,111,148,0.11);
}
.rasid-admin tbody tr:hover { background: #f5f9f7; }

/* ══════════════════════════════════════════════
   ALERTS
   ══════════════════════════════════════════════ */
.alert {
  padding: 12px 16px;
  border-radius: 9px;
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}

.alert-success { background: #e8f9f1; color: #0a6644; border: 1px solid #a7e9cc; }
.alert-error   { background: #fdecea; color: #8b1a1a; border: 1px solid #f5c6c6; }
.alert-info    { background: #e5f2fb; color: #0e4d7a; border: 1px solid #aad6f5; }
.alert svg     { width: 16px; height: 16px; flex-shrink: 0; }

/* ══════════════════════════════════════════════
   LOADING
   ══════════════════════════════════════════════ */
.loader-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
  color: var(--text3);
  gap: 10px;
  font-size: 13px;
}

@keyframes spin { to { transform: rotate(360deg); } }

.spinner {
  width: 20px;
  height: 20px;
  border: 2px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

/* ══════════════════════════════════════════════
   EMPTY STATE
   ══════════════════════════════════════════════ */
.empty-state {
  text-align: center;
  padding: 48px 24px;
  color: var(--text2);
}

.empty-state svg {
  width: 48px;
  height: 48px;
  margin: 0 auto 12px;
  color: var(--text3);
  display: block;
}

.empty-state p { font-size: 14px; }

/* ══════════════════════════════════════════════
   LOGOUT BUTTON
   ══════════════════════════════════════════════ */
.btn-logout {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid rgba(229,57,53,0.2);
  background: rgba(229,57,53,0.08);
  color: #f28b87;
  font-size: 13px;
  font-family: var(--font);
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
}

.btn-logout:hover {
  background: rgba(229,57,53,0.18);
  color: #ffb3b0;
  border-color: rgba(229,57,53,0.35);
}
.btn-logout svg { width: 16px; height: 16px; }

/* ══════════════════════════════════════════════
   MODAL
   ══════════════════════════════════════════════ */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(8,24,44,0.6);
  backdrop-filter: blur(2px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
}

.modal-overlay.open { opacity: 1; pointer-events: all; }

.modal {
  background: var(--white);
  border-radius: 16px;
  padding: 28px;
  width: min(520px, 90vw);
  max-height: 85vh;
  overflow-y: auto;
  transform: translateY(14px) scale(0.99);
  transition: transform 0.22s ease, opacity 0.22s ease;
  box-shadow: 0 24px 60px rgba(8,24,44,0.22);
}

.modal-overlay.open .modal { transform: translateY(0) scale(1); }

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
}

.modal-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--navy);
  display: flex;
  align-items: center;
  gap: 8px;
}

.modal-title::before {
  content: "";
  width: 4px;
  height: 16px;
  border-radius: 2px;
  background: linear-gradient(180deg, var(--accent), var(--teal));
  display: inline-block;
}

.modal-close {
  width: 30px;
  height: 30px;
  border-radius: 7px;
  border: 1px solid var(--border);
  background: var(--bg);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text2);
  font-size: 17px;
  transition: all 0.15s;
}
.modal-close:hover { background: var(--bg2); color: var(--danger); border-color: #f5c6c6; }

/* ══════════════════════════════════════════════
   SEARCH BAR
   ══════════════════════════════════════════════ */
.search-bar {
  position: relative;
  max-width: 300px;
}

.search-bar svg {
  position: absolute;
  left: 11px;
  top: 50%;
  transform: translateY(-50%);
  width: 15px;
  height: 15px;
  color: var(--text3);
}

.search-bar input { padding-left: 36px; }

/* ================================================================
   STICKY ACTION BARS
   Keeps search/add controls visible without floating over content.
   ================================================================ */
.rasid-admin .users-toolbar,
.rasid-admin .card-header:has(.search-bar),
.rasid-admin .page-header:has(.btn) {
  position: sticky;
  top: 76px;
  z-index: 34;
  border: 1px solid rgba(217,226,221,0.94);
  border-radius: 16px;
  background: rgba(255,255,255,0.94);
  box-shadow: 0 10px 24px rgba(17,38,31,0.055);
  backdrop-filter: blur(14px);
}

.rasid-admin .card-header:has(.search-bar) {
  margin: -20px -20px 16px;
  padding: 14px 20px;
  border-top: 0;
  border-left: 0;
  border-right: 0;
  border-radius: 14px 14px 0 0;
  box-shadow: 0 8px 18px rgba(17,38,31,0.04);
}

.rasid-admin .page-header:has(.btn) {
  padding: 14px 16px;
}

.audit-detail-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.audit-detail-chip {
  display: inline-flex;
  align-items: center;
  max-width: 240px;
  padding: 4px 7px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--bg);
  color: var(--text2);
  font-size: 11px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

@media (max-width: 1024px) {
  .rasid-admin .users-toolbar,
  .rasid-admin .card-header:has(.search-bar),
  .rasid-admin .page-header:has(.btn) {
    top: 132px;
  }
}

@media (max-width: 760px) {
  .rasid-admin .users-toolbar,
  .rasid-admin .card-header:has(.search-bar),
  .rasid-admin .page-header:has(.btn) {
    top: 118px;
    border-radius: 14px;
  }
}

/* ══════════════════════════════════════════════
   DIVIDER
   ══════════════════════════════════════════════ */
.divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 20px 0;
}

/* ══════════════════════════════════════════════
   TOAST
   ══════════════════════════════════════════════ */
#toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.toast {
  background: var(--navy);
  color: white;
  padding: 12px 18px;
  border-radius: 10px;
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 240px;
  animation: slideUp 0.25s ease;
  box-shadow: 0 8px 28px rgba(8,24,44,0.25);
  border-left: 3px solid var(--teal);
}

.toast.success { background: #0a6644; border-left-color: #4ade80; }
.toast.error   { background: #8b1a1a; border-left-color: #fca5a5; }

@keyframes slideUp {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ================================================================
   RASID ADMIN THEME: COMPLETE COMPONENT COVERAGE
   ================================================================ */
.rasid-admin .sidebar-logo {
  padding: 20px 18px 17px;
  background: rgba(8,36,52,0.18);
}
.rasid-admin .sidebar-logo span { color: #f7fbfc; }
.rasid-admin .sidebar-logo small { color: rgba(218,239,244,0.62); }
.rasid-admin .sidebar-nav { padding: 14px 11px; }
.rasid-admin .nav-section { padding: 18px 10px 7px; }
.rasid-admin .sidebar-nav a { padding: 10px 12px; border-radius: 8px; }
.rasid-admin .sidebar-nav a svg { color: #b9dce7; opacity: 0.78; }
.rasid-admin .sidebar-nav a:hover { color: #fff; }
.rasid-admin .sidebar-nav a.active {
  color: #fff;
  background: linear-gradient(90deg, rgba(125,182,207,0.22), rgba(255,255,255,0.1));
  box-shadow: inset 0 0 0 1px rgba(190,225,235,0.14), 0 4px 14px rgba(6,38,54,0.12);
}
.rasid-admin .sidebar-nav a.active svg { color: #e4f5f8; }
.rasid-admin .sidebar-footer { border-top-color: rgba(218,239,244,0.12); }
.rasid-admin .app-version {
  border-color: rgba(218,239,244,0.12);
  background: rgba(218,239,244,0.07);
  color: rgba(218,239,244,0.58);
}
.rasid-admin .btn-logout {
  color: #f2c1be;
  border-color: rgba(242,193,190,0.24);
  background: rgba(185,74,72,0.12);
}
.rasid-admin .btn-logout:hover {
  color: #fff;
  border-color: rgba(242,193,190,0.42);
  background: rgba(185,74,72,0.3);
}

.rasid-admin .page-title { color: var(--navy); }
.rasid-admin thead th { color: var(--text2); background: var(--bg); }
.rasid-admin tbody tr { border-bottom-color: var(--border); }
.rasid-admin .stat-card { border-color: var(--border); box-shadow: 0 4px 16px rgba(17,38,31,0.035); }
.rasid-admin .stat-card:hover { box-shadow: 0 10px 24px rgba(17,38,31,0.07); }
.rasid-admin .stat-icon.blue { color: var(--accent); background: var(--teal-dim); }
.rasid-admin .stat-icon.green { color: var(--success); background: rgba(47,143,104,0.13); }
.rasid-admin .stat-icon.amber { color: #a36c00; background: #fbf3df; }
.rasid-admin .stat-icon.rose { color: #a84745; background: #f8e8e7; }
.rasid-admin .stat-icon.purple { color: #77659a; background: #f0edf6; }
.rasid-admin .stat-icon.teal { color: #176f94; background: rgba(125,182,207,0.18); }

.rasid-admin .btn-outline { color: #103d55; border-color: #d9e2dd; background: rgba(255,255,255,0.7); }
.rasid-admin .btn-outline:hover { color: #0f5675; border-color: #7db6cf; background: #f1f7f8; }
.rasid-admin .btn-danger { color: #a84745; border-color: #efcfcd; background: #f8e8e7; }
.rasid-admin .btn-danger:hover { color: #fff; border-color: #a84745; background: #a84745; }

.rasid-admin .badge-green { color: #287b59; background: #e5f3ed; }
.rasid-admin .badge-red { color: #a84745; background: #f8e8e7; }
.rasid-admin .badge-amber { color: #8b650d; background: #fbf3df; }
.rasid-admin .badge-blue { color: #0f5675; background: #e6f1f5; }
.rasid-admin .badge-purple { color: #6f5d91; background: #f0edf6; }
.rasid-admin .badge-gray { color: #52635c; background: #edf2ef; }
.rasid-admin .badge-teal { color: #0f5675; background: rgba(125,182,207,0.18); }

.rasid-admin .alert-success { color: #287b59; border-color: #c7e3d7; background: #eef8f3; }
.rasid-admin .alert-error { color: #a84745; border-color: #efcfcd; background: #fdf2f1; }
.rasid-admin .alert-info { color: #0f5675; border-color: #cde1e9; background: #f0f7f9; }
.rasid-admin .spinner { border-color: #d9e2dd; border-top-color: #176f94; }

.rasid-admin .modal-overlay { background: rgba(14,49,71,0.56); }
.rasid-admin .modal { border: 1px solid rgba(217,226,221,0.96); box-shadow: 0 28px 72px rgba(14,49,71,0.2); }
.rasid-admin .modal-title::before { background: linear-gradient(180deg, #176f94, #7db6cf); }
.rasid-admin .modal-close:hover { color: #a84745; border-color: #efcfcd; background: #fdf2f1; }

.rasid-admin .toast { background: #103d55; border-left-color: #7db6cf; box-shadow: 0 10px 30px rgba(14,49,71,0.2); }
.rasid-admin .toast.success { background: #287b59; border-left-color: #a9ddc7; }
.rasid-admin .toast.error { background: #91413f; border-left-color: #efb7b4; }

/* ================================================================
   CLIENT USERS DIRECTORY
   ================================================================ */
.clients-page { padding: 18px 18px 26px; }
.clients-fixed-panel {
  position: sticky;
  top: 60px;
  z-index: 80;
  margin: 0 0 18px;
  padding: 10px 0 12px;
  border: 0;
  background: linear-gradient(180deg, var(--bg) 0%, var(--bg) 78%, rgba(246,249,247,0) 100%);
  box-shadow: none;
}
.clients-hero {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(360px, 520px);
  align-items: center;
  gap: 18px;
  padding: 14px 18px;
  border: 1px solid rgba(217,226,221,0.96);
  border-radius: 18px;
  background: rgba(255,255,255,0.98);
  box-shadow: 0 12px 32px rgba(17,38,31,0.075);
  backdrop-filter: blur(14px);
}
.clients-hero .page-title { font-size: 20px; line-height: 1.1; }
.clients-hero-copy { min-width: 0; }
.clients-hero-copy .page-subtitle {
  margin-top: 3px;
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.clients-header-actions {
  display: flex;
  width: 100%;
  min-width: 0;
  align-items: center;
  gap: 10px;
}
.clients-search-bar { flex: 1 1 auto; width: auto; }
.clients-search-bar input { min-height: 40px; font-size: 13px; }
.clients-header-actions .btn {
  min-height: 40px;
  padding: 9px 18px;
  white-space: nowrap;
}

@media (max-width: 1024px) {
  .clients-page { padding: 16px 16px 22px; }
  .clients-fixed-panel { top: 126px; }
  .clients-hero { grid-template-columns: minmax(200px, 1fr) minmax(280px, 440px); }
}

@media (max-width: 760px) {
  .clients-page { padding: 12px 10px 18px; }
  .clients-fixed-panel { top: 120px; padding-bottom: 8px; }
  .clients-hero {
    grid-template-columns: 1fr;
    align-items: stretch;
    gap: 10px;
    padding: 12px;
  }
  .clients-hero-copy .page-subtitle { white-space: normal; }
  .clients-header-actions {
    width: 100%;
    flex-wrap: wrap;
  }
  .clients-search-bar { flex: 1 1 220px; width: auto; }
  .clients-header-actions .btn { flex: 1 1 140px; }
}

.users-toolbar {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  margin-bottom: 16px; padding: 14px 16px; border: 1px solid var(--border);
  border-radius: 12px; background: var(--white); box-shadow: 0 4px 16px rgba(17,38,31,0.035);
}
.users-toolbar strong, .users-toolbar span { display: block; }
.users-toolbar strong { color: var(--navy); font-size: 14px; }
.users-toolbar span { color: var(--text3); font-size: 11px; margin-top: 2px; }
.users-toolbar .search-bar { width: 250px; }

.user-client-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 16px; }
.user-client-card {
  display: block; min-height: 212px; padding: 16px; border: 1px solid var(--border);
  border-radius: 12px; background: var(--white); color: var(--text); font-family: var(--font);
  text-align: left; cursor: pointer; box-shadow: 0 4px 16px rgba(17,38,31,0.035);
  transition: transform .18s, box-shadow .18s, border-color .18s;
}
.user-client-card:hover {
  border-color: rgba(125,182,207,0.72); box-shadow: 0 12px 26px rgba(17,38,31,0.08); transform: translateY(-3px);
}
.user-client-card-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.user-client-logo {
  display: flex; width: 46px; height: 46px; align-items: center; justify-content: center;
  overflow: hidden; border: 1px solid rgba(125,182,207,0.36); border-radius: 11px;
  background: rgba(125,182,207,0.16); color: var(--accent2); font-family: var(--mono); font-size: 16px; font-weight: 700;
}
.user-client-logo.small { width: 38px; height: 38px; border-radius: 9px; font-size: 13px; }
.user-client-logo img { width: 100%; height: 100%; object-fit: contain; padding: 4px; background: #fff; }
.user-client-open {
  display: flex; width: 28px; height: 28px; align-items: center; justify-content: center;
  border-radius: 50%; background: var(--bg); color: var(--text3); transition: background .18s, color .18s, transform .18s;
}
.user-client-open svg { width: 15px; height: 15px; }
.user-client-card:hover .user-client-open { color: #fff; background: var(--accent); transform: translateX(2px); }
.user-client-name { color: var(--navy); font-size: 15px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-client-domain { min-height: 18px; color: var(--text3); font-size: 11px; margin-top: 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-client-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 18px; padding-top: 12px; border-top: 1px solid var(--border); }
.user-client-stats span, .user-client-stats strong, .user-client-stats small { display: block; }
.user-client-stats span + span { padding-left: 12px; border-left: 1px solid var(--border); }
.user-client-stats strong { color: var(--navy); font-family: var(--mono); font-size: 17px; }
.user-client-stats small { color: var(--text3); font-size: 10px; margin-top: 2px; }
.contract-card-stats { grid-template-columns: repeat(3, 1fr); gap: 4px; }
.contract-card-stats span + span { padding-left: 8px; }
.contract-card-stats strong { font-size: 15px; }
.contract-client-add {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border: 1px solid rgba(46,134,171,0.22);
  border-radius: 9px;
  background: rgba(46,134,171,0.1);
  color: var(--accent);
  cursor: pointer;
  transition: background .16s ease, border-color .16s ease, color .16s ease, transform .16s ease;
}
.contract-client-add svg { width: 15px; height: 15px; }
.contract-client-add:hover {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
  transform: translateY(-1px);
}

.contract-scope-panel {
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--bg);
  padding: 12px;
}

.contract-scope-add {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr) 140px auto;
  gap: 8px;
  margin-bottom: 10px;
}

.contract-scope-sites {
  display: grid;
  gap: 10px;
  margin-top: 10px;
  max-height: 280px;
  overflow: auto;
  padding-right: 2px;
}

.contract-scope-empty {
  padding: 14px;
  border: 1px dashed var(--border);
  border-radius: 12px;
  color: var(--text3);
  font-size: 12px;
  text-align: center;
  background: var(--white);
}

.contract-scope-site {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--white);
  padding: 10px;
  transition: border-color .16s, box-shadow .16s;
}

.contract-scope-site.selected {
  border-color: var(--teal);
  box-shadow: 0 8px 18px rgba(17,38,31,0.055);
}

.contract-scope-site-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 9px;
}

.contract-scope-site-head input { margin-top: 3px; }
.contract-scope-site-head strong,
.contract-scope-site-head small { display: block; }
.contract-scope-site-head strong { color: var(--text); font-size: 13px; }
.contract-scope-site-head small { color: var(--text3); font-size: 11px; margin-top: 2px; }

.contract-countdown-preview,
.contract-countdown-cell {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  padding: 9px 11px;
  border: 1px solid rgba(46,134,171,0.18);
  border-radius: 10px;
  background: rgba(46,134,171,0.08);
  color: var(--accent2);
  font-size: 12px;
  font-weight: 700;
}
.contract-countdown-cell {
  width: auto;
  min-width: 116px;
  padding: 6px 9px;
  background: rgba(14,160,105,0.08);
  color: var(--success);
}
.contract-countdown-cell.warn {
  background: rgba(240,165,0,0.1);
  color: #a16207;
}
.contract-countdown-cell.expired {
  background: rgba(229,57,53,0.1);
  color: var(--danger);
}

.contract-scope-print {
  display: grid;
  gap: 10px;
}

.contract-scope-print-site {
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #f8fafc;
  padding: 12px 14px;
}

.contract-scope-print-site strong,
.contract-scope-print-site small { display: block; }
.contract-scope-print-site strong { color: #0f172a; font-size: 13px; }
.contract-scope-print-site small { color: #64748b; font-size: 11px; margin-top: 2px; }
.contract-scope-print-site ul { margin: 8px 18px 0; padding: 0; color: #334155; font-size: 12px; line-height: 1.7; }

.inspection-points-print {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 8px;
}

.inspection-point-chip {
  border: 1px solid #dbe6e0;
  border-radius: 10px;
  background: #ffffff;
  padding: 10px 12px;
}

.inspection-point-chip strong,
.inspection-point-chip span {
  display: block;
}

.inspection-point-chip strong {
  color: #0f3f56;
  font-family: var(--mono);
  font-size: 12px;
}

.inspection-point-chip span {
  color: #64748b;
  font-size: 11px;
  margin-top: 3px;
}

@media (max-width: 760px) {
  .contract-scope-add { grid-template-columns: 1fr 1fr; }
}

.contracts-page { padding: 18px 18px 26px; }
.contracts-fixed-panel {
  position: sticky;
  top: 60px;
  z-index: 80;
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(360px, 640px);
  align-items: center;
  gap: 18px;
  margin: 0 0 18px;
  padding: 10px 0 12px;
  border: 0;
  border-radius: 0;
  background: linear-gradient(180deg, var(--bg) 0%, var(--bg) 78%, rgba(246,249,247,0) 100%);
  box-shadow: none;
}
.contracts-fixed-panel > div:first-child,
.contracts-header-actions {
  min-height: 68px;
  padding: 14px 18px;
  border: 1px solid rgba(217,226,221,0.96);
  background: rgba(255,255,255,0.98);
  box-shadow: 0 12px 32px rgba(17,38,31,0.075);
  backdrop-filter: blur(14px);
}
.contracts-fixed-panel > div:first-child {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  border-radius: 18px 0 0 18px;
}
.contracts-header-actions {
  display: flex;
  width: 100%;
  min-width: 0;
  align-items: center;
  gap: 10px;
  border-left: 0;
  border-radius: 0 18px 18px 0;
}
.contracts-search-bar { flex: 1 1 auto; width: auto; }
.contracts-search-bar input { min-height: 40px; font-size: 13px; }
.contracts-header-actions .btn { min-height: 40px; padding: 9px 18px; white-space: nowrap; }
.contracts-page > .card > .card-header { display: none; }
.contracts-page > .card { position: relative; z-index: 1; }
.rasid-admin .contracts-fixed-panel {
  top: 60px;
  z-index: 80;
  display: grid;
  align-items: center;
  justify-content: stretch;
  margin: 0 0 18px;
  padding: 10px 0 12px;
  border: 0;
  border-radius: 0;
  background: linear-gradient(180deg, var(--bg) 0%, var(--bg) 78%, rgba(246,249,247,0) 100%);
  box-shadow: none;
}
.rasid-admin .contracts-fixed-panel > div:first-child,
.rasid-admin .contracts-header-actions {
  border: 1px solid rgba(217,226,221,0.96);
  background: rgba(255,255,255,0.98);
  box-shadow: 0 12px 32px rgba(17,38,31,0.075);
}

@media (max-width: 1024px) {
  .contracts-page { padding: 16px 16px 22px; }
  .contracts-fixed-panel {
    top: 126px;
    grid-template-columns: minmax(200px, 1fr) minmax(280px, 500px);
  }
  .rasid-admin .contracts-fixed-panel { top: 126px; }
}

@media (max-width: 760px) {
  .contracts-page { padding: 12px 10px 18px; }
  .contracts-fixed-panel {
    top: 120px;
    grid-template-columns: 1fr;
    gap: 0;
    padding-bottom: 8px;
  }
  .contracts-fixed-panel > div:first-child {
    min-height: auto;
    padding: 12px;
    border-radius: 16px 16px 0 0;
    border-bottom: 0;
  }
  .contracts-header-actions {
    padding: 12px;
    border-left: 1px solid rgba(217,226,221,0.96);
    border-radius: 0 0 16px 16px;
    flex-wrap: wrap;
  }
  .contracts-search-bar { flex: 1 1 220px; width: auto; }
  .contracts-header-actions .btn { flex: 1 1 150px; }
  .rasid-admin .contracts-fixed-panel { top: 120px; }
}
.user-client-empty { grid-column: 1 / -1; }

.user-detail-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 14px; }
.user-detail-client { display: flex; align-items: center; gap: 10px; }
.user-detail-client strong, .user-detail-client small { display: block; }
.user-detail-client strong { color: var(--navy); font-size: 13px; }
.user-detail-client small { color: var(--text3); font-size: 10px; margin-top: 2px; }
.user-list-card { margin-bottom: 0; }
.user-delete-btn {
  display: flex; width: 28px; height: 28px; align-items: center; justify-content: center;
  border: 1px solid #efcfcd; border-radius: 7px; background: #fdf2f1; color: #a84745; cursor: pointer; transition: background .15s, color .15s;
}
.user-delete-btn svg { width: 13px; height: 13px; }
.user-delete-btn:hover { color: #fff; background: #a84745; }

/* ================================================================
   SERVICES CATALOG
   ================================================================ */
.services-note {
  display: flex; gap: 8px; margin-bottom: 16px; padding: 12px 15px;
  border: 1px solid #cde1e9; border-radius: 10px; background: #f0f7f9;
  color: #0f5675; font-size: 11px;
}
.services-note strong { white-space: nowrap; }
.services-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 16px; }
.service-manage-card {
  padding: 16px; border: 1px solid var(--border); border-radius: 12px; background: var(--white);
  box-shadow: 0 4px 16px rgba(17,38,31,0.035); transition: transform .18s, box-shadow .18s, border-color .18s;
}
.service-manage-card:hover { border-color: rgba(125,182,207,0.72); box-shadow: 0 12px 26px rgba(17,38,31,0.08); transform: translateY(-2px); }
.service-manage-card.inactive { background: #fbfcfb; opacity: .78; }
.service-manage-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.service-manage-icon {
  display: flex; width: 44px; height: 44px; align-items: center; justify-content: center;
  border-radius: 11px; background: #e6f1f5; color: #176f94;
  overflow: hidden;
}
.service-logo-img,
.service-manage-logo {
  width: 30px;
  height: 30px;
  object-fit: contain;
  display: block;
}
.service-logo-placeholder {
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: rgba(23,111,148,.12);
  color: var(--accent);
  font-size: 10px;
  font-weight: 800;
  line-height: 1;
}
.service-badge-logo {
  width: 14px;
  height: 14px;
  object-fit: contain;
  display: block;
}
.fm-service-logo {
  width: 16px;
  height: 16px;
  object-fit: contain;
  display: block;
}
.service-manage-icon.green { color: #287b59; background: #e5f3ed; }
.service-manage-icon.amber { color: #a36c00; background: #fbf3df; }
.service-manage-icon.purple { color: #77659a; background: #f0edf6; }
.service-manage-icon.teal { color: #0f5675; background: rgba(125,182,207,0.18); }
.service-manage-icon.gray { color: #52635c; background: #edf2ef; }
.service-manage-name { color: var(--navy); font-size: 15px; font-weight: 700; }
.service-manage-meta { color: var(--text3); font-size: 11px; margin-top: 3px; }
.service-manage-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--border); }
.service-manage-actions .btn { flex: 1; justify-content: center; }
.service-manage-actions .btn:disabled { opacity: .42; cursor: not-allowed; }
.service-modal-preview { min-height: 45px; padding: 10px; border: 1px dashed var(--border); border-radius: 8px; background: var(--bg); }
.service-badge { gap: 5px; }
.service-badge-icon { display: inline-flex; width: 13px; height: 13px; align-items: center; justify-content: center; }
.service-badge-icon img { max-width: 14px; max-height: 14px; }
.fm-service-meta strong { display: inline-flex; align-items: center; gap: 6px; }
.fm-service-mini-icon { display: inline-flex; width: 15px; height: 15px; color: var(--accent); }
.fm-service-mini-icon img { max-width: 16px; max-height: 16px; }

@media (max-width: 680px) {
  .users-toolbar { align-items: stretch; flex-direction: column; }
  .users-toolbar .search-bar { width: 100%; max-width: none; }
  .user-client-grid { grid-template-columns: 1fr; }
  .user-detail-head { align-items: flex-start; flex-direction: column; }
}

/* ================================================================
   RESPONSIVE APP SHELL
   Keeps the admin workspace usable on tablets and phones.
   ================================================================ */
html { max-width: 100%; overflow-x: hidden; }
body { min-width: 0; overflow-x: hidden; }
img, video, canvas, svg { max-width: 100%; }
.main, .page, .card, .table-wrapper { min-width: 0; }
.page-header > div:first-child { min-width: 0; }
.page-header .page-subtitle { max-width: 760px; }

@media (max-width: 1180px) {
  :root { --sidebar: 230px; }
  .page { padding: 22px; }
  .stats-grid { grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }
  .form-grid { grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }
  .card { padding: 20px; }
}

@media (max-width: 1024px) {
  body {
    display: block;
    min-height: 100%;
  }

  .sidebar {
    position: sticky;
    top: 0;
    left: auto;
    width: 100%;
    height: auto;
    min-height: 68px;
    max-height: none;
    flex-direction: row;
    align-items: stretch;
    overflow-x: auto;
    overflow-y: hidden;
    box-shadow: 0 6px 22px rgba(13,45,74,0.16);
  }

  .sidebar-logo {
    flex: 0 0 auto;
    min-width: 188px;
    padding: 12px 16px;
    border-bottom: 0;
    border-right: 1px solid rgba(255,255,255,0.08);
  }

  .sidebar-logo::after {
    inset: auto 0 0 0;
    height: 2px;
  }

  .sidebar-nav {
    display: flex;
    flex: 1 1 auto;
    align-items: center;
    gap: 6px;
    padding: 10px;
    overflow-x: auto;
    overflow-y: hidden;
    white-space: nowrap;
    scrollbar-width: thin;
  }

  .sidebar-nav::-webkit-scrollbar { display: block; height: 4px; }
  .sidebar-nav::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.24); border-radius: 999px; }
  .nav-section { display: none; }

  .sidebar-nav a,
  .sidebar-nav .nav-item-disabled {
    flex: 0 0 auto;
    margin: 0;
    padding: 9px 12px;
  }

  .sidebar-nav a.active::before {
    left: 18%;
    right: 18%;
    top: auto;
    bottom: -7px;
    width: auto;
    height: 3px;
    border-radius: 3px 3px 0 0;
  }

  .sidebar-footer {
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: center;
    flex: 0 0 auto;
    padding: 10px 12px;
    border-top: 0;
    border-left: 1px solid rgba(255,255,255,0.08);
  }

  .btn-logout {
    width: auto;
    height: 42px;
    padding: 0 12px;
    white-space: nowrap;
  }

  .app-version {
    margin-bottom: 0;
    padding: 5px 8px;
    font-size: 9px;
  }

  .main {
    margin-left: 0;
    width: 100%;
    min-height: calc(100vh - 68px);
    padding-top: 58px;
  }
  body.is-rtl .main {
    margin-right: 0;
  }

  .topbar {
    position: fixed;
    top: 68px;
    left: 0;
    right: 0;
    z-index: 90;
    height: auto;
    min-height: 58px;
    padding: 12px 22px;
  }
  body.is-rtl .topbar {
    left: 0;
    right: 0;
  }

  .page { padding: 20px; }
  .page-header { align-items: flex-start; flex-wrap: wrap; }
  .page-title { font-size: 20px; }
  .card-header { align-items: flex-start; flex-wrap: wrap; gap: 12px; }
  .search-bar { width: 100%; max-width: none; }
  .table-wrapper { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  table { min-width: 720px; }

  .modal-overlay {
    align-items: flex-start;
    padding: 18px;
    overflow-y: auto;
  }

  .modal {
    width: min(100%, 620px);
    max-height: none;
    padding: 22px;
  }
}

@media (max-width: 760px) {
  .sidebar {
    min-height: 62px;
    align-items: center;
  }

  .sidebar-logo {
    min-width: 76px;
    width: 76px;
    justify-content: center;
    padding: 10px;
  }

  .sidebar-logo > div:last-child { display: none; }
  .sidebar-logo .logo-icon { width: 38px; height: 38px; }

  .sidebar-nav {
    gap: 5px;
    padding: 9px 8px;
  }

  .sidebar-nav a,
  .sidebar-nav .nav-item-disabled {
    gap: 6px;
    padding: 9px 10px;
    font-size: 12px;
  }

  .sidebar-nav a svg,
  .sidebar-nav .nav-item-disabled svg {
    width: 16px;
    height: 16px;
  }

  .sidebar-nav .nav-item-disabled small {
    display: none;
  }

  .sidebar-footer { padding: 8px; }
  .app-version { display: none; }
  .btn-logout {
    width: 40px;
    padding: 0;
    justify-content: center;
    font-size: 0;
  }

  .btn-logout svg {
    width: 17px;
    height: 17px;
  }

  .topbar {
    top: 62px;
    padding: 10px 14px;
    gap: 12px;
  }

  .topbar-title {
    min-width: 0;
    font-size: 14px;
  }

  .topbar-right { gap: 8px; }
  .topbar-icon-btn {
    width: 34px;
    height: 34px;
    border-radius: 10px;
  }
  .topbar-user {
    padding: 4px;
    gap: 6px;
  }

  .topbar-user > span,
  .topbar-user > div:not(.avatar) {
    display: none;
  }

  .page { padding: 16px 14px; }
  .page-header {
    flex-direction: column;
    margin-bottom: 18px;
  }

  .page-header .btn,
  .page-header > .btn,
  .page-header > div:last-child {
    width: 100%;
  }

  .page-header > div:last-child {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
  }

  .page-header > div:last-child .btn { flex: 1 1 150px; justify-content: center; }
  .page-title { font-size: 19px; }
  .page-subtitle { font-size: 12px; line-height: 1.6; }

  .card {
    padding: 16px;
    border-radius: 11px;
    margin-bottom: 16px;
  }

  .card-header {
    margin-bottom: 14px;
    padding-bottom: 12px;
  }

  .stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 16px;
  }

  .stat-card {
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
    padding: 15px;
  }

  .stat-icon {
    width: 40px;
    height: 40px;
  }

  .stat-value { font-size: 24px; }
  .form-grid { grid-template-columns: 1fr; gap: 12px; }
  .btn { justify-content: center; min-height: 40px; }
  .btn-sm { min-height: 34px; }

  input[type="text"],
  input[type="email"],
  input[type="password"],
  input[type="tel"],
  input[type="number"],
  input[type="date"],
  input[type="file"],
  select,
  textarea {
    min-height: 42px;
    font-size: 16px;
  }

  .fm-filter-bar,
  .fm-kpi-grid,
  .fm-dashboard-grid,
  .fm-dashboard-grid.lower {
    grid-template-columns: 1fr;
  }

  .fm-header-actions,
  .fm-filter-heading,
  .fm-service-meta,
  .fm-site-row {
    align-items: flex-start;
  }

  .fm-header-actions { flex-wrap: wrap; }
  .fm-kpi-card { min-height: 136px; }
  .fm-site-row { gap: 9px; }
  .fm-health-status { margin-left: auto; }

  .users-toolbar,
  .services-note {
    align-items: stretch;
    flex-direction: column;
  }

  .services-grid,
  .user-client-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .service-manage-actions .btn { flex-basis: 100%; }
  .modal-overlay { padding: 10px; }
  .modal { width: 100%; padding: 18px; border-radius: 14px; }
  #toast-container {
    left: 12px;
    right: 12px;
    bottom: 12px;
  }
  .toast { min-width: 0; width: 100%; }
}

@media (max-width: 520px) {
  .stats-grid,
  .fm-kpi-grid {
    grid-template-columns: 1fr;
  }

  .sidebar-nav a {
    flex-direction: column;
    min-width: 66px;
    gap: 4px;
    padding: 8px 8px;
    font-size: 10.5px;
    line-height: 1.1;
  }

  .sidebar-nav a .nav-unread-badge {
    position: absolute;
    top: 3px;
    right: 5px;
    min-width: 17px;
    height: 17px;
    padding: 0 5px;
    margin-left: 0;
    font-size: 9px;
  }

  .page { padding: 14px 10px; }
  .card { padding: 14px; }
  .card-title { font-size: 13px; }
  .table-wrapper { margin-inline: -4px; padding-inline: 4px; }
  table { min-width: 640px; }
  th, td { padding: 10px 12px; }

  .user-client-stats,
  .contract-card-stats {
    grid-template-columns: 1fr;
  }

  .user-client-stats span + span {
    padding-left: 0;
    padding-top: 8px;
    border-left: 0;
    border-top: 1px solid var(--border);
  }

  .modal-header {
    align-items: flex-start;
    gap: 12px;
  }
}

/* Client admin dashboard */
.client-dashboard-page {
  background:
    radial-gradient(circle at top right, rgba(125,182,207,0.18), transparent 32%),
    linear-gradient(180deg, rgba(241,247,247,0.72), rgba(255,255,255,0));
}

.client-dashboard-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  padding: 24px;
  margin-bottom: 18px;
  border: 1px solid rgba(180,201,198,0.78);
  border-radius: 22px;
  background: linear-gradient(135deg, rgba(255,255,255,0.96), rgba(241,248,248,0.92));
  box-shadow: 0 18px 44px rgba(13,45,74,0.08);
}

.client-dashboard-brand {
  display: flex;
  align-items: center;
  gap: 18px;
  min-width: 0;
}

.client-dashboard-logo {
  width: 76px;
  height: 76px;
  border-radius: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  padding: 10px;
  background: #fff;
  border: 1px solid var(--border);
  box-shadow: 0 12px 30px rgba(13,45,74,0.1);
}

.client-dashboard-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.client-dashboard-logo span {
  width: 100%;
  height: 100%;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 30px;
  font-weight: 800;
  background: linear-gradient(135deg, var(--accent), var(--teal));
}

.client-dashboard-eyebrow {
  margin-bottom: 5px;
  color: var(--accent);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.client-dashboard-hero h1 {
  margin: 0;
  color: var(--navy);
  font-size: clamp(24px, 3vw, 34px);
  line-height: 1.12;
}

.client-dashboard-hero p {
  max-width: 620px;
  margin: 8px 0 0;
  color: var(--text2);
  font-size: 14px;
  line-height: 1.65;
}

.client-dashboard-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
}

.client-kpi-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.client-kpi-card {
  min-height: 128px;
  padding: 17px;
  border: 1px solid rgba(180,201,198,0.72);
  border-radius: 18px;
  background: rgba(255,255,255,0.94);
  box-shadow: 0 12px 30px rgba(13,45,74,0.06);
}

.client-kpi-card span,
.client-kpi-card small {
  display: block;
  color: var(--text3);
  font-size: 12px;
  line-height: 1.45;
}

.client-kpi-card strong {
  display: block;
  margin: 12px 0 6px;
  color: var(--navy);
  font-size: 30px;
  font-weight: 800;
  line-height: 1;
}

.client-dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(300px, 0.75fr);
  gap: 16px;
}

.client-panel {
  min-width: 0;
  padding: 20px;
  border: 1px solid rgba(180,201,198,0.72);
  border-radius: 20px;
  background: rgba(255,255,255,0.96);
  box-shadow: 0 14px 34px rgba(13,45,74,0.06);
}

.client-panel-wide {
  grid-column: span 1;
}

.client-panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 15px;
}

.client-panel-head h2 {
  margin: 0;
  color: var(--navy);
  font-size: 16px;
  line-height: 1.25;
}

.client-panel-head p {
  margin: 4px 0 0;
  color: var(--text3);
  font-size: 12px;
  line-height: 1.55;
}

.client-site-list,
.client-health-list,
.client-service-scope,
.client-action-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.client-site-row,
.client-health-row {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--bg);
  color: inherit;
  font-family: var(--font);
  cursor: pointer;
  transition: transform 0.16s, border-color 0.16s, background 0.16s, box-shadow 0.16s;
}

.client-site-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 13px 14px;
  text-align: left;
}

.client-site-row:hover,
.client-health-row:hover {
  transform: translateY(-1px);
  border-color: rgba(46,134,171,0.42);
  background: #fff;
  box-shadow: 0 10px 24px rgba(13,45,74,0.07);
}

.client-site-row strong {
  display: block;
  color: var(--navy);
  font-size: 13.5px;
}

.client-site-row span {
  display: block;
  margin-top: 4px;
  color: var(--text3);
  font-size: 12px;
}

.client-site-metrics {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.client-site-metrics span,
.client-site-metrics em {
  margin: 0;
  padding: 5px 8px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid var(--border);
  font-size: 11px;
  font-style: normal;
  white-space: nowrap;
}

.client-site-metrics em.good {
  color: #0f7a52;
  background: #e8f7ef;
  border-color: #bfe8d2;
}

.client-site-metrics em.warn {
  color: #9a5c00;
  background: #fff7df;
  border-color: #ffe2a6;
}

.client-health-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 13px 14px;
}

.client-health-row span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text2);
  font-size: 13px;
  font-weight: 600;
}

.client-health-row strong {
  color: var(--navy);
  font-size: 18px;
}

.client-health-row i {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  display: inline-block;
}

.client-health-row i.good { background: #20a46b; }
.client-health-row i.warn { background: #e5a100; }
.client-health-row i.danger { background: #d94b4b; }

.client-contract-health {
  width: 100%;
  min-height: 172px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 12px;
  padding: 15px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--bg);
  color: inherit;
  font-family: var(--font);
  text-align: left;
  cursor: pointer;
  transition: transform 0.16s, border-color 0.16s, background 0.16s, box-shadow 0.16s;
}

.client-contract-health:hover {
  transform: translateY(-1px);
  border-color: rgba(46,134,171,0.42);
  background: #fff;
  box-shadow: 0 12px 28px rgba(13,45,74,0.08);
}

.client-contract-health.good {
  background: linear-gradient(135deg, #eefaf4, #fff);
  border-color: rgba(32,164,107,0.22);
}

.client-contract-health.warn {
  background: linear-gradient(135deg, #fff8e5, #fff);
  border-color: rgba(229,161,0,0.24);
}

.client-contract-health.danger {
  background: linear-gradient(135deg, #fff0f0, #fff);
  border-color: rgba(217,75,75,0.24);
}

.client-contract-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.client-contract-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 9px;
  border-radius: 999px;
  background: #fff;
  color: var(--text2);
  border: 1px solid var(--border);
  font-size: 11.5px;
  font-weight: 800;
}

.client-contract-pill i {
  width: 9px;
  height: 9px;
  display: inline-block;
  border-radius: 999px;
}

.client-contract-pill i.good { background: #20a46b; }
.client-contract-pill i.warn { background: #e5a100; }
.client-contract-pill i.danger { background: #d94b4b; }

.client-contract-ref {
  min-width: 0;
  overflow: hidden;
  color: var(--text3);
  font-size: 12px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.client-countdown-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 7px;
  align-items: stretch;
}

.client-countdown-unit {
  min-width: 0;
  overflow: hidden;
  padding: 10px 5px;
  border: 1px solid rgba(180,201,198,0.68);
  border-radius: 13px;
  background: rgba(255,255,255,0.78);
  text-align: center;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.86);
}

.client-countdown-unit strong {
  display: block;
  max-width: 100%;
  overflow: hidden;
  color: var(--navy);
  font-size: clamp(20px, 2.4vw, 29px);
  font-weight: 850;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.055em;
  text-overflow: clip;
  white-space: nowrap;
}

.client-countdown-unit.days strong {
  font-size: clamp(18px, 2.15vw, 27px);
}

.client-countdown-unit span {
  display: block;
  margin-top: 6px;
  color: var(--text3);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

@media (max-width: 760px) {
  .client-countdown-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .client-countdown-unit.days {
    grid-column: auto;
  }

  .client-countdown-unit strong,
  .client-countdown-unit.days strong {
    font-size: 26px;
  }
}

/* Client portal navigation: Eye-style module directory with RASED branding */
.client-eye-shell {
  --sidebar: 286px;
  background: #f3f7f9;
}

.client-eye-shell .sidebar {
  background:
    radial-gradient(circle at 18% 4%, rgba(48, 154, 188, 0.2), transparent 27%),
    var(--sidebar-bg);
  border-right: 1px solid rgba(151, 206, 224, 0.12);
  box-shadow: 8px 0 30px rgba(6, 31, 48, 0.16);
}

.client-eye-shell .sidebar-logo {
  min-height: 82px;
  padding: 17px 18px 15px;
  align-items: center;
}

.client-eye-shell .sidebar-logo .logo-icon {
  width: 42px;
  height: 42px;
  border: 1px solid rgba(255,255,255,0.16);
  box-shadow: 0 8px 18px rgba(0, 123, 163, 0.28);
}

.client-eye-shell .sidebar-brand-copy {
  display: flex;
  flex: 1 1 auto;
  min-width: 0;
  min-height: 42px;
  flex-direction: column;
  justify-content: center;
}

.client-eye-shell .sidebar-logo .sidebar-brand-name {
  display: -webkit-box;
  max-width: 100%;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  font-size: 17px;
  line-height: 1.2;
  letter-spacing: 2px;
  text-overflow: ellipsis;
  white-space: normal;
  word-break: break-word;
}

.client-eye-shell .sidebar-logo .sidebar-brand-subtitle {
  margin-top: 3px;
  line-height: 1.2;
}

.eye-sidebar-search {
  position: relative;
  margin: 12px 14px 5px;
}

.eye-sidebar-search svg {
  position: absolute;
  top: 50%;
  left: 12px;
  width: 15px;
  height: 15px;
  color: rgba(221, 241, 247, 0.58);
  transform: translateY(-50%);
  pointer-events: none;
}

.eye-sidebar-search input {
  width: 100%;
  height: 38px;
  padding: 0 40px 0 36px;
  border: 1px solid rgba(174, 222, 236, 0.14);
  border-radius: 11px;
  outline: none;
  background: rgba(255,255,255,0.07);
  color: #f5fbfd;
  font: 500 12px/1 var(--font);
  transition: border-color .18s ease, background .18s ease, box-shadow .18s ease;
}

.eye-sidebar-search input::placeholder { color: rgba(221, 241, 247, 0.44); }

.eye-sidebar-search input:focus {
  border-color: rgba(92, 196, 225, 0.5);
  background: rgba(255,255,255,0.1);
  box-shadow: 0 0 0 3px rgba(44, 157, 190, 0.12);
}

.eye-sidebar-search kbd {
  position: absolute;
  top: 50%;
  right: 10px;
  min-width: 20px;
  padding: 3px 5px;
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: 6px;
  background: rgba(255,255,255,0.07);
  color: rgba(234, 248, 252, 0.5);
  font: 700 9px/1 var(--font);
  text-align: center;
  transform: translateY(-50%);
}

.client-eye-shell .sidebar-nav {
  padding: 6px 10px 16px;
  scrollbar-width: thin;
  scrollbar-color: rgba(135, 198, 217, 0.28) transparent;
}

.client-eye-shell .sidebar-nav::-webkit-scrollbar { display: block; width: 5px; }
.client-eye-shell .sidebar-nav::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(135, 198, 217, 0.25);
}

.eye-nav-group {
  padding: 4px 0;
  border-bottom: 1px solid rgba(164, 213, 228, 0.08);
}

.eye-nav-group[hidden],
.eye-nav-group a[hidden],
.eye-nav-group .nav-item-disabled[hidden] { display: none !important; }

.eye-nav-group-toggle {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto 14px;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 8px 10px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: rgba(174, 221, 234, 0.65);
  font: 800 9.5px/1.2 var(--font);
  letter-spacing: 1.1px;
  text-align: left;
  text-transform: uppercase;
  cursor: pointer;
}

.eye-nav-group-toggle:hover {
  background: rgba(119, 199, 222, 0.06);
  color: #dff4fa;
}

.eye-nav-group-toggle svg {
  width: 13px;
  height: 13px;
  opacity: .68;
  transition: transform .2s ease;
}

.eye-nav-count {
  min-width: 21px;
  padding: 3px 6px;
  border-radius: 999px;
  background: rgba(160, 216, 232, 0.09);
  color: rgba(218, 242, 248, 0.58);
  font-size: 9px;
  letter-spacing: 0;
  text-align: center;
}

.eye-nav-group-items {
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height .28s ease, opacity .18s ease, padding .2s ease;
}

.eye-nav-group.open .eye-nav-group-items,
.eye-nav-group.search-open .eye-nav-group-items {
  max-height: 1800px;
  padding: 2px 0 5px;
  opacity: 1;
}

.eye-nav-group.open .eye-nav-group-toggle svg,
.eye-nav-group.search-open .eye-nav-group-toggle svg { transform: rotate(180deg); }

.client-eye-shell .sidebar-nav a,
.client-eye-shell .sidebar-nav .nav-item-disabled {
  min-height: 36px;
  margin: 1px 2px;
  padding: 8px 10px;
  border-radius: 9px;
  font-size: 12.5px;
}

.client-eye-shell .sidebar-nav a { color: rgba(238, 249, 252, 0.68); }
.client-eye-shell .sidebar-nav a svg,
.client-eye-shell .sidebar-nav .nav-item-disabled svg {
  width: 16px;
  height: 16px;
}

.client-eye-shell .sidebar-nav .nav-item-disabled {
  color: rgba(224, 242, 247, 0.39);
}

.client-eye-shell .sidebar-nav .nav-item-disabled small {
  padding: 2px 6px;
  border-color: rgba(191, 226, 236, 0.12);
  color: rgba(214, 238, 245, 0.38);
  font-size: 8px;
}

.client-eye-shell .sidebar-nav a:hover {
  background: rgba(120, 205, 230, 0.09);
  color: #fff;
}

.client-eye-shell .sidebar-nav a.active {
  background: linear-gradient(105deg, #eefbff, #dff4fa);
  color: #0b3851;
  box-shadow: 0 6px 16px rgba(3, 26, 40, 0.22);
}

.client-eye-shell .sidebar-nav a.active::before {
  left: -2px;
  top: 24%;
  bottom: 24%;
  width: 3px;
  background: #25a6c7;
}

.client-eye-shell .sidebar-nav a.active svg { color: #137b9e; }

.client-eye-shell .topbar {
  background: rgba(255,255,255,0.94);
  border-bottom: 1px solid rgba(16, 71, 96, 0.08);
  box-shadow: 0 7px 24px rgba(26, 67, 83, 0.06);
  backdrop-filter: blur(15px);
}

@media (max-width: 1024px) {
  .client-eye-shell { --sidebar: 0px; }

  .client-eye-shell .sidebar {
    min-height: 68px;
    border-right: 0;
  }

  .client-eye-shell .sidebar-logo { min-height: 68px; }
  .client-eye-shell .eye-sidebar-search { display: none; }

  .client-eye-shell .sidebar-nav {
    display: flex;
    gap: 5px;
    padding: 9px;
  }

  .client-eye-shell .eye-nav-group { display: contents; }
  .client-eye-shell .eye-nav-group-toggle { display: none; }
  .client-eye-shell .eye-nav-group-items {
    display: flex;
    gap: 5px;
    max-height: none;
    padding: 0;
    overflow: visible;
    opacity: 1;
  }

  .client-eye-shell .nav-item-disabled { display: none !important; }

  .client-eye-shell .sidebar-nav a.active::before {
    left: 18%;
    right: 18%;
    top: auto;
    bottom: -7px;
    width: auto;
    height: 3px;
  }
}

@media (max-width: 760px) {
  .client-eye-shell .sidebar-logo {
    min-width: 68px;
    width: 68px;
    min-height: 62px;
  }

  .client-eye-shell .sidebar-nav a {
    min-height: 38px;
    padding: 8px 10px;
    font-size: 11.5px;
  }
}

@media (max-width: 430px) {
  .client-countdown-grid {
    grid-template-columns: 1fr;
  }

  .client-countdown-unit.days {
    grid-column: auto;
  }
}

.client-contract-meta {
  padding: 11px 12px;
  border-top: 1px solid rgba(180,201,198,0.58);
  border-radius: 13px;
  background: rgba(255,255,255,0.68);
}

.client-contract-meta strong,
.client-contract-meta span {
  display: block;
}

.client-contract-meta strong {
  color: var(--navy);
  font-size: 13.5px;
}

.client-contract-meta span {
  margin-bottom: 4px;
  color: var(--text3);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.client-contract-meta small {
  min-width: 0;
  overflow: hidden;
  color: var(--text2);
  font-size: 11.5px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.client-contract-meta-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 5px;
}

.client-renewal-link {
  width: 44px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  border: 1px solid rgba(46,134,171,0.28);
  border-radius: 10px;
  background: rgba(255,255,255,0.72);
  color: var(--accent);
  font-size: 10.5px;
  font-weight: 800;
  text-decoration: none;
  transition: background 0.16s, border-color 0.16s, transform 0.16s;
}

.client-renewal-link:hover {
  transform: translateY(-1px);
  background: #fff;
  border-color: rgba(46,134,171,0.48);
}

.client-renewal-link.is-locked {
  color: var(--text3);
  border-color: rgba(139,154,148,0.24);
  background: rgba(255,255,255,0.46);
}

.sv-kpi-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 22px;
  margin: 28px 0 24px;
}

.sv-kpi {
  min-height: 78px;
  padding: 16px 20px;
  border: 1px solid #dfe9ef;
  border-radius: 22px;
  background: rgba(255,255,255,0.95);
  box-shadow: 0 12px 32px rgba(21,66,96,0.08);
}

.sv-kpi span,
.sv-kpi strong {
  display: block;
}

.sv-kpi span {
  color: #8b8fa0;
  font-size: 14px;
  font-weight: 500;
}

.sv-kpi strong {
  margin-top: 5px;
  color: #111827;
  font-size: 22px;
  line-height: 1;
}

.sv-dashboard {
  padding: 0;
  background: #fff;
  overflow: hidden;
}

.sv-dashboard .sv-hero,
.sv-dashboard .sv-kpi-row,
.sv-dashboard .sv-legend {
  display: none;
}

.sv-visual-tabs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 42px;
  padding: 18px 66px 22px;
  background: #fff;
}

.sv-visual-tabs button {
  min-height: 44px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #5e5e64;
  font-family: var(--font);
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
}

.sv-visual-tabs button.active {
  color: #fff;
  font-weight: 800;
  background: linear-gradient(180deg, #9ecfdf, #b6ddea);
  box-shadow: 0 14px 34px rgba(126,176,192,0.28);
}

.sv-hero {
  min-height: 108px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 28px 40px;
  background: #fff;
}

.sv-brand {
  display: flex;
  align-items: center;
  gap: 16px;
  color: #111827;
  font-size: 22px;
  font-weight: 800;
}

.sv-brand img {
  width: 58px;
  height: 58px;
  object-fit: contain;
}

.sv-hero-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

.sv-sos {
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 5px;
  background: #ef1f2d;
  color: #fff;
  font-weight: 900;
}

.sv-icon,
.sv-wifi {
  color: #111827;
  font-size: 22px;
  line-height: 1;
}

.sv-wifi {
  color: #09b844;
  font-size: 27px;
}

.sv-hero-search {
  width: 250px;
  border: 0;
  background: #f1f1f1;
  border-radius: 18px;
  box-shadow: none;
}

.sv-hero-search input,
.sv-panel-search input {
  min-height: 40px;
  font-size: 14px;
}

.sv-map-panel {
  margin: 0;
  padding: 10px 60px 0;
  border: 0;
  border-radius: 0;
  background: #fff;
  box-shadow: none;
}

.sv-filter-row {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.sv-filter-row label {
  min-width: auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #111827;
  font-size: 14px;
  font-weight: 700;
}

.sv-filter-row label span {
  display: none;
}

.sv-filter-row::before {
  content: "+";
  width: 24px;
  height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-right: 4px;
  border: 2px solid #000;
  border-radius: 50%;
  color: #000;
  font-size: 14px;
  font-weight: 800;
}

.sv-filter-row select,
.sv-filter-row input {
  width: 180px;
  min-height: 42px;
  padding: 0 12px;
  border: 1px solid #cfcfd2;
  border-radius: 4px;
  background: #fff;
  color: #111827;
  font-size: 13px;
  font-weight: 500;
  outline: 0;
}

.sv-filter-row input[readonly] {
  width: 126px;
}

.sv-panel-search {
  width: 50px;
  height: 50px;
  margin-left: auto;
  border: 0;
  background: #bdbdc1;
  border-radius: 50%;
  box-shadow: none;
}

.sv-panel-search input {
  display: none;
}

.sv-panel-search svg {
  left: 50%;
  width: 25px;
  height: 25px;
  color: #fff;
  transform: translate(-50%, -50%);
}

.sv-legend {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
  margin-bottom: 26px;
  color: #7f8190;
  font-size: 14px;
}

.sv-legend span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.sv-legend i {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: inline-block;
}

.sv-legend i.all { background: #bdd7e8; }
.sv-legend i.normal { background: #2ac772; }
.sv-legend i.abnormal { background: #ff9c38; }
.sv-legend i.danger { background: #ef4f57; }

.sv-map {
  width: 100%;
  min-height: 560px;
  overflow: auto;
  border-radius: 0;
  background: #fff;
  border: 0;
}

.sv-map a {
  display: block;
  min-width: 100%;
}

.sv-map img {
  width: 100%;
  min-height: 560px;
  object-fit: contain;
  display: block;
  background: #fff;
}

.sv-map-empty {
  min-height: 560px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--text3);
  text-align: center;
}

.sv-map-empty strong {
  color: var(--navy);
  font-size: 20px;
}

.sv-tab-placeholder {
  min-height: 560px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 12px;
  color: #777;
  text-align: center;
}

.sv-placeholder-art {
  width: 360px;
  max-width: 82%;
  height: 250px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 48% 52% 44% 56%;
  background: #222;
  color: #f7f7f7;
  font-size: 56px;
  font-weight: 900;
  letter-spacing: 0.06em;
}

.sv-tab-placeholder strong {
  color: #222;
  font-size: 22px;
}

@media (max-width: 760px) {
  .sv-kpi-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin: 18px 0;
  }

  .sv-hero {
    align-items: flex-start;
    flex-direction: column;
    padding: 24px 18px;
  }

  .sv-hero-actions,
  .sv-filter-row,
  .sv-legend {
    align-items: flex-start;
  }

  .sv-map-panel {
    margin: 0 10px 18px;
    padding: 18px;
  }

  .sv-panel-search,
  .sv-hero-search {
    width: 100%;
  }
}

@media (max-width: 520px) {
  .sv-kpi-row {
    grid-template-columns: 1fr;
  }
}

.client-service-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--bg);
}

.client-service-row > div {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
}

.client-service-row strong {
  min-width: 0;
  overflow: hidden;
  color: var(--navy);
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.client-service-row span {
  color: var(--text3);
  font-size: 12px;
  white-space: nowrap;
}

.client-action-row {
  display: flex;
  gap: 12px;
  padding: 14px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: var(--bg);
}

.client-action-row > span {
  width: 10px;
  height: 10px;
  margin-top: 4px;
  border-radius: 999px;
  flex: 0 0 auto;
}

.client-action-row.warn > span { background: #e5a100; }
.client-action-row.danger > span { background: #d94b4b; }

.client-action-row strong {
  display: block;
  color: var(--navy);
  font-size: 13px;
}

.client-action-row p {
  margin: 4px 0 0;
  color: var(--text3);
  font-size: 12px;
  line-height: 1.55;
}

.client-empty-card {
  padding: 18px;
  border: 1px dashed rgba(46,134,171,0.28);
  border-radius: 15px;
  background: rgba(241,247,247,0.72);
  text-align: center;
}

.client-empty-card strong {
  display: block;
  color: var(--navy);
  font-size: 13px;
}

.client-empty-card p {
  margin: 5px 0 0;
  color: var(--text3);
  font-size: 12px;
  line-height: 1.55;
}

.client-empty-card.success {
  border-color: rgba(32,164,107,0.28);
  background: #ecf9f2;
}

@media (max-width: 1260px) {
  .client-kpi-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 980px) {
  .client-dashboard-hero {
    align-items: flex-start;
    flex-direction: column;
  }

  .client-dashboard-actions {
    width: 100%;
  }

  .client-dashboard-actions .btn {
    flex: 1 1 160px;
  }

  .client-dashboard-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .client-dashboard-hero {
    padding: 18px;
    border-radius: 18px;
  }

  .client-dashboard-brand {
    align-items: flex-start;
  }

  .client-dashboard-logo {
    width: 58px;
    height: 58px;
    border-radius: 18px;
  }

  .client-kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .client-kpi-card {
    min-height: 112px;
    padding: 14px;
  }

  .client-kpi-card strong {
    font-size: 25px;
  }

  .client-site-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .client-site-metrics {
    justify-content: flex-start;
  }

  .client-panel {
    padding: 16px;
    border-radius: 17px;
  }
}

@media (max-width: 520px) {
  .client-dashboard-brand {
    flex-direction: column;
    gap: 12px;
  }

  .client-dashboard-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .client-dashboard-actions .btn {
    width: 100%;
    min-height: 42px;
    flex: 0 0 auto;
  }

  .client-kpi-grid {
    grid-template-columns: 1fr;
  }

  .client-panel-head {
    align-items: stretch;
    flex-direction: column;
  }
}

.inspection-center-page {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.ic-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 24px;
  border: 1px solid rgba(46,134,171,0.22);
  border-radius: 24px;
  background:
    radial-gradient(circle at top right, rgba(46,134,171,0.13), transparent 38%),
    linear-gradient(135deg, rgba(255,255,255,0.96), rgba(241,247,247,0.88));
  box-shadow: 0 18px 45px rgba(13,45,74,0.08);
}

.ic-hero h1 {
  margin: 4px 0 6px;
  color: var(--navy);
  font-size: clamp(24px, 3vw, 34px);
  line-height: 1.05;
}

.ic-hero p {
  max-width: 720px;
  margin: 0;
  color: var(--text2);
  font-size: 14px;
  line-height: 1.7;
}

.ic-hero-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.ic-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.ic-kpi {
  min-height: 128px;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: var(--white);
  box-shadow: 0 12px 30px rgba(13,45,74,0.07);
}

.ic-kpi span,
.ic-kpi small {
  display: block;
  color: var(--text3);
  font-size: 12px;
}

.ic-kpi strong {
  display: block;
  margin: 10px 0 8px;
  color: var(--navy);
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1;
}

.ic-flow {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
}

.ic-flow-step {
  position: relative;
  min-height: 104px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: rgba(255,255,255,0.72);
}

.ic-flow-step span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  margin-bottom: 12px;
  border-radius: 10px;
  background: rgba(46,134,171,0.1);
  color: var(--accent);
  font-size: 12px;
  font-weight: 800;
}

.ic-flow-step.done span {
  background: rgba(32,164,107,0.13);
  color: var(--success);
}

.ic-flow-step strong,
.ic-flow-step small {
  display: block;
}

.ic-flow-step strong {
  color: var(--navy);
  font-size: 13px;
}

.ic-flow-step small {
  margin-top: 5px;
  color: var(--text3);
  font-size: 11px;
  line-height: 1.45;
}

.ic-tabs {
  display: flex;
  gap: 8px;
  padding: 6px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: rgba(255,255,255,0.78);
}

.ic-tabs button {
  flex: 1 1 0;
  min-height: 42px;
  border: 0;
  border-radius: 13px;
  background: transparent;
  color: var(--text2);
  font-family: var(--font);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.ic-tabs button.active {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 10px 24px rgba(46,134,171,0.24);
}

.ic-panel {
  min-height: 280px;
}

.ic-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(280px, 0.85fr);
  gap: 16px;
}

.ic-card {
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: 22px;
  background: var(--white);
  box-shadow: 0 14px 34px rgba(13,45,74,0.07);
}

.ic-card-wide {
  min-width: 0;
}

.ic-structure-map {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}

.ic-structure-map div {
  padding: 16px;
  border: 1px solid rgba(46,134,171,0.18);
  border-radius: 16px;
  background: rgba(241,247,247,0.74);
  text-align: center;
}

.ic-structure-map strong,
.ic-structure-map span {
  display: block;
}

.ic-structure-map strong {
  color: var(--text3);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .08em;
}

.ic-structure-map span {
  margin-top: 8px;
  color: var(--navy);
  font-size: 15px;
  font-weight: 800;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ic-readiness,
.ic-service-list,
.ic-module-list,
.ic-site-list {
  display: grid;
  gap: 10px;
}

.ic-service-list .service-dot {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  background: var(--accent);
  box-shadow: 0 0 0 4px rgba(46,134,171,0.12);
  flex: 0 0 auto;
}

.ic-readiness-row {
  display: flex;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 15px;
  background: var(--bg);
}

.ic-readiness-row > span {
  width: 9px;
  height: 9px;
  margin-top: 4px;
  border-radius: 999px;
  flex: 0 0 auto;
}

.ic-readiness-row.good > span { background: var(--success); }
.ic-readiness-row.warn > span { background: #e5a100; }
.ic-readiness-row.danger > span { background: var(--danger); }

.ic-readiness-row strong {
  display: block;
  color: var(--navy);
  font-size: 13px;
}

.ic-readiness-row p {
  margin: 4px 0 0;
  color: var(--text3);
  font-size: 12px;
  line-height: 1.5;
}

.ic-site-card {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--bg);
}

.ic-site-art {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 58px;
  height: 58px;
  overflow: hidden;
  border-radius: 16px;
  background: rgba(46,134,171,0.12);
  color: var(--accent);
  font-weight: 900;
}

.ic-site-art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ic-site-card strong {
  display: block;
  color: var(--navy);
  font-size: 14px;
}

.ic-site-card p {
  margin: 5px 0 0;
  color: var(--text3);
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ic-site-metrics {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.ic-site-metrics span {
  padding: 8px 10px;
  border-radius: 12px;
  background: var(--white);
  color: var(--text3);
  font-size: 11px;
  white-space: nowrap;
}

.ic-site-metrics b {
  color: var(--navy);
  font-size: 13px;
}

.ic-module-list div {
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--bg);
}

.ic-module-list strong,
.ic-module-list span {
  display: block;
}

.ic-module-list strong {
  color: var(--navy);
  font-size: 14px;
}

.ic-module-list span {
  margin-top: 5px;
  color: var(--text3);
  font-size: 12px;
  line-height: 1.5;
}

.ic-plan-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 12px;
}

.ic-plan-card {
  padding: 18px;
  border: 1px solid rgba(46,134,171,0.2);
  border-radius: 18px;
  background: linear-gradient(145deg, rgba(241,247,247,0.92), #fff);
}

.ic-plan-card span {
  color: var(--accent);
  font-weight: 900;
  letter-spacing: .08em;
}

.ic-plan-card strong {
  display: block;
  margin-top: 12px;
  color: var(--navy);
  font-size: 16px;
}

.ic-plan-card p {
  min-height: 42px;
  margin: 8px 0 12px;
  color: var(--text2);
  font-size: 12px;
  line-height: 1.55;
}

.ic-plan-card small {
  display: inline-flex;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(32,164,107,0.1);
  color: var(--success);
  font-size: 11px;
  font-weight: 700;
}

@media (max-width: 1180px) {
  .ic-kpi-grid,
  .ic-flow {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .ic-grid {
    grid-template-columns: 1fr;
  }

  .ic-structure-map {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .ic-hero {
    align-items: flex-start;
    flex-direction: column;
    padding: 18px;
  }

  .ic-hero-actions,
  .ic-hero-actions .btn {
    width: 100%;
  }

  .ic-tabs {
    overflow-x: auto;
  }

  .ic-tabs button {
    min-width: 140px;
  }

  .ic-structure-map,
  .ic-kpi-grid,
  .ic-flow {
    grid-template-columns: 1fr;
  }

  .ic-site-card {
    grid-template-columns: 52px minmax(0, 1fr);
  }

  .ic-site-metrics {
    grid-column: 1 / -1;
    justify-content: flex-start;
  }
}
