:root{
  --ocp-blue:#1e73be;
  --ocp-blue-dark:#155a97;

  --ink:#0f172a;
  --muted:#475569;

  --bg:#f4f7fb;           /* page canvas */
  --card:#ffffff;         /* pure white card */
  --soft:#eef5ff;         /* soft blue surface */
  --line:#e3e8f2;

  --shadow: 0 10px 26px rgba(2,6,23,0.06);

  --radius-lg: 22px;
  --radius-md: 18px;

  /* legacy aliases used by existing CSS */
  --text: var(--ink);
  --panel: var(--card);
  --border: var(--line);
  --blue: var(--ocp-blue);
  --blue-soft: rgba(30,115,190,0.12);
}


*{ box-sizing:border-box; }
body{
  margin:0;
  font-family: Arial, sans-serif;
  color:var(--ink);
  background:
    radial-gradient(1200px 600px at 20% -10%, rgba(30,115,190,0.18), transparent 60%),
    radial-gradient(900px 500px at 95% 0%, rgba(30,115,190,0.12), transparent 55%),
    var(--bg);
  padding: 22px;
  font-weight: 400;
}

.page-bg{ padding: 22px; }

/* Big master rectangle wrapping everything */
.page-wrap{
  max-width: 1220px;
  margin: 0 auto;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  overflow:hidden;
}

.app-header{
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding: 18px 18px 14px 18px;
  border-bottom: 4px solid var(--blue);
  background: #fff;
}

.brand{ display:flex; gap:14px; align-items:center; }
.logos{ display:flex; gap:10px; }
.logo-box{
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  display:flex;
  align-items:center;
  justify-content:center;
  background: rgba(255,255,255,0.65);
  min-height: 52px;
  min-width: 110px;
}
.logo-box img{ height: 34px; width:auto; max-width: 150px; display:block; }

.app-name{ font-weight: 700; letter-spacing: 0.2px; font-size: 20px; }
.subtitle{ font-size: 12px; color: var(--muted); margin-top:2px; }

.logout{ margin:0; }

.app-main{ padding: 18px; background: #fbfcfe; }

.grid{
  display:grid;
  grid-template-columns: 300px 1fr;
  gap: 16px;
  align-items:start;
}
.grid > *{min-width:0;}


.card{
  background: linear-gradient(180deg, rgba(230,243,255,0.96), rgba(245,248,255,0.96));
  border: 1px solid rgba(30,115,190,0.12);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow);
  padding: 16px;
  margin-bottom: 16px;
}

/* Smaller rectangles inside the big one, with a Zeus blue accent */
.card-accent{
  border-left: 6px solid var(--blue);
  background: #fff;
}

