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

/* ===== VARIABLES ===== */
:root {
  --naranja: #E8550A;
  --naranja-oscuro: #C4420A;
  --naranja-claro: #FF6B2B;

  --marron: #3d1500;
  --marron-oscuro: #1a0a00;

  --crema: #FFF8F3;
  --crema-oscuro: #F5EDE4;

  --gris: #666;
  --gris-claro: #f0f0f0;

  --blanco: #ffffff;
  --negro: #111111;

  --verde: #27ae60;
  --azul: #2980b9;
  --rojo: #e74c3c;
  --amarillo: #f39c12;

  --sombra: 0 4px 20px rgba(232, 85, 10, 0.12);
  --sombra-hover: 0 6px 20px rgba(232, 85, 10, 0.18);

  --radio: 14px;
  --radio-lg: 20px;
}

/* ===== BASE ===== */
body {
  font-family: 'Segoe UI', system-ui, sans-serif;
  background: var(--crema);
  color: var(--negro);
  padding-bottom: env(safe-area-inset-bottom);
}

button,
input,
.card,
.producto-card,
.mesa-card,
.btn-login,
.btn-confirmar {
  transition:
    background 0.2s,
    color 0.2s,
    border-color 0.2s,
    transform 0.2s,
    box-shadow 0.2s;
}

/* ===== ACCESIBILIDAD ===== */
button:focus-visible,
input:focus-visible {
  outline: 3px solid rgba(232, 85, 10, 0.4);
  outline-offset: 2px;
}

button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* ===== SCROLL ===== */
::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: var(--crema);
}

::-webkit-scrollbar-thumb {
  background: var(--naranja);
  border-radius: 3px;
}

/* ===== LOGIN ===== */

