:root {
  --brand-primary: #0f172a;
  --gold-accent: #c5a059;
  --christmas-red: #9b2226;
  --christmas-green: #2d6a4f;
  --footer-email: #b5d455;

  --bg-body: #f1f5f9;
  --bg-image-opacity: 0.1;
  --text-main: #334155;
  --text-muted: #64748b;
  --card-bg: #ffffff;
  --card-shadow: rgba(0, 0, 0, 0.1);
  --border-color: #e2e8f0;
  --input-bg: #ffffff;
  --chair-bg: #ffffff;
  --chair-occupied: #cbd5e1;
  --step-bg: #f1f5f9;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg-body: #0f172a;
    --bg-image-opacity: 0.05;
    --text-main: #f1f5f9;
    --text-muted: #94a3b8;
    --card-bg: #1e293b;
    --card-shadow: rgba(0, 0, 0, 0.5);
    --border-color: #334155;
    --input-bg: #1f1f1f;
    --chair-bg: #1f1f1f;
    --chair-occupied: #475569;
    --step-bg: #182130;

    --christmas-red: #b8272c;
    --christmas-green: #378160;
  }
}

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

body {
  font-family: "Poppins", sans-serif;
  background-color: #0f172a;
  background-image: url("imagens/ChrismtasPattern3.png");
  background-repeat: repeat;
  background-attachment: fixed;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  color: var(--text-main);
  transition: background-color 0.3s, color 0.3s;
}

#loginOverlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(15, 23, 42, 0.95);
  z-index: 3000;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  color: white;
  text-align: center;
}

.login-box {
  background: var(--card-bg);
  padding: 40px;
  border-radius: 10px;
  color: var(--text-main);
  max-width: 400px;
  width: 90%;
  border-top: 5px solid var(--gold-accent);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
}

.btn-google {
  background: #4285f4;
  color: white;
  border: none;
  padding: 12px 24px;
  border-radius: 4px;
  font-weight: bold;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  margin-top: 20px;
  font-family: "Poppins", sans-serif;
  transition: background 0.3s;
}

.btn-google:hover {
  background: #357ae8;
}

.user-header {
  background: var(--card-bg);
  padding: 10px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.9em;
  border-bottom: 1px solid var(--border-color);
  color: var(--text-main);
}

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

.user-avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
}

.btn-logout,
.btn-help {
  background: transparent;
  border: 1px solid var(--border-color);
  color: var(--text-main);
  padding: 5px 15px;
  border-radius: 20px;
  cursor: pointer;
  font-size: 0.8em;
  transition: all 0.3s;
}

.btn-logout:hover,
.btn-help:hover {
  border-color: var(--gold-accent);
  color: var(--gold-accent);
}

