/* ==========================================================================
   SparkSoftwares — Design 2: Client Portal & Dashboard Styles
   Theme: Warm Alabaster, Pure White Cards, Emerald Accents
   ========================================================================== */

:root {
  --dash-bg: #f6f4ee;
  --dash-sidebar: #ede9df;
  --dash-card: #ffffff;
  --dash-border: rgba(20, 22, 21, 0.08);
  --dash-emerald: #16a34a;
  --dash-text: #141615;
  --dash-body: #475569;
  --dash-muted: #808ea3;
}

body.dashboard-body {
  background-color: var(--dash-bg);
  color: var(--dash-text);
  margin: 0;
  padding: 0;
  font-family: var(--font-main, 'Inter', -apple-system, BlinkMacSystemFont, sans-serif);
  height: 100vh;
  display: flex;
  overflow: hidden;
  width: 100vw;
}

.dashboard-layout {
  display: flex;
  width: 100vw;
  height: 100vh;
}

/* Sidebar */
.dash-sidebar {
  width: 270px;
  background-color: var(--dash-sidebar);
  border-right: 1px solid var(--dash-border);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 24px 18px;
  flex-shrink: 0;
}

.dash-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--dash-text);
  font-weight: 800;
  font-size: 1.15rem;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--dash-border);
}

.brand-icon {
  width: 32px;
  height: 32px;
  background: transparent;
  border-radius: 7px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.brand-icon svg {
  width: 100%;
  height: 100%;
  display: block;
}

.store-selector-box {
  margin: 18px 0;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid var(--dash-border);
  border-radius: 12px;
  padding: 10px 14px;
}

.store-title {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--dash-muted);
}

.store-name {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--dash-text);
  display: flex;
  align-items: center;
  gap: 6px;
}

.store-online-dot {
  width: 8px;
  height: 8px;
  background: var(--dash-emerald);
  border-radius: 50%;
}

.dash-nav {
  display: flex;
  flex-direction: column;
  gap: 6px;
  list-style: none;
  margin-top: 10px;
  flex: 1;
}

.dash-nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: 9999px;
  color: var(--dash-body);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
}

.dash-nav-item:hover {
  background: rgba(255, 255, 255, 0.6);
  color: var(--dash-text);
}

.dash-nav-item.active {
  background: var(--dash-emerald);
  color: #fff;
  box-shadow: 0 4px 12px rgba(22, 163, 74, 0.25);
}

.dash-nav-badge {
  margin-left: auto;
  font-size: 0.72rem;
  background: rgba(255, 255, 255, 0.25);
  color: #fff;
  padding: 2px 8px;
  border-radius: 12px;
  font-weight: 800;
}

/* User Card */
.sidebar-footer {
  padding-top: 16px;
  border-top: 1px solid var(--dash-border);
}

.user-profile-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--dash-card);
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--dash-border);
}

.user-avatar {
  width: 34px;
  height: 34px;
  background: var(--dash-emerald);
  color: #fff;
  font-weight: 800;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.88rem;
}

.user-name {
  font-size: 0.86rem;
  font-weight: 800;
  color: var(--dash-text);
}

.user-role-tag {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--dash-emerald);
}

.btn-logout {
  background: transparent;
  border: none;
  color: var(--dash-muted);
  cursor: pointer;
  padding: 6px;
  border-radius: 6px;
  transition: all 0.2s;
}

.btn-logout:hover {
  color: #ef4444;
}

/* Main Dashboard Area */
.dash-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  height: 100vh;
  overflow: hidden;
  background: var(--dash-bg);
}

