/* ============ Veltric CMIS – Base Styles ============ */

:root {
  --veltric-blue: #1456c4;
  --veltric-blue-dark: #0b357a;
  --veltric-blue-light: #e7f0ff;
  --veltric-accent: #ff8a3d;
  --bg-body: #f4f6fb;
  --bg-surface: #ffffff;
  --border-subtle: #dde2ee;
  --text-main: #1f2933;
  --text-muted: #6b7280;
  --radius-card: 10px;
  --shadow-card: 0 8px 18px rgba(15, 23, 42, 0.06);
  --font-sans: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
}

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

body {
  margin: 0;
  font-family: var(--font-sans);
  background: var(--bg-body);
  color: var(--text-main);
}

/* Layout shell */

.app-shell {
  display: flex;
  min-height: 100vh;
}

/* Sidebar */

.sidebar {
  width: 240px;
  background: linear-gradient(180deg, var(--veltric-blue-dark), #02132f);
  color: #e5ecff;
  display: flex;
  flex-direction: column;
}

.sidebar-header {
  display: flex;
  align-items: center;
  padding: 18px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-logo-circle {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  background: #ffffff;
  color: var(--veltric-blue-dark);
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 10px;
  font-size: 18px;
}

.sidebar-logo-img {
  width: 28px;
  height: 28px;
  object-fit: contain;
}

.sidebar-title {
  font-size: 19px;
  font-weight: 600;
}

.sidebar-subtitle {
  font-size: 11px;
  color: rgba(229, 236, 255, 0.7);
}

.sidebar-nav {
  padding: 14px 10px 10px;
  flex: 1;
}

.sidebar-nav ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.sidebar-nav li {
  margin-bottom: 4px;
}

.sidebar-nav a {
  display: flex;
  align-items: center;
  padding: 8px 12px;
  border-radius: 8px;
  color: inherit;
  text-decoration: none;
  font-size: 14px;
}

.sidebar-nav a:hover {
  background: rgba(255, 255, 255, 0.05);
}

.sidebar-nav a.active {
  background: rgba(255, 255, 255, 0.14);
}

.sidebar-nav-icon {
  width: 20px;
  margin-right: 8px;
  text-align: center;
  font-size: 16px;
}

.sidebar-footer {
  padding: 12px 16px 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 12px;
  color: rgba(229, 236, 255, 0.65);
}

/* Main area */

.main {
  flex: 1;
  display: flex;
  flex-direction: column;
}

/* Top bar */

.topbar {
  height: 60px;
  background: #ffffff;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 22px;
}

.topbar-title {
  font-size: 18px;
  font-weight: 600;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 13px;
}

.pill-environment {
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--veltric-blue-light);
  color: var(--veltric-blue-dark);
  font-weight: 500;
}

.user-chip {
  display: flex;
  align-items: center;
  gap: 8px;
}

.user-avatar {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: var(--veltric-blue);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 14px;
  font-weight: 600;
}

/* Content */

.content {
  padding: 22px 26px 32px;
}

/* Utility classes */

.page-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}

.page-title {
  font-size: 22px;
  font-weight: 600;
}

.page-subtitle {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 4px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  padding: 7px 14px;
  font-size: 13px;
  font-weight: 500;
}

.btn-primary {
  background: var(--veltric-blue);
  color: #ffffff;
}

.btn-outline {
  background: transparent;
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
}

.btn-ghost {
  background: transparent;
  color: var(--text-main);
}

/* Cards & layout */

.card {
  background: var(--bg-surface);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  padding: 16px 18px;
}

.card-title {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 8px;
}

.card-subtitle {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 10px;
}

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

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

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

@media (max-width: 1024px) {
  .grid-4,
  .grid-3,
  .grid-2 {
    grid-template-columns: 1fr;
  }

  .sidebar {
    display: none; /* simple mobile behavior */
  }
}

/* KPI tile */

.kpi-tile {
  padding: 14px 14px 12px;
  border-radius: 12px;
  background: var(--veltric-blue-light);
  border: 1px solid #d1ddff;
}

.kpi-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.kpi-value {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 6px;
}

