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

:root {
  --primary: #E61C24;
  --primary-dark: #B91C1C;
  --bg-dark: #0A0A0A;
  --bg-card: #141414;
  --text: #f0f0f0;
  --text-muted: #a0a0a0;
  --font-main: 'Outfit', 'Segoe UI', system-ui, sans-serif;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-main);
  background: var(--bg-dark);
  color: var(--text);
  line-height: 1.6;
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: 0.3s;
}

a:hover {
  color: #ff8533;
}

/* === PREMIUM SPLIT SCREEN LOGIN === */
.login-split-wrapper {
  min-height: 100vh;
  display: flex;
  background: #0D0D0D;
  overflow: hidden;
  font-family: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
}

@media (max-width: 850px) {
  .login-split-wrapper {
    flex-direction: column;
  }
}

/* Lado Izquierdo */
.login-brand-panel {
  flex: 1.2;
  position: relative;
  background: radial-gradient(circle at 30% 30%, rgba(208, 16, 42, 0.25) 0%, rgba(13, 13, 13, 0.98) 70%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3rem;
  min-height: 350px;
}

.login-brand-overlay {
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
  background: linear-gradient(135deg, rgba(13, 13, 13, 0.85) 0%, rgba(208, 16, 42, 0.15) 100%);
}

.login-brand-content {
  position: relative;
  z-index: 2;
  color: #FFF;
  max-width: 480px;
  text-align: center;
}

.login-brand-logo {
  max-height: 110px;
  width: auto;
  margin-bottom: 1.5rem;
  filter: drop-shadow(0 0 20px rgba(208, 16, 42, 0.6));
}

.login-brand-title {
  font-size: 2rem;
  font-weight: 900;
  letter-spacing: 1px;
  color: #FFF;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
}

.login-brand-tagline {
  color: var(--primary);
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 2px;
  margin-bottom: 2.5rem;
}

.login-security-badge {
  display: inline-flex;
  align-items: center;
  gap: 1rem;
  background: rgba(0, 0, 0, 0.65);
  border: 1px solid rgba(208, 16, 42, 0.5);
  padding: 1rem 1.5rem;
  border-radius: 14px;
  backdrop-filter: blur(10px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.login-security-badge .badge-icon {
  font-size: 1.8rem;
}

.login-security-badge .badge-text {
  text-align: left;
  display: flex;
  flex-direction: column;
}

.login-security-badge .badge-text strong {
  color: #FFF;
  font-size: 0.85rem;
  letter-spacing: 0.5px;
}

.login-security-badge .badge-text span {
  color: var(--text-muted);
  font-size: 0.75rem;
}

/* Lado Derecho */
.login-form-panel {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2.5rem;
  background: radial-gradient(circle at center, rgba(30, 30, 30, 0.5) 0%, #0D0D0D 100%);
}

.login-glass-card {
  width: 100%;
  max-width: 440px;
  background: rgba(22, 22, 22, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(208, 16, 42, 0.35);
  border-radius: 22px;
  padding: 3rem 2.5rem;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.8), 0 0 30px rgba(208, 16, 42, 0.15);
  transition: all 0.3s ease;
}

.login-glass-card:hover {
  border-color: rgba(208, 16, 42, 0.6);
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.9), 0 0 40px rgba(208, 16, 42, 0.25);
}

.login-header {
  text-align: center;
  margin-bottom: 2rem;
}

.login-header h2 {
  font-size: 1.5rem;
  font-weight: 800;
  color: #FFF;
  letter-spacing: 0.5px;
  margin-bottom: 0.3rem;
}

.login-header p {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}

.input-group {
  position: relative;
  display: flex;
  align-items: center;
}

.input-icon {
  position: absolute;
  left: 1rem;
  font-size: 1.1rem;
  pointer-events: none;
  z-index: 2;
}

.input-group input {
  width: 100%;
  padding: 1rem 2.5rem 1rem 3rem;
  background: rgba(13, 13, 13, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  color: #FFF;
  font-size: 0.95rem;
  font-family: inherit;
  transition: all 0.25s ease;
}

.input-group input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 15px rgba(208, 16, 42, 0.35);
  background: rgba(18, 18, 18, 0.95);
}

.toggle-password-btn {
  position: absolute;
  right: 0.8rem;
  background: none;
  border: none;
  color: #AAA;
  font-size: 1.1rem;
  cursor: pointer;
  padding: 0.4rem;
  transition: color 0.2s;
}

.toggle-password-btn:hover {
  color: #FFF;
}

.btn-login-submit {
  width: 100%;
  padding: 1.1rem;
  background: linear-gradient(135deg, #D0102A 0%, #900B1D 100%);
  border: 1px solid var(--primary-hover);
  border-radius: 12px;
  color: #FFF;
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: 1px;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 8px 25px rgba(208, 16, 42, 0.4);
  margin-top: 0.5rem;
}

.btn-login-submit:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 35px rgba(208, 16, 42, 0.6);
  background: linear-gradient(135deg, #e61935 0%, #b80d24 100%);
}

.login-error {
  margin-top: 1.2rem;
  text-align: center;
  color: #ef4444;
  font-weight: 600;
  font-size: 0.9rem;
  min-height: 1.2rem;
}

.login-footer-info {
  margin-top: 2rem;
  text-align: center;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 1.5rem;
}

.login-footer-info p {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 0.8rem;
}

.back-to-home-link {
  color: var(--primary);
  font-weight: 600;
  font-size: 0.9rem;
  text-decoration: none;
  transition: var(--transition);
  display: inline-block;
}

.back-to-home-link:hover {
  color: var(--primary-hover);
  transform: translateX(-4px);
}

/* === HEADER === */
header {
  position: fixed;
  top: 0;
  width: 100%;
  background: rgba(13, 13, 13, 0.95);
  backdrop-filter: blur(10px);
  z-index: 1000;
  border-bottom: 1px solid #222;
}

nav {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.logo img {
  height: 50px;
  width: auto;
}

.logo-text {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--primary);
  letter-spacing: 2px;
  text-transform: uppercase;
}

.user-info {
  color: var(--text-muted);
  font-size: 0.85rem;
}

.nav-links {
  display: flex;
  gap: 2rem;
  list-style: none;
}

.nav-links a {
  color: var(--text);
  font-weight: 500;
  padding: 0.5rem 0;
  position: relative;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--primary);
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--primary);
  transition: 0.3s;
}

.nav-links a:hover::after,
.nav-links a.active::after {
  width: 100%;
}

.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 5px;
}

.menu-toggle span {
  width: 25px;
  height: 3px;
  background: var(--primary);
  transition: 0.3s;
}

/* === MAIN CONTENT === */
.section-system {
  padding: 8rem 2rem 4rem;
  max-width: 1200px;
  margin: 0 auto;
  min-height: 100vh;
}

.system-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.system-header h1 {
  font-size: 2rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 2px;
}

/* === BUTTONS === */
.btn {
  display: inline-block;
  padding: 0.875rem 2rem;
  background: var(--primary);
  color: #ffffff;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
  border: none;
  cursor: pointer;
  transition: 0.3s;
  font-size: 0.9rem;
  border-radius: 4px;
}

.btn:hover {
  background: #e61935;
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(208, 16, 42, 0.4);
  color: #ffffff;
}

.btn-secondary {
  background: transparent;
  border: 2px solid var(--primary);
  color: var(--primary);
}

.btn-secondary:hover {
  background: var(--primary);
  color: #ffffff;
}

.btn-small {
  padding: 0.5rem 1rem;
  font-size: 0.8rem;
}

/* === BUSCADOR === */
.buscar-container {
  margin-bottom: 2rem;
}

.buscar-container input {
  width: 100%;
  padding: 1rem 1.5rem;
  background: rgba(22, 22, 22, 0.85);
  border: 1px solid rgba(208, 16, 42, 0.3);
  border-radius: 14px;
  color: var(--text);
  font-size: 1.1rem;
  transition: 0.3s;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.buscar-container input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 20px rgba(208, 16, 42, 0.35);
}

/* === MOTOS GRID & FICHAS REDONDEADAS === */
.motos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.8rem;
}