.dash-topbar {
  background: var(--dash-card);
  border-bottom: 1px solid var(--dash-border);
  padding: 16px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.topbar-title-wrap h1 {
  font-size: 1.35rem;
  font-weight: 900;
  color: var(--dash-text);
}

.topbar-subtitle {
  font-size: 0.84rem;
  color: var(--dash-body);
}

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

.role-pill-badge {
  background: var(--dash-bg);
  border: 1px solid var(--dash-border);
  color: var(--dash-emerald);
  padding: 5px 14px;
  border-radius: 9999px;
  font-size: 0.78rem;
  font-weight: 800;
}

.dash-content-body {
  flex: 1;
  padding: 28px 32px;
  overflow-y: auto;
}

.view-panel {
  display: none;
}

.view-panel.active {
  display: block;
  animation: fadeIn 0.2s ease;
}

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

/* Stat Cards */
.stat-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px;
  margin-bottom: 24px;
}

.stat-card {
  background: var(--dash-card);
  border: 1px solid var(--dash-border);
  border-radius: 18px;
  padding: 22px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.03);
}

.stat-label {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--dash-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 6px;
}

.stat-value {
  font-size: 2rem;
  font-weight: 900;
  color: var(--dash-text);
  line-height: 1.1;
  margin-bottom: 4px;
}

.stat-diff {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--dash-emerald);
}

/* Tables */
.data-table-container {
  background: var(--dash-card);
  border: 1px solid var(--dash-border);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(0,0,0,0.03);
  margin-bottom: 24px;
}