.kpi-link {
  font-size: 12px;
  color: var(--veltric-blue);
  text-decoration: none;
}

/* Tables */

.table-wrapper {
  margin-top: 10px;
  border-radius: 10px;
  border: 1px solid var(--border-subtle);
  overflow: hidden;
  background: #ffffff;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

thead {
  background: #f3f4fb;
}

th,
td {
  padding: 8px 10px;
  text-align: left;
  border-bottom: 1px solid #edf0f7;
}

th {
  font-weight: 600;
  color: var(--text-muted);
}

tbody tr:hover {
  background: #f8fafc;
}

.table-link {
  color: var(--veltric-blue);
  text-decoration: none;
  font-weight: 500;
}

/* Forms / filters */

.filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 10px;
}

.input,
.select {
  border-radius: 999px;
  border: 1px solid var(--border-subtle);
  padding: 6px 10px;
  font-size: 13px;
  min-width: 160px;
  background: #ffffff;
}

.input-search {
  flex: 1;
}

/* Detail layout */

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

.detail-title {
  font-size: 20px;
  font-weight: 600;
}

.detail-subtitle {
  font-size: 13px;
  color: var(--text-muted);
}

.badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  font-size: 11px;
  padding: 3px 10px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.badge-status {
  background: #e0f2ff;
  color: #05559f;
}

/* Definition list-style info */

.info-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px 24px;
  font-size: 13px;
}

.info-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.info-value {
  font-weight: 500;
}

/* Tabs (for detail views) */

.tabs {
  display: flex;
  border-bottom: 1px solid var(--border-subtle);
  margin-bottom: 12px;
  gap: 12px;
}

.tab {
  padding: 8px 14px;
  font-size: 13px;
  border-radius: 999px 999px 0 0;
  cursor: pointer;
  background: transparent;
  border: none;
  color: var(--text-muted);
}

.tab.active {
  background: #ffffff;
  color: var(--text-main);
  border: 1px solid var(--border-subtle);
  border-bottom-color: #ffffff;
}

/* Status labels for CRs */

.status-pill {
  border-radius: 999px;
  padding: 4px 9px;
  font-size: 11px;
  font-weight: 500;
}

.status-under-review {
  background: #fff7e6;
  color: #c77b00;
}

.status-implemented {
  background: #e4fbec;
  color: #18854b;
}

.status-in-progress {
  background: #e6f2ff;
  color: #1558b3;
}

/* Small helpers */

.mt-16 {
  margin-top: 16px;
}

.mt-8 {
  margin-top: 8px;
}


/* ============ Forms (enhanced) ============ */

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px 16px;
}

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

.field label {
  display: block;
}

.input-block,
.select-block {
  width: 100%;
  min-width: 0;
}

.textarea {
  border-radius: 12px;
  border: 1px solid var(--border-subtle);
  padding: 10px 12px;
  font-size: 13px;
  background: #ffffff;
  resize: vertical;
}

.textarea-block {
  width: 100%;
}

.help-text {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 6px;
}

.checkbox-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px 16px;
  font-size: 13px;
}

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

.checkbox {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-main);
}

.checkbox input {
  width: 16px;
  height: 16px;
}




/* ============ GIS / Map ============ */

.map-canvas {
  width: 100%;
  height: 520px;
  border-radius: 12px;
  border: 1px solid var(--border-subtle);
  overflow: hidden;
}

.legend {
  margin-top: 8px;
  display: grid;
  gap: 8px;
  font-size: 13px;
}

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

.dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  display: inline-block;
}

.dot-wiu { background: var(--veltric-blue); }
.dot-cc { background: var(--veltric-accent); }
.dot-emu { background: #16a34a; }

.veltric-marker {
  border-radius: 999px;
  border: 2px solid #ffffff;
  box-shadow: 0 6px 14px rgba(15, 23, 42, 0.18);
}

.marker-wiu { background: var(--veltric-blue); }
.marker-cc { background: var(--veltric-accent); }
.marker-emu { background: #16a34a; }




/* ============ Quick Actions (Topbar) ============ */
.quick-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-right: 8px;
}

