/* ================================================================
   Mahakali ERP — Professional Login  (Zoho / Odoo tier)
   ================================================================ */

/* ── CSS Variables ── */
:root {
  --brand-900: #0c1a36;
  --brand-800: #0f2351;
  --brand-700: #173d8a;
  --brand-600: #1d4ed8;
  --brand-500: #2563eb;
  --brand-400: #60a5fa;
  --brand-100: #dbeafe;

  --neutral-50:  #f8fafc;
  --neutral-100: #f1f5f9;
  --neutral-200: #e2e8f0;
  --neutral-300: #cbd5e1;
  --neutral-400: #94a3b8;
  --neutral-500: #64748b;
  --neutral-700: #334155;
  --neutral-900: #0f172a;

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;

  --shadow-card: 0 1px 3px rgba(0,0,0,.06), 0 8px 32px rgba(0,0,0,.08);
  --shadow-btn:  0 4px 16px rgba(29,78,216,.40);
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Inter", system-ui, -apple-system, sans-serif;
  background: var(--neutral-50);
  display: flex;
  color: var(--neutral-900);
}

/* ── Outer wrapper ── */
.erp-wrapper {
  display: flex;
  width: 100%;
  min-height: 100vh;
  animation: pageIn .55s cubic-bezier(.22,1,.36,1) both;
}
@keyframes pageIn {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}


/* ================================================================
   LEFT — BRAND PANEL
   ================================================================ */
.brand-panel {
  position: relative;
  width: 56%;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  background: linear-gradient(155deg, #081326 0%, #0d2461 50%, #1a3fa3 100%);
}

.bp-bg {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, rgba(255,255,255,.07) 1px, transparent 1px);
  background-size: 28px 28px;
  pointer-events: none;
}
.bp-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  pointer-events: none;
}
.bp-orb1 { width: 480px; height: 480px; top: -140px; right: -120px; background: rgba(37,99,235,.35); }
.bp-orb2 { width: 360px; height: 360px; bottom: -100px; left: -80px; background: rgba(29,78,216,.20); }

