/* ── App-level reset & tokens ── */
:root {
  --navy:       #304658;
  --navy-dark:  #253849;
  --teal:       #00A6A6;
  --teal-dark:  #008888;
  --pale:       #87BECC;
  --grey-50:    #F8F9FA;
  --grey-100:   #F1F3F5;
  --grey-200:   #E9ECEF;
  --grey-300:   #DEE2E6;
  --grey-400:   #CED4DA;
  --grey-500:   #ADB5BD;
  --grey-600:   #6C757D;
  --grey-700:   #495057;
  --grey-800:   #343A40;
  --grey-900:   #212529;
  --danger:     #DC3545;
  --warning:    #FFC107;
  --sidebar-w:  240px;
  --navbar-h:   60px;
  --tabbar-h:   38px;
  --radius:     10px;
  --shadow-sm:  0 1px 3px rgba(0,0,0,.08);
  --shadow-md:  0 4px 16px rgba(0,0,0,.12);
  --shadow-lg:  0 8px 32px rgba(0,0,0,.16);
  --transition: 160ms ease;
}

/* ── Loading state ── */
.app-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  background: var(--navy);
}

.loading-logo {
  height: 44px;
  width: auto;
  margin-bottom: 32px;
  display: block;
}

.loading-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid rgba(255,255,255,.15);
  border-top-color: var(--teal);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

/* ═══════════════════════════════════════════
   AUTH SCREENS
═══════════════════════════════════════════ */
.auth-screen {
  min-height: 100vh;
  background: linear-gradient(160deg, var(--navy) 0%, #253849 60%, #1e2f3d 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
}

.auth-logo {
  margin-bottom: 32px;
}

.auth-logo img {
  height: 48px;
  width: auto;
}

.auth-card {
  background: #fff;
  border-radius: 16px;
  box-shadow: var(--shadow-lg);
  padding: 40px;
  width: 100%;
  max-width: 440px;
}

.auth-card.auth-card-wide { max-width: 520px; }

.auth-card h1 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--navy);
  margin: 0 0 6px;
  letter-spacing: -0.02em;
}

.auth-card .auth-subtitle {
  font-size: .9rem;
  color: var(--grey-600);
  margin: 0 0 28px;
}

/* Form elements */
.form-group {
  margin-bottom: 18px;
}

.form-group label {
  display: block;
  font-size: .85rem;
  font-weight: 600;
  color: var(--grey-700);
  margin-bottom: 6px;
}

.form-group input {
  width: 100%;
  height: 44px;
  padding: 0 14px;
  border: 1.5px solid var(--grey-300);
  border-radius: 8px;
  font-size: .95rem;
  font-family: inherit;
  color: var(--grey-900);
  background: #fff;
  transition: border-color var(--transition), box-shadow var(--transition);
  box-sizing: border-box;
}

.form-group input:focus {
  outline: none;
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(0,166,166,.15);
}

.form-group input.error {
  border-color: var(--danger);
}

.form-row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

/* Auth buttons */
.btn-auth {
  width: 100%;
  height: 46px;
  background: var(--teal);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: background var(--transition), transform var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 6px;
}

.btn-auth:hover { background: var(--teal-dark); }
.btn-auth:active { transform: scale(.98); }
.btn-auth:disabled { opacity: .6; cursor: not-allowed; transform: none; }

.btn-auth .btn-spinner {
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255,255,255,.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

/* Auth links */
.auth-links {
  margin-top: 22px;
  text-align: center;
  font-size: .88rem;
  color: var(--grey-600);
}

.auth-links a {
  color: var(--teal);
  text-decoration: none;
  font-weight: 500;
  cursor: pointer;
}

.auth-links a:hover { text-decoration: underline; }

/* Auth messages */
.auth-message {
  font-size: .875rem;
  padding: 10px 14px;
  border-radius: 8px;
  margin-top: 14px;
  line-height: 1.5;
}

.auth-message.error {
  background: #FFF3F4;
  color: #C0392B;
  border: 1px solid #FADBD8;
}

.auth-message.success {
  background: #F0FFF4;
  color: #1D6A36;
  border: 1px solid #C3E6CB;
}

.auth-message.info {
  background: #EAF6FB;
  color: #1A6080;
  border: 1px solid #BEE3F8;
}

/* Auth divider */
.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 22px 0;
  color: var(--grey-400);
  font-size: .8rem;
}

.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--grey-200);
}

/* Terms note on signup */
.auth-terms {
  font-size: .78rem;
  color: var(--grey-500);
  margin-top: 14px;
  text-align: center;
  line-height: 1.6;
}

.auth-terms a {
  color: var(--grey-600);
  text-decoration: underline;
}

/* ═══════════════════════════════════════════
   APP SHELL
═══════════════════════════════════════════ */
.app-shell {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  background: var(--grey-50);
}

/* ── Navbar ── */
.app-navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--navbar-h);
  background: var(--navy);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  z-index: 200;
  box-shadow: 0 2px 8px rgba(0,0,0,.25);
}

.navbar-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.navbar-logo img {
  height: 36px;
  width: auto;
  display: block;
}

.navbar-project {
  font-size: .8rem;
  color: rgba(255,255,255,.5);
  font-weight: 500;
  padding-left: 16px;
  border-left: 1px solid rgba(255,255,255,.15);
}

.navbar-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.navbar-btn {
  background: none;
  border: none;
  color: rgba(255,255,255,.7);
  cursor: pointer;
  font-family: inherit;
  font-size: .875rem;
  padding: 6px 12px;
  border-radius: 6px;
  transition: background var(--transition), color var(--transition);
  display: flex;
  align-items: center;
  gap: 6px;
}

.navbar-btn:hover {
  background: rgba(255,255,255,.1);
  color: #fff;
}

.navbar-btn.active { color: #fff; }

.navbar-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--teal);
  color: #fff;
  font-size: .8rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border: 2px solid rgba(255,255,255,.2);
  transition: border-color var(--transition);
}

.navbar-avatar:hover { border-color: rgba(255,255,255,.5); }

/* ── Sidebar ── */
.app-body {
  display: flex;
  padding-top: calc(var(--navbar-h) + var(--tabbar-h));
  min-height: 100vh;
}

.app-sidebar {
  position: fixed;
  top: calc(var(--navbar-h) + var(--tabbar-h));
  left: 0;
  width: var(--sidebar-w);
  height: calc(100vh - var(--navbar-h) - var(--tabbar-h));
  background: #fff;
  border-right: 1px solid var(--grey-200);
  overflow-y: auto;
  z-index: 100;
  padding: 16px 0;
  display: flex;
  flex-direction: column;
}

.sidebar-section-label {
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--grey-400);
  padding: 12px 20px 6px;
  display: flex; align-items: center; gap: 8px;
}
.sidebar-role-chip { font-size: .6rem; padding: 2px 7px; border-radius: 6px; letter-spacing: .05em; }
.sidebar-role-chip--site   { background: #FFFBEB; color: #92400E; }
.sidebar-role-chip--viewer { background: #F3F4F6; color: #6B7280; }
.member-role-badge { display:inline-block; font-size:.75rem; font-weight:600; padding:3px 10px; border-radius:8px; }

.sidebar-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 20px;
  font-size: .875rem;
  color: var(--grey-700);
  text-decoration: none;
  cursor: pointer;
  border: none;
  background: none;
  width: 100%;
  text-align: left;
  font-family: inherit;
  transition: background var(--transition), color var(--transition);
  border-radius: 0;
}

.sidebar-item:hover {
  background: var(--grey-50);
  color: var(--navy);
}

.sidebar-item.active {
  background: rgba(0,166,166,.08);
  color: var(--teal);
  font-weight: 600;
}

.sidebar-item.active .sidebar-icon { color: var(--teal); }

.sidebar-icon {
  font-size: 1rem;
  width: 20px;
  text-align: center;
  flex-shrink: 0;
}

.sidebar-badge {
  margin-left: auto;
  background: var(--teal);
  color: #fff;
  font-size: .68rem;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 20px;
}

.sidebar-badge.coming { background: var(--grey-300); color: var(--grey-600); }

/* ── Main content ── */
.app-main {
  margin-left: var(--sidebar-w);
  flex: 1;
  padding: 32px;
  min-width: 0;
}

/* ── Page header ── */
.page-header {
  margin-bottom: 28px;
}

.page-header h1 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--navy);
  letter-spacing: -0.02em;
  margin: 0 0 4px;
}

.page-header p {
  font-size: .9rem;
  color: var(--grey-600);
  margin: 0;
}

/* ── Cards ── */
.card {
  background: #fff;
  border-radius: var(--radius);
  border: 1px solid var(--grey-200);
  padding: 24px;
  box-shadow: var(--shadow-sm);
}

.card-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--navy);
  margin: 0 0 16px;
}

/* ── Dashboard stats ── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 28px;
}

.stat-card {
  background: #fff;
  border-radius: var(--radius);
  border: 1px solid var(--grey-200);
  padding: 20px 24px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.stat-icon {
  font-size: 1.4rem;
}

.stat-value {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--navy);
  line-height: 1;
}

.stat-label {
  font-size: .8rem;
  color: var(--grey-500);
  font-weight: 500;
}

.stat-card.teal { border-left: 4px solid var(--teal); }
.stat-card.green { border-left: 4px solid var(--teal); }
.stat-card.orange { border-left: 4px solid #FF8C42; }
.stat-card.red { border-left: 4px solid #DC3545; }

/* Module grid */
.modules-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 14px;
}

.module-card {
  background: #fff;
  border-radius: var(--radius);
  border: 1px solid var(--grey-200);
  padding: 20px;
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--transition), border-color var(--transition);
  cursor: pointer;
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.module-card:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--teal);
}

.module-card.coming-soon {
  opacity: .6;
  cursor: default;
}

.module-card.coming-soon:hover {
  box-shadow: var(--shadow-sm);
  border-color: var(--grey-200);
}

.module-emoji {
  font-size: 1.6rem;
  flex-shrink: 0;
}

.module-info h3 {
  font-size: .9rem;
  font-weight: 700;
  color: var(--navy);
  margin: 0 0 4px;
}

.module-info p {
  font-size: .8rem;
  color: var(--grey-500);
  margin: 0;
  line-height: 1.5;
}

.module-tag {
  display: inline-block;
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .05em;
  padding: 2px 7px;
  border-radius: 4px;
  margin-top: 6px;
}

.module-tag.live {
  background: rgba(0,166,166,.1);
  color: var(--teal);
}

.module-tag.soon {
  background: var(--grey-100);
  color: var(--grey-500);
}

/* ── Profile page ── */
.profile-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 24px;
  align-items: start;
}

.profile-avatar-card {
  background: #fff;
  border-radius: var(--radius);
  border: 1px solid var(--grey-200);
  padding: 32px 24px;
  text-align: center;
  box-shadow: var(--shadow-sm);
}

.profile-avatar-large {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: var(--teal);
  color: #fff;
  font-size: 1.8rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
}

.profile-name {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--navy);
  margin: 0 0 4px;
}

.profile-email {
  font-size: .85rem;
  color: var(--grey-500);
  margin: 0 0 16px;
}

.profile-role {
  display: inline-block;
  font-size: .75rem;
  font-weight: 600;
  background: rgba(0,166,166,.1);
  color: var(--teal);
  padding: 3px 10px;
  border-radius: 20px;
}

.profile-form .form-group {
  margin-bottom: 16px;
}

.profile-form .form-group label {
  font-size: .85rem;
  font-weight: 600;
  color: var(--grey-700);
  display: block;
  margin-bottom: 6px;
}

.profile-form .form-group input,
.profile-form .form-group select {
  width: 100%;
  height: 42px;
  padding: 0 12px;
  border: 1.5px solid var(--grey-300);
  border-radius: 8px;
  font-size: .9rem;
  font-family: inherit;
  color: var(--grey-900);
  background: #fff;
  box-sizing: border-box;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.profile-form .form-group input:focus,
.profile-form .form-group select:focus {
  outline: none;
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(0,166,166,.15);
}

.form-actions {
  display: flex;
  gap: 12px;
  margin-top: 24px;
}

.btn-save {
  height: 40px;
  padding: 0 24px;
  background: var(--teal);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: .9rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: background var(--transition);
}

.btn-save:hover { background: var(--teal-dark); }
.btn-save:disabled { opacity: .6; cursor: not-allowed; }

.btn-secondary {
  height: 40px;
  padding: 0 20px;
  background: none;
  color: var(--grey-600);
  border: 1.5px solid var(--grey-300);
  border-radius: 8px;
  font-size: .9rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: background var(--transition), border-color var(--transition);
}

.btn-secondary:hover {
  background: var(--grey-50);
  border-color: var(--grey-400);
}

/* ── Coming soon view ── */
.coming-soon-view {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 80px 32px;
}

.coming-soon-icon {
  font-size: 3.5rem;
  margin-bottom: 20px;
}

.coming-soon-view h2 {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--navy);
  margin: 0 0 10px;
}

.coming-soon-view p {
  font-size: .95rem;
  color: var(--grey-500);
  margin: 0 0 28px;
  max-width: 420px;
}

.btn-dashboard {
  height: 40px;
  padding: 0 24px;
  background: var(--navy);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: .9rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: background var(--transition);
}

.btn-dashboard:hover { background: #253849; }

/* ── Inline message helpers ── */
.inline-message {
  font-size: .875rem;
  padding: 10px 14px;
  border-radius: 8px;
  margin-top: 14px;
  line-height: 1.5;
}

.inline-message.error   { background: #FFF3F4; color: #C0392B; border: 1px solid #FADBD8; }
.inline-message.success { background: #F0FFF4; color: #1D6A36; border: 1px solid #C3E6CB; }

/* ── Field-level inline error ── */
.field-error {
  display: none;
  font-size: .775rem;
  color: var(--danger);
  margin-top: 5px;
  font-weight: 500;
}
.field-error.visible { display: block; }

/* ── T&C checkbox ── */
.form-check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 6px;
  padding: 14px 0 0;
}

.form-check input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--teal);
  cursor: pointer;
  flex-shrink: 0;
  margin-top: 2px;
}

.form-check label {
  font-size: .875rem;
  color: var(--grey-700);
  cursor: pointer;
  line-height: 1.55;
}

.form-check label a {
  color: var(--teal);
  text-decoration: none;
  font-weight: 500;
}

.form-check label a:hover { text-decoration: underline; }

.terms-helper {
  font-size: .775rem;
  color: var(--danger);
  margin: 0 0 14px;
  display: none;
}

.terms-helper.visible { display: block; }

/* ── Phone prefix wrapper ── */
.phone-input-wrapper {
  display: flex;
  align-items: center;
  border: 1.5px solid var(--grey-300);
  border-radius: 8px;
  overflow: hidden;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.phone-input-wrapper:focus-within {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(0,166,166,.15);
}

.phone-prefix {
  padding: 0 12px;
  height: 44px;
  display: flex;
  align-items: center;
  background: var(--grey-50);
  border-right: 1.5px solid var(--grey-300);
  font-size: .9rem;
  font-weight: 600;
  color: var(--grey-700);
  white-space: nowrap;
  flex-shrink: 0;
  gap: 6px;
}

.phone-input-wrapper input {
  border: none !important;
  box-shadow: none !important;
  border-radius: 0 !important;
  flex: 1;
  min-width: 0;
}

.phone-helper {
  font-size: .775rem;
  color: var(--grey-400);
  margin-top: 5px;
}

/* ── Email verification banner ── */
.verify-banner {
  background: linear-gradient(90deg, #FFF8E1, #FFFDE7);
  border-bottom: 1px solid #FFE082;
  padding: 10px 32px;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: .875rem;
  color: #6D4C00;
  position: sticky;
  top: calc(var(--navbar-h) + var(--tabbar-h));
  z-index: 90;
}

.verify-banner span { flex: 1; }

.btn-resend {
  height: 32px;
  padding: 0 16px;
  background: none;
  color: var(--teal-dark);
  border: 1.5px solid var(--teal);
  border-radius: 6px;
  font-size: .8rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: background var(--transition), color var(--transition);
  white-space: nowrap;
  flex-shrink: 0;
}

.btn-resend:hover { background: var(--teal); color: #fff; }
.btn-resend:disabled { opacity: .5; cursor: not-allowed; }

/* ── Resend button in auth message ── */
.btn-resend-inline {
  display: inline-block;
  margin-top: 8px;
  height: 32px;
  padding: 0 16px;
  background: #fff;
  color: var(--teal);
  border: 1.5px solid var(--teal);
  border-radius: 6px;
  font-size: .8rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: background var(--transition), color var(--transition);
}

.btn-resend-inline:hover { background: var(--teal); color: #fff; }
.btn-resend-inline:disabled { opacity: .5; cursor: not-allowed; }

/* ── Verified page ── */
.verified-view {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  background: linear-gradient(160deg, var(--navy) 0%, #253849 60%, #1e2f3d 100%);
  padding: 40px 20px;
  text-align: center;
}

.verified-card {
  background: #fff;
  border-radius: 16px;
  box-shadow: var(--shadow-lg);
  padding: 48px 40px;
  max-width: 480px;
  width: 100%;
}

.verified-icon {
  font-size: 3.5rem;
  margin-bottom: 20px;
  display: block;
}

.verified-card h1 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--navy);
  margin: 0 0 10px;
}

.verified-card p {
  color: var(--grey-600);
  font-size: .95rem;
  line-height: 1.6;
  margin: 0 0 28px;
}

.verified-logo {
  margin-bottom: 32px;
}

.verified-logo img {
  height: 44px;
  width: auto;
  filter: brightness(0) invert(1);
}

/* ═══════════════════════════════════════════
   NAVBAR UPDATES — project switcher
═══════════════════════════════════════════ */
.navbar-center {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
}

.navbar-project-switcher {
  position: relative;
}

.navbar-project-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255,255,255,.07);
  border: 1px solid rgba(255,255,255,.15);
  border-radius: 8px;
  padding: 6px 14px;
  color: #fff;
  font-family: inherit;
  font-size: .875rem;
  font-weight: 500;
  cursor: pointer;
  transition: background var(--transition);
  max-width: 320px;
}

.navbar-project-btn:hover { background: rgba(255,255,255,.13); }

.project-switcher-name {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 180px;
}

.switcher-caret {
  flex-shrink: 0;
  opacity: .6;
  transition: transform var(--transition);
}

.navbar-project-btn[aria-expanded="true"] .switcher-caret { transform: rotate(180deg); }

.navbar-no-project {
  display: flex;
  align-items: center;
  gap: 6px;
  color: rgba(255,255,255,.5);
  font-size: .8rem;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
}

.navbar-no-project:hover { color: #fff; }

/* Mode badge */
.mode-badge {
  display: inline-flex;
  align-items: center;
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .04em;
  padding: 2px 7px;
  border-radius: 20px;
  white-space: nowrap;
}

.mode-badge--design {
  background: rgba(0,166,166,.2);
  color: var(--teal);
}

.mode-badge--construction {
  background: rgba(135,190,204,.2);
  color: var(--navy);
}

/* Project dropdown */
.project-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  min-width: 240px;
  background: #fff;
  border-radius: 10px;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--grey-200);
  overflow: hidden;
  z-index: 300;
}

.project-dropdown-header {
  padding: 10px 16px;
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--grey-400);
  border-bottom: 1px solid var(--grey-100);
}

.project-dropdown-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 10px 16px;
  background: none;
  border: none;
  font-family: inherit;
  font-size: .875rem;
  color: var(--grey-700);
  cursor: pointer;
  text-align: left;
  gap: 10px;
  transition: background var(--transition);
}

.project-dropdown-item:hover { background: var(--grey-50); }
.project-dropdown-item.active { color: var(--teal); font-weight: 600; }

.project-dropdown-name {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.project-dropdown-footer {
  border-top: 1px solid var(--grey-100);
  padding: 8px 16px;
}

.project-dropdown-new {
  font-size: .85rem;
  color: var(--teal);
  font-weight: 600;
  text-decoration: none;
  display: block;
  padding: 4px 0;
}

.project-dropdown-new:hover { text-decoration: underline; }

/* Sidebar locked items */
.sidebar-item--locked {
  opacity: .5;
}

.sidebar-item--locked:hover {
  background: var(--grey-50);
  color: var(--grey-700);
}

.sidebar-badge.locked {
  background: rgba(220,53,69,.1);
  color: var(--danger);
}

/* ═══════════════════════════════════════════
   NO-PROJECT BODY (projects list, wizard, invite)
═══════════════════════════════════════════ */
.no-project-body {
  display: flex;
  padding-top: calc(var(--navbar-h) + var(--tabbar-h));
  min-height: 100vh;
}

.no-project-body .app-main {
  margin-left: 0;
  max-width: 900px;
  margin: 0 auto;
  padding: 48px 32px;
  width: 100%;
}

/* ═══════════════════════════════════════════
   PROJECTS LIST
═══════════════════════════════════════════ */
.project-actions-bar {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 20px;
}

.btn-primary-action {
  display: inline-flex;
  align-items: center;
  height: 40px;
  padding: 0 20px;
  background: var(--teal);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: .9rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  text-decoration: none;
  transition: background var(--transition);
}

.btn-primary-action:hover { background: var(--teal-dark); }

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

.project-card {
  background: #fff;
  border-radius: var(--radius);
  border: 1px solid var(--grey-200);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: box-shadow var(--transition), border-color var(--transition), transform var(--transition);
}

.project-card:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--teal);
  transform: translateY(-2px);
}

.project-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.project-card-icon { font-size: 1.8rem; }

.project-card-name {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--navy);
  margin: 0 0 4px;
}

.project-card-type {
  font-size: .8rem;
  color: var(--grey-500);
  margin: 0 0 8px;
}

.project-card-desc {
  font-size: .85rem;
  color: var(--grey-600);
  margin: 0 0 14px;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.project-card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: .78rem;
  color: var(--grey-500);
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--grey-100);
}

.project-card-role {
  text-transform: capitalize;
  font-weight: 600;
  color: var(--grey-600);
}

/* Empty state */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 80px 32px;
}

.empty-state-icon { font-size: 3.5rem; margin-bottom: 20px; }

.empty-state h2 {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--navy);
  margin: 0 0 10px;
}

.empty-state p {
  font-size: .95rem;
  color: var(--grey-500);
  margin: 0 0 28px;
}

/* ═══════════════════════════════════════════
   NEW PROJECT WIZARD
═══════════════════════════════════════════ */
.wizard-container {
  max-width: 640px;
  margin: 0 auto;
}

.wizard-header {
  text-align: center;
  margin-bottom: 36px;
}

.wizard-header h1 {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--navy);
  margin: 0 0 8px;
  letter-spacing: -0.02em;
}

.wizard-header p {
  color: var(--grey-500);
  font-size: .95rem;
  margin: 0;
}

.wizard-steps {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  margin-bottom: 36px;
}

.wizard-step {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--grey-200);
  color: var(--grey-500);
  font-size: .85rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition), color var(--transition);
}

.wizard-step.active { background: var(--teal); color: #fff; }
.wizard-step.done   { background: var(--teal); color: #fff; }

.wizard-step-line {
  flex: 1;
  max-width: 60px;
  height: 2px;
  background: var(--grey-200);
}

.wizard-panel {
  background: #fff;
  border-radius: var(--radius);
  border: 1px solid var(--grey-200);
  padding: 32px;
  box-shadow: var(--shadow-sm);
}

.wizard-panel.hidden { display: none; }

.wizard-panel h2 {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--navy);
  margin: 0 0 20px;
}

.wizard-hint {
  font-size: .875rem;
  color: var(--grey-500);
  margin: -12px 0 20px;
}

.wizard-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 24px;
}

/* Mode cards */
.mode-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 8px;
}

.mode-card {
  border: 2px solid var(--grey-200);
  border-radius: 10px;
  padding: 20px;
  cursor: pointer;
  transition: border-color var(--transition), box-shadow var(--transition);
  position: relative;
}

.mode-card:hover { border-color: var(--teal); box-shadow: var(--shadow-sm); }
.mode-card.selected { border-color: var(--teal); background: rgba(0,166,166,.03); }

.mode-card--recommended { border-color: var(--teal); }
.mode-card--recommended.selected { background: rgba(0,166,166,.03); }

.mode-card-badge {
  position: absolute;
  top: -10px;
  right: 14px;
  background: var(--teal);
  color: #fff;
  font-size: .68rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 20px;
}

.mode-card-icon { font-size: 1.8rem; margin-bottom: 8px; }

.mode-card h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--navy);
  margin: 0 0 6px;
}

.mode-card p {
  font-size: .825rem;
  color: var(--grey-500);
  margin: 0 0 12px;
  line-height: 1.5;
}

.mode-features {
  list-style: none;
  padding: 0;
  margin: 0 0 12px;
  font-size: .8rem;
  color: var(--grey-600);
  line-height: 1.8;
}

.mode-features .locked { color: var(--grey-400); }

.mode-card-price {
  font-size: .8rem;
  font-weight: 700;
  color: var(--teal);
}

/* Invite rows */
.invite-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.btn-remove-invite {
  width: 32px;
  height: 32px;
  border: none;
  background: var(--grey-100);
  color: var(--grey-500);
  border-radius: 6px;
  font-size: .85rem;
  cursor: pointer;
  flex-shrink: 0;
  transition: background var(--transition), color var(--transition);
}

.btn-remove-invite:hover { background: #FADBD8; color: var(--danger); }

/* Review card */
.review-card {
  background: var(--grey-50);
  border-radius: 8px;
  padding: 20px;
  margin-bottom: 8px;
}

.review-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid var(--grey-200);
  font-size: .875rem;
}

.review-row:last-child { border-bottom: none; }
.review-row span { color: var(--grey-500); }
.review-row strong { color: var(--navy); text-align: right; max-width: 60%; word-break: break-word; }

/* ═══════════════════════════════════════════
   PROJECT DASHBOARD
═══════════════════════════════════════════ */
.page-header-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.page-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.btn-secondary-sm {
  display: inline-flex;
  align-items: center;
  height: 34px;
  padding: 0 14px;
  background: none;
  color: var(--grey-600);
  border: 1.5px solid var(--grey-300);
  border-radius: 7px;
  font-size: .82rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  text-decoration: none;
  transition: background var(--transition), border-color var(--transition);
}

.btn-secondary-sm:hover { background: var(--grey-50); border-color: var(--grey-400); }

.btn-upgrade-sm {
  display: inline-flex;
  align-items: center;
  height: 34px;
  padding: 0 14px;
  background: linear-gradient(135deg, var(--teal), var(--teal-dark));
  color: #fff;
  border: none;
  border-radius: 7px;
  font-size: .82rem;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  text-decoration: none;
  transition: opacity var(--transition);
}

.btn-upgrade-sm:hover { opacity: .9; }

.module-tag.locked-tag {
  background: rgba(220,53,69,.08);
  color: var(--danger);
}

/* ═══════════════════════════════════════════
   SETTINGS
═══════════════════════════════════════════ */
[hidden] { display: none !important; }

.settings-panel { margin-bottom: 20px; }

.settings-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.settings-member-count {
  font-size: .8rem;
  color: var(--grey-500);
  font-weight: 500;
}

.settings-subtitle {
  font-size: .85rem;
  color: var(--grey-500);
  margin: -8px 0 16px;
}

.settings-hint {
  font-size: .78rem;
  color: var(--grey-400);
  margin: 6px 0 0;
}

.settings-textarea {
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid var(--grey-300);
  border-radius: 8px;
  font-size: .9rem;
  font-family: inherit;
  color: var(--grey-900);
  background: #fff;
  resize: vertical;
  box-sizing: border-box;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.settings-textarea:focus {
  outline: none;
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(0,166,166,.15);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.settings-image-row {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
}

.project-image-preview {
  width: 64px;
  height: 64px;
  border-radius: 12px;
  background: var(--grey-100);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  overflow: hidden;
  flex-shrink: 0;
}

.project-image-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ── Members table ── */
.members-table, .invites-table {
  width: 100%;
  border-collapse: collapse;
}

.members-table th, .invites-table th {
  text-align: left;
  font-size: .75rem;
  font-weight: 600;
  color: var(--grey-500);
  text-transform: uppercase;
  letter-spacing: .03em;
  padding: 8px 10px;
  border-bottom: 1px solid var(--grey-200);
}

.members-table td, .invites-table td {
  padding: 10px;
  border-bottom: 1px solid var(--grey-100);
  font-size: .85rem;
  vertical-align: middle;
}

.members-table tr:last-child td, .invites-table tr:last-child td { border-bottom: none; }

.member-last-active { font-size: .8rem; color: var(--grey-500); }
.member-actions { text-align: right; white-space: nowrap; }
.member-actions .btn-xs { margin-left: 6px; }

.role-badge {
  display: inline-block;
  padding: 2px 9px;
  border-radius: 999px;
  font-size: .73rem;
  font-weight: 700;
  white-space: nowrap;
}

.member-role-select {
  height: 32px;
  padding: 0 8px;
  border: 1.5px solid var(--grey-300);
  border-radius: 6px;
  font-size: .82rem;
  font-family: inherit;
  color: var(--grey-700);
  background: #fff;
}

.pending-invites-section { margin-top: 8px; }

/* ── Usage tab ── */
.usage-loading {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 32px 0;
  color: var(--grey-500);
  font-size: .85rem;
}

.usage-loading .loading-spinner {
  width: 24px;
  height: 24px;
  border: 3px solid var(--grey-200);
  border-top-color: var(--teal);
}

.usage-storage-total {
  font-size: .9rem;
  color: var(--grey-700);
  margin-bottom: 10px;
}

.usage-storage-bar {
  display: flex;
  width: 100%;
  height: 14px;
  border-radius: 7px;
  overflow: hidden;
  background: var(--grey-100);
  margin-bottom: 12px;
}

.usage-storage-seg { height: 100%; }

.usage-storage-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 8px;
}

.usage-storage-legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: .8rem;
  color: var(--grey-600);
}

.usage-storage-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
}

.usage-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 14px;
  margin-top: 12px;
}

.usage-stat {
  background: var(--grey-50);
  border-radius: 8px;
  padding: 14px 16px;
}

.usage-stat-value {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--navy);
  line-height: 1.2;
}

