/* Shared professional chrome for Admin & Partner consoles */

.portal-login {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(1000px 500px at 15% 10%, rgba(25, 165, 87, 0.22), transparent 55%),
    radial-gradient(800px 400px at 85% 90%, rgba(8, 66, 54, 0.45), transparent 55%),
    linear-gradient(160deg, #071914 0%, #084236 50%, #041712 100%);
  padding: 24px;
}

.portal-login-card {
  background: #ffffff;
  border-radius: 24px;
  padding: 38px 34px 30px;
  max-width: 420px;
  width: 100%;
  text-align: center;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.35), 0 0 0 1px rgba(255, 255, 255, 0.08);
  box-sizing: border-box;
}

.portal-login-mark {
  width: 54px;
  height: 54px;
  margin: 0 auto 18px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #084236, #19a557);
  color: #ffffff;
  box-shadow: 0 10px 24px rgba(25, 165, 87, 0.35);
}

.portal-login-mark svg {
  width: 26px;
  height: 26px;
  stroke: #ffffff;
}

.portal-login-card h2 {
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.03em;
  margin: 0 0 6px;
  color: #0f172a;
}

.portal-login-card p.lead {
  font-size: 13.5px;
  color: #64748b;
  margin: 0 0 22px;
  line-height: 1.5;
}

.portal-field {
  display: flex;
  justify-content: space-between;
  align-items: center;
  text-align: left;
  font-size: 13px;
  font-weight: 600;
  color: #334155;
  margin: 0 0 6px;
}

.portal-field a {
  font-size: 12.5px;
  color: #19a557;
  font-weight: 600;
  text-decoration: none;
  transition: color 0.15s ease;
}
.portal-field a:hover {
  color: #084236;
  text-decoration: underline;
}

.portal-input-group {
  position: relative;
  width: 100%;
  box-sizing: border-box;
  margin-bottom: 14px;
  text-align: left;
}

.portal-login-card input[type="email"],
.portal-login-card input[type="password"],
.portal-login-card input[type="text"],
.portal-login-card input {
  width: 100% !important;
  box-sizing: border-box !important;
  padding: 13px 16px;
  border: 1.5px solid #e2e8f0;
  border-radius: 12px;
  font-size: 15px;
  font-family: inherit;
  color: #0f172a;
  background: #f8fafc;
  outline: none;
  margin: 0;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease;
}

.portal-login-card input.with-toggle {
  padding-right: 46px !important;
}

.portal-login-card input:focus {
  border-color: #19a557 !important;
  background: #ffffff !important;
  box-shadow: 0 0 0 4px rgba(25, 165, 87, 0.16) !important;
}

.portal-pwd-toggle {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  width: 34px;
  height: 34px;
  border: none;
  background: transparent;
  color: #64748b;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border-radius: 8px;
  padding: 0;
  transition: color 0.15s, background-color 0.15s;
}

.portal-pwd-toggle:hover {
  color: #084236;
  background: #f1f5f9;
}

.portal-btn-primary {
  width: 100%;
  box-sizing: border-box;
  padding: 13px 16px;
  border-radius: 12px;
  border: none;
  background: linear-gradient(135deg, #084236, #19a557);
  color: #ffffff;
  font-weight: 700;
  font-size: 15px;
  cursor: pointer;
  margin-top: 4px;
  margin-bottom: 14px;
  box-shadow: 0 8px 20px rgba(8, 66, 54, 0.22);
  transition: transform 0.12s ease, box-shadow 0.15s ease, filter 0.15s ease;
}

.portal-btn-primary:hover {
  filter: brightness(1.06);
  box-shadow: 0 10px 25px rgba(25, 165, 87, 0.32);
}

.portal-btn-primary:active {
  transform: translateY(1px);
}

.portal-btn-ghost {
  width: 100%;
  box-sizing: border-box;
  padding: 12px 16px;
  border-radius: 12px;
  border: 1.5px solid #e2e8f0;
  background: #ffffff;
  color: #1e293b;
  font-weight: 600;
  font-size: 14.5px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.03);
  transition: border-color 0.15s ease, background-color 0.15s ease, box-shadow 0.15s ease;
}

.portal-btn-ghost:hover {
  border-color: #cbd5e1;
  background: #f8fafc;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

.portal-or {
  display: flex;
  align-items: center;
  text-align: center;
  color: #94a3b8;
  font-size: 12px;
  font-weight: 500;
  margin: 14px 0;
}

.portal-or::before,
.portal-or::after {
  content: '';
  flex: 1;
  border-bottom: 1px solid #e2e8f0;
}

.portal-or::before {
  margin-right: 12px;
}

.portal-or::after {
  margin-left: 12px;
}

.portal-error {
  color: #b91c1c;
  background: #fef2f2;
  border: 1.5px solid #fecaca;
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 13px;
  font-weight: 600;
  margin-top: 14px;
  margin-bottom: 4px;
  text-align: left;
  line-height: 1.45;
  display: none;
}

.sidebar-item-icon,
.nav-icon,
.brand-icon,
.sidebar-logo-icon,
.kpi-icon,
.topbar-icon-btn,
.icon-btn,
.topbar-search-icon,
.sidebar-footer-btn span:first-child {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.sidebar-item-icon svg,
.nav-icon svg,
.sidebar-footer-btn svg,
.topbar-search-icon svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
}

.brand-icon svg,
.sidebar-logo-icon svg {
  width: 20px;
  height: 20px;
  stroke: #fff;
  color: #fff;
}

.topbar-icon-btn svg,
.icon-btn svg,
.franchiser-menu-btn svg,
.menu-toggle-btn svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
}

