:root {
  --ps-bg: #f7f9f8;
  --ps-surface: #ffffff;
  --ps-surface-alt: #f0f4f2;
  --ps-border: #e1e8e5;
  --ps-border-strong: #b8d4c8;
  --ps-text: #1a3a2e;
  --ps-muted: #5f7a6e;
  --ps-primary: #2d5f4d;
  --ps-primary-strong: #234a3c;
  --ps-primary-soft: #e8f5f0;
  --ps-success: #4caf50;
  --ps-success-dark: #2e7d32;
  --ps-success-soft: #e8f5e9;
  --ps-info: #00acc1;
  --ps-info-dark: #00838f;
  --ps-info-soft: #e0f7fa;
  --ps-warning: #f57c00;
  --ps-warning-soft: #fff3e0;
  --ps-danger: #c62828;
  --ps-danger-soft: #ffebee;
  --ps-shadow: 0 18px 55px rgba(26, 58, 46, 0.08);
  --ps-radius: 8px;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
}

body.ps-body,
body.ps-login-body {
  min-height: 100vh;
  margin: 0;
  background: var(--ps-bg);
  color: var(--ps-text);
  font-family: "Segoe UI", Arial, sans-serif;
  letter-spacing: 0;
}

a {
  color: inherit;
}

.ps-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  background:
    radial-gradient(circle at top right, rgba(184, 212, 200, 0.24), transparent 34rem),
    var(--ps-bg);
}

.ps-sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--ps-surface);
  border-right: 1px solid var(--ps-border);
  z-index: 10;
}

.ps-sidebar-brand {
  height: 84px;
  display: flex;
  align-items: center;
  padding: 20px 24px;
  border-bottom: 1px solid var(--ps-border);
}

.ps-logo {
  width: 174px;
  max-width: 100%;
  height: auto;
  display: block;
}

.ps-nav {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 18px 14px;
}

.ps-nav-link {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 42px;
  padding: 10px 12px;
  border-radius: var(--ps-radius);
  color: var(--ps-muted);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 500;
  transition: background 150ms ease, color 150ms ease;
}

.ps-nav-link:hover {
  background: var(--ps-surface-alt);
  color: var(--ps-primary);
  text-decoration: none;
}

.ps-nav-link.is-active {
  background: var(--ps-primary-soft);
  color: var(--ps-primary);
}

.ps-nav-icon {
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
}

.ps-sidebar-footer {
  margin-top: auto;
  padding: 16px;
  border-top: 1px solid var(--ps-border);
}

.ps-sidebar-footer a {
  color: var(--ps-muted);
  text-decoration: none;
  font-size: 0.88rem;
}

.ps-main {
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.ps-topbar {
  position: sticky;
  top: 0;
  z-index: 9;
  min-height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 0 24px;
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid var(--ps-border);
  backdrop-filter: blur(10px);
}

.ps-company,
.ps-topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.ps-company-name,
.ps-user-name {
  color: var(--ps-text);
  font-size: 0.93rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ps-status-inline {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--ps-muted);
  font-size: 0.86rem;
  white-space: nowrap;
}

.ps-status-dot {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: var(--ps-success);
  box-shadow: 0 0 0 4px rgba(76, 175, 80, 0.12);
}

.ps-user-avatar {
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: var(--ps-primary);
  color: #fff;
  font-weight: 700;
  font-size: 0.86rem;
}

.ps-content {
  flex: 1;
  padding: 24px;
  overflow: auto;
}

.ps-page {
  max-width: 1220px;
  margin: 0 auto;
}

.ps-page-narrow {
  max-width: 830px;
}

.ps-page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 24px;
}

.ps-eyebrow {
  margin: 0 0 5px;
  color: var(--ps-primary);
  font-size: 0.76rem;
  font-weight: 700;
  text-transform: uppercase;
}

.ps-title {
  margin: 0;
  color: var(--ps-text);
  font-size: 1.7rem;
  font-weight: 650;
  line-height: 1.25;
}