.table-header-bar {
  padding: 18px 24px;
  border-bottom: 1px solid var(--dash-border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.table-title {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--dash-text);
}

.dash-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.dash-table th {
  background: var(--dash-bg);
  color: var(--dash-muted);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 12px 24px;
  border-bottom: 1px solid var(--dash-border);
}

.dash-table td {
  padding: 14px 24px;
  font-size: 0.9rem;
  border-bottom: 1px solid var(--dash-border);
  color: var(--dash-text);
}

.dash-table tr:hover td {
  background: var(--dash-bg);
}

.badge-tag {
  display: inline-block;
  font-size: 0.74rem;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: 9999px;
}

.badge-success { background: #dcfce7; color: #16a34a; }
.badge-warning { background: #fef3c7; color: #d97706; }
.badge-danger { background: #fee2e2; color: #dc2626; }

/* Table Seat Cards in Restaurant view */
.restaurant-tables-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 20px;
}

.table-seat-card {
  background: #ffffff;
  border: 1.5px solid var(--dash-border);
  border-radius: 14px;
  padding: 16px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
}

.table-seat-card.occupied {
  border-color: #f59e0b;
  background: #fffbeb;
}

.table-seat-card.vacant {
  border-color: #10b981;
  background: #ecfdf5;
}

/* ==========================================================================
   EXECUTIVE CLIENT PORTAL LOGIN (Design 2)
   Professional, high-contrast B2B console design
   ========================================================================== */
.login-page-editorial {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: #f8fafc;
  padding: 32px 20px;
  width: 100%;
  box-sizing: border-box;
}

.login-single-card {
  width: 100%;
  max-width: 440px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  box-shadow: 0 20px 45px -10px rgba(15, 23, 42, 0.08), 0 2px 6px rgba(0, 0, 0, 0.03);
  padding: 38px 32px;
  box-sizing: border-box;
}

@media (max-width: 480px) {
  .login-single-card {
    padding: 28px 22px;
  }
}

.login-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  padding-bottom: 18px;
  border-bottom: 1px solid #f1f5f9;
}

.login-card-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.login-card-icon {
  width: 34px;
  height: 34px;
  background: transparent;
  border-radius: 7px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.login-card-icon svg {
  width: 100%;
  height: 100%;
  display: block;
}

.login-card-title {
  font-family: var(--font-heading, sans-serif);
  font-size: 1.05rem;
  font-weight: 800;
  color: #0f172a;
  letter-spacing: -0.02em;
}

.login-card-badge {
  font-family: var(--font-mono, monospace);
  font-size: 0.65rem;
  font-weight: 800;
  color: #16a34a;
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  padding: 3px 8px;
  border-radius: 4px;
  letter-spacing: 0.04em;
}

.login-form-title {
  font-family: var(--font-heading, sans-serif);
  font-size: 1.45rem;
  font-weight: 800;
  color: #0f172a;
  letter-spacing: -0.02em;
  margin-bottom: 6px;
}

.login-form-subtitle {
  font-size: 0.86rem;
  color: #64748b;
  line-height: 1.5;
  margin-bottom: 22px;
}

/* Dynamic Alert Box */
.login-alert-box {
  display: none;
  padding: 12px 14px;
  border-radius: 8px;
  margin-bottom: 20px;
  font-size: 0.84rem;
  line-height: 1.45;
}

.login-alert-box.error {
  display: flex;
  flex-direction: column;
  gap: 6px;
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #991b1b;
}

.login-alert-box.expired {
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: #fffbeb;
  border: 1px solid #fde68a;
  color: #92400e;
}

.login-alert-box.locked {
  display: flex;
  flex-direction: column;
  gap: 6px;
  background: #fff1f2;
  border: 1px solid #fecdd3;
  color: #be123c;
}

.login-alert-title {
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 6px;
}

.btn-renew-whatsapp {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: #16a34a;
  color: #ffffff !important;
  padding: 7px 14px;
  border-radius: 6px;
  font-weight: 700;
  font-size: 0.82rem;
  text-decoration: none;
  width: fit-content;
  margin-top: 4px;
  transition: background 0.15s;
}

.btn-renew-whatsapp:hover {
  background: #15803d;
}

/* Input Fields */
.login-field-group {
  margin-bottom: 18px;
}

.login-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}

.login-label {
  display: block;
  font-size: 0.82rem;
  font-weight: 700;
  color: #1e293b;
  letter-spacing: -0.01em;
}

.login-input-hint {
  font-size: 0.72rem;
  color: #94a3b8;
  font-weight: 500;
}

.login-input {
  width: 100%;
  height: 44px;
  padding: 0 14px;
  border-radius: 8px;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  color: #0f172a;
  font-family: inherit;
  font-size: 0.92rem;
  box-sizing: border-box;
  outline: none;
  transition: all 0.18s ease;
}

.login-input:focus {
  border-color: #16a34a;
  box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.15);
}

.login-input:disabled {
  background: #f1f5f9;
  color: #94a3b8;
  cursor: not-allowed;
}

.login-input::placeholder {
  color: #94a3b8;
}

/* Password Input with Toggle Button */
.login-password-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.login-password-wrap .login-input {
  padding-right: 44px;
}

.btn-toggle-eye {
  position: absolute;
  right: 12px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 4px;
  color: #64748b;
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-toggle-eye:hover {
  color: #0f172a;
}

/* Options Row */
.login-options-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 22px;
  font-size: 0.82rem;
}

.login-remember-label {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #475569;
  cursor: pointer;
  font-weight: 600;
}

.login-forgot-link {
  color: #16a34a;
  font-weight: 700;
  text-decoration: none;
}

.login-forgot-link:hover {
  text-decoration: underline;
}

/* Executive Submit Button */
.btn-login-submit {
  width: 100%;
  height: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: #0f172a;
  color: #ffffff;
  border: none;
  border-radius: 8px;
  font-family: var(--font-heading, sans-serif);
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.15);
}

.btn-login-submit:hover:not(:disabled) {
  background: #16a34a;
  box-shadow: 0 6px 20px -2px rgba(22, 163, 74, 0.35);
}

.btn-login-submit:disabled {
  background: #94a3b8;
  cursor: not-allowed;
  box-shadow: none;
}

/* Footer Link */
.login-footer-nav {
  margin-top: 24px;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  font-size: 0.82rem;
}

.login-back-link {
  color: #64748b;
  text-decoration: none;
  font-weight: 600;
}

.login-back-link:hover {
  color: #0f172a;
}