.login-page {

  background:
    radial-gradient(circle at top, rgba(255,90,0,0.18), transparent 35%),
    linear-gradient(135deg, #140500, #2b0c00);

  min-height: 100vh;

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

  padding: 20px;

  overflow: hidden;
}

/* ===== CONTAINER ===== */

.login-container {

  width: 100%;
  max-width: 720px;

  position: relative;
}

/* ===== CARD ===== */

.login-box {

  background: rgba(255,255,255,0.96);

  backdrop-filter: blur(12px);

  border-radius: 34px;

  padding: 45px 60px;

  text-align: center;

  border: 1px solid rgba(255,255,255,0.4);

  box-shadow:
    0 15px 50px rgba(0,0,0,0.35),
    0 0 40px rgba(255,90,0,0.08);

  position: relative;

  overflow: hidden;
}

/* EFECTO DECORATIVO */

.login-box::before {

  content: '';

  position: absolute;

  width: 300px;
  height: 300px;

  background: radial-gradient(
    circle,
    rgba(255,90,0,0.12),
    transparent 70%
  );

  top: -120px;
  right: -100px;

  pointer-events: none;
}

/* ===== LOGO ===== */

.login-logo {

  width: 320px;
  height: 320px;

  border-radius: 50%;

  object-fit: cover;

  display: block;

  margin: 0 auto 20px auto;

  padding: 18px;

  background: white;

  border: 6px solid rgba(255,90,0,0.15);

  box-shadow:
    0 10px 35px rgba(255,90,0,0.20),
    0 0 0 12px rgba(255,255,255,0.4);

  transition: 0.3s;
}
@media(max-width:480px){

  .login-logo{

    width: 240px;
    height: 240px;
  }

}

.login-logo:hover {

  transform: scale(1.03);

  box-shadow:
    0 16px 40px rgba(255,90,0,0.30),
    0 0 0 14px rgba(255,255,255,0.5);
}

.login-logo:hover {

  transform: scale(1.02);
}

/* ===== TEXTO ===== */

.login-sub {

  font-size: 18px;

  color: #777;

  margin-bottom: 38px;

  font-weight: 500;
}

/* ===== FORM ===== */

.form-group {

  text-align: left;

  margin-bottom: 24px;
}

.form-group label {

  display: block;

  margin-bottom: 10px;

  font-size: 13px;

  font-weight: 800;

  color: #2b0c00;

  letter-spacing: 1.2px;
}

.form-group input {

  width: 100%;

  height: 62px;

  border-radius: 16px;

  border: 2px solid #f2d5bf;

  background: #f5f8ff;

  padding: 0 22px;

  font-size: 17px;

  color: #222;

  outline: none;

  transition: 0.3s;

  box-shadow: inset 0 2px 4px rgba(0,0,0,0.03);
}

.form-group input:focus {

  border-color: #ff5a00;

  background: white;

  box-shadow:
    0 0 0 5px rgba(255,90,0,0.10),
    0 6px 18px rgba(255,90,0,0.12);
}

/* ===== BOTON ===== */

.btn-login {

  width: 100%;

  height: 62px;

  border: none;

  border-radius: 16px;

  background: linear-gradient(
    135deg,
    #ff6a00,
    #ff3c00
  );

  color: white;

  font-size: 22px;

  font-weight: 800;

  cursor: pointer;

  margin-top: 18px;

  transition: 0.3s;

  box-shadow:
    0 10px 20px rgba(255,90,0,0.25);
}

.btn-login:hover {

  transform: translateY(-3px);

  box-shadow:
    0 14px 28px rgba(255,90,0,0.35);
}

.btn-login:active {

  transform: scale(0.98);
}

/* ===== LINKS ===== */

.login-links {

  display: flex;

  justify-content: space-between;

  align-items: center;

  margin-top: 30px;
}

.login-links a {

  color: #ff5a00;

  font-size: 15px;

  font-weight: 700;

  text-decoration: none;

  transition: 0.2s;
}

.login-links a:hover {

  color: #c63d00;

  transform: translateY(-1px);
}

/* ===== RESPONSIVE ===== */

@media(max-width:768px){

  .login-box{

    padding: 35px 28px;
  }

  .login-logo{

    width: 340px;
  }

}

@media(max-width:480px){

  .login-logo{

    width: 270px;
  }

  .login-sub{

    font-size: 16px;
  }

  .login-links{

    flex-direction: column;

    gap: 14px;

    align-items: center;
  }

  .btn-login{

    font-size: 19px;
  }

}
/* ===== FORMULARIOS ===== */
.form-group {
  text-align: left;
  margin-bottom: 16px;
}

.form-group label {
  display: block;

  font-size: 11px;
  font-weight: 700;

  color: var(--marron);

  margin-bottom: 6px;

  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.form-group input {
  width: 100%;

  padding: 13px 16px;

  border: 2px solid #e8d5c0;
  border-radius: 10px;

  font-size: 15px;

  outline: none;

  background: var(--crema);
  color: var(--negro);
}

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

  background: var(--blanco);

  box-shadow: 0 0 0 4px rgba(232, 85, 10, 0.1);
}

.form-group input::placeholder {
  color: #c4a882;
}

/* ===== BOTONES ===== */
.btn-login,
.btn-confirmar {
  width: 100%;

  padding: 14px;

  border: none;
  border-radius: 10px;

  font-size: 15px;
  font-weight: 700;

  cursor: pointer;
}

.btn-login {
  background: var(--naranja);
  color: var(--blanco);

  margin-top: 8px;
}

.btn-login:hover {
  background: var(--naranja-claro);

  transform: translateY(-2px);

  box-shadow: 0 6px 20px rgba(232, 85, 10, 0.3);
}

.btn-confirmar {
  background: var(--verde);
  color: var(--blanco);

  margin-top: 14px;
}

.btn-confirmar:hover {
  background: #2ecc71;

  transform: translateY(-2px);

  box-shadow: 0 6px 20px rgba(39, 174, 96, 0.3);
}

/* ===== LINKS LOGIN ===== */
.login-links {
  display: flex;
  justify-content: space-between;

  margin-top: 18px;
}

.login-links a {
  color: var(--naranja);

  font-size: 13px;
  font-weight: 600;

  text-decoration: none;
}

.login-links a:hover {
  color: var(--naranja-oscuro);
}

/* ===== MENSAJES ===== */
.error-msg,
.success-msg {
  padding: 10px 14px;

  border-radius: 8px;

  font-size: 13px;

  margin-bottom: 16px;

  text-align: left;
}

.error-msg {
  background: #fff0f0;
  color: #c0392b;
  border: 1.5px solid #f5c6c6;
}

.success-msg {
  background: #f0fff4;
  color: var(--verde);
  border: 1.5px solid #c6f5d5;
}

/* ===== NAVBAR ===== */
.navbar {
  background: var(--marron-oscuro);
  color: var(--blanco);

  height: 60px;

  padding: 0 20px;

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

  position: fixed;

  top: 0;
  left: 0;
  right: 0;

  z-index: 100;

  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.4);
}