.moto-card {
  background: rgba(24, 24, 24, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(208, 16, 42, 0.25);
  border-radius: 20px;
  padding: 1.6rem;
  transition: all 0.35s cubic-bezier(0.165, 0.84, 0.44, 1);
  cursor: pointer;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  position: relative;
  overflow: hidden;
}

.moto-card:hover {
  border-color: rgba(208, 16, 42, 0.6);
  transform: translateY(-6px) scale(1.015);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.7), 0 0 25px rgba(208, 16, 42, 0.25);
}

.moto-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.moto-placa {
  font-size: 1.25rem;
  font-weight: 900;
  color: #FFF;
  background: linear-gradient(135deg, rgba(208, 16, 42, 0.3) 0%, rgba(13, 13, 13, 0.8) 100%);
  border: 1px solid rgba(208, 16, 42, 0.5);
  padding: 0.35rem 0.85rem;
  border-radius: 10px;
  letter-spacing: 1.5px;
  box-shadow: 0 4px 12px rgba(208, 16, 42, 0.2);
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.moto-marca {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
}

.moto-card-body p {
  font-size: 0.92rem;
  color: var(--text-muted);
  margin-bottom: 0.6rem;
}

.moto-card-footer {
  margin-top: 1.2rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

/* === EMPTY STATE === */
.empty-state {
  text-align: center;
  padding: 4rem 2rem;
  color: var(--text-muted);
}

.empty-state p {
  margin-bottom: 0.5rem;
}

/* === STATS === */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
  margin-bottom: 3rem;
}

.stat-card {
  background: rgba(22, 22, 22, 0.85);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(208, 16, 42, 0.25);
  border-radius: 18px;
  padding: 2rem;
  text-align: center;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
  transition: all 0.3s ease;
}

.stat-card:hover {
  transform: translateY(-4px);
  border-color: rgba(208, 16, 42, 0.5);
  box-shadow: 0 15px 35px rgba(208, 16, 42, 0.2);
}

.stat-icon {
  font-size: 2.5rem;
  display: block;
  margin-bottom: 0.5rem;
}

.stat-number {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--primary);
  display: block;
}

