/* ══════════════════════════════════════════════════════════════
   FreshMart POS — Login Page
   ══════════════════════════════════════════════════════════════ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  height: 100vh;
  overflow: hidden;
  background: #0f172a; /* matches left panel — no visible flash on load */
}

/* ── Layout ── */
.login-container {
  width: 100vw;
  height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: white;
  animation: slideIn 0.6s ease-out;
}

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

/* ══════════════════════════════════════════════════════════════
   LEFT PANEL
   ══════════════════════════════════════════════════════════════ */
.left-panel {
  background: linear-gradient(160deg, #0f172a 0%, #1e293b 55%, #0c2a4a 100%);
  padding: 32px 44px 24px;
  display: flex;
  flex-direction: column;
  gap: 0;
  border-right: 3px solid #ff6600;
  overflow-y: auto;
  overflow-x: hidden;
}
.left-panel::-webkit-scrollbar { width: 4px; }
.left-panel::-webkit-scrollbar-thumb { background: rgba(255,255,255,.12); border-radius: 4px; }

/* ── Brand ── */
.brand-row { margin-bottom: 20px; }

.brand-logo {
  font-size: 54px;
  font-weight: 900;
  color: #ff6600;
  letter-spacing: 5px;
  font-family: 'Arial Black', 'Arial Bold', Gadget, sans-serif;
  text-shadow: 0 0 40px rgba(255,102,0,.35);
  line-height: 1;
  animation: fadeInDown .8s ease-out;
}

.brand-tag {
  font-size: 13px;
  font-weight: 600;
  color: #94a3b8;
  letter-spacing: 2px;
  margin-top: 4px;
  text-transform: uppercase;
}

@keyframes fadeInDown {
  from { opacity: 0; transform: translateY(-16px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Date / Time ── */
.dt-block {
  display: flex;
  gap: 32px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.dt-date, .dt-time {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #e2e8f0;
}

.dt-date {
  font-size: 26px;
  font-weight: 700;
}

.dt-time {
  font-size: 30px;
  font-weight: 900;
  color: #ff6600;
  text-shadow: 0 0 20px rgba(255,102,0,.4);
  font-variant-numeric: tabular-nums;
}

.dt-icon {
  font-size: 18px;
  color: #64748b;
}

.dt-time .dt-icon {
  color: rgba(255,102,0,.7);
}

/* ── Section heading ── */
.feat-heading {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 14px;
}

.feat-heading-bar {
  flex: 1;
  height: 1.5px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.18), transparent);
}

.feat-heading-text {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: #94a3b8;
  white-space: nowrap;
}

/* ── Feature two-column grid ── */
.feat-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 20px;
}

.feat-col {
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 12px;
  padding: 16px 18px;
  transition: background .2s;
}
.feat-col:hover { background: rgba(255,255,255,.07); }

.feat-col-title {
  font-size: 15px;
  font-weight: 800;
  color: #ff6600;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.feat-col-title i { font-size: 14px; }

.feat-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.feat-list li {
  font-size: 13px;
  color: #cbd5e1;
  display: flex;
  align-items: center;
  gap: 9px;
  transition: color .15s, transform .15s;
}
.feat-list li:hover { color: #fff; transform: translateX(3px); }

.feat-list li i {
  width: 14px;
  text-align: center;
  font-size: 11px;
  color: #10b981;
  flex-shrink: 0;
}

/* ── Roles grid ── */
.roles-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-bottom: 20px;
}

.role-card {
  border-radius: 10px;
  padding: 14px 10px;
  text-align: center;
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(255,255,255,.04);
  transition: transform .15s, background .15s;
  cursor: default;
}
.role-card:hover { transform: translateY(-3px); background: rgba(255,255,255,.09); }

.role-icon {
  width: 38px; height: 38px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 8px;
  font-size: 16px;
}

.role-name {
  font-size: 12px;
  font-weight: 800;
  color: #f1f5f9;
  margin-bottom: 4px;
}

.role-desc {
  font-size: 10px;
  color: #64748b;
  line-height: 1.4;
}

/* Role colour themes */
.role-cashier   .role-icon { background: rgba(16,185,129,.18); color: #10b981; }
.role-cashier   { border-color: rgba(16,185,129,.25); }
.role-cashier   .role-name { color: #6ee7b7; }

.role-supervisor .role-icon { background: rgba(59,130,246,.18); color: #3b82f6; }
.role-supervisor { border-color: rgba(59,130,246,.25); }
.role-supervisor .role-name { color: #93c5fd; }

.role-manager   .role-icon { background: rgba(168,85,247,.18); color: #a855f7; }
.role-manager   { border-color: rgba(168,85,247,.25); }
.role-manager   .role-name { color: #d8b4fe; }

.role-admin     .role-icon { background: rgba(255,102,0,.18); color: #ff6600; }
.role-admin     { border-color: rgba(255,102,0,.3); }
.role-admin     .role-name { color: #fdba74; }

/* ── Footer ── */
.lp-footer {
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid rgba(255,255,255,.08);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 6px;
  font-size: 11px;
  color: #475569;
}
.lp-footer span { display: flex; align-items: center; gap: 6px; }
.lp-footer i { color: #334155; }


/* ══════════════════════════════════════════════════════════════
   RIGHT PANEL
   ══════════════════════════════════════════════════════════════ */
.right-panel {
  background: #ffffff;
  padding: 40px 36px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  position: relative;
}

.login-box { width: 100%; max-width: 380px; }

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

.login-icon {
  width: 72px; height: 72px;
  background: linear-gradient(135deg, #ff6600 0%, #ff8533 100%);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 20px;
  box-shadow: 0 8px 28px rgba(255,102,0,.3);
  animation: pulseIcon 2s infinite;
}

@keyframes pulseIcon {
  0%   { box-shadow: 0 0 0 0 rgba(255,102,0,.4); }
  70%  { box-shadow: 0 0 0 14px rgba(255,102,0,0); }
  100% { box-shadow: 0 0 0 0 rgba(255,102,0,0); }
}

.login-icon svg { width: 36px; height: 36px; fill: white; }

.login-title {
  font-size: 26px;
  font-weight: 900;
  color: #1e293b;
  letter-spacing: 3px;
  margin-bottom: 6px;
  text-transform: uppercase;
}

.login-subtitle { font-size: 13px; color: #64748b; }

/* ── PIN Display ── */
.pin-display {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-bottom: 32px;
}

.pin-dot {
  width: 46px; height: 46px;
  border: 2.5px solid #ff6600;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; font-weight: bold;
  color: #ff6600;
  background: #fff7ed;
  transition: all .3s cubic-bezier(.4,0,.2,1);
}

.pin-dot.filled {
  background: #ff6600; color: white;
  transform: scale(1.1);
  box-shadow: 0 4px 12px rgba(255,102,0,.4);
}

.pin-dot.success {
  background: #10b981; border-color: #10b981; color: white;
  transform: scale(1.15);
}

.pin-dot.active {
  border-color: #2563eb; background: #eff6ff;
  animation: pulseDot 1s infinite;
}

@keyframes pulseDot {
  0%,100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(37,99,235,.4); }
  50%      { transform: scale(1.05); box-shadow: 0 0 0 8px rgba(37,99,235,0); }
}

/* ── Keypad ── */
.keypad {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 20px;
}

.key {
  padding: 20px;
  font-size: 22px;
  font-weight: 700;
  border: 2px solid #e2e8f0;
  border-radius: 12px;
  background: white;
  cursor: pointer;
  transition: all .15s cubic-bezier(.4,0,.2,1);
  color: #1e293b;
  box-shadow: 0 2px 6px rgba(0,0,0,.06);
  user-select: none;
  display: flex; align-items: center; justify-content: center;
}

.key:hover {
  background: #fff7ed; border-color: #ff6600;
  transform: translateY(-2px);
  box-shadow: 0 6px 14px rgba(255,102,0,.18);
}

.key:active {
  transform: translateY(1px) scale(.97);
  background: #ff6600; color: white; border-color: #ff6600;
  box-shadow: 0 2px 4px rgba(255,102,0,.3);
}

.key.clear { background: #fee2e2; border-color: #ef4444; color: #dc2626; }
.key.clear:hover { background: #ef4444; color: white; border-color: #ef4444; }
.key.clear:active { background: #dc2626; }
/* Fingerprint login button */
.key-fp { background: linear-gradient(135deg,#f0fdf4,#dcfce7); border-color: #16a34a; color: #16a34a; font-size: 22px; }
.key-fp:hover { background: linear-gradient(135deg,#16a34a,#0a7c45); color: #fff; border-color: #0a7c45; }
.key-fp:active { background: #0a7c45; color: #fff; }
/* Fingerprint hint bar */
.fp-hint { margin: 10px 0 0; border: 1.5px solid #16a34a; border-radius: 12px; padding: 10px 16px; background: #f0fdf4; }
.fp-hint-inner { display: flex; align-items: center; gap: 10px; }
.fp-hint-ico { font-size: 20px; animation: fpPulse 1.2s ease-in-out infinite; }
@keyframes fpPulse { 0%,100%{opacity:1;transform:scale(1)} 50%{opacity:.5;transform:scale(1.15)} }
#fpHintText { font-size: 13px; font-weight: 700; color: #15803d; }
/* Dot fp-reading state */
.pin-dot.fp { background: rgba(22,163,74,.15); border-color: #16a34a; color: #16a34a; font-size: 14px; }

/* ── Error ── */
.error-message {
  text-align: center; color: #ef4444;
  font-size: 13px; font-weight: 600;
  margin-top: 10px; min-height: 20px;
  opacity: 0; transition: opacity .3s;
}

.error-message.show { opacity: 1; }

@keyframes shake {
  0%,100% { transform: translateX(0); }
  25%      { transform: translateX(-10px); }
  75%      { transform: translateX(10px); }
}

/* ── Security badge ── */
.security-badge {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  margin-top: 20px; padding: 10px 14px;
  background: #f0fdf4; border-radius: 8px; border: 1px solid #86efac;
}

.security-badge svg { width: 16px; height: 16px; fill: #10b981; }
.security-text { color: #166534; font-size: 11.5px; font-weight: 600; }

/* ── Responsive ── */
@media (max-width: 980px) {
  .login-container { grid-template-columns: 1fr; grid-template-rows: auto 1fr; }
  .left-panel { border-right: none; border-bottom: 3px solid #ff6600; padding: 22px 24px; max-height: 50vh; }
  .brand-logo { font-size: 38px; }
  .dt-date { font-size: 18px; }
  .dt-time { font-size: 22px; }
  .feat-grid { grid-template-columns: 1fr 1fr; }
  .roles-grid { grid-template-columns: repeat(4, 1fr); }
  .right-panel { padding: 28px 24px; }
  .key { padding: 16px; font-size: 18px; }
}

@media (max-width: 640px) {
  .feat-grid { grid-template-columns: 1fr; }
  .roles-grid { grid-template-columns: repeat(2, 1fr); }
  .dt-block { gap: 16px; }
}

/* ── Multi-Stage Shop Code & Staff Login ── */
.login-stage {
  width: 100%;
  animation: fadeIn 0.3s ease;
}

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

.shop-input-group {
  margin: 24px 0 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.shop-code-field {
  width: 100%;
  padding: 16px 20px;
  font-size: 24px;
  font-weight: 800;
  letter-spacing: 4px;
  text-transform: uppercase;
  text-align: center;
  border: 2.5px solid #cbd5e1;
  border-radius: 12px;
  color: #0f172a;
  background: #f8fafc;
  outline: none;
  transition: all 0.2s ease;
}

.shop-code-field:focus {
  border-color: #ff6600;
  background: #ffffff;
  box-shadow: 0 0 0 4px rgba(255, 102, 0, 0.15);
}

.btn-shop-continue {
  width: 100%;
  padding: 16px;
  font-size: 15px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #ffffff;
  background: linear-gradient(135deg, #ff6600 0%, #ff8533 100%);
  border: none;
  border-radius: 12px;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(255, 102, 0, 0.3);
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.btn-shop-continue:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255, 102, 0, 0.4);
}

.btn-shop-continue:active {
  transform: translateY(1px);
}

.active-store-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #fff7ed;
  border: 1.5px solid #fed7aa;
  border-radius: 12px;
  padding: 10px 14px;
  margin-bottom: 20px;
}

.active-store-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.active-store-info i {
  font-size: 22px;
  color: #ea580c;
}

.active-store-name {
  font-size: 14px;
  font-weight: 800;
  color: #9a3412;
  line-height: 1.2;
}

.active-store-code {
  font-size: 11px;
  font-weight: 700;
  color: #c2410c;
  letter-spacing: 1px;
}

.btn-change-store {
  padding: 6px 12px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  color: #c2410c;
  background: #ffedd5;
  border: 1px solid #fdba74;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-change-store:hover {
  background: #ea580c;
  color: #ffffff;
  border-color: #ea580c;
}

