/* ==========================================================================
   Hengxin Cloud · iOS app-icon navigation system
   Squircle icon tiles, rounded glyph strokes, and compact glass controls.
   ========================================================================== */

.icon {
  stroke-width: 1.65;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.icon-sm { stroke-width: 1.8; }

.icon-btn {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  border: 1px solid rgba(255, 255, 255, .1);
  background: rgba(255, 255, 255, .055);
  color: #dce8f5;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08);
}
.icon-btn:hover {
  background: rgba(255, 255, 255, .13);
  border-color: rgba(255, 255, 255, .2);
  color: #fff;
}
.icon-btn .icon { width: 17px; height: 17px; }

/* Sidebar rows become compact iOS app rows */
.nav-item {
  min-height: 40px;
  padding: 6px 9px;
  gap: 11px;
  border-radius: 11px;
  font-size: 12.5px;
}
.nav-item:hover { background: rgba(255, 255, 255, .07); }

.nav-icon-tile {
  position: relative;
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .19);
  border-radius: 8px;
  background: linear-gradient(145deg, #5ac8fa, #007aff);
  color: #fff;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .32),
    0 2px 5px rgba(0, 0, 0, .2);
  transition: transform .18s ease, box-shadow .18s ease, filter .18s ease;
}
.nav-icon-tile::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background: linear-gradient(180deg, rgba(255, 255, 255, .27), rgba(255, 255, 255, 0) 55%);
  pointer-events: none;
}
.nav-icon-tile .icon {
  position: relative;
  z-index: 1;
  width: 15px;
  height: 15px;
  stroke-width: 1.85;
  color: #fff;
  filter: drop-shadow(0 1px 1px rgba(0, 0, 0, .16));
}
.nav-item:hover .nav-icon-tile {
  transform: translateY(-1px);
  filter: saturate(1.06) brightness(1.06);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .4),
    0 5px 12px rgba(0, 0, 0, .24);
}
.nav-item.active .nav-icon-tile {
  transform: scale(1.05);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .42),
    0 0 0 2px rgba(255, 255, 255, .17),
    0 6px 16px rgba(0, 0, 0, .26);
}

