/*
 * MP Engenharia — Page-Specific Exceptions
 * OS-113B: Exceções visuais específicas de páginas
 *
 * Responsabilidade: estilos que NÃO podem ser generalizados
 * em componentes reutilizáveis. Cada regra deve ser justificada.
 *
 * Regra: não reproduzir estilos duplicados deste arquivo.
 */

/* =========================================================================
   DASHBOARD — Ajustes específicos
   ========================================================================= */

/* =========================================================================
   SOLICITACOES — Ajustes específicos
   ========================================================================= */

/* =========================================================================
   ORCAMENTOS — Ajustes específicos
   ========================================================================= */

/* =========================================================================
   ORDENS DE SERVICO — Layout UX-001 Etapa 2
   ========================================================================= */

/* Layout principal: filas + conteúdo */
.mp-os-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
  align-items: start;
}

/* Desktop: filas em faixa, conteúdo below */
@media (min-width: 1024px) {
  .mp-os-nav {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

/* Tablet: filas 2x2 */
@media (min-width: 768px) and (max-width: 1023px) {
  .mp-os-nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Mobile: filas empilhadas */
@media (max-width: 767px) {
  .mp-os-nav {
    grid-template-columns: 1fr;
  }

  .mp-os-header-title h2 {
    font-size: 17px;
  }

  .mp-os-header-row {
    flex-direction: column;
    align-items: flex-start;
  }

  .mp-os-header-actions {
    width: 100%;
  }

  .mp-os-header-actions .mp-app-button,
  .mp-os-header-actions .mp-app-ghost {
    flex: 1;
    min-width: 0;
  }

  .mp-os-header-indicators {
    gap: 8px 16px;
  }

  .mp-os-nav-items {
    max-height: 180px;
  }
}

/* Ultra compact mobile */
@media (max-width: 479px) {
  .mp-os-header {
    padding: 14px 16px;
  }

  .mp-os-header-title h2 {
    font-size: 16px;
  }

  .mp-os-header-context {
    font-size: 12px;
  }
}

/* =========================================================================
   MATERIAIS DA OS — UX-002
   ========================================================================= */

/* Module Header */
.mp-mat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding: 14px 22px;
  border: 1px solid var(--mp-line);
  border-radius: var(--mp-radius);
  background: var(--mp-panel);
  margin-bottom: 18px;
}

.mp-mat-header-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.mp-mat-header-left h3 {
  margin: 0;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--mp-muted);
}

.mp-mat-header-left .mp-status-pill {
  font-size: 11px;
  padding: 2px 8px;
}

.mp-mat-header-right {
  display: flex;
  align-items: center;
  gap: 14px;
}

.mp-mat-total-header {
  font-size: 13px;
  font-weight: 700;
  color: var(--mp-ink);
}

.mp-mat-total-header strong {
  color: var(--mp-status-success);
}

/* Material List */
.mp-mat-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-bottom: 18px;
  border: 1px solid var(--mp-line);
  border-radius: var(--mp-radius);
  background: var(--mp-panel);
  overflow: hidden;
}

/* Material Card */
.mp-mat-card {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  padding: 12px 18px;
  border-bottom: 1px solid var(--mp-line);
  background: var(--mp-panel);
  transition: background 0.12s;
}

.mp-mat-card:last-child {
  border-bottom: none;
}

.mp-mat-card:hover {
  background: var(--mp-panel-soft);
}

.mp-mat-card--editing {
  grid-template-columns: 1fr;
  background: var(--mp-panel-soft);
  padding: 18px;
}

/* Primary Info */
.mp-mat-primary {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px;
  min-width: 0;
}

.mp-mat-description {
  font-weight: 700;
  font-size: 14px;
  color: var(--mp-ink);
  margin: 0;
  min-width: 0;
}

.mp-mat-qty {
  font-size: 13px;
  color: var(--mp-muted);
  white-space: nowrap;
}

.mp-mat-ref {
  font-size: 12px;
  color: var(--mp-faint);
  white-space: nowrap;
}

/* Secondary Info */
.mp-mat-secondary {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  grid-column: 1 / -1;
}

.mp-mat-secondary span {
  font-size: 12px;
  color: var(--mp-faint);
}

/* Cost */
.mp-mat-cost {
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  font-size: 14px;
  font-weight: 700;
  color: var(--mp-ink);
}

.mp-mat-cost--client {
  font-weight: 400;
  font-style: italic;
  color: var(--mp-faint);
}

/* Origin Badge */
.mp-mat-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 10px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

.mp-mat-badge--stock { background: #e8f4e8; color: #287a46; }
.mp-mat-badge--purchase { background: #e8f0f8; color: #2563eb; }
.mp-mat-badge--client { background: #e8f4f8; color: #1a6b7a; }
.mp-mat-badge--project { background: #f5f0ff; color: #6f45a5; }
.mp-mat-badge--other { background: #f0f2f1; color: #525957; }

/* Actions */
.mp-mat-actions {
  display: flex;
  align-items: flex-start;
  gap: 4px;
}

.mp-mat-actions .mp-app-ghost {
  min-height: 28px;
  padding: 0 8px;
  font-size: 11px;
}

/* Total Footer */
.mp-mat-total {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 22px;
  border: 1px solid var(--mp-line);
  border-radius: var(--mp-radius);
  background: var(--mp-panel-soft);
}

.mp-mat-total span {
  font-size: 13px;
  font-weight: 700;
  color: var(--mp-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.mp-mat-total strong {
  font-size: 16px;
  font-weight: 800;
  color: var(--mp-ink);
}

/* Add Form */
.mp-mat-add {
  margin-top: 18px;
  border: 1px solid var(--mp-line);
  border-radius: var(--mp-radius);
  background: var(--mp-panel);
  overflow: hidden;
}

.mp-mat-add-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 22px;
  border-bottom: 1px solid var(--mp-line);
  background: var(--mp-panel-soft);
  cursor: pointer;
}

.mp-mat-add-header h4 {
  margin: 0;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--mp-muted);
}

.mp-mat-add-body {
  padding: 18px 22px;
}

.mp-mat-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px 18px;
}

.mp-mat-form-grid .mp-form-field--wide {
  grid-column: 1 / -1;
}

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

  .mp-mat-card {
    grid-template-columns: 1fr;
  }

  .mp-mat-cost {
    grid-column: 1;
  }

  .mp-mat-actions {
    grid-column: 1;
    justify-content: flex-start;
  }

  .mp-mat-form-grid {
    grid-template-columns: 1fr;
  }

  .mp-mat-total {
    flex-direction: column;
    gap: 6px;
    align-items: flex-start;
  }
}

/* =========================================================================
   ESTOQUE — Ajustes específicos
   ========================================================================= */

/* =========================================================================
   CLIENTES — Ajustes específicos
   ========================================================================= */

/* =========================================================================
   USUARIOS — Ajustes específicos
   ========================================================================= */

/* =========================================================================
   RELATORIOS — Ajustes específicos
   ========================================================================= */

/* =========================================================================
   MINHA SENHA — Ajustes específicos
   ========================================================================= */

/* =========================================================================
   EQUIPE — Ajustes específicos
   ========================================================================= */