.stat-label {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted);
}

/* === MODAL === */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(13, 13, 13, 0.85);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  padding: 2rem;
  transition: opacity 0.2s ease-in-out;
}

.modal-content {
  background: var(--bg-card);
  border: 1px solid var(--primary);
  border-radius: 8px;
  max-width: 600px;
  width: 100%;
  max-height: 85vh;
  overflow-y: auto;
  padding: 3.5rem 2rem 2rem 2rem;
  position: relative;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.5), 0 8px 10px -6px rgba(0, 0, 0, 0.5);
}

.modal-large {
  max-width: 800px;
}

.modal-close {
  position: absolute;
  top: 1rem;
  right: 1.5rem;
  font-size: 2rem;
  cursor: pointer;
  color: #fff;
  background: rgba(0, 0, 0, 0.5);
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: background 0.2s ease, color 0.2s ease;
  z-index: 100;
}

.modal-close:hover {
  color: var(--primary);
  background: rgba(0, 0, 0, 0.8);
}

/* === FORMULARIO === */
.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.form-group label {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted);
}

.form-group input,
.form-group select,
.form-group textarea {
  padding: 0.875rem 1rem;
  background: var(--bg-dark);
  border: 1px solid #333;
  color: var(--text);
  font-family: inherit;
  font-size: 1rem;
  transition: 0.3s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary);
}

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

.form-actions {
  display: flex;
  gap: 1rem;
  margin-top: 1.5rem;
}

/* === FICHAS === */
.ficha-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 2px solid var(--primary);
}

.ficha-cliente,
.ficha-moto,
.ficha-historial {
  margin-bottom: 2rem;
}

.ficha-cliente h4,
.ficha-moto h4,
.ficha-historial h4 {
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--primary);
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid #2a2a2a;
}

