/* CSS Variables */
:root {
  --nav: #0f2040;
  --blue: #2563eb;
  --bg: #f5f7fa;
  --border: #e2e8f0;
  --muted: #64748b;
}

/* Global Reset */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'DM Sans', -apple-system, sans-serif;
  font-size: 14px;
}

/* Layout */
.app {
  display: flex;
  height: 100vh;
  overflow: hidden;
  background: var(--bg);
}

.sb {
  width: 210px;
  background: var(--nav);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  overflow-y: auto;
}

.mn {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* Topbar */
.topbar {
  background: #fff;
  border-bottom: 1px solid var(--border);
  padding: 9px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}

.tp-t {
  font-size: 15px;
  font-weight: 600;
  color: #0f172a;
}

.tp-s {
  font-size: 12px;
  color: var(--muted);
}

/* Sidebar Elements */
.sb-logo {
  padding: 16px 15px 12px;
  border-bottom: 1px solid rgba(255,255,255,.08);
}

.sb-ln {
  font-size: 14px;
  font-weight: 600;
  color: #fff;
}

.sb-ls {
  font-size: 9px;
  color: rgba(255,255,255,.35);
  letter-spacing: 1.2px;
  text-transform: uppercase;
  margin-top: 2px;
}

.sb-u {
  padding: 10px 15px;
  border-bottom: 1px solid rgba(255,255,255,.08);
}

.sb-un {
  font-size: 13px;
  font-weight: 500;
  color: #fff;
}

.sb-ur {
  font-size: 11px;
  color: rgba(255,255,255,.45);
  margin-top: 1px;
}

.rl {
  font-size: 9px;
  color: rgba(255,255,255,.28);
  padding: 7px 12px 3px;
  text-transform: uppercase;
  letter-spacing: .8px;
  font-weight: 700;
}

.rs {
  margin: 3px 10px 7px;
  border-radius: 6px;
  overflow: hidden;
  background: rgba(255,255,255,.06);
}

.rb {
  width: 100%;
  padding: 6px 12px;
  font-size: 12px;
  color: rgba(255,255,255,.55);
  background: transparent;
  border: none;
  cursor: pointer;
  text-align: left;
  font-family: inherit;
}

.rb.ac {
  background: rgba(59,130,246,.28);
  color: #fff;
  font-weight: 500;
}

.sb-sec {
  padding: 10px 15px 3px;
  font-size: 9px;
  color: rgba(255,255,255,.3);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .9px;
}

.sbi {
  padding: 7px 15px;
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 13px;
  color: rgba(255,255,255,.65);
  transition: all .15s;
}

.sbi:hover {
  background: rgba(255,255,255,.07);
  color: #fff;
}

.sbi.ac {
  background: rgba(59,130,246,.2);
  color: #fff;
  font-weight: 500;
  border-left: 3px solid #60a5fa;
  padding-left: 12px;
}

/* Base Views Containers */
.main-view-container {
  display: flex;
  flex-direction: column;
  flex: 1;
  overflow: hidden;
}

/* Dashboard Elements */
.dash {
  flex: 1;
  overflow-y: auto;
  padding: 14px 18px;
  display: flex;
  flex-direction: column;
  gap: 11px;
}

.card {
  background: #fff;
  border-radius: 10px;
  border: 1px solid var(--border);
}

.ctitle {
  font-size: 10px;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .7px;
}

/* Tabs & Tables */
.ptabs {
  display: flex;
  overflow-x: auto;
  padding: 0 20px;
  background: #fff;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.ptab {
  padding: 9px 12px;
  font-size: 12px;
  font-weight: 500;
  color: var(--muted);
  cursor: pointer;
  white-space: nowrap;
  border-bottom: 2px solid transparent;
}

.ptab.ac {
  color: var(--blue);
  border-bottom-color: var(--blue);
}

.ptab .n {
  display: inline-block;
  background: #f1f5f9;
  border-radius: 10px;
  padding: 0 6px;
  font-size: 11px;
  margin-left: 3px;
}

.ptab.ac .n {
  background: #dbeafe;
  color: #1d4ed8;
}

.pb {
  background: #e2e8f0;
  border-radius: 4px;
  height: 5px;
  overflow: hidden;
}

.pf {
  height: 100%;
  border-radius: 4px;
  background: var(--blue);
}

/* Buttons */
.btn {
  padding: 7px 15px;
  border-radius: 7px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  border: none;
  font-family: inherit;
  transition: all .15s;
}

.btnp {
  background: var(--blue);
  color: #fff;
}

.btnp:hover {
  background: #1d4ed8;
}

.btnp:disabled {
  background: #94a3b8;
  cursor: not-allowed;
}

.btng {
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--border);
}

.btng:hover {
  background: #f8fafc;
}

/* Modal */
.ov {
  position: fixed;
  inset: 0;
  background: rgba(10,22,45,.55);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 2vh 2vw;
}

.modal {
  background: #fff;
  width: 80vw;
  max-width: 1000px;
  height: 88vh;
  border-radius: 14px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 8px 48px rgba(0,0,0,.22);
}

.mh {
  padding: 13px 17px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.mhg {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 12px;
  margin-top: 9px;
}

.mtabs {
  display: flex;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.mtab {
  padding: 8px 13px;
  font-size: 13px;
  color: var(--muted);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  white-space: nowrap;
}

.mtab.ac {
  color: var(--blue);
  border-bottom-color: var(--blue);
  font-weight: 500;
}

.tb-b {
  display: inline-block;
  background: #ef4444;
  color: #fff;
  border-radius: 10px;
  padding: 0 5px;
  font-size: 10px;
  font-weight: 600;
  margin-left: 4px;
  vertical-align: middle;
}

.mb {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
}

.mf {
  padding: 11px 17px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-shrink: 0;
}

/* Modal Internal Items */
.cli {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid #f8fafc;
}

.fe-row {
  display: grid;
  grid-template-columns: 180px 1fr;
  align-items: center;
  gap: 8px;
  padding: 6px 0;
  border-bottom: 1px solid #f8fafc;
}

.cli:last-child {
  border-bottom: none;
}

.clb {
  padding: 3px 7px;
  border-radius: 5px;
  font-size: 11px;
  font-weight: 500;
  cursor: pointer;
  border: 1px solid;
  font-family: inherit;
}

.nc {
  padding: 10px 11px;
  border-radius: 8px;
  background: #f8fafc;
  border: 1px solid var(--border);
  margin-bottom: 7px;
}

.dr {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 0;
  border-bottom: 1px solid #f8fafc;
}

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

/* Tables */
.atbl {
  width: 100%;
  border-collapse: collapse;
}

.atbl th {
  font-size: 10px;
  font-weight: 700;
  color: #94a3b8;
  text-align: left;
  padding: 7px 11px;
  border-bottom: 1px solid var(--border);
  text-transform: uppercase;
  letter-spacing: .5px;
  white-space: nowrap;
}

.atbl td {
  padding: 9px 11px;
  border-bottom: 1px solid #f8fafc;
  font-size: 13px;
  color: #1e293b;
  vertical-align: middle;
}

.atbl tr {
  cursor: pointer;
  transition: background .15s;
}

.atbl tr:hover td {
  background: #f8fafc;
}

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

/* Tooltips */
.phase-dot-wrap:hover .phase-tooltip {
  opacity: 1 !important;
}

.phase-dot-wrap:hover>div:first-child {
  transform: scale(1.4);
}