.help-steps {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.step {
  display: flex;
  align-items: center;
  gap: 15px;
  background: var(--step-bg);
  padding: 10px;
  border-radius: 8px;
  border-left: 4px solid var(--gold-accent);
}

.step-number {
  background: var(--brand-primary);
  color: white;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  flex-shrink: 0;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.help-content {
  max-width: 500px;
}

.help-steps-container {
  display: flex;
  flex-direction: column;
  gap: 15px;
  margin: 20px 0;
}

.help-step {
  display: flex;
  align-items: center;
  gap: 15px;
  background-color: var(--step-bg);
  padding: 15px;
  border-radius: 8px;
  border-left: 4px solid var(--gold-accent);
  box-shadow: 0 2px 5px var(--card-shadow);
  opacity: 0;
  animation: fadeInUp 0.5s ease forwards;
  animation-delay: var(--delay);
}

.step-icon {
  width: 40px;
  height: 40px;
  background-color: var(--brand-primary);
  color: var(--gold-accent);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2em;
  flex-shrink: 0;
}

.step-text strong {
  display: block;
  color: var(--text-main);
  margin-bottom: 2px;
}

.step-text p {
  margin: 0;
  font-size: 0.85em;
  color: var(--text-muted);
  line-height: 1.4;
}

.main-wrapper {
  padding: 40px 20px;
  flex: 1;
  width: 100%;
  max-width: 100%;
  display: none;
}

.container {
  max-width: 1400px;
  width: 95%;
  margin: 0 auto;
  background: var(--card-bg);
  border-radius: 4px;
  padding: 40px;
  box-shadow: 0 25px 50px -12px var(--card-shadow);
  border-top: 5px solid var(--gold-accent);
}

header {
  text-align: center;
  margin-bottom: 40px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border-color);
}

h1 {
  color: var(--text-main);
  margin-bottom: 10px;
  font-family: inherit;
  font-size: 2.5em;
}

.subtitle {
  color: var(--gold-accent);
  font-size: 1.1em;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 2px;
}

.info-bar {
  display: flex;
  justify-content: center;
  gap: 40px;
  margin-bottom: 40px;
  padding: 20px;
  background: var(--step-bg);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  flex-wrap: wrap;
}

.info-item {
  text-align: center;
}

.info-item .number {
  font-family: inherit;
  font-weight: bold;
  font-size: 2em;
  color: var(--text-main);
}

.info-item .label {
  font-size: 0.8em;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 600;
}

.legend {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-bottom: 40px;
  flex-wrap: wrap;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9em;
  color: var(--text-main);
}

.legend-box {
  width: 20px;
  height: 20px;
  border-radius: 4px;
}

.legend-box.available {
  background: var(--chair-bg);
  border: 2px solid var(--christmas-green);
}

.legend-box.occupied {
  background: var(--chair-occupied);
}

.legend-box.selected {
  background: var(--gold-accent);
}

.legend-box.my-reservation {
  background: #3b82f6;
  border: 2px solid #1d4ed8;
}

.tables-layout-wrapper {
  display: flex;
  justify-content: center;
  gap: 90px;
  position: relative;
  padding-bottom: 60px;
  margin-top: 20px;
}
.tables-column {
  display: flex;
  flex-direction: column;
  gap: 40px;
  align-items: center;
}

.entrance-marker {
  position: absolute;
  top: 50%;
  left: -20px;
  transform: translateY(-50%) rotate(0deg);
  writing-mode: vertical-rl;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 2px;
  padding: 10px 5px;
  border-left: 4px solid var(--text-main);
  border-top: none;
  border-bottom: none;
  color: var(--text-main);
  white-space: nowrap;
  z-index: 10;
}

.table-group {
  width: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.table-title {
  font-family: inherit;
  font-size: 1.2em;
  color: var(--text-main);
  margin-bottom: 10px;
  font-weight: bold;
}

.table-layout {
  display: grid;
  gap: 45px 8px;
  padding: 10px;
  background: transparent;
  position: relative;
  width: max-content;
  overflow: visible; 
}

.table-layout::before {
  content: "MESA";
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 35px;
  background: var(--border-color);
  transform: translateY(-50%);
  border-radius: 6px;
  border: 1px solid var(--chair-occupied);
  z-index: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-weight: bold;
  letter-spacing: 4px;
  font-size: 0.8em;
}

.table-24 {
  grid-template-columns: repeat(12, 40px);
  grid-template-rows: repeat(2, auto);
}
.table-16 {
  grid-template-columns: repeat(8, 40px);
  grid-template-rows: repeat(2, auto);
}

.chair {
  width: 40px;
  height: 40px;
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  position: relative;
  z-index: 2;
  background: var(--chair-bg);
  font-size: 0.8em;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  transition: transform 0.2s, background-color 0.3s;
  color: var(--text-main);
}

.chair.available {
  border: 2px solid var(--christmas-green);
  color: var(--christmas-green);
}

.chair.available:hover {
  background: var(--christmas-green);
  color: white;
  transform: scale(1.1);
}

.chair.occupied {
  background: var(--chair-occupied);
  color: var(--text-muted);
  border: 1px solid var(--border-color);
  cursor: not-allowed;
}

.chair.selected {
  background: var(--gold-accent);
  color: white;
  border: none;
  animation: pulse 1s infinite;
}

.chair.my-reservation {
  background: #3b82f6;
  color: white;
  border: 1px solid #1d4ed8;
  cursor: pointer;
}

.chair-tooltip {
  position: absolute;
  background: var(--brand-primary);
  color: white;
  padding: 5px 10px;
  border-radius: 4px;
  font-size: 1em;
  white-space: nowrap;
  pointer-events: none;
  display: none;
  bottom: 120%;
  left: 50%;
  transform: translateX(-50%);
  z-index: 100;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.chair-tooltip::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  margin-left: -5px;
  border-width: 5px;
  border-style: solid;
  border-color: var(--brand-primary) transparent transparent transparent;
}

.chair:hover .chair-tooltip {
  display: block;
}

.table-layout {
  position: relative; 
  overflow: visible; 
}

.chair.extra-position {
  position: absolute; 
  top: 50%; 
  transform: translateY(-50%); 
  z-index: 10;
}

.chair.pos-right {
  right: -60px; 
}

.chair.pos-left {
  left: -60px; 
}

.chair.extra-position.available {
  border: 2px solid var(--christmas-green);
  background: var(--chair-bg);
  color: var(--christmas-green);
}

.chair.extra-position.available:hover {
  background: var(--christmas-green);
  color: white;
  transform: translateY(-50%) scale(1.1);
}

.chair.extra-position.occupied {
  background: var(--chair-occupied);
  color: var(--text-muted);
  border: 1px solid var(--border-color);
  cursor: not-allowed;
}

.chair.extra-position.my-reservation {
  background: #3b82f6;
  color: white;
  border: 1px solid #1d4ed8;
  cursor: pointer;
}

.chair.extra-position.my-reservation:hover {
  transform: translateY(-50%) scale(1.1);
}

.admin-owner-badge {
  position: relative;
  cursor: help;
  font-weight: 600;
  color: var(--text-main);
  text-decoration: underline dotted;
}

.admin-owner-badge .owner-tooltip {
  visibility: hidden;
  background-color: #333;
  color: #fff;
  text-align: center;
  border-radius: 6px;
  padding: 5px 10px;
  position: absolute;
  z-index: 10;
  bottom: 125%;
  left: 50%;
  transform: translateX(-50%);
  opacity: 0;
  transition: opacity 0.3s;
  font-size: 0.8rem;
  white-space: nowrap;
  pointer-events: none;
}

.admin-owner-badge .owner-tooltip::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  margin-left: -5px;
  border-width: 5px;
  border-style: solid;
  border-color: #333 transparent transparent transparent;
}

.admin-owner-badge:hover .owner-tooltip {
  visibility: visible;
  opacity: 1;
}

.actions {
  text-align: center;
  margin-top: 40px;
  display: none;
}

.btn-export {
  background: var(--brand-primary);
  color: white;
  padding: 15px 30px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-weight: bold;
}

footer {
  background-color: #324158;
  color: white;
  margin-top: auto;
  font-size: 0.95em;
  display: none;
}

.footer-content {
  max-width: 1600px;
  margin: 0 auto;
  padding: 50px 20px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 200px;
}

.footer-logo {
  display: flex;
  justify-content: flex-end;
}

.footer-logo img {
  max-width: 220px;
  height: auto;
}

.footer-info {
  text-align: center;
  white-space: nowrap;
}

.footer-info h3 {
  font-size: 1.5em;
  margin-bottom: 20px;
  font-weight: 700;
}

.footer-info p {
  margin-bottom: 8px;
  color: #e2e8f0;
  line-height: 1.6;
}

.footer-email {
  color: var(--footer-email) !important;
  text-decoration: none;
  font-weight: 500;
}

.footer-social {
  display: flex;
  justify-content: flex-start;
  gap: 15px;
}

.social-icon {
  width: 45px;
  height: 45px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.5em;
  text-decoration: none;
  border-radius: 4px;
  transition: transform 0.2s;
}

.social-icon:hover {
  transform: translateY(-3px);
}

.social-fb {
  background-color: #1877f2;
}
.social-yt {
  background-color: #ff0000;
}
.social-insta {
  background: radial-gradient(
    circle at 30% 107%,
    #fdf497 0%,
    #fdf497 5%,
    #fd5949 45%,
    #d6249f 60%,
    #285aeb 90%
  );
}

.footer-bottom {
  background-color: var(--card-bg);
  color: var(--text-main);
  text-align: center;
  padding: 15px;
  font-size: 0.85em;
  font-weight: 600;
}

.footer-map-container {
  margin-top: 15px;
  width: 100%;
  max-width: 350px;
  height: 200px;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
  border: 2px solid var(--gold-accent);
  margin-left: auto;
  margin-right: auto;
}

.footer-map-container iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(15, 23, 42, 0.9);
  z-index: 2000;
  justify-content: center;
  align-items: center;
}

