:root {
  --bg: #0f172a;
  --panel: #0b1020;
  --accent: #64d2ff;
  --accent-2: #7ce7b3;
  --muted: #9fb3c8;
  --danger: #f87171;
  --success: #4ade80;
  --font-family: 'Poppins', sans-serif;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: var(--font-family);
  background: radial-gradient(circle at 20% 20%, #1e293b, #0f172a 55%);
  color: #e2e8f0;
  min-height: 100vh;
  overflow: hidden;
}
/* Custom scrollbars (WebKit) */
*::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}
*::-webkit-scrollbar-track {
  background: rgba(255,255,255,0.04);
  border-radius: 10px;
}
*::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, rgba(100,210,255,0.5), rgba(124,58,237,0.5));
  border-radius: 10px;
  border: 2px solid rgba(15,23,42,0.8);
}
*::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, rgba(100,210,255,0.7), rgba(124,58,237,0.7));
}
/* Firefox */
* {
  scrollbar-width: thin;
  scrollbar-color: rgba(100,210,255,0.6) rgba(255,255,255,0.04);
}
a { color: inherit; text-decoration: none; }
.layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  min-height: 100vh;
}
.login-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 24px;
}
.login-card {
  background: #0b1020;
  padding: 28px;
  border-radius: 16px;
  width: 100%;
  max-width: 380px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.45);
  border: 1px solid rgba(100,210,255,0.15);
}
.login-card h1 {
  margin: 0 0 12px;
  font-size: 23px;
  font-weight: 600;
  color: #e2e8f0;
}
.login-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}
.login-card p { margin: 0 0 16px; color: var(--muted); }
.login-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 4px;
}
.field {
  margin-bottom: 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.field label { font-size: 12px; color: var(--muted); }
.field input, .field select, .field textarea {
  background: #0f172a;
  border: 1px solid #1f2a44;
  border-radius: 10px;
  padding: 10px 12px;
  color: #e2e8f0;
  outline: none;
  transition: border 0.15s ease, box-shadow 0.15s ease;
}
.field input:focus, .field select:focus, .field textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(100,210,255,0.15);
}
.btn,
.btn-ghost,
.nav button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 14px;
  border-radius: 10px;
  font-weight: 600;
  min-width: 0;
  max-width: 100%;
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.12s ease, border 0.12s ease, background 0.12s ease;
}
.link-btn {
  background: none;
  border: none;
  color: var(--accent);
  padding: 0;
  font-weight: 600;
  cursor: pointer;
}
.link-btn:hover { text-decoration: underline; }
.link-btn[disabled] {
  opacity: 0.6;
  cursor: not-allowed;
  text-decoration: none;
}
.btn {
  border: none;
  color: #0b1020;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
}
.btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 25px rgba(124,231,179,0.25);
}
.btn-ghost,
.nav button {
  color: #e2e8f0;
  background: #0f172a;
  border: 1px solid #1f2a44;
}
.btn-ghost:hover,
.nav button:hover {
  border-color: var(--accent);
  background: rgba(100,210,255,0.08);
}
.sidebar {
  background: radial-gradient(circle at 10% 20%, rgba(100,210,255,0.08), transparent 35%), #0b1020;
  border-right: 1px solid rgba(100,210,255,0.14);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  transition: transform 0.2s ease;
  min-width: 240px;
  max-width: 280px;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}
.sidebar h2 {
  margin: 0;
  font-size: 17px;
  color: #e2e8f0;
  letter-spacing: 0.5px;
}
.sidebar-header {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
}
.brand-logo {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  object-fit: contain;
  flex: 0 0 42px;
  background: rgba(255,255,255,0.04);
  padding: 4px;
  border: 1px solid rgba(100,210,255,0.12);
}
.brand-logo-login {
  width: 52px;
  height: 52px;
  flex-basis: 52px;
}
.brand-text { display: flex; flex-direction: column; gap: 2px; }
.brand-title { font-weight: 700; font-size: 15px; }
.brand-sub { color: var(--muted); font-size: 11px; }
.user-card {
  background: #0f172a;
  border: 1px solid rgba(100,210,255,0.18);
  border-radius: 12px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  box-shadow: 0 12px 30px rgba(0,0,0,0.25);
  cursor: pointer;
  transition: border 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}
