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

body {
  font-family: system-ui, -apple-system, sans-serif;
  background: #0a0a0a;
  background-image:
    repeating-linear-gradient(0deg, transparent, transparent 2px, rgba(255,255,255,0.015) 2px, rgba(255,255,255,0.015) 4px),
    repeating-linear-gradient(90deg, transparent, transparent 2px, rgba(255,255,255,0.015) 2px, rgba(255,255,255,0.015) 4px);
  color: #fff;
  min-height: 100vh
}

.app {
  min-height: 100vh;
  padding-bottom: 80px
}

.toast {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: #10b981;
  padding: 12px 24px;
  border-radius: 10px;
  z-index: 999;
  animation: fadeIn .2s;
  font-weight: 600
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateX(-50%) translateY(-10px) }
  to { opacity: 1; transform: translateX(-50%) translateY(0) }
}

/* NAVBAR */
nav {
  background: linear-gradient(180deg, #151515 0%, #0d0d0d 100%);
  border-bottom: 1px solid #252525;
  padding: 12px 0;
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(10px)
}

.nav-content {
  width: 100%;
  max-width: 1600px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  justify-content: space-between;
  align-items: center
}

.logo {
  font-weight: bold;
  color: #ef4444;
  cursor: pointer;
  font-size: 1.2rem
}

.nav-items {
  display: flex;
  gap: 8px;
  flex-wrap: wrap
}

.nav-item {
  background: rgba(255,255,255,0.05);
  border: 1px solid #333;
  color: #fff;
  padding: 10px 14px;
  border-radius: 8px;
  cursor: pointer;
  position: relative;
  font-size: 0.95rem;
  transition: all .2s;
  display: flex;
  align-items: center;
  gap: 4px
}

.nav-item:hover {
  background: rgba(255,255,255,0.1)
}

.nav-item.active {
  background: #ef4444;
  border-color: #ef4444
}

.nav-item:active {
  transform: scale(.95)
}

.badge {
  background: #ef4444;
  color: #fff;
  font-size: 0.65rem;
  padding: 2px 6px;
  border-radius: 10px;
  margin-left: 2px;
  font-weight: 600
}

.badge-dot {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 8px;
  height: 8px;
  background: #ef4444;
  border-radius: 50%;
  box-shadow: 0 0 8px #ef4444
}

/* MAIN CONTAINER */
main.container {
  width: 100%;
  max-width: 1600px;
  margin: 0 auto;
  padding: 24px
}

.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  gap: 16px;
  flex-wrap: wrap
}

.header h1 {
  font-size: 1.8rem;
  font-weight: 700
}

.header p {
  color: #666;
  font-size: 0.95rem
}

.subtitle {
  color: #666;
  font-size: 0.9rem;
  margin-bottom: 16px
}