.usage-stat-label {
  font-size: .78rem;
  color: var(--grey-500);
  margin-top: 4px;
}

/* ── Status badges (project status) ── */
.status-badge--archived { background: #F3F4F6; color: #6B7280; }

/* ── Generic modal ── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.5);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.modal-card {
  background: #fff;
  border-radius: 14px;
  max-width: 480px;
  width: 100%;
  box-shadow: 0 20px 60px rgba(0,0,0,.25);
  max-height: 90vh;
  display: flex;
  flex-direction: column;
}

.modal-card--sm { max-width: 420px; }

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 22px;
  border-bottom: 1px solid var(--grey-200);
}

.modal-header h3 { margin: 0; font-size: 1.05rem; color: var(--navy); }

.modal-close {
  background: none;
  border: none;
  font-size: 1.3rem;
  cursor: pointer;
  color: var(--grey-400);
  line-height: 1;
}

.modal-close:hover { color: var(--navy); }

.modal-body {
  padding: 20px 22px;
  overflow-y: auto;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 16px 22px;
  border-top: 1px solid var(--grey-200);
}

/* ── Danger zone ── */
.card--danger {
  border-color: #FADBD8;
}

.danger-row-action {
  display: flex;
  align-items: center;
  gap: 10px;
}

.danger-row-action input {
  height: 36px;
  padding: 0 12px;
  border: 1.5px solid var(--grey-300);
  border-radius: 7px;
  font-size: .85rem;
  font-family: inherit;
}

.settings-tabs {
  display: flex;
  gap: 2px;
  margin-bottom: 20px;
  border-bottom: 2px solid var(--grey-200);
}

.settings-tab {
  height: 38px;
  padding: 0 18px;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  font-size: .875rem;
  font-weight: 500;
  color: var(--grey-500);
  font-family: inherit;
  cursor: pointer;
  transition: color var(--transition), border-color var(--transition);
}

.settings-tab:hover { color: var(--navy); }
.settings-tab.active { color: var(--teal); border-bottom-color: var(--teal); font-weight: 600; }

.members-list { display: flex; flex-direction: column; gap: 12px; margin-bottom: 20px; }

.member-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--grey-100);
  border-radius: 8px;
}

.member-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--teal);
  color: #fff;
  font-size: .8rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.member-info { flex: 1; min-width: 0; }
.member-name { font-size: .875rem; font-weight: 600; color: var(--navy); }
.member-email { font-size: .78rem; color: var(--grey-500); }

.member-perm-select {
  height: 32px;
  padding: 0 8px;
  border: 1.5px solid var(--grey-300);
  border-radius: 6px;
  font-size: .82rem;
  font-family: inherit;
  color: var(--grey-700);
  background: #fff;
}

.btn-remove-member {
  width: 30px;
  height: 30px;
  border: none;
  background: var(--grey-100);
  color: var(--grey-400);
  border-radius: 6px;
  font-size: .8rem;
  cursor: pointer;
  flex-shrink: 0;
  transition: background var(--transition), color var(--transition);
}

.btn-remove-member:hover { background: #FADBD8; color: var(--danger); }

.danger-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 12px 0;
}

.btn-danger {
  height: 36px;
  padding: 0 18px;
  background: var(--danger);
  color: #fff;
  border: none;
  border-radius: 7px;
  font-size: .85rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  flex-shrink: 0;
  transition: opacity var(--transition);
}

.btn-danger:hover { opacity: .85; }

.btn-danger-action {
  flex-shrink: 0;
  text-decoration: none;
}

/* ═══════════════════════════════════════════
   UPGRADE PAGE
═══════════════════════════════════════════ */
.upgrade-container {
  max-width: 560px;
  margin: 0 auto;
}

.upgrade-hero {
  text-align: center;
  padding: 40px 32px 32px;
  background: linear-gradient(160deg, var(--navy) 0%, #253849 100%);
  border-radius: var(--radius) var(--radius) 0 0;
  color: #fff;
}

.upgrade-icon { font-size: 3rem; margin-bottom: 16px; }

.upgrade-hero h2 {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0 0 10px;
}

.upgrade-hero p { color: rgba(255,255,255,.7); font-size: .95rem; margin: 0; }

.upgrade-features {
  background: #fff;
  border-left: 1px solid var(--grey-200);
  border-right: 1px solid var(--grey-200);
  padding: 28px 32px;
}

.upgrade-features h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--navy);
  margin: 0 0 16px;
}

.upgrade-feature-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.upgrade-feature-item {
  background: var(--grey-50);
  border-radius: 7px;
  padding: 10px 14px;
  font-size: .875rem;
  color: var(--grey-700);
  font-weight: 500;
}

.upgrade-cta {
  background: #fff;
  border: 1px solid var(--grey-200);
  border-radius: 0 0 var(--radius) var(--radius);
  padding: 28px 32px;
  text-align: center;
}

.btn-upgrade-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 48px;
  padding: 0 32px;
  background: linear-gradient(135deg, var(--teal), var(--teal-dark));
  color: #fff;
  border: none;
  border-radius: 10px;
  font-size: 1rem;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  transition: opacity var(--transition);
  width: 100%;
  max-width: 340px;
}

.btn-upgrade-action:hover { opacity: .9; }

.upgrade-note {
  font-size: .8rem;
  color: var(--grey-400);
  margin: 12px 0 0;
}

/* ═══════════════════════════════════════════
   ACCEPT INVITATION
═══════════════════════════════════════════ */
.invitation-container {
  display: flex;
  justify-content: center;
  padding: 40px 0;
}

.invitation-card {
  background: #fff;
  border-radius: 16px;
  border: 1px solid var(--grey-200);
  padding: 40px;
  max-width: 440px;
  width: 100%;
  text-align: center;
  box-shadow: var(--shadow-md);
}

.invitation-icon { font-size: 3rem; margin-bottom: 16px; }

.invitation-card h1 {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--navy);
  margin: 0 0 12px;
}

.invitation-card p {
  color: var(--grey-600);
  font-size: .95rem;
  margin: 0 0 20px;
  line-height: 1.6;
}

/* ── Responsive ── */
@media (max-width: 900px) {
  .profile-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .app-sidebar {
    display: none;
  }

  .app-main {
    margin-left: 0;
    padding: 20px 16px;
  }

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

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

  .auth-card {
    padding: 28px 20px;
  }

  .form-row-2 {
    grid-template-columns: 1fr;
  }

  .mode-cards {
    grid-template-columns: 1fr;
  }

  .upgrade-feature-grid {
    grid-template-columns: 1fr;
  }

  .page-header-row {
    flex-direction: column;
  }

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

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

  .dashboard-main {
    padding: 24px 16px 40px;
  }

  .dashboard-header {
    flex-direction: column;
    gap: 14px;
  }

  .dashboard-header-actions {
    padding-top: 0;
  }

  .stats-row {
    gap: 10px;
  }

  .stat-pill {
    flex: 1;
    min-width: 80px;
    padding: 14px 16px;
  }

  .stat-pill-value { font-size: 1.3rem; }

  .empty-project-card-inner {
    padding: 36px 24px;
  }

  .invite-banner {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
}

/* ═══════════════════════════════════════════
   DASHBOARD HOME
═══════════════════════════════════════════ */
.dashboard-body {
  display: flex;
  padding-top: calc(var(--navbar-h) + var(--tabbar-h));
  min-height: 100vh;
  background: var(--grey-50);
}

.dashboard-main {
  margin-left: 0;
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 40px 32px 60px;
}

/* Welcome header */
.dashboard-welcome {
  margin-bottom: 8px;
}

.dashboard-welcome h1 {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--navy);
  letter-spacing: -0.025em;
  margin: 0 0 6px;
}

.dashboard-welcome p {
  font-size: 1rem;
  color: var(--grey-500);
  margin: 0;
}

.dashboard-welcome--empty {
  text-align: center;
  padding: 48px 0 20px;
}

.dashboard-welcome--empty h1 { font-size: 2rem; }

/* Invite banner */
.invite-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: #FFFBEB;
  border: 1px solid #FCD34D;
  border-radius: 10px;
  padding: 12px 20px;
  margin-bottom: 24px;
  font-size: .9rem;
  color: #92400E;
}

.invite-banner-link {
  color: #B45309;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
  flex-shrink: 0;
}

.invite-banner-link:hover { text-decoration: underline; }

/* Header row */
.dashboard-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 28px;
}

.dashboard-header-text h1 {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--navy);
  letter-spacing: -0.025em;
  margin: 0 0 4px;
}

.dashboard-header-text p {
  font-size: .9rem;
  color: var(--grey-500);
  margin: 0;
}

.dashboard-header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  padding-top: 4px;
}

/* Stats row */
.stats-row {
  display: flex;
  gap: 16px;
  margin-bottom: 36px;
  flex-wrap: wrap;
}

.stat-pill {
  background: #fff;
  border: 1px solid var(--grey-200);
  border-radius: 10px;
  padding: 16px 24px;
  box-shadow: var(--shadow-sm);
  min-width: 110px;
  text-align: center;
}

.stat-pill-value {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--navy);
  line-height: 1;
  margin-bottom: 4px;
}

.stat-pill-label {
  font-size: .78rem;
  font-weight: 500;
  color: var(--grey-500);
  text-transform: uppercase;
  letter-spacing: .04em;
}

/* Dashboard sections */
.dashboard-section {
  margin-bottom: 40px;
}

.dashboard-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.dashboard-section-header h2 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--navy);
  margin: 0;
}

/* Projects view toggle */
.proj-view-toggle { display:flex; gap:2px; }
.proj-view-btn { width:32px; height:32px; border:1px solid var(--border); background:var(--white); border-radius:6px; cursor:pointer; font-size:1rem; display:flex; align-items:center; justify-content:center; color:var(--grey-500); transition:background .15s,color .15s; }
.proj-view-btn.active { background:var(--teal); color:#fff; border-color:var(--teal); }
.proj-view-btn:hover:not(.active) { background:var(--grey-50); }
/* [hidden] overrides for project views */
.projects-tile-view[hidden],
.projects-list-view[hidden] { display:none !important; }
/* Projects list view */
.projects-list-view { background:var(--white); border:1px solid var(--border); border-radius:10px; overflow:hidden; overflow-x:auto; }
.proj-list-table { width:100%; border-collapse:collapse; font-size:.88rem; }
.proj-list-table th { padding:10px 14px; text-align:left; font-size:.72rem; font-weight:700; text-transform:uppercase; color:var(--grey-500); letter-spacing:.04em; background:var(--grey-50); border-bottom:1px solid var(--border); white-space:nowrap; }
.proj-list-sort { cursor:pointer; user-select:none; }
.proj-list-sort:hover { color:var(--teal); background:rgba(0,166,166,.04); }
.proj-list-table td { padding:10px 14px; border-bottom:1px solid var(--border); vertical-align:middle; }
.proj-list-table tr:last-child td { border-bottom:none; }
.proj-list-row { cursor:pointer; transition:background .1s; }
.proj-list-row:hover td { background:rgba(0,166,166,.03); }
.proj-list-row:nth-child(even) td { background:#FAFBFC; }
.proj-list-row:nth-child(even):hover td { background:rgba(0,166,166,.05); }
.proj-list-name-cell { display:flex; align-items:center; gap:10px; }
.proj-list-icon { font-size:1.4rem; flex-shrink:0; }
.proj-list-title { font-weight:700; color:var(--navy); font-size:.92rem; }
.proj-list-subdesc { font-size:.78rem; color:var(--grey-400); margin-top:2px; }
@media (max-width:1024px) { .proj-col-desktop { display:none; } }
@media (max-width:768px) {
  .proj-list-table th:nth-child(n+4):not(:nth-child(4)) { display:none; }
  .proj-list-table td:nth-child(n+4):not(:nth-child(4)) { display:none; }
}

/* Project cards (used on dashboard) */
.project-card-updated {
  font-size: .75rem;
  color: var(--grey-400);
}

/* Activity empty state */
.activity-empty {
  background: #fff;
  border: 1px solid var(--grey-200);
  border-radius: var(--radius);
  padding: 40px;
  text-align: center;
  box-shadow: var(--shadow-sm);
}

.activity-empty-icon {
  font-size: 2rem;
  margin-bottom: 10px;
}

.activity-empty p {
  font-size: .9rem;
  color: var(--grey-400);
  margin: 0;
}

/* Empty project card (first-time user) */
.empty-project-card {
  display: flex;
  justify-content: center;
  padding: 24px 0 40px;
}

.empty-project-card-inner {
  background: #fff;
  border: 2px dashed var(--grey-300);
  border-radius: 16px;
  padding: 48px 56px;
  text-align: center;
  max-width: 480px;
  width: 100%;
  transition: border-color var(--transition);
}

.empty-project-card-inner:hover { border-color: var(--teal); }

.empty-project-icon {
  font-size: 3rem;
  margin-bottom: 16px;
}

.empty-project-card-inner h2 {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--navy);
  margin: 0 0 10px;
}

.empty-project-card-inner p {
  font-size: .9rem;
  color: var(--grey-500);
  margin: 0 0 24px;
  line-height: 1.6;
}

.btn-primary-action--lg {
  height: 48px;
  padding: 0 32px;
  font-size: 1rem;
}

/* Navbar updates */
.navbar-tagline {
  font-size: .8rem;
  color: rgba(255,255,255,.4);
  font-weight: 500;
}

.navbar-project-btn--home {
  background: rgba(255,255,255,.06);
}

/* Dropdown extras */
.project-dropdown-home {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  font-size: .875rem;
  color: var(--teal);
  font-weight: 600;
  text-decoration: none;
  border-bottom: 1px solid var(--grey-100);
  transition: background var(--transition);
}

.project-dropdown-home:hover { background: var(--grey-50); }

.project-dropdown-divider {
  height: 1px;
  background: var(--grey-100);
  margin: 4px 0;
}

.project-dropdown-empty {
  padding: 12px 16px;
  font-size: .85rem;
  color: var(--grey-400);
  text-align: center;
}

/* ═══════════════════════════════════════════
   INVITATIONS LIST PAGE
═══════════════════════════════════════════ */
.invitations-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-width: 680px;
}

.invitation-list-card {
  background: #fff;
  border: 1px solid var(--grey-200);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--transition);
}

.invitation-list-card:hover {
  box-shadow: var(--shadow-md);
}

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

.invitation-list-project-name {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--navy);
  margin: 0 0 6px;
}

.invitation-list-role {
  flex-shrink: 0;
}

.invitation-perm-badge {
  display: inline-flex;
  align-items: center;
  background: rgba(0,166,166,.1);
  color: var(--teal);
  font-size: .75rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 20px;
  text-transform: capitalize;
}

.invitation-list-meta {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
  margin-bottom: 18px;
  padding: 14px 0;
  border-top: 1px solid var(--grey-100);
  border-bottom: 1px solid var(--grey-100);
}

.invitation-meta-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: .85rem;
  color: var(--grey-700);
}

.invitation-meta-label {
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--grey-400);
}

.invitation-list-actions {
  display: flex;
  gap: 10px;
  margin-top: 16px;
}

.invitation-list-actions .btn-save {
  height: 38px;
  padding: 0 20px;
  font-size: .875rem;
}

.invitation-list-actions .btn-secondary {
  height: 38px;
  padding: 0 18px;
  font-size: .875rem;
}

.invitation-msg {
  min-height: 0;
}

/* Banner dismiss button */
.invite-banner-dismiss {
  background: none;
  border: none;
  color: #92400E;
  font-size: .85rem;
  cursor: pointer;
  padding: 2px 4px;
  border-radius: 4px;
  line-height: 1;
  opacity: .7;
  transition: opacity var(--transition);
}

.invite-banner-dismiss:hover { opacity: 1; }

/* ── Form select base (wizard + settings) ── */
.wizard-panel select,
.settings-panel select,
.form-group select {
  width: 100%;
  height: 44px;
  padding: 0 12px;
  border: 1.5px solid var(--grey-300);
  border-radius: 8px;
  font-size: .9rem;
  font-family: inherit;
  color: var(--grey-900);
  background: #fff;
  box-sizing: border-box;
  transition: border-color var(--transition), box-shadow var(--transition);
  appearance: auto;
}

.wizard-panel select:focus,
.settings-panel select:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(0,166,166,.15);
}

/* ═══════════════════════════════════════════
   DRAWING REGISTER MODULE
═══════════════════════════════════════════ */

/* ── Module header ── */
.dr-module { padding: 0; }

.dr-module-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  gap: 12px;
  flex-wrap: wrap;
}

.dr-module-header h1 {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--navy);
  letter-spacing: -0.02em;
}

/* ── Action bar ── */
.dr-action-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.dr-search {
  flex: 1;
  min-width: 180px;
  height: 38px;
  padding: 0 12px 0 36px;
  border: 1.5px solid var(--grey-300);
  border-radius: 8px;
  font-size: .9rem;
  font-family: inherit;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' viewBox='0 0 24 24' stroke='%23adb5bd' stroke-width='2'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cpath d='m21 21-4.35-4.35'/%3E%3C/svg%3E") no-repeat 10px center;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.dr-search:focus { outline: none; border-color: var(--teal); box-shadow: 0 0 0 3px rgba(0,166,166,.15); }

.dr-filter {
  height: 38px;
  padding: 0 10px;
  border: 1.5px solid var(--grey-300);
  border-radius: 8px;
  font-size: .88rem;
  font-family: inherit;
  background: #fff;
  cursor: pointer;
  transition: border-color var(--transition);
}
.dr-filter:focus { outline: none; border-color: var(--teal); }

.dr-view-toggle {
  display: flex;
  border: 1.5px solid var(--grey-300);
  border-radius: 8px;
  overflow: hidden;
}

.dr-view-btn {
  padding: 0 12px;
  height: 38px;
  border: none;
  background: #fff;
  cursor: pointer;
  font-size: .9rem;
  color: var(--grey-600);
  transition: background var(--transition), color var(--transition);
}
.dr-view-btn.active { background: var(--navy); color: #fff; }
.dr-view-btn + .dr-view-btn { border-left: 1.5px solid var(--grey-300); }

/* ── Stats row ── */
.dr-stats {
  display: flex;
  gap: 12px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.dr-stat {
  background: #fff;
  border: 1px solid var(--grey-200);
  border-radius: 10px;
  padding: 14px 20px;
  min-width: 100px;
}

.dr-stat-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--navy);
  line-height: 1;
}

.dr-stat-label {
  font-size: .78rem;
  color: var(--grey-600);
  margin-top: 4px;
}

/* ── Drawing grid ── */
.dr-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
}

.dr-card {
  background: #fff;
  border: 1px solid var(--grey-200);
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
  transition: box-shadow var(--transition), transform var(--transition), border-color var(--transition);
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
}
.dr-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); border-color: var(--teal); }

.dr-card-thumb {
  height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  position: relative;
}

.dr-card-body {
  padding: 14px 16px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.dr-card-number {
  font-size: .85rem;
  font-weight: 700;
  color: var(--navy);
  font-family: monospace;
}

.dr-card-number--superseded {
  text-decoration: line-through;
  opacity: .6;
}

.dr-card-title {
  font-size: .88rem;
  color: var(--grey-700);
  line-height: 1.4;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.dr-card-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: auto;
  padding-top: 8px;
  flex-wrap: wrap;
}

.dr-card-date {
  font-size: .75rem;
  color: var(--grey-500);
  margin-left: auto;
}

/* ── Drawing list (table) ── */
.dr-table-wrap {
  background: #fff;
  border: 1px solid var(--grey-200);
  border-radius: 12px;
  overflow: auto;
}

.dr-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .88rem;
}

.dr-table th {
  padding: 12px 16px;
  text-align: left;
  font-size: .75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--grey-600);
  border-bottom: 1px solid var(--grey-200);
  white-space: nowrap;
  background: var(--grey-50);
}

.dr-table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--grey-100);
  vertical-align: middle;
}

.dr-table tr:last-child td { border-bottom: none; }

.dr-table tr:hover td { background: var(--grey-50); cursor: pointer; }

.dr-table .dr-num { font-family: monospace; font-weight: 600; color: var(--navy); }

/* ── Discipline & status badges ── */
.disc-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: .72rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: .04em;
  white-space: nowrap;
}