.user-card:hover,
.user-card:focus-visible {
  border-color: var(--accent);
  box-shadow: 0 14px 34px rgba(100,210,255,0.15);
  transform: translateY(-1px);
  outline: none;
}
.user-name {
  font-weight: 700;
  font-size: 13px;
  color: #e2e8f0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.user-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.user-email {
  font-size: 11px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 150px;
}
.nav {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.nav button {
  background: #0f172a;
  color: #e2e8f0;
  border: 1px solid #1f2a44;
  padding: 10px 12px;
  border-radius: 10px;
  text-align: left;
  cursor: pointer;
  transition: border 0.12s ease, background 0.12s ease;
}
.sidebar-nav button {
  width: 100%;
  justify-content: flex-start;
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(255,255,255,0.02);
  border: 1px solid rgba(100,210,255,0.08);
  transition: border 0.18s ease, background 0.18s ease, transform 0.12s ease;
}
.sidebar-nav button:hover {
  border-color: var(--accent);
  background: rgba(100,210,255,0.12);
  transform: translateX(2px);
}
.sidebar-nav button.active {
  border-color: var(--accent);
  background: linear-gradient(90deg, rgba(100,210,255,0.16), rgba(124,58,237,0.16));
  color: #e2e8f0;
  box-shadow: 0 8px 18px rgba(100,210,255,0.12);
}
.sidebar-subnav {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.sidebar-subnav-items {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-left: 14px;
  border-left: 1px solid rgba(100,210,255,0.14);
}
.sidebar-subnav-items button {
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 12px;
  color: var(--muted);
}
.sidebar-subnav-items button.active {
  color: #e2e8f0;
}
.sidebar-footer { margin-top: auto; }
.main {
  padding: 24px;
  background: radial-gradient(circle at 80% 20%, rgba(100,210,255,0.08), transparent 30%), #0f172a;
  height: 100vh;
  overflow-y: auto;
}
.main h2{
  margin: 0;
}
.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}
.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: #0b1020;
  border: 1px solid #1f2a44;
  border-radius: 999px;
  color: var(--muted);
  font-size: 12px;
}
.pill.user-pill {
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  border-radius: 12px;
  min-width: 0;
  max-width: 100%;
}
.user-pill-top {
  color: #e2e8f0;
  font-weight: 600;
  font-size: 12px;
  line-height: 1.2;
  max-width: 100%;
  white-space: normal;
  word-break: break-word;
}
.user-pill-bottom {
  width: 100%;
  display: flex;
  justify-content: flex-start;
}
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 16px;
}
.dashboard-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}
.hero-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-bottom: 16px;
}
.dashboard-grid-feature {
  margin-bottom: 0;
}
.dashboard-section {
  margin-bottom: 24px;
}
.dashboard-section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
  padding: 0 4px;
}
.dashboard-section-title {
  margin: 0;
  font-size: 16px;
  color: #e2e8f0;
}
.dashboard-section-sub {
  margin: 4px 0 0;
  font-size: 12px;
  color: var(--muted);
}
.ortho-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(280px, 0.9fr);
  gap: 16px;
  margin-bottom: 16px;
}
.ortho-hero .card,
.ortho-section-grid .card,
.ortho-workflow .card {
  min-height: 100%;
}
.ortho-badge-row,
.ortho-pillars,
.ortho-list,
.ortho-roadmap {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.ortho-pillars .pill,
.ortho-badge-row .pill {
  background: rgba(11,16,32,0.7);
}
.ortho-section-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
  margin-bottom: 16px;
}
.ortho-workflow {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}
.ortho-step {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.ortho-step-number {
  width: 34px;
  height: 34px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(100,210,255,0.28), rgba(124,58,237,0.28));
  border: 1px solid rgba(100,210,255,0.18);
  font-weight: 700;
}
.ortho-list,
.ortho-roadmap {
  flex-direction: column;
}
.ortho-list-item,
.ortho-roadmap-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid rgba(100,210,255,0.08);
  background: rgba(15,23,42,0.52);
  font-size: 13px;
}
.status-list,
.status-list li,
.ortho-list,
.ortho-list-item,
.ortho-roadmap,
.ortho-roadmap-item,
.file-list,
.file-row,
.ortho-file-list,
.ortho-file-row,
.tender-list,
.tender-list li,
.suggestion-list,
.suggestion-chip {
  font-size: 13px;
}
.ortho-file-list {
  padding-left: 0;
  margin: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.file-list {
  padding-left: 0;
  margin: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.ortho-file-row {
  display: flex;
  align-items: stretch;
  justify-content: flex-start;
  flex-direction: column;
  gap: 10px;
  border: 1px solid #1f2a44;
  border-radius: 8px;
  padding: 8px 10px;
  background: #0f172a;
  min-width: 0;
}
.file-row {
  display: flex;
  align-items: stretch;
  justify-content: flex-start;
  flex-direction: column;
  gap: 10px;
  border: 1px solid #1f2a44;
  border-radius: 8px;
  padding: 8px 10px;
  background: #0f172a;
  min-width: 0;
}
.ortho-file-row-selectable {
  cursor: pointer;
}
.file-row-selectable {
  cursor: pointer;
}
.ortho-file-main {
  min-width: 0;
  width: 100%;
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.file-main {
  min-width: 0;
  width: 100%;
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.ortho-file-entry-head,
.file-entry-head {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  width: 100%;
  min-width: 0;
}
.file-thumb {
  width: 72px;
  min-width: 72px;
  height: 72px;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid rgba(100,210,255,0.14);
  background: linear-gradient(180deg, rgba(15,23,42,0.92), rgba(11,16,32,0.92));
  display: flex;
  align-items: center;
  justify-content: center;
}
.file-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.file-thumb-generic {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  padding: 8px;
  text-align: center;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: #dbeafe;
  text-transform: uppercase;
}
.ortho-file-link,
.ortho-file-main strong {
  min-width: 0;
  overflow-wrap: anywhere;
  word-break: break-word;
}
.file-link,
.file-main strong {
  min-width: 0;
  overflow-wrap: anywhere;
  word-break: break-word;
}
.ortho-file-meta {
  font-size: 11px;
}
.file-meta {
  font-size: 11px;
}
.ortho-file-actions {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  flex-wrap: wrap;
  width: 100%;
  padding-top: 2px;
}
.file-actions {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  flex-wrap: wrap;
  width: 100%;
  padding-top: 2px;
}
.ortho-file-actions .btn-ghost,
.ortho-file-actions .tag {
  flex: 0 0 auto;
}
.file-actions .btn-ghost,
.file-actions .tag {
  flex: 0 0 auto;
}
.responsive-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.responsive-toolbar > * {
  min-width: 0;
}
.responsive-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}
.responsive-actions > * {
  flex: 0 0 auto;
}
.ortho-roadmap-item strong {
  color: #e2e8f0;
}
.ortho-note {
  border-left: 3px solid rgba(248,113,113,0.7);
  padding-left: 12px;
}

.tchat {
  display: flex;
  flex-direction: column;
  height: calc(100vh - 130px);
  min-height: 72vh;
  max-height: none;
  padding-bottom: 0;
  font-size: 12px;
  overflow: hidden;
}

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

.tchat-contact {
  display: flex;
  align-items: center;
  gap: 10px;
}

.tchat-contact h3 {
  margin: 0;
  font-size: 17px;
}

.tchat-avatar {
  width: 38px;
  height: 38px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: #0b1020;
  background: linear-gradient(135deg, #64d2ff, #7ce7b3);
}

.tchat-toolbar {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 10px 14px;
  margin-bottom: 10px;
}

.tchat-toolbar-toggle {
  display: none;
  width: 100%;
  margin-bottom: 8px;
}

.tchat-sources {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tchat-source {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(15,23,42,0.8);
  border: 1px solid #1f2a44;
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 10px;
}

.ortho-case-chat-toolbar {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}

.ortho-case-chat-row {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  align-items: start;
  gap: 10px 14px;
  margin-bottom: 0;
}

.ortho-case-chat-row > label {
  padding-top: 6px;
  margin: 0;
}

.ortho-case-chat-value {
  min-width: 0;
  padding-top: 4px;
}

.ortho-case-chat-sources {
  min-width: 0;
  align-items: center;
}

.tchat-thread {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  padding: 12px 6px;
  border-top: 1px solid #1f2a44;
  border-bottom: 1px solid #1f2a44;
  background:
    radial-gradient(circle at 20% 20%, rgba(100,210,255,0.05), transparent 35%),
    linear-gradient(180deg, rgba(255,255,255,0.01), rgba(255,255,255,0));
}

.tchat-row {
  display: flex;
  justify-content: flex-start;
  margin-bottom: 10px;
}

.tchat-row.mine {
  justify-content: flex-end;
}

.tchat-bubble {
  max-width: min(82%, 760px);
  border-radius: 16px;
  padding: 6px 8px;
  background: #1f2937;
  border: 1px solid rgba(255,255,255,0.06);
  box-shadow: 0 8px 18px rgba(0,0,0,0.18);
  text-align: left;
}

.tchat-row.mine .tchat-bubble {
  background: #0d3b66;
  border-color: rgba(100,210,255,0.35);
}

.tchat-row.pending .tchat-bubble {
  border-style: dashed;
}

.tchat-meta {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 6px;
  margin-bottom: 1px;
}
.tchat-copy-btn {
  margin-left: 4px;
  background: transparent;
  border: 1px solid rgba(100,210,255,0.35);
  color: #9fd8ff;
  border-radius: 8px;
  padding: 1px 7px;
  font-size: 11px;
  line-height: 1.2;
  cursor: pointer;
}
.tchat-copy-btn:hover {
  border-color: rgba(100,210,255,0.7);
  color: #d8f2ff;
}

.tchat-author {
  font-size: 11px;
  color: #9fb3c8;
}

.tchat-text {
  white-space: pre-wrap;
  line-height: 1.2;
  font-size: 12px;
  word-break: break-word;
  text-align: left;
  margin: 0;
  padding: 0;
}

.tchat-image-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 8px;
  margin-top: 8px;
}

.tchat-image-card {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 6px;
  border-radius: 10px;
  background: rgba(15,23,42,0.55);
  border: 1px solid rgba(100,210,255,0.16);
}

.tchat-image-card img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 8px;
  background: rgba(15,23,42,0.9);
}

.tchat-image-label {
  font-size: 10px;
  line-height: 1.25;
  color: #9fb3c8;
  word-break: break-word;
}

.tchat-time {
  font-size: 11px;
  color: #9fb3c8;
  text-align: left;
}

.tchat-typing-dots {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-left: 8px;
  vertical-align: middle;
}

.tchat-typing-dots span {
  width: 5px;
  height: 5px;
  border-radius: 999px;
  background: #9fd8ff;
  opacity: 0.35;
  animation: tchatTypingPulse 1.1s infinite ease-in-out;
}

.tchat-typing-dots span:nth-child(2) {
  animation-delay: 0.15s;
}

.tchat-typing-dots span:nth-child(3) {
  animation-delay: 0.3s;
}

@keyframes tchatTypingPulse {
  0%, 80%, 100% {
    opacity: 0.25;
    transform: translateY(0);
  }
  40% {
    opacity: 1;
    transform: translateY(-1px);
  }
}

.tchat-composer {
  flex: 0 0 auto;
  background: #0f172a;
  padding: 10px 0 12px;
}

.tchat-attach-btn {
  position: relative;
  overflow: hidden;
  padding: 6px 10px;
  font-size: 11px;
}

.tchat-attach-btn input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.tchat-composer textarea {
  width: 100%;
  resize: vertical;
  min-height: 54px;
  max-height: 140px;
  margin-bottom: 8px;
  font-size: 12px;
  line-height: 1.35;
}

.tchat-composer-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.tchat-composer-left {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

@media (max-width: 900px) {
  .tchat {
    height: calc(100dvh - 72px);
    min-height: calc(100dvh - 72px);
    padding: 10px;
  }
  .tchat-toolbar {
    grid-template-columns: 1fr;
    gap: 8px;
    margin-bottom: 6px;
  }
  .tchat-toolbar-toggle {
    display: inline-flex;
  }
  .tchat-toolbar {
    display: none;
  }
  .tchat-toolbar.is-mobile-open {
    display: grid;
  }
  .ortho-case-chat-row {
    grid-template-columns: 1fr;
    gap: 6px;
  }
  .ortho-case-chat-row > label,
  .ortho-case-chat-value {
    padding-top: 0;
  }
  .tchat-bubble {
    max-width: 96%;
  }
  .tchat-composer-actions {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }
  .tchat-composer-left {
    width: 100%;
  }
  .tchat-header {
    margin-bottom: 6px;
    align-items: flex-start;
  }
  .tchat-contact {
    gap: 8px;
  }
  .tchat-avatar {
    width: 34px;
    height: 34px;
    flex: 0 0 34px;
  }
  .tchat-contact h3 {
    font-size: 15px;
  }
  .tchat-thread {
    padding: 10px 4px;
  }
  .tchat-row {
    margin-bottom: 8px;
  }
  .tchat-bubble {
    border-radius: 14px;
    padding: 7px 8px;
  }
  .tchat-meta {
    flex-wrap: wrap;
    row-gap: 4px;
  }
  .tchat-composer {
    padding: 8px 0 6px;
  }
  .tchat-composer textarea {
    min-height: 46px;
    margin-bottom: 6px;
  }
  .tchat-image-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .tchat-compose-hint {
    display: none;
  }
}

@media (max-width: 640px) {
  .main {
    padding: 10px;
    gap: 10px;
  }
  .header {
    margin-bottom: 6px;
  }
  .tchat {
    height: calc(100dvh - 54px);
    min-height: calc(100dvh - 54px);
    border-radius: 14px;
    padding: 8px;
  }
  .tchat-thread {
    flex: 1 1 auto;
  }
  .tchat-source {
    padding: 4px 8px;
  }
  .tchat-image-grid {
    grid-template-columns: 1fr;
  }
}
.stat-card {
  background: rgba(15,23,42,0.9);
  border: 1px solid rgba(100,210,255,0.12);
}
.stat-label {
  font-size: 12px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.stat-value {
  display: block;
  font-size: 27px;
  font-weight: 700;
  margin: 6px 0;
  color: #e2e8f0;
}
.stat-meta {
  font-size: 11px;
  color: var(--muted);
}
.dashboard-lists {
  margin-top: 12px;
}
.compact-table {
  width: 100%;
  font-size: 12px;
  min-width: 0;
}
.compact-table th,
.compact-table td {
  white-space: nowrap;
}
.status-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.status-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  padding: 8px 0;
  border-bottom: 1px solid rgba(31,42,68,0.6);
}
.status-list li:last-child {
  border-bottom: none;
}
.card {
  background: #0b1020;
  border: 1px solid #1f2a44;
  border-radius: 14px;
  padding: 16px;
  box-shadow: 0 15px 40px rgba(0,0,0,0.35);
  overflow-x: auto; /* allow wide content to scroll */
}
.card h3 { font-size: 16px; }
.list-item {
  border: 1px solid #1f2a44;
  border-radius: 10px;
  padding: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 10px;
  background: #0f172a;
}
.list-item > * { min-width: 0; }
.list-item strong {
  color: #e2e8f0;
  overflow-wrap: anywhere;
  word-break: break-word;
}
.tag {
  padding: 4px 8px;
  border-radius: 8px;
  font-size: 11px;
  color: #0b1020;
  background: var(--accent);
}
.tag.muted {
  background: #1f2a44;
  color: #e2e8f0;
}
.tag.status-pending {
  background: rgba(251,191,36,0.25);
  color: #facc15;
}
.tag.status-met,
.tag.status-provided {
  background: rgba(74,222,128,0.25);
  color: #4ade80;
}
.tag.status-missing {
  background: rgba(248,113,113,0.25);
  color: #f87171;
}
.table {
  width: 100%;
  min-width: 720px;
  border-collapse: collapse;
  margin-top: 8px;
  font-size: 13px;
}
.table.compact-table {
  min-width: 0;
  font-size: 13px;
}
.table th, .table td {
  border: 1px solid #1f2a44;
  padding: 10px 12px;
  text-align: left;
}
.table th {
  background: #0f172a;
  color: #e2e8f0;
  font-weight: 600;
}
.table th.sortable-header {
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
}
.table th.sortable-header:hover {
  background: rgba(100,210,255,0.08);
}
.sort-indicator {
  display: inline-block;
  min-width: 12px;
  margin-left: 6px;
  color: var(--accent);
  font-size: 10px;
}
.table tr:nth-child(even) { background: rgba(255,255,255,0.02); }
.table tr:hover { background: rgba(100,210,255,0.05); }
.table-input {
  width: 100%;
  background: #0f172a;
  border: 1px solid #1f2a44;
  border-radius: 8px;
  padding: 8px 10px;
  color: #e2e8f0;
  outline: none;
  transition: border 0.15s ease, box-shadow 0.15s ease;
}
.table-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(100,210,255,0.15);
}
.translation-toolbar {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  flex-wrap: wrap;
}
.field-inline {
  margin-bottom: 0;
  min-width: 160px;
}
.field-inline label {
  margin-bottom: 4px;
}
.field-inline select {
  min-width: 140px;
}
.actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.message {
  padding: 10px 12px;
  border-radius: 10px;
  margin-top: 10px;
  margin-bottom: 10px;
  font-size: 12px;
  border: 1px solid transparent;
}
.message.info { background: rgba(100,210,255,0.12); border-color: rgba(100,210,255,0.35); color: #bae6fd; }
.message.error { background: rgba(248,113,113,0.12); border-color: rgba(248,113,113,0.35); color: #fecdd3; }
.message.success { background: rgba(74,222,128,0.12); border-color: rgba(74,222,128,0.35); color: #bbf7d0; }
.loader-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  flex-direction: column;
  gap: 12px;
}
.spinner {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 4px solid rgba(100, 210, 255, 0.2);
  border-top-color: var(--accent);
  animation: spin 0.9s linear infinite;
}
.loader-text {
  color: #e2e8f0;
  font-weight: 600;
  font-size: 13px;
}
.progress {
  width: 100%;
  background: rgba(255,255,255,0.06);
  border: 1px solid #1f2a44;
  border-radius: 10px;
  overflow: hidden;
  height: 10px;
}
.progress-bar {
  height: 100%;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  width: 0%;
  transition: width 0.1s ease;
}
@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}
.sidebar-toggle { display: none; }
.sidebar-backdrop { display: none; }
.hamburger {
  display: inline-flex;
  flex-direction: column;
  gap: 4px;
}
.hamburger span {
  width: 18px;
  height: 2px;
  background: #e2e8f0;
  border-radius: 2px;
  display: block;
}
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999;
  padding: 16px;
}
.modal {
  background: #0b1020;
  border: 1px solid #1f2a44;
  border-radius: 14px;
  padding: 18px;
  width: 100%;
  max-width: 500px;
  min-width: 300px;
  box-shadow: 0 25px 70px rgba(0,0,0,0.55);
}
.modal h3 { margin-top: 0; }
.modal-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  flex-wrap: wrap;
  margin-top: 14px;
}
@media (max-width: 720px) {
  .file-thumb {
    width: 60px;
    min-width: 60px;
    height: 60px;
  }
  .ortho-file-actions {
    justify-content: flex-start;
  }
  .file-actions,
  .responsive-actions {
    justify-content: flex-start;
  }
}
.confirm-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.65);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  z-index: 1100;
  pointer-events: auto;
}
.confirm-box {
  background: #0b1020;
  border: 1px solid #1f2a44;
  border-radius: 12px;
  padding: 14px;
  width: 320px;
  box-shadow: 0 20px 50px rgba(0,0,0,0.55);
}
.confirm-message {
  color: #e2e8f0;
  margin-bottom: 12px;
  font-weight: 600;
}