/* BUTTONS */
.btn-primary {
  background: linear-gradient(135deg, #ef4444, #dc2626);
  color: #fff;
  border: none;
  padding: 12px 24px;
  border-radius: 10px;
  cursor: pointer;
  font-weight: 600;
  transition: all .2s;
  white-space: nowrap
}

.btn-primary:hover {
  box-shadow: 0 4px 15px rgba(239,68,68,0.4);
  transform: translateY(-1px)
}

.btn-secondary {
  background: rgba(255,255,255,0.1);
  color: #fff;
  border: 1px solid #333;
  padding: 12px 20px;
  border-radius: 10px;
  cursor: pointer;
  transition: all .2s
}

.btn-secondary:hover {
  background: rgba(255,255,255,0.15)
}

.btn-danger {
  background: linear-gradient(135deg, #dc2626, #b91c1c);
  color: #fff;
  border: none;
  padding: 12px 20px;
  border-radius: 10px;
  cursor:pointer
}

.btn-pdf {
  background: linear-gradient(135deg, #8b5cf6, #7c3aed);
  color: #fff;
  border: none;
  padding: 12px 20px;
  border-radius: 10px;
  cursor: pointer
}

.btn-whatsapp {
  background: linear-gradient(135deg, #25d366, #128c7e);
  color: #fff;
  border: none;
  padding: 12px 20px;
  border-radius: 10px;
  cursor: pointer
}

.btn-whatsapp:disabled {
  background: #333;
  opacity: 0.6;
  cursor: not-allowed
}

.btn-voltar {
  background: rgba(255,255,255,0.05);
  border: 1px solid #333;
  color: #fff;
  padding: 10px 18px;
  border-radius: 8px;
  margin-bottom: 20px;
  cursor: pointer;
  font-size: 0.9rem
}

button:active {
  transform: scale(.97)
}

.btn-full {
  width: 100%
}

/* STATS CARDS */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
  margin-bottom: 24px
}

.stat-card {
  background: linear-gradient(145deg, #1a1a1a, #0f0f0f);
  border: 1px solid #252525;
  border-radius: 14px;
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 16px
}

.stat-icon {
  font-size: 2rem;
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,0.05);
  border-radius: 12px
}

.stat-card > div {
  flex: 1
}

.stat-card p {
  color: #666;
  font-size: 0.85rem;
  margin: 0
}

.stat-card h2 {
  font-size: 2rem;
  margin: 4px 0 0
}

/* ALERT */
.alert-pendentes {
  background: linear-gradient(135deg, #ef4444, #f97316);
  padding: 16px 20px;
  border-radius: 12px;
  margin-bottom: 20px;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(239,68,68,0.3);
  font-weight: 600
}

/* FILTERS */
.filters {
  display: flex;
  gap: 12px;
  margin-bottom: 20px
}

.search {
  flex: 1;
  padding: 14px 18px;
  background: rgba(255,255,255,0.05);
  border: 1px solid #333;
  border-radius: 10px;
  color: #fff;
  font-size: 1rem
}

.select {
  padding: 14px 18px;
  background: rgba(255,255,255,0.05);
  border: 1px solid #333;
  border-radius: 10px;
  color: #fff;
  font-size: 1rem;
  cursor: pointer;
  min-width: 150px
}

.search:focus,
.select:focus {
  border-color: #ef4444;
  outline: none;
  background: rgba(239,68,68,0.05)
}

/* ORDERS GRID */
.orders-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 280px));
  gap: 16px
}

.order-card {
  
  background: linear-gradient(145deg, #1a1a1a, #0f0f0f);
  border: 1px solid #252525;
  border-radius: 14px;
  padding: 12px;
  cursor: pointer;
  transition: all .2s
}

.order-card:hover {
  border-color: #333;
  transform: translateY(-2px);
  box-shadow: 0 4px 20px rgba(0,0,0,0.3)
}

.order-card:active {
  transform: scale(.98)
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px
}

.os-number {
  color: #ef4444;
  font-weight: bold;
  font-size: 0.9rem
}

.os-antiga {
  color: #666;
  font-weight: normal;
  font-size: 0.8rem
}

.status-badge {
  padding: 5px 12px;
  border-radius: 15px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.3px
}

.order-card h3 {
  margin-bottom: 10px;
  font-size: 1.1rem
}

.card-equip {
  margin-bottom: 8px
}

.equip-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 0.85rem;
  border: 1px solid
}

.equip-sigla {
  padding: 2px 6px;
  background: rgba(0,0,0,0.3);
  border-radius: 4px;
  font-weight: 600;
  font-size: 0.75rem
}

.equip-nome {
  font-weight: 500
}

.serie {
  color: #666;
  font-size: 0.85rem;
  margin: 6px 0
}

.desc {
  color: #888;
  font-size: 0.85rem;
  margin: 6px 0
}

.valor {
  color: #10b981;
  font-weight: 600;
  font-size: 0.95rem;
  margin-top: 8px
}

/* PENDENTES CARDS */
.pendente-card.critico {
  border-color: #ef4444;
  border-width: 2px;
  box-shadow: 0 0 15px rgba(239,68,68,0.2)
}

.pendente-card.urgente {
  border-color: #f97316;
  border-width: 2px;
  box-shadow: 0 0 15px rgba(249,115,22,0.2)
}

.pendente-card.atencao {
  border-color: #fbbf24;
  border-width: 2px;
  box-shadow: 0 0 15px rgba(251,191,36,0.2)
}

.pendente-card.aviso {
  border-color: #10b981;
  border-width: 2px;
  box-shadow: 0 0 15px rgba(16,185,129,0.2)
}

.dias-badge {
  background: rgba(255,255,255,0.1);
  padding: 5px 10px;
  border-radius: 15px;
  font-size: 0.85rem;
  font-weight: 600
}

.empty {
  text-align: center;
  padding: 60px 20px;
  color: #444;
  font-size: 1.1rem;
  grid-column: 1 / -1
}

.empty-pendentes {
  text-align: center;
  padding: 80px 20px
}

.empty-pendentes h2 {
  font-size: 4rem;
  margin-bottom: 10px
}

.empty-pendentes p {
  color: #666;
  font-size: 1.1rem
}

/* OS DETAIL */
.os-detail {
  background: linear-gradient(145deg, #1a1a1a, #0f0f0f);
  border: 1px solid #252525;
  border-radius: 16px;
  padding: 24px
}

.os-detail-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid #252525;
  flex-wrap: wrap;
  gap: 16px
}

.os-detail-header h1 {
  font-size: 1.5rem;
  font-weight: 700
}

.os-antiga-detail {
  color: #666;
  font-weight: normal;
  font-size: 0.9rem
}

.os-date {
  color: #666;
  font-size: 0.9rem;
  margin-top: 4px
}

.status-badge-lg {
  padding: 10px 20px;
  border-radius: 20px;
  font-size: 0.9rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.3px
}

.os-detail-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  margin-bottom: 24px
}

