/* /idsahome/csc/assets/csc_ui.css
   Minimal CSC panel styling (no external deps). */

.idsa-csc-root {
  margin: 0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  background: #0b1220;
  color: #e6edf7;
  overflow-x: clip;
}

.csc-shell {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  min-height: 100vh;
  max-width: 100vw;
  box-sizing: border-box;
}

.csc-side {
  background: #0f1a2f;
  border-right: 1px solid rgba(255,255,255,0.08);
  display: flex;
  flex-direction: column;
}

.csc-brand {
  padding: 16px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.csc-brand-title { font-weight: 700; letter-spacing: 0.2px; }
.csc-brand-sub { opacity: 0.75; font-size: 12px; margin-top: 4px; }

.csc-nav { padding: 8px; display: grid; gap: 6px; }
.csc-nav-link {
  text-decoration: none;
  color: inherit;
  padding: 10px 10px;
  border-radius: 10px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.06);
}
.csc-nav-link:hover { background: rgba(255,255,255,0.06); }
.csc-nav-link.is-active { background: rgba(83, 149, 255, 0.18); border-color: rgba(83,149,255,0.35); }

.csc-side-footer { margin-top: auto; padding: 12px 16px; border-top: 1px solid rgba(255,255,255,0.08); }
.csc-user-name { font-weight: 600; }
.csc-user-meta { opacity: 0.7; font-size: 12px; margin-top: 2px; }
.csc-logout { display: inline-block; margin-top: 10px; color: #cfe0ff; text-decoration: none; }
.csc-logout:hover { text-decoration: underline; }

.csc-main {
  background: #0b1220;
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
}
.csc-top { padding: 16px 18px; border-bottom: 1px solid rgba(255,255,255,0.08); display: flex; align-items: center; gap: 10px; }
.csc-top-title { font-size: 18px; font-weight: 700; }
.csc-mobile-nav-toggle {
  display: none;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.16);
  background: rgba(255,255,255,0.06);
  color: #e6edf7;
  font-size: 13px;
}
.csc-mobile-overlay {
  display: none;
}
.csc-content {
  padding: 18px;
  display: grid;
  gap: 14px;
  min-width: 0;
  min-height: 12rem;
  box-sizing: border-box;
}

.csc-route-fallback {
  border-color: rgba(255, 204, 102, 0.55);
  box-shadow: 0 0 0 1px rgba(255, 204, 102, 0.2);
}

