/* ═══════════════════════════════════════════════════════════════
   DPT — Decision Publication Tracker Styles
   Extends theme.css design tokens. Import theme.css first.
   ═══════════════════════════════════════════════════════════════ */

/* ── Layout Shell ── */
.dpt-shell { display: flex; min-height: 100vh; }
.dpt-sidebar {
  width: 240px;
  background: var(--surface);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
}
.dpt-sidebar-brand {
  padding: 20px 18px;
  border-bottom: 1px solid var(--border);
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--blue-700);
  display: flex;
  align-items: center;
  gap: 8px;
}
.dpt-sidebar-nav { flex: 1; padding: 12px 0; }
.dpt-sidebar-nav a {
  display: block;
  padding: 10px 18px;
  color: var(--text-2);
  text-decoration: none;
  font-size: .92rem;
  font-weight: 500;
  transition: background var(--t), color var(--t);
  border-left: 3px solid transparent;
}
.dpt-sidebar-nav a:hover { background: var(--surface-2); color: var(--blue-600); }
.dpt-sidebar-nav a.active {
  background: var(--blue-50);
  color: var(--blue-700);
  border-left-color: var(--blue-600);
  font-weight: 600;
}
.dpt-sidebar-footer {
  padding: 14px 18px;
  border-top: 1px solid var(--border);
  font-size: .82rem;
  color: var(--text-4);
}
.dpt-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  background: var(--bg);
}
.dpt-topbar {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 12px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-shrink: 0;
}
.dpt-topbar-user {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: .9rem;
}
.dpt-topbar-role {
  font-size: .72rem;
  font-weight: 600;
  padding: 2px 10px;
  border-radius: var(--r-pill);
  text-transform: uppercase;
  letter-spacing: .04em;
}
.dpt-topbar-role.admin { background: var(--purple-100); color: var(--purple); }
.dpt-topbar-role.editor { background: var(--blue-100); color: var(--blue-700); }
.dpt-topbar-role.web { background: var(--green-100); color: var(--green-700); }
.dpt-content {
  flex: 1;
  padding: 24px;
  overflow-y: auto;
}

