/* ===== Approval Dashboard Styles ===== */

.approval-topbar-new {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 32px;
  background: var(--panel);
  border-bottom: 1px solid var(--border);
  gap: 20px;
}

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

.topbar-right {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-left: auto;
}

.btn-create-new {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  background: #4458e8;
  color: white;
  border: none;
  border-radius: 6px;
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: none;
}

.btn-create-new:hover {
  background: #3a4ac8;
  transform: translateY(-1px);
}

.btn-create-new:active {
  transform: translateY(0);
}

.btn-create-new svg {
  width: 16px;
  height: 16px;
  stroke: white;
  stroke-width: 2;
  fill: none;
}

.icon-btn-sync {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: transparent;
  border: none;
  cursor: pointer;
  border-radius: 6px;
  transition: all 0.2s;
  padding: 0;
}

.icon-btn-sync:hover {
  background: var(--bg);
}

.icon-btn-sync svg {
  width: 20px;
  height: 20px;
  stroke: var(--link);
  stroke-width: 2;
  fill: none;
}

/* ===== Tabs ===== */
.approval-tabs {
  display: flex;
  gap: 20px;
  padding: 0 32px;
  background: var(--panel);
  border-bottom: 1px solid var(--border);
  overflow-x: auto;
}

.tab-item {
  padding: 16px 0;
  cursor: pointer;
  font-weight: 500;
  color: var(--text-dim);
  border-bottom: 3px solid transparent;
  transition: all 0.2s;
  white-space: nowrap;
}

.tab-item.active {
  color: var(--link);
  border-bottom-color: var(--link);
}

.tab-item:hover {
  color: var(--text);
}

.tab-item .badge {
  background: #ef4444;
  color: white;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 10px;
  margin-left: 8px;
}

/* ===== Tab Content with Smooth Transition ===== */
.tab-content {
  display: none;
  padding: 32px;
  opacity: 0;
  transition: opacity 0.3s ease-in-out;
}

.tab-content.active {
  display: block;
  opacity: 1;
}

/* ===== KPI Grid ===== */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  margin-bottom: 32px;
}

.kpi-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.kpi-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-faint);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.kpi-value {
  font-size: 36px;
  font-weight: 700;
  color: var(--text);
}

.kpi-trend {
  font-size: 12px;
  color: var(--text-dim);
}

.kpi-trend.positive {
  color: var(--green);
}

.kpi-trend.negative {
  color: var(--red);
}

/* ===== Approval Grid ===== */
.approval-grid {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 24px;
}

.section {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 24px;
}

.section h2 {
  font-size: 18px;
  font-weight: 700;
  margin: 0 0 16px 0;
  color: var(--text);
}

.section h3 {
  font-size: 14px;
  font-weight: 600;
  margin: 0 0 16px 0;
  color: var(--text);
}

.sidebar-right {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* ===== Two Column Layout ===== */
.doc-detail-grid {
  display: grid;
  grid-template-columns: 350px 1fr;
  gap: 20px;
  min-height: 600px;
}

.doc-list-panel {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 16px;
  overflow-y: auto;
  max-height: calc(100vh - 300px);
}

.doc-card-panel {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - 300px);
}

