body {
  margin: 0;
  padding: 0;
  background: linear-gradient(135deg, #0e2a36, #0f1f2b);
  font-family: 'Segoe UI', sans-serif;
  overflow-x: hidden;
  overflow-y: auto;
}

.hidden {
  display: none;
}

* {
  -webkit-tap-highlight-color: transparent;
}

/* ===== Page layout ===== */
.tables-topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  background: rgba(20, 38, 52, 0.5);
  backdrop-filter: blur(10px);
  backdrop-filter: blur(6px);
  color: #fff;
}

.tables-topbar .title {
  font-weight: 700;
  font-size: 16px;
}

.tables-topbar {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.tables-topbar .actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

.btn {
  border: none;
  border-radius: 10px;
  padding: 8px 10px;
  cursor: pointer;
  font-weight: 600;
}

.btn.secondary {
  background: #142634;
  color: #fff;
}

.btn.primary {
  background: #ff6600;
  color: #fff;
}

/* ===== Tables container ===== */
#tablesPage {
  width: 100%;
  overflow: visible;
  padding: 18px 14px 30px;
  box-sizing: border-box;
}


.table-card {
  border-radius: 20px;
  overflow: hidden;
  transition: 0.3s ease;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
  cursor: pointer;
  position: relative;
}

.table-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.4);
}

/* статус (из main.html) */
/* ջնջիր սա */
.table-header-row {
  border-bottom: none;
}

.table-card {
  background: transparent;
}

/* CARD BASE */
.table-card {
  background: #ffffff;
  border-radius: 20px;
  overflow: hidden;
}

/* HEADER */
.table-card.free .table-header-row {
  background: #139081;
  color: #fff;
}

.table-card.busy .table-header-row {
  background: #ff6600;
  color: #fff;
  display: flex;
  gap: 6px;
  flex: 1;
  /* 🔥 ՍԱ Է ԿԱՐԵՎՈՐԸ */
  align-items: center;
}

.table-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 12px;
  font-weight: 600;
  font-size: 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.table-header-row .left {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.table-header-row .waiter {
  font-size: 14px;
  opacity: 0.95;
}

.table-header-row .right {
  font-weight: 700;
  font-size: 16px;
  min-width: 60px;
}

.table-header-row {
  border-bottom: none;
  align-items: center;
}

.table-title {
  font-weight: 700;
}

.waiter {
  font-size: 13px;
  opacity: 0.8;
}

.table-header-row .right {
  min-width: 60px;
  text-align: right;
  white-space: nowrap;
}

/* վերևը գունավոր ըստ status */
.table-card.free .table-header-row {
  background: #139081;
  color: #fff;
}

.table-card.busy .table-header-row {
  background: #ff6600;
  color: #fff;
}

/* վերև */
.table-card.free .table-header-row {
  background: #139081;
  color: #fff;
}

.table-card.busy .table-header-row {
  background: #ff6600;
  color: #fff;
}

.table-header-row {
  border-top-left-radius: 20px;
  border-top-right-radius: 20px;
  border-bottom: none;
}

/* ներքև */
.table-body {
  border-top: 4px solid #fff;
  background: #fff;
  color: #000;
  border-bottom-left-radius: 20px;
  border-bottom-right-radius: 20px;
  padding: 10px 12px;
  /* 🔥 добавили паддинг */
  min-height: 120px;
  /* 🔥 фикс высоты */
  max-height: 120px;
  /* 🔥 фикс высоты */
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  font-weight: 600;
}


.card-rows {
  font-size: 13px;
  opacity: 0.95;
  color: #000000;
}




.tables {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

@media (max-width: 1100px) {
  .tables {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 900px) {
  .tables {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 575px) {
  .tables {
    grid-template-columns: 1fr;
  }
}
.waiter {
  font-size: 13px;
  opacity: 0.8;

  text-align: right;
  /* 🔥 աջ align */
  width: 100%;
  /* 🔥 ամբողջ լայնությամբ */
}
.top-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}
.table-title {
  font-weight: 700;
  white-space: nowrap;
  /* 🔥 ՍԱ ԿՓՐԿԻ ՔԵԶ */
}

/* ===== Modal (waiter) ===== */
.modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.modal.hidden {
  display: none;
}

.modal-content {
  background: rgba(241, 241, 241, 0.80);
  width: 90%;
  max-width: 300px;
  border-radius: 20px;
  padding: 18px;
  box-sizing: border-box;
}

.row-comment {
  font-size: 12px;
  opacity: 0.6;
  margin-top: 2px;
  line-height: 1.2;
}

.card-rows {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.table-body {
  display: flex;
  flex-direction: column;

  min-height: 120px;
  max-height: 120px;
  /* 🔥 մի քիչ ավել տեղ */

  overflow: hidden;
  /* կարևոր */
}
.table-body-content {
  flex: 1;
  overflow: hidden;
}
.table-body-content {
  flex: 1;
}
.table-footer {

  display: flex;
  justify-content: flex-end;
  /* 🔥 աջ */
  align-items: center;

  font-weight: 700;
  font-size: 16px;

  border-top: 1px solid rgba(0, 0, 0, 0.1);

  background: rgba(255, 255, 255, 0.6);
  /* թեթև թափանցիկ */
  backdrop-filter: blur(4px);
}


.modal-content {
  position: relative;
  padding-top: 10px;
}

.modal-header {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 15px;
}

.modal-title {
  font-size: 20px;
  font-weight: 700;
  color: #142634;
}

.modal-close {
  font-size: 22px;
  cursor: pointer;
  color: #999;
  transition: 0.2s;
}

.modal-close:hover {
  color: #ff6600;
}

#waiterPassword {
  width: 100%;
  padding: 12px 14px;
  margin-top: 10px;
  border-radius: 12px;
  border: 2px solid #ddd;
  outline: none;
  font-size: 16px;
  transition: 0.2s;
  box-sizing: border-box;
}

#waiterPassword:focus {
  border-color: #ff6600;
  box-shadow: 0 0 0 2px rgba(255, 102, 0, 0.15);
}



/* 
    #loginBtn {
      width: 100%;
      height: 90px;
      margin-top: 15px;
      padding: 12px;
      border-radius: 12px;
      border: none;
      background: #ff6600;
      color: white;
      font-weight: 700;
      font-size: 18px;
      cursor: pointer;
    } */
.pin-display input {
  text-align: center;
  font-size: 22px;
  letter-spacing: 6px;
  background: #fff;
  cursor: default;
}

/* GRID */
.pin-pad {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 15px;
}

/* КНОПКИ */
.pin-btn {
  padding: 16px;
  font-size: 28px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.15);

  background: rgba(20, 38, 52, 0.7);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);

  color: #fff;
  cursor: pointer;
  transition: 0.2s;

  height: 60px;
  font-weight: 700;
}