/* CSC dashboard — compact desk home */
.csc-dash-hero {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}
.csc-dash-hero__title {
  margin: 0 0 4px;
  font-size: 1.15rem;
  font-weight: 700;
}
.csc-dash-next {
  margin: 0 0 12px;
  font-size: 13px;
  color: #cbd5e1;
}
.csc-dash-hero__actions {
  margin-bottom: 16px;
}
.csc-dash-hero__actions .csc-btn-primary {
  min-width: 11rem;
}
.csc-dash-kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 140px), 1fr));
  gap: 10px;
  margin-bottom: 14px;
}
.csc-dash-kpi {
  padding: 12px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(0, 0, 0, 0.12);
}
.csc-dash-kpi__label {
  display: block;
  font-size: 11px;
  opacity: 0.75;
  margin-bottom: 4px;
}
.csc-dash-kpi__value {
  display: block;
  font-size: 1.1rem;
  font-weight: 700;
}
.csc-dash-kpi__sub {
  display: block;
  font-size: 11px;
  opacity: 0.72;
  margin-top: 4px;
}
.csc-dash-kpi--warn .csc-dash-kpi__value { color: #fcd34d; }
.csc-dash-kpi--good .csc-dash-kpi__value { color: #86efac; }
.csc-dash-details {
  margin-bottom: 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 8px 12px;
  background: rgba(0, 0, 0, 0.1);
}
.csc-dash-details summary {
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  color: #bfdbfe;
  list-style: none;
}
.csc-dash-details summary::-webkit-details-marker { display: none; }
.csc-dash-details[open] summary { margin-bottom: 10px; }
.csc-dash-activity {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 8px;
}
.csc-dash-activity__time {
  display: block;
  font-size: 11px;
  opacity: 0.7;
}
.csc-dash-activity__text {
  font-size: 13px;
}
.csc-dash-foot {
  margin: 12px 0 0;
  font-size: 12px;
  line-height: 1.5;
}
.csc-dash-foot a {
  color: #93c5fd;
}

.csc-tier-a-stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 140px), 1fr));
  gap: 10px;
  margin: 12px 0;
}
.csc-tier-a-today {
  margin: 14px 0 0;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.02);
}
.csc-tier-a-today__title {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
}
.csc-tier-a-today__note {
  margin: 6px 0 10px;
  font-size: 12px;
}
.csc-tier-a-today__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}
.csc-tier-a-today__item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(0, 0, 0, 0.12);
}
.csc-tier-a-today__count {
  min-width: 2rem;
  font-weight: 700;
  font-size: 18px;
}
.csc-tier-a-today__item--good .csc-tier-a-today__count { color: #86efac; }
.csc-tier-a-today__item--warn .csc-tier-a-today__count { color: #fcd34d; }
.csc-tier-a-today__label {
  color: #93c5fd;
  text-decoration: none;
  font-size: 13px;
}
.csc-tier-a-today__label:hover { color: #bfdbfe; }
.csc-tier-a-strip {
  margin: 12px 0 0;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  background: rgba(15, 23, 42, 0.35);
  font-size: 13px;
  line-height: 1.5;
}
.csc-tier-a-strip__line { margin: 0 0 6px; }
.csc-tier-a-strip__line:last-child { margin-bottom: 0; }
.csc-tier-a-strip a { color: #93c5fd; }

.csc-card {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 14px;
  padding: 16px;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
}
.csc-card h1, .csc-card h2 { margin: 0 0 10px 0; }
.csc-muted { opacity: 0.8; margin-top: 0; }
.csc-warn { color: #ffcc66; }
.csc-mono { font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace; font-size: 12px; opacity: 0.85; }

.csc-btn {
  display: inline-block;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(83,149,255,0.45);
  background: rgba(83,149,255,0.22);
  color: #eaf2ff;
  text-decoration: none;
  cursor: pointer;
}
.csc-btn:hover { background: rgba(83,149,255,0.30); }
.csc-btn-primary {
  background: rgba(83, 149, 255, 0.38);
  border-color: rgba(83, 149, 255, 0.55);
  font-weight: 600;
}

.csc-actions { display: flex; flex-wrap: wrap; gap: 10px; }

.csc-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.csc-k { font-size: 12px; opacity: 0.75; }
.csc-v { font-weight: 700; }
/* Station / reference IDs on dashboard — less visual weight than summary stats */
.csc-v.csc-ref { font-weight: 500; opacity: 0.72; font-size: 13px; }

.csc-ref-details {
  margin-top: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 8px 10px;
  background: rgba(0, 0, 0, 0.15);
}
.csc-ref-summary {
  cursor: pointer;
  font-size: 13px;
  opacity: 0.85;
  list-style: none;
}
.csc-ref-summary::-webkit-details-marker { display: none; }
.csc-ref-details__body {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.csc-auth { min-height: 100vh; display: grid; place-items: center; padding: 18px; }
.csc-label { display: grid; gap: 6px; margin: 10px 0; }
.csc-input {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.12);
  color: inherit;
  padding: 10px 12px;
  border-radius: 12px;
  outline: none;
}
.csc-input:focus { border-color: rgba(83,149,255,0.6); }
.csc-alert {
  background: rgba(255, 92, 92, 0.12);
  border: 1px solid rgba(255, 92, 92, 0.30);
  color: #ffd2d2;
  padding: 10px 12px;
  border-radius: 12px;
  margin: 10px 0;
}
.csc-footnote { opacity: 0.75; font-size: 12px; margin-top: 12px; }

.csc-table-wrap { overflow: auto; border-radius: 12px; border: 1px solid rgba(255,255,255,0.08); }
.csc-table { width: 100%; border-collapse: collapse; min-width: 720px; }
.csc-table th, .csc-table td { padding: 10px 12px; border-bottom: 1px solid rgba(255,255,255,0.08); text-align: left; }
.csc-table th { font-size: 12px; opacity: 0.8; font-weight: 700; }

/* CSC mobile baseline: keep forms/actions above fixed launcher area */
.idsa-csc-root .csc-content {
  padding-bottom: max(112px, calc(env(safe-area-inset-bottom, 0px) + 96px));
}

.idsa-csc-root .csc-content input,
.idsa-csc-root .csc-content select,
.idsa-csc-root .csc-content textarea,
.idsa-csc-root .csc-content .csc-input {
  min-height: 42px;
}

.idsa-csc-root .csc-content textarea {
  min-height: 94px;
}

.idsa-csc-root .csc-content .csc-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.csc-badge { padding: 4px 8px; border-radius: 999px; font-size: 12px; border: 1px solid rgba(255,255,255,0.15); }
.csc-badge-pending { background: rgba(255, 204, 102, 0.12); border-color: rgba(255, 204, 102, 0.35); }
.csc-badge-payable { background: rgba(83, 149, 255, 0.12); border-color: rgba(83, 149, 255, 0.35); }
.csc-badge-paid { background: rgba(72, 197, 125, 0.12); border-color: rgba(72, 197, 125, 0.35); }
.csc-badge-reversed { background: rgba(255, 92, 92, 0.12); border-color: rgba(255, 92, 92, 0.35); }

@media (max-width: 900px) {
  .csc-shell {
    grid-template-columns: minmax(0, 1fr);
  }
  .csc-mobile-nav-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
  .csc-mobile-overlay {
    position: fixed;
    inset: 0;
    background: rgba(2, 6, 23, 0.48);
    z-index: 28;
    display: block;
  }
  .csc-side {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: min(86vw, 320px);
    z-index: 30;
    max-width: none;
    transform: translateX(-100%);
    transition: transform .22s ease;
    overflow-y: auto;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.45);
  }
  .csc-mobile-nav-open .csc-side {
    transform: translateX(0);
  }
  .csc-main {
    grid-column: 1 / -1;
  }
  .csc-content {
    padding: 12px;
    padding-bottom: max(124px, calc(env(safe-area-inset-bottom, 0px) + 108px));
  }
  .csc-top {
    position: sticky;
    top: 0;
    z-index: 12;
    background: #0b1220;
    padding: 12px;
  }
  .csc-top-title {
    font-size: 17px;
  }
  .csc-nav {
    display: grid;
    gap: 6px;
    padding: 8px;
  }
  .csc-nav-link {
    width: 100%;
    text-align: left;
    box-sizing: border-box;
  }
  .csc-nav-help {
    margin: 0 8px;
    text-align: center;
  }
  .csc-nav-group-toggle {
    padding: 10px 12px;
  }
  .csc-nav-sublink {
    padding: 8px 12px 8px 24px;
  }
  .csc-side-footer {
    display: block;
    padding: 10px 12px;
    font-size: 13px;
  }
  .csc-grid { grid-template-columns: 1fr; }
  .csc-table {
    min-width: 0;
  }

  .idsa-csc-root .idsa-sos-footer-launcher {
    right: 10px;
    bottom: max(64px, calc(env(safe-area-inset-bottom, 0px) + 52px));
  }

  /* Sticky mobile action bar for common CSC form submit rows */
  .idsa-csc-root .csc-content form .csc-actions,
  .idsa-csc-root .csc-content form .csc-village-actions,
  .idsa-csc-root .csc-content form .csc-vendor-actions,
  .idsa-csc-root .csc-content form .csc-filter-actions,
  .idsa-csc-root .csc-content form .kloc-form-actions,
  .idsa-csc-root .csc-content form .csc-user-add-form__actions {
    position: sticky;
    bottom: max(8px, env(safe-area-inset-bottom, 0px));
    z-index: 65;
    margin-top: 12px;
    padding: 10px;
    border-radius: 12px;
    border: 1px solid rgba(148, 163, 184, 0.35);
    background: rgba(11, 18, 32, 0.96);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.28);
  }

  .idsa-csc-root .csc-content form .csc-actions .csc-btn,
  .idsa-csc-root .csc-content form .csc-village-actions .csc-btn,
  .idsa-csc-root .csc-content form .csc-vendor-actions .csc-btn,
  .idsa-csc-root .csc-content form .csc-filter-actions .csc-btn,
  .idsa-csc-root .csc-content form .kloc-form-actions .csc-btn,
  .idsa-csc-root .csc-content form .csc-user-add-form__actions .csc-btn {
    flex: 1 1 140px;
    min-height: 40px;
  }
}

/* Disabled booking button state */
.csc-btn-disabled {
  opacity: .55;
  cursor: not-allowed;
  border-style: dashed;
}

/* KYC location update — 3-step grid */
.csc-kyc-grid { display:grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap:10px; margin-top: 10px; }
.csc-kyc-step { border:1px solid rgba(255,255,255,0.14); border-radius: 12px; padding: 10px 12px; background: rgba(255,255,255,0.02); }
.csc-kyc-step strong { display:block; font-size: 13px; margin-bottom: 4px; }
.csc-kyc-step.done { border-color: rgba(72,197,125,0.55); background: rgba(72,197,125,0.12); }
.csc-kyc-step.next { border-color: rgba(83,149,255,0.55); background: rgba(83,149,255,0.12); }
.csc-kyc-row { display:grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.csc-kyc-help { font-size: 12px; opacity: .82; margin-top: 8px; }
.csc-alert-ok { background: rgba(72, 197, 125, 0.12); border: 1px solid rgba(72, 197, 125, 0.4); color: #d3ffe4; }
.csc-alert-warn { background: rgba(255, 204, 102, 0.12); border: 1px solid rgba(255, 204, 102, 0.4); color: #ffe2a8; }
.csc-readonly-box { border: 1px dashed rgba(255,255,255,0.2); border-radius: 12px; padding: 10px 12px; background: rgba(255,255,255,0.02); }
@media (max-width: 900px) {
  .csc-kyc-grid, .csc-kyc-row { grid-template-columns: 1fr; }
}

.csc-desk-presence {
  margin-top: 10px;
  padding: 10px 12px 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: grid;
  gap: 8px;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
}
.csc-desk-presence__label {
  font-size: 13px;
  font-weight: 700;
  line-height: 1.35;
}
.csc-desk-presence__hint {
  margin: 0;
  font-size: 11px;
  opacity: 0.72;
  line-height: 1.4;
}
.csc-btn-ghost {
  width: 100%;
  box-sizing: border-box;
  text-align: center;
  border-color: rgba(148, 163, 184, 0.35);
  background: rgba(255, 255, 255, 0.04);
}
.csc-btn-ghost:hover {
  background: rgba(255, 255, 255, 0.08);
}

/* P6 — CSC assist five-block contract + chips */
.idsa-csc-assist-contract {
  margin: 0 0 14px;
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.03);
}
.idsa-csc-assist-contract__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.idsa-csc-assist-contract__kicker {
  margin: 0;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #94a3b8;
}
.idsa-csc-assist-contract__meta,
.idsa-csc-assist-contract__note,
.idsa-csc-assist-contract__scope,
.idsa-csc-assist-contract__ops {
  margin: 8px 0 0;
  font-size: 12px;
  line-height: 1.5;
  color: #cbd5e1;
}
.idsa-csc-assist-contract__scope {
  color: #94a3b8;
}
.idsa-csc-assist-contract__ops a {
  color: #93c5fd;
  text-decoration: none;
}
.idsa-csc-assist-contract__ops a:hover {
  color: #bfdbfe;
}
.idsa-csc-assist-contract__actions {
  margin-top: 12px;
}
.idsa-csc-scope-note {
  margin: 0 0 12px;
  padding: 10px 12px;
  border-radius: 8px;
  background: rgba(15, 23, 42, 0.45);
  border: 1px solid rgba(148, 163, 184, 0.25);
  font-size: 12px;
  color: #94a3b8;
  line-height: 1.45;
}
.idsa-csc-chip {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  border: 1px solid rgba(255, 255, 255, 0.12);
}
.idsa-csc-chip--warning { color: #fde68a; border-color: rgba(234, 179, 8, 0.35); background: rgba(234, 179, 8, 0.12); }
.idsa-csc-chip--success { color: #86efac; border-color: rgba(34, 197, 94, 0.35); background: rgba(34, 197, 94, 0.12); }
.idsa-csc-chip--danger { color: #fca5a5; border-color: rgba(239, 68, 68, 0.35); background: rgba(239, 68, 68, 0.12); }
.idsa-csc-chip--neutral { color: #cbd5e1; border-color: rgba(148, 163, 184, 0.35); background: rgba(148, 163, 184, 0.1); }
.idsa-csc-queue-empty {
  padding: 18px 14px;
  text-align: center;
  border-radius: 12px;
  border: 1px dashed rgba(148, 163, 184, 0.35);
  background: rgba(255, 255, 255, 0.02);
}
.idsa-csc-queue-empty p {
  margin: 0 0 12px;
  font-size: 13px;
  color: #94a3b8;
}
@media (max-width: 640px) {
  .csc-vendor-list-card {
    overflow: visible;
  }
  .csc-vendor-list-table {
    display: block;
    min-width: 0;
  }
  .csc-vendor-list-table thead {
    display: none;
  }
  .csc-vendor-list-table tbody {
    display: block;
  }
  .csc-vendor-list-table tr {
    display: block;
    margin-bottom: 12px;
    padding: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.02);
  }
  .csc-vendor-list-table td {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    padding: 6px 0;
    border: none;
    white-space: normal;
  }
  .csc-vendor-list-table td::before {
    content: attr(data-label);
    font-weight: 700;
    color: #94a3b8;
    flex: 0 0 42%;
  }
  .csc-vendor-list-table td.csc-vendor-actions-cell {
    flex-direction: column;
    align-items: stretch;
  }
  .csc-vendor-list-table td.csc-vendor-actions-cell .csc-btn-primary {
    width: 100%;
  }
}