.os-detail-section {
  background: rgba(0,0,0,0.3);
  padding: 18px;
  border-radius: 12px;
  border: 1px solid #1a1a1a
}

.os-detail-section.full {
  grid-column: 1 / -1
}

.os-detail-section h3 {
  color: #666;
  font-size: 0.8rem;
  margin-bottom: 10px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 600
}

.detail-value {
  font-size: 1.1rem;
  font-weight: 600
}

.detail-phone {
  color: #3b82f6;
  margin-top: 6px;
  font-size: 0.95rem
}

.detail-equip {
  margin-bottom: 8px
}

.detail-serie {
  color: #3b82f6;
  margin-top: 8px;
  font-size: 0.9rem
}

.detail-text {
  color: #aaa;
  line-height: 1.6;
  font-size: 0.95rem
}

.price {
  color: #10b981;
  font-size: 1.3rem;
  font-weight: 700
}

.os-detail-actions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px
}

/* PENDENTES SECTION */
.pendentes-section {
  margin-bottom: 32px
}

.pendentes-section h2 {
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid #252525;
  font-size: 1.1rem;
  font-weight: 600
}

.pendentes-section.critico h2 {
  color: #ef4444
}

.pendentes-section.urgente h2 {
  color: #f97316
}

.pendentes-section.atencao h2 {
  color: #fbbf24
}

.pendentes-section.aviso h2 {
  color: #10b981
}

/* FORM */
.form-container {
  max-width: 800px
}