.doc-card {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.doc-card-empty {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100%;
  color: var(--text-faint);
  font-size: 16px;
}

/* ===== Fixed + Scrollable Layout ===== */
.doc-card-fixed {
  flex-shrink: 0;
  overflow: hidden;
}

.doc-card-scrollable {
  flex: 1;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 0;
}

/* ===== Comments Container (Scrollable Only) ===== */
.comments-container {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 10px 16px;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.comments-container .status-section-title {
  margin: 0 0 6px 0;
  font-size: 10px;
  flex-shrink: 0;
}

/* ===== Documents List ===== */
.documents-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.doc-item {
  padding: 16px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.doc-item:hover {
  background: #f8f9fb;
  border-color: var(--link);
}

.doc-item.active {
  background: var(--link);
  color: white;
  border-color: var(--link);
}

.doc-item.active .doc-item-name {
  color: white;
}

.doc-item.active .doc-item-meta {
  color: rgba(255, 255, 255, 0.8);
}

.doc-item-left {
  flex: 1;
}

.doc-item-name {
  font-weight: 600;
  color: var(--link);
  font-size: 14px;
}

.doc-item-meta {
  font-size: 12px;
  color: var(--text-faint);
  margin-top: 4px;
}

.doc-item-status {
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
}

.doc-item-status.pending {
  background: rgba(255, 165, 0, 0.15);
  color: var(--orange);
}

.doc-item-status.approved {
  background: rgba(41, 196, 111, 0.15);
  color: var(--green);
}

.doc-item-status.rejected {
  background: rgba(239, 68, 68, 0.15);
  color: var(--red);
}

.doc-item-status.in-review {
  background: rgba(68, 88, 232, 0.15);
  color: var(--link);
}

/* ===== Heatmap ===== */
.heatmap {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.heatmap-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.heatmap-name {
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
}

.heatmap-bar {
  height: 8px;
  background: var(--border);
  border-radius: 4px;
  overflow: hidden;
}

.heatmap-fill {
  height: 100%;
  background: linear-gradient(to right, var(--green), var(--orange), var(--red));
  border-radius: 4px;
}

.heatmap-time {
  font-size: 10px;
  color: var(--text-faint);
  font-family: monospace;
}

/* ===== Reviewers List ===== */
.reviewers-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.reviewer-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: var(--bg);
  border-radius: 8px;
}

.reviewer-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--link);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 13px;
}

.reviewer-info {
  flex: 1;
}

.reviewer-name {
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
}

.reviewer-role {
  font-size: 11px;
  color: var(--text-faint);
}

/* ===== Documents Table ===== */
.documents-table {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.table-header,
.table-row {
  display: grid;
  grid-template-columns: 40px 1fr 120px 120px 100px;
  gap: 0;
  border-bottom: 1px solid var(--border);
  align-items: center;
}

.table-header {
  background: var(--bg);
  font-weight: 600;
  font-size: 11px;
  color: var(--text-faint);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.table-header:last-child,
.table-row:last-child {
  border-bottom: none;
}

.table-cell {
  padding: 16px;
  font-size: 13px;
  color: var(--text);
}

.table-header .table-cell {
  padding: 12px 16px;
}

.table-row {
  cursor: pointer;
  transition: all 0.2s;
  border-bottom: 1px solid var(--border);
}

.table-row:hover {
  background: var(--bg);
}

.table-row:last-child {
  border-bottom: none;
}

.checkbox {
  width: 16px;
  height: 16px;
  cursor: pointer;
}

/* ===== Filters Row ===== */
.filters-row {
  display: flex;
  gap: 12px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.filter-input {
  padding: 10px 16px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-family: inherit;
  font-size: 13px;
  background: var(--panel);
  color: var(--text);
}

.filter-input:focus {
  outline: none;
  border-color: var(--link);
  box-shadow: 0 0 0 2px rgba(68, 88, 232, 0.1);
}

/* ===== Users Grid ===== */
.users-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 20px;
}

.user-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 24px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
}

.user-card:hover {
  border-color: var(--link);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.user-avatar-large {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--link);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 24px;
  margin: 0 auto 16px;
}

.user-name {
  font-weight: 600;
  color: var(--text);
  margin-bottom: 4px;
}

.user-role {
  font-size: 12px;
  color: var(--text-faint);
  margin-bottom: 12px;
}

.user-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  font-size: 12px;
}

.user-stat {
  background: var(--bg);
  padding: 8px;
  border-radius: 6px;
}

.user-stat-value {
  font-weight: 700;
  color: var(--link);
  font-size: 16px;
}

.user-stat-label {
  color: var(--text-faint);
  font-size: 10px;
}

/* ===== Modal ===== */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1000;
  justify-content: center;
  align-items: center;
}

.modal.active {
  display: flex;
}

.modal-content {
  background: var(--panel);
  border-radius: var(--radius-md);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  width: 90%;
  max-width: 500px;
  max-height: 90vh;
  overflow-y: auto;
}

.modal-content.modal-large {
  max-width: 900px;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px;
  border-bottom: 1px solid var(--border);
}