.pin-btn.null {
  grid-column: 2;


}

.pin-btn:hover {
  background: rgba(20, 38, 52, 0.9);
}

.pin-btn:active {
  transform: scale(0.95);
}



/* PIN dots */
.pin-dots {
  display: flex;
  justify-content: center;
  gap: 14px;
  margin: 20px 0;
}

.dot {
  width: 16px;
  height: 16px;
  border-radius: 50%;

  border: 2px solid #142634;
  /* контур */
  background: transparent;
  opacity: 0.7;
  transition: 0.2s;
}

.dot.filled {
  background: #142634;
  transform: scale(1.2);
  animation: pop 0.15s ease;
  opacity: 1;
}

@keyframes pop {
  0% {
    transform: scale(0.6);
  }

  100% {
    transform: scale(1.2);
  }
}

.dot.filled {
  background: #142634;
  transform: scale(1.2);
}

/* shake animation */
@keyframes shake {
  0% {
    transform: translateX(0);
  }

  20% {
    transform: translateX(-6px);
  }

  40% {
    transform: translateX(6px);
  }

  60% {
    transform: translateX(-6px);
  }

  80% {
    transform: translateX(6px);
  }

  100% {
    transform: translateX(0);
  }
}

.pin-dots.shake {
  animation: shake 0.3s;
}