.tender-flow-guide {
  border: 1px solid rgba(100,210,255,0.2);
  border-radius: 12px;
  padding: 16px;
  margin: 16px 0 20px;
  background: rgba(15,23,42,0.6);
}
.flow-steps {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 12px;
}
.flow-step {
  display: flex;
  gap: 12px;
  border: 1px dashed rgba(148,163,184,0.4);
  border-radius: 12px;
  padding: 12px;
  align-items: flex-start;
  background: rgba(15,23,42,0.85);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}
.flow-step.current {
  border-color: rgba(100,210,255,0.8);
  box-shadow: 0 6px 18px rgba(15,23,42,0.5);
  transform: translateY(-1px);
}
.flow-step.done {
  border-color: rgba(74,222,128,0.7);
  background: rgba(11,31,24,0.9);
}
.flow-step-badge {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  background: rgba(100,210,255,0.2);
  color: #e2e8f0;
}
.flow-step.done .flow-step-badge {
  background: rgba(74,222,128,0.3);
}
.flow-step-body h5 {
  margin: 0 0 4px;
  font-size: 14px;
}
.flow-step-body p {
  margin: 0;
  font-size: 12px;
  color: var(--muted);
}
.flow-step-actions {
  margin-top: 8px;
}
.insights-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 14px;
  margin: 12px 0 20px;
}
.insight-card {
  border: 1px solid rgba(148,163,184,0.3);
  border-radius: 12px;
  padding: 12px;
  background: rgba(10,15,32,0.85);
}
.insight-metric {
  display: flex;
  flex-direction: column;
  margin-bottom: 8px;
}
.insight-metric strong {
  font-size: 19px;
  color: #e2e8f0;
}
.insight-metric span {
  color: var(--muted);
  font-size: 12px;
}
.upper {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 11px;
}
.small {
  font-size: 11px;
}
.insight-list {
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 11px;
  color: var(--muted);
}
.insight-list li {
  margin-bottom: 4px;
}
.suggestion-panel {
  border: 1px solid rgba(148,163,184,0.3);
  border-radius: 12px;
  padding: 14px;
  margin-bottom: 16px;
  background: rgba(11,16,30,0.9);
}
.suggestion-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.suggestion-chip {
  display: flex;
  gap: 10px;
  align-items: center;
  background: rgba(15,23,42,0.8);
  border-radius: 10px;
  border: 1px solid rgba(100,210,255,0.15);
  padding: 10px;
  font-size: 12px;
}
.suggestion-chip .pill {
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  border: 1px solid transparent;
  color: #e2e8f0;
  background: rgba(255,255,255,0.06);
}
.suggestion-chip .pill.error {
  background: rgba(248,113,113,0.18);
  border-color: rgba(248,113,113,0.3);
  color: #fecaca;
}
.suggestion-chip .pill.warning {
  background: rgba(250,204,21,0.2);
  border-color: rgba(250,204,21,0.35);
  color: #fef9c3;
}
.suggestion-chip .pill.info {
  background: rgba(125,211,252,0.18);
  border-color: rgba(125,211,252,0.35);
  color: #bae6fd;
}
.tender-summary-grid {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
  gap: 16px;
  margin-bottom: 20px;
}
@media (max-width: 1100px) {
  .tender-summary-grid {
    grid-template-columns: 1fr;
  }
}
.tender-summary-card,
.tender-actions-card,
.tender-section-card {
  border: 1px solid rgba(148,163,184,0.3);
  border-radius: 12px;
  padding: 16px;
  background: rgba(10,15,32,0.9);
}
.tender-summary-card h4,
.tender-actions-card h4 {
  margin: 0 0 6px;
}
.summary-tip {
  margin-bottom: 12px;
}
.tender-action-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}
.tender-action-buttons .btn,
.tender-action-buttons .btn-ghost {
  flex: 1 1 calc(50% - 8px);
}
@media (max-width: 640px) {
  .tender-action-buttons .btn,
  .tender-action-buttons .btn-ghost {
    flex-basis: 100%;
  }
}
.tender-action-metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  gap: 10px;
}
.tender-action-metrics div {
  background: rgba(15,23,42,0.85);
  border: 1px solid rgba(100,210,255,0.12);
  border-radius: 10px;
  padding: 10px;
  text-align: center;
}
.tender-action-metrics strong {
  display: block;
  font-size: 19px;
  color: #e2e8f0;
}
.tender-action-metrics span {
  font-size: 11px;
  color: var(--muted);
}
.tender-sections-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 16px;
}
.section-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 12px;
}
.section-header h4 {
  margin: 0;
}
.section-header p {
  margin: 2px 0 0;
  font-size: 12px;
  color: var(--muted);
}
.tender-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.tender-list li {
  border: 1px solid rgba(31,42,68,0.9);
  border-radius: 10px;
  padding: 10px;
  background: rgba(15,23,42,0.7);
}
.tender-list-line {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}
.tender-list p {
  margin: 4px 0;
}
.tender-list select {
  width: 100%;
  margin-top: 6px;
}
.summary-actions {
  justify-content: flex-start;
}

@media (max-width: 960px) {
  .layout { display: block; }
  .sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: 260px;
    transform: translateX(-100%);
    z-index: 1000;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
  }
  .sidebar.is-open { transform: translateX(0); }
  .sidebar-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.55);
    z-index: 900;
  }
  .main { padding-top: 16px; }
  .nav { flex-direction: column; width: 100%; }
  .sidebar-toggle { display: inline-flex; padding: 10px; }
  .ortho-hero {
    grid-template-columns: 1fr;
  }
}