.navbar-logo {
  display: flex;
  align-items: center;
  gap: 10px;
}

.navbar-logo img {
  width: 36px;
  height: 36px;

  border-radius: 50%;

  object-fit: contain;

  border: 2px solid var(--naranja);
}

.navbar-logo span {
  font-size: 15px;
  font-weight: 700;
}

.navbar-btns {
  display: flex;
  gap: 4px;
}

.navbar-btns button {
  background: transparent;

  color: #a07850;

  border: none;
  border-radius: 8px;

  padding: 7px 14px;

  cursor: pointer;

  font-size: 13px;
  font-weight: 600;
}

.navbar-btns button:hover,
.navbar-btns button.active {
  background: var(--naranja);
  color: var(--blanco);
}

.navbar-user {
  display: flex;
  align-items: center;
  gap: 10px;

  font-size: 13px;

  color: #a07850;
}

.btn-logout {
  background: transparent;

  border: 1.5px solid var(--naranja);
  border-radius: 6px;

  color: var(--naranja);

  padding: 5px 12px;

  cursor: pointer;

  font-size: 12px;
  font-weight: 700;
}

.btn-logout:hover {
  background: var(--naranja);
  color: var(--blanco);
}

/* ===== MAIN ===== */
.main-content {
  margin-top: 60px;

  padding: 20px;
  padding-bottom: 320px;

  min-height: calc(100vh - 60px);
}

/* ===== VISTAS ===== */
.vista {
  display: none;
}

.vista.active {
  display: block;
}

/* ===== TITULOS ===== */
.section-title {
  font-size: 20px;
  font-weight: 800;

  color: var(--marron-oscuro);

  margin-bottom: 20px;
  padding-bottom: 12px;

  border-bottom: 3px solid var(--naranja);

  display: flex;
  align-items: center;
  gap: 8px;
}

/* ===== CARDS ===== */
.card {
  background: var(--blanco);

  border: 1.5px solid #e8d5c0;
  border-radius: var(--radio);

  padding: 20px;

  margin-bottom: 16px;

  box-shadow: var(--sombra);
}

/* ===== MESAS ===== */
.mesas-grid {
  display: grid;

  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));

  gap: 14px;
}

.mesa-card {
  background: var(--blanco);

  border-radius: var(--radio);

  padding: 20px 12px;

  text-align: center;

  cursor: pointer;

  border: 2.5px solid #e8d5c0;

  box-shadow: var(--sombra);
}

.mesa-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--sombra-hover);
}

.mesa-card.libre {
  border-color: var(--verde);
}

.mesa-card.ocupada {
  border-color: var(--azul);
}

.mesa-card.lista {
  border-color: var(--naranja);
}

.mesa-card .mesa-num {
  font-size: 34px;
  font-weight: 800;
}

.mesa-card .mesa-estado {
  font-size: 11px;
  font-weight: 700;

  margin-top: 6px;

  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ===== CATEGORIAS ===== */
.categorias-tabs {
  display: flex;
  gap: 8px;

  flex-wrap: wrap;

  margin-bottom: 20px;
}

.tab-btn {
  padding: 8px 20px;

  border: 2px solid #e8d5c0;
  border-radius: 20px;

  background: var(--blanco);
  color: var(--marron);

  cursor: pointer;

  font-size: 13px;
  font-weight: 700;
}

.tab-btn.active,
.tab-btn:hover {
  background: var(--naranja);

  color: var(--blanco);

  border-color: var(--naranja);

  box-shadow: 0 4px 12px rgba(232, 85, 10, 0.3);
}

/* ===== PRODUCTOS ===== */
.productos-grid {
  display: grid;

  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));

  gap: 14px;
}