.ficha-cliente p,
.ficha-moto p {
  margin-bottom: 0.5rem;
  font-size: 0.95rem;
}

/* === SERVICIO ITEM === */
.servicio-item {
  background: var(--bg-dark);
  border: 1px solid #2a2a2a;
  padding: 1.25rem;
  margin-bottom: 1rem;
}

.servicio-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid #2a2a2a;
}

.servicio-fecha {
  font-size: 0.9rem;
  color: var(--text-muted);
}

.servicio-tipo {
  background: rgba(255, 215, 0, 0.15);
  color: var(--primary);
  padding: 0.25rem 0.75rem;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.servicio-detalles p {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 0.25rem;
}

/* === PHOTOS === */
/* === FOTOS === */
.fotos-miniaturas {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.mini-foto {
  width: 60px;
  height: 60px;
  object-fit: cover;
  border: 2px solid var(--primary);
  cursor: pointer;
  transition: 0.3s;
}

.mini-foto:hover {
  transform: scale(1.1);
  border-color: #ff8533;
}

.mini-foto-link {
  display: inline-block;
}

/* === FOTOS EN SERVICIOS === */
.servicio-fotos {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.servicio-foto {
  width: 70px;
  height: 70px;
  object-fit: cover;
  border: 2px solid var(--primary);
  cursor: pointer;
  transition: 0.3s;
}

.servicio-foto:hover {
  transform: scale(1.1);
  border-color: #ff8533;
}

/* === MODAL FOTO GRANDE === */
.modal-foto-grande {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  cursor: pointer;
}

.modal-foto-grande img {
  max-width: 95%;
  max-height: 95%;
  object-fit: contain;
}

/* === ESTADO DEL SERVICIO (ADMIN) === */
.ficha-estado {
  background: var(--bg-dark);
  border: 2px solid var(--primary);
  padding: 1.5rem;
  margin-bottom: 2rem;
  border-radius: 8px;
}

.ficha-estado h4 {
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--primary);
  margin-bottom: 1rem;
}

.estado-selector {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.estado-selector select {
  padding: 0.75rem 1rem;
  background: var(--bg-card);
  border: 2px solid #333;
  color: var(--text);
  font-size: 1rem;
  font-family: inherit;
  cursor: pointer;
  transition: 0.3s;
  min-width: 200px;
}

.estado-selector select:focus {
  outline: none;
  border-color: var(--primary);
}

.estado-badge-inline {
  display: inline-block;
  padding: 0.5rem 1.25rem;
  font-size: 1rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  border-radius: 4px;
}

.estado-badge-inline.estado-recibido {
  background: #3b82f6;
  color: #fff;
}

.estado-badge-inline.estado-diagnostico {
  background: #f59e0b;
  color: #000;
}

.estado-badge-inline.estado-reparacion {
  background: #ef4444;
  color: #fff;
}

.estado-badge-inline.estado-espera {
  background: #8b5cf6;
  color: #fff;
}

.estado-badge-inline.estado-entrega {
  background: #22c55e;
  color: #fff;
}

.estado-actual-label {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.estado-actual-label strong {
  color: var(--primary);
}

.photo-upload-area {
  background: var(--bg-dark);
  border: 2px dashed #333;
  padding: 1.5rem;
  text-align: center;
  cursor: pointer;
  transition: 0.3s;
}

.photo-upload-area:hover {
  border-color: var(--primary);
}

.upload-placeholder {
  padding: 1rem;
}

.upload-icon {
  font-size: 2.5rem;
  display: block;
  margin-bottom: 0.5rem;
}

.upload-placeholder p {
  margin-bottom: 0.25rem;
}

.photo-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 1rem;
  justify-content: center;
}

.photo-thumb {
  position: relative;
  width: 80px;
  height: 80px;
}

.photo-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border: 2px solid var(--primary);
}

.photo-remove {
  position: absolute;
  top: -8px;
  right: -8px;
  width: 20px;
  height: 20px;
  background: #dc2626;
  color: #fff;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  font-size: 14px;
  line-height: 1;
}

/* === UTILITIES === */
.hidden {
  display: none !important;
}

/* === RESPONSIVE === */
@media (max-width: 768px) {
  nav {
    padding: 1rem;
  }

  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg-dark);
    flex-direction: column;
    padding: 2rem;
    gap: 1.5rem;
    border-bottom: 1px solid #222;
  }

  .nav-links.active {
    display: flex;
  }

  .menu-toggle {
    display: flex;
  }

  .system-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .section-system {
    padding: 7rem 1rem 2rem;
  }

  .motos-grid {
    grid-template-columns: 1fr;
  }

  .ficha-header {
    flex-direction: column;
    gap: 1rem;
  }

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

/* === USUARIOS LISTA === */
.usuarios-lista {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.usuario-card {
  background: var(--bg-card);
  border: 1px solid #2a2a2a;
  padding: 1.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.usuario-info {
  flex: 1;
  min-width: 200px;
}

.usuario-nombre {
  display: block;
  font-weight: 700;
  color: var(--text);
  font-size: 1.1rem;
}

.usuario-email {
  display: block;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.usuario-rol {
  display: flex;
  align-items: center;
}

.rol-badge {
  padding: 0.4rem 0.8rem;
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  border-radius: 4px;
}

.rol-badge.rol-admin {
  background: rgba(255, 215, 0, 0.2);
  color: var(--primary);
}

.rol-badge.rol-mecanico {
  background: rgba(59, 130, 246, 0.2);
  color: #3b82f6;
}

.usuario-acciones {
  display: flex;
  gap: 0.5rem;
}

/* === REPORTES === */
.reporte-container {
  max-width: 900px;
}

.reporte-header {
  text-align: center;
  padding: 2rem;
  background: var(--bg-card);
  border: 1px solid #2a2a2a;
}

.reporte-header h3 {
  color: var(--primary);
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
}

.reporte-header p {
  color: var(--text-muted);
}

.mecanicos-reporte {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.mecanico-stat-card {
  background: var(--bg-card);
  border: 1px solid #2a2a2a;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.mecanico-nombre {
  font-weight: 700;
  color: var(--primary);
  font-size: 1.1rem;
}

.mecanico-servicios {
  color: var(--text-muted);
}

/* === MÓDULO DE CONTABILIDAD & REPORTES FINANCIEROS (PREMIUM DUCATI/TESLA DASHBOARD) === */
.contabilidad-filter-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  background: rgba(22, 22, 22, 0.75);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  padding: 0.85rem 1.25rem;
  border-radius: 16px;
  margin-top: 1.5rem;
}

.filter-group {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.btn-filter-period {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-muted);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 0.45rem 1rem;
  border-radius: 50px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s ease;
}

.btn-filter-period:hover,
.btn-filter-period.active {
  background: var(--primary);
  color: #000000;
  border-color: var(--primary);
  box-shadow: 0 4px 15px rgba(255, 199, 0, 0.3);
}

.rango-custom-container {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.form-control-sm {
  background: #111;
  border: 1px solid #333;
  color: #fff;
  padding: 0.35rem 0.6rem;
  border-radius: 8px;
  font-size: 0.82rem;
}

/* KPI GRID & CARDS */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.25rem;
  margin-top: 1.5rem;
}

.kpi-card {
  background: rgba(20, 20, 20, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  padding: 1.4rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  position: relative;
  overflow: hidden;
}

.kpi-card:hover {
  transform: translateY(-4px);
}

.kpi-card.gold-glow { border-top: 3px solid #FFC700; box-shadow: 0 5px 20px rgba(255, 199, 0, 0.1); }
.kpi-card.green-glow { border-top: 3px solid #22c55e; box-shadow: 0 5px 20px rgba(34, 197, 94, 0.1); }
.kpi-card.blue-glow { border-top: 3px solid #3b82f6; box-shadow: 0 5px 20px rgba(59, 130, 246, 0.1); }
.kpi-card.purple-glow { border-top: 3px solid #a855f7; box-shadow: 0 5px 20px rgba(168, 85, 247, 0.1); }
.kpi-card.orange-glow { border-top: 3px solid #f97316; box-shadow: 0 5px 20px rgba(249, 115, 22, 0.1); }
.kpi-card.yellow-glow { border-top: 3px solid #eab308; box-shadow: 0 5px 20px rgba(234, 179, 8, 0.1); }

.kpi-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
}

.kpi-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-muted);
}

.kpi-icon {
  font-size: 1.4rem;
}

.kpi-value {
  font-size: 1.75rem;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: -0.5px;
  margin-bottom: 0.5rem;
}

.kpi-footer {
  font-size: 0.8rem;
}

.kpi-pct {
  color: var(--text-muted);
  font-weight: 500;
}

.kpi-sub {
  color: var(--text-muted);
}

.kpi-var.positive {
  color: #22c55e;
  font-weight: 700;
}

.kpi-var.negative {
  color: #ef4444;
  font-weight: 700;
}

/* CHARTS & TABLES */
.chart-card, .table-card {
  background: rgba(20, 20, 20, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  padding: 1.5rem;
}

.text-emerald { color: #22c55e !important; }
.text-blue { color: #3b82f6 !important; }
.text-purple { color: #a855f7 !important; }
.text-gold { color: #FFC700 !important; }

/* === ESTILOS Y ALINEACIÓN PERFECTA DE TABLAS CONTABLES === */
.data-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  margin-top: 0.5rem;
}

.data-table th {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-muted);
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 0.9rem 1rem;
  border-bottom: 2px solid var(--border);
  white-space: nowrap;
}

.data-table td {
  padding: 1rem;
  font-size: 0.92rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  vertical-align: middle;
  white-space: nowrap;
}

.data-table th.text-left, .data-table td.text-left { text-align: left !important; }
.data-table th.text-center, .data-table td.text-center { text-align: center !important; }
.data-table th.text-right, .data-table td.text-right { text-align: right !important; }

.mecanico-total {
  font-size: 1.3rem;
  font-weight: 700;
  color: #22c55e;
}

.servicios-detalle {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 1rem;
}

/* === MI CUENTA === */
.mi-cuenta-container {
  max-width: 500px;
  background: var(--bg-card);
  border: 1px solid #2a2a2a;
  padding: 2rem;
}

.cuenta-info p {
  margin-bottom: 0.75rem;
  color: var(--text-muted);
}

.cuenta-info strong {
  color: var(--text);
}

/* === ESTADO BADGE MINI === */
.estado-badge-mini {
  display: inline-block;
  padding: 0.3rem 0.6rem;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  border-radius: 4px;
}

.estado-badge-mini.estado-recibido {
  background: #3b82f6;
  color: #fff;
}

.estado-badge-mini.estado-diagnostico {
  background: #f59e0b;
  color: #000;
}

.estado-badge-mini.estado-reparacion {
  background: #ef4444;
  color: #fff;
}

.estado-badge-mini.estado-espera {
  background: #8b5cf6;
  color: #fff;
}

.estado-badge-mini.estado-entrega {
  background: #22c55e;
  color: #fff;
}

/* === RESPONSIVE === */
@media (max-width: 768px) {
  .usuario-card {
    flex-direction: column;
    align-items: flex-start;
  }

  .mecanicos-reporte {
    grid-template-columns: 1fr;
  }
}


/* === DELETE BUTTON === */
.btn-delete {
  background: #dc2626;
  color: white;
  border: none;
  padding: 0.3rem 0.6rem;
  border-radius: 4px;
  font-size: 0.75rem;
  cursor: pointer;
  margin-left: auto;
}

.btn-delete:hover {
  background: #b91c1c;
}

/* === PORTAFOLIO ADMIN STYLES === */
#portfolio-stats-panel {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}

#portfolio-stats-panel .stat-card {
  background: var(--bg-card);
  border: 1px solid #2a2a2a;
  padding: 1.5rem 1rem;
  text-align: center;
  border-radius: 6px;
  transition: transform 0.2s, border-color 0.2s;
}

#portfolio-stats-panel .stat-card:hover {
  transform: translateY(-2px);
  border-color: var(--primary);
}

.stat-val {
  font-size: 2rem;
  font-weight: 800;
  color: var(--primary);
  display: block;
  line-height: 1.2;
}

.stat-lbl {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted);
  display: block;
  margin-top: 0.25rem;
}

/* Drag and Drop support */
.draggable-work {
  cursor: move;
  transition: transform 0.2s, border-color 0.2s;
}

.draggable-work:hover {
  border-color: var(--primary);
  box-shadow: 0 4px 12px rgba(255, 215, 0, 0.1);
}

.draggable-work.dragging {
  opacity: 0.5;
  border: 2px dashed var(--primary);
}

/* Photo Sortable Styles */
.photo-sortable-container {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  min-height: 80px;
  border: 1.5px dashed #333;
  padding: 0.5rem;
  border-radius: 6px;
  background: #0f0f0f;
  transition: border-color 0.2s;
}

.photo-sortable-container:hover {
  border-color: #555;
}

.foto-prev-container {
  position: relative;
  width: 70px;
  height: 70px;
  cursor: move;
  border: 1px solid #333;
  border-radius: 4px;
  overflow: visible;
  background: #151515;
  transition: transform 0.15s, box-shadow 0.15s;
}

.foto-prev-container:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
}

.foto-prev-container img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 3px;
}

/* Upload Queue */
#upload-queue-container {
  margin-top: 1.5rem;
  background: #111;
  border: 1px solid #2a2a2a;
  padding: 1rem;
  border-radius: 8px;
}

.upload-progress-bar {
  flex: 1;
  margin: 0 10px;
  height: 8px;
  background: #222;
  border-radius: 4px;
  overflow: hidden;
  position: relative;
}

.upload-progress-fill {
  height: 100%;
  background: var(--primary);
  transition: width 0.2s ease-in-out;
}

/* Floating Preview Modal overrides */
#modal-portfolio-preview-float {
  backdrop-filter: blur(5px);
}

/* === SKELETON LOADERS === */
@keyframes skeleton-pulse {
  0% {
    background-color: rgba(255, 255, 255, 0.05);
  }
  50% {
    background-color: rgba(255, 255, 255, 0.15);
  }
  100% {
    background-color: rgba(255, 255, 255, 0.05);
  }
}

.skeleton-loader {
  animation: skeleton-pulse 1.5s infinite ease-in-out;
  border-radius: 4px;
  background-color: rgba(255, 255, 255, 0.08);
}

/* === RESPONSIVE TABLES === */
.table-responsive {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin-bottom: 1.5rem;
  border: 1px solid #2a2a2a;
  border-radius: 6px;
  background: #111;
}

.table-responsive table {
  width: 100%;
  border-collapse: collapse;
  min-width: 600px;
}

/* === VALIDATION STYLING === */
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--primary) !important;
  box-shadow: 0 0 0 2px rgba(255, 215, 0, 0.2);
}

.was-validated input:invalid,
.was-validated select:invalid,
.was-validated textarea:invalid {
  border-color: #ef4444 !important;
  box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.15);
}

.was-validated input:valid,
.was-validated select:valid,
.was-validated textarea:valid {
  border-color: #22c55e !important;
}

/* === BUTTON LOADING STATE === */
.btn-loading {
  position: relative;
  color: transparent !important;
  pointer-events: none;
  user-select: none;
}

.btn-loading::after {
  content: "";
  position: absolute;
  width: 16px;
  height: 16px;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  margin: auto;
  border: 2px solid transparent;
  border-top-color: currentColor;
  border-radius: 50%;
  animation: button-spinner 0.8s linear infinite;
}

@keyframes button-spinner {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}
/* === FOTO MOTO === */
.moto-card-img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 12px;
  margin-bottom: 1rem;
}
.moto-preview-container {
  text-align: center;
  margin-bottom: 1rem;
}
.moto-preview-img {
  max-width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 12px;
  display: none;
}
.ficha-moto-img-container {
  text-align: center;
  margin-bottom: 1.5rem;
}
.ficha-moto-img {
  max-width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 12px;
  border: 2px solid var(--primary);
}
