/* Shared layout — uses :root theme (red / gray / black / white) */

.dashboard-main {
  padding: 20px var(--app-page-pad-x, 24px) 24px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.dashboard-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.dashboard-header-left {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-left: 8px;
}

.dashboard-header-left h1 {
  margin: 0;
  font-size: 23px;
  letter-spacing: -0.02em;
}

.dashboard-header-left p {
  margin: 0;
  font-size: 14px;
  color: var(--theme-gray-500);
  max-width: 32rem;
}

.dashboard-header-right {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.dashboard-section {
  border-radius: 16px;
  border: 1px solid var(--surface-card-border);
  background: var(--surface-card);
  box-shadow: var(--surface-card-shadow);
  padding: 14px 14px 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.dashboard-section-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px;
}

.dashboard-section-title {
  font-size: 25px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-h);
}

.dashboard-section-subtitle {
  margin-top: 2px;
  font-size: 12px;
  color: var(--theme-gray-500);
}

.dashboard-title {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.dashboard-title span {
  font-size: 14px;
  color: var(--theme-gray-500);
}

/* Shared buttons */

.primary-button {
  border-radius: 999px;
  padding: 10px 22px;
  border: 1px solid rgba(0, 0, 0, 0.12);
  background: linear-gradient(180deg, var(--theme-maroon-bright) 0%, var(--theme-maroon) 42%, var(--theme-maroon-deep) 100%);
  color: var(--theme-white);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 2px 8px rgba(128, 0, 0, 0.25);
  transition:
    transform 0.15s ease,
    box-shadow 0.15s ease,
    filter 0.15s ease;
}

.primary-button span {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
}

.primary-button:hover {
  transform: translateY(-1px);
  filter: brightness(1.06);
  box-shadow: 0 4px 14px rgba(128, 0, 0, 0.25);
}

.primary-button:active {
  transform: none;
  box-shadow: none;
}

.primary-button:focus-visible {
  outline: 2px solid var(--theme-maroon);
  outline-offset: 3px;
}

.primary-button:disabled {
  opacity: 0.65;
  cursor: not-allowed;
  filter: none;
}

.secondary-action {
  font-size: 12px;
  color: var(--theme-gray-500);
}

.secondary-action strong {
  color: var(--text-h);
}

.secondary-chip-button {
  border-radius: 999px;
  padding: 8px 14px;
  border: 1px solid var(--theme-maroon-border);
  background: var(--surface-card-solid);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--theme-maroon);
  cursor: pointer;
  font-family: inherit;
}

.secondary-chip-button:hover {
  background: var(--theme-maroon-soft);
  border-color: var(--theme-maroon);
}

.link-button {
  padding: 0;
  border: none;
  background: none;
  color: var(--text-h);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  font-family: inherit;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: var(--theme-gray-400);
}

.link-button:hover {
  color: var(--text-h);
  text-decoration-color: var(--theme-gray-400);
}

.link-button:focus-visible {
  outline: 2px solid var(--theme-maroon);
  outline-offset: 2px;
}

/* Shared status pills */

.status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  border: 1px solid transparent;
}

.status-pill--success {
  /* background: #ecfdf3; */
  background: #189e52;
  color: #ffffff;
  /* border-color: #86efac; */
  border-color: #006f30;
}

.status-pill--warning {
  /* background: #fffbeb; */
  background: #e56823;
  color: #ffffff;
  /* border-color: #fcd34d; */
  border-color: #e55a1f;
}

.status-pill--returned {
  background: #f22929;
  color: #920e0e;
  border-color: #e51f1f;
}

.status-pill--info {
  /* background: #eff6ff;
  color: #1d4ed8;
  border-color: #93c5fd; */
  background: #1978bd;
  color: #efefef;
  border-color: #004797;
}

.status-pill--verification {
  background: var(--theme-red-soft);
  color: var(--theme-red-deep);
  border-color: var(--theme-red-border);
}

.status-pill--danger {
  background: var(--theme-red-soft);
  color: var(--theme-red);
  border-color: var(--theme-red-border);
}

/* Return lanes — distinct from danger/warning */
.status-pill--return-ex {
  background: var(--theme-red-soft);
  color: var(--theme-red-deep);
  border-color: var(--theme-red-border);
}

.status-pill--return-ver {
  background: var(--theme-gray-50);
  color: var(--theme-gray-700);
  border-color: var(--theme-gray-200);
}

.status-pill--neutral {
  background: var(--theme-gray-50);
  color: var(--theme-gray-600);
  border-color: var(--theme-gray-100);
}

/* Upload page layout */

.upload-layout {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 20px;
  align-items: flex-start;
}

@media (max-width: 820px) {
  .upload-layout {
    grid-template-columns: 1fr;
  }
}