.modal.active {
  display: flex;
}

.modal-content {
  background: var(--card-bg);
  padding: 30px;
  border-radius: 8px;
  width: 90%;
  max-width: 450px;
  border-top: 4px solid var(--gold-accent);
  color: var(--text-main);
}

.form-group {
  margin-bottom: 15px;
}

.form-group label {
  display: block;
  margin-bottom: 5px;
  font-weight: 600;
  color: var(--text-main);
}

.form-group input,
.form-group select {
  width: 100%;
  padding: 10px;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  background-color: var(--input-bg);
  color: var(--text-main);
}

.button-group {
  display: flex;
  gap: 10px;
  margin-top: 20px;
}

.btn {
  flex: 1;
  padding: 12px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-weight: bold;
}

.btn-primary {
  background: var(--gold-accent);
  color: white;
}
.btn-secondary {
  background: var(--border-color);
  color: var(--text-muted);
}
.btn-danger {
  background: var(--christmas-red);
  color: white;
}

@media (max-width: 1400px) {
  .footer-content {
    gap: 80px;
  }
}

@media (max-width: 1200px) {
  .entrance-marker {
    display: none;
  }
}

@media (max-width: 1100px) {
  .chair.pos-right {
    right: -35px; 
  }
  
  .chair.pos-left {
    left: -35px; 
  }
  
  .tables-layout-wrapper {
    gap: 80px;
  }
}

