/* ==================================================
   BORALÁ PUB — Painel do Vendedor & Cozinha (KDS)
   ================================================== */

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

body {
  font-family: 'Open Sans', sans-serif;
  background: #121316;
  color: #e5e5e5;
  line-height: 1.5;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ---------- Top Bar ---------- */
#admin-topbar {
  background: #000000;
  border-bottom: 3px solid #f5cb15;
  padding: 12px 20px;
  position: sticky;
  top: 0;
  z-index: 100;
}

.topbar-inner {
  max-width: 1300px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.btn-back-cardapio {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: #222222;
  color: #f5cb15;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  font-size: 16px;
  transition: all 0.2s ease;
}

.btn-back-cardapio:hover {
  background: #f5cb15;
  color: #000000;
}

.brand-title h1 {
  font-family: 'Montserrat', sans-serif;
  font-size: 18px;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: 0.5px;
}

.brand-title span {
  font-size: 11px;
  color: #f5cb15;
  font-weight: 600;
  text-transform: uppercase;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-action-top {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 20px;
  background: #25272d;
  color: #ffffff;
  border: 1px solid #383a42;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-action-top:hover {
  background: #383a42;
  border-color: #f5cb15;
}

.btn-sound.active {
  color: #27ae60;
  border-color: #27ae60;
}

/* ---------- Container ---------- */
.admin-container {
  max-width: 1300px;
  margin: 20px auto;
  padding: 0 16px;
  flex: 1;
  width: 100%;
}

/* ---------- Tabs Bar ---------- */
.tabs-container {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 12px;
  margin-bottom: 20px;
  scrollbar-width: none;
}

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

.tab-btn {
  padding: 10px 18px;
  border-radius: 25px;
  background: #1c1d22;
  color: #999999;
  border: 1px solid #2a2c33;
  font-family: 'Montserrat', sans-serif;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s ease;
}

.tab-btn:hover {
  background: #272930;
  color: #ffffff;
}

.tab-btn.active {
  background: #f5cb15;
  color: #000000;
  border-color: #f5cb15;
}

.tab-badge {
  background: rgba(0,0,0,0.3);
  padding: 2px 7px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 800;
}

.tab-btn.active .tab-badge {
  background: #000000;
  color: #f5cb15;
}

.badge-pending {
  background: #f39c12 !important;
  color: #ffffff !important;
  animation: pulse-badge 1.5s infinite;
}

.badge-prep {
  background: #e67e22 !important;
  color: #ffffff !important;
}

.badge-ready {
  background: #2980b9 !important;
  color: #ffffff !important;
}

@keyframes pulse-badge {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.7; transform: scale(1.08); }
}

/* ---------- Orders Grid ---------- */
.orders-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 18px;
}

/* Empty State */
.empty-orders {
  grid-column: 1 / -1;
  text-align: center;
  padding: 60px 20px;
  background: #1a1b20;
  border-radius: 16px;
  border: 1px dashed #333640;
}

.empty-orders i {
  font-size: 54px;
  color: #444754;
  margin-bottom: 14px;
}

.empty-orders h3 {
  font-family: 'Montserrat', sans-serif;
  font-size: 18px;
  color: #ffffff;
  margin-bottom: 8px;
}

.empty-orders p {
  color: #888888;
  font-size: 13px;
}

/* ---------- Order Card ---------- */
.order-card {
  background: #1c1d24;
  border-radius: 14px;
  border: 1px solid #2d303a;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  position: relative;
}

.order-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0,0,0,0.4);
}

.order-card.status-pendente {
  border-left: 5px solid #f1c40f;
}

.order-card.status-preparando {
  border-left: 5px solid #e67e22;
}

.order-card.status-pronto {
  border-left: 5px solid #2ecc71;
}

.order-card.status-concluido {
  border-left: 5px solid #7f8c8d;
  opacity: 0.85;
}

/* Card Header */
.order-card-header {
  padding: 12px 14px;
  background: #23252e;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #2d303a;
}

.order-id-badge {
  font-family: 'Montserrat', sans-serif;
  font-size: 14px;
  font-weight: 800;
  color: #f5cb15;
}

.order-time {
  font-size: 11px;
  color: #aaaaaa;
  display: flex;
  align-items: center;
  gap: 4px;
}

.order-status-pill {
  padding: 3px 9px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}

.pill-pendente {
  background: #f39c12;
  color: #000;
}

.pill-preparando {
  background: #e67e22;
  color: #fff;
}

.pill-pronto {
  background: #27ae60;
  color: #fff;
}

.pill-concluido {
  background: #4b5563;
  color: #e5e7eb;
}

/* Customer Block */
.order-customer-box {
  padding: 12px 14px;
  background: #181920;
  border-bottom: 1px solid #272933;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.customer-name {
  font-family: 'Montserrat', sans-serif;
  font-size: 14px;
  font-weight: 700;
  color: #ffffff;
}

.customer-phone {
  font-size: 12px;
  color: #aaaaaa;
  display: flex;
  align-items: center;
  gap: 5px;
  margin-top: 3px;
}

