/* ─── Reset & Base ─────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: 'Segoe UI', Arial, sans-serif; background: #f0f4f8; color: #1a1a2e; font-size: 14px; }
a { text-decoration: none; color: inherit; }

/* ─── Navbar ───────────────────────────────────────────────────────── */
.navbar {
  background: #1a73e8; color: white;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 24px; height: 56px;
  box-shadow: 0 2px 8px rgba(0,0,0,.18); position: sticky; top: 0; z-index: 100;
}
.nav-brand { display: flex; align-items: center; gap: 10px; font-size: 16px; font-weight: 600; }
.nav-logo { height: 36px; width: auto; object-fit: contain; }
.nav-links { display: flex; gap: 6px; }
.nav-link {
  padding: 7px 14px; border-radius: 6px; font-size: 13px; font-weight: 500;
  color: rgba(255,255,255,.85); transition: background .15s;
}
.nav-link:hover, .nav-link.active { background: rgba(255,255,255,.18); color: white; }

/* ─── Container ────────────────────────────────────────────────────── */
.container { max-width: 960px; margin: 0 auto; padding: 28px 16px 60px; }

/* ─── Hero (home) ──────────────────────────────────────────────────── */
.hero { text-align: center; padding: 32px 0 24px; }
.hero h1 { font-size: 26px; color: #1a73e8; }
.hero p  { color: #666; margin-top: 6px; }

.cards-home { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 20px 0 36px; }
.card-home {
  background: white; border-radius: 12px; padding: 28px 24px; text-align: center;
  box-shadow: 0 2px 12px rgba(0,0,0,.08); transition: transform .15s, box-shadow .15s;
  cursor: pointer;
}
.card-home:hover { transform: translateY(-3px); box-shadow: 0 6px 20px rgba(0,0,0,.13); }
.card-icon { font-size: 40px; margin-bottom: 12px; }
.card-title { font-size: 17px; font-weight: 600; color: #1a73e8; margin-bottom: 6px; }
.card-desc  { font-size: 13px; color: #666; }

/* ─── Section titles ───────────────────────────────────────────────── */
.recent-section h2 { font-size: 17px; color: #333; margin-bottom: 14px; }

/* ─── Cards (formulario) ───────────────────────────────────────────── */
.card {
  background: white; border-radius: 12px; padding: 22px 24px;
  box-shadow: 0 2px 10px rgba(0,0,0,.07); margin-bottom: 20px;
}
.card-section-title {
  font-size: 14px; font-weight: 700; color: #1a73e8;
  border-bottom: 2px solid #e8f0fe; padding-bottom: 10px; margin-bottom: 18px; letter-spacing: .3px;
}

/* ─── Form ─────────────────────────────────────────────────────────── */
.form-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.form-header h1 { font-size: 22px; color: #1a73e8; }
.numero-badge {
  background: #e8f0fe; color: #1a73e8; padding: 6px 16px; border-radius: 20px;
  font-size: 13px; font-weight: 700; letter-spacing: .5px;
}
.form-row { display: flex; gap: 14px; margin-bottom: 14px; flex-wrap: wrap; }
.form-group { display: flex; flex-direction: column; flex: 1; min-width: 160px; }
.form-group.flex2 { flex: 2; }
.form-group label { font-size: 11.5px; font-weight: 600; color: #555; margin-bottom: 5px; text-transform: uppercase; letter-spacing: .3px; }
.form-group textarea {
  border: 1.5px solid #dde3ed; border-radius: 7px; padding: 9px 12px; font-size: 14px;
  transition: border-color .15s; outline: none; background: #fafbff; color: #1a1a2e;
  resize: vertical; font-family: inherit;
}
.form-group textarea:focus { border-color: #1a73e8; background: white; }

.form-group input,
.form-group select {
  border: 1.5px solid #dde3ed; border-radius: 7px; padding: 9px 12px; font-size: 14px;
  transition: border-color .15s; outline: none; background: #fafbff; color: #1a1a2e;
}
.form-group input:focus,
.form-group select:focus { border-color: #1a73e8; background: white; }

/* Toggle tipo cliente */
.toggle-group { display: flex; gap: 6px; }
.toggle-btn {
  flex: 1; padding: 8px 10px; border: 1.5px solid #dde3ed; border-radius: 7px;
  background: white; cursor: pointer; font-size: 13px; font-weight: 500; color: #555;
  transition: all .15s;
}
.toggle-btn.active { background: #1a73e8; color: white; border-color: #1a73e8; }

/* ─── Equipo Cards ─────────────────────────────────────────────────── */
.equipo-card {
  border: 1.5px solid #e0e8f4; border-radius: 10px; padding: 16px 18px;
  margin-bottom: 14px; background: #fafbff;
}
.equipo-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.equipo-num { font-weight: 700; font-size: 13px; color: #1a73e8; }
.btn-remove {
  background: none; border: none; cursor: pointer; font-size: 16px;
  color: #e53935; padding: 2px 6px; border-radius: 4px; transition: background .12s;
}
.btn-remove:hover { background: #ffeaea; }

/* Parts grid */
.parts-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 10px; }
.part-row { display: flex; align-items: center; gap: 8px; }
.part-row-full { grid-column: 1 / -1; }
.part-label {
  font-size: 11px; font-weight: 700; color: #555; text-transform: uppercase;
  min-width: 110px; letter-spacing: .2px;
}
.part-row input {
  flex: 1; border: 1.5px solid #dde3ed; border-radius: 7px; padding: 7px 10px;
  font-size: 13px; background: white; outline: none; transition: border-color .15s;
}
.part-row input:focus { border-color: #1a73e8; }

/* ─── Buttons ──────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 9px 18px; border-radius: 8px; font-size: 13px; font-weight: 600;
  cursor: pointer; border: none; transition: all .15s; text-decoration: none;
}
.btn-primary { background: #1a73e8; color: white; }
.btn-primary:hover { background: #1558b0; }
.btn-outline { background: white; color: #1a73e8; border: 1.5px solid #1a73e8; }
.btn-outline:hover { background: #e8f0fe; }
.btn-add { background: #e8f0fe; color: #1a73e8; border: 1.5px dashed #1a73e8; width: 100%; justify-content: center; padding: 12px; border-radius: 9px; margin-top: 4px; font-size: 14px; }
.btn-add:hover { background: #d2e3fc; }
.btn-sm { padding: 5px 12px; font-size: 12px; border-radius: 6px; }
.btn-lg { padding: 13px 32px; font-size: 15px; border-radius: 10px; }
.btn:disabled { opacity: .6; cursor: not-allowed; }

.form-actions { text-align: center; padding: 10px 0 20px; }

/* ─── Table ────────────────────────────────────────────────────────── */
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; background: white; border-radius: 10px; overflow: hidden; box-shadow: 0 1px 8px rgba(0,0,0,.07); }
.table thead tr { background: #1a73e8; color: white; }
.table th { padding: 11px 14px; text-align: left; font-size: 12px; font-weight: 600; letter-spacing: .3px; }
.table td { padding: 11px 14px; border-bottom: 1px solid #f0f4f8; font-size: 13px; }
.table tbody tr:hover { background: #f6f9ff; }
.actions { display: flex; gap: 6px; }

.badge { background: #e8f0fe; color: #1a73e8; padding: 3px 10px; border-radius: 12px; font-size: 12px; font-weight: 700; }
.equipo-chip { display: inline-block; background: #f0f4f8; color: #444; padding: 2px 8px; border-radius: 10px; font-size: 11px; margin: 1px 2px; }

/* ─── Search ───────────────────────────────────────────────────────── */
.search-bar { display: flex; gap: 10px; margin-bottom: 24px; }
.search-input {
  flex: 1; border: 1.5px solid #dde3ed; border-radius: 8px; padding: 11px 16px;
  font-size: 14px; outline: none; transition: border-color .15s;
}
.search-input:focus { border-color: #1a73e8; }
.result-count { font-size: 13px; color: #666; margin-bottom: 12px; }
.pagination { display: flex; gap: 6px; justify-content: center; margin-top: 20px; }

/* ─── Modal ────────────────────────────────────────────────────────── */
.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 200; }
.modal {
  position: fixed; top: 50%; left: 50%; transform: translate(-50%,-50%);
  background: white; border-radius: 16px; padding: 36px 32px; z-index: 201;
  min-width: 340px; text-align: center; box-shadow: 0 8px 40px rgba(0,0,0,.22);
}
.modal-icon { font-size: 52px; margin-bottom: 12px; }
.modal h2 { font-size: 22px; color: #1a73e8; margin-bottom: 8px; }
.modal-numero { font-size: 13px; color: #666; margin-bottom: 22px; }
.modal-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }

/* ─── Misc ─────────────────────────────────────────────────────────── */
.hidden { display: none !important; }
.loading { color: #999; padding: 20px; text-align: center; }
.empty { color: #999; padding: 24px; text-align: center; }
.empty a { color: #1a73e8; font-weight: 600; }

@media (max-width: 600px) {
  .cards-home { grid-template-columns: 1fr; }
  .parts-grid  { grid-template-columns: 1fr; }
  .form-row    { flex-direction: column; }
  .modal       { min-width: unset; width: 90vw; }
}