.producto-card {
  background: var(--blanco);

  border: 2px solid #e8d5c0;
  border-radius: var(--radio);

  padding: 18px;

  cursor: pointer;

  box-shadow: var(--sombra);
}

.producto-card:hover {
  border-color: var(--naranja);

  transform: translateY(-4px);

  box-shadow: var(--sombra-hover);
}

.producto-card img {
  width: 100%;
  height: 160px;

  object-fit: cover;

  border-radius: 10px;

  margin-bottom: 10px;
}

.producto-card .cat-label {
  font-size: 10px;
  font-weight: 700;

  color: var(--naranja);

  text-transform: uppercase;
  letter-spacing: 0.08em;

  margin-bottom: 6px;
}

.producto-card h4 {
  font-size: 15px;
  font-weight: 700;

  margin-bottom: 4px;
}

.producto-card p {
  font-size: 12px;

  color: var(--gris);

  line-height: 1.4;

  margin-bottom: 10px;
}

.producto-card .precio {
  font-size: 18px;
  font-weight: 800;

  color: var(--naranja);
}

/* ===== LAYOUT MENU ===== */
.layout-menu {
  display: grid;

  grid-template-columns: 1fr 320px;

  gap: 20px;

  align-items: start;
}

/* ===== CARRITO ===== */
.carrito-panel {
  background: var(--blanco);

  border: 2px solid #e8d5c0;
  border-radius: var(--radio);

  padding: 20px;

  position: sticky;
  top: 76px;

  box-shadow: var(--sombra);
}

.carrito-panel h3 {
  font-size: 15px;
  font-weight: 800;

  margin-bottom: 16px;
  padding-bottom: 10px;

  border-bottom: 2px solid var(--crema-oscuro);
}

.carrito-vacio {
  color: #c4a882;

  text-align: center;

  font-size: 13px;

  padding: 24px 0;
}

.carrito-item {
  display: flex;
  justify-content: space-between;
  align-items: center;

  padding: 10px 0;

  border-bottom: 1px solid var(--crema-oscuro);

  font-size: 13px;
}

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

.carrito-item-nombre {
  flex: 1;
  font-weight: 600;
}

