/* /Apps/ProjectTracker/assets/css/project-tracker.css */

:root {
  --pt-bg: #080b12;
  --pt-panel: rgba(17, 24, 39, 0.88);
  --pt-panel-2: rgba(15, 23, 42, 0.92);
  --pt-text: #f9fafb;
  --pt-muted: #9ca3af;
  --pt-red: #ef4444;
  --pt-red-soft: rgba(239, 68, 68, 0.28);
  --pt-green: #22c55e;
  --pt-green-soft: rgba(34, 197, 94, 0.28);
  --pt-purple: #d946ef;
  --pt-blue: #3b82f6;
  --pt-cyan: #06b6d4;
  --pt-border: rgba(255, 255, 255, 0.14);
  --pt-shadow: 0 24px 70px rgba(0, 0, 0, 0.38);
}

body {
  background:
    radial-gradient(circle at top left, rgba(59, 130, 246, 0.16), transparent 30%),
    radial-gradient(circle at bottom right, rgba(217, 70, 239, 0.12), transparent 30%),
    #020617;
  color: var(--pt-text);
}

/* =========================
   Project List Page
========================= */

.pt-page {
  max-width: 1180px;
  margin: 32px auto 48px;
  padding: 0 20px;
}

.pt-home-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  margin-bottom: 26px;
}

.pt-kicker {
  color: var(--pt-cyan);
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.76rem;
  font-weight: 800;
  margin-bottom: 8px;
}

.pt-home-hero h1 {
  margin: 0 0 8px;
  font-size: clamp(2rem, 5vw, 4rem);
  line-height: 0.95;
  letter-spacing: -0.06em;
}

.pt-home-hero p {
  margin: 0;
  color: var(--pt-muted);
  max-width: 600px;
}

.pt-primary-btn {
  border: 0;
  border-radius: 999px;
  padding: 13px 20px;
  background: linear-gradient(135deg, var(--pt-cyan), var(--pt-blue), #8b5cf6);
  color: white;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 18px 50px rgba(59, 130, 246, 0.34);
  white-space: nowrap;
}

.pt-project-list-panel {
  min-height: 440px;
  border-radius: 30px;
  padding: 24px;
  background:
    linear-gradient(rgba(255,255,255,.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.025) 1px, transparent 1px),
    rgba(156, 163, 175, 0.18);
  background-size: 28px 28px;
  border: 1px solid var(--pt-border);
  box-shadow:
    inset 0 0 80px rgba(255, 255, 255, 0.035),
    var(--pt-shadow);
}

.pt-project-list-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 20px;
}

.pt-project-list-head h2 {
  margin: 0 0 4px;
}

.pt-project-list-head p {
  margin: 0;
  color: var(--pt-muted);
}

.pt-project-search {
  width: min(480px, 100%);
  border: 3px solid #0b0f16;
  border-radius: 999px;
  background: rgba(255,255,255,.86);
  color: #111827;
  outline: none;
  padding: 11px 16px;
}

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

.pt-project-card {
  background: rgba(2, 6, 23, 0.72);
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 18px;
  padding: 14px;
  box-shadow: 0 18px 48px rgba(0,0,0,.26);
}

.pt-project-card:hover {
  border-color: rgba(34, 211, 238, 0.7);
}

.pt-project-card a {
  display: flex;
  gap: 13px;
  align-items: center;
  text-decoration: none;
  color: inherit;
}

.pt-project-icon {
  width: 58px;
  height: 58px;
  border-radius: 15px;
  overflow: hidden;
  background: rgba(255,255,255,.06);
  flex: 0 0 auto;
}

.pt-project-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.pt-project-card-body h3 {
  margin: 0 0 4px;
  font-size: 1.05rem;
}

.pt-project-card-body p {
  margin: 0;
  color: var(--pt-muted);
  font-size: 0.84rem;
}

.pt-delete-link {
  margin-top: 12px;
  border: 0;
  background: transparent;
  color: #fca5a5;
  cursor: pointer;
  padding: 0;
}

.pt-empty-state {
  min-height: 310px;
  display: grid;
  place-items: center;
  text-align: center;
  color: #d1d5db;
}

.pt-empty-state img {
  width: 112px;
  height: 112px;
  border-radius: 22px;
  object-fit: cover;
  box-shadow: 0 18px 55px rgba(0,0,0,.36);
}

.pt-empty-state h3 {
  margin: 18px 0 5px;
  font-size: 1.5rem;
}

.pt-empty-state p {
  margin: 0;
  color: var(--pt-muted);
}

/* =========================
   Workspace Shell
========================= */