.modal-header h2 {
  margin: 0;
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
}

.modal-close {
  background: none;
  border: none;
  font-size: 28px;
  color: var(--text-dim);
  cursor: pointer;
  padding: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  transition: all 0.2s;
}

.modal-close:hover {
  background: var(--bg);
  color: var(--text);
}

.modal-body {
  padding: 24px;
}

.modal-large .modal-body {
  padding: 32px;
}

/* ===== Form ===== */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.form-row {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-row label {
  font-weight: 600;
  font-size: 13px;
  color: var(--text);
}

.form-row input,
.form-row textarea,
.form-row select {
  padding: 10px 16px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-family: inherit;
  font-size: 13px;
  background: var(--panel);
  color: var(--text);
}

.form-row input:focus,
.form-row textarea:focus,
.form-row select:focus {
  outline: none;
  border-color: var(--link);
  box-shadow: 0 0 0 2px rgba(68, 88, 232, 0.1);
}

.form-row textarea {
  resize: vertical;
  min-height: 100px;
}

.form-actions {
  display: flex;
  gap: 12px;
  margin-top: 16px;
}

.btn-create,
.btn-cancel,
.btn-approve,
.btn-reject,
.btn-small {
  padding: 10px 20px;
  border: none;
  border-radius: 6px;
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-create {
  background: var(--link);
  color: white;
}

.btn-create:hover {
  background: var(--purple-deep);
}

.btn-cancel {
  background: var(--border);
  color: var(--text);
}

.btn-cancel:hover {
  background: var(--text-faint);
}

.btn-approve {
  background: var(--green);
  color: white;
}

.btn-approve:hover {
  background: #1c9b59;
}

.btn-reject {
  background: var(--red);
  color: white;
}

.btn-reject:hover {
  background: #dc2626;
}

.btn-small {
  background: var(--link);
  color: white;
  padding: 8px 16px;
  font-size: 12px;
}

.btn-small:hover {
  background: var(--purple-deep);
}

/* ===== Details Modal ===== */
.details-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
}

.detail-section {
  margin-bottom: 24px;
}

.detail-section h3 {
  font-size: 14px;
  font-weight: 600;
  margin: 0 0 16px 0;
  color: var(--text);
}

.detail-row {
  display: flex;
  justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
}

.detail-row .label {
  font-weight: 600;
  color: var(--text-dim);
}

.detail-row span:last-child {
  color: var(--text);
}

/* ===== Progress Flow ===== */
.progress-flow {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.flow-step {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.flow-step-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 14px;
  color: white;
  flex-shrink: 0;
}

.flow-step-icon.completed {
  background: var(--green);
}

.flow-step-icon.current {
  background: var(--link);
}

.flow-step-icon.pending {
  background: var(--border);
  color: var(--text-faint);
}

.flow-step-content h4 {
  margin: 0 0 4px 0;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}

.flow-step-content p {
  margin: 0;
  font-size: 12px;
  color: var(--text-faint);
}

/* ===== Comments ===== */
.comments-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.comment-item {
  padding: 8px;
  background: var(--bg);
  border-radius: 4px;
}

.comment-author {
  font-weight: 600;
  font-size: 12px;
  color: var(--link);
}

.comment-time {
  font-size: 10px;
  color: var(--text-faint);
  margin-top: 1px;
}

.comment-text {
  font-size: 12px;
  color: var(--text);
  margin-top: 4px;
  line-height: 1.35;
}

.comment-input-area {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 10px 16px;
  background: var(--panel);
  border-top: 1px solid var(--border);
  flex-shrink: 0;
  overflow: hidden;
}

.comment-input-area textarea {
  padding: 8px;
  border: 1px solid var(--border);
  border-radius: 4px;
  font-family: inherit;
  font-size: 12px;
  min-height: 45px;
  max-height: 75px;
  resize: none;
}

.comment-input-area textarea:focus {
  outline: none;
  border-color: var(--link);
  box-shadow: 0 0 0 2px rgba(68, 88, 232, 0.1);
}

/* ===== Action Buttons ===== */
.action-buttons {
  display: flex;
  gap: 12px;
}

.action-buttons button {
  flex: 1;
}


/* ===== Document Card Content ===== */
.doc-card-header {
  padding: 10px 16px;
  border-bottom: 1px solid var(--border);
  background: var(--bg);
}

.doc-card-header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 6px;
}

.doc-card-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  margin: 0;
  flex-shrink: 0;
}