.customer-phone a {
  color: #25d366;
  text-decoration: none;
}

.customer-phone a:hover {
  text-decoration: underline;
}

.order-type-tag {
  padding: 3px 8px;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

.tag-delivery {
  background: rgba(52, 152, 219, 0.15);
  color: #3498db;
  border: 1px solid #3498db;
}

.tag-pickup {
  background: rgba(241, 196, 15, 0.15);
  color: #f1c40f;
  border: 1px solid #f1c40f;
}

/* Address Block */
.order-address-box {
  padding: 8px 14px;
  background: #16171d;
  font-size: 12px;
  color: #cccccc;
  border-bottom: 1px solid #272933;
}

.order-address-box i {
  color: #f5cb15;
  margin-right: 4px;
}

/* Items List */
.order-items-box {
  padding: 12px 14px;
  flex: 1;
}

.order-item-row {
  margin-bottom: 10px;
  padding-bottom: 8px;
  border-bottom: 1px dashed #2a2c36;
}

.order-item-row:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

.order-item-title-row {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  font-weight: 700;
  color: #ffffff;
}

.order-item-addons-list {
  margin-top: 4px;
  padding-left: 12px;
  font-size: 11px;
  color: #f5cb15;
}

.order-item-obs-box {
  margin-top: 4px;
  background: #2a2211;
  color: #f39c12;
  border-left: 3px solid #f1c40f;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-style: italic;
}

/* Payment & Total */
.order-finance-box {
  padding: 10px 14px;
  background: #20222a;
  border-top: 1px solid #2b2e38;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
}

.payment-desc {
  color: #aaaaaa;
}

.order-total-price {
  font-family: 'Montserrat', sans-serif;
  font-size: 16px;
  font-weight: 800;
  color: #2ecc71;
}

/* Preparation Time Display */
.prep-info-tag {
  padding: 6px 14px;
  background: #2b1f13;
  color: #f39c12;
  font-size: 12px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
  border-top: 1px solid #3d2a17;
}

/* Card Actions */
.order-actions-box {
  padding: 10px 14px;
  background: #181920;
  border-top: 1px solid #272933;
  display: flex;
  gap: 8px;
}

.btn-order-action {
  flex: 1;
  padding: 10px 8px;
  border-radius: 8px;
  border: none;
  font-family: 'Montserrat', sans-serif;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.2s ease;
}

/* Action Button Variants */
.btn-accept-prep {
  background: #27ae60;
  color: #ffffff;
}

.btn-accept-prep:hover {
  background: #2ecc71;
  transform: scale(1.02);
}

.btn-ready-dispatch {
  background: #2980b9;
  color: #ffffff;
}

.btn-ready-dispatch:hover {
  background: #3498db;
}

.btn-finish-order {
  background: #34495e;
  color: #ffffff;
}

.btn-finish-order:hover {
  background: #47607a;
}

.btn-details-order {
  width: 40px;
  flex: none;
  background: #2c2f38;
  color: #ffffff;
  border: 1px solid #3f424e;
}

.btn-details-order:hover {
  background: #3f424e;
}

/* ---------- Modals ---------- */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.75);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-card {
  background: #1c1d24;
  border-radius: 14px;
  width: 90%;
  max-width: 480px;
  border: 1px solid #333644;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0,0,0,0.6);
  transform: scale(0.95);
  transition: transform 0.2s ease;
}

.modal-overlay.active .modal-card {
  transform: scale(1);
}

.modal-header {
  padding: 14px 18px;
  background: #242630;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #333644;
}

.modal-header h3 {
  font-family: 'Montserrat', sans-serif;
  font-size: 15px;
  font-weight: 700;
  color: #ffffff;
  display: flex;
  align-items: center;
  gap: 8px;
}

.modal-header-accept {
  background: #27ae60;
}

.modal-header-accept h3 {
  color: #ffffff;
}

.modal-close {
  background: transparent;
  color: #ffffff;
  border: none;
  font-size: 24px;
  cursor: pointer;
  line-height: 1;
}

.modal-body {
  padding: 18px;
}

.modal-lead {
  font-size: 14px;
  color: #dddddd;
  margin-bottom: 16px;
}

.prep-time-box {
  background: #232530;
  border-radius: 10px;
  padding: 14px;
  margin-bottom: 16px;
}

.prep-time-box label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: #f5cb15;
  margin-bottom: 8px;
}

.prep-time-selector {
  display: flex;
  gap: 8px;
  margin-bottom: 10px;
}

.prep-time-selector button {
  flex: 1;
  padding: 8px 4px;
  border-radius: 8px;
  background: #181920;
  color: #cccccc;
  border: 1px solid #333644;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

.prep-time-selector button.active {
  background: #f5cb15;
  color: #000000;
  font-weight: 700;
  border-color: #f5cb15;
}

.prep-time-box input {
  width: 100%;
  height: 42px;
  border-radius: 8px;
  background: #181920;
  border: 1px solid #383b48;
  color: #ffffff;
  font-size: 16px;
  font-weight: 700;
  text-align: center;
  outline: none;
}

.checkbox-notify label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: #cccccc;
  cursor: pointer;
}