.bp-inner {
  position: relative;
  z-index: 1;
  padding: 40px 40px 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* Logo row — Zoho-style: large clean mark + prominent wordmark */
.bp-logo-row { display: flex; align-items: center; gap: 14px; margin-bottom: 28px; }
.bp-logo-box {
  width: 52px; height: 52px;
  background: #fff;
  border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 2px 12px rgba(0,0,0,.18);
}
.bp-logo-img { width: 36px; height: 36px; object-fit: contain; }
.bp-brand-name { font-size: 1.25rem; font-weight: 800; color: #fff; letter-spacing: -.3px; line-height: 1.15; }
.bp-brand-tag  { font-size: .72rem; color: rgba(255,255,255,.48); font-weight: 400; letter-spacing: .1px; }

/* Headline */
.bp-headline {
  margin: 0 0 22px;
  font-size: 1.5rem;
  font-weight: 800;
  color: #fff;
  line-height: 1.3;
  letter-spacing: -.4px;
}

/* Feature checklist */
.bp-features {
  list-style: none;
  margin: 16px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 9px;
}
.bp-features li {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: .78rem;
  color: rgba(255,255,255,.68);
  font-weight: 400;
  line-height: 1.4;
}
.bp-check {
  width: 18px; height: 18px;
  border-radius: 5px;
  background: rgba(34,197,94,.22);
  border: 1px solid rgba(34,197,94,.38);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}

/* Stats bar */
.bp-stats-bar {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px 40px;
  border-top: 1px solid rgba(255,255,255,.08);
  background: rgba(0,0,0,.18);
  margin-top: 20px;
}
.bp-stat-item { flex: 1; text-align: center; }
.bp-stat-item strong { display: block; font-size: 1.2rem; font-weight: 800; color: #fff; line-height: 1.1; }
.bp-stat-item span   { font-size: .68rem; color: rgba(255,255,255,.45); font-weight: 400; }
.bp-stat-divider     { width: 1px; height: 28px; background: rgba(255,255,255,.12); }


/* ================================================================
   ACCOUNTING ANIMATION BOARD
   ================================================================ */
.acc-board {
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
}

/* ── Feature Strip ── */
.acc-feat-row {
  display: flex;
  align-items: stretch;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.10);
  border-radius: var(--radius-md);
  overflow: hidden;
  animation: accFadeUp .5s ease both;
  animation-delay: .2s;
}
.acc-feat-card {
  flex: 1;
  padding: 12px 13px;
  display: flex;
  align-items: center;
  gap: 9px;
  animation: accFadeUp .5s ease both;
  animation-delay: calc(var(--i) * 0.1s + 0.25s);
}
.acc-feat-sep {
  width: 1px;
  background: rgba(255,255,255,.08);
  flex-shrink: 0;
  align-self: stretch;
}

.acc-feat-ico {
  width: 32px; height: 32px;
  border-radius: 9px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  animation: iconFloat 3.2s ease-in-out infinite;
  animation-delay: calc(var(--i, 0) * 0.9s);
}
.acc-feat-blue    { background: rgba(96,165,250,.18);  color: #60a5fa; }
.acc-feat-emerald { background: rgba(52,211,153,.18);  color: #34d399; }
.acc-feat-amber   { background: rgba(251,191,36,.16);  color: #fbbf24; }

@keyframes iconFloat {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-3px); }
}

.acc-feat-body { flex: 1; min-width: 0; }
.acc-feat-title {
  font-size: .7rem;
  font-weight: 700;
  color: rgba(255,255,255,.85);
  line-height: 1.2;
  margin-bottom: 2px;
  white-space: nowrap;
}
.acc-feat-sub {
  font-size: .6rem;
  color: rgba(255,255,255,.4);
  line-height: 1.3;
  white-space: nowrap;
}

.acc-feat-status {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: .58rem;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 99px;
  flex-shrink: 0;
}
.acc-feat-status.s-active { color: #4ade80; background: rgba(34,197,94,.14);   border: 1px solid rgba(34,197,94,.22); }
.acc-feat-status.s-sync   { color: #60a5fa; background: rgba(96,165,250,.14);  border: 1px solid rgba(96,165,250,.22); }
.acc-feat-status.s-live   { color: #fbbf24; background: rgba(251,191,36,.14);  border: 1px solid rgba(251,191,36,.22); }
.acc-feat-dot {
  width: 5px; height: 5px;
  border-radius: 50%;
  background: currentColor;
  animation: livePulse 1.4s ease-in-out infinite;
}

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


/* ── Revenue Line Chart ── */
.acc-chart-panel {
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.09);
  border-radius: var(--radius-md);
  padding: 11px 14px 9px;
  animation: accFadeUp .5s ease both;
  animation-delay: .4s;
}

.acc-chart-hdr {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}
.acc-chart-title {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: .72rem;
  font-weight: 600;
  color: rgba(255,255,255,.75);
}
.acc-chart-period {
  font-size: .65rem;
  color: rgba(255,255,255,.35);
  font-weight: 500;
}

.acc-chart-wrap {
  width: 100%;
  height: 72px;
  overflow: hidden;
}
.acc-svg {
  width: 100%;
  height: 100%;
  display: block;
}

/* Line draw animation — handled by JS (getTotalLength) */
#accLine {
  stroke-dasharray: 1000;
  stroke-dashoffset: 1000;
  transition: stroke-dashoffset 2.2s cubic-bezier(.25,.46,.45,.94);
}
#accArea {
  transition: opacity .8s ease .5s;
}
#accDot, #accDotRing {
  transition: opacity .3s ease;
}

/* Dot ring pulse */
@keyframes ringPulse {
  0%   { r: 3.5;  opacity: .9; }
  70%  { r: 8;    opacity: 0;  }
  100% { r: 3.5;  opacity: 0;  }
}
.acc-ring-anim { animation: ringPulse 1.6s ease-out infinite; }

/* Month labels */
.acc-months {
  display: flex;
  justify-content: space-between;
  margin-top: 5px;
}
.acc-months span {
  font-size: .58rem;
  color: rgba(255,255,255,.28);
  font-weight: 500;
  text-align: center;
}


/* ── Live Transaction Ledger ── */
.acc-ledger {
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.09);
  border-radius: var(--radius-md);
  padding: 10px 13px;
  animation: accFadeUp .5s ease both;
  animation-delay: .55s;
  overflow: hidden;
}

.acc-ledger-hdr {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}
.acc-ledger-title {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: .72rem;
  font-weight: 600;
  color: rgba(255,255,255,.75);
}
.acc-live-pill {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: .62rem;
  font-weight: 600;
  color: #4ade80;
  background: rgba(34,197,94,.12);
  border: 1px solid rgba(34,197,94,.22);
  border-radius: 99px;
  padding: 2px 8px;
}
.acc-live-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: #4ade80;
  animation: livePulse 1.4s ease-in-out infinite;
}
@keyframes livePulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: .4; transform: scale(.7); }
}

/* Transaction feed */
.acc-txn-feed {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-height: 108px;
}