.form-section {
  background: linear-gradient(145deg, #1a1a1a, #0f0f0f);
  border: 1px solid #252525;
  border-radius: 14px;
  padding: 20px;
  margin-bottom: 16px
}

.form-section h2 {
  color: #ef4444;
  font-size: 1rem;
  margin-bottom: 16px;
  font-weight: 600
}

.form-section input,
.form-section select,
.form-section textarea {
  width: 100%;
  padding: 14px;
  background: rgba(0,0,0,0.3);
  border: 1px solid #333;
  border-radius: 10px;
  color: #fff;
  font-size: 1rem;
  margin-bottom: 12px;
  transition: all .2s;
  font-family: inherit
}

.form-section input:last-child,
.form-section select:last-child,
.form-section textarea:last-child {
  margin-bottom: 0
}

.form-section input:focus,
.form-section select:focus,
.form-section textarea:focus {
  border-color: #ef4444;
  outline: none;
  background: rgba(239,68,68,0.05)
}

.form-section textarea {
  min-height: 100px;
  resize: vertical
}

.form-section label {
  display: block;
  color: #666;
  font-size: 0.85rem;
  margin: 12px 0 8px;
  font-weight: 500
}

.form-group {
  margin-bottom: 16px
}

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

.form-actions.three-buttons {
  grid-template-columns: auto 1fr 1fr
}

/* EQUIPAMENTO SELECTOR */
.equipamento-selector label {
  display: block;
  color: #666;
  font-size: 0.85rem;
  margin-bottom: 8px;
  font-weight: 500
}

.tipo-buttons {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-bottom: 16px
}

.tipo-buttons button {
  padding: 12px;
  background: rgba(0,0,0,0.3);
  border: 1px solid #333;
  border-radius: 10px;
  color: #fff;
  cursor: pointer;
  font-size: 0.9rem;
  transition: all .2s;
  font-weight: 500
}

.tipo-buttons button:hover {
  border-color: #444
}

.tipo-buttons button.active {
  border-color: #ef4444;
  background: rgba(239,68,68,.15);
  color: #ef4444
}

.equip-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 10px;
  margin-bottom: 16px
}

.equip-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 12px 8px;
  background: rgba(0,0,0,0.3);
  border: 1px solid #333;
  border-radius: 10px;
  cursor: pointer;
  color: #888;
  font-size: 0.75rem;
  transition: all .2s
}

.equip-btn:hover {
  border-color: #444;
  background: rgba(255,255,255,0.03)
}

.equip-btn.active {
  border-color: var(--equip-color);
  background: var(--equip-bg)
}

.equip-btn-sigla {
  font-size: 1.1rem;
  font-weight: 700
}

.equip-btn-nome {
  text-align: center;
  line-height: 1.2
}

.equip-preview {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  background: rgba(0,0,0,0.3);
  border-radius: 10px;
  margin-top: 12px;
  border: 1px solid #252525
}

.preview-label {
  color: #666;
  font-size: 0.85rem
}

.input-outro {
  width: 100%;
  padding: 12px;
  background: rgba(0,0,0,0.3);
  border: 1px solid #333;
  border-radius: 10px;
  color: #fff;
  font-size: 0.95rem;
  font-family: inherit
}

.input-outro:focus {
  border-color: #ef4444;
  outline: none;
  background: rgba(239,68,68,0.05)
}

/* NUMERO SERIE INPUT */
.numero-serie-container {
  margin-top: 8px
}

.numero-serie-input {
  display: flex;
  gap: 8px
}

.numero-serie-input input {
  flex: 1;
  padding: 12px;
  background: rgba(0,0,0,0.3);
  border: 1px solid #333;
  border-radius: 10px;
  color: #fff;
  text-transform: uppercase;
  font-size: 0.95rem;
  font-family: inherit
}

.numero-serie-input input:focus {
  border-color: #3b82f6;
  outline: none;
  background: rgba(59,130,246,0.05)
}

.btn-camera {
  background: linear-gradient(135deg, #3b82f6, #2563eb);
  color: #fff;
  border: none;
  padding: 12px 16px;
  border-radius: 10px;
  font-size: 1.2rem;
  cursor: pointer;
  white-space: nowrap
}

.hint {
  color: #555;
  font-size: 0.8rem;
  margin-top: 6px
}

/* IMPORT */
.import-container {
  max-width: 700px
}

.import-section {
  background: linear-gradient(145deg, #1a1a1a, #0f0f0f);
  border: 1px solid #252525;
  border-radius: 14px;
  padding: 20px;
  margin-bottom: 16px
}

.import-section h2 {
  color: #ef4444;
  font-size: 1rem;
  margin-bottom: 16px
}

.file-input-wrapper {
  position: relative;
  margin-bottom: 16px
}

.file-input-wrapper input {
  position: absolute;
  opacity: 0;
  width: 100%;
  height: 100%;
  cursor: pointer
}

.file-label {
  display: block;
  padding: 40px;
  background: rgba(0,0,0,0.3);
  border: 2px dashed #333;
  border-radius: 10px;
  text-align: center;
  cursor: pointer;
  transition: all .2s;
  color: #888
}

.file-input-wrapper:hover .file-label {
  border-color: #444;
  background: rgba(255,255,255,0.02)
}

.preview-table-wrapper {
  overflow-x: auto;
  margin: 16px 0
}

.preview-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem
}

.preview-table th,
.preview-table td {
  padding: 12px;
  text-align: left;
  border-bottom: 1px solid #252525
}

.preview-table th {
  background: rgba(0,0,0,0.3);
  color: #ef4444;
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.5px
}

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

/* MODALS */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,.9);
  backdrop-filter: blur(5px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
  padding: 20px
}