.card-title{ font-weight: 600; margin-bottom: 8px; }
.card-text{ color: #374151; line-height: 1.35; }

.form{ display:flex; flex-direction:column; gap:10px; margin-top: 10px; }
.label{ font-size: 12px; color: var(--muted); font-weight: 700; }
.input{
  width:100%;
  padding: 12px 12px;
  border: 1px solid var(--border);
  border-radius: 14px;
  outline:none;
  background: #fff;
  font-size: 14px;
}
.input:focus{
  border-color: var(--blue);
  box-shadow: 0 0 0 4px var(--blue-soft);
}

.textarea{
  width:100%;
  padding: 12px 12px;
  border: 1px solid var(--border);
  border-radius: 14px;
  outline:none;
  background: #fff;
  font-size: 14px;
  resize: vertical;
  font-family: inherit;
  line-height: 1.4;
  min-height: 130px;
  }
.textarea:focus{
  border-color: var(--blue);
  box-shadow: 0 0 0 4px var(--blue-soft);
}

.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap: 8px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid transparent;
  font-weight: 700;
  cursor:pointer;
}
.btn-primary{ background: var(--blue); color: #fff; }
.btn-ghost{ background: #fff; border: 1px solid var(--border); color: var(--text); }

.alert{
  padding: 10px 12px;
  border-radius: 14px;
  font-weight: 700;
  font-size: 13px;
  margin: 10px 0 0 0;
  border: 1px solid var(--border);
  background: #fff;
}
.alert-error{ border-color: #f3c6c6; background: #fff5f5; }
.alert-info{ border-color: #c7d7ff; background: #f4f7ff; }

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

.pill-row{ display:flex; flex-wrap:wrap; gap:8px; margin-top: 12px; }
.pill{
  display:inline-flex;
  padding: 7px 10px;
  border-radius: 999px;
  border:1px solid rgba(30,115,190,0.20);
  background: rgba(30,115,190,0.10);
  font-size: 12px;
  color:#0b2b45;
  font-weight: 500;
}

.nav{ display:flex; flex-direction:column; gap:8px; }
.nav-link{
  text-decoration:none;
  color: var(--text);
  font-weight: 600;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: rgba(30,115,190,0.06);
}
.nav-link.active{
  border-color: #c7d7ff;
  background: #f4f7ff;
  color: #0b2ea8;
}
.nav-sep{ height: 1px; background: var(--border); margin: 4px 0; }
.nav-muted{ color: var(--muted); font-size: 12px; font-weight: 700; }

.kv{
  display:grid;
  grid-template-columns: 70px 1fr;
  gap: 8px 14px;
  font-size: 14px;
  align-items:start;
}
.kv .k{ color: var(--muted); font-weight: 600; font-size: 13px; }
.kv .v{ font-weight: 600; overflow-wrap:anywhere; word-break: break-word; }

.app-footer{
  padding: 14px 18px;
  border-top: 1px solid var(--border);
  background: #f7f8fb;
  color: #374151;
  display:flex;
  justify-content:space-between;
  gap: 12px;
  flex-wrap:wrap;
  font-size: 12px;
}
.muted{ color: var(--muted); }

@media (max-width: 900px){
  .grid{ grid-template-columns: 1fr; }
  .page-bg{ padding: 10px; }
  .app-header{ flex-direction:column; align-items:flex-start; gap: 10px; }
}


/* Phase 3 dashboard layout */
.action-grid{
  display:grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 16px;
}
.action-card{
  text-decoration:none;
  color: inherit;
  transition: transform .08s ease, box-shadow .08s ease;
}
.action-card:hover{
  transform: translateY(-1px);
}
.action-cta{
  margin-top: 12px;
  font-weight: 700;
  color: var(--primary, #3f4cff);
}
@media (max-width: 980px){
  .grid{ grid-template-columns: 1fr; }
  .action-grid{ grid-template-columns: 1fr; }
}


/* Dashboard hero + workflow cards (calculator-style) */
.hero{
  position: relative;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow);
  overflow:hidden;
  background: var(--card);
  padding: 18px;
  margin-bottom: 16px;
}
.hero:before{
  content:"";
  position:absolute;
  top:-30px; right:-120px;
  width: 360px; height: 220px;
  background: linear-gradient(135deg, rgba(30,94,255,0.18), rgba(30,94,255,0));
  transform: rotate(12deg);
}
.hero-content{ position:relative; }
.hero-title{ font-size: 32px; font-weight: 700; margin: 0 0 8px 0; letter-spacing: -0.2px; }
.hero-sub{ color:#374151; max-width: 720px; line-height:1.35; }
.pills{ display:flex; gap:10px; flex-wrap:wrap; margin-top: 12px; }
.pill{
  display:inline-flex;
  padding: 7px 10px;
  border-radius: 999px;
  border:1px solid rgba(30,115,190,0.20);
  background: rgba(30,115,190,0.10);
  font-size: 12px;
  color:#0b2b45;
  font-weight: 500;
}
.workflow-grid{
  display:grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
.workflow-card{
  text-decoration:none;
  color: inherit;
  background: linear-gradient(180deg, rgba(230,243,255,0.96), rgba(245,248,255,0.96));
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow);
  padding: 16px;
  transition: transform .05s ease, box-shadow .12s ease, background .12s ease;
}
.workflow-card:hover{
  transform: translateY(-2px);
  background: linear-gradient(180deg, rgba(226,241,255,0.98), rgba(244,248,255,0.98));
  border-color: rgba(30,115,190,0.28);
  box-shadow:
    0 14px 34px rgba(2,6,23,0.10),
    0 0 0 4px rgba(30,115,190,0.10);
}
.workflow-card:focus-visible{
  outline: none;
  border-color: rgba(30,115,190,0.38);
  box-shadow:
    0 14px 34px rgba(2,6,23,0.10),
    0 0 0 5px rgba(30,115,190,0.16);
}
.workflow-card:active{
  transform: translateY(-1px);
}
.wf-head{ display:flex; align-items:center; justify-content:space-between; gap: 10px; }
.wf-title{ font-weight: 700; font-size: 18px; }
.wf-tag{
  font-size: 12px;
  font-weight: 600;
  padding: 6px 10px;
  border-radius: 999px;
  border:1px solid rgba(30,115,190,0.18);
  background: rgba(30,115,190,0.08);
  color:#0b2b45;
}
.wf-text{ margin-top: 8px; color:#374151; line-height:1.35; }
.wf-cta{ margin-top: 14px; display:flex; align-items:center; gap: 10px; }
.wf-hint{ font-size: 12px; color: var(--muted); font-weight: 700; }
.btn-sm{ padding: 10px 14px; border-radius: 14px; font-size: 13px; }
@media (max-width: 980px){
  .workflow-grid{ grid-template-columns: 1fr; }
}


h1,h2,h3{ font-weight:700; letter-spacing:-0.01em; }

.small{ font-weight:500; }



/* Phase 4 tables + simple two-column blocks */
.grid-2{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
@media (max-width: 980px){
  .grid-2{ grid-template-columns: 1fr; }
}

.table{
  width:100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 14px;
}

/* Line-item entry tables should never force the card wider than the page */
.table-lines{ table-layout: fixed; }
.table-lines th, .table-lines td{ padding: 10px 10px; }
.table-lines td{ overflow: hidden; }
.table-lines td .input{ padding: 10px 10px; border-radius: 12px; }
.table-lines td .btn{ padding: 10px 12px; }
.table th, .table td{
  padding: 12px 12px;
  border-bottom: 1px solid rgba(15,23,42,0.08);
  vertical-align: top;
}
.table thead th{
  font-weight: 600;
  color:#0f172a;
  background: rgba(255,255,255,0.45);
}
.table tbody tr:hover td{
  background: rgba(30,115,190,0.04);
}

/* Attachments thumbnails */
.thumbs{ display:flex; flex-wrap:wrap; gap:10px; margin-top:10px; }
.thumb{ display:block; width:120px; height:90px; border-radius:12px; overflow:hidden; border:1px solid rgba(30,115,190,0.12); background:#fff; }
.thumb img{ width:100%; height:100%; object-fit:cover; display:block; }

/* Quotes: line items table UX tightening */
.table.quote-lines{
  table-layout: fixed;
  width: 100%;
  min-width: 860px; /* keeps columns readable; table-wrap provides horizontal scroll */
}
.table.quote-lines th,
.table.quote-lines td{
  padding: 10px 12px;
  vertical-align: middle;
}
.table.quote-lines td .input{
  width: 100%;
}
.table.quote-lines td:nth-child(3) .input,
.table.quote-lines td:nth-child(4) .input{
  text-align: center;
}
.table.quote-lines td[data-sub]{
  text-align: right;
}
.row-actions{
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  align-items: center;
  flex-wrap: nowrap;
}
.btn.btn-sm{
  padding: 8px 12px;
  font-size: 13px;
  line-height: 1;
}
/* Make the description column breathe */
.table.quote-lines td:nth-child(2) .input{
  min-width: 260px;
}