.doc-card-timeline-inline {
  display: flex;
  gap: 4px;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.timeline-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}

.timeline-badge.completed {
  background: rgba(16, 168, 96, 0.15);
  color: var(--green);
  border: 1px solid rgba(16, 168, 96, 0.3);
}

.timeline-badge.current {
  background: rgba(68, 88, 232, 0.15);
  color: var(--link);
  border: 1px solid rgba(68, 88, 232, 0.3);
}

.timeline-badge.pending {
  background: rgba(107, 114, 133, 0.1);
  color: var(--text-faint);
  border: 1px solid var(--border);
}

.timeline-badge-icon {
  font-weight: 700;
  font-size: 11px;
}

.timeline-badge-text {
  font-size: 10px;
}

.doc-card-type {
  font-size: 12px;
  color: var(--text-faint);
  margin: 0;
}

/* ===== Timeline Steps ===== */
.doc-card-timeline {
  padding: 10px 16px;
  border-bottom: 1px solid var(--border);
  background: var(--panel);
}

.timeline-steps {
  display: flex;
  gap: 0;
  justify-content: space-between;
  position: relative;
}

.timeline-steps::before {
  content: '';
  position: absolute;
  top: 16px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--border);
  z-index: 0;
}

.timeline-step {
  flex: 1;
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.timeline-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 12px;
  color: white;
  background: var(--border);
  margin-bottom: 8px;
  flex-shrink: 0;
}

.timeline-step.completed .timeline-icon {
  background: var(--green);
}

.timeline-step.current .timeline-icon {
  background: var(--link);
  box-shadow: 0 0 0 3px rgba(68, 88, 232, 0.15);
}

.timeline-step.pending .timeline-icon {
  background: var(--text-faint);
}

.timeline-title {
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 2px;
  line-height: 1.2;
}

.timeline-user {
  font-size: 11px;
  color: var(--link);
  margin-bottom: 2px;
}

.timeline-date {
  font-size: 10px;
  color: var(--text-faint);
}

