@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

:root {
  --bg-primary: #f5f7f8;
  --bg-secondary: #ffffff;
  --bg-tertiary: #eef2f3;
  --card-bg: #ffffff;
  --card-border: #dce3e5;
  --text-primary: #172326;
  --text-secondary: #5d6b6f;
  --text-muted: #7d898d;
  --accent-cyan: #087e8b;
  --accent-blue: #2563a6;
  --accent-purple: #7a5c99;
  --accent-coral: #d45d4c;
  --success: #13795b;
  --success-glow: #e4f4ed;
  --warning: #a96708;
  --warning-glow: #fff3d6;
  --danger: #b83b3b;
  --danger-glow: #fce8e8;
  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 8px;
  --transition: 160ms ease;
  --glow: 0 0 0 3px rgba(8, 126, 139, 0.16);
  --shadow: 0 1px 2px rgba(23, 35, 38, 0.05), 0 8px 24px rgba(23, 35, 38, 0.06);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  overflow-x: hidden;
  background: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--font-sans);
  line-height: 1.5;
}

button,
input,
select,
textarea {
  font: inherit;
}

button,
select {
  cursor: pointer;
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid rgba(8, 126, 139, 0.25);
  outline-offset: 2px;
}

::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: var(--bg-tertiary);
}

::-webkit-scrollbar-thumb {
  border: 2px solid var(--bg-tertiary);
  border-radius: 8px;
  background: #aab5b8;
}

.app-header {
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid var(--card-border);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 1px 6px rgba(23, 35, 38, 0.04);
}