.ps-subtitle {
  margin: 8px 0 0;
  color: var(--ps-muted);
  font-size: 0.94rem;
  line-height: 1.55;
}

.ps-card {
  background: var(--ps-surface);
  border: 1px solid var(--ps-border);
  border-radius: var(--ps-radius);
  box-shadow: var(--ps-shadow);
}

.ps-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 20px;
  border-bottom: 1px solid var(--ps-border);
}

.ps-card-title {
  margin: 0;
  color: var(--ps-text);
  font-size: 1.06rem;
  font-weight: 650;
}

.ps-card-body {
  padding: 20px;
}

.ps-grid-2,
.ps-grid-3,
.ps-grid-4 {
  display: grid;
  gap: 16px;
}

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

.ps-grid-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.ps-grid-4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.ps-stat-card {
  padding: 18px;
}

.ps-stat-label {
  margin: 0 0 8px;
  color: var(--ps-muted);
  font-size: 0.82rem;
}

.ps-stat-value {
  margin: 0;
  color: var(--ps-text);
  font-size: 1.65rem;
  font-weight: 650;
  line-height: 1.15;
}

.ps-button,
.ps-button-secondary,
.ps-button-danger,
.ps-button-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 40px;
  padding: 9px 15px;
  border-radius: var(--ps-radius);
  font-size: 0.9rem;
  font-weight: 650;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 150ms ease, border 150ms ease, color 150ms ease, opacity 150ms ease;
}

.ps-button {
  background: var(--ps-primary);
  color: #fff;
}

.ps-button:hover {
  background: var(--ps-primary-strong);
  color: #fff;
  text-decoration: none;
}

.ps-button-secondary {
  background: #fff;
  color: var(--ps-primary);
  border-color: var(--ps-border);
}

.ps-button-secondary:hover,
.ps-button-ghost:hover {
  background: var(--ps-surface-alt);
  color: var(--ps-primary);
  text-decoration: none;
}

.ps-button-danger {
  background: var(--ps-danger);
  color: #fff;
}

.ps-button-danger:hover {
  opacity: 0.88;
  color: #fff;
  text-decoration: none;
}

.ps-button-ghost {
  background: transparent;
  color: var(--ps-muted);
  border-color: transparent;
}

.ps-button[disabled],
.ps-button-secondary[disabled] {
  opacity: 0.5;
  cursor: not-allowed;
}

.ps-button.disabled,
.ps-button-secondary.disabled {
  opacity: 0.5;
  pointer-events: none;
}

.ps-icon {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
}

.ps-table-wrap {
  overflow-x: auto;
}

.ps-table {
  width: 100%;
  margin: 0;
  border-collapse: collapse;
}

.ps-table th {
  padding: 12px 14px;
  background: var(--ps-bg);
  color: var(--ps-muted);
  font-size: 0.76rem;
  font-weight: 700;
  text-align: left;
  white-space: nowrap;
  border-bottom: 1px solid var(--ps-border);
}

.ps-table td {
  padding: 13px 14px;
  color: var(--ps-text);
  font-size: 0.88rem;
  vertical-align: middle;
  border-bottom: 1px solid var(--ps-border);
}

.ps-table tbody tr:hover {
  background: var(--ps-bg);
}

.ps-mono {
  font-family: "Segoe UI Mono", Consolas, monospace;
  font-size: 0.82rem;
}

.ps-muted {
  color: var(--ps-muted);
}

.ps-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 9px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
}

.ps-chip-success {
  color: var(--ps-success-dark);
  background: var(--ps-success-soft);
}

.ps-chip-info {
  color: var(--ps-info-dark);
  background: var(--ps-info-soft);
}

.ps-chip-warning {
  color: var(--ps-warning);
  background: var(--ps-warning-soft);
}

.ps-chip-danger {
  color: var(--ps-danger);
  background: var(--ps-danger-soft);
}

.ps-chip-neutral {
  color: var(--ps-muted);
  background: var(--ps-surface-alt);
}