.upload-card {
  border-radius: 16px;
  border: 1px solid var(--surface-card-border);
  padding: 28px 28px 24px;
  background: var(--surface-card);
  box-shadow: var(--surface-card-shadow);
}

.upload-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.upload-row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

/* Upload form fields */

.upload-field {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.upload-field label {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--theme-gray-600);
}

.upload-required {
  color: var(--theme-red-bright);
}

.upload-field input[type="text"],
.upload-field input[type="date"],
.upload-field input[type="time"],
.upload-field select,
.upload-field textarea {
  border: 1px solid var(--theme-gray-200);
  border-radius: 10px;
  padding: 9px 12px;
  font-size: 14px;
  font-family: inherit;
  color: var(--text-h);
  background: var(--bg-elevated);
  width: 100%;
  box-sizing: border-box;
}

.upload-field select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='none' viewBox='0 0 12 12'%3E%3Cpath d='M3 4.5l3 3 3-3' stroke='%23525252' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 32px;
  cursor: pointer;
}

.upload-field input:focus-visible,
.upload-field select:focus-visible,
.upload-field textarea:focus-visible {
  outline: 2px solid var(--theme-gray-400);
  outline-offset: 1px;
}

.upload-field textarea {
  resize: vertical;
}

/* File upload zone */

.upload-file-zone {
  display: flex;
  align-items: center;
  gap: 12px;
  border: 1px dashed var(--theme-maroon-border);
  border-radius: 10px;
  padding: 10px 14px;
  background: var(--theme-red-soft);
}

.upload-browse-btn {
  border: none;
  border-radius: 6px;
  padding: 7px 16px;
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  background: linear-gradient(180deg, var(--theme-maroon-bright) 0%, var(--theme-maroon) 100%);
  color: var(--theme-white);
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s ease, filter 0.15s ease;
}

.upload-browse-btn:hover {
  filter: brightness(1.08);
}

.upload-file-name {
  font-size: 14px;
  color: var(--theme-gray-500);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}

.upload-file-hint {
  font-size: 12px;
  color: var(--theme-gray-400);
}

.upload-file-error {
  font-size: 12px;
  color: var(--theme-red-bright);
}

/* Toast messages */

.upload-toast {
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 14px;
  margin-bottom: 12px;
}

.upload-toast--success {
  background: var(--theme-gray-50);
  color: var(--theme-gray-900);
  border: 1px solid var(--theme-gray-200);
}

.upload-toast--error {
  background: var(--theme-red-soft);
  color: var(--theme-red);
  border: 1px solid var(--theme-red-border);
}

/* Form actions */

.upload-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-top: 4px;
}

/* Guidelines panel */

.upload-guidelines {
  border-radius: 16px;
  border: 1px solid var(--theme-gray-200);
  border-left: 4px solid var(--theme-maroon);
  padding: 20px 22px;
  background: var(--surface-muted);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

.upload-guidelines h3 {
  margin: 0 0 12px;
  font-size: 15px;
  font-weight: 700;
  color: var(--text-h);
}

.upload-guidelines ol {
  margin: 0;
  padding-left: 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.upload-guidelines li {
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--theme-gray-600);
}

.upload-guidelines strong {
  color: var(--text-h);
}

/* Executor shell — direct review entry from Upload */
.upload-header-review-nav {
  padding: 10px 16px;
  border-radius: 10px;
  border: 1px solid var(--theme-red-bright);
  background: var(--theme-gray-50);
  color: var(--theme-red-deep);
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  white-space: nowrap;
  transition:
    background 0.15s ease,
    border-color 0.15s ease,
    color 0.15s ease;
}

.upload-header-review-nav:hover {
  border-color: var(--theme-red);
  color: var(--text-h);
}

.upload-header-review-nav:focus-visible {
  outline: 2px solid var(--theme-red-bright);
  outline-offset: 2px;
}

/* Upload success modal */
.upload-success-overlay {
  position: fixed;
  inset: 0;
  z-index: 10050;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(15, 15, 15, 0.45);
  backdrop-filter: blur(2px);
}

.upload-success-modal {
  max-width: 400px;
  width: 100%;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.12);
  padding: 28px 24px 22px;
  text-align: center;
}

.upload-success-icon {
  color: var(--theme-maroon, #8b1538);
  margin-bottom: 12px;
}

.upload-success-title {
  margin: 0 0 10px;
  font-size: 21px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-h);
}

.upload-success-text {
  margin: 0 0 22px;
  font-size: 15px;
  line-height: 1.55;
  color: var(--theme-gray-600);
}

.upload-success-id {
  display: block;
  margin-top: 8px;
  font-size: 13px;
  color: var(--theme-gray-500);
}

.upload-success-actions {
  display: flex;
  justify-content: center;
}

@keyframes page-content-enter {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.page-content-enter {
  animation: page-content-enter 0.5s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@media (prefers-reduced-motion: reduce) {
  .page-content-enter {
    animation: none;
  }
}