.modal-content {
  background: linear-gradient(145deg, #1a1a1a, #0f0f0f);
  border: 1px solid #333;
  border-radius: 18px;
  padding: 28px;
  width: 100%;
  max-width: 420px;
  text-align: center;
  animation: modalIn .2s
}

.confirm-modal {
  max-width: 400px
}

@keyframes modalIn {
  from { opacity: 0; transform: scale(.9) }
  to { opacity: 1; transform: scale(1) }
}

.confirm-icon {
  font-size: 3rem;
  margin-bottom: 16px
}

.modal-content h3 {
  margin-bottom: 10px;
  font-size: 1.2rem
}

.modal-content > p {
  color: #888;
  margin-bottom: 24px;
  line-height: 1.5
}

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

.export-options {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 12px;
  margin-bottom: 20px
}

.export-btn {
  padding: 20px;
  background: rgba(0,0,0,0.3);
  border: 1px solid #333;
  border-radius: 10px;
  color: #fff;
  cursor: pointer;
  transition: all .2s;
  font-size: 0.9rem
}

.export-btn:hover {
  border-color: #ef4444;
  background: rgba(239,68,68,0.1)
}

/* CAMERA MODAL */
.camera-modal {
  background: #0a0a0a;
  border: 1px solid #333;
  border-radius: 18px;
  overflow: hidden;
  width: 100%;
  max-width: 500px
}

.camera-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 18px;
  background: linear-gradient(145deg, #1a1a1a, #0f0f0f)
}

.camera-header h3 {
  font-size: 1rem
}

.close-btn {
  background: none;
  border: none;
  color: #fff;
  font-size: 1.4rem;
  cursor: pointer;
  padding: 4px 8px
}

.camera-view {
  position: relative;
  background: #000
}

.camera-view video {
  width: 100%;
  display: block
}

.scan-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px
}

.scan-frame {
  width: 85%;
  max-width: 320px;
  height: 140px;
  border: 3px solid #ef4444;
  border-radius: 12px;
  background: rgba(239,68,68,.1);
  box-shadow: 0 0 40px rgba(239,68,68,0.3);
  margin-bottom: 16px
}

.scan-overlay p {
  color: #fff;
  font-size: 0.9rem;
  text-align: center;
  background: rgba(0,0,0,0.6);
  padding: 8px 16px;
  border-radius: 8px
}

.camera-error {
  padding: 50px 20px;
  text-align: center;
  color: #ef4444;
  font-size: 1rem
}

.camera-actions {
  padding: 16px;
  background: rgba(0,0,0,0.3);
  text-align: center
}