.header-container {
  display: flex;
  max-width: 1440px;
  min-height: 72px;
  margin: 0 auto;
  padding: 10px 28px;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.logo {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 10px;
  color: var(--text-primary);
}

.logo > svg {
  width: 34px;
  height: 34px;
  padding: 7px;
  border-radius: var(--radius-sm);
  background: var(--text-primary);
  color: #ffffff;
  stroke: currentColor;
}

.brand-copy {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.brand-copy > span {
  font-size: 1rem;
  font-weight: 800;
}

.brand-copy > small {
  margin-top: 3px;
  color: var(--text-muted);
  font-size: 0.68rem;
  font-weight: 600;
}

.controls {
  display: flex;
  min-width: 0;
  align-items: flex-end;
  justify-content: flex-end;
  gap: 10px;
}

.context-field {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 3px;
}

.context-field label {
  color: var(--text-muted);
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
}

.control-select {
  min-width: 168px;
  height: 38px;
  border: 1px solid var(--card-border);
  border-radius: var(--radius-sm);
  outline: none;
  background: var(--bg-secondary);
  color: var(--text-primary);
  padding: 0 34px 0 11px;
  font-size: 0.78rem;
  font-weight: 600;
  transition: border-color var(--transition), box-shadow var(--transition);
}

#local-select {
  max-width: 230px;
}

.control-select:focus {
  border-color: var(--accent-cyan);
  box-shadow: var(--glow);
}

.role-switcher {
  display: flex;
  height: 40px;
  padding: 3px;
  align-items: stretch;
  border: 1px solid var(--card-border);
  border-radius: var(--radius-sm);
  background: var(--bg-tertiary);
}

.role-btn {
  min-height: 32px;
  padding: 0 12px;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: var(--text-secondary);
  font-size: 0.78rem;
  font-weight: 700;
  transition: background var(--transition), color var(--transition), box-shadow var(--transition);
}

.role-btn:hover {
  color: var(--text-primary);
}

.role-btn.active {
  background: var(--bg-secondary);
  box-shadow: 0 1px 4px rgba(23, 35, 38, 0.12);
  color: var(--accent-cyan);
}

main {
  max-width: 1440px;
  margin: 0 auto;
  padding: 30px 28px 56px;
}

.view-section {
  display: none;
  animation: fade-in 180ms ease-out;
}

.view-section.active {
  display: block;
}

@keyframes fade-in {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

.page-heading {
  display: flex;
  min-height: 64px;
  margin-bottom: 22px;
  align-items: flex-end;
  justify-content: space-between;
}

.eyebrow {
  display: block;
  margin-bottom: 4px;
  color: var(--accent-cyan);
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
}

h1,
h2,
h3,
h4 {
  letter-spacing: 0;
}

h1 {
  font-size: clamp(1.6rem, 3vw, 2rem);
  line-height: 1.2;
}

.page-heading p {
  margin-top: 5px;
  color: var(--text-secondary);
  font-size: 0.9rem;
}

h2,
.section-heading {
  display: flex;
  margin-bottom: 16px;
  align-items: center;
  gap: 8px;
  font-size: 1.08rem;
  line-height: 1.35;
}

.section-heading svg {
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
}

.section-count {
  display: inline-flex;
  min-width: 24px;
  height: 22px;
  padding: 0 7px;
  align-items: center;
  justify-content: center;
  border-radius: 11px;
  background: var(--bg-tertiary);
  color: var(--text-secondary);
  font-size: 0.72rem;
  font-weight: 800;
}

.section-count.warning {
  background: var(--warning-glow);
  color: var(--warning);
}

.subtitle {
  margin: -7px 0 18px;
  color: var(--text-secondary);
  font-size: 0.84rem;
}

.glass-card,
.workspace-section,
.employee-header-card {
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  background: var(--card-bg);
  box-shadow: var(--shadow);
}

.glass-card,
.workspace-section {
  padding: 20px;
}

.glass-card {
  transition: border-color var(--transition), box-shadow var(--transition), transform var(--transition);
}

.task-item:hover,
.pending-card:hover {
  border-color: #b9c7ca;
  box-shadow: 0 2px 3px rgba(23, 35, 38, 0.06), 0 12px 28px rgba(23, 35, 38, 0.07);
}

.panel-container {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 20px;
}

.stat-card {
  position: relative;
  display: flex;
  min-height: 108px;
  padding: 18px 20px 18px 22px;
  overflow: hidden;
  align-items: center;
  justify-content: space-between;
}

.stat-card::before {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 4px;
  background: var(--accent-blue);
  content: '';
}

.stat-card.success::before { background: var(--success); }
.stat-card.cyan::before { background: var(--accent-cyan); }
.stat-card.coral::before { background: var(--accent-coral); }

.stat-info h3 {
  margin-bottom: 8px;
  color: var(--text-secondary);
  font-size: 0.73rem;
  font-weight: 700;
  text-transform: uppercase;
}

.stat-number {
  color: var(--text-primary);
  font-size: 1.65rem;
  font-weight: 800;
  line-height: 1.15;
}

.stat-icon {
  display: flex;
  width: 44px;
  height: 44px;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  background: var(--bg-tertiary);
}

.stat-icon svg {
  width: 20px;
  height: 20px;
}

.stat-card.success .stat-icon { color: var(--success); background: var(--success-glow); }
.stat-card.cyan .stat-icon { color: var(--accent-cyan); background: #e4f3f4; }
.stat-card.coral .stat-icon { color: var(--accent-coral); background: #fbeae6; }

.admin-split {
  display: grid;
  grid-template-columns: minmax(0, 1.8fr) minmax(300px, 0.85fr);
  gap: 20px;
  align-items: start;
}

.badge {
  display: inline-flex;
  min-height: 24px;
  padding: 3px 8px;
  align-items: center;
  border: 1px solid transparent;
  border-radius: 12px;
  font-size: 0.66rem;
  font-weight: 800;
  line-height: 1.2;
  text-transform: uppercase;
}

.badge-obligatoria {
  border-color: #c8d9ed;
  background: #edf4fb;
  color: var(--accent-blue);
}

.badge-bonus,
.badge-aprobada {
  border-color: #bedfd2;
  background: var(--success-glow);
  color: var(--success);
}

.badge-estado {
  border-color: var(--card-border);
  background: var(--bg-tertiary);
  color: var(--text-secondary);
}

.badge-pendiente_aprobacion {
  border-color: #efd49b;
  background: var(--warning-glow);
  color: var(--warning);
}

.badge-rechazada {
  border-color: #efc2c2;
  background: var(--danger-glow);
  color: var(--danger);
}

.table-wrapper {
  overflow-x: auto;
  border: 1px solid var(--card-border);
  border-radius: var(--radius-sm);
}

table {
  width: 100%;
  min-width: 720px;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.82rem;
}

th {
  padding: 11px 14px;
  border-bottom: 1px solid var(--card-border);
  background: var(--bg-tertiary);
  color: var(--text-secondary);
  font-size: 0.67rem;
  font-weight: 800;
  text-transform: uppercase;
}

td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--card-border);
  vertical-align: middle;
}

tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: #fafcfc; }

.user-cell,
.employee-identity {
  display: flex;
  align-items: center;
  gap: 11px;
}

.user-avatar {
  display: flex;
  width: 36px;
  height: 36px;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: #dceef0;
  color: #11636b;
  font-size: 0.78rem;
  font-weight: 800;
}

.user-avatar-lg {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-md);
  font-size: 1rem;
}

.btn {
  display: inline-flex;
  min-height: 42px;
  padding: 8px 13px;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: 1px solid var(--card-border);
  border-radius: var(--radius-sm);
  outline: none;
  background: var(--bg-secondary);
  color: var(--text-primary);
  font-size: 0.8rem;
  font-weight: 700;
  line-height: 1.25;
  transition: background var(--transition), border-color var(--transition), box-shadow var(--transition), transform var(--transition);
}

.btn:hover:not(:disabled) {
  border-color: #afbdc0;
  background: var(--bg-tertiary);
}

.btn:active:not(:disabled) {
  transform: translateY(1px);
}

.btn:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.btn-primary {
  border-color: var(--accent-cyan);
  background: var(--accent-cyan);
  color: #ffffff;
}

.btn-primary:hover:not(:disabled) {
  border-color: #066d77;
  background: #066d77;
}

.btn-success {
  border-color: var(--success);
  background: var(--success);
  color: #ffffff;
}

.btn-success:hover:not(:disabled) {
  border-color: #0e654a;
  background: #0e654a;
}

.btn-danger {
  border-color: #e6bebe;
  background: var(--bg-secondary);
  color: var(--danger);
}

.btn-danger:hover:not(:disabled) {
  border-color: #dc9f9f;
  background: var(--danger-glow);
}

.btn-sm {
  min-height: 36px;
  padding: 6px 10px;
  font-size: 0.73rem;
}

.btn-block {
  width: 100%;
}

.employee-header-card {
  display: flex;
  min-height: 104px;
  margin-bottom: 24px;
  padding: 20px 22px;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.employee-info h2 {
  margin-bottom: 6px;
  font-size: 1.15rem;
}

.employee-store {
  margin-left: 6px;
  color: var(--text-secondary);
  font-size: 0.8rem;
}

.employee-earnings {
  min-width: 210px;
  padding-left: 22px;
  border-left: 1px solid var(--card-border);
  text-align: right;
}

.employee-earnings-label {
  color: var(--text-secondary);
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
}

.employee-earnings-value {
  margin-top: 3px;
  color: var(--success);
  font-size: 1.7rem;
  font-weight: 800;
}

.task-sections {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  align-items: start;
}

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

.task-item {
  display: flex;
  padding: 18px;
  flex-direction: column;
  gap: 13px;
}

.task-item-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.task-title {
  margin-bottom: 5px;
  font-size: 0.98rem;
  line-height: 1.4;
}

.task-title-row {
  display: flex;
  margin-bottom: 5px;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

.task-feedback {
  padding: 10px 12px;
  border: 1px solid #efc2c2;
  border-radius: var(--radius-sm);
  background: var(--danger-glow);
  color: #7e2929;
  font-size: 0.78rem;
}

.task-feedback span {
  display: block;
  margin-top: 4px;
  color: var(--text-secondary);
  font-size: 0.72rem;
}

.badge-muted {
  opacity: 0.72;
}

.task-desc {
  display: -webkit-box;
  overflow: hidden;
  color: var(--text-secondary);
  font-size: 0.8rem;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.task-bonus-amount {
  flex: 0 0 auto;
  color: var(--success);
  font-size: 0.85rem;
  font-weight: 800;
  white-space: nowrap;
}

.photo-uploader-flow {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.upload-slot {
  position: relative;
  display: flex;
  width: 100%;
  min-width: 0;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  padding: 7px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border: 1px dashed #bcc8ca;
  border-radius: var(--radius-sm);
  background: var(--bg-tertiary);
  color: var(--text-muted);
  text-align: center;
  transition: border-color var(--transition), background var(--transition), box-shadow var(--transition);
}

.upload-slot:disabled {
  cursor: not-allowed;
  opacity: 0.56;
}

.upload-slot.active {
  border-color: var(--accent-cyan);
  background: #f0f8f8;
  color: var(--accent-cyan);
}

.upload-slot.active:hover {
  background: #e6f3f4;
  box-shadow: inset 0 0 0 1px var(--accent-cyan);
}

.upload-slot.completed {
  border-style: solid;
  border-color: #a8d2c3;
  background: var(--success-glow);
  opacity: 1;
}

.upload-slot svg {
  width: 21px;
  height: 21px;
  margin-bottom: 5px;
  stroke: currentColor;
}

.upload-slot-label {
  font-size: 0.65rem;
  font-weight: 800;
  line-height: 1.25;
  text-transform: uppercase;
}

.upload-slot-preview {
  position: absolute;
  inset: 0;
  z-index: 2;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.upload-slot-time {
  position: absolute;
  right: 5px;
  bottom: 5px;
  z-index: 3;
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(23, 35, 38, 0.82);
  color: #ffffff;
  font-size: 0.62rem;
  font-weight: 700;
}

.empty-state {
  padding: 28px 18px;
  border: 1px dashed var(--card-border);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.5);
  color: var(--text-muted);
  font-size: 0.84rem;
  text-align: center;
}

.pending-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.pending-card {
  border-left: 4px solid var(--warning);
}

.pending-card-header {
  display: flex;
  margin-bottom: 9px;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.pending-meta {
  margin-top: 4px;
  color: var(--text-secondary);
  font-size: 0.78rem;
}

.pending-title {
  font-size: 1rem;
  line-height: 1.4;
}

.pending-date {
  margin-bottom: 10px;
  color: var(--text-secondary);
  font-size: 0.76rem;
}

.approval-empty-state svg {
  display: block;
  margin: 0 auto 7px;
  opacity: 0.55;
}

.evidence-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 14px 0;
}

.evidence-thumb-container {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 5px;
}

.evidence-thumb-label {
  color: var(--text-muted);
  font-size: 0.66rem;
  font-weight: 700;
  text-transform: uppercase;
}

.evidence-thumb {
  width: 100%;
  aspect-ratio: 4 / 3;
  border: 1px solid var(--card-border);
  border-radius: var(--radius-sm);
  background: var(--bg-tertiary);
  cursor: zoom-in;
  object-fit: cover;
  transition: border-color var(--transition), opacity var(--transition);
}

.evidence-thumb:hover {
  border-color: var(--accent-cyan);
  opacity: 0.9;
}

.admin-actions-form {
  display: flex;
  margin-top: 14px;
  flex-direction: column;
  gap: 9px;
}

.admin-actions-form > div:last-child {
  display: flex;
  flex-wrap: wrap;
  gap: 8px !important;
}

.admin-actions-form .form-group {
  margin-bottom: 0;
}

.table-user-name {
  font-weight: 700;
}

.table-user-role {
  margin-top: 2px;
  color: var(--text-muted);
  font-size: 0.68rem;
}

.table-centered {
  text-align: center;
}

.table-money {
  color: var(--success);
  font-size: 0.9rem;
  font-weight: 800;
}

.admin-tools-card .subtitle {
  margin-bottom: 12px;
}

.form-group {
  margin-bottom: 15px;
}

.form-group label {
  display: block;
  margin-bottom: 5px;
  color: var(--text-secondary);
  font-size: 0.75rem;
  font-weight: 700;
}

.form-input {
  width: 100%;
  min-height: 42px;
  padding: 9px 11px;
  border: 1px solid #cbd5d8;
  border-radius: var(--radius-sm);
  outline: none;
  background: var(--bg-secondary);
  color: var(--text-primary);
  font-size: 0.82rem;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.form-input:hover {
  border-color: #aebdc0;
}

.form-input:focus {
  border-color: var(--accent-cyan);
  box-shadow: var(--glow);
}

.form-input::placeholder {
  color: #929da0;
}

textarea.form-input {
  min-height: 96px;
  resize: vertical;
}

.task-admin-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.task-admin-item {
  overflow: hidden;
  border: 1px solid var(--card-border);
  border-radius: var(--radius-sm);
  background: var(--bg-secondary);
}

.task-admin-item[open] {
  border-color: #b8c7ca;
}

.task-admin-heading {
  display: flex;
  padding: 12px;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  list-style: none;
  cursor: pointer;
}

.task-admin-heading::-webkit-details-marker {
  display: none;
}

.task-admin-heading::after {
  width: 8px;
  height: 8px;
  margin: 6px 2px 0 4px;
  flex: 0 0 auto;
  border-right: 2px solid var(--text-muted);
  border-bottom: 2px solid var(--text-muted);
  content: '';
  transform: rotate(45deg);
  transition: transform var(--transition);
}

.task-admin-item[open] .task-admin-heading::after {
  transform: rotate(225deg) translate(-2px, -2px);
}

.task-admin-heading h3 {
  margin-bottom: 7px;
  font-size: 0.83rem;
}

.task-admin-heading strong {
  margin-left: auto;
  color: var(--success);
  font-size: 0.75rem;
  white-space: nowrap;
}

.task-admin-content {
  padding: 14px;
  border-top: 1px solid var(--card-border);
  background: #fafcfc;
}

.task-admin-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.task-admin-form .form-group {
  margin-bottom: 0;
}

.task-admin-description {
  grid-column: 1 / -1;
}

.task-admin-save {
  width: 100%;
  margin-top: 12px;
}

.chart-container {
  display: flex;
  height: 236px;
  margin-top: 12px;
  padding: 8px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--card-border);
  border-radius: var(--radius-sm);
  background: #fafcfc;
}

.chart-bar {
  transition: opacity var(--transition);
}

.chart-bar:hover {
  opacity: 0.8;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: none;
  padding: 18px;
  align-items: center;
  justify-content: center;
  background: rgba(23, 35, 38, 0.68);
}

.modal.active {
  display: flex;
  animation: fade-in 140ms ease-out;
}

.modal-content {
  display: flex;
  width: 100%;
  max-width: 900px;
  max-height: 90vh;
  overflow-y: auto;
  flex-direction: column;
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  background: var(--bg-secondary);
  box-shadow: 0 24px 64px rgba(23, 35, 38, 0.24);
}

.modal-content-preview { max-width: 620px; }
.modal-content-uploader { max-width: 500px; }

.modal-header {
  display: flex;
  min-height: 62px;
  padding: 14px 18px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid var(--card-border);
}

.modal-header h3 {
  font-size: 1rem;
}

.modal-body {
  padding: 18px;
}

.modal-footer {
  display: flex;
  padding: 12px 18px;
  justify-content: flex-end;
  gap: 8px;
  border-top: 1px solid var(--card-border);
  background: #fafcfc;
}

.close-btn {
  display: inline-flex;
  width: 40px;
  height: 40px;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text-secondary);
  font-size: 1.45rem;
  line-height: 1;
}

.close-btn:hover {
  background: var(--bg-tertiary);
  color: var(--text-primary);
}

.preview-image-wrap { text-align: center; }

.modal-preview-image {
  width: 100%;
  max-height: 64vh;
  border: 1px solid var(--card-border);
  border-radius: var(--radius-sm);
  object-fit: contain;
}

.uploader-primary {
  margin-bottom: 18px;
}

.modal-divider {
  position: relative;
  margin: 0 0 16px;
  color: var(--text-muted);
  font-size: 0.68rem;
  font-weight: 700;
  text-align: center;
  text-transform: uppercase;
}

.modal-divider::before {
  position: absolute;
  top: 50%;
  right: 0;
  left: 0;
  z-index: 0;
  border-top: 1px solid var(--card-border);
  content: '';
}

.modal-divider span {
  position: relative;
  z-index: 1;
  padding: 0 8px;
  background: var(--bg-secondary);
}

.simulation-photo-options {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.btn-demo-photo {
  justify-content: flex-start;
  text-align: left;
}

.hidden-file-input {
  display: none;
}

.toast {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 2000;
  display: flex;
  width: min(380px, calc(100vw - 32px));
  min-height: 52px;
  padding: 12px 16px;
  align-items: center;
  border: 1px solid var(--card-border);
  border-left: 4px solid var(--accent-cyan);
  border-radius: var(--radius-sm);
  background: var(--bg-secondary);
  box-shadow: 0 12px 32px rgba(23, 35, 38, 0.18);
  color: var(--text-primary);
  font-size: 0.82rem;
  font-weight: 600;
  opacity: 0;
  pointer-events: none;
  transform: translateY(18px);
  transition: opacity 180ms ease, transform 180ms ease;
}

.toast.active {
  opacity: 1;
  transform: translateY(0);
}

.toast.success { border-left-color: var(--success); }
.toast.danger { border-left-color: var(--danger); }
.toast.warning { border-left-color: var(--warning); }

@media (max-width: 1100px) {
  .header-container {
    align-items: flex-start;
    flex-direction: column;
  }

  .controls {
    width: 100%;
    justify-content: flex-start;
  }

  .admin-split {
    grid-template-columns: 1fr;
  }

  .admin-split > .panel-container:last-child {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
  }
}

@media (max-width: 760px) {
  .header-container {
    min-height: auto;
    padding: 12px 16px;
    gap: 12px;
  }

  .brand-copy > small {
    display: none;
  }

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

  .context-field:first-child,
  .role-switcher {
    grid-column: 1 / -1;
  }

  .context-field,
  .control-select,
  #local-select,
  .role-switcher {
    width: 100%;
    max-width: none;
    min-width: 0;
  }

  .role-btn {
    flex: 1;
  }

  main {
    padding: 22px 16px 40px;
  }

  .page-heading {
    min-height: 0;
    margin-bottom: 18px;
  }

  .dashboard-grid,
  .task-sections,
  .admin-split > .panel-container:last-child {
    grid-template-columns: 1fr;
  }

  .dashboard-grid {
    gap: 9px;
  }

  .stat-card {
    min-height: 92px;
  }

  .employee-header-card {
    align-items: stretch;
    flex-direction: column;
  }

  .employee-earnings {
    min-width: 0;
    padding: 14px 0 0;
    border-top: 1px solid var(--card-border);
    border-left: 0;
    text-align: left;
  }

  .employee-earnings-value {
    font-size: 1.45rem;
  }

  .employee-store {
    display: block;
    margin: 5px 0 0;
  }

  .task-item-header,
  .pending-card-header {
    flex-direction: column;
  }

  .task-admin-form {
    grid-template-columns: 1fr;
  }

  .task-admin-description {
    grid-column: auto;
  }

  .admin-actions-form > div:last-child .btn {
    width: 100%;
  }

  .toast {
    right: 16px;
    bottom: 16px;
    left: 16px;
    width: auto;
  }
}

@media (max-width: 430px) {
  .controls {
    grid-template-columns: 1fr;
  }

  .context-field:first-child,
  .role-switcher {
    grid-column: auto;
  }

  .glass-card,
  .workspace-section {
    padding: 16px;
  }

  .photo-uploader-flow {
    gap: 6px;
  }

  .upload-slot {
    min-height: 82px;
    aspect-ratio: auto;
  }

  .evidence-strip {
    grid-template-columns: 1fr;
  }

  .evidence-thumb {
    aspect-ratio: 16 / 9;
  }

  .task-admin-heading {
    flex-wrap: wrap;
  }

  .task-admin-heading strong {
    margin-left: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
