/* ============================================================
   CUSTOM — VERSIÓN LIMPIA UI-PRO 2025
   Solo utilidades globales y ajustes puntuales
============================================================ */

/* ------------------------------------------------------------
   BODY & LOGO (usa las variables del tema)
------------------------------------------------------------ */
body {
  color: var(--text-color);
  background: var(--bg-color);
  font-family: "Varela Round", sans-serif;
  font-size: 13px;
  margin: 0;
  padding: 0;
}

@media (max-width: 1200px) {
  .img-logo {
    width: 300px;
  }
}

/* ------------------------------------------------------------
   TABLE HELP
------------------------------------------------------------ */
#tableHelp {
  font-size: 10px;
  color: var(--text-color-soft) !important;
  width: 100%;
  opacity: 0.8;
}

/* ------------------------------------------------------------
   UTILIDADES GENERALES
------------------------------------------------------------ */
.oculto,
#oculto {
  display: none !important;
}

/* ------------------------------------------------------------
   LOGIN — ERROR BOX
------------------------------------------------------------ */
#error-login {
  background-color: var(--bg-color-2);
  border-radius: 8px;
  padding: var(--padding-global);
  backdrop-filter: blur(3px);
  border: 1px solid var(--border-color);
}

#error-login .message {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-color);
  text-align: center;
}

/* ------------------------------------------------------------
   MÓDULO PRODUCTOS — INPUT CANTIDAD / UNIDAD
------------------------------------------------------------ */
#input-uni input,
#input-uni select {
  width: 50% !important;
  display: inline-block !important;
  border-radius: 6px !important;
  background: var(--bg-color);
  border: 1px solid var(--border-color);
  padding: 6px 10px !important;
}

/* ============================================================
   ICON TOOLBAR — MOBILE INVENTARIOS (UI-PRO 2025)
============================================================ */

.icon-toolbar {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  overflow-x: auto;
  gap: 6px;
  align-items: center;
  justify-content: flex-start;
  margin-top: 12px;

  direction: rtl;
  unicode-bidi: isolate;

  scroll-behavior: smooth;
  scroll-snap-type: x mandatory;
  scroll-padding-left: 12px;

  -webkit-overflow-scrolling: touch;

  scrollbar-width: thin;
  scrollbar-color: var(--scrollbar-thumb, var(--border-color)) transparent;
}

.icon-toolbar::-webkit-scrollbar {
  height: 6px;
}

.icon-toolbar::-webkit-scrollbar-thumb {
  background-color: var(--scrollbar-thumb, var(--border-color));
  border-radius: 4px;
}

.icon-toolbar::-webkit-scrollbar-track {
  background: transparent;
}

.icon-toolbar .btn.mobile {
  padding: 7px 10px;
  font-size: 12px;
  flex: 0 0 auto;
  white-space: nowrap;
  min-width: 38px;
  height: 38px;

  display: flex;
  align-items: center;
  justify-content: center;

  border-radius: 8px;
  scroll-snap-align: start;

  background: var(--bg-color-2);
  border: 1px solid var(--border-color);

  transition: background 0.15s ease, transform 0.1s ease;
}

.icon-toolbar .btn.mobile:hover {
  background: var(--bg-color-3);
  transform: translateY(-1px);
}

.icon-toolbar .btn.mobile i.material-icons {
  font-size: 20px;
  line-height: 1;
  pointer-events: none;
}

/* BADGES SOLO EN MOVIL */
.badges-movil {
  display: none;
}

@media (max-width: 768px) {
  .badges-movil {
    display: block;
    margin-top: 3px;
    opacity: 0.85;
  }
}

