/* BACKOFFICE */
.backoffice-view {
  display: none;
  animation: fadeIn 0.2s ease-in-out;
}

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

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

.bo-header {
  margin: 32px 0 28px;
  padding-bottom: 16px;
  border-bottom: 2px solid var(--border-strong);
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 16px;
}

.bo-title {
  font-size: 28px;
  font-weight: 900;
  letter-spacing: -0.02em;
}

.bo-subtitle {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-dim);
  font-weight: 700;
  margin-top: 4px;
}

/* CARDS DE UPLOAD POR EMPRESA */
.upload-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 20px;
  margin-bottom: 36px;
}

.upload-card {
  background: var(--surface);
  border: 1px solid var(--border-strong);
  padding: 24px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.upload-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.upload-company-name {
  font-size: 16px;
  font-weight: 900;
  letter-spacing: -0.01em;
  display: flex;
  align-items: center;
  gap: 8px;
}

.upload-status {
  font-size: 11px;
  color: var(--text-dim);
  margin-bottom: 16px;
}

.upload-status strong {
  color: var(--text);
  font-weight: 700;
}

/* DROPZONE */
.dropzone {
  border: 2px dashed var(--border);
  background: var(--surface-2);
  padding: 32px 16px;
  text-align: center;
  cursor: pointer;
  border-radius: var(--radius-md);
  transition: all 0.2s ease;
  position: relative;
}

.dropzone:hover, .dropzone.dragover {
  border-color: var(--brand-color);
  background: var(--brand-soft);
}

.dropzone-icon {
  font-size: 28px;
  margin-bottom: 8px;
  color: var(--brand-color);
}

.dropzone-text {
  font-size: 12px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
}

.dropzone-hint {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-dim);
}

.dropzone input[type="file"] {
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
  opacity: 0;
  cursor: pointer;
}

/* CONFIGURADOR DE MÓDULOS DE ACCOUNTS */
.settings-section {
  background: var(--surface);
  border: 1px solid var(--border-strong);
  padding: 24px;
  margin-bottom: 36px;
}

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

.settings-title {
  font-size: 18px;
  font-weight: 800;
}

.settings-subtitle {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-dim);
  font-weight: 600;
  margin-top: 2px;
}

.module-toggles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 14px;
  margin-bottom: 24px;
}

.module-toggle-card {
  background: var(--surface-2);
  border: 1px solid var(--border);
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: all 0.15s ease;
}

.module-toggle-card:hover {
  border-color: var(--border-strong);
}

.module-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding-right: 12px;
}

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

.module-key {
  font-size: 10px;
  color: var(--text-dim);
  font-family: monospace;
}

/* SWITCH TOGGLE */
.switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0; left: 0; right: 0; bottom: 0;
  background-color: var(--border);
  transition: 0.2s;
  border-radius: 24px;
}

.slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: 0.2s;
  border-radius: 50%;
}

input:checked + .slider {
  background-color: var(--positive);
}

input:checked + .slider:before {
  transform: translateX(20px);
}

/* ALERTS & FEEDBACK */
.toast-msg {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: var(--text);
  color: var(--bg);
  padding: 12px 20px;
  border-radius: var(--radius-md);
  font-weight: 700;
  font-size: 12px;
  box-shadow: var(--shadow-md);
  z-index: 1000;
  display: flex;
  align-items: center;
  gap: 8px;
  animation: slideUp 0.2s ease;
}

@keyframes slideUp {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}