.acc-txn-item {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 7px 9px;
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.07);
  border-radius: 8px;
  font-size: .72rem;
  overflow: hidden;
}
.acc-txn-item.txn-enter {
  animation: txnSlideIn .38s cubic-bezier(.22,1,.36,1) both;
}
.acc-txn-item.txn-exit {
  animation: txnSlideOut .32s ease forwards;
}

@keyframes txnSlideIn {
  from { opacity: 0; transform: translateY(-10px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes txnSlideOut {
  from { opacity: 1; max-height: 50px; margin-bottom: 0; }
  to   { opacity: 0; max-height: 0;    margin-bottom: -5px; padding: 0; }
}

.acc-txn-ico {
  width: 26px; height: 26px;
  border-radius: 7px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.acc-txn-ico.cr { background: rgba(52,211,153,.18); color: #34d399; }
.acc-txn-ico.dr { background: rgba(248,113,113,.18); color: #f87171; }
.acc-txn-ico.gst{ background: rgba(251,191,36,.16);  color: #fbbf24; }

.acc-txn-body { flex: 1; min-width: 0; }
.acc-txn-desc {
  font-size: .71rem;
  font-weight: 600;
  color: rgba(255,255,255,.82);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.3;
}
.acc-txn-sub {
  font-size: .62rem;
  color: rgba(255,255,255,.38);
  line-height: 1.3;
}

.acc-txn-right { text-align: right; flex-shrink: 0; }
.acc-txn-amt {
  font-size: .75rem;
  font-weight: 700;
  line-height: 1.2;
  font-variant-numeric: tabular-nums;
}
.acc-txn-amt.cr  { color: #4ade80; }
.acc-txn-amt.dr  { color: #f87171; }
.acc-txn-amt.gst { color: #fbbf24; }
.acc-txn-time {
  font-size: .6rem;
  color: rgba(255,255,255,.3);
}


/* ================================================================
   RIGHT — FORM PANEL
   ================================================================ */
.form-panel {
  flex: 1;
  background: var(--neutral-50);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 32px;
  position: relative;
}

.fp-mobile-brand { display: none; align-items: center; gap: 10px; margin-bottom: 28px; }
.fp-mobile-logo  { width: 34px; height: 34px; object-fit: contain; }
.fp-mobile-brand span { font-weight: 700; font-size: 1.1rem; color: var(--neutral-900); }

/* ── Login card ── */
.login-card {
  width: 100%;
  max-width: 420px;
  background: #ffffff;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-card);
  padding: 40px;
  border: 1px solid var(--neutral-200);
}

.lc-header { margin-bottom: 28px; }

/* Brand row inside login card */
.lc-brand-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 22px;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--neutral-100);
}
.lc-brand-logo-wrap {
  width: 44px; height: 44px;
  background: #fff;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  border: 1px solid var(--neutral-200);
  box-shadow: 0 2px 8px rgba(0,0,0,.07);
}
.lc-brand-logo { width: 28px; height: 28px; object-fit: contain; }
.lc-brand-name { font-size: .94rem; font-weight: 800; color: var(--neutral-900); letter-spacing: -.2px; line-height: 1.15; }
.lc-brand-ver  { font-size: .67rem; color: var(--neutral-400); font-weight: 400; }

.lc-title {
  margin: 0 0 6px;
  font-size: 1.45rem;
  font-weight: 800;
  color: var(--neutral-900);
  letter-spacing: -.4px;
}
.lc-sub { margin: 0; font-size: .85rem; color: var(--neutral-500); }

/* Alert */
.lc-alert {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #b91c1c;
  border-radius: var(--radius-sm);
  padding: 11px 14px;
  font-size: .84rem;
  font-weight: 500;
  margin-bottom: 20px;
  line-height: 1.45;
}
.lc-alert svg { flex-shrink: 0; margin-top: 1px; }

/* Field */
.lc-field { margin-bottom: 18px; }
.lc-label-row { display: flex; justify-content: space-between; align-items: center; }
.lc-label {
  display: block;
  font-size: .81rem;
  font-weight: 600;
  color: var(--neutral-700);
  margin-bottom: 7px;
}

.lc-input-group { position: relative; display: flex; align-items: center; }
.lc-ico {
  position: absolute;
  left: 13px;
  color: var(--neutral-400);
  display: flex; align-items: center;
  pointer-events: none;
  transition: color .18s;
}
.lc-input {
  width: 100%;
  height: 46px;
  padding: 0 44px;
  border: 1.5px solid var(--neutral-200);
  border-radius: var(--radius-sm);
  font-size: .9rem;
  color: var(--neutral-900);
  background: #fafafa;
  outline: none;
  font-family: inherit;
  transition: border-color .18s, box-shadow .18s, background .18s;
}
.lc-input::placeholder { color: var(--neutral-300); }
.lc-input:hover  { border-color: var(--neutral-300); background: #fff; }
.lc-input:focus  { border-color: var(--brand-500); background: #fff; box-shadow: 0 0 0 3.5px rgba(37,99,235,.10); }
.lc-input-group:focus-within .lc-ico { color: var(--brand-500); }

.lc-eye {
  position: absolute; right: 11px;
  background: none; border: none; padding: 5px;
  color: var(--neutral-400); cursor: pointer;
  display: flex; align-items: center;
  border-radius: 6px;
  transition: color .18s;
}
.lc-eye:hover { color: var(--brand-500); }

/* Options row */
.lc-options-row {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 24px; margin-top: 4px;
}
.lc-remember {
  display: flex; align-items: center; gap: 9px;
  cursor: pointer; font-size: .84rem; color: var(--neutral-500);
  font-weight: 500; user-select: none;
}
.lc-remember input[type="checkbox"] { display: none; }
.lc-cb-box {
  width: 17px; height: 17px;
  border: 1.5px solid var(--neutral-300); border-radius: 4px;
  display: flex; align-items: center; justify-content: center;
  background: #fff; flex-shrink: 0;
  transition: border-color .18s, background .18s;
}
.lc-remember input:checked + .lc-cb-box { background: var(--brand-500); border-color: var(--brand-500); }
.lc-remember input:checked + .lc-cb-box::after {
  content: '';
  display: block;
  width: 5px; height: 9px;
  border: 2px solid #fff; border-top: none; border-left: none;
  transform: rotate(45deg) translate(-1px, -1px);
}

/* Submit button */
.lc-btn-submit {
  width: 100%;
  height: 48px;
  background: linear-gradient(135deg, var(--brand-600) 0%, #1241b5 100%);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  font-size: .92rem;
  font-weight: 700;
  letter-spacing: .1px;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center; gap: 9px;
  font-family: inherit;
  transition: opacity .18s, transform .14s, box-shadow .18s;
  box-shadow: var(--shadow-btn);
  margin-bottom: 24px;
}
.lc-btn-submit:hover   { opacity: .93; transform: translateY(-1px); box-shadow: 0 6px 22px rgba(29,78,216,.48); }
.lc-btn-submit:active  { transform: translateY(0); box-shadow: 0 2px 10px rgba(29,78,216,.30); }
.lc-btn-submit:disabled{ opacity: .6; cursor: not-allowed; transform: none; }

.lc-btn-default, .lc-btn-loading { display: inline-flex; align-items: center; gap: 9px; }

@keyframes spin { to { transform: rotate(360deg); } }
.lc-spin { animation: spin .7s linear infinite; }

.lc-footer {
  display: flex; align-items: center; justify-content: center; gap: 7px;
  font-size: .76rem; color: var(--neutral-400); font-weight: 500;
}

.fp-copyright {
  position: absolute; bottom: 18px;
  font-size: .73rem; color: var(--neutral-300); text-align: center;
}


/* ================================================================
   RESPONSIVE
   ================================================================ */
@media (max-width: 1100px) {
  .brand-panel { width: 50%; }
  .bp-inner    { padding: 32px 28px 0; }
}

@media (max-width: 820px) {
  .brand-panel { width: 46%; }
  .bp-inner    { padding: 28px 22px 0; }
  .bp-headline { font-size: 1.25rem; }
  .bp-stats-bar{ padding: 14px 22px; }
  .login-card  { padding: 32px 24px; }
}

@media (max-width: 680px) {
  /* Hide brand panel entirely — only login card on mobile */
  .brand-panel { display: none; }

  .erp-wrapper { flex-direction: column; }
  .form-panel  { flex: 1; padding: 32px 16px 48px; justify-content: center; min-height: 100vh; }
  .fp-mobile-brand { display: none; }
  .login-card  { padding: 28px 20px; border-radius: var(--radius-lg); }
  .fp-copyright{ position: static; margin-top: 16px; }

  /* Disable all animations on mobile */
  *, *::before, *::after {
    animation-duration: 0s !important;
    animation-delay: 0s !important;
    transition-duration: 0s !important;
  }
}

@media (max-width: 380px) {
  .lc-title    { font-size: 1.2rem; }
  .lc-input    { height: 43px; }
  .lc-btn-submit { height: 45px; }
}