.pt-workspace {
  min-height: calc(100vh - 90px);
  background:
    linear-gradient(rgba(255,255,255,.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.045) 1px, transparent 1px),
    radial-gradient(circle at top, rgba(59,130,246,.15), transparent 35%),
    #181b20;
  background-size: 32px 32px, 32px 32px, auto, auto;
  position: relative;
  overflow: hidden;
}

.pt-workspace-bar {
  position: sticky;
  top: 0;
  z-index: 80;
  min-height: 64px;
  padding: 12px 18px;
  background: rgba(3, 7, 18, 0.82);
  border-bottom: 1px solid var(--pt-border);
  backdrop-filter: blur(14px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.pt-workspace-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.pt-light-btn {
  color: white;
  text-decoration: none;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 999px;
  padding: 8px 12px;
  font-size: .9rem;
}

.pt-project-title-input {
  min-width: 230px;
  max-width: 420px;
  background: transparent;
  border: 0;
  border-bottom: 1px solid rgba(255,255,255,.25);
  outline: none;
  color: white;
  font-weight: 900;
  font-size: 1.03rem;
  padding: 7px;
}

.pt-view-toggle {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  display: inline-flex;
  border-radius: 999px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.2);
  background: rgba(255,255,255,.08);
}

.pt-view-toggle button {
  border: 0;
  background: transparent;
  color: white;
  padding: 8px 13px;
  cursor: pointer;
  font-weight: 800;
}

.pt-view-toggle button.active {
  background: linear-gradient(135deg, var(--pt-cyan), var(--pt-blue));
}

.pt-workspace-right {
  color: var(--pt-muted);
  font-size: .9rem;
}

/* =========================
   NEW VERTICAL BUILD VIEW
========================= */

.pt-build-view.pt-vertical-build {
  min-height: calc(100vh - 90px);
  position: relative;
  display: grid;
  grid-template-columns: minmax(340px, 1fr) minmax(420px, 1.12fr);
  gap: 72px;
  padding: 34px clamp(18px, 4vw, 56px) 80px;
  overflow: auto;
}

.pt-vertical-line {
  position: fixed;
  top: 95px;
  bottom: 28px;
  left: 50%;
  width: 2px;
  background: var(--pt-purple);
  box-shadow: 0 0 14px rgba(217,70,239,.95);
  z-index: 1;
}

.pt-build-column {
  position: relative;
  z-index: 5;
  min-width: 0;
}

.pt-column-head {
  position: sticky;
  top: 78px;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
  padding: 14px;
  border-radius: 18px;
  background: rgba(3, 7, 18, .72);
  border: 1px solid rgba(255,255,255,.12);
  backdrop-filter: blur(12px);
}

.pt-column-head h2 {
  margin: 0 0 4px;
  font-size: 1.15rem;
}

.pt-column-head p {
  margin: 0;
  color: var(--pt-muted);
  font-size: .85rem;
}

.pt-column-add-btn {
  border: 0;
  border-radius: 999px;
  padding: 10px 14px;
  color: white;
  font-weight: 900;
  cursor: pointer;
  white-space: nowrap;
}

.pt-add-table {
  background: linear-gradient(135deg, #ef4444, #f97316);
  box-shadow: 0 0 22px rgba(239,68,68,.28);
}

.pt-add-sheet {
  background: linear-gradient(135deg, #22c55e, #06b6d4);
  box-shadow: 0 0 22px rgba(34,197,94,.25);
}

.pt-column-stack {
  display: grid;
  gap: 22px;
  align-content: start;
}

.pt-table-card {
  width: min(100%, 460px);
  min-height: 320px;
  border: 2px solid var(--pt-red);
  background: rgba(2, 6, 23, 0.58);
  box-shadow:
    0 0 28px var(--pt-red-soft),
    0 20px 60px rgba(0,0,0,.28);
  border-radius: 12px;
  padding: 12px;
}

.pt-sheet-column .pt-column-stack {
  justify-items: stretch;
}

.pt-note-card {
  width: min(100%, 620px);
  min-height: 420px;
  border-radius: 18px;
  padding: 16px;
  background: rgba(248,250,252,.94);
  color: #111827;
  box-shadow: 0 24px 70px rgba(0,0,0,.34);
}

.pt-card-top-line {
  display: flex;
  align-items: center;
  gap: 10px;
}

.pt-table-name-input {
  width: 100%;
  background: rgba(239,68,68,.06);
  border: 2px solid var(--pt-red);
  color: #fecaca;
  outline: none;
  padding: 8px 10px;
  font-weight: 900;
  margin-bottom: 9px;
}

.pt-note-name-input {
  width: 100%;
  border: 4px solid #0b0f16;
  border-radius: 999px;
  color: #111827;
  padding: 9px 16px;
  outline: none;
  font-weight: 900;
  margin-bottom: 14px;
}

.pt-mini-delete {
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 50%;
  background: rgba(239,68,68,.16);
  color: #fecaca;
  font-size: 1.3rem;
  line-height: 1;
  cursor: pointer;
  flex: 0 0 auto;
  margin-bottom: 9px;
}

.pt-mini-delete.dark {
  background: rgba(17,24,39,.10);
  color: #111827;
  margin-bottom: 14px;
}

.pt-data-table {
  width: 100%;
  border-collapse: collapse;
  color: white;
}

.pt-data-table th,
.pt-data-table td {
  border: 1px solid var(--pt-red);
}

.pt-data-table th {
  color: #fecaca;
  font-size: .88rem;
  padding: 7px;
}

.pt-row-no {
  width: 56px;
  color: #fca5a5;
  text-align: center;
  font-weight: 900;
}

.pt-row-text {
  width: 100%;
  min-height: 42px;
  border: 0;
  outline: none;
  resize: vertical;
  background: transparent;
  color: white;
  padding: 9px;
  font: inherit;
}

.pt-card-action-form {
  display: flex;
  justify-content: center;
  margin-top: 10px;
}

.pt-small-pill-btn {
  border: 1px solid rgba(255,255,255,.2);
  border-radius: 999px;
  background: rgba(255,255,255,.10);
  color: white;
  padding: 7px 12px;
  cursor: pointer;
}

.pt-note-text {
  width: 100%;
  min-height: 330px;
  resize: vertical;
  border: 0;
  outline: none;
  background: transparent;
  color: #111827;
  font: inherit;
  line-height: 1.55;
}

.pt-note-hint {
  color: #6b7280;
  font-size: .78rem;
  margin-top: 10px;
}

/* Old choice styles kept harmlessly in case old items/actions still exist */
.pt-choice-box,
.pt-check-button,
.pt-middle-line,
.pt-flow-canvas,
.pt-flow-item,
.pt-floating-plus {
  display: none;
}

/* =========================
   Map View unchanged
========================= */

.pt-map-view {
  display: none;
  min-height: calc(100vh - 90px);
  padding: 24px;
}

.pt-map-panel {
  min-height: 430px;
  border-radius: 24px;
  padding: 24px;
  background: rgba(2, 6, 23, .42);
  border: 1px solid rgba(255,255,255,.10);
  box-shadow: inset 0 0 65px rgba(255,255,255,.025);
}

.pt-map-panel h2,
.pt-notes-document h2 {
  margin-top: 0;
}

.pt-map-panel p {
  color: var(--pt-muted);
}

.pt-map-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
}

.pt-map-node {
  width: 220px;
  min-height: 118px;
  border-radius: 18px;
  padding: 16px;
  background: rgba(15, 23, 42, 0.86);
  border: 1px solid rgba(34,211,238,.55);
  box-shadow: 0 0 26px rgba(34,211,238,.10);
}

.pt-map-node.note-node {
  background: rgba(248,250,252,.92);
  color: #111827;
  border-color: rgba(255,255,255,.86);
}

.pt-map-node-type {
  color: var(--pt-cyan);
  font-size: .72rem;
  letter-spacing: .15em;
  font-weight: 900;
}

.pt-map-node h3 {
  margin: 10px 0 0;
}

.pt-notes-document {
  margin-top: 22px;
  border-radius: 24px;
  padding: 26px;
  background: #f8fafc;
  color: #111827;
  min-height: 260px;
}

.pt-document-note {
  border-bottom: 1px solid #d1d5db;
  padding: 16px 0;
}

.pt-document-note:last-child {
  border-bottom: 0;
}

.pt-document-note h3 {
  margin: 0 0 10px;
}

/* =========================
   Responsive
========================= */

@media (max-width: 1000px) {
  .pt-build-view.pt-vertical-build {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .pt-vertical-line {
    display: none;
  }

  .pt-note-card,
  .pt-table-card {
    width: 100%;
  }

  .pt-view-toggle {
    position: static;
    transform: none;
  }

  .pt-workspace-bar {
    flex-wrap: wrap;
  }
}

@media (max-width: 900px) {
  .pt-home-hero,
  .pt-project-list-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .pt-project-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 600px) {
  .pt-project-grid {
    grid-template-columns: 1fr;
  }

  .pt-project-title-input {
    min-width: 160px;
  }

  .pt-build-view.pt-vertical-build {
    padding: 20px 14px 60px;
  }

  .pt-column-head {
    flex-direction: column;
    align-items: stretch;
  }
}