.disc-ARC { background: #8B5CF6; }
.disc-STR { background: #EF4444; }
.disc-CIV { background: #F59E0B; }
.disc-MEC { background: #3B82F6; }
.disc-ELE { background: #ca8a04; color: #fff; }
.disc-PLU { background: #06B6D4; }
.disc-FIR { background: #DC2626; }
.disc-LAN { background: #10B981; }
.disc-INT { background: #EC4899; }
.disc-SUR { background: #6366F1; }
.disc-GEO { background: #92400E; }
.disc-OTH { background: #6B7280; }

.status-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: .72rem;
  font-weight: 700;
  white-space: nowrap;
}

.status-draft      { background: #F3F4F6; color: #6B7280; }
.status-ifc        { background: #D1FAE5; color: #065F46; }
.status-ift        { background: #DBEAFE; color: #1E40AF; }
.status-ifa        { background: #FEF3C7; color: #92400E; }
.status-as-built   { background: #064E3B; color: #A7F3D0; }
.status-superseded { background: #FEE2E2; color: #991B1B; }

/* ── Empty state ── */
.dr-empty {
  text-align: center;
  padding: 80px 24px;
  color: var(--grey-500);
}

.dr-empty-icon { font-size: 3rem; margin-bottom: 16px; }
.dr-empty h2 { font-size: 1.2rem; color: var(--grey-700); margin-bottom: 8px; }
.dr-empty p  { font-size: .9rem; margin-bottom: 24px; }

/* ═══════════════════════════════════════════
   UPLOAD WIZARD
═══════════════════════════════════════════ */
.dr-wizard {
  max-width: 900px;
  margin: 0 auto;
}

.dr-wizard-header {
  margin-bottom: 32px;
}

.dr-wizard-header h1 {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 4px;
}

.dr-wizard-header p { color: var(--grey-600); font-size: .9rem; margin-bottom: 20px; }

/* ── Drop zone ── */
.drop-zone {
  border: 2px dashed var(--grey-300);
  border-radius: 14px;
  padding: 60px 24px;
  text-align: center;
  cursor: pointer;
  transition: border-color var(--transition), background var(--transition);
  background: var(--grey-50);
}

.drop-zone:hover, .drop-zone.dragover {
  border-color: var(--teal);
  background: rgba(0,166,166,.04);
}

.drop-zone-icon { font-size: 3rem; margin-bottom: 12px; }

.drop-zone p {
  color: var(--grey-600);
  font-size: .95rem;
}

.drop-zone button {
  background: none;
  border: none;
  color: var(--teal);
  font-weight: 600;
  cursor: pointer;
  font-size: inherit;
  padding: 0;
  text-decoration: underline;
}

.drop-zone-hint {
  font-size: .8rem !important;
  color: var(--grey-500) !important;
  margin-top: 8px;
}

/* ── File selected state ── */
.dr-file-selected {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #fff;
  border: 1.5px solid var(--grey-200);
  border-radius: 10px;
  padding: 16px;
  margin-bottom: 16px;
}

.dr-file-icon { font-size: 2rem; flex-shrink: 0; }

.dr-file-meta { flex: 1; min-width: 0; }
.dr-file-name { display: block; font-weight: 600; color: var(--navy); font-size: .9rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dr-file-size { font-size: .8rem; color: var(--grey-500); }

.dr-file-remove {
  background: none;
  border: none;
  color: var(--grey-500);
  cursor: pointer;
  font-size: 1rem;
  padding: 4px;
  border-radius: 4px;
  transition: color var(--transition);
}
.dr-file-remove:hover { color: var(--danger); }

/* ── Progress bar ── */
.dr-upload-progress {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.dr-progress-bar {
  flex: 1;
  height: 8px;
  background: var(--grey-200);
  border-radius: 999px;
  overflow: hidden;
}

.dr-progress-fill {
  height: 100%;
  background: var(--teal);
  border-radius: 999px;
  transition: width 0.2s ease;
  width: 0%;
}

.dr-progress-pct { font-size: .85rem; font-weight: 600; color: var(--teal); min-width: 36px; text-align: right; }

/* ── AI / Manual choice ── */
.dr-ai-choice {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 24px;
}

.dr-choice-card {
  background: #fff;
  border: 2px solid var(--grey-200);
  border-radius: 14px;
  padding: 28px 24px;
  cursor: pointer;
  text-align: center;
  transition: border-color var(--transition), box-shadow var(--transition), transform var(--transition);
  font-family: inherit;
}

.dr-choice-card:hover {
  border-color: var(--teal);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.dr-choice-card:first-child { border-color: var(--teal); background: rgba(0,166,166,.03); }

.dr-choice-icon { font-size: 2.5rem; margin-bottom: 12px; }
.dr-choice-card h3 { font-size: 1.1rem; font-weight: 700; color: var(--navy); margin-bottom: 6px; }
.dr-choice-card p  { font-size: .88rem; color: var(--grey-600); line-height: 1.5; margin-bottom: 10px; }
.dr-choice-badge {
  display: inline-block;
  padding: 3px 10px;
  background: rgba(0,166,166,.12);
  color: var(--teal-dark);
  border-radius: 999px;
  font-size: .75rem;
  font-weight: 600;
}

/* ── Extracting state ── */
.dr-extracting {
  text-align: center;
  padding: 80px 24px;
  color: var(--grey-600);
}

.dr-extracting .loading-spinner {
  margin: 0 auto 20px;
  border-top-color: var(--teal);
}

.dr-extracting p { font-size: 1rem; }

/* ── Review layout ── */
.dr-review-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  align-items: start;
}

.dr-pdf-preview {
  width: 100%;
  height: 500px;
  border: 1px solid var(--grey-200);
  border-radius: 10px;
  background: var(--grey-100);
}

.dr-form-col { display: flex; flex-direction: column; gap: 0; }

.dr-ai-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: rgba(0,166,166,.1);
  border: 1px solid rgba(0,166,166,.25);
  border-radius: 8px;
  font-size: .82rem;
  color: var(--teal-dark);
  font-weight: 600;
  margin-bottom: 16px;
}

.dr-revision-alert {
  padding: 12px 14px;
  background: #FEF3C7;
  border: 1px solid #F59E0B;
  border-radius: 8px;
  font-size: .88rem;
  color: #92400E;
  margin-bottom: 16px;
  line-height: 1.5;
}

/* ── Success step ── */
.dr-success {
  text-align: center;
  padding: 80px 24px;
}

.dr-success-icon { font-size: 4rem; margin-bottom: 16px; }
.dr-success h2 { font-size: 1.4rem; font-weight: 700; color: var(--navy); margin-bottom: 8px; }
.dr-success p  { color: var(--grey-600); font-size: .95rem; margin-bottom: 28px; }

.dr-success-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
}

/* ═══════════════════════════════════════════
   DRAWING DETAIL VIEW
═══════════════════════════════════════════ */
.dr-detail {}

.dr-detail-topbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.dr-detail-title-group {}
.dr-detail-number {
  font-size: 1rem;
  font-weight: 700;
  font-family: monospace;
  color: var(--grey-600);
  margin-bottom: 4px;
}
.dr-detail-name {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--navy);
  letter-spacing: -0.01em;
}

.dr-detail-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.dr-superseded-banner {
  background: #FEF3C7;
  border: 1px solid #F59E0B;
  border-radius: 10px;
  padding: 12px 18px;
  margin-bottom: 20px;
  font-size: .9rem;
  color: #92400E;
  font-weight: 500;
}

.dr-superseded-banner a { color: #92400E; text-decoration: underline; cursor: pointer; }

.dr-detail-layout {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 20px;
  align-items: start;
}

.dr-viewer-col {}

.dr-viewer-frame {
  width: 100%;
  height: calc(100vh - 260px);
  min-height: 400px;
  border: 1px solid var(--grey-200);
  border-radius: 12px;
  background: var(--grey-100);
}

.dr-meta-col {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.dr-meta-card {
  background: #fff;
  border: 1px solid var(--grey-200);
  border-radius: 12px;
  padding: 20px;
}

.dr-meta-card h3 {
  font-size: .78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--grey-500);
  margin-bottom: 14px;
}

.dr-meta-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
  padding: 8px 0;
  border-bottom: 1px solid var(--grey-100);
  font-size: .88rem;
}

.dr-meta-row:last-child { border-bottom: none; }

.dr-meta-label { color: var(--grey-600); font-weight: 500; flex-shrink: 0; }
.dr-meta-value { color: var(--navy); font-weight: 500; text-align: right; }

.dr-rev-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid var(--grey-100);
  font-size: .85rem;
  cursor: pointer;
}

.dr-rev-item:last-child { border-bottom: none; }
.dr-rev-item:hover { color: var(--teal); }

.dr-rev-badge {
  font-family: monospace;
  font-size: .75rem;
  font-weight: 700;
  padding: 2px 6px;
  background: var(--grey-100);
  border-radius: 4px;
}

.dr-rev-current { background: var(--teal); color: #fff; }

/* ── Shared button helpers ── */
.btn-save {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 44px;
  padding: 0 22px;
  background: var(--teal);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: .95rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: background var(--transition), transform var(--transition);
  text-decoration: none;
}
.btn-save:hover { background: var(--teal-dark); }
.btn-save:disabled { opacity: .6; cursor: not-allowed; }

.btn-secondary-sm {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 38px;
  padding: 0 16px;
  background: #fff;
  color: var(--navy);
  border: 1.5px solid var(--grey-300);
  border-radius: 8px;
  font-size: .88rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: border-color var(--transition), background var(--transition);
  text-decoration: none;
}
.btn-secondary-sm:hover { border-color: var(--teal); color: var(--teal); }

.btn-danger-sm {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 38px;
  padding: 0 16px;
  background: #fff;
  color: var(--danger);
  border: 1.5px solid var(--danger);
  border-radius: 8px;
  font-size: .88rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: background var(--transition);
}
.btn-danger-sm:hover { background: #fff3f4; }

/* ── Responsive ── */
@media (max-width: 900px) {
  .dr-review-layout { grid-template-columns: 1fr; }
  .dr-pdf-preview   { height: 320px; }
  .dr-detail-layout { grid-template-columns: 1fr; }
  .dr-viewer-frame  { height: 360px; min-height: 280px; }
  .dr-ai-choice     { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .dr-grid { grid-template-columns: 1fr 1fr; }
  .dr-action-bar { flex-direction: column; align-items: stretch; }
  .dr-search { min-width: 0; }
}

@media (max-width: 420px) {
  .dr-grid { grid-template-columns: 1fr; }
}

/* ── Upload queue ── */
.dr-queue-list { display: flex; flex-direction: column; gap: 8px; }

.dr-queue-item {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 14px;
  background: var(--grey-50); border: 1.5px solid var(--grey-200);
  border-radius: 8px; font-size: .88rem;
}
.dr-queue-item.success { border-color: #10B981; background: #F0FDF4; }
.dr-queue-item.error   { border-color: var(--danger); background: #FFF5F5; }
.dr-queue-item.warn    { border-color: #F59E0B; background: #FFFBEB; }

.dr-q-icon { font-size: 1.2rem; flex-shrink: 0; }
.dr-q-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.dr-q-name { font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dr-q-size { font-size: .78rem; color: var(--grey-500); }
.dr-q-status { font-size: .85rem; font-weight: 600; color: var(--grey-500); flex-shrink: 0; }
.dr-queue-item.success .dr-q-status { color: #10B981; }
.dr-queue-item.error   .dr-q-status { color: var(--danger); }

.dr-q-remove {
  background: none; border: none; cursor: pointer; color: var(--grey-400);
  font-size: .9rem; padding: 2px 6px; border-radius: 4px; flex-shrink: 0;
}
.dr-q-remove:hover { color: var(--danger); background: #FEE2E2; }

/* ── Batch review cards ── */
.dr-review-card {
  border: 1.5px solid var(--grey-200); border-radius: 10px;
  padding: 16px; margin-bottom: 12px; background: #fff;
}
.dr-review-hd {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 12px; flex-wrap: wrap; gap: 8px;
  font-size: .88rem;
}
.dr-rv-row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 10px; }
.dr-rv-row4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.dr-rv-col label {
  display: block; font-size: .78rem; font-weight: 500;
  color: var(--grey-600); margin-bottom: 4px;
}
.dr-rv-inp {
  width: 100%; padding: 7px 10px; box-sizing: border-box;
  border: 1.5px solid var(--grey-300); border-radius: 6px;
  font-size: .85rem; font-family: inherit;
  background: #fff; color: var(--grey-900);
}
.dr-rv-inp:focus { outline: none; border-color: var(--teal); }
.dr-rv-inp:disabled { background: var(--grey-50); color: var(--grey-500); cursor: default; }

@media (max-width: 700px) {
  .dr-rv-row2 { grid-template-columns: 1fr; }
  .dr-rv-row4 { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 420px) {
  .dr-rv-row4 { grid-template-columns: 1fr; }
}

/* ═══ Phase 2.3.2 — Drawing Register Table View ═══ */

/* Filter bar */
.dr-filter-bar {
  display: flex; justify-content: space-between; align-items: center;
  gap: 10px; flex-wrap: wrap;
  padding: 12px 0; border-bottom: 1px solid var(--grey-200); margin-bottom: 12px;
}
.dr-fb-left  { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; flex: 1; }
.dr-fb-right { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }

.dr-search-wrap { position: relative; }
.dr-search { height: 34px; padding: 0 12px; border: 1.5px solid var(--grey-300); border-radius: 8px; font-size: .88rem; width: 220px; font-family: inherit; }
.dr-search:focus { outline: none; border-color: var(--teal); }

/* Dropdown filters */
.dr-fdd { position: relative; }
.dr-fdd-btn {
  height: 34px; padding: 0 14px; border: 1.5px solid var(--grey-300);
  border-radius: 8px; background: #fff; font-size: .85rem; cursor: pointer;
  font-family: inherit; white-space: nowrap;
}
.dr-fdd-btn:hover, .dr-fdd-btn.active { border-color: var(--teal); color: var(--teal); }
.dr-fdd-menu {
  position: absolute; top: calc(100% + 4px); left: 0; z-index: 100;
  background: #fff; border: 1.5px solid var(--grey-200); border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0,0,0,.12); min-width: 220px; overflow: hidden;
}
.dr-fdd-opts { padding: 8px 4px; max-height: 260px; overflow-y: auto; }
.dr-fdd-foot { padding: 6px 12px; border-top: 1px solid var(--grey-100); }
.dr-fdd-foot button { background: none; border: none; color: var(--teal); font-size: .82rem; cursor: pointer; padding: 0; }
.dr-flt-opt {
  display: flex; align-items: center; gap: 8px; padding: 6px 12px;
  cursor: pointer; font-size: .85rem; border-radius: 6px;
}
.dr-flt-opt:hover { background: var(--grey-50); }
.dr-flt-opt input { margin: 0; cursor: pointer; }
.dr-flt-dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }

/* Hide superseded toggle */
.dr-toggle-lbl { display: flex; align-items: center; gap: 6px; font-size: .85rem; cursor: pointer; color: var(--grey-600); white-space: nowrap; }
.dr-toggle-lbl input { cursor: pointer; }

/* Active filter chips */
.dr-active-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; align-items: center; }
.dr-chip {
  display: inline-flex; align-items: center; gap: 4px;
  background: #EEF9FF; border: 1px solid #B6E3F4; color: #0369A1;
  border-radius: 20px; padding: 2px 10px; font-size: .8rem;
}
.dr-chip button { background: none; border: none; cursor: pointer; color: inherit; padding: 0; line-height: 1; font-size: .9rem; }
.dr-chip-rst { background: none; border: none; color: var(--danger); font-size: .82rem; cursor: pointer; padding: 0 4px; }

/* Export button */
.dr-export-wrap { position: relative; }
.dr-export-menu {
  position: absolute; right: 0; top: calc(100% + 4px); z-index: 100;
  background: #fff; border: 1.5px solid var(--grey-200); border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0,0,0,.12); min-width: 200px; overflow: hidden;
}
.dr-export-menu button {
  display: block; width: 100%; text-align: left; background: none;
  border: none; padding: 10px 16px; font-size: .88rem; cursor: pointer;
  font-family: inherit; color: var(--grey-800);
}
.dr-export-menu button:hover { background: var(--grey-50); }

/* Main table */
.dr-table { width: 100%; border-collapse: collapse; font-size: .875rem; }
.dr-table thead th {
  background: var(--grey-50); padding: 9px 12px; text-align: left;
  font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em;
  color: var(--grey-500); border-bottom: 2px solid var(--grey-200); white-space: nowrap;
  position: sticky; top: 0; z-index: 1;
}
.dr-th-s { cursor: pointer; user-select: none; }
.dr-th-s:hover { color: var(--grey-700); }
.dr-th-cb { width: 40px; }
.dr-si { color: var(--teal); font-weight: 700; }

.dr-table tbody tr.dr-row { border-bottom: 1px solid var(--grey-100); cursor: pointer; transition: background .1s; }
.dr-table tbody tr.dr-row:hover   { background: #F0FAFB; }
.dr-table tbody tr.dr-row.selected{ background: #E6F7F7; }
.dr-table tbody tr.dr-row:nth-child(even) { background: var(--grey-50); }
.dr-table tbody tr.dr-row:nth-child(even):hover   { background: #F0FAFB; }
.dr-table tbody tr.dr-row:nth-child(even).selected{ background: #E6F7F7; }

.dr-table td { padding: 9px 12px; vertical-align: middle; }
.dr-td-cb   { width: 40px; }
.dr-td-title{ max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dr-td-date { white-space: nowrap; color: var(--grey-500); font-size: .82rem; }
.dr-td-act  { white-space: nowrap; }
.dr-td-revs { white-space: nowrap; }
.dr-num a   { color: var(--teal); font-weight: 600; text-decoration: none; }
.dr-num a:hover { text-decoration: underline; }

/* Revision chips */
.dr-rev-chip {
  display: inline-block; padding: 2px 8px; border-radius: 12px; font-size: .75rem; font-weight: 600;
  border: 1.5px solid var(--grey-200); background: var(--grey-50); color: var(--grey-600);
  text-decoration: none; margin-right: 3px; cursor: pointer; white-space: nowrap;
  transition: border-color .15s;
}
.dr-rev-chip:hover          { border-color: var(--teal); color: var(--teal); }
.dr-rev-chip.latest         { border-color: var(--teal); background: #E6F7F7; color: var(--teal); }
.dr-rev-chip.sup            { opacity: .45; text-decoration: line-through; }
.dr-rev-ell                 { font-size: .75rem; color: var(--grey-400); margin: 0 3px; }

/* Bulk action bar */
.dr-bulk-bar {
  position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%);
  background: var(--navy); color: #fff; border-radius: 12px;
  padding: 10px 20px; display: flex; align-items: center; gap: 12px;
  box-shadow: 0 8px 32px rgba(0,0,0,.25); z-index: 200; white-space: nowrap;
  font-size: .88rem;
}
.dr-bulk-bar[hidden] { display: none !important; }
.dr-bulk-clear { background: none; border: none; color: rgba(255,255,255,.6); cursor: pointer; font-size: .85rem; }
.dr-bulk-clear:hover { color: #fff; }

/* Print styles */
@media print {
  .app-sidebar, .app-navbar, .dr-filter-bar, .dr-bulk-bar,
  .dr-active-chips, .dr-module-header .btn-save,
  .dr-td-cb, .dr-td-act, thead th:first-child, thead th:last-child { display: none !important; }
  .dr-table { font-size: 11pt; }
  .dr-table thead th { background: #eee !important; }
  .app-body { display: block !important; }
  .app-main { padding: 0 !important; }
}

@media (max-width: 900px) {
  .dr-search { width: 160px; }
  .dr-td-date { display: none; }
}
@media (max-width: 640px) {
  .dr-filter-bar { flex-direction: column; align-items: flex-start; }
  .dr-fb-left { width: 100%; }
  .dr-search  { width: 100%; }
  .dr-td-revs, .dr-table thead th:nth-child(5) { display: none; }
  .dr-bulk-bar { left: 12px; right: 12px; transform: none; width: auto; flex-wrap: wrap; }
}

/* ── Duplicate revision alert (upload wizard Panel 5) ── */
.dr-review-conflict { border-color: #F59E0B !important; }
.dr-dup-alert {
  background: #FFFBEB;
  border: 1.5px solid #F59E0B;
  border-radius: 8px;
  padding: 12px 14px;
  margin-bottom: 12px;
}
.dr-dup-hd {
  font-weight: 700;
  font-size: .85rem;
  color: #92400E;
  margin-bottom: 6px;
}
.dr-dup-info {
  font-size: .8rem;
  color: var(--grey-600);
  margin-bottom: 10px;
}
.dr-dup-choices { display: flex; flex-direction: column; gap: 7px; }
.dr-dup-opt {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: .82rem;
  cursor: pointer;
  color: var(--grey-700);
}
.dr-dup-opt input[type="radio"] { margin-top: 2px; flex-shrink: 0; }
.dr-dup-opt span strong { color: var(--navy); }

/* ── Revision chip hover tooltip ── */
.dr-rev-tooltip {
  position: fixed;
  z-index: 9999;
  background: #1F2937;
  color: #fff;
  border-radius: 8px;
  padding: 10px 13px;
  font-size: .78rem;
  line-height: 1.55;
  pointer-events: none;
  max-width: 230px;
  box-shadow: 0 4px 20px rgba(0,0,0,.3);
}
.dr-rev-tooltip::after {
  content: '';
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
}
.dr-rev-tooltip:not(.below)::after {
  top: 100%;
  border-top: 6px solid #1F2937;
}
.dr-rev-tooltip.below::after {
  bottom: 100%;
  border-bottom: 6px solid #1F2937;
}
.dr-tip-row { margin-bottom: 2px; }
.dr-tip-dim { color: #6B7280; font-style: italic; }
.dr-tip-hint {
  margin-top: 6px;
  color: #9CA3AF;
  font-style: italic;
  font-size: .72rem;
}
.dr-date-fallback { color: var(--grey-400); font-style: italic; }

/* ════════════════════════════════════════════
   NOTIFICATION PANEL + BELL
   ════════════════════════════════════════════ */
.navbar-bell { position: relative; }
.navbar-bell-badge {
  position: absolute;
  top: 4px; right: 4px;
  min-width: 16px; height: 16px;
  border-radius: 8px;
  background: var(--danger, #DC2626);
  color: #fff;
  font-size: .62rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 3px;
  pointer-events: none;
}
.navbar-bell-badge[hidden] { display: none !important; }

.notif-panel {
  position: fixed;
  top: 56px;
  right: 12px;
  width: 360px;
  max-height: 480px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0,0,0,.18);
  border: 1px solid var(--border, #E5E7EB);
  z-index: 2000;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.notif-panel[hidden] { display: none !important; }
.notif-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border, #E5E7EB);
  font-weight: 600;
  font-size: .9rem;
  flex-shrink: 0;
}
.notif-mark-all {
  background: none;
  border: none;
  color: var(--teal, #0D9488);
  font-size: .78rem;
  cursor: pointer;
  padding: 0;
}
.notif-mark-all:hover { text-decoration: underline; }
.notif-list { overflow-y: auto; flex: 1; }
.notif-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 16px;
  border-bottom: 1px solid #F3F4F6;
  cursor: pointer;
  transition: background .12s;
}
.notif-item:last-child { border-bottom: none; }
.notif-item:hover { background: #F9FAFB; }
.notif-item.unread { background: rgba(0,166,166,.04); }
.notif-icon { font-size: 1.1rem; flex-shrink: 0; margin-top: 1px; }
.notif-body { flex: 1; min-width: 0; }
.notif-title { font-size: .83rem; font-weight: 600; margin-bottom: 2px; color: var(--navy, #1E3A5F); }
.notif-msg { font-size: .76rem; color: var(--grey-500, #6B7280); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.notif-time { font-size: .7rem; color: var(--grey-400, #9CA3AF); margin-top: 3px; }
.notif-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--teal, #0D9488);
  flex-shrink: 0;
  margin-top: 5px;
}
.notif-empty {
  padding: 40px 16px;
  text-align: center;
  color: var(--grey-400, #9CA3AF);
  font-size: .88rem;
}
.notif-loading { padding: 24px 16px; text-align: center; color: var(--grey-400, #9CA3AF); font-size: .85rem; }

/* ════════════════════════════════════════════
   TRANSMITTAL REGISTER
   ════════════════════════════════════════════ */
.tx-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .85rem;
}
.tx-table th {
  background: var(--navy, #1E3A5F);
  color: #fff;
  padding: 10px 12px;
  text-align: left;
  font-weight: 600;
  font-size: .8rem;
  white-space: nowrap;
}
.tx-table td {
  padding: 10px 12px;
  border-bottom: 1px solid #F3F4F6;
  vertical-align: middle;
}
.tx-row { cursor: pointer; transition: background .12s; }
.tx-row:hover { background: #F9FAFB; }
.tx-row-pending { background: rgba(0,166,166,.04); }
.tx-td-subject { max-width: 220px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tx-status-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: .75rem;
  font-weight: 600;
  white-space: nowrap;
}
.tx-urgent-chip {
  display: inline-block;
  padding: 1px 6px;
  border-radius: 6px;
  background: #FEE2E2;
  color: #991B1B;
  font-size: .72rem;
  font-weight: 700;
}
.tx-ack-mini {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: .75rem;
  color: var(--grey-500, #6B7280);
}
.tx-ack-bar {
  width: 60px; height: 5px;
  background: #E5E7EB;
  border-radius: 3px;
  overflow: hidden;
}
.tx-ack-fill {
  height: 100%;
  background: var(--teal, #0D9488);
  border-radius: 3px;
  transition: width .3s;
}
.tx-pending-banner {
  background: rgba(0,166,166,.06);
  border: 1.5px solid var(--teal, #0D9488);
  border-radius: 8px;
  padding: 12px 16px;
  font-size: .85rem;
  margin-bottom: 18px;
  color: var(--grey-700, #374151);
}

/* ════════════════════════════════════════════
   TRANSMITTAL WIZARD
   ════════════════════════════════════════════ */
.tx-wizard {
  max-width: 720px;
  margin: 0 auto;
  padding: 28px 32px;
}
.tx-steps {
  display: flex;
  align-items: center;
  gap: 0;
  margin-bottom: 28px;
}
.tx-step-item {
  display: flex;
  align-items: center;
  gap: 8px;
}
.tx-step-dot {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: #E5E7EB;
  color: #9CA3AF;
  font-size: .78rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all .2s;
}
.tx-step-item.active .tx-step-dot {
  background: var(--teal, #0D9488);
  color: #fff;
}
.tx-step-item.done .tx-step-dot {
  background: var(--navy, #1E3A5F);
  color: #fff;
}
.tx-step-label {
  font-size: .82rem;
  color: #9CA3AF;
  font-weight: 500;
}
.tx-step-item.active .tx-step-label { color: var(--teal, #0D9488); font-weight: 600; }
.tx-step-item.done .tx-step-label { color: var(--navy, #1E3A5F); }
.tx-step-line {
  flex: 1;
  height: 2px;
  background: #E5E7EB;
  min-width: 24px;
  margin: 0 4px;
}

.tx-wiz-card {
  background: #fff;
  border: 1px solid var(--border, #E5E7EB);
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 20px;
  min-height: 240px;
}
.tx-wiz-footer {
  padding: 4px 0;
}
.tx-step-hd {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}
.tx-step-hd h2 { margin: 0; font-size: 1.1rem; }
.tx-sel-count {
  font-size: .82rem;
  color: var(--teal, #0D9488);
  font-weight: 600;
  background: rgba(0,166,166,.08);
  padding: 3px 10px;
  border-radius: 10px;
}

/* Drawing list in wizard */
.tx-draw-list { display: flex; flex-direction: column; gap: 4px; max-height: 360px; overflow-y: auto; }
.tx-draw-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: 8px;
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: all .12s;
  background: #F9FAFB;
}
.tx-draw-item:hover { background: #F3F4F6; }
.tx-draw-item.checked { border-color: var(--teal, #0D9488); background: rgba(0,166,166,.06); }
.tx-draw-item input[type="checkbox"] { flex-shrink: 0; }
.tx-draw-num { font-weight: 700; font-size: .82rem; color: var(--navy, #1E3A5F); min-width: 80px; }
.tx-draw-title { flex: 1; font-size: .83rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tx-draw-meta { font-size: .74rem; color: var(--grey-400, #9CA3AF); white-space: nowrap; }

/* Member list in wizard */
.tx-member-list { display: flex; flex-direction: column; gap: 4px; max-height: 360px; overflow-y: auto; }
.tx-member-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: all .12s;
  background: #F9FAFB;
}
.tx-member-item:hover { background: #F3F4F6; }
.tx-member-item.checked { border-color: var(--teal, #0D9488); background: rgba(0,166,166,.06); }
.tx-member-item input[type="checkbox"] { flex-shrink: 0; }
.tx-memb-avatar {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--navy, #1E3A5F);
  color: #fff;
  font-size: .75rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.tx-memb-info { flex: 1; min-width: 0; }
.tx-memb-name { display: block; font-size: .84rem; font-weight: 600; }
.tx-memb-email { display: block; font-size: .75rem; color: var(--grey-500, #6B7280); }
.tx-memb-role {
  font-size: .72rem;
  color: var(--grey-500, #6B7280);
  background: #E5E7EB;
  padding: 2px 7px;
  border-radius: 8px;
  white-space: nowrap;
}

/* Review step */
.tx-review-card {
  background: #F9FAFB;
  border: 1px solid #E5E7EB;
  border-radius: 8px;
  padding: 14px 16px;
  margin-bottom: 18px;
}
.tx-review-row {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 8px;
  font-size: .84rem;
}
.tx-review-row:last-child { margin-bottom: 0; }
.tx-review-row > span:first-child { color: var(--grey-500, #6B7280); min-width: 68px; }
.tx-review-section { margin-bottom: 18px; }
.tx-review-section h3 { font-size: .88rem; font-weight: 700; margin-bottom: 8px; color: var(--navy, #1E3A5F); }
.tx-review-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 0;
  border-bottom: 1px solid #F3F4F6;
  font-size: .83rem;
}
.tx-review-item:last-child { border-bottom: none; }
.tx-rev-chip {
  font-size: .72rem;
  background: #DBEAFE;
  color: #1E40AF;
  padding: 2px 7px;
  border-radius: 8px;
  white-space: nowrap;
}
.tx-role-chip {
  font-size: .72rem;
  background: #E5E7EB;
  color: var(--grey-600, #4B5563);
  padding: 2px 7px;
  border-radius: 8px;
  white-space: nowrap;
}

/* ════════════════════════════════════════════
   TRANSMITTAL DETAIL
   ════════════════════════════════════════════ */
.tx-detail { padding: 24px 28px; max-width: 980px; }
.tx-detail-header { margin-bottom: 20px; }
.tx-detail-title-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}
.tx-detail-title-row h1 {
  font-size: 1.4rem;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.tx-purpose-chip {
  font-size: .78rem;
  background: #DBEAFE;
  color: #1E40AF;
  padding: 3px 10px;
  border-radius: 10px;
  font-weight: 600;
  white-space: nowrap;
}
.tx-detail-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: .84rem;
  color: var(--grey-500, #6B7280);
  margin-bottom: 6px;
}
.tx-detail-subject { font-weight: 600; font-size: .95rem; color: var(--navy, #1E3A5F); margin-bottom: 6px; }
.tx-detail-msg {
  font-size: .85rem;
  color: var(--grey-600, #4B5563);
  background: #F9FAFB;
  border: 1px solid #E5E7EB;
  border-radius: 8px;
  padding: 10px 14px;
  line-height: 1.5;
}
.tx-detail-layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 20px;
  align-items: start;
}
@media (max-width: 700px) { .tx-detail-layout { grid-template-columns: 1fr; } }
.tx-detail-main { display: flex; flex-direction: column; gap: 16px; }
.tx-detail-side { display: flex; flex-direction: column; gap: 0; }

/* Acknowledgement banner */
.tx-ack-banner {
  background: rgba(0,166,166,.06);
  border: 1.5px solid var(--teal, #0D9488);
  border-radius: 10px;
  padding: 16px 20px;
  margin-bottom: 20px;
}
.tx-ack-banner-done {
  background: rgba(6,95,70,.05);
  border-color: #065F46;
}
.tx-ack-done-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px; height: 22px;
  border-radius: 50%;
  background: #065F46;
  color: #fff;
  font-size: .8rem;
  font-weight: 700;
  margin-right: 8px;
}
.tx-ack-btn {
  width: 100%;
  height: 44px;
  font-size: .9rem;
}

/* Progress bar */
.tx-ack-progress-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}
.tx-ack-bar-lg {
  flex: 1;
  height: 8px;
  background: #E5E7EB;
  border-radius: 4px;
  overflow: hidden;
}
.tx-ack-fill-lg {
  height: 100%;
  background: var(--teal, #0D9488);
  border-radius: 4px;
  transition: width .3s;
}
.tx-ack-label { font-size: .78rem; color: var(--grey-500, #6B7280); white-space: nowrap; }

/* Recipient rows */
.tx-recip-list { display: flex; flex-direction: column; gap: 4px; }
.tx-recip-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid #F9FAFB;
  font-size: .83rem;
}
.tx-recip-row:last-child { border-bottom: none; }
.tx-recip-icon {
  width: 24px;
  text-align: center;
  font-size: 1rem;
  flex-shrink: 0;
}
.tx-recip-info { flex: 1; min-width: 0; }
.tx-recip-name { font-weight: 600; display: block; }
.tx-recip-detail { font-size: .75rem; color: var(--grey-500, #6B7280); }
.tx-recip-acked .tx-recip-icon { color: var(--teal, #0D9488); }
.tx-recip-acked .tx-recip-name { color: var(--grey-700, #374151); }
.tx-recip-viewed .tx-recip-icon { color: #F59E0B; }

/* Drawing list in detail */
.tx-drawing-list-v { display: flex; flex-direction: column; gap: 4px; }
.tx-drawing-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 0;
  border-bottom: 1px solid #F9FAFB;
  font-size: .83rem;
}
.tx-drawing-row:last-child { border-bottom: none; }
.tx-drw-num { font-weight: 700; color: var(--navy, #1E3A5F); min-width: 80px; }
.tx-drw-title { flex: 1; color: var(--grey-600, #4B5563); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tx-drw-dl {
  color: var(--teal, #0D9488);
  text-decoration: none;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: .85rem;
}
.tx-drw-dl:hover { background: rgba(0,166,166,.1); }

/* Transmittal history on drawing detail */
.tx-history-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid #F9FAFB;
  cursor: pointer;
  font-size: .83rem;
  transition: background .12s;
  border-radius: 6px;
  padding-inline: 6px;
}
.tx-history-row:last-child { border-bottom: none; }
.tx-history-row:hover { background: #F3F4F6; }
.tx-num-chip {
  font-size: .75rem;
  background: #DBEAFE;
  color: #1E40AF;
  padding: 2px 8px;
  border-radius: 8px;
  font-weight: 700;
  white-space: nowrap;
}

/* Print styles for transmittal */
@media print {
  .app-sidebar, .app-navbar, .notif-panel, .tx-ack-banner, button, a[class*="btn"] { display: none !important; }
  .tx-detail { padding: 0; }
  .tx-detail-layout { grid-template-columns: 1fr; }
}

/* ── Company profile section ── */
.company-section { margin-top: 24px; }
.company-logo-area {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
  padding: 16px;
  background: var(--grey-50, #f9fafb);
  border: 2px dashed var(--grey-200, #e5e7eb);
  border-radius: var(--radius);
}
.company-logo-preview {
  width: 80px;
  height: 80px;
  border-radius: 10px;
  object-fit: contain;
  background: #fff;
  border: 1px solid var(--grey-200, #e5e7eb);
  padding: 6px;
  flex-shrink: 0;
}
.company-logo-placeholder {
  width: 80px;
  height: 80px;
  border-radius: 10px;
  background: var(--grey-100, #f3f4f6);
  border: 1px solid var(--grey-200, #e5e7eb);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  flex-shrink: 0;
}
.company-logo-info { flex: 1; }
.company-logo-info p { margin: 0 0 8px; font-size: .82rem; color: var(--grey-500); }
.btn-logo-upload {
  display: inline-block;
  padding: 7px 14px;
  background: var(--teal);
  color: #fff;
  border: none;
  border-radius: 6px;
  font-size: .82rem;
  font-weight: 600;
  cursor: pointer;
}
.btn-logo-upload:hover { background: var(--teal-dark, #0e7490); }
.btn-logo-remove {
  display: inline-block;
  margin-left: 8px;
  padding: 7px 14px;
  background: transparent;
  color: var(--danger, #dc2626);
  border: 1px solid var(--danger, #dc2626);
  border-radius: 6px;
  font-size: .82rem;
  font-weight: 600;
  cursor: pointer;
}
.btn-logo-remove:hover { background: #fef2f2; }
.logo-upload-progress {
  font-size: .8rem;
  color: var(--teal);
  margin-top: 4px;
}

/* ── Company onboarding modal ── */
.co-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.5);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.co-modal {
  background: #fff;
  border-radius: 16px;
  max-width: 520px;
  width: 100%;
  padding: 32px;
  box-shadow: 0 20px 60px rgba(0,0,0,.25);
}
.co-modal h2 { margin: 0 0 6px; font-size: 1.3rem; }
.co-modal p  { margin: 0 0 20px; font-size: .9rem; color: var(--grey-500); }
.co-modal-footer {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 24px;
}
.btn-co-skip {
  padding: 9px 18px;
  background: transparent;
  color: var(--grey-500);
  border: 1px solid var(--grey-200);
  border-radius: 8px;
  font-size: .88rem;
  cursor: pointer;
}
.btn-co-skip:hover { background: var(--grey-50, #f9fafb); }
.btn-co-save {
  padding: 9px 22px;
  background: var(--teal);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: .88rem;
  font-weight: 600;
  cursor: pointer;
}
.btn-co-save:hover { background: var(--teal-dark, #0e7490); }
.btn-co-save:disabled { opacity: .6; cursor: not-allowed; }

/* ── PDF download button ── */
.btn-pdf-download {
  display: flex;
  align-items: center;
  gap: 7px;
  width: 100%;
  padding: 9px 14px;
  background: #1E40AF;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: .84rem;
  font-weight: 600;
  cursor: pointer;
  margin-top: 8px;
  text-decoration: none;
  justify-content: center;
}
.btn-pdf-download:hover { background: #1e3a8a; }
.btn-pdf-regen {
  display: flex;
  align-items: center;
  gap: 7px;
  width: 100%;
  padding: 7px 14px;
  background: transparent;
  color: var(--grey-600, #4b5563);
  border: 1px solid var(--grey-200, #e5e7eb);
  border-radius: 8px;
  font-size: .8rem;
  cursor: pointer;
  margin-top: 6px;
  justify-content: center;
}
.btn-pdf-regen:hover { background: var(--grey-50, #f9fafb); }

/* â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•
   MILESTONE TRACKER
â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â• */

/* â”€â”€ Stats row â”€â”€ */
.ms-stats-row {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
  margin-bottom: 20px;
}
.ms-stat-card {
  background: #fff;
  border-radius: 12px;
  padding: 14px 16px;
  box-shadow: 0 1px 4px rgba(0,0,0,.07);
  border: 1px solid var(--grey-100, #f3f4f6);
}
.ms-stat-value {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--navy);
  line-height: 1;
}
.ms-stat-label {
  font-size: .76rem;
  color: var(--grey-500);
  margin-top: 4px;
  font-weight: 500;
}
.ms-stat-bar {
  height: 4px;
  background: var(--grey-100);
  border-radius: 2px;
  margin-top: 8px;
  overflow: hidden;
}
.ms-stat-bar-fill {
  height: 100%;
  background: var(--teal);
  border-radius: 2px;
  transition: width .3s;
}
/* â”€â”€ Toolbar â”€â”€ */
.ms-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.ms-toolbar-left  { display: flex; align-items: center; gap: 8px; flex: 1; flex-wrap: wrap; }
.ms-toolbar-right { display: flex; align-items: center; gap: 8px; }
.ms-filter-select {
  height: 34px;
  padding: 0 10px;
  border: 1.5px solid var(--grey-200, #e5e7eb);
  border-radius: 8px;
  font-size: .83rem;
  font-family: inherit;
  background: #fff;
  color: var(--navy);
  cursor: pointer;
}
.ms-filter-select:focus { outline: none; border-color: var(--teal); }
.ms-view-toggle {
  display: flex;
  border: 1.5px solid var(--grey-200);
  border-radius: 8px;
  overflow: hidden;
}
.ms-view-btn {
  padding: 6px 14px;
  background: transparent;
  border: none;
  font-size: .83rem;
  font-weight: 500;
  color: var(--grey-500);
  cursor: pointer;
  transition: all .15s;
}
.ms-view-btn.active { background: var(--teal); color: #fff; }
.ms-view-btn:hover:not(.active) { background: var(--grey-50); }
/* â”€â”€ Badges â”€â”€ */
.ms-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px;
  border-radius: 20px;
  font-size: .77rem;
  font-weight: 600;
}
.ms-status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}
.ms-cat-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: .73rem;
  font-weight: 600;
}
/* â”€â”€ List â”€â”€ */
.ms-list { display: flex; flex-direction: column; gap: 0; }
.ms-list-header {
  display: grid;
  grid-template-columns: 28px 1fr 110px 140px 120px 90px 110px 40px;
  padding: 8px 16px;
  font-size: .75rem;
  font-weight: 700;
  color: var(--grey-400);
  text-transform: uppercase;
  letter-spacing: .04em;
  border-bottom: 1.5px solid var(--grey-100);
  background: var(--grey-50, #f9fafb);
}
.ms-list-row {
  display: grid;
  grid-template-columns: 28px 1fr 110px 140px 120px 90px 110px 40px;
  padding: 12px 16px;
  align-items: center;
  border-bottom: 1px solid var(--grey-100);
  cursor: pointer;
  transition: background .12s;
  background: #fff;
}
.ms-list-row:hover { background: var(--grey-50); }
.ms-row-status-dot { width: 12px; height: 12px; border-radius: 50%; flex-shrink: 0; }
.ms-row-title { font-weight: 600; font-size: .9rem; color: var(--navy); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding-right: 12px; }
.ms-row-desc  { font-size: .78rem; color: var(--grey-500); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ms-owner-chip { display: flex; align-items: center; gap: 6px; font-size: .82rem; color: var(--grey-600); }
.ms-owner-avatar {
  width: 22px; height: 22px; border-radius: 50%; background: var(--teal); color: #fff;
  font-size: .65rem; font-weight: 700; display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.ms-days-label   { font-size: .78rem; font-weight: 600; }
.ms-days-overdue { color: #ef4444; }
.ms-days-atrisk  { color: #f59e0b; }
.ms-days-soon    { color: #0891b2; }
.ms-days-fine    { color: var(--grey-500); }
.ms-progress-cell { padding-right: 8px; }
.ms-progress-bar  { height: 6px; background: var(--grey-100); border-radius: 3px; overflow: hidden; margin-bottom: 3px; }
.ms-progress-fill { height: 100%; border-radius: 3px; background: var(--teal); transition: width .3s; }
.ms-progress-pct  { font-size: .74rem; color: var(--grey-500); }
.ms-row-menu-btn  { width: 28px; height: 28px; border: none; background: transparent; cursor: pointer; border-radius: 6px; font-size: 1rem; color: var(--grey-400); display: flex; align-items: center; justify-content: center; }
.ms-row-menu-btn:hover { background: var(--grey-100); color: var(--grey-700); }
/* â”€â”€ Empty â”€â”€ */
.ms-empty { text-align: center; padding: 60px 20px; color: var(--grey-400); }
.ms-empty-icon { font-size: 3rem; margin-bottom: 12px; }
.ms-empty h2 { font-size: 1.1rem; color: var(--navy); margin: 0 0 6px; }
.ms-empty p  { font-size: .88rem; margin: 0 0 20px; }
/* â”€â”€ Calendar â”€â”€ */
.ms-cal-wrap { background: #fff; border-radius: 12px; overflow: hidden; box-shadow: 0 1px 4px rgba(0,0,0,.07); border: 1px solid var(--grey-100); }
.ms-cal-nav { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; border-bottom: 1px solid var(--grey-100); }
.ms-cal-nav-title { font-size: 1.05rem; font-weight: 700; color: var(--navy); }
.ms-cal-nav-btns  { display: flex; gap: 6px; }
.ms-cal-nav-btn   { padding: 5px 12px; border: 1.5px solid var(--grey-200); background: #fff; border-radius: 7px; font-size: .82rem; cursor: pointer; font-weight: 500; color: var(--grey-600); }
.ms-cal-nav-btn:hover { background: var(--grey-50); }
.ms-cal-nav-btn.today-btn { border-color: var(--teal); color: var(--teal); }
.ms-cal-dow-row  { display: grid; grid-template-columns: repeat(7, 1fr); background: var(--grey-50); border-bottom: 1px solid var(--grey-100); }
.ms-cal-dow      { padding: 7px 0; text-align: center; font-size: .73rem; font-weight: 700; color: var(--grey-400); text-transform: uppercase; letter-spacing: .04em; }
.ms-cal-grid     { display: flex; flex-direction: column; }
.ms-cal-row      { display: grid; grid-template-columns: repeat(7, 1fr); border-bottom: 1px solid var(--grey-100); }
.ms-cal-row:last-child { border-bottom: none; }
.ms-cal-cell {
  min-height: 90px; padding: 6px; border-right: 1px solid var(--grey-100); cursor: pointer; transition: background .1s; position: relative;
}
.ms-cal-cell:last-child   { border-right: none; }
.ms-cal-cell:hover        { background: #f0fdfa; }
.ms-cal-cell--empty       { background: transparent; cursor: default; min-height: 90px; border-right: 1px solid var(--grey-100); }
.ms-cal-cell--empty:last-child { border-right: none; }
.ms-cal-cell--weekend     { background: #fafafa; }
.ms-cal-cell--weekend:hover { background: #f0fdfa; }
.ms-cal-cell--today .ms-cal-daynum { background: var(--teal); color: #fff; border-radius: 50%; width: 24px; height: 24px; display: flex; align-items: center; justify-content: center; }
.ms-cal-daynum { font-size: .8rem; font-weight: 600; color: var(--grey-600); display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; margin-bottom: 4px; }
.ms-cal-dot    { display: block; padding: 2px 5px; border-radius: 4px; font-size: .69rem; font-weight: 600; color: #fff; margin-bottom: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: pointer; }
.ms-cal-more   { font-size: .68rem; color: var(--grey-400); padding-left: 2px; font-weight: 600; }
/* â”€â”€ Form â”€â”€ */
.ms-form-card   { background: #fff; border-radius: 12px; padding: 28px 28px 24px; box-shadow: 0 1px 4px rgba(0,0,0,.07); border: 1px solid var(--grey-100); max-width: 680px; }
.ms-form-row-2  { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.ms-progress-slider { width: 100%; accent-color: var(--teal); }
.ms-color-row   { display: flex; gap: 8px; flex-wrap: wrap; }
.ms-color-swatch { width: 28px; height: 28px; border-radius: 6px; border: 2px solid transparent; cursor: pointer; transition: transform .1s; }
.ms-color-swatch.selected, .ms-color-swatch:hover { transform: scale(1.15); border-color: var(--navy); }
/* â”€â”€ Detail â”€â”€ */
.ms-detail-layout { display: grid; grid-template-columns: 1fr 300px; gap: 20px; align-items: start; }
.ms-detail-header { background: #fff; border-radius: 12px; padding: 24px; box-shadow: 0 1px 4px rgba(0,0,0,.07); border: 1px solid var(--grey-100); margin-bottom: 16px; }
.ms-detail-title  { font-size: 1.4rem; font-weight: 700; color: var(--navy); margin: 0 0 10px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.ms-detail-meta-row { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; font-size: .85rem; color: var(--grey-500); margin-bottom: 16px; }
.ms-detail-progress-wrap { margin-top: 16px; }
.ms-detail-progress-bar  { height: 10px; background: var(--grey-100); border-radius: 5px; overflow: hidden; margin-top: 6px; }
.ms-detail-progress-fill { height: 100%; border-radius: 5px; background: var(--teal); transition: width .3s; }
.ms-detail-section { background: #fff; border-radius: 12px; padding: 20px; box-shadow: 0 1px 4px rgba(0,0,0,.07); border: 1px solid var(--grey-100); margin-bottom: 14px; }
.ms-detail-section h3 { font-size: .88rem; font-weight: 700; color: var(--grey-500); text-transform: uppercase; letter-spacing: .05em; margin: 0 0 14px; }
.ms-detail-kv    { display: flex; justify-content: space-between; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--grey-100); font-size: .88rem; }
.ms-detail-kv:last-child { border-bottom: none; }
.ms-detail-k { color: var(--grey-500); }
.ms-detail-v { font-weight: 600; color: var(--navy); }
/* â”€â”€ Notes â”€â”€ */
.ms-notes-list { display: flex; flex-direction: column; gap: 12px; }
.ms-note-item  { display: flex; gap: 10px; }
.ms-note-avatar { width: 28px; height: 28px; border-radius: 50%; background: var(--teal); color: #fff; font-size: .7rem; font-weight: 700; display: flex; align-items: center; justify-content: center; flex-shrink: 0; margin-top: 2px; }
.ms-note-body  { flex: 1; }
.ms-note-meta  { font-size: .75rem; color: var(--grey-400); margin-bottom: 3px; }
.ms-note-text  { font-size: .88rem; background: var(--grey-50); border-radius: 8px; padding: 8px 12px; color: var(--grey-700); }
.ms-add-note-row { display: flex; gap: 8px; margin-top: 14px; align-items: flex-end; }
.ms-add-note-row textarea { flex: 1; border: 1.5px solid var(--grey-200); border-radius: 8px; padding: 8px 12px; font-size: .88rem; font-family: inherit; resize: vertical; min-height: 60px; }
.ms-add-note-row textarea:focus { outline: none; border-color: var(--teal); }
/* â”€â”€ Buttons â”€â”€ */
.btn-ms-complete { display: inline-flex; align-items: center; gap: 7px; padding: 9px 20px; background: #10b981; color: #fff; border: none; border-radius: 9px; font-size: .88rem; font-weight: 600; cursor: pointer; }
.btn-ms-complete:hover { background: #059669; }
.btn-ms-complete:disabled { opacity: .6; cursor: not-allowed; }
/* â”€â”€ Template modal â”€â”€ */
.ms-tpl-overlay { position: fixed; inset: 0; background: rgba(0,0,0,.5); z-index: 2000; display: flex; align-items: flex-start; justify-content: center; padding: 40px 16px; overflow-y: auto; }
.ms-tpl-modal   { background: #fff; border-radius: 16px; width: 100%; max-width: 680px; padding: 28px 0 0; box-shadow: 0 20px 60px rgba(0,0,0,.25); position: relative; }
.ms-tpl-modal-head { padding: 0 28px 16px; border-bottom: 1px solid var(--grey-100); }
.ms-tpl-modal-head h2 { margin: 0 0 4px; font-size: 1.2rem; }
.ms-tpl-modal-head p  { margin: 0; font-size: .85rem; color: var(--grey-500); }
.ms-tpl-tabs { display: flex; padding: 0 28px; gap: 0; border-bottom: 1.5px solid var(--grey-100); margin-top: 16px; }
.ms-tpl-tab   { padding: 8px 16px; border: none; background: transparent; font-size: .88rem; font-weight: 600; color: var(--grey-500); cursor: pointer; border-bottom: 2.5px solid transparent; margin-bottom: -1.5px; }
.ms-tpl-tab.active { color: var(--teal); border-bottom-color: var(--teal); }
.ms-tpl-body  { padding: 16px 28px; max-height: 380px; overflow-y: auto; }
.ms-tpl-item  { display: grid; grid-template-columns: 24px 1fr 150px; gap: 10px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--grey-100); }
.ms-tpl-item:last-child { border-bottom: none; }
.ms-tpl-item input[type="checkbox"] { width: 16px; height: 16px; accent-color: var(--teal); cursor: pointer; }
.ms-tpl-title-input { border: 1.5px solid var(--grey-200); border-radius: 6px; padding: 5px 8px; font-size: .85rem; font-family: inherit; width: 100%; box-sizing: border-box; }
.ms-tpl-title-input:focus { outline: none; border-color: var(--teal); }
.ms-tpl-date-input  { border: 1.5px solid var(--grey-200); border-radius: 6px; padding: 5px 8px; font-size: .82rem; font-family: inherit; width: 100%; box-sizing: border-box; }
.ms-tpl-date-input:focus  { outline: none; border-color: var(--teal); }
.ms-tpl-footer { display: flex; justify-content: space-between; align-items: center; padding: 16px 28px; border-top: 1px solid var(--grey-100); gap: 10px; }
.ms-tpl-select-all { font-size: .82rem; color: var(--teal); background: none; border: none; cursor: pointer; text-decoration: underline; padding: 0; }
/* â”€â”€ Dashboard widget â”€â”€ */
.ms-dash-row { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--grey-100); cursor: pointer; transition: background .1s; }
.ms-dash-row:last-child { border-bottom: none; }
.ms-dash-dot   { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.ms-dash-info  { flex: 1; min-width: 0; }
.ms-dash-title { font-size: .88rem; font-weight: 600; color: var(--navy); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ms-dash-meta  { font-size: .76rem; color: var(--grey-400); margin-top: 2px; }
.ms-dash-days  { font-size: .78rem; font-weight: 600; white-space: nowrap; }
/* â”€â”€ Responsive â”€â”€ */
@media (max-width: 900px) {
  .ms-stats-row { grid-template-columns: repeat(3, 1fr); }
  .ms-list-header, .ms-list-row { grid-template-columns: 20px 1fr 80px 100px; }
  .ms-list-row > *:nth-child(n+5) { display: none; }
  .ms-detail-layout { grid-template-columns: 1fr; }
  .ms-cal-cell { min-height: 60px; }
  .ms-form-row-2 { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .ms-stats-row { grid-template-columns: repeat(2, 1fr); }
  .ms-tpl-item  { grid-template-columns: 24px 1fr; }
  .ms-tpl-item .ms-tpl-date-input { display: none; }
}

/* â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•
   RFI MANAGEMENT
â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â• */

/* â”€â”€ RFI stats banner â”€â”€ */
.rfi-banner-row {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 10px 16px;
  background: var(--grey-50, #f9fafb);
  border: 1px solid var(--grey-100);
  border-radius: 10px;
  margin-bottom: 16px;
  font-size: .85rem;
  color: var(--grey-600);
  flex-wrap: wrap;
}
.rfi-banner-stat { display: flex; align-items: center; gap: 5px; }
.rfi-banner-stat strong { color: var(--navy); }
.rfi-banner-overdue strong { color: #ef4444; }
.rfi-banner-mine   strong { color: var(--teal); }

/* â”€â”€ Filters â”€â”€ */
.rfi-filters {
  display: flex;
  gap: 8px;
  margin-bottom: 14px;
  flex-wrap: wrap;
  align-items: center;
}
.rfi-search {
  flex: 1;
  min-width: 160px;
  height: 34px;
  padding: 0 12px;
  border: 1.5px solid var(--grey-200);
  border-radius: 8px;
  font-size: .88rem;
  font-family: inherit;
}
.rfi-search:focus { outline: none; border-color: var(--teal); }
.rfi-toggle-btn {
  padding: 5px 12px;
  border: 1.5px solid var(--grey-200);
  border-radius: 8px;
  background: #fff;
  font-size: .82rem;
  font-weight: 500;
  cursor: pointer;
  color: var(--grey-600);
  white-space: nowrap;
}
.rfi-toggle-btn.active { background: var(--teal); color: #fff; border-color: var(--teal); }
.rfi-toggle-btn:hover:not(.active) { background: var(--grey-50); }

/* â”€â”€ Priority dot â”€â”€ */
.rfi-priority-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
}
.rfi-priority-urgent .rfi-priority-dot {
  animation: rfipulse 1.2s ease-in-out infinite;
}
@keyframes rfipulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(239,68,68,.4); }
  50%       { box-shadow: 0 0 0 5px rgba(239,68,68,0); }
}
.rfi-priority-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: .78rem;
  font-weight: 600;
}

/* â”€â”€ Table view â”€â”€ */
.rfi-table-wrap { background: #fff; border-radius: 12px; overflow: hidden; box-shadow: 0 1px 4px rgba(0,0,0,.07); border: 1px solid var(--grey-100); }
.rfi-table { width: 100%; border-collapse: collapse; }
.rfi-table th {
  padding: 9px 14px;
  background: var(--grey-50);
  font-size: .74rem;
  font-weight: 700;
  color: var(--grey-400);
  text-transform: uppercase;
  letter-spacing: .04em;
  text-align: left;
  border-bottom: 1.5px solid var(--grey-100);
  white-space: nowrap;
}
.rfi-table td {
  padding: 11px 14px;
  border-bottom: 1px solid var(--grey-100);
  font-size: .87rem;
  color: var(--navy);
  vertical-align: middle;
}
.rfi-table tr:last-child td { border-bottom: none; }
.rfi-table tr:hover td { background: var(--grey-50, #f9fafb); cursor: pointer; }
.rfi-num-chip {
  font-size: .78rem;
  font-weight: 700;
  color: var(--teal);
  font-family: monospace;
  white-space: nowrap;
}
.rfi-subject-cell { max-width: 220px; }
.rfi-subject-main { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rfi-status-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  border-radius: 20px;
  font-size: .76rem;
  font-weight: 600;
  white-space: nowrap;
}
.rfi-disc-badge {
  display: inline-block;
  padding: 2px 7px;
  border-radius: 10px;
  font-size: .72rem;
  font-weight: 700;
  color: #fff;
}
.rfi-person-chip {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: .82rem;
  white-space: nowrap;
}
.rfi-person-avatar {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--teal);
  color: #fff;
  font-size: .64rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.rfi-days-overdue { color: #ef4444; font-weight: 600; }
.rfi-days-soon    { color: #f59e0b; font-weight: 600; }
.rfi-days-fine    { color: var(--grey-500); }
.rfi-table-actions { white-space: nowrap; }
.rfi-table-menu-btn { width: 28px; height: 28px; border: none; background: transparent; cursor: pointer; border-radius: 6px; font-size: 1rem; color: var(--grey-400); }
.rfi-table-menu-btn:hover { background: var(--grey-100); color: var(--grey-700); }

/* â”€â”€ Kanban view â”€â”€ */
.rfi-kanban {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  align-items: start;
}
.rfi-kanban-col {
  background: var(--grey-50, #f9fafb);
  border-radius: 12px;
  border: 1px solid var(--grey-100);
  overflow: hidden;
}
.rfi-kanban-col-header {
  padding: 11px 14px;
  font-size: .82rem;
  font-weight: 700;
  color: var(--grey-600);
  text-transform: uppercase;
  letter-spacing: .04em;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1.5px solid var(--grey-200);
  background: var(--grey-100, #f3f4f6);
}
.rfi-kanban-count {
  background: var(--grey-300, #d1d5db);
  color: var(--grey-700);
  border-radius: 10px;
  padding: 1px 7px;
  font-size: .72rem;
}
.rfi-kanban-col-body {
  padding: 10px;
  min-height: 100px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.rfi-kanban-col-body.drag-over {
  background: #f0fdfa;
  outline: 2px dashed var(--teal);
  outline-offset: -4px;
}
.rfi-kanban-card {
  background: #fff;
  border-radius: 10px;
  padding: 12px;
  box-shadow: 0 1px 3px rgba(0,0,0,.08);
  cursor: pointer;
  border-left: 3px solid var(--grey-200);
  transition: box-shadow .15s, transform .1s;
}
.rfi-kanban-card:hover { box-shadow: 0 3px 8px rgba(0,0,0,.12); transform: translateY(-1px); }
.rfi-kanban-card.dragging { opacity: .45; }
.rfi-kanban-card-num { font-size: .74rem; font-weight: 700; color: var(--teal); font-family: monospace; }
.rfi-kanban-card-subj { font-size: .86rem; font-weight: 600; color: var(--navy); margin: 4px 0 6px; line-height: 1.3; }
.rfi-kanban-card-meta { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.rfi-kanban-card-days { font-size: .74rem; font-weight: 600; }

/* â”€â”€ Wizard â”€â”€ */
.rfi-wizard { max-width: 720px; }
.rfi-wiz-card {
  background: #fff;
  border-radius: 14px;
  padding: 28px;
  box-shadow: 0 1px 4px rgba(0,0,0,.07);
  border: 1px solid var(--grey-100);
}
.rfi-ai-banner {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 16px;
  background: #f0fdfa;
  border: 1.5px solid var(--teal);
  border-radius: 10px;
  margin-top: 16px;
  font-size: .88rem;
}
.rfi-ai-banner-icon { font-size: 1.2rem; flex-shrink: 0; margin-top: 1px; }
.rfi-ai-banner-content { flex: 1; }
.rfi-ai-banner-content strong { color: var(--teal); }
.rfi-ai-banner-actions { display: flex; gap: 8px; margin-top: 6px; }
.btn-ai-apply  { padding: 4px 12px; background: var(--teal); color: #fff; border: none; border-radius: 6px; font-size: .8rem; cursor: pointer; font-weight: 600; }
.btn-ai-dismiss{ padding: 4px 10px; background: transparent; color: var(--grey-500); border: 1px solid var(--grey-200); border-radius: 6px; font-size: .8rem; cursor: pointer; }
.rfi-draw-list { display: flex; flex-direction: column; gap: 0; max-height: 320px; overflow-y: auto; border: 1.5px solid var(--grey-200); border-radius: 8px; }
.rfi-draw-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-bottom: 1px solid var(--grey-100);
  cursor: pointer;
  transition: background .1s;
}
.rfi-draw-item:last-child { border-bottom: none; }
.rfi-draw-item:hover { background: var(--grey-50); }
.rfi-draw-item input[type="checkbox"] { width: 15px; height: 15px; accent-color: var(--teal); flex-shrink: 0; }
.rfi-draw-item-num  { font-size: .8rem; font-weight: 700; color: var(--teal); font-family: monospace; min-width: 70px; }
.rfi-draw-item-title{ font-size: .85rem; color: var(--navy); flex: 1; }
.rfi-draw-item-rev  { font-size: .75rem; color: var(--grey-400); }
.rfi-att-list { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
.rfi-att-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  background: var(--grey-50);
  border-radius: 8px;
  font-size: .85rem;
}
.rfi-att-name { flex: 1; color: var(--navy); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rfi-att-size { font-size: .75rem; color: var(--grey-400); }
.rfi-att-remove { background: none; border: none; color: #ef4444; cursor: pointer; font-size: .9rem; padding: 0 4px; }
.rfi-due-quick { display: flex; gap: 8px; margin-top: 8px; flex-wrap: wrap; }
.rfi-due-btn {
  padding: 5px 12px;
  border: 1.5px solid var(--grey-200);
  border-radius: 8px;
  background: #fff;
  font-size: .82rem;
  cursor: pointer;
  font-weight: 500;
  color: var(--grey-600);
}
.rfi-due-btn:hover { background: var(--grey-50); border-color: var(--teal); color: var(--teal); }
.rfi-review-section { margin-bottom: 14px; padding: 12px 14px; background: var(--grey-50); border-radius: 8px; }
.rfi-review-section h4 { font-size: .8rem; font-weight: 700; color: var(--grey-400); text-transform: uppercase; margin: 0 0 8px; letter-spacing: .04em; }
.rfi-review-q { font-size: .9rem; color: var(--grey-700); line-height: 1.5; white-space: pre-wrap; word-break: break-word; }

/* â”€â”€ Detail page â”€â”€ */
.rfi-detail-layout { display: grid; grid-template-columns: 1fr 290px; gap: 20px; align-items: start; }
.rfi-detail-header {
  background: #fff;
  border-radius: 12px;
  padding: 22px 24px;
  box-shadow: 0 1px 4px rgba(0,0,0,.07);
  border: 1px solid var(--grey-100);
  margin-bottom: 16px;
}
.rfi-detail-num   { font-size: .88rem; font-weight: 700; color: var(--teal); font-family: monospace; margin-bottom: 4px; }
.rfi-detail-subj  { font-size: 1.3rem; font-weight: 700; color: var(--navy); margin: 0 0 10px; }
.rfi-detail-badges { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.rfi-detail-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }
.btn-rfi-respond  { padding: 9px 18px; background: var(--teal); color: #fff; border: none; border-radius: 9px; font-size: .88rem; font-weight: 600; cursor: pointer; }
.btn-rfi-respond:hover { background: var(--teal-dark, #0e7490); }
.btn-rfi-close    { padding: 9px 18px; background: #059669; color: #fff; border: none; border-radius: 9px; font-size: .88rem; font-weight: 600; cursor: pointer; }
.btn-rfi-close:hover { background: #047857; }
.btn-rfi-approve  { padding: 9px 18px; background: #059669; color: #fff; border: none; border-radius: 9px; font-size: .88rem; font-weight: 600; cursor: pointer; }
.btn-rfi-reject   { padding: 9px 18px; background: transparent; color: #dc2626; border: 1.5px solid #dc2626; border-radius: 9px; font-size: .88rem; font-weight: 600; cursor: pointer; }
.btn-rfi-reject:hover { background: #fef2f2; }
.rfi-question-card, .rfi-response-card, .rfi-comments-card {
  background: #fff;
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 1px 4px rgba(0,0,0,.07);
  border: 1px solid var(--grey-100);
  margin-bottom: 14px;
}
.rfi-card-title { font-size: .82rem; font-weight: 700; color: var(--grey-400); text-transform: uppercase; letter-spacing: .05em; margin: 0 0 12px; }
.rfi-question-text { font-size: .92rem; color: var(--grey-700); line-height: 1.6; white-space: pre-wrap; word-break: break-word; }
.rfi-raised-by { display: flex; align-items: center; gap: 8px; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--grey-100); font-size: .83rem; color: var(--grey-500); }
.rfi-linked-drawings { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.rfi-linked-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  background: #EDE9FE;
  color: #6D28D9;
  border-radius: 10px;
  font-size: .78rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
}
.rfi-linked-chip:hover { background: #DDD6FE; }
.rfi-response-text { font-size: .92rem; color: var(--grey-700); line-height: 1.6; white-space: pre-wrap; word-break: break-word; }
.rfi-respond-form textarea {
  width: 100%;
  min-height: 100px;
  padding: 10px 12px;
  border: 1.5px solid var(--grey-200);
  border-radius: 8px;
  font-size: .9rem;
  font-family: inherit;
  resize: vertical;
  box-sizing: border-box;
}
.rfi-respond-form textarea:focus { outline: none; border-color: var(--teal); }
.rfi-comment-item { display: flex; gap: 10px; margin-bottom: 14px; }
.rfi-comment-avatar { width: 28px; height: 28px; border-radius: 50%; background: var(--teal); color: #fff; font-size: .7rem; font-weight: 700; display: flex; align-items: center; justify-content: center; flex-shrink: 0; margin-top: 2px; }
.rfi-comment-body { flex: 1; }
.rfi-comment-meta { font-size: .75rem; color: var(--grey-400); margin-bottom: 3px; }
.rfi-comment-text { font-size: .88rem; background: var(--grey-50); border-radius: 8px; padding: 8px 12px; color: var(--grey-700); }
.rfi-add-comment-row { display: flex; gap: 8px; align-items: flex-end; margin-top: 14px; }
.rfi-add-comment-row textarea { flex: 1; border: 1.5px solid var(--grey-200); border-radius: 8px; padding: 8px 12px; font-size: .88rem; font-family: inherit; resize: vertical; min-height: 60px; }
.rfi-add-comment-row textarea:focus { outline: none; border-color: var(--teal); }
/* â”€â”€ Side panel â”€â”€ */
.rfi-side-card {
  background: #fff;
  border-radius: 12px;
  padding: 18px;
  box-shadow: 0 1px 4px rgba(0,0,0,.07);
  border: 1px solid var(--grey-100);
  margin-bottom: 14px;
}
.rfi-side-card h3 { font-size: .8rem; font-weight: 700; color: var(--grey-400); text-transform: uppercase; letter-spacing: .05em; margin: 0 0 12px; }
.rfi-kv { display: flex; justify-content: space-between; align-items: flex-start; padding: 7px 0; border-bottom: 1px solid var(--grey-100); font-size: .86rem; gap: 8px; }
.rfi-kv:last-child { border-bottom: none; }
.rfi-kv-label { color: var(--grey-500); white-space: nowrap; }
.rfi-kv-value { font-weight: 600; color: var(--navy); text-align: right; }
.rfi-status-timeline { display: flex; flex-direction: column; gap: 8px; }
.rfi-timeline-item { display: flex; align-items: center; gap: 8px; font-size: .82rem; color: var(--grey-500); }
.rfi-timeline-dot  { width: 8px; height: 8px; border-radius: 50%; background: var(--grey-200); flex-shrink: 0; }
.rfi-timeline-dot.done { background: var(--teal); }
/* â”€â”€ Attachments display â”€â”€ */
.rfi-attachments-grid { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.rfi-att-thumb {
  width: 64px;
  height: 64px;
  border-radius: 8px;
  object-fit: cover;
  border: 1px solid var(--grey-100);
  cursor: pointer;
}
.rfi-att-doc {
  width: 64px;
  height: 64px;
  border-radius: 8px;
  background: var(--grey-50);
  border: 1px solid var(--grey-100);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  cursor: pointer;
  text-decoration: none;
}
/* â”€â”€ Drawing detail RFI section â”€â”€ */
.dr-rfi-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 0;
  border-bottom: 1px solid var(--grey-100);
  cursor: pointer;
  font-size: .86rem;
}
.dr-rfi-row:last-child { border-bottom: none; }
.dr-rfi-row:hover { background: var(--grey-50); padding: 9px 4px; border-radius: 6px; margin: 0 -4px; }
.dr-rfi-num   { font-size: .78rem; font-weight: 700; color: var(--teal); font-family: monospace; min-width: 65px; }
.dr-rfi-subj  { flex: 1; color: var(--navy); font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* â”€â”€ Empty â”€â”€ */
.rfi-empty { text-align: center; padding: 60px 20px; color: var(--grey-400); }
.rfi-empty-icon { font-size: 3rem; margin-bottom: 12px; }
.rfi-empty h2 { font-size: 1.1rem; color: var(--navy); margin: 0 0 6px; }
.rfi-empty p  { font-size: .88rem; margin: 0 0 20px; }
/* â”€â”€ Responsive â”€â”€ */
@media (max-width: 1100px) {
  .rfi-kanban { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 900px) {
  .rfi-detail-layout { grid-template-columns: 1fr; }
  .rfi-kanban { grid-template-columns: 1fr; }
  .rfi-table th:nth-child(n+5), .rfi-table td:nth-child(n+5) { display: none; }
}

/* ═══════════════════════════════════════════
   DASHBOARD — ACTIVITY WIDGET
═══════════════════════════════════════════ */
.dash-activity-list { display: flex; flex-direction: column; gap: 0; }
.dash-activity-empty {
  color: var(--grey-400); font-size: .88rem; padding: 20px 0;
  text-align: center; line-height: 1.5;
}
.dash-activity-item {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 9px 0; border-bottom: 1px solid var(--grey-100);
}
.dash-activity-item:last-child { border-bottom: none; }
.dash-activity-item.clickable { cursor: pointer; border-radius: 6px; padding: 9px 6px; margin: 0 -6px; }
.dash-activity-item.clickable:hover { background: var(--grey-50); }
.dash-activity-icon { font-size: 1.1rem; width: 26px; flex-shrink: 0; text-align: center; padding-top: 1px; }
.dash-activity-body { flex: 1; min-width: 0; }
.dash-activity-desc { font-size: .85rem; color: var(--navy); line-height: 1.4; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dash-activity-time { font-size: .75rem; color: var(--grey-400); margin-top: 2px; }

/* ═══════════════════════════════════════════
   DASHBOARD — MILESTONE CALENDAR
═══════════════════════════════════════════ */
/* Dashboard two-column layout: calendar | activity */
.dash-main-grid {
  display: grid;
  grid-template-columns: 460px 1fr;
  gap: 20px;
  margin-bottom: 20px;
  align-items: start;
}
@media (max-width: 960px) { .dash-main-grid { grid-template-columns: 1fr; } }

/* Calendar controls */
.dash-cal-controls {
  display: flex; align-items: center; gap: 8px;
  margin-bottom: 12px;
}
.dash-cal-nav {
  background: none; border: 1.5px solid var(--grey-200); border-radius: 6px;
  width: 28px; height: 28px; display: flex; align-items: center; justify-content: center;
  cursor: pointer; font-size: 1rem; color: var(--navy); line-height: 1;
  padding: 0; transition: background .15s;
}
.dash-cal-nav:hover { background: var(--grey-50); }
.dash-cal-month { font-weight: 600; font-size: .92rem; color: var(--navy); flex: 1; }
.dash-cal-today-btn {
  background: none; border: 1.5px solid var(--teal); border-radius: 6px;
  padding: 3px 10px; font-size: .75rem; color: var(--teal); font-weight: 500;
  cursor: pointer; transition: background .15s;
}
.dash-cal-today-btn:hover { background: var(--teal-50, #f0fdfa); }

/* Calendar grid */
.dash-cal-grid {
  display: grid; grid-template-columns: repeat(7, 1fr);
  gap: 2px; margin-bottom: 12px;
}
.dash-cal-dow {
  text-align: center; font-size: .65rem; font-weight: 600; color: var(--grey-400);
  text-transform: uppercase; letter-spacing: .04em; padding: 2px 0 5px;
}
.dash-cal-cell {
  aspect-ratio: 1; min-height: 48px; display: flex; flex-direction: column;
  align-items: flex-start; padding: 4px 3px;
  border-radius: 5px; overflow: hidden; transition: background .12s;
}
.dash-cal-cell.empty { background: none !important; }
.dash-cal-cell.today { background: var(--teal); }
.dash-cal-cell.today .dash-cal-day-num { color: #fff; font-weight: 700; }
.dash-cal-cell:not(.empty):not(.today):hover { background: var(--grey-50); }
.dash-cal-day-num {
  font-size: .7rem; color: var(--grey-600); line-height: 1;
  font-weight: 400; margin-bottom: 2px; flex-shrink: 0;
}

/* Milestone chips inside calendar cells */
.dash-cal-chip {
  display: block; width: 100%; box-sizing: border-box;
  font-size: 8px; font-weight: 600; line-height: 1.3;
  padding: 1px 3px; margin-top: 1px;
  border-radius: 2px; white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis;
  cursor: pointer; letter-spacing: .01em;
}
.dash-cal-chip:hover { filter: brightness(.9); }
.dash-cal-chip-more {
  font-size: 8px; color: var(--grey-400); line-height: 1.3;
  padding: 1px 3px; margin-top: 1px;
}

/* Upcoming list below grid */
.dash-cal-week { border-top: 1px solid var(--grey-100); padding-top: 12px; }
.dash-cal-week-hdr {
  font-size: .72rem; font-weight: 600; color: var(--grey-500);
  text-transform: uppercase; letter-spacing: .05em; margin-bottom: 8px;
}
.dash-cal-ms-row {
  display: flex; align-items: center; gap: 8px; padding: 6px 0;
  border-bottom: 1px solid var(--grey-100); cursor: pointer;
  border-radius: 4px; transition: background .12s;
}
.dash-cal-ms-row:last-child { border-bottom: none; }
.dash-cal-ms-row:hover { background: var(--grey-50); padding: 6px 4px; margin: 0 -4px; }

/* Milestone detail popover */
.dash-cal-popover {
  position: fixed; z-index: 3000;
  background: #fff; border-radius: 10px;
  padding: 16px; width: 290px;
  box-shadow: 0 8px 32px rgba(0,0,0,.18);
  border: 1px solid var(--grey-200);
  display: flex; flex-direction: column; gap: 12px;
}
.dash-cal-popover[hidden] { display: none !important; }
.dash-cal-pop-header { display: flex; align-items: flex-start; gap: 8px; }
.dash-cal-pop-title { flex: 1; font-weight: 600; font-size: .88rem; color: var(--navy); line-height: 1.35; }
.dash-cal-pop-close {
  background: none; border: none; color: var(--grey-400); cursor: pointer;
  font-size: 1rem; padding: 0; line-height: 1; flex-shrink: 0;
}
.dash-cal-pop-close:hover { color: var(--navy); }
.dash-cal-pop-body { display: flex; flex-direction: column; gap: 5px; }
.dash-cal-pop-row { font-size: .83rem; color: var(--grey-700); display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.dash-cal-pop-actions { display: flex; gap: 8px; align-items: center; }

@media (max-width: 640px) {
  .dash-cal-grid { gap: 1px; }
  .dash-cal-cell { min-height: 36px; padding: 3px 2px; }
  .dash-cal-day-num { font-size: .65rem; }
  .dash-cal-chip { font-size: 7px; }
}

/* ── File Repository ── */
.fr-layout {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 0;
  height: calc(100vh - var(--navbar-h, 56px) - 40px);
  min-height: 0;
}

/* Folder sidebar */
.fr-sidebar {
  background: var(--grey-50, #f9fafb);
  border-right: 1px solid var(--grey-200, #e5e7eb);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  padding-bottom: 16px;
}
.fr-sidebar-header {
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--grey-400);
  padding: 14px 14px 6px;
}
.fr-folder-item {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 7px 12px;
  font-size: .83rem;
  color: var(--grey-700);
  text-decoration: none;
  border-radius: 6px;
  margin: 1px 6px;
  cursor: pointer;
  transition: background .12s;
  position: relative;
}
.fr-folder-item:hover { background: var(--grey-100, #f3f4f6); color: var(--navy); }
.fr-folder-item.active { background: var(--teal-light, #ccfbf1); color: var(--teal-dark, #0e7490); font-weight: 600; }
.fr-folder-icon { font-size: .95rem; flex-shrink: 0; }
.fr-folder-name { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fr-folder-count {
  font-size: .7rem;
  background: var(--grey-200, #e5e7eb);
  color: var(--grey-600);
  border-radius: 9px;
  padding: 1px 6px;
  flex-shrink: 0;
}
.fr-folder-del {
  display: none;
  background: none;
  border: none;
  color: var(--grey-400);
  cursor: pointer;
  font-size: 1rem;
  padding: 0 2px;
  line-height: 1;
  flex-shrink: 0;
}
.fr-folder-item:hover .fr-folder-del { display: block; }
.fr-folder-del:hover { color: var(--danger, #ef4444); }
.fr-new-folder-btn {
  margin: 8px 10px 0;
  padding: 6px 10px;
  background: none;
  border: 1px dashed var(--grey-300, #d1d5db);
  border-radius: 6px;
  color: var(--grey-500);
  font-size: .78rem;
  cursor: pointer;
  text-align: left;
  transition: border-color .15s, color .15s;
}
.fr-new-folder-btn:hover { border-color: var(--teal); color: var(--teal); }

/* ── Cloud Storage panel ── */
.fr-cloud-panel {
  padding: 10px;
}

.fr-cloud-panel-title {
  font-size: .75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--grey-400);
  margin-bottom: 10px;
}

.fr-cloud-panel-desc {
  font-size: .8rem;
  color: var(--grey-500);
  margin: 0 0 12px;
  line-height: 1.5;
}

.fr-cloud-connect-btn {
  display: inline-flex;
  width: 100%;
  justify-content: center;
  text-decoration: none;
}

.fr-cloud-provider {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 0;
}

.fr-cloud-provider-info {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.fr-cloud-dot { font-size: .7rem; flex-shrink: 0; }

.fr-cloud-provider-name {
  font-size: .82rem;
  font-weight: 600;
  color: var(--navy);
}

.fr-cloud-provider-sub {
  font-size: .74rem;
  color: var(--grey-500);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 130px;
}

.fr-cloud-browse-btn { flex-shrink: 0; }

/* File content area */
.fr-content {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.fr-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  border-bottom: 1px solid var(--grey-200, #e5e7eb);
  gap: 12px;
  flex-wrap: wrap;
  flex-shrink: 0;
}
.fr-toolbar-left { display: flex; align-items: baseline; gap: 10px; }
.fr-title { font-size: 1.05rem; font-weight: 700; color: var(--navy); margin: 0; }
.fr-count { font-size: .78rem; color: var(--grey-400); }
.fr-toolbar-right { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.fr-search {
  padding: 6px 12px;
  border: 1px solid var(--grey-300, #d1d5db);
  border-radius: 8px;
  font-size: .82rem;
  width: 180px;
  outline: none;
}
.fr-search:focus { border-color: var(--teal); }
.fr-sort-sel {
  padding: 6px 10px;
  border: 1px solid var(--grey-300, #d1d5db);
  border-radius: 8px;
  font-size: .82rem;
  background: #fff;
  cursor: pointer;
}
.fr-view-toggle { display: flex; gap: 2px; }
.fr-view-btn {
  background: none;
  border: 1px solid var(--grey-300, #d1d5db);
  border-radius: 6px;
  padding: 5px 9px;
  font-size: .9rem;
  cursor: pointer;
  color: var(--grey-500);
  transition: background .12s, color .12s;
}
.fr-view-btn.active, .fr-view-btn:hover { background: var(--teal); color: #fff; border-color: var(--teal); }

/* Breadcrumb (renders inside .fr-title so quick-filter JS keeps working) */
.fr-breadcrumb { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.fr-crumb { color: var(--grey-500); text-decoration: none; font-weight: 600; }
.fr-crumb:hover { color: var(--teal); }
.fr-crumb--current { color: var(--navy); }
.fr-crumb-sep { color: var(--grey-300, #d1d5db); }

/* Subfolders — shown above files, inside the current folder */
.fr-subfolders {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 14px 20px 0;
}
.fr-subfolder {
  display: flex;
  align-items: center;
  gap: 4px;
  background: var(--grey-50, #f9fafb);
  border: 1px solid var(--grey-200, #e5e7eb);
  border-radius: 8px;
  padding: 2px 4px 2px 10px;
  transition: background .12s;
}
.fr-subfolder:hover { background: var(--grey-100, #f3f4f6); }
.fr-subfolder-link {
  display: flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
  color: var(--navy);
  font-size: .85rem;
  font-weight: 600;
  padding: 6px 0;
}
.fr-subfolder-icon { font-size: .95rem; }
.fr-subfolder-name { max-width: 160px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fr-subfolder-actions { display: flex; gap: 2px; }
.fr-subfolder-act {
  background: none;
  border: none;
  cursor: pointer;
  font-size: .82rem;
  padding: 4px 5px;
  border-radius: 6px;
  line-height: 1;
  opacity: .6;
}
.fr-subfolder-act:hover { opacity: 1; background: var(--grey-200, #e5e7eb); }
@media (max-width: 640px) {
  .fr-subfolder-name { max-width: 38vw; }
}

.fr-file-area { flex: 1; overflow-y: auto; padding: 16px 20px; }

/* Empty state */
.fr-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 60px 20px;
  color: var(--grey-400);
  text-align: center;
}
.fr-empty-icon { font-size: 3rem; }
.fr-empty p { margin: 0; }

/* Grid view */
.fr-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 14px;
}
.fr-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 16px 10px 12px;
  background: #fff;
  border: 1px solid var(--grey-200, #e5e7eb);
  border-radius: 10px;
  text-decoration: none;
  color: inherit;
  transition: box-shadow .15s, border-color .15s;
  cursor: pointer;
  text-align: center;
}
.fr-card:hover { border-color: var(--teal); box-shadow: 0 4px 12px rgba(0,0,0,.08); }
.fr-card-icon { font-size: 2.2rem; }
.fr-card-name {
  font-size: .78rem;
  font-weight: 600;
  color: var(--navy);
  word-break: break-word;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.3;
}
.fr-card-meta { font-size: .7rem; color: var(--grey-400); }
.fr-card-folder { font-size: .68rem; color: var(--grey-400); background: var(--grey-100); padding: 2px 6px; border-radius: 4px; }

/* List view */
.fr-list { display: flex; flex-direction: column; gap: 0; }
.fr-list-header {
  display: grid;
  grid-template-columns: 1fr 160px 80px 110px 44px;
  padding: 6px 12px;
  font-size: .72rem;
  font-weight: 700;
  color: var(--grey-400);
  text-transform: uppercase;
  letter-spacing: .05em;
  border-bottom: 1px solid var(--grey-200);
}
.fr-row {
  display: grid;
  grid-template-columns: 1fr 160px 80px 110px 44px;
  align-items: center;
  padding: 8px 12px;
  border-bottom: 1px solid var(--grey-100);
  text-decoration: none;
  color: inherit;
  font-size: .83rem;
  transition: background .1s;
}
.fr-row:hover { background: var(--grey-50); }
.fr-row-name { display: flex; align-items: center; gap: 7px; font-weight: 500; color: var(--navy); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fr-row-folder { color: var(--grey-400); font-size: .78rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fr-row-size { color: var(--grey-500); font-size: .78rem; }
.fr-row-date { color: var(--grey-500); font-size: .78rem; }
.fr-row-actions { display: flex; justify-content: flex-end; }
.fr-row-dl {
  background: none;
  border: 1px solid var(--grey-300);
  border-radius: 5px;
  padding: 3px 7px;
  font-size: .8rem;
  cursor: pointer;
  color: var(--grey-500);
  transition: background .12s, color .12s;
}
.fr-row-dl:hover { background: var(--teal); color: #fff; border-color: var(--teal); }

/* File detail */
.fr-detail { max-width: 900px; margin: 0 auto; }
.fr-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: .82rem;
  color: var(--teal);
  text-decoration: none;
  font-weight: 500;
}
.fr-back:hover { text-decoration: underline; }
.fr-detail-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 0 18px;
  border-bottom: 1px solid var(--grey-200);
  margin-bottom: 24px;
}
.fr-detail-actions { display: flex; gap: 10px; align-items: center; }
.fr-detail-body {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 32px;
  align-items: start;
}
.fr-detail-preview {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 24px 16px;
  background: var(--grey-50);
  border: 1px solid var(--grey-200);
  border-radius: 12px;
  text-align: center;
}
.fr-detail-icon { font-size: 4rem; }
.fr-detail-filename { font-size: .82rem; font-weight: 600; color: var(--navy); word-break: break-word; line-height: 1.3; }
.fr-detail-ext { font-size: .7rem; color: var(--grey-400); background: var(--grey-200); border-radius: 4px; padding: 2px 8px; }
.fr-detail-meta { display: flex; flex-direction: column; gap: 16px; }
.fr-meta-table { width: 100%; border-collapse: collapse; font-size: .83rem; }
.fr-meta-table td { padding: 7px 10px; border-bottom: 1px solid var(--grey-100); }
.fr-meta-table td:first-child { color: var(--grey-500); font-weight: 500; width: 110px; }
.fr-meta-table td:last-child { color: var(--navy); }
.fr-detail-desc { font-size: .83rem; color: var(--grey-700); }
.fr-detail-desc p { margin: 4px 0 0; }
.fr-detail-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.fr-tag { font-size: .75rem; background: var(--teal-light, #ccfbf1); color: var(--teal-dark, #0e7490); border-radius: 6px; padding: 2px 8px; }
.fr-detail-section { border-top: 1px solid var(--grey-100); padding-top: 14px; }
.fr-detail-section h4 { margin: 0 0 10px; font-size: .83rem; color: var(--navy); font-weight: 700; }
.fr-move-row { display: flex; gap: 8px; align-items: center; }
.fr-move-row select { flex: 1; padding: 6px 10px; border: 1px solid var(--grey-300); border-radius: 7px; font-size: .82rem; }
.fr-tag-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.fr-tag-row select { padding: 6px 10px; border: 1px solid var(--grey-300); border-radius: 7px; font-size: .82rem; }
.fr-tag-msg { flex: 1; min-width: 140px; padding: 6px 10px; border: 1px solid var(--grey-300); border-radius: 7px; font-size: .82rem; }

/* Upload wizard */
.fr-upload { max-width: 680px; margin: 0 auto; }
.fr-upload-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
}
.fr-upload-header h2 { margin: 0; font-size: 1.1rem; font-weight: 700; color: var(--navy); }
.fr-upload-steps {
  display: flex;
  align-items: center;
  margin-bottom: 28px;
}
.fr-step {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--grey-400);
  font-size: .82rem;
}
.fr-step.active { color: var(--teal); }
.fr-step-num {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 2px solid currentColor;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .78rem;
  font-weight: 700;
  flex-shrink: 0;
}
.fr-step.active .fr-step-num { background: var(--teal); color: #fff; border-color: var(--teal); }
.fr-step-line { flex: 1; height: 1px; background: var(--grey-200); margin: 0 10px; }

.fr-dropzone {
  border: 2px dashed var(--grey-300);
  border-radius: 12px;
  padding: 40px 20px;
  text-align: center;
  cursor: pointer;
  transition: border-color .15s, background .15s;
  background: var(--grey-50);
}
.fr-dropzone:hover, .fr-dropzone.dragover { border-color: var(--teal); background: var(--teal-light, #f0fdfa); }
.fr-dropzone-icon { font-size: 2.5rem; margin-bottom: 8px; }
.fr-dropzone p { margin: 0 0 6px; font-size: .9rem; color: var(--grey-600); }
.fr-dropzone-label { color: var(--teal); cursor: pointer; text-decoration: underline; }
.fr-dropzone-hint { font-size: .78rem; color: var(--grey-400); }

.fr-selected-files { margin-top: 14px; }
.fr-file-chips { display: flex; flex-direction: column; gap: 6px; }
.fr-file-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  background: #fff;
  border: 1px solid var(--grey-200);
  border-radius: 8px;
  font-size: .82rem;
}
.fr-chip-name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--navy); font-weight: 500; }
.fr-chip-size { color: var(--grey-400); font-size: .75rem; flex-shrink: 0; }
.fr-chip-remove {
  background: none;
  border: none;
  color: var(--grey-400);
  cursor: pointer;
  font-size: 1.1rem;
  padding: 0;
  line-height: 1;
  flex-shrink: 0;
}
.fr-chip-remove:hover { color: var(--danger, #ef4444); }

.fr-upload-footer { display: flex; justify-content: flex-end; gap: 10px; margin-top: 20px; }
.fr-upload-form { display: flex; flex-direction: column; gap: 16px; margin-top: 4px; }
.fr-label { display: flex; flex-direction: column; gap: 5px; font-size: .83rem; font-weight: 600; color: var(--grey-700); }
.fr-label select, .fr-label input { padding: 7px 10px; border: 1px solid var(--grey-300); border-radius: 7px; font-size: .82rem; }
.fr-multi-select { height: 90px; }
.fr-hint { font-size: .73rem; color: var(--grey-400); font-weight: 400; }

/* Upload progress */
.fr-upload-progress { display: flex; flex-direction: column; gap: 10px; margin-top: 8px; }
.fr-progress-row {
  display: grid;
  grid-template-columns: 28px 1fr 90px;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: #fff;
  border: 1px solid var(--grey-200);
  border-radius: 8px;
  font-size: .82rem;
}
.fr-prog-icon { font-size: 1.2rem; }
.fr-prog-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--navy); font-weight: 500; grid-column: 2; }
.fr-prog-status { color: var(--grey-500); font-size: .75rem; text-align: right; }
.fr-prog-bar {
  grid-column: 1 / -1;
  height: 4px;
  background: var(--grey-100);
  border-radius: 2px;
  overflow: hidden;
  margin-top: 4px;
}
.fr-prog-fill { height: 100%; background: var(--teal); transition: width .3s ease; border-radius: 2px; }

.fr-upload-success {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 40px 20px;
  text-align: center;
  font-size: 1rem;
  font-weight: 600;
  color: var(--navy);
}
.fr-success-icon { font-size: 2.5rem; }

/* Responsive */
@media (max-width: 900px) {
  .fr-layout { grid-template-columns: 180px 1fr; }
}
@media (max-width: 700px) {
  .fr-layout { grid-template-columns: 1fr; height: auto; }
  .fr-sidebar { border-right: none; border-bottom: 1px solid var(--grey-200); max-height: 180px; }
  .fr-grid { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); }
  .fr-list-header, .fr-row { grid-template-columns: 1fr 70px 44px; }
  .fr-row-folder, .fr-row-date { display: none; }
  .fr-detail-body { grid-template-columns: 1fr; }
  .fr-detail-preview { flex-direction: row; text-align: left; padding: 12px 14px; }
}

/* ── File repo additions ── */
.fr-sidebar-divider { height: 1px; background: var(--grey-200); margin: 8px 10px; }
.fr-folder-item--sys .fr-folder-icon { opacity: .7; }

/* System folder banners */
.fr-system-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 16px;
  background: var(--teal-light, #f0fdfa);
  border-bottom: 1px solid var(--teal, #0d9488);
  font-size: .82rem;
  color: var(--teal-dark, #0e7490);
  flex-wrap: wrap;
}
.fr-system-banner--info { background: #eff6ff; border-color: #3b82f6; color: #1d4ed8; }
.fr-system-link { font-weight: 600; color: inherit; text-decoration: underline; white-space: nowrap; }

/* First-visit setup card */
.fr-setup-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  max-width: 480px;
  margin: 60px auto;
  padding: 40px 32px;
  background: #fff;
  border: 1px solid var(--grey-200);
  border-radius: 16px;
  text-align: center;
  box-shadow: 0 4px 24px rgba(0,0,0,.06);
}
.fr-setup-icon { font-size: 3.5rem; }
.fr-setup-card h2 { margin: 0; font-size: 1.25rem; color: var(--navy); }
.fr-setup-card p { margin: 0; font-size: .88rem; color: var(--grey-500); line-height: 1.55; }
.fr-setup-actions { display: flex; gap: 12px; margin-top: 8px; }

/* File detail image preview */
.fr-detail-img {
  width: 100%;
  max-height: 320px;
  object-fit: contain;
  border-radius: 8px;
  border: 1px solid var(--grey-200);
  background: var(--grey-50);
}
.fr-detail-pdf-hint {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 24px 16px;
  background: var(--grey-50);
  border: 1px solid var(--grey-200);
  border-radius: 12px;
  text-align: center;
}

/* Tagged users list in detail */
.fr-tagged-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 0;
  font-size: .83rem;
  color: var(--grey-700);
}
.fr-tagged-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--teal);
  color: #fff;
  font-size: .7rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.fr-tagged-name { font-weight: 500; }

/* Profile sub-nav */
.profile-subnav {
  display: flex;
  gap: 4px;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--grey-200);
  padding-bottom: 0;
}
.profile-subnav-link {
  padding: 8px 16px;
  font-size: .85rem;
  font-weight: 500;
  color: var(--grey-500);
  text-decoration: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: color .15s, border-color .15s;
}
.profile-subnav-link:hover { color: var(--navy); }
.profile-subnav-link.active { color: var(--teal); border-bottom-color: var(--teal); font-weight: 600; }

/* Notification preferences */
.notif-prefs-wrap { max-width: 640px; }
.card-desc { font-size: .83rem; color: var(--grey-500); margin: -4px 0 14px; }
.notif-pref-row {
  display: flex;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--grey-100);
}
.notif-pref-row:last-of-type { border-bottom: none; }
.notif-pref-row--dim { opacity: .55; }
.notif-pref-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  font-size: .84rem;
  color: var(--grey-700);
  cursor: pointer;
  gap: 12px;
}
.notif-pref-toggle { flex-shrink: 0; position: relative; }
.notif-toggle-inp { position: absolute; opacity: 0; width: 0; height: 0; }
.notif-toggle-track {
  display: block;
  width: 40px;
  height: 22px;
  border-radius: 11px;
  background: var(--grey-300);
  cursor: pointer;
  transition: background .2s;
  position: relative;
}
.notif-toggle-inp:checked + .notif-toggle-track { background: var(--teal); }
.notif-toggle-track::after {
  content: '';
  position: absolute;
  left: 3px; top: 3px;
  width: 16px; height: 16px;
  background: #fff;
  border-radius: 50%;
  transition: left .2s;
  box-shadow: 0 1px 3px rgba(0,0,0,.2);
}
.notif-toggle-inp:checked + .notif-toggle-track::after { left: 21px; }
.notif-toggle-track--dim { cursor: not-allowed; }
.notif-coming-chip {
  font-size: .7rem;
  background: var(--grey-200);
  color: var(--grey-500);
  border-radius: 6px;
  padding: 1px 6px;
  margin-left: 6px;
  font-weight: 600;
}
.notif-email-banner {
  padding: 12px 14px;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 8px;
  font-size: .83rem;
  color: #1e40af;
  margin-bottom: 14px;
  line-height: 1.5;
}

/* ── Model Register ── */
.mr-toolbar { display:flex; align-items:center; gap:10px; flex-wrap:wrap; margin-bottom:16px; }
.mr-filter-panel { background:var(--white); border:1px solid var(--border); border-radius:10px; padding:14px 18px; margin-bottom:16px; display:flex; gap:24px; flex-wrap:wrap; }
.mr-filter-group { display:flex; flex-direction:column; gap:6px; min-width:120px; }
.mr-filter-group label { font-size:.7rem; font-weight:700; text-transform:uppercase; color:var(--grey-500); letter-spacing:.04em; }
.mr-filter-opts { display:flex; flex-wrap:wrap; gap:6px; }
.mr-filter-clear { font-size:.75rem; color:var(--teal); background:none; border:none; cursor:pointer; padding:0; margin-top:2px; text-align:left; }
.mr-table-wrap { background:var(--white); border:1px solid var(--border); border-radius:10px; overflow:hidden; }
.mr-table { width:100%; border-collapse:collapse; font-size:.84rem; }
.mr-table th { padding:10px 14px; text-align:left; font-size:.72rem; font-weight:700; text-transform:uppercase; color:var(--grey-500); letter-spacing:.04em; background:var(--grey-50); border-bottom:1px solid var(--border); }
.mr-table td { padding:10px 14px; border-bottom:1px solid var(--border); vertical-align:middle; }
.mr-table tr:last-child td { border-bottom:none; }
.mr-table tr:hover td { background:rgba(0,166,166,.03); cursor:pointer; }
.mr-model-num { font-family:monospace; font-size:.88rem; font-weight:600; color:var(--navy); }
.mr-model-num.mr-current { color:var(--teal); }
.mr-current-star { color:#f59e0b; font-size:1rem; margin-right:3px; }
.mr-current-badge { display:inline-flex; align-items:center; gap:4px; background:#fef3c7; color:#92400e; font-size:.72rem; font-weight:700; padding:2px 8px; border-radius:10px; }
.mr-soft-badge { display:inline-block; font-size:.75rem; font-weight:600; padding:2px 8px; border-radius:8px; white-space:nowrap; }
.mr-link-chip { display:inline-block; font-size:.75rem; color:var(--teal); background:rgba(0,166,166,.08); padding:2px 8px; border-radius:8px; font-weight:500; }
.mr-ext-badge { display:inline-block; font-size:.72rem; font-weight:700; padding:2px 7px; border-radius:6px; background:var(--grey-100); color:var(--grey-600); font-family:monospace; }
.mr-card-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(260px,1fr)); gap:14px; }
.mr-card { background:var(--white); border:1px solid var(--border); border-radius:10px; padding:16px; cursor:pointer; transition:box-shadow .15s; }
.mr-card:hover { box-shadow:0 4px 12px rgba(0,0,0,.1); border-color:var(--teal); }
.mr-card-header { display:flex; align-items:flex-start; gap:10px; margin-bottom:10px; }
.mr-card-icon { font-size:1.8rem; flex-shrink:0; }
.mr-card-title { font-weight:700; font-size:.92rem; color:var(--navy); line-height:1.3; }
.mr-card-num { font-family:monospace; font-size:.8rem; color:var(--grey-500); margin-top:2px; }
.mr-card-meta { display:flex; gap:6px; flex-wrap:wrap; margin-top:8px; }
.mr-detail-topbar { display:flex; align-items:flex-start; justify-content:space-between; gap:16px; flex-wrap:wrap; margin-bottom:20px; }
.mr-detail-num { font-family:monospace; font-size:1.2rem; font-weight:700; color:var(--navy); }
.mr-detail-title { font-size:1rem; color:var(--grey-600); margin-top:4px; }
.mr-detail-actions { display:flex; gap:8px; flex-wrap:wrap; align-items:flex-start; padding-top:4px; }
.mr-detail-layout { display:grid; grid-template-columns:1fr 380px; gap:20px; align-items:start; }
@media (max-width:900px) { .mr-detail-layout { grid-template-columns:1fr; } }
.mr-meta-card { background:var(--white); border:1px solid var(--border); border-radius:10px; padding:18px; margin-bottom:14px; }
.mr-meta-card h3 { font-size:.88rem; font-weight:700; color:var(--navy); margin:0 0 12px; text-transform:uppercase; letter-spacing:.04em; }
.mr-meta-row { display:flex; gap:12px; padding:6px 0; border-bottom:1px solid var(--grey-100); font-size:.84rem; }
.mr-meta-row:last-child { border-bottom:none; }
.mr-meta-label { flex:0 0 110px; color:var(--grey-500); font-size:.8rem; }
.mr-meta-value { color:var(--navy); flex:1; }
.mr-linked-row { display:flex; align-items:center; gap:10px; padding:7px 0; border-bottom:1px solid var(--grey-100); font-size:.83rem; }
.mr-linked-row:last-child { border-bottom:none; }
.mr-linked-num { font-family:monospace; font-weight:600; color:var(--teal); text-decoration:none; flex-shrink:0; }
.mr-linked-num:hover { text-decoration:underline; }
.mr-linked-title { flex:1; color:var(--grey-600); }
.mr-link-section { margin-top:10px; }
.mr-draw-pick-row { display:flex; align-items:center; gap:8px; padding:6px 8px; border-radius:6px; font-size:.82rem; }
.mr-draw-pick-row:hover { background:var(--grey-50); }
.mr-pick-num { font-family:monospace; font-weight:600; color:var(--navy); flex:0 0 100px; }
.mr-pick-title { flex:1; color:var(--grey-600); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.mr-pick-rev { font-size:.75rem; color:var(--grey-400); flex:0 0 50px; text-align:center; }
.mr-pick-link { flex-shrink:0; }
.mr-link-tag { display:inline-flex; align-items:center; gap:4px; background:rgba(0,166,166,.08); color:var(--teal); font-size:.78rem; padding:3px 10px; border-radius:12px; margin:2px; }
.mr-event-row { display:flex; align-items:flex-start; gap:10px; padding:8px 0; border-bottom:1px solid var(--grey-100); font-size:.82rem; }
.mr-event-row:last-child { border-bottom:none; }
.mr-event-dot { width:8px; height:8px; border-radius:50%; background:var(--teal); flex-shrink:0; margin-top:4px; }
.mr-event-text { flex:1; color:var(--grey-700); }
.mr-event-time { color:var(--grey-400); font-size:.76rem; flex-shrink:0; }
.mr-autodetect-banner { background:rgba(0,166,166,.07); border:1px solid rgba(0,166,166,.2); border-radius:8px; padding:12px 14px; margin-bottom:12px; }
.mr-autodetect-banner h4 { margin:0 0 8px; font-size:.82rem; color:var(--teal); font-weight:700; }
.mr-autodetect-chip { display:inline-flex; align-items:center; gap:6px; background:rgba(0,166,166,.1); border:1px solid rgba(0,166,166,.25); padding:4px 10px; border-radius:20px; font-size:.8rem; cursor:pointer; margin:3px; }
.mr-autodetect-chip input { margin:0; cursor:pointer; accent-color:var(--teal); }
.mr-wizard-steps { display:flex; gap:0; margin-bottom:24px; counter-reset:step; }
.mr-step { flex:1; display:flex; flex-direction:column; align-items:center; gap:4px; font-size:.76rem; color:var(--grey-400); position:relative; }
.mr-step::before { counter-increment:step; content:counter(step); width:28px; height:28px; border-radius:50%; background:var(--grey-200); color:var(--grey-500); display:flex; align-items:center; justify-content:center; font-weight:700; font-size:.78rem; }
.mr-step::after { content:''; position:absolute; top:14px; left:50%; right:-50%; height:2px; background:var(--grey-200); z-index:0; }
.mr-step:last-child::after { display:none; }
.mr-step.active::before { background:var(--teal); color:#fff; }
.mr-step.active { color:var(--teal); font-weight:600; }
.mr-step.done::before { background:var(--teal); color:#fff; content:'✓'; }
.mr-upload-zone { border:2px dashed var(--border); border-radius:10px; padding:40px 20px; text-align:center; cursor:pointer; transition:border-color .15s,background .15s; background:var(--grey-50); }
.mr-upload-zone.drag-over { border-color:var(--teal); background:rgba(0,166,166,.06); }
.mr-upload-icon { font-size:2.5rem; margin-bottom:10px; }
.mr-upload-hint { font-size:.84rem; color:var(--grey-500); margin-top:8px; }
.mr-selected-file { display:flex; align-items:center; gap:12px; padding:12px 16px; background:rgba(0,166,166,.07); border-radius:8px; margin-top:12px; font-size:.88rem; }
.mr-selected-file-icon { font-size:1.6rem; }
.mr-selected-file-name { font-weight:600; color:var(--navy); }
.mr-selected-file-size { color:var(--grey-500); font-size:.8rem; margin-top:2px; }
.mr-upload-prog-bar { width:100%; height:8px; background:var(--grey-200); border-radius:4px; overflow:hidden; margin:16px 0 8px; }
.mr-upload-prog-fill { height:100%; background:var(--teal); border-radius:4px; transition:width .3s; }
.btn-xs { display:inline-flex; align-items:center; font-size:.78rem; font-weight:600; padding:3px 10px; border-radius:6px; border:1px solid var(--border); background:var(--white); color:var(--grey-700); cursor:pointer; text-decoration:none; transition:background .15s,border-color .15s; gap:4px; }
.btn-xs:hover { background:var(--grey-50); border-color:var(--grey-400); }
.btn-xs.btn-xs--danger { border-color:#fca5a5; color:#dc2626; }
.btn-xs.btn-xs--danger:hover { background:#fef2f2; }

/* ── Beta Banner ── */
.beta-banner { display:flex; align-items:center; justify-content:center; gap:10px; height:32px; background:#E0F7F7; color:var(--navy); font-size:.78rem; font-weight:500; padding:0 16px; position:relative; flex-shrink:0; }
.beta-banner[hidden] { display:none !important; }
.beta-banner-text { flex:1; text-align:center; }
.beta-banner-dismiss { position:absolute; right:14px; top:50%; transform:translateY(-50%); background:none; border:none; font-size:1.1rem; cursor:pointer; color:var(--grey-500); line-height:1; padding:0 4px; }
.beta-banner-dismiss:hover { color:var(--navy); }
@media (max-width:600px) { .beta-banner-text::after { content:'Private beta'; } .beta-banner-text { font-size:0; } .beta-banner-text::after { font-size:.76rem; } }

/* ── Beta Code Gate ── */
.beta-gate-page { display:flex; align-items:center; justify-content:center; min-height:60vh; padding:40px 16px; }
.beta-gate-card { background:var(--white); border:1px solid var(--border); border-radius:14px; padding:40px 36px; max-width:440px; width:100%; text-align:center; box-shadow:0 4px 24px rgba(0,0,0,.08); }
.beta-gate-icon { font-size:2.8rem; margin-bottom:16px; }
.beta-gate-card h2 { font-size:1.3rem; color:var(--navy); margin:0 0 10px; }
.beta-gate-card p { font-size:.9rem; color:var(--grey-600); margin:0 0 4px; line-height:1.6; }
.beta-gate-card .form-group { text-align:left; }
.beta-gate-actions { display:flex; gap:10px; justify-content:center; margin-top:16px; }
.beta-gate-contact { font-size:.8rem; color:var(--grey-400); margin-top:16px; }
.beta-gate-contact a { color:var(--teal); }
.beta-cap-banner { background:#fef3c7; border:1px solid #fcd34d; border-radius:8px; padding:12px 14px; font-size:.84rem; color:#92400e; line-height:1.5; margin:12px 0; }
.beta-cap-banner a { color:#92400e; font-weight:600; }

/* ── Beta Usage Widget ── */
.beta-usage-wrap { padding:4px 0; }
.beta-usage-row { display:flex; align-items:center; gap:10px; padding:8px 0; border-bottom:1px solid var(--grey-100); font-size:.84rem; }
.beta-usage-row:last-child { border-bottom:none; }
.beta-usage-label { flex:1; color:var(--grey-600); }
.beta-usage-right { display:flex; align-items:center; gap:10px; flex:0 0 auto; }
.beta-usage-bar { width:100px; height:6px; background:var(--grey-200); border-radius:3px; overflow:hidden; }
.beta-usage-fill { height:100%; border-radius:3px; transition:width .3s; }
.beta-usage-vals { font-size:.78rem; color:var(--grey-500); white-space:nowrap; min-width:80px; text-align:right; }

/* ── Sidebar divider ── */
.sidebar-divider { height:1px; background:var(--border); margin:10px 0; }

/* ── Admin Panel ── */
.admin-page { max-width:1100px; }
.admin-stats-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(160px,1fr)); gap:12px; margin-bottom:28px; }
.admin-stat-card { background:var(--white); border:1px solid var(--border); border-radius:10px; padding:16px 18px; text-align:center; }
.admin-stat-card--cost { border-color:#fcd34d; background:#fffbeb; }
.admin-stat-num { font-size:1.6rem; font-weight:700; color:var(--navy); }
.admin-stat-label { font-size:.75rem; color:var(--grey-500); margin-top:4px; font-weight:500; }
.admin-section { background:var(--white); border:1px solid var(--border); border-radius:10px; padding:22px 24px; margin-bottom:20px; }
.admin-section-header { display:flex; align-items:center; justify-content:space-between; margin-bottom:16px; }
.admin-section h2 { font-size:1rem; font-weight:700; color:var(--navy); margin:0 0 16px; }
.admin-section-header h2 { margin:0; }
.admin-table { width:100%; border-collapse:collapse; font-size:.84rem; }
.admin-table th { padding:9px 12px; text-align:left; font-size:.7rem; font-weight:700; text-transform:uppercase; color:var(--grey-500); letter-spacing:.04em; background:var(--grey-50); border-bottom:1px solid var(--border); }
.admin-table td { padding:9px 12px; border-bottom:1px solid var(--border); vertical-align:middle; }
.admin-table tr:last-child td { border-bottom:none; }
.admin-table .admin-row-warn td { background:#fffbeb; }
.admin-code-str { background:var(--grey-100); padding:2px 6px; border-radius:4px; font-size:.85rem; letter-spacing:.06em; font-weight:700; color:var(--navy); }
.admin-status-chip { display:inline-block; font-size:.72rem; font-weight:700; padding:2px 8px; border-radius:10px; }
.admin-status-chip.active { background:#dcfce7; color:#166534; }
.admin-status-chip.inactive { background:var(--grey-100); color:var(--grey-500); }
.admin-gen-form { margin-bottom:16px; padding:16px 18px; }
.admin-redemptions-row { font-size:.75rem; }

/* ── Risk Register ── */
.rk-page { max-width:1200px; }
.rk-tabs { display:flex; gap:0; margin-bottom:20px; border-bottom:2px solid var(--border); }
.rk-tab { background:none; border:none; padding:10px 20px; font-size:.88rem; font-weight:600; color:var(--grey-500); cursor:pointer; border-bottom:2px solid transparent; margin-bottom:-2px; transition:color .15s,border-color .15s; }
.rk-tab.active { color:var(--teal); border-bottom-color:var(--teal); }
.rk-tab:hover:not(.active) { color:var(--grey-700); }
/* [hidden] overrides for risk register */
#rkTableView[hidden],#rkDashView[hidden],#rkAdvFilters[hidden],#rkAiPanel[hidden],#rkAiSpinner[hidden],
#rkAiScoreHint[hidden],#rkLiveScore[hidden],#rkLessonsPanel[hidden],#rkLessonsList[hidden],
#rkSaveSuccess[hidden],.rk-close-modal[hidden],#rkExportDropdown[hidden],#rkPanel2[hidden],
#rkPanel3[hidden],#rkPanel4[hidden],#rkPanel5[hidden] { display:none !important; }
/* Stat cards */
.rk-stats-row { display:grid; grid-template-columns:repeat(auto-fill,minmax(140px,1fr)); gap:12px; margin-bottom:20px; }
.rk-stat-card { background:var(--white); border:1px solid var(--border); border-radius:10px; padding:16px; text-align:center; }
.rk-stat-card.blue { border-color:#93c5fd; background:#eff6ff; }
.rk-stat-card.red  { border-color:#fca5a5; background:#fef2f2; }
.rk-stat-card.orange { border-color:#fcd34d; background:#fffbeb; }
.rk-stat-card.green { border-color:#6ee7b7; background:#ecfdf5; }
.rk-stat-card.grey  { border-color:var(--border); background:var(--grey-50); }
.rk-stat-num { font-size:1.8rem; font-weight:700; color:var(--navy); }
.rk-stat-label { font-size:.74rem; color:var(--grey-500); margin-top:3px; font-weight:500; }
@keyframes rkPulse { 0%,100% { box-shadow:0 0 0 0 rgba(239,68,68,.4); } 50% { box-shadow:0 0 0 8px rgba(239,68,68,0); } }
.rk-pulse { animation:rkPulse 2s infinite; }
/* Filter bar */
.rk-filter-bar { display:flex; align-items:center; gap:10px; flex-wrap:wrap; margin-bottom:12px; }
.rk-search-input { flex:1; min-width:180px; height:34px; padding:0 12px; border:1.5px solid var(--grey-300); border-radius:8px; font-size:.88rem; }
.rk-filter-label { display:flex; align-items:center; gap:5px; font-size:.84rem; cursor:pointer; color:var(--grey-600); white-space:nowrap; }
.rk-select { height:34px; padding:0 10px; border:1.5px solid var(--grey-300); border-radius:8px; font-size:.84rem; }
.rk-adv-filters { background:var(--white); border:1px solid var(--border); border-radius:10px; padding:16px 18px; margin-bottom:12px; display:flex; gap:24px; flex-wrap:wrap; }
.rk-adv-group { display:flex; flex-direction:column; gap:6px; min-width:120px; }
.rk-adv-group > label { font-size:.7rem; font-weight:700; text-transform:uppercase; color:var(--grey-500); letter-spacing:.04em; }
.rk-adv-opts { display:flex; flex-wrap:wrap; gap:6px; }
.rk-cat-dot { display:inline-block; width:8px; height:8px; border-radius:50%; margin-right:3px; }
/* Table */
.rk-table-wrap { background:var(--white); border:1px solid var(--border); border-radius:10px; overflow:hidden; overflow-x:auto; }
.rk-table { width:100%; border-collapse:collapse; font-size:.84rem; }
.rk-table th { padding:10px 12px; text-align:left; font-size:.7rem; font-weight:700; text-transform:uppercase; color:var(--grey-500); letter-spacing:.04em; background:var(--grey-50); border-bottom:1px solid var(--border); white-space:nowrap; }
.rk-table td { padding:9px 12px; border-bottom:1px solid var(--border); vertical-align:middle; }
.rk-table tr:last-child td { border-bottom:none; }
.rk-row { cursor:pointer; transition:background .1s; }
.rk-row:hover td { background:rgba(0,166,166,.03); }
.rk-row-overdue td { background:#fff5f5; }
.rk-id-chip { font-family:monospace; font-weight:700; background:var(--grey-100); padding:2px 7px; border-radius:5px; font-size:.82rem; color:var(--navy); }
.rk-title-cell { max-width:220px; }
.rk-title { display:block; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-weight:500; }
.rk-status-badge { display:inline-block; font-size:.75rem; font-weight:600; padding:2px 8px; border-radius:8px; white-space:nowrap; }
.rk-cat-badge { display:inline-block; font-size:.75rem; font-weight:600; padding:2px 8px; border-radius:8px; white-space:nowrap; }
.rk-res-score { display:inline-block; font-size:.78rem; font-weight:700; padding:2px 7px; border-radius:6px; }
.risk-level-badge { display:inline-block; font-size:.75rem; font-weight:700; padding:2px 8px; border-radius:8px; white-space:nowrap; }
.risk-level-badge.low     { background:#D1FAE5; color:#065F46; }
.risk-level-badge.medium  { background:#FEF3C7; color:#92400E; }
.risk-level-badge.high    { background:#FED7AA; color:#C2410C; }
.risk-level-badge.extreme { background:#FEE2E2; color:#991B1B; }
/* Heat map */
.rk-heatmap { display:flex; flex-direction:column; gap:4px; }
.rk-heatmap-y-label { font-size:.7rem; color:var(--grey-400); text-align:center; writing-mode:horizontal-tb; margin-bottom:4px; }
.rk-heatmap-grid { display:flex; flex-direction:column; gap:2px; }
.rk-heatmap-axis-row,.rk-heatmap-row { display:flex; gap:2px; align-items:center; }
.rk-heatmap-corner { width:28px; height:28px; flex-shrink:0; }
.rk-heatmap-axis-cell { width:52px; height:28px; display:flex; align-items:center; justify-content:center; font-size:.72rem; font-weight:600; color:var(--grey-400); flex-shrink:0; }
.rk-heatmap-cell { width:52px; height:52px; border-radius:4px; display:flex; align-items:center; justify-content:center; position:relative; flex-shrink:0; transition:opacity .15s; }
.rk-cell-clickable { cursor:pointer; }
.rk-cell-clickable:hover { opacity:.75; outline:2px solid var(--navy); }
.rk-cell-bubble { width:28px; height:28px; border-radius:50%; display:flex; align-items:center; justify-content:center; font-size:.82rem; font-weight:700; background:rgba(255,255,255,.8); border:1.5px solid currentColor; }
.rk-heatmap-x-label { font-size:.7rem; color:var(--grey-400); text-align:center; margin-top:4px; }
.rk-heatmap-legend { display:flex; gap:6px; flex-wrap:wrap; margin-top:8px; }
.rk-legend-item { font-size:.72rem; font-weight:600; padding:2px 8px; border-radius:6px; }
.rk-dash-grid { display:grid; grid-template-columns:1fr 1fr; gap:16px; }
@media (max-width:700px) { .rk-dash-grid { grid-template-columns:1fr; } .rk-heatmap-cell { width:40px; height:40px; } .rk-heatmap-axis-cell { width:40px; } }
/* AI summary panel */
.rk-ai-summary-panel { margin-bottom:16px; }
.rk-ai-summary-loading { display:flex; align-items:center; gap:10px; padding:14px 18px; background:var(--grey-50); border-radius:10px; font-size:.88rem; color:var(--grey-500); }
.rk-ai-executive-box { position:relative; padding:16px 20px; background:rgba(0,166,166,.06); border:1px solid rgba(0,166,166,.2); border-radius:10px; }
.rk-ai-executive-label { font-size:.72rem; font-weight:700; color:var(--teal); text-transform:uppercase; letter-spacing:.06em; margin-bottom:8px; }
.rk-ai-executive-text { font-size:.9rem; color:var(--navy); line-height:1.7; }
.rk-ai-refresh-btn { position:absolute; top:12px; right:14px; background:none; border:none; font-size:1.1rem; cursor:pointer; color:var(--teal); }
/* Wizard */
.rk-wizard { max-width:640px; }
.rk-wizard-header { display:flex; align-items:center; justify-content:space-between; margin-bottom:24px; }
.rk-wizard-header h1 { font-size:1.4rem; color:var(--navy); margin:0; }
.rk-wizard-steps { display:flex; align-items:center; margin-bottom:28px; }
.rk-wstep { display:flex; flex-direction:column; align-items:center; gap:4px; flex:1; }
.rk-wstep-dot { width:28px; height:28px; border-radius:50%; background:var(--grey-200); color:var(--grey-500); display:flex; align-items:center; justify-content:center; font-weight:700; font-size:.78rem; transition:background .2s; }
.rk-wstep span { font-size:.7rem; color:var(--grey-400); }
.rk-wstep.active .rk-wstep-dot { background:var(--teal); color:#fff; }
.rk-wstep.active span { color:var(--teal); font-weight:600; }
.rk-wstep.done .rk-wstep-dot { background:var(--teal); color:#fff; }
.rk-wstep.done .rk-wstep-dot::after { content:'✓'; }
.rk-wstep.done .rk-wstep-dot { font-size:0; }
.rk-wstep.done .rk-wstep-dot::after { font-size:.78rem; }
.rk-wstep-line { flex:1; height:2px; background:var(--grey-200); margin:0 4px; margin-bottom:18px; }
.rk-wizard-panel h2 { font-size:1.1rem; color:var(--navy); margin:0 0 20px; }
.rk-wizard-nav { display:flex; justify-content:space-between; margin-top:24px; }
.rk-wizard-panel[hidden] { display:none !important; }
/* AI panel in wizard */
.rk-desc-wrap { position:relative; }
.rk-voice-btn { position:absolute; right:10px; bottom:10px; background:none; border:none; font-size:1.3rem; cursor:pointer; transition:transform .15s; }
.rk-voice-btn:hover { transform:scale(1.15); }
.rk-voice-btn.rk-voice-active { color:var(--danger); animation:rkPulse 1s infinite; }
.rk-voice-unsupported { position:absolute; right:10px; bottom:10px; font-size:1.3rem; opacity:.3; }
.rk-ai-spinner { display:flex; align-items:center; gap:8px; font-size:.82rem; color:var(--grey-500); margin-top:6px; }
.rk-ai-panel { background:rgba(0,166,166,.05); border:1px solid rgba(0,166,166,.2); border-radius:10px; padding:16px 18px; margin-top:12px; }
.rk-ai-panel-header { font-size:.82rem; font-weight:700; color:var(--teal); margin-bottom:10px; }
.rk-ai-statement-preview { font-size:.9rem; color:var(--navy); line-height:1.7; font-style:italic; }
.rk-ai-panel-actions { display:flex; gap:8px; margin-top:12px; }
.rk-ai-suggestions { margin-top:10px; }
.rk-ai-chip { display:inline-block; background:rgba(0,166,166,.08); color:var(--teal); border:1px solid rgba(0,166,166,.2); padding:3px 10px; border-radius:12px; font-size:.78rem; margin:2px; }
.rk-ai-score-hint { margin-top:12px; }
/* Lessons */
.rk-lessons-panel { margin-top:12px; border:1px solid var(--grey-200); border-radius:8px; overflow:hidden; }
.rk-lessons-header { padding:10px 14px; font-size:.82rem; font-weight:600; color:var(--grey-600); cursor:pointer; background:var(--grey-50); }
.rk-lessons-header:hover { background:var(--grey-100); }
.rk-lessons-list { padding:10px 14px; }
.rk-lesson-item { padding:8px 0; border-bottom:1px solid var(--grey-100); font-size:.84rem; }
.rk-lesson-item:last-child { border-bottom:none; }
/* Score buttons */
.rk-score-section { display:flex; flex-direction:column; gap:20px; }
.rk-score-axis-label { font-size:.82rem; font-weight:700; color:var(--grey-500); text-transform:uppercase; letter-spacing:.04em; margin-bottom:8px; }
.rk-score-btns { display:flex; gap:8px; flex-wrap:wrap; }
.rk-score-btn { min-width:80px; padding:10px 8px; border:2px solid var(--border); border-radius:8px; background:var(--white); cursor:pointer; display:flex; flex-direction:column; align-items:center; gap:4px; transition:border-color .15s,background .15s; }
.rk-score-btn:hover { border-color:var(--teal); background:rgba(0,166,166,.04); }
.rk-score-btn.selected { border-color:var(--teal); background:rgba(0,166,166,.1); }
.rk-score-val { font-size:1.2rem; font-weight:700; color:var(--navy); }
.rk-score-desc { font-size:.68rem; color:var(--grey-500); text-align:center; }
.rk-score-btn--sm { min-width:40px; padding:8px 6px; }
.rk-score-btn--sm .rk-score-val { font-size:.9rem; }
.rk-live-score { margin-top:16px; padding:14px 16px; background:var(--grey-50); border-radius:10px; }
.rk-live-score-inner { display:flex; align-items:center; gap:10px; font-size:.9rem; font-weight:600; color:var(--grey-600); }
.rk-live-score-num { font-size:1.4rem; font-weight:700; color:var(--navy); }
.rk-chip-suggestions { display:flex; flex-wrap:wrap; gap:6px; margin-top:8px; }
.rk-chip-btn { background:rgba(0,166,166,.08); border:1px solid rgba(0,166,166,.2); color:var(--teal); font-size:.78rem; padding:3px 10px; border-radius:12px; cursor:pointer; transition:background .15s; }
.rk-chip-btn:hover:not(:disabled) { background:rgba(0,166,166,.18); }
.rk-chip-btn:disabled { opacity:.4; cursor:default; }
/* Attachment drop */
.rk-att-drop { border:2px dashed var(--border); border-radius:10px; padding:30px 20px; text-align:center; cursor:pointer; background:var(--grey-50); transition:border-color .15s; }
.rk-att-drop.drag-over { border-color:var(--teal); background:rgba(0,166,166,.04); }
.rk-att-drop-icon { font-size:1.8rem; margin-bottom:8px; }
.rk-att-hint { font-size:.78rem; color:var(--grey-400); margin-top:6px; }
.rk-att-list { display:flex; flex-direction:column; gap:4px; }
.rk-att-item { display:inline-flex; align-items:center; gap:8px; padding:4px 10px; background:var(--grey-50); border-radius:6px; font-size:.84rem; text-decoration:none; color:var(--grey-700); }
.rk-att-item:hover { background:var(--grey-100); }
/* Detail page */
.rk-detail { max-width:1100px; }
.rk-detail-topbar { display:flex; align-items:flex-start; justify-content:space-between; gap:16px; flex-wrap:wrap; margin-bottom:20px; }
.rk-detail-title { font-size:1.1rem; color:var(--grey-700); margin-top:6px; font-weight:500; }
.rk-detail-actions { display:flex; gap:8px; flex-wrap:wrap; padding-top:4px; }
.rk-detail-layout { display:grid; grid-template-columns:1fr 360px; gap:20px; align-items:start; }
@media (max-width:900px) { .rk-detail-layout { grid-template-columns:1fr; } }
.rk-statement-text { font-size:.95rem; color:var(--navy); line-height:1.8; font-style:italic; }
.rk-score-panel { padding:12px; border-radius:8px; text-align:center; }
.rk-score-label { font-size:.72rem; font-weight:700; text-transform:uppercase; letter-spacing:.04em; margin-bottom:4px; }
.rk-score-num { font-size:1.6rem; font-weight:700; }
.rk-score-detail { font-size:.78rem; margin-top:2px; }
/* Close modal */
.rk-close-modal { position:fixed; inset:0; z-index:1000; display:flex; align-items:center; justify-content:center; padding:16px; }
.rk-close-modal-backdrop { position:absolute; inset:0; background:rgba(0,0,0,.45); }
.rk-close-modal-content { position:relative; background:var(--white); border-radius:14px; padding:28px 32px; max-width:480px; width:100%; z-index:1; box-shadow:0 8px 40px rgba(0,0,0,.2); }
.rk-close-modal-content h3 { margin:0 0 8px; font-size:1.1rem; color:var(--navy); }
/* Export dropdown */
.rk-export-dropdown { position:absolute; top:38px; right:0; background:var(--white); border:1px solid var(--border); border-radius:8px; box-shadow:0 4px 16px rgba(0,0,0,.12); min-width:140px; z-index:100; overflow:hidden; }
.rk-export-dropdown button { display:block; width:100%; text-align:left; padding:10px 14px; background:none; border:none; font-size:.86rem; cursor:pointer; color:var(--grey-700); }
.rk-export-dropdown button:hover { background:var(--grey-50); }
/* Dashboard widget */
.dash-risk-widget { border-color:var(--border); }
.dash-risk-widget--extreme { border-color:#fca5a5; background:linear-gradient(135deg,#fff5f5,var(--white)); }
.dash-risk-extreme-list { display:flex; flex-direction:column; gap:6px; }
.dash-risk-extreme-row { display:flex; align-items:center; gap:10px; padding:8px 10px; border-radius:8px; cursor:pointer; transition:background .1s; font-size:.84rem; }
.dash-risk-extreme-row:hover { background:var(--grey-50); }
.dash-risk-id { font-family:monospace; font-weight:700; color:var(--navy); flex-shrink:0; }
.dash-risk-title { flex:1; color:var(--grey-700); overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
/* Empty state */
.rk-empty { text-align:center; padding:60px 20px; color:var(--grey-400); }
.rk-empty-icon { font-size:3rem; margin-bottom:16px; }
.rk-empty h3 { color:var(--grey-500); font-size:1.1rem; margin:0 0 8px; }
.rk-empty p { font-size:.88rem; margin:0 0 20px; }
/* Mobile */
@media (max-width:640px) {
  .rk-score-btn { min-width:56px; padding:8px 4px; }
  .rk-table { font-size:.78rem; }
  .rk-table th, .rk-table td { padding:7px 8px; }
}

/* ── Approvals & Deliverables Tracker ── */
/* [hidden] overrides */
#apSuggestModal[hidden],#apImportModal[hidden],#apExportDropdown[hidden],#apAdvFilters[hidden],
#apAiContent[hidden],#apSugStep2[hidden],#apImportStep2[hidden],#apBulkBar[hidden],
#apClearFilters[hidden],#apReadinessCatWrap[hidden],#apEdReadinessCatWrap[hidden],
#apNewTagForm[hidden],#apTmplPreviewModal[hidden],#apSaveTmplModal[hidden],
#apTmplDropdown[hidden],#apTmplReplaceWarn[hidden],
.ap-sug-panel.hidden,.ap-sug-panel[hidden] { display:none !important; }

.ap-page { max-width:1300px; }
.ap-stats-row { display:grid; grid-template-columns:repeat(auto-fill,minmax(130px,1fr)); gap:12px; margin-bottom:16px; }
.ap-readiness-card { background:var(--white); border:1px solid var(--border); border-radius:10px; padding:12px; display:flex; flex-direction:column; align-items:center; justify-content:center; }
.ap-mini-stat { text-align:center; padding:8px 12px; background:var(--grey-50); border-radius:8px; }
.ap-mini-stat.red .ap-mini-num { color:var(--danger); }
.ap-mini-stat.orange .ap-mini-num { color:#F59E0B; }
.ap-mini-num { font-size:1.4rem; font-weight:700; color:var(--navy); }
.ap-mini-label { font-size:.72rem; color:var(--grey-500); margin-top:2px; }
.ap-ai-panel { background:var(--white); border:1px solid var(--border); border-radius:10px; margin-bottom:16px; overflow:hidden; }
.ap-ai-panel-header { display:flex; align-items:center; justify-content:space-between; padding:12px 16px; cursor:pointer; }
.ap-ai-panel-header:hover { background:var(--grey-50); }
.ap-ai-panel-header span { font-size:.88rem; font-weight:600; color:var(--navy); }
.ap-ai-inner { padding:14px 16px; }
.ap-ai-blocker,.ap-ai-warning { display:flex; align-items:flex-start; gap:8px; padding:7px 10px; border-radius:6px; font-size:.83rem; margin-bottom:5px; background:var(--grey-50); }
.ap-warn-sev { font-size:.7rem; font-weight:700; text-transform:uppercase; padding:2px 7px; border-radius:6px; white-space:nowrap; flex-shrink:0; }
.ap-warn-sev.critical { background:#FEE2E2; color:#991B1B; }
.ap-warn-sev.high { background:#FED7AA; color:#C2410C; }
.ap-warn-sev.medium { background:#FEF3C7; color:#92400E; }
.ap-warn-sev.low { background:#D1FAE5; color:#065F46; }
.ap-warn-sev.block { background:#FEE2E2; color:#991B1B; }
.ap-toolbar { display:flex; align-items:center; gap:10px; flex-wrap:wrap; margin-bottom:12px; }
.ap-view-btns { display:flex; gap:2px; }
.ap-view-btn { width:32px; height:32px; border:1px solid var(--border); background:var(--white); border-radius:6px; cursor:pointer; font-size:.88rem; display:flex; align-items:center; justify-content:center; }
.ap-view-btn.active { background:var(--teal); color:#fff; border-color:var(--teal); }
.ap-status-dot { display:inline-block; width:8px; height:8px; border-radius:50%; margin-right:4px; vertical-align:middle; }
/* Grid */
.ap-table-wrap { background:var(--white); border:1px solid var(--border); border-radius:10px; overflow:hidden; overflow-x:auto; }
.ap-table { width:100%; border-collapse:collapse; font-size:.83rem; table-layout:auto; }
.ap-table th { padding:9px 10px; text-align:left; font-size:.7rem; font-weight:700; text-transform:uppercase; color:var(--grey-500); letter-spacing:.04em; background:var(--grey-50); border-bottom:1px solid var(--border); white-space:nowrap; }
.ap-table td { padding:7px 10px; border-bottom:1px solid var(--border); vertical-align:middle; }
.ap-table tr:last-child td { border-bottom:none; }
.ap-row { cursor:default; }
.ap-row-overdue { border-left:3px solid var(--danger); }
.ap-row-soon { border-left:3px solid #F59E0B; }
.ap-row-saving { opacity:.6; }
.ap-title-cell { max-width:220px; }
.ap-title-link { color:var(--navy); text-decoration:none; font-weight:500; display:block; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; cursor:pointer; }
.ap-title-link:hover { color:var(--teal); text-decoration:underline; }
.ap-miss-doc { font-size:.75rem; margin-left:4px; cursor:help; }
.ap-status-badge { display:inline-block; font-size:.73rem; font-weight:600; padding:2px 7px; border-radius:8px; white-space:nowrap; }
.ap-risk-badge { display:inline-block; font-size:.73rem; font-weight:700; padding:2px 7px; border-radius:8px; white-space:nowrap; }
.ap-type-badge { display:inline-block; font-size:.73rem; padding:2px 6px; border-radius:6px; background:var(--grey-100); color:var(--grey-700); white-space:nowrap; }
.ap-pri-badge { display:inline-block; font-size:.73rem; font-weight:600; padding:2px 7px; border-radius:8px; white-space:nowrap; }
.ap-tag-chip { display:inline-block; font-size:.72rem; font-weight:600; padding:2px 8px; border-radius:10px; margin:1px; white-space:nowrap; }
.ap-tag-toggle { transition:box-shadow .15s; }
.ap-tag-active { font-weight:700; }
.ap-editable { cursor:pointer; }
.ap-editable:hover { background:rgba(0,166,166,.04); outline:1px solid rgba(0,166,166,.3); }
.ap-cell-ctrl { width:100%; font-size:.82rem; border:1.5px solid var(--teal); border-radius:4px; padding:2px 6px; background:var(--white); outline:none; height:28px; }
.ap-page-row { display:flex; align-items:center; justify-content:space-between; padding:10px 14px; background:var(--white); border:1px solid var(--border); border-radius:0 0 10px 10px; border-top:none; margin-top:-1px; }
/* Kanban */
.ap-kanban-wrap { overflow-x:auto; }
.ap-kanban { display:flex; gap:12px; min-width:max-content; padding-bottom:12px; }
.ap-kanban-col { width:240px; flex-shrink:0; }
.ap-kanban-col-header { display:flex; align-items:center; justify-content:space-between; padding:10px 12px; background:var(--white); border:1px solid var(--border); border-radius:10px 10px 0 0; }
.ap-kanban-count { font-size:.74rem; font-weight:700; background:var(--grey-100); color:var(--grey-600); padding:1px 7px; border-radius:10px; }
.ap-kanban-card { background:var(--white); border:1px solid var(--border); border-radius:0 0 8px 8px; padding:10px 12px; margin-bottom:6px; cursor:pointer; transition:box-shadow .15s; }
.ap-kanban-card:hover { box-shadow:0 3px 10px rgba(0,0,0,.1); }
.ap-kanban-card--overdue { border-left:3px solid var(--danger); }
.ap-kanban-card-title { font-size:.84rem; font-weight:600; color:var(--navy); line-height:1.4; margin-bottom:6px; }
.ap-kanban-card-meta { display:flex; gap:4px; flex-wrap:wrap; margin-bottom:6px; }
.ap-kanban-card-footer { display:flex; justify-content:space-between; align-items:center; }
/* Bulk bar */
.ap-bulk-bar { position:fixed; bottom:20px; left:50%; transform:translateX(-50%); background:var(--navy); color:#fff; border-radius:12px; padding:10px 16px; display:flex; align-items:center; gap:10px; box-shadow:0 8px 32px rgba(0,0,0,.3); z-index:200; flex-wrap:wrap; }
.ap-bulk-bar[hidden] { display:none !important; }
/* Modals */
.ap-modal { position:fixed; inset:0; z-index:300; display:flex; align-items:center; justify-content:center; padding:16px; }
.ap-modal-backdrop { position:absolute; inset:0; background:rgba(0,0,0,.45); }
.ap-modal-box { position:relative; background:var(--white); border-radius:14px; padding:28px 32px; width:100%; z-index:1; box-shadow:0 8px 40px rgba(0,0,0,.2); max-height:85vh; overflow-y:auto; }
.ap-modal-header { display:flex; align-items:center; justify-content:space-between; margin-bottom:20px; }
.ap-modal-header h3 { margin:0; font-size:1.1rem; color:var(--navy); }
.ap-modal-close { background:none; border:none; font-size:1.4rem; cursor:pointer; color:var(--grey-400); }
/* Suggest results */
.ap-sug-tabs { display:flex; gap:0; border-bottom:2px solid var(--border); margin-bottom:14px; }
.ap-sug-tab { background:none; border:none; padding:8px 16px; font-size:.84rem; font-weight:600; color:var(--grey-400); cursor:pointer; border-bottom:2px solid transparent; margin-bottom:-2px; }
.ap-sug-tab.active { color:var(--teal); border-bottom-color:var(--teal); }
.ap-sug-item { display:flex; align-items:flex-start; gap:10px; padding:8px 10px; border:1px solid var(--border); border-radius:8px; margin-bottom:6px; cursor:pointer; }
.ap-sug-item:hover { background:var(--grey-50); }
.ap-sug-item-body { flex:1; }
.ap-sug-item-title { font-size:.86rem; font-weight:600; color:var(--navy); margin-bottom:4px; }
.ap-sug-item-meta { display:flex; gap:6px; flex-wrap:wrap; }
/* Detail page */
.ap-detail { max-width:1100px; }
.ap-req-docs { display:flex; flex-direction:column; gap:8px; }
.ap-req-doc-row { display:flex; align-items:center; gap:10px; padding:6px 0; border-bottom:1px solid var(--grey-100); }
.ap-req-doc-row:last-child { border-bottom:none; }
.ap-req-doc-icon { font-size:1.1rem; flex-shrink:0; }
.ap-req-doc-name { font-size:.86rem; font-weight:600; color:var(--navy); }
.ap-req-doc-desc { font-size:.78rem; color:var(--grey-500); margin-top:2px; }
.ap-req-doc-edit-row { display:flex; align-items:center; gap:8px; margin-bottom:6px; }
.ap-dep-row { display:flex; align-items:center; gap:8px; padding:6px 0; border-bottom:1px solid var(--grey-100); font-size:.84rem; cursor:pointer; }
.ap-dep-row:hover { background:var(--grey-50); }
.ap-dep-type { font-size:.72rem; font-weight:700; background:var(--grey-100); color:var(--grey-600); padding:2px 7px; border-radius:6px; white-space:nowrap; }
.ap-dep-title { flex:1; color:var(--navy); }
.ap-linked-group { margin-bottom:10px; }
.ap-linked-label { font-size:.72rem; font-weight:700; text-transform:uppercase; color:var(--grey-500); letter-spacing:.04em; margin-bottom:6px; }
.ap-linked-chip { display:inline-block; background:rgba(0,166,166,.08); color:var(--teal); border:1px solid rgba(0,166,166,.2); padding:3px 10px; border-radius:12px; font-size:.78rem; margin:2px; cursor:pointer; text-decoration:none; }
.ap-linked-chip:hover { background:rgba(0,166,166,.15); }
.ap-comment { padding:10px 0; border-bottom:1px solid var(--grey-100); }
.ap-comment:last-of-type { border-bottom:none; }
.ap-comment-header { display:flex; align-items:center; gap:10px; margin-bottom:4px; font-size:.82rem; }
.ap-comment-time { color:var(--grey-400); font-size:.76rem; }
.ap-comment-text { font-size:.86rem; color:var(--grey-700); line-height:1.6; white-space:pre-wrap; }
.ap-comment-form { margin-top:12px; padding-top:12px; border-top:1px solid var(--grey-100); }
.ap-ai-warning { display:flex; align-items:flex-start; gap:8px; padding:6px 0; border-bottom:1px solid var(--grey-100); font-size:.82rem; }
@media (max-width:768px) { .ap-table { font-size:.76rem; } .ap-table th,.ap-table td { padding:6px 8px; } .ap-kanban { flex-direction:column; min-width:auto; } .ap-kanban-col { width:100%; } }

/* ── Navbar Overview link ── */
.navbar-left { display:flex; align-items:center; gap:14px; }
.navbar-overview-link { display:flex; align-items:center; gap:5px; font-size:.82rem; font-weight:600; color:var(--grey-500); padding:4px 10px; border-radius:7px; transition:color .15s,background .15s; white-space:nowrap; }
.navbar-overview-link:hover,.navbar-overview-link.active { color:var(--teal); background:rgba(0,166,166,.08); }
@media (max-width:700px) { .navbar-overview-link { display:none; } }

/* ── Programme Overview ── */
/* [hidden] overrides */
#ovMatrixView[hidden],#ovTeamView[hidden],#ovSummaryView[hidden],
#ovAiBody[hidden],#ovProjDropdown[hidden],.ov-ai-alerts[hidden],
.ov-ai-workload[hidden],.ov-tooltip[hidden] { display:none !important; }

.ov-page { max-width:1300px; }
.ov-proj-selector { padding:14px 0; border-bottom:1px solid var(--border); margin-bottom:0; }
.ov-proj-dropdown { position:absolute; top:38px; left:0; background:var(--white); border:1px solid var(--border); border-radius:10px; box-shadow:var(--shadow-lg,0 8px 30px rgba(0,0,0,.12)); min-width:280px; z-index:200; }
.ov-proj-chk-item { display:flex; align-items:center; gap:8px; font-size:.86rem; cursor:pointer; padding:3px 0; }
.ov-stats-row,.ov-team-stats { display:grid; grid-template-columns:repeat(auto-fill,minmax(130px,1fr)); gap:12px; margin-bottom:16px; }
.ov-matrix-toolbar { display:flex; align-items:center; justify-content:space-between; gap:10px; flex-wrap:wrap; padding:12px 0; }
.ov-grp-btn { border:1.5px solid var(--border); border-radius:6px; padding:5px 12px; font-size:.82rem; font-weight:600; color:var(--grey-500); background:var(--white); cursor:pointer; transition:all .15s; }
.ov-grp-btn.active { background:var(--teal); border-color:var(--teal); color:#fff; }
.ov-grp-btn:hover:not(.active) { border-color:var(--grey-300); color:var(--grey-700); }
/* Matrix */
.ov-matrix-wrap { background:var(--white); border:1px solid var(--border); border-radius:10px; overflow:hidden; }
.ov-matrix-scroll { overflow-x:auto; max-height:72vh; overflow-y:auto; }
.ov-matrix-table { border-collapse:separate; border-spacing:0; font-size:.8rem; min-width:400px; }
.ov-matrix-table thead { position:sticky; top:0; z-index:5; }
.ov-col-label { position:sticky; left:0; z-index:6; min-width:180px; max-width:220px; background:var(--grey-50); padding:10px 12px; font-size:.72rem; font-weight:700; text-transform:uppercase; letter-spacing:.04em; color:var(--grey-500); border-right:2px solid var(--border); border-bottom:1px solid var(--border); white-space:nowrap; }
.ov-col-proj { min-width:100px; max-width:140px; padding:8px 10px; background:var(--grey-50); font-size:.75rem; font-weight:700; color:var(--navy); text-align:center; border-bottom:1px solid var(--border); border-right:1px solid var(--border); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.ov-row-label { position:sticky; left:0; z-index:2; background:var(--white); padding:8px 12px; font-size:.82rem; font-weight:500; color:var(--grey-700); border-right:2px solid var(--border); border-bottom:1px solid var(--grey-50); max-width:220px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.ov-cell { padding:5px 8px; text-align:center; border-right:1px solid rgba(255,255,255,.5); border-bottom:1px solid rgba(255,255,255,.4); cursor:pointer; transition:opacity .1s; font-size:.76rem; min-width:80px; }
.ov-cell:hover { opacity:.8; outline:2px solid var(--navy); }
.ov-cell-icon { display:block; font-size:.8rem; line-height:1.2; }
.ov-cell-status { display:block; font-size:.68rem; line-height:1.2; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.ov-cell-na { padding:5px 8px; text-align:center; color:var(--grey-200); font-size:.8rem; border:1px dashed var(--grey-100); background:var(--white); }
/* Tooltip */
.ov-tooltip { position:fixed; z-index:1000; background:var(--navy); color:#fff; padding:10px 14px; border-radius:8px; font-size:.8rem; max-width:220px; line-height:1.5; pointer-events:none; box-shadow:0 4px 16px rgba(0,0,0,.25); }
/* Team view */
.ov-team-filters { }
.ov-team-row { cursor:pointer; }
.ov-team-row:hover td { background:rgba(0,166,166,.03); }
.ov-proj-group-row { }
/* AI panel */
.ov-ai-panel { background:var(--white); border:1.5px solid var(--border); border-left:3px solid var(--teal); border-radius:10px; overflow:hidden; margin-bottom:20px; }
.ov-ai-header { display:flex; align-items:center; justify-content:space-between; padding:14px 18px; background:rgba(11,31,58,.02); border-bottom:1px solid var(--border); }
.ov-ai-title { font-weight:700; font-size:.95rem; color:var(--navy); }
.ov-ai-sub { font-size:.76rem; color:var(--grey-400); display:block; margin-top:2px; }
.ov-ai-body { padding:18px; }
.ov-ai-focus { display:flex; align-items:flex-start; gap:10px; flex-wrap:wrap; margin-bottom:16px; padding-bottom:16px; border-bottom:1px solid var(--grey-100); }
.ov-ai-focus-label { font-size:.72rem; font-weight:800; text-transform:uppercase; letter-spacing:.06em; color:var(--grey-400); white-space:nowrap; margin-top:3px; }
.ov-ai-focus-text { flex:1; font-size:1.05rem; font-weight:700; color:var(--navy); line-height:1.4; }
.ov-health-badge { display:inline-block; font-size:.75rem; font-weight:700; padding:3px 10px; border-radius:20px; white-space:nowrap; cursor:help; }
.ov-ai-alerts { background:#FEF2F2; border:1px solid #FECACA; border-radius:8px; padding:12px 14px; margin-bottom:14px; }
.ov-ai-alerts-header { font-size:.75rem; font-weight:800; text-transform:uppercase; letter-spacing:.05em; color:var(--danger); margin-bottom:8px; }
.ov-ai-alert-item { display:flex; gap:8px; font-size:.84rem; color:var(--grey-700); padding:4px 0; }
.ov-ai-alert-dot { width:6px; height:6px; border-radius:50%; background:var(--danger); flex-shrink:0; margin-top:6px; }
.ov-ai-priorities-label { font-size:.7rem; font-weight:700; text-transform:uppercase; letter-spacing:.06em; color:var(--grey-400); margin-bottom:10px; }
.ov-ai-priorities { display:flex; flex-direction:column; gap:10px; margin-bottom:16px; }
.ov-priority-card { display:flex; gap:12px; padding:14px 16px; border-radius:8px; background:var(--grey-50); }
.ov-priority-rank { font-size:1.4rem; font-weight:800; color:var(--grey-300); flex-shrink:0; min-width:24px; text-align:center; line-height:1; margin-top:2px; }
.ov-priority-body { flex:1; }
.ov-priority-header { display:flex; align-items:center; gap:8px; margin-bottom:6px; flex-wrap:wrap; }
.ov-priority-badge { font-size:.7rem; font-weight:700; padding:2px 8px; border-radius:20px; text-transform:uppercase; letter-spacing:.04em; }
.ov-priority-title { font-weight:700; font-size:.9rem; color:var(--navy); }
.ov-priority-projs { display:flex; gap:4px; flex-wrap:wrap; margin-bottom:6px; }
.ov-priority-detail { font-size:.84rem; color:var(--grey-600); margin-top:4px; line-height:1.5; }
.ov-priority-lbl { font-size:.68rem; font-weight:700; text-transform:uppercase; letter-spacing:.06em; color:var(--grey-400); margin-right:4px; }
.ov-priority-lbl.do { color:var(--teal); }
.ov-ai-trends-label { font-size:.7rem; font-weight:700; text-transform:uppercase; letter-spacing:.06em; color:var(--grey-400); margin-bottom:10px; }
.ov-trends-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(200px,1fr)); gap:12px; margin-bottom:16px; }
.ov-trend-card { background:var(--grey-50); border-radius:8px; padding:14px; }
.ov-ai-blockers-label { font-size:.7rem; font-weight:700; text-transform:uppercase; letter-spacing:.06em; color:var(--grey-400); margin-bottom:8px; }
.ov-ai-workload { background:#FFFBEB; border:1px solid #FCD34D; border-radius:8px; padding:10px 14px; font-size:.84rem; color:#92400E; margin-top:10px; }
.ov-ai-no-data,.ov-ai-error { font-size:.88rem; color:var(--grey-400); padding:16px; text-align:center; }
/* Skeleton */
.ov-ai-skeleton { animation:skeletonPulse 1.5s ease-in-out infinite; }
@keyframes skeletonPulse { 0%,100% { opacity:1; } 50% { opacity:.4; } }
.ov-skeleton-line { background:var(--grey-200); border-radius:6px; margin-bottom:8px; }
.ov-skeleton-card { height:80px; background:var(--grey-100); border-radius:8px; margin-bottom:10px; width:100%; }
/* Charts */
.ov-charts-grid { display:grid; grid-template-columns:1fr 1fr; gap:16px; }
@media (max-width:768px) { .ov-charts-grid { grid-template-columns:1fr; } .ov-priority-card { flex-direction:column; } }
/* Health table */
.ov-health-row { cursor:pointer; }
.ov-health-row:hover td { background:rgba(0,166,166,.03); }

/* ── Approval Templates ── */
.ap-tmpl-dropdown { position:absolute; top:38px; right:0; background:var(--white); border:1px solid var(--border); border-radius:10px; box-shadow:0 6px 20px rgba(0,0,0,.12); min-width:260px; z-index:200; overflow:hidden; }
.ap-tmpl-dropdown[hidden] { display:none !important; }
.ap-tmpl-dropdown-label { padding:8px 14px 4px; font-size:.7rem; font-weight:700; text-transform:uppercase; color:var(--grey-500); letter-spacing:.05em; }
.ap-tmpl-item { display:flex; align-items:center; justify-content:space-between; padding:9px 14px; cursor:pointer; border-bottom:1px solid var(--grey-100); font-size:.84rem; }
.ap-tmpl-item:hover { background:var(--grey-50); }
.ap-tmpl-item-name { font-weight:600; color:var(--navy); }
.ap-tmpl-item-count { font-size:.76rem; color:var(--grey-400); }
.ap-tmpl-dropdown-divider { height:1px; background:var(--border); margin:4px 0; }
.ap-tmpl-dropdown-link { display:block; padding:9px 14px; font-size:.84rem; color:var(--teal); text-decoration:none; cursor:pointer; }
.ap-tmpl-dropdown-link:hover { background:var(--grey-50); }
.ap-load-toast { background:var(--navy); color:#fff; padding:10px 16px; border-radius:8px; font-size:.88rem; margin-bottom:16px; animation:apFadeDown .3s ease; }
@keyframes apFadeDown { from { opacity:0; transform:translateY(-8px); } to { opacity:1; transform:translateY(0); } }
.ap-tmpl-item-row { display:flex; align-items:center; gap:8px; padding:6px 0; border-bottom:1px solid var(--grey-100); }
.ap-tmpl-item-row:last-child { border-bottom:none; }
.ap-tmpl-drag-handle { cursor:grab; color:var(--grey-300); font-size:1rem; user-select:none; flex-shrink:0; }
.ap-tmpl-drag-handle:active { cursor:grabbing; }
/* Navbar avatar dropdown */
.navbar-avatar-menu { position:relative; }
.navbar-avatar-dropdown { position:absolute; top:44px; right:0; background:var(--white); border:1px solid var(--border); border-radius:10px; box-shadow:0 6px 20px rgba(0,0,0,.12); min-width:190px; z-index:500; overflow:hidden; }
.navbar-avatar-dropdown[hidden] { display:none !important; }
.navbar-dd-link { display:block; padding:10px 16px; font-size:.86rem; color:var(--grey-700); text-decoration:none; background:none; border:none; width:100%; text-align:left; cursor:pointer; }
.navbar-dd-link:hover { background:var(--grey-50); color:var(--navy); }
.navbar-dd-link--danger:hover { background:#fef2f2; color:var(--danger); }
.navbar-dd-divider { height:1px; background:var(--border); margin:4px 0; }

/* ── Founder Dashboard ── */
/* [hidden] overrides */
#adminTab_dashboard[hidden],#adminTab_codes[hidden],#adminTab_users[hidden],
#adminGenForm[hidden] { display:none !important; }

/* Skeleton loader */
.fd-skeleton-wrap { min-height:60px; }
.fd-skeleton { display:flex; flex-direction:column; gap:8px; padding:16px; }
.fd-sk-line { height:16px; background:linear-gradient(90deg,var(--grey-100) 25%,var(--grey-50) 50%,var(--grey-100) 75%); background-size:200% 100%; animation:fdShimmer 1.4s infinite; border-radius:6px; }
.fd-sk-line:nth-child(2) { width:70%; }
.fd-sk-line:nth-child(3) { width:50%; }
@keyframes fdShimmer { 0%{background-position:200% 0} 100%{background-position:-200% 0} }

/* Stat cards */
.fd-stat-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(150px,1fr)); gap:14px; margin-top:16px; }
.fd-stat-card { background:var(--white); border:1.5px solid var(--border); border-radius:10px; padding:18px 16px; border-top:3px solid var(--teal); }
.fd-stat-num { font-size:1.8rem; font-weight:800; color:var(--navy); line-height:1; margin-bottom:6px; }
.fd-stat-label { font-size:.76rem; font-weight:600; text-transform:uppercase; letter-spacing:.05em; color:var(--grey-400); }
.fd-stat-sub { font-size:.72rem; color:var(--grey-300); margin-top:3px; }

/* Two-column layout */
.fd-two-col { display:grid; grid-template-columns:1fr 1fr; gap:16px; }
@media (max-width:900px) { .fd-two-col { grid-template-columns:1fr; } }

/* Bar rows */
.fd-bar-row { display:flex; align-items:center; gap:10px; padding:7px 0; font-size:.84rem; }
.fd-bar-label { flex:0 0 140px; color:var(--grey-600,#475569); font-size:.82rem; }
.fd-bar-track { flex:1; height:8px; background:var(--grey-100); border-radius:4px; overflow:hidden; }
.fd-bar-fill { height:100%; border-radius:4px; transition:width .3s; }
.fd-bar-val { flex:0 0 80px; text-align:right; font-weight:600; font-size:.82rem; color:var(--navy); }
.fd-section-label { font-size:.7rem; font-weight:700; text-transform:uppercase; letter-spacing:.06em; color:var(--grey-400); margin-bottom:8px; margin-top:8px; }
.fd-user-row { display:flex; justify-content:space-between; align-items:center; padding:5px 0; border-bottom:1px solid var(--grey-50); font-size:.84rem; }
.fd-user-row:last-child { border-bottom:none; }

/* Pipeline */
.fd-pipeline-grid { display:grid; grid-template-columns:1.4fr 1fr; gap:16px; }
@media (max-width:900px) { .fd-pipeline-grid { grid-template-columns:1fr; } }
.fd-funnel-row { display:flex; align-items:center; gap:10px; padding:6px 0; font-size:.84rem; }
.fd-funnel-label { flex:0 0 160px; color:var(--grey-600,#475569); font-size:.82rem; }
.fd-funnel-bar { flex:1; height:20px; background:var(--grey-50); border-radius:4px; overflow:hidden; }
.fd-funnel-val { flex:0 0 36px; text-align:right; font-weight:700; color:var(--navy); }

/* Cost tracker */
.fd-cost-grid { display:flex; flex-direction:column; gap:0; }
.fd-cost-row { display:flex; justify-content:space-between; align-items:center; padding:10px 0; border-bottom:1px solid var(--grey-50); font-size:.9rem; color:var(--grey-700); }
.fd-cost-row:last-child { border-bottom:none; }
.fd-cost-val { font-weight:700; color:var(--navy); }

/* Activity feed */
.fd-feed-row { display:flex; align-items:center; gap:10px; padding:8px 0; border-bottom:1px solid var(--grey-50); font-size:.84rem; }
.fd-feed-row:last-child { border-bottom:none; }
.fd-feed-dot { width:8px; height:8px; border-radius:50%; flex-shrink:0; }
.fd-feed-text { flex:1; color:var(--grey-700); }
.fd-feed-time { flex:0 0 90px; text-align:right; font-size:.76rem; color:var(--grey-400); white-space:nowrap; }

/* Quick actions */
.fd-actions-bar { display:flex; gap:8px; flex-wrap:wrap; padding:16px 0; border-top:1px solid var(--border); margin-top:4px; }
.fd-actions-bar .btn-secondary-sm,.fd-actions-bar a { text-decoration:none; }

/* ── Announcements widget ── */
.setup-nudge { display:flex; align-items:center; justify-content:space-between; gap:12px; flex-wrap:wrap; background:rgba(0,166,166,.08); border:1px solid rgba(0,166,166,.3); border-radius:10px; padding:10px 14px; margin-bottom:16px; }
.setup-nudge-text { font-size:.86rem; color:var(--navy); }
.setup-banner { display:flex; align-items:center; justify-content:space-between; gap:10px; flex-wrap:wrap; background:rgba(0,166,166,.08); border:1px solid rgba(0,166,166,.3); border-radius:8px; padding:8px 12px; margin-bottom:12px; font-size:.84rem; color:var(--navy); }
.setup-banner-link { color:var(--teal); font-weight:600; text-decoration:none; }
.setup-step-card { background:var(--white); border:1px solid var(--border); border-radius:10px; padding:16px; margin-bottom:12px; }
.setup-step-head { display:flex; align-items:center; gap:10px; flex-wrap:wrap; }
.setup-step-icon { font-size:1.3rem; flex-shrink:0; }
.setup-step-info { flex:1; min-width:160px; }
.setup-step-title { font-weight:700; font-size:.95rem; color:var(--navy); }
.setup-step-desc { font-size:.82rem; color:var(--grey-500); margin-top:2px; }
.setup-step-actions { display:flex; gap:8px; flex-wrap:wrap; margin-top:10px; }
.setup-step-badge { font-size:.72rem; font-weight:700; padding:3px 9px; border-radius:9px; text-transform:uppercase; letter-spacing:.03em; flex-shrink:0; }
.setup-step-badge.not_started { background:var(--grey-100); color:var(--grey-500); }
.setup-step-badge.done { background:#ECFDF5; color:#10B981; }
.setup-step-badge.skipped { background:#FFFBEB; color:#92400E; }
.setup-step-panel { margin-top:14px; padding-top:14px; border-top:1px solid var(--grey-100); }
.setup-progress-bar { height:8px; background:var(--grey-100); border-radius:4px; overflow:hidden; margin:10px 0 18px; }
.setup-progress-fill { height:100%; background:var(--teal); border-radius:4px; transition:width .3s; }
@media (max-width: 640px) {
  .setup-step-head { flex-direction:column; align-items:flex-start; }
  .setup-step-badge { order:-1; }
}

/* ── Members & Permissions (Project Setup hub) ── */
.perm-member-list { display:flex; flex-direction:column; gap:6px; }
.perm-member-row { display:flex; align-items:center; gap:10px; width:100%; text-align:left; background:var(--white); border:1px solid var(--grey-100); border-radius:8px; padding:10px 12px; cursor:pointer; font-family:inherit; }
.perm-member-row:hover { background:var(--grey-50); border-color:rgba(0,166,166,.3); }
.perm-member-info { flex:1; min-width:0; }
.perm-member-name { font-weight:600; font-size:.88rem; color:var(--navy); }
.perm-member-email { font-size:.78rem; color:var(--grey-500); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.perm-member-chevron { color:var(--grey-400); font-size:1.1rem; flex-shrink:0; }
.perm-editor-head { display:flex; align-items:center; gap:10px; margin:10px 0 12px; flex-wrap:wrap; }
.perm-editor-head .perm-member-name { font-size:1rem; }
.perm-presets { display:flex; gap:8px; flex-wrap:wrap; margin-bottom:14px; }
.perm-module-list { display:flex; flex-direction:column; gap:8px; }
.perm-module-row { display:flex; align-items:center; justify-content:space-between; gap:10px; flex-wrap:wrap; padding:8px 0; border-bottom:1px solid var(--grey-50); transition:opacity .15s; }
.perm-module-row:last-child { border-bottom:none; }
.perm-module-label { font-size:.86rem; color:var(--navy); display:flex; align-items:center; gap:6px; }
.perm-default-tag { font-size:.64rem; color:var(--grey-400); font-weight:700; text-transform:uppercase; letter-spacing:.03em; }
.perm-seg { display:inline-flex; border:1.5px solid var(--grey-200); border-radius:8px; overflow:hidden; flex-shrink:0; }
.perm-seg-btn { border:none; background:var(--white); padding:6px 12px; font-size:.78rem; font-weight:600; color:var(--grey-500); cursor:pointer; font-family:inherit; }
.perm-seg-btn:not(:last-child) { border-right:1px solid var(--grey-200); }
.perm-seg-btn.active { background:var(--teal); color:#fff; }
.perm-seg-btn:disabled { cursor:not-allowed; opacity:.5; }
@media (max-width: 640px) {
  .perm-module-row { flex-direction:column; align-items:flex-start; }
  .perm-seg { width:100%; }
  .perm-seg-btn { flex:1; }
}

.ann-widget { background:var(--white); border:1px solid var(--border); border-radius:10px; overflow:hidden; margin-bottom:16px; }
.ann-widget-header { display:flex; align-items:center; justify-content:space-between; padding:10px 14px; background:var(--grey-50); border-bottom:1px solid var(--border); font-weight:700; font-size:.88rem; color:var(--navy); }
.ann-item { padding:10px 14px; border-bottom:1px solid var(--grey-50); transition:background .1s; }
.ann-item:last-child { border-bottom:none; }
.ann-item:hover { background:var(--grey-50); }
.ann-item-header { display:flex; align-items:center; justify-content:space-between; margin-bottom:4px; }
.ann-priority-label { font-size:.72rem; font-weight:700; text-transform:uppercase; letter-spacing:.05em; color:var(--grey-500); }
.ann-dismiss { background:none; border:none; font-size:1.1rem; cursor:pointer; color:var(--grey-400); line-height:1; padding:0 4px; }
.ann-dismiss:hover { color:var(--danger); }
.ann-item-title { font-weight:600; font-size:.9rem; color:var(--navy); margin-bottom:2px; }
.ann-item-msg { font-size:.84rem; color:var(--grey-600,#475569); margin-bottom:4px; white-space:pre-wrap; }
.ann-item-meta { font-size:.74rem; color:var(--grey-400); }
#annCreateModal[hidden],.ann-widget[hidden] { display:none !important; }

/* ── Task Tracker ── */
.tk-module-badge { display:inline-block; font-size:.68rem; font-weight:800; padding:2px 6px; border-radius:5px; margin-right:6px; font-family:monospace; white-space:nowrap; }
.tk-mod-tsk { background:#EFF6FF; color:#1D4ED8; }
.tk-mod-rfi { background:#F5F3FF; color:#7C3AED; }
.tk-mod-apr { background:#ECFDF5; color:#065F46; }
.tk-mod-rsk { background:#FEF2F2; color:#991B1B; }
.tk-mod-mls { background:#FFFBEB; color:#92400E; }
.tk-mod-ncr { background:#FEF2F2; color:#B91C1C; }
.tk-mod-ir  { background:#ECFEFF; color:#0E7490; }
.tk-mod-qr  { background:#F0FDF4; color:#15803D; }

/* ── Quality Records tree ── */
.qr-tree-node { margin-bottom: 4px; }
.qr-tree-header { display:flex; align-items:center; gap:10px; padding:9px 12px; background:#fff; border:1px solid var(--grey-100); border-radius:8px; cursor:pointer; transition:background .1s; }
.qr-tree-header:hover { background:var(--grey-50); }
.qr-tree-caret { font-size:.7rem; color:var(--grey-400); width:12px; flex-shrink:0; }
.qr-tree-label { font-weight:600; font-size:.88rem; color:var(--navy); }
.qr-tree-stats { font-size:.78rem; color:var(--grey-500); margin-left:auto; }
.qr-tree-bar { width:80px; height:6px; background:var(--grey-100); border-radius:3px; overflow:hidden; flex-shrink:0; }
.qr-tree-bar-fill { height:100%; border-radius:3px; transition:width .2s; }
.qr-row-popover { position:fixed; z-index:300; background:var(--white); border:1px solid var(--border); border-radius:10px; box-shadow:0 8px 24px rgba(0,0,0,.15); padding:12px; }
.qr-editable { cursor:pointer; }
.qr-editable:hover { background:rgba(0,166,166,.04); outline:1px solid rgba(0,166,166,.3); }
.tk-row { cursor:pointer; }
.tk-row:hover td { background:rgba(0,166,166,.03); }
.tk-dash-widget { margin-bottom:16px; }
.tk-dash-row { display:flex; align-items:center; gap:10px; padding:8px 0; border-bottom:1px solid var(--grey-50); font-size:.86rem; cursor:pointer; }
.tk-dash-row:last-child { border-bottom:none; }
.tk-dash-row:hover { background:var(--grey-50); border-radius:6px; padding-left:4px; }
.tk-dash-overdue .tk-dash-due { color:var(--danger); font-weight:600; }
.tk-dash-title { flex:1; color:var(--navy); overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.tk-dash-due { font-size:.78rem; color:var(--grey-400); white-space:nowrap; }
#tkAddModal[hidden] { display:none !important; }
.tk-kanban-card { cursor:grab; }
.tk-kanban-card:active { cursor:grabbing; }

/* ── Approvals Kanban upgrades ── */
.ap-kanban-card { cursor:grab; }
.ap-kanban-card:active { cursor:grabbing; }
.ap-kanban-card--soon { border-left:3px solid #F59E0B; }
.ap-kanban-notify { background:none; border:none; font-size:.88rem; cursor:pointer; color:var(--grey-400); padding:0 2px; line-height:1; flex-shrink:0; }
.ap-kanban-notify:hover { color:var(--teal); }
/* Count badges — grid + kanban */
.ap-count-btn { background:none; border:1px solid var(--grey-200); border-radius:10px; padding:1px 7px; font-size:.76rem; cursor:pointer; color:var(--grey-500); line-height:1.6; white-space:nowrap; transition:background .12s,color .12s; }
.ap-count-btn:hover { background:var(--grey-50); color:var(--teal); }
.ap-count-btn--active { border-color:var(--teal); color:var(--teal); background:#F0FDFA; }
.ap-kanban-card-counts { display:flex; align-items:center; gap:4px; margin-top:6px; border-top:1px solid var(--grey-100); padding-top:5px; }
/* Side Panel */
.ap-panel-overlay { position:fixed; inset:0; background:rgba(0,0,0,.25); z-index:1199; opacity:0; pointer-events:none; transition:opacity .2s; }
.ap-panel-overlay.open { opacity:1; pointer-events:auto; }
.ap-side-panel { position:fixed; top:0; right:0; height:100%; width:400px; max-width:100vw; background:var(--white); box-shadow:-4px 0 24px rgba(0,0,0,.12); z-index:1200; display:flex; flex-direction:column; transform:translateX(100%); transition:transform .22s cubic-bezier(.4,0,.2,1); }
.ap-side-panel.open { transform:translateX(0); }
.ap-panel-header { display:flex; align-items:flex-start; gap:8px; padding:16px 16px 12px; border-bottom:1px solid var(--border); flex-shrink:0; }
.ap-panel-header-info { flex:1; min-width:0; }
.ap-panel-title { font-weight:700; font-size:.95rem; color:var(--navy); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.ap-panel-meta  { font-size:.78rem; color:var(--grey-500); margin-top:2px; }
.ap-panel-close { background:none; border:none; font-size:1.3rem; cursor:pointer; color:var(--grey-400); line-height:1; padding:0; flex-shrink:0; margin-top:-2px; }
.ap-panel-close:hover { color:var(--danger); }
.ap-panel-tabs  { display:flex; border-bottom:1px solid var(--border); padding:0 12px; flex-shrink:0; gap:4px; }
.ap-panel-tab   { background:none; border:none; border-bottom:2.5px solid transparent; padding:8px 10px; font-size:.83rem; cursor:pointer; color:var(--grey-500); font-weight:500; transition:color .12s,border-color .12s; white-space:nowrap; }
.ap-panel-tab.active { border-bottom-color:var(--teal); color:var(--teal); font-weight:700; }
.ap-panel-content { flex:1; overflow-y:auto; padding:12px 14px; }
.ap-panel-footer { padding:10px 14px 14px; border-top:1px solid var(--border); flex-shrink:0; position:relative; }
.ap-panel-loading { display:flex; align-items:center; justify-content:center; padding:32px 0; }
.ap-panel-empty { font-size:.84rem; color:var(--grey-400); text-align:center; padding:24px 0; line-height:1.6; }
/* Comment thread */
.ap-comment-thread-item { display:flex; gap:10px; padding:10px 0; border-bottom:1px solid var(--grey-50); }
.ap-comment-thread-item:last-child { border-bottom:none; }
.ap-comment-avatar { width:30px; height:30px; border-radius:50%; background:var(--teal); color:#fff; display:flex; align-items:center; justify-content:center; font-size:.75rem; font-weight:700; flex-shrink:0; }
.ap-comment-body { flex:1; min-width:0; }
.ap-comment-meta { display:flex; gap:8px; align-items:baseline; margin-bottom:3px; }
.ap-comment-name { font-size:.8rem; font-weight:700; color:var(--navy); }
.ap-comment-time { font-size:.74rem; color:var(--grey-400); }
.ap-comment-text { font-size:.84rem; color:var(--grey-700); line-height:1.55; white-space:pre-wrap; word-break:break-word; }
.ap-mention { color:var(--teal); font-weight:600; }
/* Mention autocomplete dropdown */
.ap-mention-dropdown { position:absolute; bottom:calc(100% + 4px); left:14px; right:14px; background:var(--white); border:1px solid var(--border); border-radius:8px; box-shadow:0 4px 14px rgba(0,0,0,.1); z-index:10; overflow:hidden; }
.ap-mention-option { display:flex; align-items:center; gap:8px; padding:7px 12px; cursor:pointer; font-size:.84rem; }
.ap-mention-option:hover { background:var(--grey-50); }
/* Files tab */
.ap-panel-files-header { display:flex; justify-content:space-between; align-items:center; margin-bottom:10px; }
.ap-panel-file-row { display:flex; align-items:center; gap:8px; padding:8px 0; border-bottom:1px solid var(--grey-50); font-size:.84rem; }
.ap-panel-file-row:last-child { border-bottom:none; }
.ap-panel-file-icon { flex-shrink:0; }
.ap-panel-file-name { flex:1; color:var(--teal); text-decoration:underline; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.ap-panel-file-size { color:var(--grey-400); font-size:.76rem; flex-shrink:0; }
/* Mobile — panel slides up from bottom */
@media (max-width:600px) {
  .ap-side-panel { width:100%; height:80vh; top:auto; bottom:0; transform:translateY(100%); border-radius:14px 14px 0 0; }
  .ap-side-panel.open { transform:translateY(0); }
}
/* Detail tabs */
.ap-dtab[hidden] { display:none !important; }
/* Progress log */
.ap-pl-entry { padding:12px 0; border-bottom:1px solid var(--grey-100); }
.ap-pl-entry:last-child { border-bottom:none; }
.ap-pl-header { display:flex; gap:10px; align-items:center; font-size:.82rem; margin-bottom:4px; }
.ap-pl-status-change { font-size:.78rem; background:#EFF6FF; color:#1D4ED8; padding:2px 8px; border-radius:6px; margin-bottom:4px; display:inline-block; }
.ap-pl-att { display:flex; align-items:center; gap:6px; font-size:.8rem; margin-top:4px; }
.ap-pl-att a { color:var(--teal); text-decoration:underline; }
/* Documents tab */
.ap-doc-row { display:flex; align-items:center; gap:10px; padding:10px 0; border-bottom:1px solid var(--grey-50); }
.ap-doc-row:last-child { border-bottom:none; }
/* Notify modal */
.ap-notify-recipients { display:flex; flex-wrap:wrap; gap:8px; max-height:120px; overflow-y:auto; padding:8px; border:1.5px solid var(--border); border-radius:8px; }
.ap-notify-recipient { display:flex; align-items:center; gap:5px; font-size:.84rem; cursor:pointer; }
/* AI risk/rfi card */
.ap-ai-risk-card { background:rgba(0,166,166,.06); border:1px solid rgba(0,166,166,.2); border-radius:10px; padding:16px; margin-bottom:12px; }
.ap-ai-risk-label { font-size:.75rem; font-weight:700; color:var(--teal); text-transform:uppercase; letter-spacing:.05em; margin-bottom:8px; }
/* Skeleton shimmer */
.ai-skeleton { padding:4px 0; }
.skeleton-line { height:14px; background:linear-gradient(90deg,#f0f0f0 25%,#e0e0e0 50%,#f0f0f0 75%); background-size:200% 100%; animation:shimmer 1.5s infinite; border-radius:4px; margin-bottom:8px; }
.skeleton-line.wide { width:100%; }
.skeleton-line.medium { width:75%; }
.skeleton-line.narrow { width:50%; }
@keyframes shimmer { 0%{background-position:200% 0} 100%{background-position:-200% 0} }
/* RFI prefill banner */
.rfi-prefill-banner { background:#F0FDFA; border:1px solid #99F6E4; border-radius:8px; padding:10px 14px; font-size:.85rem; color:#0D9488; margin-bottom:14px; }
/* Dash activity project name */
.dash-activity-project { color:var(--teal); font-weight:600; font-size:.78rem; }
/* Milestone prompt */
#apMilestonePrompt[hidden],#apProgressModal[hidden],#apNotifyModal[hidden],
.ap-dtab[hidden],.ap-ai-risk-card[hidden],#apDocUploadZone[hidden],
#apDocUploadProgress[hidden],#apAiRiskCard[hidden],#apAiRfiCard[hidden],#apAiRfiSkeleton[hidden] { display:none !important; }

/* ── Integrations page ── */
.int-page { max-width:760px; margin:0 auto; padding:32px 24px; }
.int-page-header { margin-bottom:28px; }
.int-page-title { font-size:1.6rem; font-weight:700; color:var(--navy); margin:0 0 6px; }
.int-page-sub { color:var(--grey-500); font-size:.92rem; margin:0; }
.int-section { margin-bottom:36px; }
.int-section-title { font-size:1rem; font-weight:700; color:var(--grey-600); text-transform:uppercase; letter-spacing:.05em; margin:0 0 14px; }
.int-cards { display:flex; flex-direction:column; gap:16px; }
.int-card { background:#fff; border:1.5px solid var(--border); border-radius:12px; padding:20px 22px; transition:border-color .15s; }
.int-card--connected { border-color:var(--teal); }
.int-card-header { display:flex; align-items:center; gap:12px; margin-bottom:14px; }
.int-card-logo { width:36px; height:36px; border-radius:8px; background:#f7f8fa; display:flex; align-items:center; justify-content:center; flex-shrink:0; }
.int-card-logo--google { background:#fff; border:1px solid #e5e7eb; }
.int-card-logo--microsoft { background:#fff; border:1px solid #e5e7eb; }
.int-card-title-wrap { flex:1; }
.int-card-title { font-size:1rem; font-weight:700; color:var(--navy); display:block; }
.int-card-connected-badge { font-size:.78rem; font-weight:600; color:var(--teal); background:#F0FDFA; padding:2px 8px; border-radius:20px; display:inline-block; margin-top:3px; }
.int-card-not-connected { font-size:.78rem; color:var(--grey-400); display:inline-block; margin-top:3px; }
.int-card-body { margin-bottom:16px; }
.int-card-account { font-size:.88rem; font-weight:600; color:var(--navy); margin:0 0 4px; }
.int-card-site { font-size:.84rem; color:var(--grey-500); margin:0 0 8px; }
.int-card-desc { font-size:.85rem; color:var(--grey-500); margin:0; }
.int-card-actions { display:flex; gap:10px; }
.int-success-banner { background:#F0FDFA; border:1px solid #99F6E4; border-radius:8px; padding:10px 16px; font-size:.88rem; color:#0D9488; font-weight:600; margin-bottom:20px; }
.int-error-banner { background:#FEF2F2; border:1px solid #FECACA; border-radius:8px; padding:10px 16px; font-size:.88rem; color:#DC2626; font-weight:600; margin-bottom:20px; }
.int-cs-cards { display:flex; flex-wrap:wrap; gap:12px; }
.int-cs-card { background:#f9fafb; border:1.5px dashed var(--border); border-radius:10px; padding:14px 18px; display:flex; align-items:center; gap:12px; min-width:200px; }
.int-cs-name { font-size:.88rem; font-weight:600; color:var(--grey-600); }
.int-cs-label { font-size:.75rem; background:#e5e7eb; color:var(--grey-500); padding:2px 8px; border-radius:20px; }

/* ── Cloud file browser modal ── */
.cb-overlay { position:fixed; inset:0; background:rgba(0,0,0,.45); z-index:3000; display:flex; align-items:center; justify-content:center; }
.cb-overlay[hidden] { display:none !important; }
.cb-modal { background:#fff; border-radius:14px; width:680px; max-width:95vw; max-height:80vh; display:flex; flex-direction:column; box-shadow:0 20px 60px rgba(0,0,0,.18); overflow:hidden; }
.cb-modal-header { display:flex; align-items:center; justify-content:space-between; padding:16px 20px; border-bottom:1px solid var(--border); }
.cb-modal-title { font-size:1rem; font-weight:700; color:var(--navy); margin:0; }
.cb-close { background:none; border:none; font-size:1.4rem; color:var(--grey-400); cursor:pointer; padding:0 4px; line-height:1; }
.cb-close:hover { color:var(--navy); }
.cb-provider-tabs { display:flex; gap:0; border-bottom:1px solid var(--border); padding:0 16px; background:#fafafa; }
.cb-provider-tabs[hidden] { display:none !important; }
.cb-provider-tab { background:none; border:none; border-bottom:2px solid transparent; padding:10px 16px; font-size:.86rem; font-weight:500; color:var(--grey-500); cursor:pointer; display:flex; align-items:center; gap:6px; transition:color .15s; margin-bottom:-1px; }
.cb-provider-tab:hover { color:var(--navy); }
.cb-provider-tab--active { color:var(--navy); font-weight:600; border-bottom-color:var(--teal); }
.cb-toolbar { display:flex; align-items:center; gap:12px; padding:10px 20px; border-bottom:1px solid var(--grey-100); }
.cb-breadcrumb { flex:1; display:flex; align-items:center; gap:4px; flex-wrap:wrap; font-size:.83rem; min-width:0; }
.cb-crumb { border:none; background:none; padding:2px 4px; cursor:pointer; color:var(--teal); font-size:.83rem; }
.cb-crumb--active { color:var(--navy); font-weight:600; cursor:default; }
.cb-crumb-sep { color:var(--grey-300); font-size:.8rem; }
.cb-search { border:1.5px solid var(--border); border-radius:8px; padding:5px 10px; font-size:.84rem; width:180px; outline:none; }
.cb-search:focus { border-color:var(--teal); }
.cb-file-list { flex:1; overflow-y:auto; padding:8px 12px; min-height:200px; }
.cb-loading,.cb-empty { padding:32px; text-align:center; color:var(--grey-400); font-size:.88rem; }
.cb-item { display:flex; align-items:center; gap:10px; padding:8px 10px; border-radius:8px; cursor:pointer; font-size:.88rem; transition:background .1s; }
.cb-item:hover { background:var(--grey-50); }
.cb-item--selected { background:#F0FDFA; }
.cb-item--folder { color:var(--navy); font-weight:500; cursor:pointer; }
.cb-item--folder:hover { background:var(--grey-50); }
.cb-item--folder.cb-item--selected { background:#F0FDFA; border:1.5px solid var(--teal); border-radius:8px; }
.cb-folder-hint { font-size:.74rem; color:var(--grey-300); flex-shrink:0; }
.cb-item-icon { font-size:1rem; flex-shrink:0; }
.cb-item-name { flex:1; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.cb-item-meta { font-size:.78rem; color:var(--grey-400); flex-shrink:0; }
.cb-checkbox { flex-shrink:0; accent-color:var(--teal); width:15px; height:15px; }
.cb-footer { display:flex; align-items:center; justify-content:space-between; padding:12px 20px; border-top:1px solid var(--border); background:#f9fafb; }
.cb-selection-label { font-size:.84rem; color:var(--teal); font-weight:600; }
.cb-footer-actions { display:flex; gap:10px; }

/* ── File Repository source badges ── */
.fr-card--folder { background:#FAFDF7; border:1.5px dashed #BBF7D0; cursor:default; }
.fr-row--folder { background:#FAFDF7; }
.fr-browse-cloud-btn { background:none; border:1px solid var(--teal); border-radius:6px; color:var(--teal); font-size:.78rem; font-weight:600; padding:3px 10px; cursor:pointer; margin-top:6px; }
.fr-browse-cloud-btn:hover { background:var(--teal); color:#fff; }
.fr-source-badge { display:inline-flex; align-items:center; gap:4px; font-size:.72rem; font-weight:600; padding:2px 7px; border-radius:12px; text-decoration:none; margin-left:4px; }
.fr-source-badge--google { background:#EBF5FB; color:#1A73E8; }
.fr-source-badge--ms { background:#EBF0FB; color:#0078D4; }
.fr-source-badge:hover { opacity:.8; }

/* ── Drawing Register source tabs ── */
.dr-source-tabs { display:flex; gap:8px; margin-bottom:16px; }
.dr-source-tab { background:#f4f5f7; border:1.5px solid var(--border); border-radius:8px; padding:7px 16px; font-size:.86rem; font-weight:500; color:var(--grey-600); cursor:pointer; transition:all .15s; }
.dr-source-tab:hover { border-color:var(--teal); color:var(--teal); }
.dr-source-tab--active { background:var(--teal); border-color:var(--teal); color:#fff; }

/* Hidden utility for cloud zones */
#drCloudZone[hidden],#drLocalZone[hidden],#cbOverlay[hidden] { display:none !important; }

/* ── Project Tabs Bar ── */
.proj-tabs-bar {
  position: fixed;
  top: var(--navbar-h);
  left: 0;
  right: 0;
  height: var(--tabbar-h);
  z-index: 150;
  background: #F3F4F6;
  border-bottom: 1px solid #E5E7EB;
  display: flex;
  align-items: stretch;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
}
.proj-tabs-bar::-webkit-scrollbar { display: none; }

.proj-tab {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 0 12px;
  max-width: 180px;
  min-width: 40px;
  height: 100%;
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  border-right: 1px solid #E5E7EB;
  cursor: pointer;
  font-size: .8rem;
  color: #6C757D;
  white-space: nowrap;
  transition: background .12s;
  font-family: inherit;
  text-align: left;
  flex-shrink: 0;
}
.proj-tab:hover { background: #EAECF0; color: #1F2937; }
.proj-tab--active { background: #fff !important; color: var(--navy) !important; border-bottom: 2px solid var(--teal) !important; font-weight: 500; }
.proj-tab--home { min-width: 44px; max-width: 44px; justify-content: center; font-size: 1rem; padding: 0; }
.proj-tab--add { min-width: 36px; max-width: 36px; justify-content: center; font-size: 1.1rem; font-weight: 300; border-right: none; border-left: 1px solid #E5E7EB; margin-left: auto; }
.proj-tab-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; min-width: 0; pointer-events: none; }
.proj-tab-close { display: inline-flex; align-items: center; justify-content: center; width: 15px; height: 15px; border-radius: 50%; font-size: .75rem; line-height: 1; color: #9CA3AF; flex-shrink: 0; }
.proj-tab-close:hover { background: #D1D5DB; color: #374151; }
@media (max-width: 600px) { .proj-tab { max-width: 120px; padding: 0 8px; } }

/* ── Checklist Template builder ─────────────────────────────────── */
.clt-builder-wrap { background: #fff; border-radius: 12px; padding: 24px; box-shadow: 0 1px 4px rgba(0,0,0,.07); border: 1px solid var(--grey-100); }
.clt-item-row     { display: flex; align-items: flex-start; gap: 8px; padding: 10px 12px; border: 1.5px solid var(--grey-200); border-radius: 8px; margin-bottom: 8px; background: var(--grey-50); }
.clt-item-body    { flex: 1; display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.clt-item-main    { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.clt-item-label   { flex: 1; min-width: 180px; height: 34px; padding: 0 10px; border: 1.5px solid var(--grey-300); border-radius: 8px; font-size: .88rem; font-family: inherit; background: #fff; }
.clt-item-type    { height: 34px; padding: 0 8px; border: 1.5px solid var(--grey-300); border-radius: 8px; font-size: .82rem; font-family: inherit; background: #fff; }
.clt-item-extras  { display: flex; align-items: center; gap: 6px; font-size: .79rem; color: var(--grey-600); flex-wrap: wrap; }
.clt-item-del     { background: none; border: none; cursor: pointer; color: var(--grey-400); font-size: 1rem; padding: 4px 6px; line-height: 1; border-radius: 4px; }
.clt-item-del:hover { color: var(--danger); background: #FEE2E2; }
.clt-order-btn    { background: none; border: 1px solid var(--grey-200); border-radius: 4px; cursor: pointer; color: var(--grey-500); font-size: .7rem; padding: 1px 4px; line-height: 1.4; }
.clt-order-btn:hover:not(:disabled) { background: var(--grey-100); }
.clt-order-btn:disabled { opacity: .3; cursor: default; }
.clt-add-row      { display: flex; gap: 8px; margin-top: 10px; }
.clt-lib-grid     { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.clt-lib-card     { background: #fff; border-radius: 10px; padding: 18px; box-shadow: 0 1px 4px rgba(0,0,0,.07); border: 1px solid var(--grey-100); transition: box-shadow .15s, transform .15s; }
.clt-lib-card:hover { box-shadow: 0 3px 10px rgba(0,0,0,.1); transform: translateY(-1px); }
.clt-lib-card-name { font-size: .95rem; font-weight: 700; color: var(--navy); margin-bottom: 6px; }
.clt-lib-card-meta { font-size: .8rem; color: var(--grey-500); display: flex; gap: 12px; flex-wrap: wrap; }
.clt-lib-card-actions { display: flex; gap: 6px; margin-top: 12px; }

/* ── Checklist form fill (on IR detail) ─────────────────────────── */
.clf-item-row      { display: flex; align-items: flex-start; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--grey-100); }
.clf-item-row:last-child { border-bottom: none; }
.clf-item-label    { flex: 1; font-size: .88rem; color: var(--navy); font-weight: 500; line-height: 1.4; }
.clf-item-help     { font-size: .76rem; color: var(--grey-400); margin-top: 3px; }
.clf-item-controls { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.clf-pf-btn        { height: 30px; padding: 0 12px; border-radius: 6px; border: 1.5px solid var(--grey-300); font-size: .8rem; font-weight: 600; cursor: pointer; background: #fff; transition: all .12s; white-space: nowrap; }
.clf-pf-btn[data-val="pass"]:hover, .clf-pf-btn[data-val="pass"].active { background: #D1FAE5; border-color: #10B981; color: #065F46; }
.clf-pf-btn[data-val="fail"]:hover, .clf-pf-btn[data-val="fail"].active { background: #FEE2E2; border-color: #EF4444; color: #991B1B; }
.clf-rollup        { display: flex; align-items: center; gap: 8px; padding: 10px 14px; border-radius: 8px; margin-bottom: 12px; font-size: .88rem; font-weight: 600; }
.clf-rollup.pass   { background: #D1FAE5; color: #065F46; }
.clf-rollup.fail   { background: #FEE2E2; color: #991B1B; }
.clf-rollup.incomplete { background: #FEF3C7; color: #92400E; }
.clf-text-input    { height: 32px; padding: 0 8px; border: 1.5px solid var(--grey-300); border-radius: 6px; font-size: .84rem; font-family: inherit; min-width: 180px; }
.clf-num-input     { width: 80px; height: 32px; padding: 0 8px; border: 1.5px solid var(--grey-300); border-radius: 6px; font-size: .84rem; font-family: inherit; }
.clf-unit-label    { font-size: .8rem; color: var(--grey-500); }
.clf-select        { height: 32px; padding: 0 8px; border: 1.5px solid var(--grey-300); border-radius: 6px; font-size: .84rem; font-family: inherit; }
.clf-photo-btn     { height: 30px; padding: 0 12px; border: 1.5px solid var(--grey-300); border-radius: 6px; font-size: .8rem; cursor: pointer; background: #fff; }
.clf-photo-btn.active { background: #D1FAE5; border-color: #10B981; color: #065F46; }
.clf-na-chk        { display: flex; align-items: center; gap: 4px; font-size: .78rem; color: var(--grey-500); cursor: pointer; white-space: nowrap; }

@media (max-width: 640px) {
  .clt-item-main { flex-direction: column; align-items: flex-start; }
  .clt-item-label { min-width: 0; width: 100%; }
  .clf-item-row   { flex-direction: column; }
  .clf-item-controls { width: 100%; }
}