@media (max-width: 1100px) {
  .tables-layout-wrapper {
    flex-direction: row;
    justify-content: flex-start;
    overflow-x: auto;
    width: 100%;
    padding-bottom: 50px;
  }

  .chair {
    width: 25px;
    height: 25px;
    font-size: 0.6em;
  }

  .table-24 {
    grid-template-columns: repeat(12, 25px);
  }
  .table-16 {
    grid-template-columns: repeat(8, 25px);
  }

  .table-layout::before {
    height: 20px;
    font-size: 0.6em;
  }

  .table-layout {
    gap: 25px 4px;
  }

  .tables-column {
    gap: 20px;
  }

  .container {
    padding: 15px;
    width: 100%;
  }
}

@media (max-width: 900px) {
  .footer-content {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 40px;
  }
  .footer-logo,
  .footer-social {
    justify-content: center;
  }
  .footer-info {
    white-space: normal;
  }
  
  .table-flex-container {
    transform: scale(0.9);
    gap: 5px;
  }
}

.snow-particle {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 10px;
  height: 10px;
  pointer-events: none;
  font-size: 30px;
  line-height: 1;
  color: white;
  text-shadow: 0 0 2px var(--brand-primary);
  z-index: 50;
  animation: snow-explode 1s ease-out forwards;
}

@keyframes snow-explode {
  0% {
    transform: translate(-50%, -50%) scale(0.5);
    opacity: 1;
  }
  100% {
    transform: translate(calc(-50% + var(--tx)), calc(-50% + var(--ty)))
      scale(0);
    opacity: 0;
  }
}

@keyframes pulse {
  0% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(197, 160, 89, 0.7);
  }
  70% {
    transform: scale(1.1);
    box-shadow: 0 0 0 10px rgba(197, 160, 89, 0);
  }
  100% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(197, 160, 89, 0);
  }
}

.table-flex-container {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 20px;
}

.chair.head-chair {
  border-radius: 50% !important; 
  z-index: 5;
  box-shadow: 0 4px 6px rgba(0,0,0,0.1); 
}

.scroll-hint-overlay {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
background: rgba(0, 0, 0, 0.4);
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
z-index: 900;
pointer-events: none;
transition: opacity 0.5s ease;
border-radius: 10px;
}

.scroll-hint-content {
color: white;
text-align: center;
font-weight: bold;
font-size: 1.2rem;
text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}

.hand-icon {
font-size: 3rem;
display: block;
margin-bottom: 10px;
animation: swipeAnim 2s infinite;
}

@keyframes swipeAnim {
0% { transform: translateX(20px); opacity: 0.5; }
50% { transform: translateX(-20px); opacity: 1; }
100% { transform: translateX(20px); opacity: 0.5; }
}

.scroll-hint-hidden {
opacity: 0;
pointer-events: none;
}