.kpi-icon {
  color: #fff;
}

.kpi-icon svg {
  width: 22px;
  height: 22px;
  stroke: #fff;
}

.nav-badge:empty {
  display: none;
}

.user-avatar-initials {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, #4f46e5, #6366f1);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  letter-spacing: 0.02em;
}

.store-avatar {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--purple, #6B4FFF);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
}

.store-avatar svg {
  width: 18px;
  height: 18px;
  stroke: #fff;
}

#franchiser-sidebar .sidebar-footer > *:not(.store-card),
.sidebar .sidebar-footer a[href="/about"],
.sidebar .sidebar-footer a[href="/contact"],
.sidebar .sidebar-footer a[href="/terms"],
.sidebar .sidebar-footer a[href="/privacy"],
.sidebar .sidebar-footer a[href="/refund"],
.sidebar .sidebar-footer a[href="/delivery"] {
  display: none !important;
}

.card-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.card-title-row svg {
  width: 16px;
  height: 16px;
  color: var(--primary, #4f46e5);
}

.btn-with-icon {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.btn-with-icon svg {
  width: 16px;
  height: 16px;
}

.user-profile-menu {
  cursor: pointer;
}


/* ══════════════════════════════════════════════════════════════════
   PORTAL-UI MOBILE UTILITIES — Added 2026-08-18
   Applies to: Admin Portal + Franchiser Portal
   ══════════════════════════════════════════════════════════════════ */

/* Remove blue tap flash on all interactive elements */
button, a, [onclick], .btn, .nav-item, .sidebar-item, .tab-btn {
  -webkit-tap-highlight-color: transparent !important;
}

/* iOS momentum scrolling */
.portal-scroll, .table-wrap, .modal-body, .sidebar-content, .content-area {
  -webkit-overflow-scrolling: touch;
}

/* Horizontal scroll on tables */
.table-responsive {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

/* Smooth cubic-bezier transitions */
button, .btn, .tab-btn, .nav-item, .sidebar-item, .modal-overlay {
  transition: background-color 0.15s cubic-bezier(0.4,0,0.2,1),
              transform 0.12s cubic-bezier(0.4,0,0.2,1),
              box-shadow 0.15s cubic-bezier(0.4,0,0.2,1),
              opacity 0.15s cubic-bezier(0.4,0,0.2,1) !important;
}

/* Circular spinner */
@keyframes portal-spin {
  to { transform: rotate(360deg); }
}
.portal-spinner {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 2.5px solid rgba(79,70,229,0.2);
  border-top-color: #4f46e5;
  border-radius: 50%;
  animation: portal-spin 0.7s linear infinite;
}

/* Button loading state */
.btn-loading {
  position: relative;
  color: transparent !important;
  pointer-events: none;
  cursor: not-allowed;
}
.btn-loading::after {
  content: '';
  position: absolute;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255,255,255,0.35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: portal-spin 0.7s linear infinite;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

/* Skeleton shimmer */
@keyframes portal-shimmer {
  0%   { background-position: -400px 0; }
  100% { background-position: 400px 0; }
}
.skeleton {
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 800px 100%;
  animation: portal-shimmer 1.5s ease infinite;
  border-radius: 6px;
  display: block;
}

/* Safe area insets (notch + home-bar support) */
.portal-login {
  padding-bottom: max(24px, env(safe-area-inset-bottom));
  padding-top: max(24px, env(safe-area-inset-top));
}

/* 768px — tablet */
@media (max-width: 768px) {
  .portal-login-card {
    padding: 28px 20px 22px;
  }
  button, .btn, .tab-btn {
    min-height: 44px;
  }
  input, select, textarea {
    font-size: 16px !important;
    min-height: 44px;
  }
}

/* 480–600px — large phone */
@media (min-width: 481px) and (max-width: 600px) {
  .portal-login-card {
    max-width: 460px;
  }
}

/* 360px — compact Android */
@media (max-width: 360px) {
  .portal-login-card {
    padding: 20px 14px;
    border-radius: 14px;
  }
  .portal-login-card h2 {
    font-size: 18px;
  }
  .portal-login-card p {
    font-size: 13px;
  }
  .portal-login .btn-google,
  .portal-login .btn-email {
    width: 100%;
    padding: 12px;
    font-size: 14px;
  }
}


/* Floating Toast Notification */
.selfprintz-toast, .toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  max-width: 400px;
  width: calc(100vw - 32px);
  padding: 13px 18px;
  border-radius: 14px;
  font-size: 13.5px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.18), 0 4px 10px rgba(0,0,0,0.08);
  z-index: 999999;
  color: #fff;
  opacity: 0;
  transform: translateY(20px) scale(0.95);
  transition: all 0.28s cubic-bezier(0.16, 1, 0.3, 1);
  backdrop-filter: blur(8px);
}
.selfprintz-toast.show, .toast.show {
  opacity: 1;
  transform: translateY(0) scale(1);
}