/* iOS app-icon tints */
.nav-item[data-nav="dashboard"] .nav-icon-tile { background: linear-gradient(145deg, #64d2ff, #007aff); }
.nav-item[data-nav="clients"] .nav-icon-tile { background: linear-gradient(145deg, #64d2ff, #0a84ff); }
.nav-item[data-nav="crm"] .nav-icon-tile { background: linear-gradient(145deg, #a78bfa, #5856d6); }
.nav-item[data-nav="contracts"] .nav-icon-tile { background: linear-gradient(145deg, #ffd60a, #ff9f0a); }
.nav-item[data-nav="tax"] .nav-icon-tile { background: linear-gradient(145deg, #ffb340, #ff6b00); }
.nav-item[data-nav="qualifications"] .nav-icon-tile { background: linear-gradient(145deg, #d18bf5, #8944ab); }
.nav-item[data-nav="finance"] .nav-icon-tile { background: linear-gradient(145deg, #7d7aff, #3634a3); }
.nav-item[data-nav="certificates"] .nav-icon-tile { background: linear-gradient(145deg, #ff8fa3, #ff2d55); }
.nav-item[data-nav="chat"] .nav-icon-tile { background: linear-gradient(145deg, #67e8f9, #0a84ff); }
.nav-item[data-nav="tasks"] .nav-icon-tile { background: linear-gradient(145deg, #ffd60a, #e08a00); }
.nav-item[data-nav="approvals"] .nav-icon-tile { background: linear-gradient(145deg, #bf5af2, #7d2ae8); }
.nav-item[data-nav="announcements"] .nav-icon-tile { background: linear-gradient(145deg, #ff9a9e, #ff3b30); }
.nav-item[data-nav="team"] .nav-icon-tile { background: linear-gradient(145deg, #c7c7cc, #8e8e93); }
.nav-item[data-nav="audit"] .nav-icon-tile { background: linear-gradient(145deg, #9ca3af, #52525b); }
.nav-item[data-nav="settings"] .nav-icon-tile { background: linear-gradient(145deg, #d1d1d6, #8e8e93); }

/* Give card-level symbol tiles the same softer squircle geometry */
.stat-icon { border-radius: 10px; }
/* Dark glyphs on bright gold app tiles */
.nav-item[data-nav="contracts"] .nav-icon-tile,
.nav-item[data-nav="tasks"] .nav-icon-tile {
  color: #3b2a00;
  border-color: rgba(255, 255, 255, .3);
}
.nav-item[data-nav="contracts"] .nav-icon-tile .icon,
.nav-item[data-nav="tasks"] .nav-icon-tile .icon {
  color: rgba(48, 33, 0, .84);
  filter: none;
}

/* ==========================================================================
   Tonal iOS icon tiles for lists and document rows
   ========================================================================== */

.contract-file-icon {
  width: 32px;
  height: 32px;
  border: 1px solid #c9ddf7;
  border-radius: 9px;
  background: linear-gradient(145deg, #edf5ff 0%, #d9e9ff 100%);
  color: #1d4ed8;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .85),
    0 2px 5px rgba(15, 23, 42, .07);
}
.contract-file-icon::after { display: none; }
.contract-file-icon .icon { width: 15px; height: 15px; stroke-width: 1.8; }
.contract-file-icon.pending {
  border-color: #f5ddb5;
  background: linear-gradient(145deg, #fff8ec 0%, #ffedce 100%);
  color: #b45309;
}
.contract-file-icon.draft {
  border-color: #dce3ec;
  background: linear-gradient(145deg, #f6f8fb 0%, #e9eef5 100%);
  color: #64748b;
}
.contract-file-icon.archived {
  border-color: #d7e2ec;
  background: linear-gradient(145deg, #f1f5f9 0%, #e2eaf2 100%);
  color: #52657a;
}
.contract-file-icon.expired,
.contract-file-icon.rejected {
  border-color: #f8cdd6;
  background: linear-gradient(145deg, #fff1f4 0%, #ffdce5 100%);
  color: #be123c;
}

.cell-avatar {
  width: 34px;
  height: 34px;
  border: 1px solid rgba(255, 255, 255, .7);
  border-radius: 9px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .85),
    0 2px 5px rgba(15, 23, 42, .07);
}
.cell-avatar .icon { width: 15px; height: 15px; stroke-width: 1.8; }
.cell-avatar.cell-avatar-cert {
  border-color: #ffd1dd;
  background: linear-gradient(145deg, #fff0f4 0%, #ffdce6 100%) !important;
  color: #c2185b !important;
}
.cell-avatar.cell-avatar-crm {
  border-color: #e3d2fb;
  background: linear-gradient(145deg, #f6efff 0%, #e9d9ff 100%) !important;
  color: #7c3aed !important;
}
.cell-avatar.cell-avatar-finance {
  border-color: #cbdcf5;
  background: linear-gradient(145deg, #eff6ff 0%, #dbeafe 100%) !important;
  color: #2563eb !important;
}
.cell-avatar.cell-avatar-tax {
  border-color: #f6ddb9;
  background: linear-gradient(145deg, #fff8ed 0%, #ffedcf 100%) !important;
  color: #b45309 !important;
}

.strip-icon {
  border: 1px solid #cbdcf5;
  border-radius: 9px;
  background: linear-gradient(145deg, #eff6ff 0%, #dbeafe 100%);
  color: #2563eb;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .8), 0 2px 4px rgba(15, 23, 42, .06);
}
.strip-item.gold .strip-icon {
  border-color: #f2ddb8;
  background: linear-gradient(145deg, #fff8ed 0%, #ffedcf 100%);
  color: #b45309;
}

/* Vivid iOS app-icon treatment for document rows and entity lists */
.contract-file-icon {
  position: relative;
  overflow: hidden;
  border-color: rgba(255, 255, 255, .3);
  background: linear-gradient(145deg, #64b5ff 0%, #1d4ed8 100%);
  color: #fff;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .35),
    0 3px 7px rgba(29, 78, 216, .2);
}
.contract-file-icon::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255, 255, 255, .25), rgba(255, 255, 255, 0) 55%);
  pointer-events: none;
}
.contract-file-icon .icon { position: relative; z-index: 1; filter: drop-shadow(0 1px 1px rgba(0, 0, 0, .15)); }
.contract-file-icon.pending {
  border-color: rgba(255, 255, 255, .34);
  background: linear-gradient(145deg, #ffe066 0%, #ff9f0a 100%);
  color: #3b2a00;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .45), 0 3px 7px rgba(255, 159, 10, .22);
}
.contract-file-icon.pending .icon { filter: none; }
.contract-file-icon.draft {
  border-color: rgba(255, 255, 255, .3);
  background: linear-gradient(145deg, #d1d1d6 0%, #8e8e93 100%);
  color: #fff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .4), 0 3px 7px rgba(142, 142, 147, .18);
}
.contract-file-icon.archived {
  border-color: rgba(255, 255, 255, .28);
  background: linear-gradient(145deg, #9ca3af 0%, #4b5563 100%);
  color: #fff;
}
.contract-file-icon.expired, .contract-file-icon.rejected {
  border-color: rgba(255, 255, 255, .3);
  background: linear-gradient(145deg, #ff8fa3 0%, #e11d48 100%);
  color: #fff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .4), 0 3px 7px rgba(225, 29, 72, .2);
}

.cell-avatar {
  position: relative;
  overflow: hidden;
  border-color: rgba(255, 255, 255, .32);
  text-shadow: 0 1px 1px rgba(20, 30, 50, .14);
}
.cell-avatar::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255, 255, 255, .24), rgba(255, 255, 255, 0) 55%);
  pointer-events: none;
}
.cell-avatar .icon { position: relative; z-index: 1; color: #fff !important; filter: drop-shadow(0 1px 1px rgba(0, 0, 0, .14)); }
.cell-avatar.cell-avatar-cert {
  border-color: rgba(255, 255, 255, .34);
  background: linear-gradient(145deg, #ff8fa3 0%, #c2185b 100%) !important;
  color: #fff !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .4), 0 3px 7px rgba(194, 24, 91, .18);
}
.cell-avatar.cell-avatar-crm {
  border-color: rgba(255, 255, 255, .32);
  background: linear-gradient(145deg, #c084fc 0%, #6d28d9 100%) !important;
  color: #fff !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .4), 0 3px 7px rgba(109, 40, 217, .18);
}
.cell-avatar.cell-avatar-finance {
  border-color: rgba(255, 255, 255, .32);
  background: linear-gradient(145deg, #64b5ff 0%, #2563eb 100%) !important;
  color: #fff !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .4), 0 3px 7px rgba(37, 99, 235, .18);
}
.cell-avatar.cell-avatar-tax {
  border-color: rgba(255, 255, 255, .32);
  background: linear-gradient(145deg, #ffc35c 0%, #b45309 100%) !important;
  color: #fff !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .4), 0 3px 7px rgba(180, 83, 9, .18);
}

/* ==========================================================================
   Borderless icon surfaces — no white rim or white inset edge
   ========================================================================== */

.nav-icon-tile,
.nav-item[data-nav="contracts"] .nav-icon-tile,
.nav-item[data-nav="tasks"] .nav-icon-tile {
  border: 0 !important;
  box-shadow: 0 3px 8px rgba(0, 0, 0, .22) !important;
}
.nav-icon-tile::before { display: none !important; }
.nav-item:hover .nav-icon-tile {
  box-shadow: 0 5px 12px rgba(0, 0, 0, .26) !important;
}
.nav-item.active .nav-icon-tile {
  box-shadow: 0 6px 15px rgba(0, 0, 0, .3) !important;
}

.icon-btn {
  border: 0 !important;
  box-shadow: none !important;
}

.contract-file-icon,
.contract-file-icon.pending,
.contract-file-icon.draft,
.contract-file-icon.archived,
.contract-file-icon.expired,
.contract-file-icon.rejected {
  border: 0 !important;
  box-shadow: 0 3px 7px rgba(15, 23, 42, .16) !important;
}
.contract-file-icon::before { display: none !important; }

.cell-avatar,
.cell-avatar.cell-avatar-cert,
.cell-avatar.cell-avatar-crm,
.cell-avatar.cell-avatar-finance,
.cell-avatar.cell-avatar-tax {
  border: 0 !important;
  box-shadow: 0 3px 7px rgba(15, 23, 42, .16) !important;
}
.cell-avatar::before { display: none !important; }

.strip-icon,
.strip-item.gold .strip-icon {
  border: 0 !important;
  box-shadow: 0 2px 5px rgba(15, 23, 42, .08) !important;
}

.stat-icon,
.stat-card .stat-icon {
  border: 0 !important;
  box-shadow: 0 3px 8px rgba(0, 0, 0, .12) !important;
}

.brand-mark {
  box-shadow: 0 8px 20px rgba(0, 0, 0, .18) !important;
}

/* Solid SF-style glyphs */
.icon.icon-fill {
  fill: currentColor;
  stroke: none;
}

/* Settings-style flat icon tiles */
.nav-icon-tile {
  background: #007aff !important;
}
.nav-item[data-nav="dashboard"] .nav-icon-tile { background: #007aff !important; }
.nav-item[data-nav="clients"] .nav-icon-tile { background: #0a84ff !important; }
.nav-item[data-nav="crm"] .nav-icon-tile { background: #5856d6 !important; }
.nav-item[data-nav="contracts"] .nav-icon-tile { background: #ff9500 !important; }
.nav-item[data-nav="tax"] .nav-icon-tile { background: #ff6b00 !important; }
.nav-item[data-nav="qualifications"] .nav-icon-tile { background: #af52de !important; }
.nav-item[data-nav="finance"] .nav-icon-tile { background: #3634a3 !important; }
.nav-item[data-nav="certificates"] .nav-icon-tile { background: #ff2d55 !important; }
.nav-item[data-nav="chat"] .nav-icon-tile { background: #0a84ff !important; }
.nav-item[data-nav="tasks"] .nav-icon-tile { background: #ff8a00 !important; }
.nav-item[data-nav="approvals"] .nav-icon-tile { background: #7d2ae8 !important; }
.nav-item[data-nav="announcements"] .nav-icon-tile { background: #ff3b30 !important; }
.nav-item[data-nav="team"] .nav-icon-tile { background: #8e8e93 !important; }
.nav-item[data-nav="audit"] .nav-icon-tile { background: #52525b !important; }
.nav-item[data-nav="settings"] .nav-icon-tile { background: #8e8e93 !important; }

.nav-item[data-nav="contracts"] .nav-icon-tile .icon,
.nav-item[data-nav="tasks"] .nav-icon-tile .icon {
  color: #fff;
  filter: drop-shadow(0 1px 1px rgba(0, 0, 0, .15));
}

/* Flat document and entity tiles */
.contract-file-icon { background: #007aff !important; }
.contract-file-icon.pending { background: #ff9500 !important; color: #fff; }
.contract-file-icon.draft { background: #8e8e93 !important; }
.contract-file-icon.archived { background: #636366 !important; }
.contract-file-icon.expired, .contract-file-icon.rejected { background: #ff3b30 !important; }
.cell-avatar.cell-avatar-cert { background: #ff2d55 !important; }
.cell-avatar.cell-avatar-crm { background: #af52de !important; }
.cell-avatar.cell-avatar-finance { background: #007aff !important; }
.cell-avatar.cell-avatar-tax { background: #ff9500 !important; }

/* Certificate status icons: same palette as the four risk modules */
.cell-avatar.cell-avatar-cert-expired {
  background: linear-gradient(145deg, #ffe4e6 0%, #fff1f2 100%) !important;
  box-shadow: 0 2px 5px rgba(190, 18, 60, .08) !important;
}
.cell-avatar.cell-avatar-cert-expired .icon { color: #be123c !important; }

.cell-avatar.cell-avatar-cert-critical {
  background: linear-gradient(145deg, #ffedd5 0%, #fff7ed 100%) !important;
  box-shadow: 0 2px 5px rgba(180, 83, 9, .08) !important;
}
.cell-avatar.cell-avatar-cert-critical .icon { color: #b45309 !important; }

.cell-avatar.cell-avatar-cert-warning {
  background: linear-gradient(145deg, #dbeafe 0%, #eff6ff 100%) !important;
  box-shadow: 0 2px 5px rgba(29, 78, 216, .08) !important;
}
.cell-avatar.cell-avatar-cert-warning .icon { color: #1d4ed8 !important; }

.cell-avatar.cell-avatar-cert-normal {
  background: linear-gradient(145deg, #e0e7ff 0%, #eef2ff 100%) !important;
  box-shadow: 0 2px 5px rgba(55, 48, 163, .08) !important;
}
.cell-avatar.cell-avatar-cert-normal .icon { color: #3730a3 !important; }