.btn-capture {
  display: inline-block;
  background: linear-gradient(135deg, #ef4444, #dc2626);
  color: #fff;
  border: none;
  padding: 14px 32px;
  border-radius: 25px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(239,68,68,0.4)
}

.btn-capture:disabled {
  background: #333;
  box-shadow: none;
  cursor: not-allowed
}

/* NOTIFICATIONS */
.notif-dropdown {
  position: fixed;
  top: 60px;
  right: 16px;
  left: 16px;
  max-width: 400px;
  margin-left: auto;
  background: linear-gradient(145deg, #1a1a1a, #0f0f0f);
  border: 1px solid #333;
  border-radius: 14px;
  z-index: 150;
  max-height: 75vh;
  overflow-y: auto;
  box-shadow: 0 10px 40px rgba(0,0,0,.7)
}

.notif-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 16px;
  border-bottom: 1px solid #252525
}

.notif-header h3 {
  font-size: 1rem
}

.notif-empty {
  padding: 40px 20px;
  text-align: center;
  color: #666
}

.notif-list {
  padding: 10px
}

.notif-group {
  padding: 10px
}

.notif-group h4 {
  font-size: 0.85rem;
  margin-bottom: 8px;
  font-weight: 600
}

.notif-group.critico h4 {
  color: #ef4444
}

.notif-group.urgente h4 {
  color: #f97316
}

.notif-group.atencao h4 {
  color: #fbbf24
}

.notif-group.aviso h4 {
  color: #10b981
}

.notif-item {
  background: rgba(0,0,0,0.3);
  padding: 10px 12px;
  border-radius: 8px;
  margin-bottom: 6px;
  cursor: pointer;
  font-size: 0.85rem;
  display: flex;
  justify-content: space-between;
  border: 1px solid #1a1a1a;
  transition: all .2s;
  gap: 8px
}

.notif-item:hover {
  border-color: #333;
  background: rgba(255,255,255,0.03)
}

.notif-item:active {
  background: rgba(255,255,255,0.05)
}

/* RELATORIOS */
.relatorios-container {
  display: flex;
  flex-direction: column;
  gap: 20px
}

.chart-card {
  background: #222;
  padding: 24px;
  border-radius: 14px;
  border: 1px solid #333
}

.chart-card h3 {
  margin-bottom: 16px;
  font-size: 1rem;
  font-weight: 600
}

.stats-cards .stat-card {
  background: inherit;
  border: none;
  padding: 20px
}

/* RESPONSIVE */
@media (min-width: 768px) {
  .orders-grid {
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr))
  }

  .os-detail-grid {
    grid-template-columns: repeat(2, 1fr)
  }

  .tipo-buttons {
    grid-template-columns: repeat(4, 1fr)
  }

  .equip-grid {
    grid-template-columns: repeat(auto-fill, minmax(110px, 1fr))
  }
}

@media (min-width: 1024px) {
  .orders-grid {
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr))
  }

  main.container {
    padding: 32px
  }

  .stats-grid {
    grid-template-columns: repeat(5, 1fr)
  }
}

@media (min-width: 1280px) {
  main.container {
    padding: 40px
  }

  .orders-grid {
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr))
  }
}