.ps-chip-dot {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: currentColor;
}

.ps-form-grid {
  display: grid;
  gap: 18px;
}

.ps-field label {
  display: block;
  margin-bottom: 8px;
  color: var(--ps-text);
  font-size: 0.88rem;
  font-weight: 650;
}

.ps-input,
.ps-textarea,
.ps-select {
  width: 100%;
  min-height: 42px;
  padding: 10px 12px;
  border: 1px solid var(--ps-border);
  border-radius: var(--ps-radius);
  background: #fff;
  color: var(--ps-text);
  font: inherit;
  outline: none;
}

.ps-textarea {
  min-height: 104px;
  resize: vertical;
}

.ps-input:focus,
.ps-textarea:focus,
.ps-select:focus {
  border-color: var(--ps-primary);
  box-shadow: 0 0 0 3px rgba(45, 95, 77, 0.14);
}

.ps-steps {
  display: grid;
  grid-template-columns: auto 1fr auto 1fr auto;
  align-items: center;
  gap: 10px;
  margin-bottom: 24px;
}

.ps-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: var(--ps-muted);
  font-size: 0.78rem;
  white-space: nowrap;
}

.ps-step-number {
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: var(--ps-border);
  color: var(--ps-muted);
  font-weight: 750;
}

.ps-step.is-active,
.ps-step.is-complete {
  color: var(--ps-text);
}

.ps-step.is-active .ps-step-number {
  background: var(--ps-primary);
  color: #fff;
}

.ps-step.is-complete .ps-step-number {
  background: var(--ps-success);
  color: #fff;
}

.ps-step-line {
  height: 2px;
  background: var(--ps-border);
}

.ps-step-line.is-complete {
  background: var(--ps-success);
}

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

.ps-choice-card {
  display: block;
  width: 100%;
  min-height: 166px;
  padding: 22px;
  border: 2px solid var(--ps-border);
  border-radius: var(--ps-radius);
  background: #fff;
  color: var(--ps-text);
  text-align: left;
  text-decoration: none;
  cursor: pointer;
  transition: border 150ms ease, background 150ms ease, transform 150ms ease;
}

.ps-choice-card:hover,
.ps-choice-card.is-selected {
  border-color: var(--ps-primary);
  background: var(--ps-primary-soft);
  color: var(--ps-text);
  text-decoration: none;
  transform: translateY(-1px);
}

.ps-choice-icon {
  display: inline-flex;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  border-radius: var(--ps-radius);
  background: var(--ps-primary-soft);
  color: var(--ps-primary);
}

.ps-choice-card h3 {
  margin: 0 0 8px;
  font-size: 1.04rem;
  font-weight: 700;
}

.ps-choice-card p {
  margin: 0;
  color: var(--ps-muted);
  font-size: 0.88rem;
  line-height: 1.45;
}

.ps-upload-zone {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 230px;
  padding: 32px;
  border: 2px dashed var(--ps-border-strong);
  border-radius: var(--ps-radius);
  background: #fff;
  color: var(--ps-muted);
  text-align: center;
  cursor: pointer;
  transition: background 150ms ease, border 150ms ease;
}

.ps-upload-zone:hover,
.ps-upload-zone.is-dragging {
  background: var(--ps-bg);
  border-color: var(--ps-primary);
}

.ps-upload-zone strong {
  color: var(--ps-text);
  font-size: 0.96rem;
}

.ps-file-list {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.ps-file-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--ps-border);
  border-radius: var(--ps-radius);
  background: var(--ps-bg);
}

.ps-file-item.is-invalid {
  background: var(--ps-danger-soft);
  border-color: rgba(198, 40, 40, 0.2);
}

.ps-file-meta {
  flex: 1;
  min-width: 0;
}

.ps-file-name {
  color: var(--ps-text);
  font-size: 0.88rem;
  font-weight: 650;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ps-file-size {
  color: var(--ps-muted);
  font-size: 0.78rem;
}

.ps-progress {
  height: 9px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--ps-border);
}