/* =========================================
   REGISTRO STAFF — Apple ID / iCloud style
   Scoped para no afectar otros módulos
========================================= */
.apple-auth{
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 18px 16px;
  background:
    radial-gradient(1200px 500px at 20% 0%, rgba(0,122,255,0.10), transparent 55%),
    radial-gradient(1200px 500px at 80% 20%, rgba(52,199,89,0.08), transparent 60%),
    linear-gradient(180deg, #f7f8fb 0%, #eef1f6 100%);
}

.apple-auth__wrap{
  width: 100%;
  max-width: 520px;
}

.apple-auth__brand{
  padding: 0 6px;
}

.apple-auth__brand--inline{
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  margin-bottom: 22px;
}

.apple-auth__logo{
  width: 92px;
  height: 92px;
  object-fit: contain;
  border-radius: 22px;
  padding: 6px;
  background: #ffffff;
  box-shadow: 0 10px 25px rgba(0,0,0,0.08);
}

.apple-auth__text{
  text-align: left;
}

.apple-auth__text h1{
  margin: 0;
  font-size: 30px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #1d1d1f;
}

.apple-auth__text p{
  margin: 6px 0 0;
  font-size: 14px;
  color: rgba(29,29,31,0.65);
}

.apple-card{
  background: rgba(255,255,255,0.82);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(0,0,0,0.06);
  border-radius: 22px;
  box-shadow: 0 18px 55px rgba(0,0,0,0.08);
  padding: 22px;
}

.apple-alert{
  border-radius: 14px;
  padding: 12px 14px;
  border: 1px solid rgba(220, 38, 38, 0.18);
  background: rgba(254, 242, 242, 0.95);
  color: #991b1b;
  font-size: 13px;
  font-weight: 600;
  margin: 0 0 14px;
}

.apple-field{
  margin-bottom: 14px;
}

.apple-field label{
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: rgba(29,29,31,0.80);
  margin: 0 0 8px 2px;
}

.apple-field input{
  width: 100%;
  height: 46px;
  padding: 0 14px;
  border-radius: 14px;
  border: 1px solid rgba(0,0,0,0.10);
  background: rgba(255,255,255,0.9);
  font-size: 15px;
  outline: none;
  transition: box-shadow .18s ease, border-color .18s ease;
}

.apple-field input:focus{
  border-color: rgba(0,122,255,0.55);
  box-shadow: 0 0 0 4px rgba(0,122,255,0.18);
}

.apple-hint{
  margin: 8px 2px 0;
  font-size: 12px;
  color: rgba(29,29,31,0.55);
}

.apple-divider{
  height: 1px;
  background: rgba(0,0,0,0.07);
  margin: 16px 0;
}

.apple-actions{
  display: flex;
  gap: 10px;
  margin-top: 10px;
}

.apple-btn{
  height: 44px;
  border-radius: 12px;
  padding: 0 16px;
  font-weight: 700;
  font-size: 14px;
  border: 1px solid transparent;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 1;
  text-decoration: none;
  transition: filter .18s ease, box-shadow .18s ease, background-color .18s ease;
}

.apple-btn--primary{
  background: #4d678d;
  color: #fff;
  border-radius: 12px;
  height: 44px;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: none;
  box-shadow: 0 8px 16px rgba(36, 52, 74, 0.14);
}

.apple-btn--primary:hover{
  filter: brightness(0.96);
}

.apple-btn--ghost{
  background: rgba(255,255,255,0.7);
  border-color: rgba(0,0,0,0.10);
  color: rgba(29,29,31,0.85);
}

.apple-auth__footer{
  margin-top: 16px;
  text-align: center;
  font-size: 13px;
  color: rgba(29,29,31,0.65);
}

.apple-link{
  margin-left: 6px;
  color: #007aff;
  text-decoration: none;
  font-weight: 700;
}

.apple-link:hover{
  text-decoration: underline;
}

@media (max-width: 1024px){
  .apple-auth__wrap{ max-width: 560px; }
}

@media (max-width: 480px){
  .apple-auth__logo{
    width: 82px;
    height: 82px;
  }
  .apple-auth__brand--inline{
    gap: 14px;
    align-items: flex-start;
    justify-content: flex-start;
  }
  .apple-auth__text h1{ font-size: 26px; }
  .apple-card{ padding: 18px; }
  .apple-actions{ flex-direction: column; }
}

/* ESTILO PARA INPUTS DE CONFIG BLOQUEADOS */
.config-hotel[readonly] {
  background-color: var(--bg-color-2) !important; /* gris claro elegante */
  border-color: var(--border-color) !important; /* borde más apagado */
  color: var(--text-color-soft) !important; /* texto gris medio */
  cursor: not-allowed;
}

/* ============================================================
   BADGE TOTAL (LISTAR PRODUCTOS CÓCTEL) — SOLO EN MÓVIL
============================================================ */
.tabla-coctel .badge-total-mobile,
.badge-total-mobile.only-mobile {
  display: none !important;
}

@media (max-width: 768px) {
  .tabla-coctel .badge-total-mobile,
  .badge-total-mobile.only-mobile {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    background: var(--color-primario);
    color: var(--bg-color);
    padding: 3px 8px;
    font-size: 11px;
    font-weight: 700;
    border-radius: 8px;
    margin-top: 4px;
  }
}

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

.detalle-title {
  font-size:20px;
  font-weight:600;
  color:#1f2937;
}

.detalle-estado {
  padding:6px 14px;
  border-radius:20px;
  font-size:13px;
  font-weight:600;
  text-transform:capitalize;
}

.badge-warning-soft { background:#fff3cd; color:#856404; }
.badge-success-soft { background:#d1fae5; color:#065f46; }
.badge-danger-soft  { background:#fee2e2; color:#991b1b; }
.badge-orange-soft  { background:#ffedd5; color:#9a3412; }
.badge-neutral-soft { background:#e5e7eb; color:#374151; }

.detalle-card {
  background:#f9fafb;
  border:1px solid #e5e7eb;
  border-radius:14px;
  padding:18px;
  margin-bottom:24px;
}

.detalle-card-title {
  font-weight:600;
  margin-bottom:8px;
  color:#374151;
}

.detalle-card-body {
  font-size:15px;
  color:#111827;
  line-height:1.5;
}

.detalle-section-title {
  font-weight:600;
  margin-bottom:14px;
  color:#374151;
}

.detalle-timeline {
  position:relative;
  padding-left:22px;
  border-left:2px solid #e5e7eb;
}

.detalle-timeline-item {
  position:relative;
  margin-bottom:18px;
}

.detalle-dot {
  position:absolute;
  left:-8px;
  top:6px;
  width:10px;
  height:10px;
  background:#4b5563;
  border-radius:50%;
}

.detalle-accion {
  font-weight:600;
  text-transform:capitalize;
}

.detalle-meta {
  font-size:13px;
  color:#6b7280;
  margin-top:2px;
}

.detalle-comentario {
  margin-top:6px;
  font-size:14px;
  color:#374151;
}

/* CONTENEDOR */
.detalle-wrapper {
  padding: 10px 5px 5px 5px;
}

/* CABECERA */
.detalle-top {
  display:flex;
  justify-content:space-between;
  align-items:center;
  margin-bottom:22px;
}

.detalle-main-title {
  font-size:20px;
  font-weight:600;
  color:#1f2937;
}

.detalle-status {
  padding:6px 14px;
  border-radius:30px;
  font-size:13px;
  font-weight:600;
}

/* BADGES */
.badge-soft-warning { background:#fff3cd; color:#856404; }
.badge-soft-success { background:#d1fae5; color:#065f46; }
.badge-soft-danger  { background:#fee2e2; color:#991b1b; }
.badge-soft-orange  { background:#ffedd5; color:#9a3412; }
.badge-soft-neutral { background:#e5e7eb; color:#374151; }

/* CARD MENSAJE */
.detalle-card-premium {
  background:#f9fafb;
  border:1px solid #e5e7eb;
  border-radius:16px;
  padding:18px;
  box-shadow:0 4px 12px rgba(0,0,0,0.04);
}

.detalle-card-header {
  font-weight:600;
  margin-bottom:10px;
  color:#374151;
}

.detalle-card-content {
  font-size:15px;
  color:#111827;
  line-height:1.6;
}

/* DIVIDER */
.detalle-divider {
  height:1px;
  background:#e5e7eb;
  margin:28px 0;
}

/* TIMELINE */
.timeline {
  position:relative;
}

.timeline-item {
  display:flex;
  gap:14px;
  margin-bottom:22px;
  animation:fadeUp .3s ease;
}

.timeline-avatar {
  width:34px;
  height:34px;
  background:#4f46e5;
  color:white;
  font-weight:600;
  border-radius:50%;
  display:flex;
  align-items:center;
  justify-content:center;
  font-size:14px;
}

.timeline-body {
  flex:1;
}

.timeline-header {
  display:flex;
  justify-content:space-between;
  font-size:14px;
}

.timeline-action {
  font-weight:600;
  text-transform:capitalize;
  color:#1f2937;
}

.timeline-date {
  font-size:13px;
  color:#6b7280;
}

.timeline-actor {
  font-size:13px;
  color:#6b7280;
  margin-top:2px;
}

.timeline-comment {
  margin-top:6px;
  font-size:14px;
  color:#374151;
}

/* ANIMACIÓN */
@keyframes fadeUp {
  from {
    opacity:0;
    transform:translateY(5px);
  }
  to {
    opacity:1;
    transform:translateY(0);
  }
}

/* =========================================
   FULL WIDTH PARA TABLETS (hasta 1280px)
   Samsung Tab Active 2 incluida
========================================= */
@media (max-width: 1280px) {

  .container,
  .main-container,
  .content-wrapper,
  .page-wrapper {
    max-width: 100% !important;
    width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    padding-left: 16px !important;
    padding-right: 16px !important;
  }

  body {
    padding-left: 0 !important;
    padding-right: 0 !important;
  }

  .header-bar {
    border-radius: 0 !important;
  }

}

/* =========================================
   HEADER ADMIN EN TABLET (769px - 1280px)
   Reduce buscador para dejar hueco a enlaces
========================================= */
@media (min-width: 769px) and (max-width: 1280px) {

  .page-admin .header-bar {
    flex-wrap: nowrap;
    gap: 10px;
    padding-left: 16px;
    padding-right: 16px;
  }

  .page-admin .header-title h2 {
    font-size: 20px;
    white-space: nowrap;
  }

  .page-admin .admin-search-pro {
    flex: 0 1 340px !important;
    width: 340px !important;
    max-width: 340px !important;
    min-width: 240px;
    margin: 0 8px !important;
    height: 40px;
    padding: 0 12px;
    gap: 8px;
  }

  .page-admin .admin-search-pro__input {
    font-size: 0.9rem;
  }

  .page-admin .menu-buttons {
    margin-left: 0 !important;
    gap: 6px;
    flex-shrink: 0;
  }

  .page-admin .menu-buttons a {
    padding: 6px 10px;
    font-size: 13px;
    gap: 4px;
  }

}

/* Centro de Tareas: contador en card de administración */
.admin-dashboard .admin-card {
  position: relative;
}

.admin-card__count {
  position: absolute;
  top: 10px;
  right: 10px;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border-radius: 999px;
  background: #ef4444;
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 14px rgba(239, 68, 68, 0.28);
}

/* =========================================
   LOGIN — TRUST DEVICE (Apple-style++)
========================================= */
.trust-device,
.marins-trust-device {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid rgba(15, 23, 42, 0.05);
  background: #f6f7f9;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.95) inset,
    0 8px 18px rgba(15, 23, 42, 0.05);
}

.trust-device.is-on .trust-info__hint,
.marins-trust-device.is-on .trust-info__hint {
  opacity: 1;
  transform: translateY(0);
}

.trust-info,
.marins-trust-device__copy {
  min-width: 0;
  flex: 1;
}

.trust-info__label,
.marins-trust-device__label {
  display: block;
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  color: #111827;
  letter-spacing: -0.01em;
  cursor: pointer;
}

.trust-info__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  font-size: 13px;
  line-height: 1;
  border-radius: 999px;
  background: #ffffff;
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.08);
}

.trust-info__hint,
.marins-trust-device__hint {
  margin-top: 4px;
  font-size: 12px;
  line-height: 1.35;
  color: #6b7280;
  opacity: .8;
  transform: translateY(0);
  transition: opacity .22s ease, transform .22s ease;
}

.switch-ios,
.marins-ios-switch {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 26px;
  flex: 0 0 auto;
  margin: 0;
  cursor: pointer;
}

.switch-ios input,
.marins-ios-switch input {
  position: absolute;
  opacity: 0;
  inset: 0;
  width: 100%;
  height: 100%;
}

.switch-ios__track,
.marins-ios-switch__track {
  position: relative;
  width: 44px;
  height: 26px;
  border-radius: 999px;
  background: #d1d5db;
  box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.04);
  transition: background-color .22s ease, box-shadow .22s ease;
}

.switch-ios__track::after,
.marins-ios-switch__track::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #fff;
  box-shadow:
    0 1px 2px rgba(15, 23, 42, 0.18),
    0 3px 8px rgba(15, 23, 42, 0.10);
  transition: transform .22s cubic-bezier(.22,.8,.2,1), box-shadow .22s ease;
}

.switch-ios input:checked + .switch-ios__track,
.marins-ios-switch input:checked + .marins-ios-switch__track {
  background: #34c759;
}

.switch-ios input:checked + .switch-ios__track::after,
.marins-ios-switch input:checked + .marins-ios-switch__track::after {
  transform: translateX(18px);
}

.switch-ios input:focus-visible + .switch-ios__track,
.marins-ios-switch input:focus-visible + .marins-ios-switch__track {
  box-shadow:
    0 0 0 4px rgba(52, 199, 89, 0.18),
    inset 0 0 0 1px rgba(15, 23, 42, 0.04);
}

.kiosk-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 22px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: #334155;
  background: rgba(148, 163, 184, 0.14);
  border: 1px solid rgba(148, 163, 184, 0.22);
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
}

/* =========================================
   STAFF REGISTRO — UI-PRO 2026 Staff Edition
========================================= */
.staff-info {
  padding: 60px 40px;
}

.staff-info h2 {
  margin: 0 0 15px;
  font-size: 28px;
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: #111827;
}

.staff-info p {
  font-size: 15px;
  color: #6c757d;
  margin: 0 0 8px;
  line-height: 1.5;
}

.form-card {
  background: #ffffff !important;
  border-radius: 20px !important;
  box-shadow: 0 10px 30px rgba(0,0,0,0.05) !important;
  padding: 40px !important;
}

/* Afinado visual del formulario interno (solo registro staff) */
.reg-page .reg-form {
  gap: 14px;
}

.reg-page .reg-field {
  gap: 8px;
}

.reg-page .reg-field input {
  height: 52px;
  border-radius: 14px;
  padding: 0 16px;
}

.reg-page .reg-actions {
  gap: 12px;
  margin-top: 8px;
}

.reg-page .reg-btn {
  height: 50px;
  border-radius: 14px;
}

.reg-page .reg-btn-primary {
  box-shadow: 0 12px 28px color-mix(in srgb, var(--reg-btn-primary-bg) 26%, transparent);
}

/* Compatibilidad con la clase solicitada en otras vistas */
.reg-page .btn-primary {
  border-radius: 12px;
  font-weight: 600;
  padding: 12px;
}

/* Tablet hotel / layouts medianos */
@media (max-width: 1280px) {
  .reg-page {
    padding-left: 14px !important;
    padding-right: 14px !important;
  }

  .reg-shell {
    width: min(920px, 100%) !important;
  }

  .staff-info {
    padding: 42px 28px;
  }
}

@media (max-width: 1200px) {
  .form-card {
    padding: 25px !important;
  }
}

@media (max-width: 768px) {
  .left-column {
    display: none !important;
  }

  .reg-grid {
    grid-template-columns: 1fr !important;
  }

  .reg-shell {
    padding: 10px !important;
    border-radius: 20px !important;
  }
}

@media (max-width: 480px) {
  .trust-device,
  .marins-trust-device {
    padding: 12px 14px;
    gap: 10px;
  }

  .trust-info__label,
  .marins-trust-device__label {
    font-size: 13px;
  }

  .trust-info__hint,
  .marins-trust-device__hint {
    font-size: 11px;
  }
}

/* ===========================================================
   Menú móvil: botón hamburguesa unificado en todo el panel
=========================================================== */
@media (min-width: 769px) and (max-width: 1024px) {
  .page-admin.page-admin-home .header-bar {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) minmax(180px, 320px) minmax(0, 1fr);
    align-items: center;
    column-gap: 14px;
    flex-wrap: nowrap;
  }

  .page-admin.page-admin-home .header-title {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    justify-self: start;
  }

  .page-admin.page-admin-home .header-title h2 {
    font-size: 18px;
  }

  .page-admin.page-admin-home .admin-search-pro {
    width: min(100%, 320px) !important;
    max-width: 320px !important;
    min-width: 180px !important;
    height: 40px;
    margin: 0 auto !important;
    justify-self: center;
  }

  .page-admin.page-admin-home .header-mobile-actions {
    margin-left: 0 !important;
    justify-self: end;
    width: max-content;
  }
}

@media (max-width: 1024px) {
  .header-bar .menu-toggle,
  .header-mobile-actions .menu-toggle {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 48px !important;
    height: 48px !important;
    min-width: 48px !important;
    min-height: 48px !important;
    margin-left: auto !important;
    padding: 0 !important;
    border-radius: 14px !important;
    border: 1px solid rgba(255, 255, 255, 0.28) !important;
    background: rgba(255, 255, 255, 0.14) !important;
    color: #fff !important;
    font-size: 30px !important;
    line-height: 1 !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.22);
  }

  .header-bar .menu-toggle .material-icons,
  .header-mobile-actions .menu-toggle .material-icons {
    font-size: 30px !important;
    line-height: 1 !important;
  }
}

/* ===========================================================
   INPUTS MÓVIL — NORMALIZACIÓN GLOBAL
   Evita campos desproporcionados en iPhone/Android
=========================================================== */
@media (max-width: 768px) {
  .form-control,
  .input-pro,
  .modal .form-control,
  .filtro-input,
  .filtro-select,
  select.form-control {
    font-size: 14px !important;
    line-height: 1.25 !important;
    min-height: 38px;
    padding: 8px 10px !important;
  }

  textarea.form-control,
  textarea.input-pro {
    min-height: 88px;
  }
}