/* Footer */
.footer {
  text-align: center;
  padding: 20px;
  color: #666;
  font-size: 0.85rem;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(0deg, #0a0a0a 0%, transparent 100%);
}

/* Mobile - telas pequenas */
@media (max-width: 767px) {
  .nav-content {
    padding: 0 12px;
    flex-direction: column;
    gap: 10px;
  }
  
  .nav-items {
    width: 100%;
    justify-content: center;
    gap: 6px;
  }
  
  .nav-item {
    padding: 8px 10px;
    font-size: 0.85rem;
  }
  
  .logo {
    font-size: 1rem;
  }
  
  main.container {
    padding: 12px;
  }
  
  .stats-cards {
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 8px !important;
  }
  
  .stat-card {
    padding: 10px;
    flex-direction: column;
    text-align: center;
    gap: 8px;
  }
  
  .stat-icon {
    font-size: 1.5rem;
    width: 40px;
    height: 40px;
  }
  
  .stat-card h2 {
    font-size: 1.5rem;
  }
  
  .stat-card p {
    font-size: 0.7rem;
  }
  
  .filters {
    flex-direction: column;
    gap: 10px;
  }
  
  .filters .search {
    width: 100%;
  }
  
  .filters .select {
    width: 100%;
  }
  
  .orders-grid {
    grid-template-columns: 1fr !important;
  }
  
  .footer {
    padding: 15px;
    font-size: 0.75rem;
  }
  
  .header h1 {
    font-size: 1.3rem;
  }
  
  .form-section {
    padding: 16px !important;
  }
}

/* Telas muito pequenas */
@media (max-width: 480px) {
  .stats-cards {
    grid-template-columns: repeat(2, 1fr) !important;
  }
  
  .nav-items {
    flex-wrap: wrap;
  }
  
  .nav-item {
    padding: 6px 8px;
    font-size: 0.8rem;
  }
}

/* Fix Mobile Layout */
@media (max-width: 767px) {
  .app {
    padding-bottom: 60px;
  }
  
  .footer {
    position: relative;
    background: transparent;
    margin-top: 20px;
  }
  
  .stats-cards {
    display: grid !important;
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 6px !important;
    margin-bottom: 16px !important;
  }
  
  .stat-card {
    padding: 8px 4px !important;
    flex-direction: column !important;
    text-align: center !important;
    gap: 4px !important;
    min-height: auto !important;
  }
  
  .stat-icon {
    font-size: 1.2rem !important;
    width: 32px !important;
    height: 32px !important;
  }
  
  .stat-card h2 {
    font-size: 1.2rem !important;
    margin: 0 !important;
  }
  
  .stat-card p {
    font-size: 0.6rem !important;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  
  .stat-card > div {
    width: 100%;
  }
  
  .filters {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 16px;
  }
  
  .filters .search,
  .filters .select,
  .filters .btn-primary {
    width: 100% !important;
  }
}

@media (max-width: 400px) {
  .stats-cards {
    grid-template-columns: repeat(3, 1fr) !important;
  }
}

/* Card OS Melhorado */
.card-serie {
  font-size: 0.8rem;
  color: #888;
  margin: 4px 0;
}

.card-defeito {
  font-size: 0.85rem;
  color: #aaa;
  margin: 6px 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid #333;
}

.card-valor {
  font-size: 1.1rem;
  font-weight: bold;
  color: #10b981;
}

/* Mobile card compacto */
@media (max-width: 767px) {
  .order-card {
  
    padding: 12px;
  }
  
  .order-card h3 {
    font-size: 1rem;
    margin-bottom: 6px;
  }
  
  .card-header {
    margin-bottom: 8px;
  }
  
  .card-equip {
    margin-bottom: 4px;
  }
  
  .card-serie {
    display: none;
  }
  
  .card-defeito {
    font-size: 0.8rem;
    margin: 4px 0;
    -webkit-line-clamp: 1;
  }
  
  .card-footer {
    margin-top: 8px;
    padding-top: 8px;
  }
  
  .card-valor {
    font-size: 1rem;
  }
}

/* Mensagem fixa no topo */
.message {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: #222;
  color: #fff;
  padding: 16px 32px;
  border-radius: 8px;
  z-index: 9999;
  box-shadow: 0 4px 20px rgba(0,0,0,0.5);
  font-size: 16px;
  animation: slideDown 0.3s ease;
}

@keyframes slideDown {
  from { top: -50px; opacity: 0; }
  to { top: 20px; opacity: 1; }
}


/* Modal de Confirmação */
.modal {
  background: linear-gradient(145deg, #1a1a1a, #0f0f0f);
  border: 1px solid #333;
  border-radius: 18px;
  padding: 28px;
  width: 100%;
  max-width: 420px;
  animation: modalIn .2s;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.modal-header h3 {
  margin: 0;
  font-size: 1.3rem;
}

.modal-close {
  background: transparent;
  border: none;
  color: #888;
  font-size: 24px;
  cursor: pointer;
  padding: 0;
  line-height: 1;
}

.modal-close:hover {
  color: #fff;
}

.modal-body p {
  color: #aaa;
  margin-bottom: 24px;
  line-height: 1.5;
}

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

.modal-actions button {
  padding: 12px 20px;
  border-radius: 8px;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s;
}

/* Cards Compactos */
.order-card {
  padding: 10px !important;
}

.order-card h3 {
  font-size: 0.95rem !important;
  margin-bottom: 6px !important;
}

.card-header {
  margin-bottom: 8px !important;
}

.card-equip {
  margin-bottom: 4px !important;
}

.card-serie, .card-defeito {
  font-size: 0.75rem !important;
  margin-bottom: 2px !important;
}

.card-valor {
  font-size: 0.9rem !important;
}

.status-badge {
  padding: 3px 8px !important;
  font-size: 0.65rem !important;
}

.equip-badge {
  padding: 4px 8px !important;
  font-size: 0.75rem !important;
}
/* Estilos globais básicos - sem conflitos */