.carrito-item-controles {
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-cantidad {
  width: 26px;
  height: 26px;

  border-radius: 50%;

  border: 2px solid var(--naranja);

  background: transparent;
  color: var(--naranja);

  cursor: pointer;

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

  font-size: 14px;
  font-weight: 800;
}

.btn-cantidad:hover {
  background: var(--naranja);
  color: var(--blanco);
}

.carrito-total {
  font-size: 20px;
  font-weight: 800;

  color: var(--naranja);

  text-align: right;

  margin-top: 14px;
  padding-top: 12px;

  border-top: 2px solid var(--crema-oscuro);
}

/* ===== BADGES ===== */
.badge {
  display: inline-block;

  padding: 4px 12px;

  border-radius: 20px;

  font-size: 11px;
  font-weight: 700;

  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.badge-pendiente {
  background: #fff3cd;
  color: #856404;
}

.badge-cocinando {
  background: #d1ecf1;
  color: #0c5460;
}

.badge-listo {
  background: #d4edda;
  color: #155724;
}

.badge-entregado {
  background: #e2e3e5;
  color: #495057;
}

.badge-cancelado {
  background: #f8d7da;
  color: #721c24;
}

/* ===== COCINA ===== */
.cocina-grid {
  display: grid;

  grid-template-columns: repeat(3, 1fr);

  gap: 16px;
}

.cocina-columna h3 {
  font-size: 12px;
  font-weight: 800;

  text-transform: uppercase;
  letter-spacing: 0.08em;

  padding: 10px 14px;

  margin-bottom: 12px;

  border-radius: 10px;

  text-align: center;
}

.col-pendiente h3 {
  background: #fff3cd;
  color: #856404;
}

.col-cocinando h3 {
  background: #d1ecf1;
  color: #0c5460;
}

.col-listo h3 {
  background: #d4edda;
  color: #155724;
}

/* ===== PEDIDOS ===== */
.pedido-card {
  background: var(--blanco);

  border-radius: var(--radio);

  padding: 16px;

  margin-bottom: 12px;

  border-left: 5px solid;

  border-top: 1px solid #e8d5c0;
  border-right: 1px solid #e8d5c0;
  border-bottom: 1px solid #e8d5c0;

  box-shadow: var(--sombra);

  animation: entrar 0.3s ease;
}

.pedido-card.pendiente {
  border-left-color: var(--amarillo);
}

.pedido-card.cocinando {
  border-left-color: #3498db;
}

.pedido-card.listo {
  border-left-color: var(--verde);
}

@keyframes entrar {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.timer.verde {
  color: var(--verde);
}

.timer.amarillo {
  color: var(--amarillo);
}

.timer.rojo {
  color: var(--rojo);
  animation: parpadeo 1s infinite;
}

@keyframes parpadeo {
  0%, 100% {
    opacity: 1;
  }

  50% {
    opacity: 0.3;
  }
}

/* ===== ADMIN ===== */
.badge-disponible,
.badge-nodisponible {
  padding: 4px 12px;

  border-radius: 20px;

  font-size: 11px;
  font-weight: 700;
}

.badge-disponible {
  background: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}

.badge-nodisponible {
  background: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {

  .navbar-logo span,
  .navbar-user span {
    display: none;
  }

  .navbar-btns {
    gap: 2px;
  }

  .navbar-btns button {
    padding: 6px 8px;
    font-size: 11px;
  }

  .main-content {
    padding: 10px;
    padding-bottom: 280px;
  }

  .layout-menu {
    grid-template-columns: 1fr;
  }

  .carrito-panel {
    position: fixed;

    bottom: 0;
    left: 0;
    right: 0;

    border-radius: 20px 20px 0 0;

    max-height: 50vh;

    overflow-y: auto;

    z-index: 999;

    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.2);
  }

  .productos-grid {
    grid-template-columns: 1fr;
    gap: 16px;

    padding-bottom: 280px;
  }

  .producto-card {
    width: 100%;
    padding: 14px;
  }

  .producto-card img {
    height: 200px;
  }

  .producto-card h4 {
    font-size: 18px;
  }

  .producto-card p {
    font-size: 14px;
  }

  .producto-card .precio {
    font-size: 22px;
  }

  .mesas-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }

  .mesa-card .mesa-num {
    font-size: 26px;
  }

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

  .section-title {
    font-size: 17px;
  }

  .categorias-tabs {
    flex-wrap: nowrap;

    overflow-x: auto;

    padding-bottom: 4px;

    scrollbar-width: none;
  }

  .categorias-tabs::-webkit-scrollbar {
    display: none;
  }

  .tab-btn {
    white-space: nowrap;
    flex-shrink: 0;
  }
}

/* ===== EXTRA SMALL ===== */
@media (max-width: 480px) {

  .login-box {
    padding: 28px 20px;
  }

  .navbar {
    height: 56px;
    padding: 0 14px;
  }

  .main-content {
    margin-top: 56px;
  }
  /* ===== MENU MOVIL ===== */

.menu-toggle {
  display: none;
  background: transparent;
  border: none;
  color: white;
  font-size: 28px;
  cursor: pointer;
}

@media (max-width: 768px) {

  .menu-toggle {
    display: block;
  }

  .navbar {
    position: fixed;
  }

  .navbar-btns {
    position: absolute;
    top: 56px;
    left: 0;
    right: 0;
    background: var(--marron-oscuro);

    flex-direction: column;
    padding: 10px;

    display: none;
  }

  .navbar-btns.show {
    display: flex;
  }

  .navbar-btns button {
    width: 100%;
    text-align: left;
    padding: 14px;
    border-radius: 10px;
    font-size: 14px;
  }

  .navbar-user {
    display: none;
  }
}
}