/* ===== Document Info ===== */
.doc-card-info {
  padding: 8px 16px;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.info-row {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.info-label {
  font-size: 10px;
  font-weight: 600;
  color: var(--text-faint);
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.info-value {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}

/* ===== Approvers Compact ===== */
.doc-card-approvers-table {
  padding: 8px 16px;
  border-bottom: 1px solid var(--border);
  background: var(--panel);
}

.doc-card-approvers-table .status-section-title {
  margin-bottom: 6px;
}

.approvers-compact {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.approver-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 16px;
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
}

.approver-badge.completed {
  background: rgba(16, 168, 96, 0.15);
  color: var(--green);
  border: 1px solid rgba(16, 168, 96, 0.3);
}

.approver-badge.current {
  background: rgba(68, 88, 232, 0.15);
  color: var(--link);
  border: 1px solid rgba(68, 88, 232, 0.3);
}

.approver-badge.pending {
  background: rgba(107, 114, 133, 0.1);
  color: var(--text-faint);
  border: 1px solid var(--border);
}

.badge-icon {
  font-weight: 700;
  font-size: 13px;
}

.badge-name {
  font-weight: 600;
  flex: 1;
}

.badge-date {
  font-size: 11px;
  color: inherit;
  opacity: 0.8;
}

/* ===== Attached Files ===== */
.doc-card-files {
  padding: 8px 16px;
  border-bottom: 1px solid var(--border);
  background: var(--bg);
}

.doc-card-files-title {
  font-size: 10px;
  font-weight: 600;
  color: var(--text-faint);
  text-transform: uppercase;
  margin: 0 0 6px 0;
  letter-spacing: 0.3px;
}

.files-list-inline {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.file-item-inline {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 8px;
  background: var(--panel);
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s;
  font-size: 12px;
  color: var(--text);
  white-space: nowrap;
}

.file-item-inline:hover {
  background: var(--border);
}

.file-size {
  color: var(--text-faint);
  font-size: 11px;
}

/* ===== Document Status ===== */
.doc-card-status {
  padding: 24px;
  border-bottom: 1px solid var(--border);
}

.status-section-title {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-faint);
  text-transform: uppercase;
  margin: 0 0 12px 0;
}

.status-info {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.status-row {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
}

.status-row:last-child {
  border-bottom: none;
}

.status-label {
  color: var(--text-faint);
  font-weight: 500;
}

.status-value {
  color: var(--text);
  font-weight: 600;
}

/* ===== Approvers List ===== */
.doc-card-approvers {
  padding: 24px;
  border-bottom: 1px solid var(--border);
}

.approvers-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.approver-step {
  padding: 12px;
  background: var(--bg);
  border-radius: 6px;
  border-left: 3px solid var(--border);
  display: flex;
  align-items: center;
  gap: 12px;
}

.approver-step.completed {
  border-left-color: var(--green);
}

.approver-step.current {
  border-left-color: var(--link);
  background: rgba(68, 88, 232, 0.05);
}

.approver-step.pending {
  border-left-color: var(--text-faint);
}

.approver-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 12px;
  flex-shrink: 0;
}

.approver-step.completed .approver-icon {
  background: var(--green);
  color: white;
}

.approver-step.current .approver-icon {
  background: var(--link);
  color: white;
}

.approver-step.pending .approver-icon {
  background: var(--border);
  color: var(--text-faint);
}

.approver-info h4 {
  margin: 0 0 4px 0;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}

.approver-info p {
  margin: 0;
  font-size: 12px;
  color: var(--text-faint);
}

.approver-info em {
  font-style: normal;
  font-size: 11px;
  color: var(--text-faint);
}

/* ===== Responsive ===== */
@media (max-width: 1024px) {
  .approval-grid {
    grid-template-columns: 1fr;
  }

  .sidebar-right {
    flex-direction: row;
  }

  .sidebar-right .section {
    flex: 1;
  }

  .approval-topbar-new {
    flex-wrap: wrap;
  }

  .topbar-right {
    order: 3;
    width: 100%;
    margin-left: 0;
    margin-top: 8px;
  }
}

@media (max-width: 768px) {
  .approval-topbar-new {
    flex-direction: column;
    gap: 12px;
    align-items: stretch;
    padding: 12px 16px;
  }

  .topbar-left {
    width: 100%;
    gap: 8px;
  }

  .topbar-right {
    width: 100%;
    margin-left: 0;
  }

  .btn-create-new {
    flex: 1;
    justify-content: center;
  }

  .approval-tabs {
    gap: 12px;
    padding: 0 16px;
  }

  .tab-content {
    padding: 16px;
  }

  .kpi-grid {
    grid-template-columns: 1fr;
  }

  .details-grid {
    grid-template-columns: 1fr;
  }

  .table-header,
  .table-row {
    grid-template-columns: 1fr;
  }

  .users-grid {
    grid-template-columns: 1fr;
  }

  .sidebar-right {
    flex-direction: column;
  }

  .modal-content {
    max-width: 95%;
  }

  .doc-detail-grid {
    grid-template-columns: 1fr;
  }

  .doc-list-panel {
    max-height: 300px;
  }

  .doc-card-panel {
    max-height: 500px;
  }

  .doc-card-scrollable {
    flex-direction: column;
  }

  .comments-container {
    flex: 1;
    overflow-y: auto;
  }

  .comment-input-area {
    flex-shrink: 0;
  }

  .timeline-steps {
    flex-direction: column;
    gap: 16px;
  }

  .timeline-steps::before {
    display: none;
  }

  .doc-card-info {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }

  .approvers-header,
  .approvers-row {
    grid-template-columns: 1fr;
  }

  .approvers-header > div,
  .approvers-row > div {
    border-right: none;
    border-bottom: 1px solid var(--border);
  }

  .approvers-header > div:last-child,
  .approvers-row > div:last-child {
    border-bottom: none;
  }
}
