/* ==========================================================================
   BEE FLIGHT COSMETICS — Central de Expedição da Fábrica (Tatuí/SP)
   Estilos focados em usabilidade móvel (Touchscreen / Tablets / Smartphones)
   Desenvolvido por Anjos Code (https://anjoscode.com.br)
   ========================================================================== */

:root {
  --bg-dark: #0a0b0d;
  --bg-card: #14161b;
  --bg-card-hover: #1b1e24;
  --border-color: rgba(255, 255, 255, 0.08);
  --border-active: rgba(212, 175, 55, 0.35);
  
  --gold: #d4af37;
  --gold-light: #f3e5ab;
  --text-main: #f0f2f5;
  --text-muted: #8b949e;
  
  --status-pending: #d29922;
  --status-blue: #388bfd;
  --status-purple: #a371f7;
  --status-green: #3fb950;
  --status-red: #f85149;
  
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: var(--font-family);
  background-color: var(--bg-dark);
  color: var(--text-main);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ==========================================================================
   TELA DE LOGIN DO OPERADOR DE EXPEDIÇÃO
   ========================================================================== */
.exp-login-screen {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 20px;
  background: radial-gradient(circle at 50% 30%, #1a1e27 0%, #0a0b0d 100%);
}

.exp-login-card {
  width: 100%;
  max-width: 440px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 32px 24px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6);
  text-align: center;
}

.exp-logo {
  height: 52px;
  border-radius: 50%;
  margin-bottom: 14px;
  border: 2px solid var(--gold);
}

.exp-login-title {
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: 0.5px;
  color: #fff;
}

.exp-login-sub {
  font-size: 0.85rem;
  color: var(--gold);
  margin-top: 4px;
  font-weight: 600;
  letter-spacing: 0.5px;
}

.exp-factory-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(212, 175, 55, 0.1);
  border: 1px solid var(--border-active);
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 0.78rem;
  color: var(--gold-light);
  margin: 16px 0 22px;
}

.exp-form {
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-group label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
}

.form-group input {
  padding: 14px 16px;
  background: #0d0f13;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-sm);
  color: #fff;
  font-size: 1rem;
  outline: none;
  transition: border-color 0.2s;
}

.form-group input:focus {
  border-color: var(--gold);
}