.app-loader {
  position: fixed;
  inset: 0;
  background: radial-gradient(circle at center, #142634, #0f1f2b);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 99999;
  transition: opacity 0.4s ease;
}

.app-loader.hidden {
  opacity: 0;
  pointer-events: none;
}

.loader-content {
  text-align: center;
}

/* ЛОГО */
.loader-logo {
  width: 160px;
  margin-bottom: 20px;
  animation: logoPop 0.6s ease;
}

@keyframes logoPop {
  0% {
    transform: scale(0.6);
    opacity: 0;
  }

  100% {
    transform: scale(1);
    opacity: 1;
  }
}

/* DOTS */
.loader-dots {
  display: flex;
  justify-content: center;
  gap: 10px;
}

.loader-dots span {
  width: 10px;
  height: 10px;
  background: #ff6600;
  border-radius: 50%;
  opacity: 0.3;
  animation: bounce 1s infinite;
}

.loader-dots span:nth-child(2) {
  animation-delay: 0.2s;
}

.loader-dots span:nth-child(3) {
  animation-delay: 0.4s;
}

@keyframes bounce {

  0%,
  80%,
  100% {
    transform: translateY(0);
    opacity: 0.3;
  }

  40% {
    transform: translateY(-10px);
    opacity: 1;
  }
}



.app-loader.fade-out {
  animation: loaderFadeOut 0.6s ease forwards;
}

@keyframes loaderFadeOut {
  0% {
    opacity: 1;
    transform: scale(1);
    filter: blur(0px);
  }

  60% {
    opacity: 1;
    transform: scale(1.05);
    filter: blur(2px);
  }

  100% {
    opacity: 0;
    transform: scale(1.1);
    filter: blur(6px);
  }
}

/* логотип отдельно чуть усилим */
.app-loader.fade-out .loader-logo {
  animation: logoExit 0.6s ease forwards;
}

@keyframes logoExit {
  0% {
    transform: scale(1);
  }

  100% {
    transform: scale(1.2);
    opacity: 0;
  }
}

.table-card.waiting_payment .table-header-row {
  background: #d92d20;
  color: #fff;
}

.logo img {
  height: clamp(32px, 6vw, 50px);
  width: auto;
  object-fit: contain;
  display: block;
}
.left-header {
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo {
  display: flex;
  align-items: center;
}














.transfer-modal-content {
  max-width: 760px;
  width: min(92vw, 760px);
  max-height: 85vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  padding: 20px;
  border-radius: 24px;
  background: rgba(241, 241, 241, 0.92);
  backdrop-filter: blur(12px);
}

.transfer-rows {
  margin-top: 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  overflow-y: auto;
  padding-right: 4px;
}

.transfer-row {
  background: rgba(255, 255, 255, 0.92);
  border-radius: 18px;
  padding: 14px;
  border: 1px solid rgba(20, 38, 52, 0.08);
}

.transfer-row-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}

.transfer-order-code {
  font-size: 18px;
  font-weight: 700;
  color: #142634;
}

.transfer-order-meta {
  font-size: 14px;
  color: #5b6570;
}

.transfer-row-map {
  display: grid;
  grid-template-columns: 1fr 40px 1fr;
  gap: 10px;
  align-items: center;
}

.transfer-box {
  background: #f7f8fa;
  border-radius: 14px;
  padding: 12px;
  border: 1px solid rgba(20, 38, 52, 0.08);
}

.transfer-label {
  font-size: 12px;
  color: #7a8591;
  margin-bottom: 6px;
}

.transfer-value {
  font-size: 16px;
  font-weight: 700;
  color: #142634;
}

.transfer-arrow {
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 24px;
  color: #ff6600;
  font-weight: 700;
}

.transfer-select {
  width: 100%;
  height: 44px;
  border-radius: 12px;
  border: 1px solid rgba(20, 38, 52, 0.12);
  background: #fff;
  padding: 0 12px;
  font-size: 15px;
  outline: none;
}

.transfer-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 16px;
  flex-wrap: wrap;
}

.transfer-save-btn,
.transfer-cancel-btn {
  min-width: 140px;
  height: 44px;
}

.transfer-empty {
  text-align: center;
  padding: 30px 10px;
  color: #5b6570;
  font-size: 16px;
}

@media (max-width: 700px) {
  .transfer-row-map {
    grid-template-columns: 1fr;
  }

  .transfer-arrow {
    transform: rotate(90deg);
  }

  .transfer-actions {
    justify-content: stretch;
  }

  .transfer-save-btn,
  .transfer-cancel-btn {
    width: 100%;
  }
}












.transfer-dropdown {
  position: relative;
  width: 100%;
}

.transfer-dropdown-toggle {
  width: 100%;
  min-height: 46px;
  border: 1px solid rgba(20, 38, 52, 0.12);
  background: #fff;
  border-radius: 14px;
  padding: 0 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  cursor: pointer;
  font-size: 15px;
  font-weight: 600;
  color: #142634;
  transition: 0.2s ease;
  box-sizing: border-box;
}

.transfer-dropdown-toggle:hover {
  border-color: rgba(255, 102, 0, 0.45);
  box-shadow: 0 0 0 3px rgba(255, 102, 0, 0.08);
}

.transfer-dropdown.open .transfer-dropdown-toggle {
  border-color: #ff6600;
  box-shadow: 0 0 0 3px rgba(255, 102, 0, 0.12);
}

.transfer-dropdown-text {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.transfer-dropdown-icon {
  flex-shrink: 0;
  margin-top: -10px ;
  font-size: 18px;
  color: #ff6600;
  transition: transform 0.2s ease;
}

/* .transfer-dropdown.open .transfer-dropdown-icon {
  transform: rotate(180deg);
} */

.transfer-dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  background: #fff;
  border: 1px solid rgba(20, 38, 52, 0.1);
  border-top-left-radius: 14px;
  border-bottom-left-radius: 14px;
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.12);
  padding: 8px;
  display: none;
  z-index: 30;
  max-height: 220px;
  overflow-y: auto;
}

.transfer-dropdown.open .transfer-dropdown-menu {
  display: block;
}

.transfer-dropdown-item {
  width: 100%;
  border: none;
  background: transparent;
  text-align: left;
  padding: 12px 12px;
  border-radius: 10px;
  cursor: pointer;
  font-size: 15px;
  font-weight: 600;
  color: #142634;
  transition: 0.18s ease;
}

.transfer-dropdown-item:hover {
  background: rgba(255, 102, 0, 0.08);
  color: #ff6600;
}

.transfer-dropdown-item.selected {
  background: rgba(255, 102, 0, 0.14);
  color: #ff6600;
}



.transfer-btn {
  display: flex;
  align-items: center;
  gap: 8px;
}

.transfer-btn img {
  height: 20px;
  width: auto;
  object-fit: contain;
}
.transfer-icon {
  height: 28px !important;   /* 🔥 фикс размера */
  width: auto;
  max-height: 28px;
  display: block;
  object-fit: contain;
}