.modal-footer {
  padding: 14px 18px;
  background: #242630;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  border-top: 1px solid #333644;
}

.btn-cancel {
  padding: 10px 16px;
  border-radius: 8px;
  background: transparent;
  color: #aaaaaa;
  border: 1px solid #444754;
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
}

.btn-confirm-accept {
  padding: 10px 20px;
  border-radius: 8px;
  background: #27ae60;
  color: #ffffff;
  border: none;
  font-family: 'Montserrat', sans-serif;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-confirm-accept:hover {
  background: #2ecc71;
}

/* Toast */
.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: #27ae60;
  color: #ffffff;
  padding: 12px 20px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 700;
  box-shadow: 0 6px 18px rgba(0,0,0,0.4);
  z-index: 3000;
  opacity: 0;
  transform: translateY(20px);
  pointer-events: none;
  transition: all 0.3s ease;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

/* Footer VeroCode */
#admin-footer {
  text-align: center;
  padding: 24px 16px;
  background: #0d0e11;
  font-size: 12px;
  color: #777777;
  border-top: 1px solid #22242b;
  margin-top: 40px;
}

.verocode-credit a {
  color: #f5cb15;
  text-decoration: none;
  font-weight: 600;
}

.verocode-credit a:hover {
  text-decoration: underline;
}

/* Responsive */
@media (max-width: 600px) {
  .hide-mobile {
    display: none;
  }
  .orders-grid {
    grid-template-columns: 1fr;
  }
}

/* ==================================================
   ADMIN LOGIN GATEWAY (KITCHEN & SELLER)
   ================================================== */
.admin-auth-overlay {
  position: fixed;
  inset: 0;
  background: radial-gradient(circle at center, #1e2027 0%, #0c0d10 100%);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.admin-login-card {
  width: 100%;
  max-width: 420px;
  background: #181a20;
  border: 2px solid #2b2e38;
  border-top: 4px solid #f5cb15;
  border-radius: 18px;
  padding: 32px 28px;
  box-shadow: 0 16px 48px rgba(0,0,0,0.6);
  animation: modalScale 0.3s ease;
}

.admin-login-header {
  text-align: center;
  margin-bottom: 24px;
}

.admin-login-icon {
  font-size: 46px;
  margin-bottom: 8px;
}

.admin-login-header h2 {
  font-family: 'Montserrat', sans-serif;
  font-size: 20px;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
}

.admin-login-header span {
  font-size: 12px;
  color: #f5cb15;
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.admin-login-alert {
  background: rgba(231, 76, 60, 0.15);
  border: 1px solid #e74c3c;
  color: #ff6b6b;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.admin-form-group {
  margin-bottom: 18px;
}

.admin-form-group label {
  display: block;
  font-size: 12.5px;
  font-weight: 700;
  color: #b0b3bc;
  margin-bottom: 8px;
}

.admin-form-group input {
  width: 100%;
  height: 46px;
  background: #21242d;
  border: 1px solid #323642;
  border-radius: 8px;
  padding: 0 14px;
  color: #ffffff;
  font-size: 14px;
  font-family: inherit;
  transition: all 0.2s ease;
}

.admin-form-group input:focus {
  background: #252833;
  border-color: #f5cb15;
  outline: none;
  box-shadow: 0 0 0 3px rgba(245, 203, 21, 0.18);
}

.admin-pass-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.admin-pass-wrapper input {
  padding-right: 44px;
}

.btn-toggle-admin-pass {
  position: absolute;
  right: 10px;
  background: transparent;
  border: none;
  color: #888888;
  font-size: 16px;
  cursor: pointer;
  padding: 6px;
  transition: color 0.15s ease;
}

.btn-toggle-admin-pass:hover {
  color: #f5cb15;
}

.btn-admin-submit {
  width: 100%;
  height: 48px;
  background: #f5cb15;
  color: #000000;
  border: none;
  border-radius: 8px;
  font-family: 'Montserrat', sans-serif;
  font-size: 14px;
  font-weight: 800;
  text-transform: uppercase;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 24px;
  transition: all 0.2s ease;
  box-shadow: 0 4px 14px rgba(245, 203, 21, 0.25);
}

.btn-admin-submit:hover {
  background: #e0b80d;
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(245, 203, 21, 0.35);
}

.admin-login-footer {
  text-align: center;
  margin-top: 20px;
}

.link-back-site {
  color: #7b8090;
  text-decoration: none;
  font-size: 12.5px;
  font-weight: 600;
  transition: color 0.15s ease;
}

.link-back-site:hover {
  color: #ffffff;
}

.btn-logout {
  background: #3a1c1c !important;
  border-color: #5c2323 !important;
  color: #ff8585 !important;
}

.btn-logout:hover {
  background: #e74c3c !important;
  color: #ffffff !important;
}

