@font-face {
  font-family: Estedad;
  src: url("/fonts/Estedad-Regular.ttf") format("truetype");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: Estedad;
  src: url("/fonts/Estedad-SemiBold.ttf") format("truetype");
  font-weight: 600;
  font-display: swap;
}
@font-face {
  font-family: Estedad;
  src: url("/fonts/Estedad-ExtraBold.ttf") format("truetype");
  font-weight: 800;
  font-display: swap;
}

:root {
  color-scheme: light;
  --navy: #123c69;
  --navy-deep: #0b2b4d;
  --teal: #087e8b;
  --cyan: #16a6b6;
  --bg: #f3f6fa;
  --card: #ffffff;
  --text: #17324d;
  --muted: #75879a;
  --line: #e2e8f0;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  font-family: Estedad, Tahoma, sans-serif;
  background: var(--bg);
  color: var(--text);
}
button, input, select, textarea { font: inherit; }
.hidden { display: none !important; }

.login-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(370px, 520px) 1fr;
  background: #eef3f9;
}
.login-panel {
  background: white;
  padding: clamp(28px, 5vw, 72px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 30px;
  box-shadow: -20px 0 50px rgba(18, 60, 105, .08);
  z-index: 1;
}
.brand { display: flex; align-items: center; gap: 13px; }
.brand img { width: 56px; height: 56px; object-fit: contain; border-radius: 16px; }
.brand div { display: grid; gap: 2px; }
.brand strong { font-size: 18px; }
.brand span { font-size: 11px; color: var(--muted); }
.eyebrow { color: var(--teal); font-size: 12px; font-weight: 600; }
.login-copy h1 { font-size: 34px; margin: 8px 0; }
.login-copy p { margin: 0; color: var(--muted); line-height: 2; }
form { display: grid; gap: 17px; }
label { display: grid; gap: 8px; font-size: 13px; font-weight: 600; }
input, select, textarea {
  border: 1px solid var(--line);
  border-radius: 13px;
  padding: 13px 14px;
  outline: none;
  background: #f9fbfd;
}
textarea { min-height: 105px; resize: vertical; direction: rtl; line-height: 1.9; }
input {
  direction: ltr;
}
input[dir="rtl"], input[type="search"] { direction: rtl; }
input:focus, select:focus { border-color: var(--cyan); box-shadow: 0 0 0 3px rgba(22,166,182,.12); }
form button {
  border: 0;
  border-radius: 13px;
  padding: 13px;
  background: linear-gradient(135deg, var(--navy), var(--teal));
  color: white;
  font-weight: 600;
  cursor: pointer;
}
.error { color: #c53030; min-height: 20px; margin: -5px 0; font-size: 12px; }
.server-note { font-size: 11px; color: var(--muted); display: flex; gap: 8px; align-items: center; }
.server-note i { width: 8px; height: 8px; background: #2fbd83; border-radius: 50%; box-shadow: 0 0 0 4px #e1f8ef; }
.login-visual {
  position: relative;
  display: grid;
  place-items: end start;
  padding: 8vw;
  overflow: hidden;
  background:
    radial-gradient(circle at 25% 25%, rgba(38,197,210,.28), transparent 30%),
    linear-gradient(145deg, #123c69 10%, #0c5d70 60%, #087e8b);
}
.login-visual::before, .login-visual::after {
  content: "";
  position: absolute;
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 50%;
  width: 500px; height: 500px;
  top: -120px; left: -120px;
}
.login-visual::after { width: 320px; height: 320px; top: 60px; left: 60px; }
.visual-card { position: relative; color: white; max-width: 600px; }
.visual-card span { opacity: .7; font-size: 13px; }
.visual-card h2 { font-size: clamp(32px, 5vw, 58px); margin: 12px 0; line-height: 1.45; }
.visual-card p { opacity: .75; line-height: 2; }

.app-shell { min-height: 100vh; display: grid; grid-template-columns: 260px 1fr; }
.sidebar {
  position: sticky; top: 0; height: 100vh;
  background: linear-gradient(180deg, #0f416b, var(--navy-deep));
  color: white; padding: 24px 16px;
  display: flex; flex-direction: column;
}
.sidebar-brand { padding: 0 8px 24px; border-bottom: 1px solid rgba(255,255,255,.1); }
.sidebar-brand img { background: white; padding: 5px; }
.sidebar-brand span { color: rgba(255,255,255,.56); }
nav { display: grid; gap: 5px; margin-top: 24px; }
.nav-item, .logout {
  border: 0; color: rgba(255,255,255,.72); background: transparent;
  text-align: right; padding: 13px 14px; border-radius: 12px; cursor: pointer;
}
.nav-item:hover, .nav-item.active { background: rgba(15,170,187,.2); color: white; }
.logout { margin-top: auto; border: 1px solid rgba(255,255,255,.12); text-align: center; }
.workspace { padding: 26px clamp(20px, 4vw, 56px) 60px; min-width: 0; }
header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 24px; }
header h1 { margin: 3px 0 0; font-size: 25px; }
.user-chip { display: flex; align-items: center; gap: 10px; background: white; border: 1px solid var(--line); padding: 8px 10px; border-radius: 14px; }
.user-chip > span { display: grid; place-items: center; width: 38px; height: 38px; background: #e1f4f5; color: var(--teal); border-radius: 12px; font-weight: 800; }
.user-chip div { display: grid; }
.user-chip small { color: var(--muted); }
.welcome {
  min-height: 225px; border-radius: 26px; padding: clamp(28px, 5vw, 58px);
  display: flex; align-items: center; justify-content: space-between;
  background:
    radial-gradient(circle at 15% 45%, rgba(22,166,182,.28), transparent 25%),
    linear-gradient(125deg, var(--navy), #0d6a77);
  color: white; box-shadow: 0 22px 50px rgba(18,60,105,.16);
}
.welcome h2 { font-size: clamp(27px, 4vw, 42px); margin: 10px 0; }
.welcome p { margin: 0; opacity: .72; }
.readiness { width: 145px; height: 145px; border: 10px solid rgba(255,255,255,.22); border-top-color: #5ee3db; border-radius: 50%; display: grid; place-content: center; text-align: center; transform: rotate(-15deg); }
.readiness > * { transform: rotate(15deg); }
.readiness strong { font-size: 30px; }
.readiness span { font-size: 10px; opacity: .72; }
.metrics { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin: 18px 0; }
.metrics article { background: white; border: 1px solid var(--line); border-radius: 18px; padding: 21px; display: grid; gap: 5px; box-shadow: 0 8px 24px rgba(18,60,105,.05); }
.metrics span { color: var(--muted); font-size: 12px; }
.metrics strong { font-size: 27px; }
.metrics .healthy strong { color: #159669; font-size: 22px; }
.content-card { background: white; border: 1px solid var(--line); border-radius: 22px; padding: 26px; }
.section-title { display: flex; justify-content: space-between; align-items: start; gap: 20px; }
.section-title h3 { margin: 0; font-size: 20px; }
.section-title p { margin: 7px 0 0; color: var(--muted); font-size: 12px; }
.phase { background: #e6f6f7; color: var(--teal); padding: 7px 12px; border-radius: 999px; font-size: 11px; }
.modules { display: grid; grid-template-columns: repeat(3, 1fr); gap: 13px; margin-top: 22px; }
.modules article { border: 1px solid var(--line); border-radius: 16px; padding: 18px; display: grid; gap: 7px; transition: .2s ease; }
.modules article:hover { border-color: #9bd6db; transform: translateY(-2px); }
.modules b { color: var(--teal); font-size: 22px; }
.modules span { font-size: 11px; color: var(--muted); }
.primary-button, .secondary-button, .icon-button, .table-action {
  border: 0; cursor: pointer; border-radius: 12px; padding: 11px 16px;
}
.primary-button {
  color: white; background: linear-gradient(135deg, var(--navy), var(--teal));
  box-shadow: 0 8px 18px rgba(8,126,139,.16);
}
.secondary-button { color: var(--text); background: #eef3f7; }
.icon-button {
  width: 38px; height: 38px; display: grid; place-items: center;
  padding: 0; font-size: 24px; color: var(--muted); background: #f3f6f9;
}
.users-toolbar { align-items: center; }
.list-tools {
  margin: 24px 0 14px; display: flex; align-items: center;
  justify-content: space-between; gap: 15px;
}
.list-tools input { width: min(420px, 100%); }
.list-tools span { color: var(--muted); font-size: 12px; white-space: nowrap; }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 16px; }
table { width: 100%; border-collapse: collapse; min-width: 780px; }
th, td { padding: 15px 16px; text-align: right; border-bottom: 1px solid var(--line); }
th { color: var(--muted); background: #f8fafc; font-size: 11px; font-weight: 600; }
td { font-size: 12px; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: #fbfdff; }
.ltr { direction: ltr; text-align: right; }
.person-cell { display: flex; align-items: center; gap: 10px; }
.person-cell > span {
  display: grid; place-items: center; width: 36px; height: 36px;
  flex: 0 0 auto; border-radius: 11px; color: var(--teal);
  background: #e6f6f7; font-weight: 800;
}
.status { display: inline-flex; border-radius: 999px; padding: 5px 10px; font-size: 10px; }
.status.active { color: #08724f; background: #e2f7ef; }
.status.inactive { color: #a13a3a; background: #fdeaea; }
.table-action { color: var(--navy); background: #edf3f8; padding: 7px 12px; }
.empty-state, .empty-page { text-align: center; color: var(--muted); padding: 50px 20px; }
.empty-page b { display: inline-block; color: var(--teal); background: #e6f6f7; border-radius: 999px; padding: 7px 12px; }
.empty-page h2 { color: var(--text); margin: 14px 0 6px; }
.modal {
  position: fixed; inset: 0; z-index: 20; padding: 20px;
  display: grid; place-items: center; background: rgba(8,31,53,.55);
  backdrop-filter: blur(4px);
}
.modal-card {
  width: min(650px, 100%); max-height: calc(100vh - 40px); overflow-y: auto;
  padding: 26px; border-radius: 22px; background: white;
  box-shadow: 0 28px 80px rgba(0,0,0,.22);
}
.modal-head { display: flex; justify-content: space-between; align-items: start; margin-bottom: 24px; }
.modal-head h2 { margin: 5px 0 0; font-size: 22px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 17px; }
.wide-field { grid-column: 1 / -1; }
.wide-modal { width: min(820px, 100%); }
label small { color: var(--muted); font-weight: 400; font-size: 10px; }
.switch-row {
  display: flex; align-items: center; align-self: end; min-height: 48px;
  border: 1px solid var(--line); border-radius: 13px; padding: 12px 14px;
}
.switch-row input { width: 18px; height: 18px; margin: 0 0 0 9px; accent-color: var(--teal); }
.check-field {
  display: flex; align-items: center; min-height: 48px; padding: 11px 13px;
  border: 1px solid var(--line); border-radius: 13px; background: #f9fbfd;
}
.check-field input { width: 18px; height: 18px; margin: 0 0 0 9px; accent-color: var(--teal); }
.form-actions { display: flex; justify-content: end; gap: 10px; margin-top: 4px; }
.toolbar-actions { display: flex; gap: 8px; align-items: center; }
.module-tabs {
  display: flex; gap: 8px; flex-wrap: wrap; margin-top: 22px;
  padding-bottom: 14px; border-bottom: 1px solid var(--line);
}
.module-tab {
  border: 1px solid var(--line); border-radius: 999px; padding: 8px 14px;
  color: var(--muted); background: white; cursor: pointer;
}
.module-tab.active { color: white; border-color: var(--teal); background: var(--teal); }
.data-grid {
  display: grid; grid-template-columns: repeat(3, minmax(0,1fr));
  gap: 13px;
}
.data-card {
  min-width: 0; padding: 17px; border: 1px solid var(--line);
  border-radius: 17px; background: #fff; transition: .18s ease;
}
.data-card:hover { border-color: #9bd6db; box-shadow: 0 10px 28px rgba(18,60,105,.08); transform: translateY(-2px); }
.data-card-head { display: flex; align-items: center; gap: 11px; min-width: 0; }
.data-card-head > b {
  display: grid; place-items: center; width: 42px; height: 42px; flex: 0 0 auto;
  border-radius: 13px; color: var(--teal); background: #e6f6f7; font-size: 19px;
}
.data-card-head > div { min-width: 0; }
.data-card h4 { margin: 0; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.data-card p { margin: 4px 0 0; color: var(--muted); font-size: 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.data-card-meta { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; margin-top: 15px; }
.data-card-meta span { display: grid; gap: 2px; padding: 8px 9px; border-radius: 10px; background: #f7fafc; min-width: 0; }
.data-card-meta small { color: var(--muted); font-size: 9px; }
.data-card-meta strong { font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

@media (max-width: 980px) {
  .login-shell { grid-template-columns: 1fr; }
  .login-visual { display: none; }
  .login-panel { min-height: 100vh; }
  .app-shell { grid-template-columns: 82px 1fr; }
  .sidebar { padding-inline: 10px; }
  .sidebar .brand div, .nav-item span, .logout { font-size: 0; }
  .sidebar-brand { justify-content: center; padding-inline: 0; }
  .sidebar-brand img { width: 48px; height: 48px; }
  .nav-item { text-align: center; font-size: 20px; }
  .metrics { grid-template-columns: repeat(2, 1fr); }
  .modules { grid-template-columns: repeat(2, 1fr); }
  .data-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
}
@media (max-width: 640px) {
  .app-shell { display: block; }
  .sidebar { position: static; height: auto; flex-direction: row; align-items: center; overflow-x: auto; padding: 10px; }
  .sidebar-brand { border: 0; padding: 0; margin-left: 8px; }
  .sidebar-brand img { width: 40px; height: 40px; }
  nav { display: flex; margin: 0; }
  .logout { display: none; }
  .workspace { padding: 18px 14px 40px; }
  header h1 { font-size: 20px; }
  .user-chip div { display: none; }
  .welcome { min-height: 190px; }
  .welcome p { font-size: 11px; line-height: 2; }
  .readiness { width: 100px; height: 100px; border-width: 7px; }
  .readiness strong { font-size: 21px; }
  .metrics, .modules { grid-template-columns: 1fr 1fr; }
  .metrics article, .modules article { padding: 15px; }
  .section-title { display: grid; }
  .users-toolbar { display: flex; }
  .form-grid { grid-template-columns: 1fr; }
  .data-grid { grid-template-columns: 1fr; }
}

@media print {
  @page { size: A4; margin: 12mm; }
  body { background: white; }
  .sidebar, header, .list-tools, .toolbar-actions, .module-tabs { display: none !important; }
  .app-shell { display: block; }
  .workspace { padding: 0; }
  .content-card { border: 0; padding: 0; }
  .data-grid { grid-template-columns: repeat(2,1fr); }
  .data-card { break-inside: avoid; box-shadow: none; }
}

/* Modern Razi dashboard */
:root {
  --navy: #163a63;
  --navy-deep: #0d2744;
  --teal: #0b8b83;
  --cyan: #21aeb0;
  --bg: #f4f7fb;
  --card: #ffffff;
  --text: #172b42;
  --muted: #78889a;
  --line: #e8edf3;
  --shadow: 0 12px 36px rgba(21, 45, 76, .07);
}

body {
  background:
    radial-gradient(circle at 85% 8%, rgba(32, 173, 176, .055), transparent 24rem),
    var(--bg);
}

.login-shell {
  grid-template-columns: minmax(390px, 34%) 1fr;
  background: #f8fafc;
}

.login-panel {
  padding: clamp(32px, 5vw, 78px);
  gap: 34px;
  box-shadow: -12px 0 70px rgba(11, 35, 62, .1);
}

.login-panel .brand img {
  width: 64px;
  height: 64px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 19px;
  box-shadow: 0 9px 24px rgba(15, 53, 87, .09);
}

.login-panel .brand strong { font-size: 20px; }
.login-copy h1 { font-size: clamp(30px, 3vw, 40px); letter-spacing: -.5px; }
.login-copy p { max-width: 390px; }
.login-panel form { gap: 19px; }
.login-panel input {
  min-height: 52px;
  background: #f7f9fc;
  border-color: #e5ebf1;
}
.login-panel form button {
  min-height: 52px;
  background: linear-gradient(135deg, #163e68, #087d7c);
  box-shadow: 0 12px 28px rgba(9, 113, 113, .22);
  transition: .2s ease;
}
.login-panel form button:hover { transform: translateY(-2px); box-shadow: 0 16px 34px rgba(9, 113, 113, .27); }

.login-visual {
  place-items: center;
  isolation: isolate;
  padding: clamp(50px, 8vw, 130px);
  background:
    radial-gradient(circle at 17% 14%, rgba(91, 224, 215, .24), transparent 26%),
    radial-gradient(circle at 88% 84%, rgba(46, 131, 194, .25), transparent 28%),
    linear-gradient(140deg, #09233e 0%, #104c68 48%, #087e7d 100%);
}

.login-visual::before {
  width: 560px;
  height: 560px;
  top: -230px;
  left: -180px;
  border: 1px solid rgba(255,255,255,.09);
  box-shadow: 0 0 0 90px rgba(255,255,255,.018), 0 0 0 180px rgba(255,255,255,.012);
}
.login-visual::after {
  width: 430px;
  height: 430px;
  inset: auto -150px -170px auto;
  background: rgba(255,255,255,.025);
  border-color: rgba(255,255,255,.08);
}
.visual-grid {
  position: absolute;
  inset: 0;
  opacity: .15;
  z-index: -1;
  background-image:
    linear-gradient(rgba(255,255,255,.1) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.1) 1px, transparent 1px);
  background-size: 54px 54px;
  mask-image: linear-gradient(to bottom, transparent, black 25%, black 75%, transparent);
}
.visual-card {
  max-width: 680px;
  text-align: center;
}
.visual-badge {
  display: inline-flex;
  padding: 8px 15px;
  border: 1px solid rgba(255,255,255,.16);
  border-radius: 999px;
  background: rgba(255,255,255,.08);
  backdrop-filter: blur(8px);
}
.visual-card h2 {
  margin: 25px 0 16px;
  font-size: clamp(38px, 5.3vw, 70px);
  line-height: 1.45;
  letter-spacing: -1.4px;
}
.visual-card p { max-width: 560px; margin-inline: auto; font-size: 14px; }
.floating-stat {
  position: absolute;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 13px 17px;
  color: white;
  border: 1px solid rgba(255,255,255,.13);
  border-radius: 17px;
  background: rgba(255,255,255,.09);
  box-shadow: 0 20px 50px rgba(2,22,38,.17);
  backdrop-filter: blur(14px);
}
.floating-stat b { font-size: 21px; }
.floating-stat span { font-size: 10px; opacity: .8; }
.floating-stat i {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #58e0ad;
  box-shadow: 0 0 0 5px rgba(88,224,173,.14);
}
.floating-stat-one { top: 15%; right: 10%; }
.floating-stat-two { bottom: 14%; left: 9%; }

.app-shell { grid-template-columns: 276px minmax(0, 1fr); }
.sidebar {
  z-index: 10;
  padding: 22px 15px 18px;
  background:
    radial-gradient(circle at 50% 0, rgba(35, 170, 171, .15), transparent 18rem),
    linear-gradient(180deg, #102f50 0%, #0b223b 100%);
  box-shadow: -8px 0 30px rgba(10, 34, 58, .07);
}
.sidebar-brand {
  padding: 3px 8px 21px;
  border-color: rgba(255,255,255,.08);
}
.sidebar-brand img {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  box-shadow: 0 10px 24px rgba(0,0,0,.16);
}
.sidebar-brand strong { font-size: 15px; }
.sidebar nav {
  gap: 3px;
  margin-top: 12px;
  padding-left: 3px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,.15) transparent;
}
.nav-label {
  display: block;
  padding: 15px 14px 5px;
  color: rgba(255,255,255,.34);
  font-size: 9px;
  font-weight: 600;
}
.nav-item {
  position: relative;
  display: flex;
  align-items: center;
  gap: 11px;
  min-height: 44px;
  padding: 8px 10px;
  color: rgba(255,255,255,.68);
  font-size: 12px;
  transition: .18s ease;
}
.nav-item::after {
  content: "";
  position: absolute;
  right: -15px;
  width: 3px;
  height: 0;
  border-radius: 4px 0 0 4px;
  background: #49d5cd;
  transition: .18s ease;
}
.nav-item:hover { background: rgba(255,255,255,.055); color: white; transform: translateX(-2px); }
.nav-item.active {
  color: white;
  background: linear-gradient(90deg, rgba(25, 170, 169, .22), rgba(25, 170, 169, .08));
}
.nav-item.active::after { height: 24px; }
.nav-icon {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  flex: 0 0 30px;
  border-radius: 9px;
  color: rgba(255,255,255,.76);
  background: rgba(255,255,255,.07);
  font-size: 15px;
  font-weight: 600;
}
.nav-item.active .nav-icon { color: #79eee6; background: rgba(42, 192, 188, .15); }
.logout {
  min-height: 42px;
  margin-top: 12px;
  color: rgba(255,255,255,.62);
  font-size: 11px;
}

.workspace { padding: 22px clamp(22px, 3.4vw, 52px) 56px; }
.workspace > header {
  min-height: 61px;
  margin-bottom: 24px;
}
.page-heading h1 { margin-top: 2px; font-size: 23px; letter-spacing: -.2px; }
.header-actions { display: flex; align-items: center; gap: 11px; }
.notification-button, .mobile-menu {
  position: relative;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 14px;
  color: var(--text);
  background: white;
  box-shadow: 0 6px 20px rgba(22,48,78,.04);
  cursor: pointer;
}
.notification-button i {
  position: absolute;
  top: 9px;
  right: 9px;
  width: 7px;
  height: 7px;
  border: 2px solid white;
  border-radius: 50%;
  background: #ff775d;
}
.mobile-menu { display: none; }
.user-chip {
  min-width: 176px;
  padding: 6px 8px 6px 13px;
  border-radius: 15px;
  box-shadow: 0 6px 20px rgba(22,48,78,.04);
}
.user-chip > span {
  width: 40px;
  height: 40px;
  color: #0a7f7a;
  border-radius: 12px;
  background: linear-gradient(145deg, #dff8f4, #e9f4ff);
}
.user-chip strong { font-size: 11px; }
.user-chip small { font-size: 9px; }

.dashboard-hero {
  position: relative;
  min-height: 238px;
  padding: clamp(30px, 4vw, 50px);
  overflow: hidden;
  background:
    radial-gradient(circle at 13% 18%, rgba(84, 226, 213, .23), transparent 24%),
    radial-gradient(circle at 85% 110%, rgba(48, 142, 199, .25), transparent 35%),
    linear-gradient(120deg, #163d67 0%, #0f6473 62%, #0a8b83 100%);
  box-shadow: 0 22px 52px rgba(24, 71, 102, .16);
}
.dashboard-hero::after {
  content: "";
  position: absolute;
  left: -85px;
  bottom: -130px;
  width: 320px;
  height: 320px;
  border: 1px solid rgba(255,255,255,.13);
  border-radius: 50%;
  box-shadow: 0 0 0 50px rgba(255,255,255,.025), 0 0 0 100px rgba(255,255,255,.018);
}
.dashboard-hero > div:first-child { position: relative; z-index: 1; }
.hero-date {
  display: inline-flex;
  padding: 6px 11px;
  border: 1px solid rgba(255,255,255,.13);
  border-radius: 999px;
  background: rgba(255,255,255,.08);
  font-size: 10px;
}
.dashboard-hero h2 { margin: 15px 0 8px; font-size: clamp(28px, 3.3vw, 41px); }
.dashboard-hero p { font-size: 12px; }
.hero-actions { display: flex; gap: 9px; margin-top: 24px; }
.hero-actions button {
  min-height: 41px;
  padding: 9px 17px;
  border: 0;
  border-radius: 11px;
  color: #17415e;
  background: white;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
}
.hero-actions button.ghost {
  color: white;
  border: 1px solid rgba(255,255,255,.18);
  background: rgba(255,255,255,.08);
}
.readiness {
  position: relative;
  z-index: 1;
  width: 132px;
  height: 132px;
  border-width: 8px;
  background: rgba(255,255,255,.055);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.04);
}

.metrics { gap: 13px; margin: 17px 0; }
.metrics .metric-card {
  grid-template-columns: 48px 1fr;
  align-items: center;
  gap: 13px;
  min-height: 108px;
  padding: 18px;
  border-color: rgba(224,231,239,.85);
  border-radius: 19px;
  box-shadow: var(--shadow);
}
.metric-icon {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 15px;
  font-size: 20px;
}
.metric-card > div { display: grid; }
.metrics .metric-card span { font-size: 10px; }
.metrics .metric-card strong { line-height: 1.45; font-size: 25px; }
.metrics .metric-card small { color: #9aa8b6; font-size: 8px; }
.metric-blue .metric-icon { color: #2878d1; background: #e9f3ff; }
.metric-orange .metric-icon { color: #df7b32; background: #fff2e8; }
.metric-violet .metric-icon { color: #7965d8; background: #f0edff; }
.metric-green .metric-icon { color: #159574; background: #e6f8f1; }
.metrics .healthy strong { font-size: 18px; }

.content-card {
  border-color: rgba(226,233,240,.9);
  border-radius: 22px;
  box-shadow: var(--shadow);
}
.dashboard-modules { padding: 24px; }
.dashboard-modules .section-title h3 { font-size: 17px; }
.phase { color: #137d69; background: #e8f8f2; }
.modules { grid-template-columns: repeat(3, minmax(0,1fr)); gap: 11px; }
.modules article {
  grid-template-columns: 46px minmax(0,1fr) auto;
  align-items: center;
  gap: 12px;
  min-height: 82px;
  padding: 14px;
  border-radius: 17px;
  cursor: pointer;
}
.modules article:hover {
  border-color: #c9dce7;
  box-shadow: 0 12px 30px rgba(21,45,76,.07);
}
.modules article > div { display: grid; gap: 5px; min-width: 0; }
.modules article > i { color: #aab6c2; font-size: 24px; font-style: normal; }
.module-icon {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 14px;
  font-size: 19px !important;
}
.module-icon.blue { color: #2878d1; background: #e9f3ff; }
.module-icon.orange { color: #df7b32; background: #fff2e8; }
.module-icon.violet { color: #7965d8; background: #f0edff; }
.module-icon.green { color: #159574; background: #e6f8f1; }
.module-icon.cyan { color: #088f9b; background: #e5f8fa; }
.module-icon.pink { color: #c55d8d; background: #fcebf3; }

.module-page, .users-card { min-height: calc(100vh - 132px); }
.list-tools input {
  min-height: 44px;
  padding-right: 43px;
  background:
    linear-gradient(135deg, transparent 45%, #97a7b7 46%, #97a7b7 54%, transparent 55%) 20px 19px/7px 7px no-repeat,
    radial-gradient(circle, transparent 48%, #97a7b7 50%, #97a7b7 63%, transparent 65%) 26px 14px/13px 13px no-repeat,
    #f8fafc;
}
.primary-button { background: linear-gradient(135deg, #17466e, #0a8a82); }
.data-grid { gap: 14px; }
.data-card { border-radius: 18px; box-shadow: 0 5px 18px rgba(24,53,83,.035); }
.data-card-head > b { color: #0a8983; background: linear-gradient(145deg, #e1f8f4, #ecf5ff); }
.data-card-meta span { background: #f7f9fc; }

@media (max-width: 1120px) {
  .app-shell { grid-template-columns: 244px minmax(0,1fr); }
  .modules { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .metrics { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .data-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
}

@media (max-width: 820px) {
  .app-shell { display: block; }
  .sidebar {
    position: fixed;
    top: 0;
    right: 0;
    width: min(285px, 84vw);
    height: 100vh;
    padding: 20px 15px;
    transform: translateX(105%);
    transition: transform .24s ease;
  }
  .app-shell.menu-open .sidebar { transform: translateX(0); }
  .app-shell.menu-open::after {
    content: "";
    position: fixed;
    inset: 0;
    z-index: 9;
    background: rgba(8,27,47,.42);
    backdrop-filter: blur(2px);
  }
  .sidebar .brand div, .nav-item span, .logout { font-size: inherit; }
  .sidebar-brand { justify-content: flex-start; }
  .sidebar nav { display: grid; }
  .nav-item { text-align: right; font-size: 12px; }
  .logout { display: block; }
  .mobile-menu { display: grid; }
  .workspace > header { justify-content: flex-start; gap: 12px; }
  .header-actions { margin-right: auto; }
  .notification-button { display: none; }
}

@media (max-width: 620px) {
  .workspace { padding: 14px 12px 40px; }
  .workspace > header { margin-bottom: 15px; }
  .page-heading .eyebrow { display: none; }
  .page-heading h1 { font-size: 18px; }
  .user-chip { min-width: 0; border: 0; padding: 0; background: transparent; box-shadow: none; }
  .user-chip > span { width: 42px; height: 42px; }
  .dashboard-hero {
    min-height: 248px;
    padding: 25px 22px;
    align-items: flex-start;
  }
  .dashboard-hero h2 { font-size: 25px; }
  .dashboard-hero p { max-width: 65%; line-height: 1.9; }
  .readiness { width: 86px; height: 86px; border-width: 6px; }
  .readiness strong { font-size: 18px; }
  .readiness span { font-size: 8px; }
  .hero-actions { position: absolute; right: 22px; bottom: 23px; }
  .metrics { grid-template-columns: 1fr 1fr; gap: 9px; }
  .metrics .metric-card {
    grid-template-columns: 38px minmax(0,1fr);
    min-height: 90px;
    gap: 9px;
    padding: 12px;
  }
  .metric-icon { width: 38px; height: 38px; border-radius: 12px; font-size: 16px; }
  .metrics .metric-card strong { font-size: 20px; }
  .metrics .healthy strong { font-size: 15px; }
  .modules { grid-template-columns: 1fr; }
  .modules article { min-height: 76px; }
  .dashboard-modules { padding: 18px 15px; }
  .data-grid { grid-template-columns: 1fr; }
  .content-card { padding: 18px 14px; }
}

@media print {
  .mobile-menu, .header-actions, .hero-actions { display: none !important; }
}

/* Complete operational modules */
.detail-modal-card {
  width: min(1050px, 100%);
  max-height: calc(100vh - 28px);
}
.detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding-bottom: 16px;
  margin-bottom: 17px;
  border-bottom: 1px solid var(--line);
}
.detail-content { display: grid; gap: 17px; }
.detail-section {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 17px;
  background: #fff;
}
.detail-section h3 {
  margin: 0 0 14px;
  color: var(--text);
  font-size: 14px;
}
.detail-notes, .notification-message {
  margin: 13px 0 0;
  padding: 12px 14px;
  color: #53677b;
  border-radius: 12px;
  background: #f7f9fc;
  font-size: 11px;
  line-height: 2;
}
.notification-message { margin: 0; font-size: 13px; }
.info-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0,1fr));
  gap: 9px;
}
.info-grid > div {
  display: grid;
  align-content: start;
  gap: 4px;
  min-height: 66px;
  padding: 11px 12px;
  border: 1px solid #edf1f5;
  border-radius: 12px;
  background: #f8fafc;
  overflow: hidden;
}
.info-grid small { color: var(--muted); font-size: 9px; }
.info-grid strong {
  overflow-wrap: anywhere;
  color: #29445e;
  font-size: 11px;
  line-height: 1.8;
}
.detail-table { border-radius: 12px; }
.detail-table table { min-width: 580px; }
.detail-table th, .detail-table td { padding: 10px 12px; font-size: 10px; }
.mini-empty {
  padding: 22px;
  color: #98a6b5;
  border: 1px dashed #dce4eb;
  border-radius: 12px;
  text-align: center;
  font-size: 10px;
}
.attachment-form {
  display: grid;
  grid-template-columns: 1.2fr .8fr 1.5fr auto;
  align-items: end;
  gap: 8px;
  margin-bottom: 12px;
}
.attachment-form input { min-width: 0; direction: rtl; }
.attachment-list { display: grid; gap: 7px; }
.attachment-list a {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #fafcfd;
  text-decoration: none;
}
.attachment-list a strong { font-size: 11px; }
.attachment-list a span { color: var(--muted); font-size: 9px; }

.line-items-field {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fafbfd;
}
.line-items-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}
.line-items-head strong { font-size: 12px; }
.line-items-list { display: grid; gap: 8px; }
.line-item-row {
  display: grid;
  grid-template-columns: 1.15fr .45fr 1.2fr 34px;
  gap: 7px;
  align-items: center;
}
.line-item-row select, .line-item-row input {
  width: 100%;
  min-width: 0;
  padding: 10px;
  font-size: 10px;
}
.remove-line-item {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  padding: 0;
  color: #c65353;
  border: 0;
  border-radius: 9px;
  background: #fdecec;
  cursor: pointer;
}
.timeline { display: grid; gap: 0; }
.timeline > div {
  position: relative;
  display: grid;
  grid-template-columns: 14px minmax(110px,.45fr) 1.5fr auto;
  align-items: start;
  gap: 8px;
  min-height: 47px;
  padding: 8px 0;
}
.timeline > div:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 24px;
  right: 5px;
  bottom: -8px;
  width: 1px;
  background: #dce5ed;
}
.timeline i {
  position: relative;
  z-index: 1;
  width: 11px;
  height: 11px;
  margin-top: 3px;
  border: 3px solid #d8f4ef;
  border-radius: 50%;
  background: #159a88;
}
.timeline strong { font-size: 10px; }
.timeline span { color: #5f7184; font-size: 10px; line-height: 1.8; }
.timeline small { color: #9aa7b4; font-size: 8px; white-space: nowrap; }
.settings-layout {
  display: grid;
  grid-template-columns: 1.4fr .8fr;
  gap: 15px;
}
.settings-card {
  display: grid;
  align-content: start;
  gap: 14px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
}
.backup-card { text-align: center; place-items: center; }
.backup-card > b {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  color: #138b82;
  border-radius: 20px;
  background: #e6f8f4;
  font-size: 25px;
}
.backup-card h3 { margin: 4px 0 0; font-size: 16px; }
.backup-card p { margin: 0; color: var(--muted); font-size: 10px; line-height: 2; }

@media (max-width: 800px) {
  .info-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .attachment-form { grid-template-columns: 1fr 1fr; }
  .line-item-row { grid-template-columns: 1fr .45fr 34px; }
  .line-item-row [data-specification] { grid-column: 1 / -1; grid-row: 2; }
  .settings-layout { grid-template-columns: 1fr; }
  .timeline > div { grid-template-columns: 14px 1fr; }
  .timeline span, .timeline small { grid-column: 2; }
}

@media (max-width: 520px) {
  .info-grid { grid-template-columns: 1fr 1fr; }
  .attachment-form { grid-template-columns: 1fr; }
  .attachment-list a { display: grid; }
  .detail-section { padding: 13px; }
}

@media print {
  .modal.hidden { display: none !important; }
  .detail-modal-card { width: 100%; max-height: none; padding: 0; box-shadow: none; }
  #detail-modal {
    position: static;
    display: block !important;
    padding: 0;
    background: white;
  }
  #detail-modal .modal-head, .detail-actions, .attachment-form { display: none !important; }
  .detail-section { break-inside: avoid; }
}