.ps-progress-bar {
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: var(--ps-success);
  transition: width 180ms ease;
}

.ps-alert {
  display: flex;
  gap: 12px;
  padding: 14px;
  border: 1px solid #ffe0b2;
  border-radius: var(--ps-radius);
  background: var(--ps-warning-soft);
  color: #e65100;
  font-size: 0.88rem;
  line-height: 1.45;
}

.ps-empty {
  padding: 48px 24px;
  text-align: center;
  color: var(--ps-muted);
}

.ps-empty h3 {
  margin: 0 0 8px;
  color: var(--ps-text);
  font-size: 1.05rem;
}

.ps-preview-panel {
  min-height: 280px;
  overflow: hidden;
  position: relative;
}

.ps-preview-panel.is-logo-preview {
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #f7fbf2, #e5f1dc);
}

.ps-preview-panel img {
  width: 100%;
  height: 100%;
  min-height: 280px;
  object-fit: cover;
  opacity: 0.72;
}

.ps-preview-panel .ps-preview-logo {
  position: relative;
  z-index: 1;
  width: min(72%, 260px);
  height: auto;
  min-height: 0;
  object-fit: contain;
  opacity: 1;
}

.ps-preview-overlay {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    linear-gradient(to bottom, transparent, rgba(26, 58, 46, 0.32)),
    repeating-linear-gradient(45deg, rgba(255,255,255,0.16) 0 1px, transparent 1px 24px);
}

.ps-preview-panel.is-logo-preview .ps-preview-overlay {
  background:
    radial-gradient(circle at center, rgba(255, 255, 255, 0.82), rgba(255, 255, 255, 0) 62%),
    repeating-linear-gradient(45deg, rgba(26, 58, 46, 0.08) 0 1px, transparent 1px 26px);
}

.ps-job-project {
  display: grid;
  gap: 4px;
}

.ps-job-project strong {
  color: var(--ps-text);
  font-weight: 700;
}

.ps-job-project span {
  color: var(--ps-muted);
  font-size: 0.86rem;
  overflow-wrap: anywhere;
}

.ps-login-body {
  background:
    linear-gradient(90deg, rgba(26, 58, 46, 0.82), rgba(26, 58, 46, 0.44)),
    url("../img/pansilva-automation.png") center/cover no-repeat;
}

.ps-login {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 40px;
}

.ps-login-panel {
  width: min(560px, 100%);
  padding: 34px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 24px 80px rgba(0,0,0,0.24);
}

.ps-login-panel .ps-logo {
  width: 220px;
  margin-bottom: 26px;
}

.ps-login-title {
  margin: 0;
  color: var(--ps-text);
  font-size: 2rem;
  font-weight: 700;
}

.ps-login-copy {
  margin: 12px 0 26px;
  color: var(--ps-muted);
  line-height: 1.55;
}

.ps-hidden {
  display: none !important;
}

@media (max-width: 980px) {
  .ps-shell {
    grid-template-columns: 1fr;
  }

  .ps-sidebar {
    position: static;
    height: auto;
  }

  .ps-sidebar-brand {
    height: auto;
  }

  .ps-nav {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .ps-main {
    min-height: 0;
  }

  .ps-topbar {
    position: static;
    align-items: flex-start;
    flex-direction: column;
    padding: 14px 18px;
  }

  .ps-content {
    padding: 18px;
  }

  .ps-grid-3,
  .ps-grid-4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .ps-page-header,
  .ps-topbar-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .ps-nav {
    grid-template-columns: 1fr;
  }

  .ps-grid-2,
  .ps-grid-3,
  .ps-grid-4,
  .ps-choice-grid {
    grid-template-columns: 1fr;
  }

  .ps-steps {
    grid-template-columns: 1fr;
    justify-items: start;
  }

  .ps-step-line {
    display: none;
  }

  .ps-login {
    padding: 20px;
  }
}