.btn-exp-login {
  background: linear-gradient(135deg, var(--gold), #b89324);
  color: #000;
  font-weight: 700;
  font-size: 1rem;
  padding: 16px;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 8px;
  box-shadow: 0 4px 14px rgba(212, 175, 55, 0.25);
}

.btn-exp-login:hover {
  background: linear-gradient(135deg, #e5bf3e, #c79f29);
}

.quick-exp-btn {
  width: 100%;
  margin-top: 18px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px dashed var(--border-color);
  padding: 12px;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-size: 0.82rem;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.quick-exp-btn:hover {
  border-color: var(--gold);
  color: #fff;
}

/* ==========================================================================
   LAYOUT PRINCIPAL DA EXPEDIÇÃO (FÁBRICA)
   ========================================================================== */
.exp-layout {
  display: flex;
  flex-direction: column;
  flex: 1;
}

/* HEADER SUPERIOR */
.exp-header {
  background: #111317;
  border-bottom: 1px solid var(--border-color);
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
}

.exp-header-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.exp-header-brand img {
  height: 38px;
  border-radius: 50%;
  border: 1px solid var(--gold);
}

.exp-header-title {
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: 0.5px;
}

.exp-header-sub {
  font-size: 0.72rem;
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.exp-header-user {
  display: flex;
  align-items: center;
  gap: 14px;
}

.exp-user-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.05);
  padding: 6px 12px;
  border-radius: 20px;
  border: 1px solid var(--border-color);
  font-size: 0.82rem;
}

.btn-exp-logout {
  background: rgba(248, 81, 73, 0.12);
  border: 1px solid rgba(248, 81, 73, 0.3);
  color: #ff7b72;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
}

/* BARRA DE FILTROS & INDICADORES DE PRODUÇÃO */
.exp-controls-bar {
  background: #16181e;
  border-bottom: 1px solid var(--border-color);
  padding: 14px 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

@media (min-width: 768px) {
  .exp-controls-bar {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}

.exp-tab-filters {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.exp-tab-btn {
  background: #0e1014;
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  padding: 10px 16px;
  border-radius: 30px;
  font-size: 0.84rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s;
}

.exp-tab-btn.active {
  background: var(--gold);
  color: #000;
  border-color: var(--gold);
  font-weight: 700;
}

.exp-tab-badge {
  background: rgba(0, 0, 0, 0.25);
  color: inherit;
  padding: 2px 7px;
  border-radius: 10px;
  font-size: 0.74rem;
}

.exp-search-box {
  display: flex;
  align-items: center;
  background: #0e1014;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 0 12px;
}

.exp-search-box input {
  background: transparent;
  border: none;
  padding: 10px 8px;
  color: #fff;
  font-size: 0.88rem;
  outline: none;
  width: 100%;
}

/* ÁREA DE CARDS DE PEDIDOS DA LINHA DE EXPEDIÇÃO */
.exp-content {
  flex: 1;
  padding: 20px;
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
}

.exp-orders-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
}

@media (min-width: 900px) {
  .exp-orders-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* CARD DE PEDIDO OPERACIONAL */
.exp-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.exp-card.priority {
  border-left: 4px solid var(--gold);
}

.exp-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  padding-bottom: 12px;
}

.exp-card-order-id {
  font-size: 1.1rem;
  font-weight: 800;
  letter-spacing: 0.5px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.exp-card-date {
  font-size: 0.76rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.exp-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 10px;
  border-radius: 6px;
  font-size: 0.76rem;
  font-weight: 700;
  text-transform: uppercase;
}

.exp-badge-pending {
  background: rgba(210, 153, 34, 0.15);
  color: var(--status-pending);
  border: 1px solid rgba(210, 153, 34, 0.3);
}

.exp-badge-separating {
  background: rgba(56, 139, 253, 0.15);
  color: var(--status-blue);
  border: 1px solid rgba(56, 139, 253, 0.3);
}

.exp-badge-packed {
  background: rgba(163, 113, 247, 0.15);
  color: var(--status-purple);
  border: 1px solid rgba(163, 113, 247, 0.3);
}

.exp-badge-shipped {
  background: rgba(63, 185, 80, 0.15);
  color: var(--status-green);
  border: 1px solid rgba(63, 185, 80, 0.3);
}

/* DADOS DO CLIENTE & ENTREGA */
.exp-customer-box {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: var(--radius-sm);
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 0.86rem;
}

.exp-customer-name {
  font-weight: 700;
  color: #fff;
  font-size: 0.95rem;
}

.exp-customer-address {
  color: var(--text-muted);
  line-height: 1.35;
}

.exp-customer-contact {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 6px;
  font-size: 0.8rem;
}

.exp-contact-link {
  color: var(--gold-light);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

/* CHECKLIST DE ITENS */
.exp-items-checklist {
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-sm);
  background: #0d0e12;
  overflow: hidden;
}

.exp-items-header {
  background: rgba(255, 255, 255, 0.03);
  padding: 8px 12px;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  display: flex;
  justify-content: space-between;
}

.exp-item-row {
  padding: 10px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  font-size: 0.88rem;
}

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

.exp-item-info {
  display: flex;
  align-items: center;
  gap: 10px;
}

.exp-item-qty {
  background: rgba(212, 175, 55, 0.15);
  color: var(--gold);
  border: 1px solid rgba(212, 175, 55, 0.3);
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 0.84rem;
}

/* BOTÕES DE AÇÃO OPERACIONAL */
.exp-actions-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 4px;
}

@media (min-width: 480px) {
  .exp-actions-group {
    flex-direction: row;
  }
}

.btn-exp-action {
  flex: 1;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 0.9rem;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: opacity 0.2s, transform 0.1s;
}

.btn-exp-action:active {
  transform: scale(0.98);
}

.btn-action-start {
  background: var(--status-blue);
  color: #fff;
}

.btn-action-pack {
  background: var(--status-purple);
  color: #fff;
}

.btn-action-ship {
  background: linear-gradient(135deg, var(--gold), #b89324);
  color: #000;
}

.btn-action-print {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  padding: 12px;
}

.btn-action-issue {
  background: rgba(248, 81, 73, 0.1);
  border: 1px solid rgba(248, 81, 73, 0.25);
  color: #ff7b72;
  padding: 12px;
}

/* MODAL DE RASTREAMENTO & OCORRÊNCIA */
.exp-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(6px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  padding: 20px;
}

.exp-modal.active {
  display: flex;
}

.exp-modal-box {
  width: 100%;
  max-width: 480px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 24px;
  position: relative;
}

.exp-modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 1.2rem;
  cursor: pointer;
}

.exp-modal-title {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 6px;
}

.exp-modal-sub {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 18px;
}

/* RODAPÉ */
.exp-footer {
  background: #0a0b0d;
  border-top: 1px solid var(--border-color);
  padding: 16px 20px;
  font-size: 0.78rem;
  color: var(--text-muted);
  display: flex;
  flex-direction: column;
  gap: 6px;
  text-align: center;
}

@media (min-width: 600px) {
  .exp-footer {
    flex-direction: row;
    justify-content: space-between;
    text-align: left;
  }
}

.exp-footer a {
  color: var(--gold);
  text-decoration: none;
}