/* ── Status Badges ── */
.dpt-badge {
  display: inline-block;
  font-size: .75rem;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: var(--r-pill);
  letter-spacing: .03em;
  white-space: nowrap;
}
.dpt-badge.status-Extraction { background: #f1f5f9; color: #64748b; }
.dpt-badge.status-Redaction { background: #e0e7ff; color: #4338ca; }
.dpt-badge.status-Queued-For-Translation,
.dpt-badge.status-In-Translation { background: #dbeafe; color: #1d4ed8; }
.dpt-badge.status-Queued-for-Revision,
.dpt-badge.status-In-Revision { background: #fef3c7; color: #92400e; }
.dpt-badge.status-Translation-Complete { background: #d1fae5; color: #065f46; }
.dpt-badge.status-Sent-to-Web { background: #ede9fe; color: #6d28d9; }
.dpt-badge.status-Published { background: #d1fae5; color: #047857; }
.dpt-badge.status-Submitted { background: #dbeafe; color: #1d4ed8; }
.dpt-badge.status-Assigned { background: #e0e7ff; color: #4338ca; }
.dpt-badge.status-In-Progress { background: #fef3c7; color: #92400e; }
.dpt-badge.status-Completed { background: #d1fae5; color: #065f46; }
.dpt-badge.status-Returned { background: #ede9fe; color: #6d28d9; }
.dpt-badge.status-Cancelled { background: #fee2e2; color: #991b1b; }

.dpt-badge.stream-AD-IS { background: #7c3aed18; color: #7c3aed; }
.dpt-badge.stream-GD-IS { background: #7c3aed18; color: #7c3aed; }
.dpt-badge.stream-AD-EI { background: #0e749018; color: #0e7490; }

/* ── Cards ── */
.dpt-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm);
  padding: 20px;
  margin-bottom: 20px;
}
.dpt-card-header {
  font-weight: 600;
  font-size: 1rem;
  color: var(--text-1);
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* ── Tables ── */
.dpt-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .88rem;
}
.dpt-table th {
  text-align: left;
  padding: 10px 12px;
  font-weight: 600;
  color: var(--text-3);
  font-size: .78rem;
  text-transform: uppercase;
  letter-spacing: .04em;
  border-bottom: 2px solid var(--border);
  background: var(--surface-2);
}
.dpt-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  color: var(--text-2);
}
.dpt-table tr:hover td { background: var(--surface-2); }
.dpt-table a { color: var(--blue-600); text-decoration: none; font-weight: 500; }
.dpt-table a:hover { text-decoration: underline; }

/* ── Forms ── */
.dpt-form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}
.dpt-form-grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
.dpt-form-grid.cols-4 { grid-template-columns: repeat(4, 1fr); }
.dpt-field { display: flex; flex-direction: column; gap: 4px; }
.dpt-field.full-width { grid-column: 1 / -1; }
.dpt-field label {
  font-size: .8rem;
  font-weight: 600;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: .03em;
}
.dpt-field input, .dpt-field select, .dpt-field textarea {
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  font-size: .9rem;
  font-family: inherit;
  background: var(--surface);
  color: var(--text-1);
  transition: border-color var(--t), box-shadow var(--t);
}
.dpt-field input:focus, .dpt-field select:focus, .dpt-field textarea:focus {
  outline: none;
  border-color: var(--border-focus);
  box-shadow: var(--shadow-focus);
}
.dpt-field textarea { min-height: 80px; resize: vertical; }

/* ── Buttons ── */
.dpt-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 18px;
  border: none;
  border-radius: var(--r-sm);
  font-size: .88rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--t);
  font-family: inherit;
  text-decoration: none;
}
.dpt-btn-primary { background: var(--grad-primary); color: #fff; }
.dpt-btn-primary:hover { filter: brightness(1.1); transform: translateY(-1px); }
.dpt-btn-success { background: var(--grad-green); color: #fff; }
.dpt-btn-success:hover { filter: brightness(1.1); }
.dpt-btn-outline {
  background: transparent;
  border: 1px solid var(--border-strong);
  color: var(--text-2);
}
.dpt-btn-outline:hover { background: var(--surface-2); border-color: var(--blue-300); }
.dpt-btn-danger { background: var(--red-600); color: #fff; }
.dpt-btn-danger:hover { filter: brightness(1.1); }
.dpt-btn-sm { padding: 5px 12px; font-size: .8rem; }
.dpt-btn:disabled { opacity: .5; cursor: not-allowed; transform: none; filter: none; }

.dpt-btn-group { display: flex; gap: 8px; flex-wrap: wrap; }

/* ── Stats Grid ── */
.dpt-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}
.dpt-stat {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 18px;
  text-align: center;
  box-shadow: var(--shadow-sm);
}
.dpt-stat-value { font-size: 2rem; font-weight: 800; color: var(--blue-700); }
.dpt-stat-label { font-size: .78rem; color: var(--text-3); margin-top: 4px; }

/* ── Status Timeline ── */
.dpt-timeline { position: relative; padding-left: 28px; }
.dpt-timeline::before {
  content: '';
  position: absolute;
  left: 8px;
  top: 4px;
  bottom: 4px;
  width: 2px;
  background: var(--border);
}
.dpt-timeline-item {
  position: relative;
  padding-bottom: 18px;
  font-size: .85rem;
}
.dpt-timeline-item::before {
  content: '';
  position: absolute;
  left: -22px;
  top: 4px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--blue-500);
  border: 2px solid var(--surface);
}
.dpt-timeline-item .meta {
  font-size: .75rem;
  color: var(--text-4);
  margin-top: 2px;
}

/* ── File Drop Zone ── */
.dpt-dropzone {
  border: 2px dashed var(--border-strong);
  border-radius: var(--r-lg);
  padding: 30px;
  text-align: center;
  color: var(--text-4);
  transition: border-color var(--t), background var(--t);
  cursor: pointer;
}
.dpt-dropzone:hover, .dpt-dropzone.drag-over {
  border-color: var(--blue-500);
  background: var(--blue-50);
  color: var(--blue-600);
}
.dpt-file-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  padding: 6px 12px;
  font-size: .82rem;
  margin: 4px;
}

/* ── Filters Bar ── */
.dpt-filters {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: 16px;
}
.dpt-filters input, .dpt-filters select {
  padding: 7px 10px;
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  font-size: .85rem;
  font-family: inherit;
  background: var(--surface);
}
.dpt-filters input { min-width: 200px; }

/* ── Login Page ── */
.dpt-login-body { display: flex; align-items: center; justify-content: center; min-height: 100vh; background: var(--bg); }
.dpt-login-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-lg);
  padding: 40px;
  width: 100%;
  max-width: 420px;
}
.dpt-login-card h2 { margin-bottom: 24px; font-size: 1.4rem; text-align: center; color: var(--text-1); }
.dpt-login-card .error {
  background: var(--red-100);
  color: var(--red-600);
  padding: 10px 14px;
  border-radius: var(--r-sm);
  font-size: .85rem;
  margin-bottom: 16px;
  display: none;
}

/* ── LS Submit Page ── */
.dpt-ls-body { background: var(--bg); min-height: 100vh; padding: 40px 20px; }
.dpt-ls-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-md);
  padding: 36px;
  max-width: 640px;
  margin: 0 auto;
}

/* ── Empty State ── */
.dpt-empty {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-4);
}
.dpt-empty-icon { font-size: 3rem; margin-bottom: 12px; }

/* ── Responsive ── */
@media (max-width: 768px) {
  .dpt-sidebar { width: 60px; }
  .dpt-sidebar-brand span, .dpt-sidebar-nav a span, .dpt-sidebar-footer span { display: none; }
  .dpt-sidebar-nav a { padding: 12px; text-align: center; font-size: 1.1rem; }
  .dpt-form-grid { grid-template-columns: 1fr; }
  .dpt-form-grid.cols-3, .dpt-form-grid.cols-4 { grid-template-columns: 1fr 1fr; }
}

/* ── Utility ── */
.dpt-hidden { display: none !important; }
.dpt-muted { color: var(--text-4); font-size: .82rem; }
.dpt-mb { margin-bottom: 16px; }
.dpt-mt { margin-top: 16px; }
