:root { --erp-maroon: #8a1538; --erp-maroon-dark: #6d102c; --erp-navy: #0f1e3d; --erp-blue: #2563eb; --erp-grad: linear-gradient(135deg, #1e3a8a 0%, #2563eb 55%, #3b82f6 100%); --erp-ink: #111827; --erp-muted: #6b7280; --erp-line: #e5e7eb; --erp-ease: cubic-bezier(.22, 1, .36, 1); --bs-primary: #8a1538; --bs-primary-rgb: 138, 21, 56; --bs-link-color: #8a1538; --bs-link-hover-color: #6d102c; }
body { font-family: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif; background: #f7f7f8; color: var(--erp-ink); animation: erpPageIn .5s var(--erp-ease) both; -webkit-font-smoothing: antialiased; }
body.erp-leaving { animation: erpPageOut .25s ease forwards; }
@keyframes erpPageIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes erpPageOut { to { opacity: 0; } }
@keyframes erpRise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes erpFade { from { opacity: 0; } to { opacity: 1; } }
@keyframes erpShake { 20%, 60% { transform: translateX(-4px); } 40%, 80% { transform: translateX(4px); } }
.erp-rise { animation: erpRise .6s var(--erp-ease) both; animation-delay: calc(var(--i, 0) * 70ms + 100ms); }
.erp-reveal { animation: erpFade .8s ease both; }
.erp-fade-in { animation: erpFade .35s ease both; }
.erp-shake { animation: erpShake .4s ease both; }
.erp-btn { background: var(--erp-maroon); color: #fff !important; border: 0; border-radius: .6rem; font-weight: 500; transition: background-color .2s ease, transform .2s var(--erp-ease); }
.erp-btn:hover { background: var(--erp-maroon-dark); box-shadow: 0 8px 20px -10px rgba(138, 21, 56, .8); }
.erp-btn:active { transform: scale(.985); }
.btn-primary { --bs-btn-bg: #8a1538; --bs-btn-border-color: #8a1538; --bs-btn-hover-bg: #6d102c; --bs-btn-hover-border-color: #6d102c; --bs-btn-active-bg: #6d102c; --bs-btn-active-border-color: #6d102c; }
.form-control:focus, .form-select:focus, .form-check-input:focus { border-color: #111827; box-shadow: 0 0 0 3px rgba(17, 24, 39, .08); }
.form-check-input:checked { background-color: var(--erp-ink); border-color: var(--erp-ink); }

.erp-auth { min-height: 100vh; background: #fff; }
.erp-auth-wrap { min-height: 100vh; display: grid; grid-template-columns: 1fr; }
@media (min-width: 992px) { .erp-auth-wrap { grid-template-columns: 1fr 1fr; } }
.erp-auth-brand { position: relative; overflow: hidden; flex-direction: column; justify-content: flex-start; align-items: flex-start; gap: 2rem; padding: 3.5rem clamp(2.5rem, 6vw, 5rem) 0; background: #fff; border-right: 1px solid var(--erp-line); }
.erp-auth-form { display: flex; flex-direction: column; justify-content: center; align-items: center; padding: 2rem; }
.erp-auth-card { width: 100%; max-width: 360px; }
.erp-auth-foot { color: #9ca3af; font-size: 12px; }
.erp-float .form-control { border: 1px solid var(--erp-line); border-radius: .6rem; transition: border-color .2s ease, box-shadow .2s ease; }
.erp-float label { color: var(--erp-muted); }
.erp-eye { position: absolute; right: .4rem; top: 50%; transform: translateY(-50%); z-index: 5; color: var(--erp-muted); text-decoration: none; }
.erp-link { color: var(--erp-ink); text-decoration: none; font-weight: 500; }
.erp-link:hover { color: var(--erp-maroon); }

.erp-logo-anim { position: relative; width: var(--logo-size); height: var(--logo-size); }
.erp-logo-anim svg { width: 100%; height: 100%; display: block; border-radius: 25%; box-shadow: 0 0 0 1px rgba(17, 24, 39, .06), 0 10px 24px -12px rgba(138, 21, 56, .45); animation: erpLogoIn .9s var(--erp-ease) both; }
@keyframes erpLogoIn { from { opacity: 0; transform: scale(.85); } to { opacity: 1; transform: none; } }
.erp-logo-band { animation: erpBand .9s var(--erp-ease) .3s both; }
@keyframes erpBand { from { transform: translateX(-20px); } to { transform: none; } }
.erp-logo-ring { stroke-dasharray: 100; stroke-dashoffset: 100; animation: erpRing 1.1s var(--erp-ease) .5s forwards; transform-origin: 40px 32px; transform: rotate(-90deg); }
@keyframes erpRing { to { stroke-dashoffset: 0; } }
.erp-logo-dot { transform-origin: 40px 32px; animation: erpDot .5s var(--erp-ease) 1.3s both, erpBeat 3s ease-in-out 2s infinite; }
@keyframes erpDot { from { transform: scale(0); } to { transform: scale(1); } }
@keyframes erpBeat { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.35); } }
.erp-logo-shine { animation: erpShine 6s ease-in-out 2s infinite; }
@keyframes erpShine { 0% { transform: rotate(20deg) translateX(0); } 30%, 100% { transform: rotate(20deg) translateX(150px); } }

.erp-modules { position: relative; z-index: 2; display: flex; flex-wrap: wrap; gap: .5rem .5rem; margin: 0; max-width: 560px; }
.erp-modules li { display: inline-flex; align-items: center; gap: .45rem; padding: .35rem .75rem; border: 1px solid var(--erp-line); border-radius: 50rem; background: rgba(255, 255, 255, .85); backdrop-filter: blur(4px); font-size: 13px; font-weight: 500; color: #6b7280; opacity: 0; animation: erpRise .6s var(--erp-ease) forwards, erpTick calc(var(--n) * 1.2s) ease-in-out infinite; animation-delay: calc(var(--i) * 70ms + .6s), calc(var(--i) * 1.2s + 2s); transition: border-color .2s ease, color .2s ease, transform .25s var(--erp-ease); }
.erp-modules li i { font-size: 1.15rem; transition: transform .3s var(--erp-ease); }
.erp-modules li:hover { color: var(--erp-ink); border-color: #cbd5e1; transform: translateY(-2px); }
.erp-modules li:hover i { transform: translateX(2px); }
@keyframes erpTick { 0%, 12%, 100% { color: #6b7280; border-color: var(--erp-line); } 4%, 8% { color: var(--erp-maroon); border-color: rgba(138, 21, 56, .35); } }

.erp-lock { background: #fff; position: relative; }
.erp-lock .erp-halftone { position: fixed; }
.erp-lock-scene { position: fixed; left: 0; right: 0; bottom: 0; z-index: 0; opacity: .9; pointer-events: none; animation: erpFade 1.2s ease .3s both; }
.erp-lock-scene { display: flex; justify-content: center; background: linear-gradient(to top, #f1f5f9 calc(34vh * 80 / 640), #cbd5e1 calc(34vh * 80 / 640), #cbd5e1 calc(34vh * 80 / 640 + 2px), transparent calc(34vh * 80 / 640 + 2px)); }
.erp-lock-scene .erp-corniche { width: auto; height: 34vh; max-width: 100%; max-height: none; }
.erp-lock-switch { background: rgba(255, 255, 255, .85); border-radius: .5rem; }
.erp-lock-main { position: relative; z-index: 1; }
.erp-lock-card { background: rgba(255, 255, 255, .9); backdrop-filter: blur(8px); padding: 1.5rem; border-radius: 1rem; }
.erp-lock-main { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: flex-start; padding: 5vh 1rem 36vh; }
.erp-lock-clock { text-align: center; margin: 1rem 0 1.5rem; }
.erp-lock-clock time { display: block; font-size: clamp(3rem, 7vw, 4.5rem); font-weight: 200; letter-spacing: -.04em; line-height: 1; color: var(--erp-ink); }
.erp-lock-clock p { margin: .6rem 0 0; color: var(--erp-muted); }
.erp-lock-card { width: 100%; max-width: 340px; text-align: center; }
.erp-lock-avatar { position: relative; display: inline-grid; place-items: center; width: 72px; height: 72px; border-radius: 50%; background: var(--erp-ink); color: #fff; font-size: 1.4rem; font-weight: 600; }
.erp-lock-avatar img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; position: relative; z-index: 1; }
.erp-lock-avatar > span:not(.erp-lock-pulse) { position: relative; z-index: 1; }
.erp-lock-pulse { position: absolute; inset: 0; border-radius: 50%; border: 1px solid var(--erp-maroon); animation: erpPulse 2.6s ease-out infinite; }
@keyframes erpPulse { from { transform: scale(1); opacity: .7; } to { transform: scale(1.45); opacity: 0; } }
.erp-lock-badge { position: absolute; right: -2px; bottom: -2px; z-index: 2; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-size: .7rem; background: #fff; color: var(--erp-maroon); border: 1px solid var(--erp-line); }
.erp-lock-field .form-control, .erp-lock-field .input-group-text { border-color: var(--erp-line); background: #fff; }
.erp-lock-field .input-group-text { border-radius: .6rem 0 0 .6rem; color: var(--erp-muted); }
.erp-lock-field .btn { border-radius: 0 .6rem .6rem 0; }
.erp-lock-switch { color: var(--erp-muted); text-decoration: none; font-size: 14px; }
.erp-lock-switch:hover { color: var(--erp-ink); }
.erp-lock-foot { position: fixed; bottom: .6rem; left: 0; right: 0; z-index: 2; text-align: center; }

.erp-topbar { background: rgba(255, 255, 255, .9); backdrop-filter: blur(12px); border-bottom: 1px solid var(--erp-line); position: sticky; top: 0; z-index: 1030; }
.erp-topbar .erp-clock { font-size: 12px; color: var(--erp-muted); }
.erp-modnav { background: transparent; overflow-x: auto; white-space: nowrap; gap: .25rem; border-bottom: 1px solid var(--erp-line); scrollbar-width: none; }
.erp-modnav a { position: relative; display: inline-flex; align-items: center; gap: .45rem; padding: .7rem .9rem; font-size: 14px; font-weight: 500; color: var(--erp-muted); text-decoration: none; opacity: 0; animation: erpRise .45s var(--erp-ease) forwards; animation-delay: calc(var(--i, 0) * 40ms); transition: color .2s ease; }
.erp-modnav a::after { content: ""; position: absolute; left: .9rem; right: .9rem; bottom: -1px; height: 2px; background: var(--erp-maroon); transform: scaleX(0); transition: transform .3s var(--erp-ease); }
.erp-modnav a:hover { color: var(--erp-ink); }
.erp-modnav a.active { color: var(--erp-ink); }
.erp-modnav a.active::after, .erp-modnav a:hover::after { transform: scaleX(1); }
main.erp-main > * { animation: erpRise .5s var(--erp-ease) both; animation-delay: .15s; }
.erp-swap tbody tr { animation: erpFade .35s ease both; }
.modal.fade .modal-dialog { transform: translateY(12px); opacity: 0; transition: transform .3s var(--erp-ease), opacity .25s ease; }
.modal.show .modal-dialog { transform: none; opacity: 1; }
.modal-content { border: 1px solid var(--erp-line); border-radius: .9rem; box-shadow: 0 24px 48px -24px rgba(17, 24, 39, .25); }
.dropdown-menu { border: 1px solid var(--erp-line); border-radius: .7rem; box-shadow: 0 12px 28px -16px rgba(17, 24, 39, .25); animation: erpDrop .2s var(--erp-ease); }
@keyframes erpDrop { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
.toast { animation: erpRise .35s var(--erp-ease); border-radius: .7rem; }
.erp-progress { position: fixed; top: 0; left: 0; height: 2px; width: 0; z-index: 3000; background: var(--erp-maroon); transition: width .3s ease, opacity .4s ease; }

.modal-header.erp-modal-success { background: linear-gradient(135deg, #15803d, #22c55e); color: #fff; }
.modal-header.erp-modal-danger { background: linear-gradient(135deg, #b91c1c, #ef4444); color: #fff; }
.modal-header.erp-modal-primary { background: var(--erp-grad); color: #fff; }
.modal-header.erp-modal-warning { background: linear-gradient(135deg, #b45309, #f59e0b); color: #fff; }
.modal-header[class*="erp-modal-"] .btn-close { filter: invert(1) grayscale(1) brightness(2); }
.erp-toast-wrap { position: fixed; top: 1rem; right: 1rem; z-index: 2000; }

.erp-brand-top { position: relative; z-index: 2; display: flex; flex-direction: column; align-items: flex-start; gap: 1.25rem; }
.erp-lockup { display: flex; align-items: center; gap: 1rem; }
.erp-wordmark { font-size: 1.75rem; font-weight: 800; letter-spacing: -.02em; line-height: 1; color: var(--erp-navy); }
.erp-wordmark span { color: var(--erp-maroon); }
.erp-slogan { margin-top: .4rem; font-size: .9rem; font-weight: 500; color: #64748b; }
.erp-halftone { position: absolute; inset: 0; z-index: 0; pointer-events: none; background-image: var(--erp-photo, none); background-size: cover; background-position: center; }
.erp-halftone::before { content: ""; position: absolute; inset: 0; background-image: radial-gradient(circle, rgba(37, 99, 235, .55) 1.3px, transparent 1.6px); background-size: 9px 9px; -webkit-mask-image: radial-gradient(120% 90% at 100% 0%, #000 0%, rgba(0, 0, 0, .6) 30%, transparent 60%); mask-image: radial-gradient(120% 90% at 100% 0%, #000 0%, rgba(0, 0, 0, .6) 30%, transparent 60%); animation: erpDrift 24s linear infinite; }
.erp-halftone::after { content: ""; position: absolute; inset: 0; background-image: radial-gradient(circle, rgba(138, 21, 56, .35) 1.1px, transparent 1.4px); background-size: 7px 7px; -webkit-mask-image: radial-gradient(70% 50% at 0% 100%, #000 0%, transparent 70%); mask-image: radial-gradient(70% 50% at 0% 100%, #000 0%, transparent 70%); }
.erp-auth-brand[style*="--erp-photo"] .erp-halftone { opacity: .9; }
.erp-auth-brand[style*="--erp-photo"] .erp-halftone::before { background-image: radial-gradient(circle, rgba(255, 255, 255, .6) 1.3px, transparent 1.6px); -webkit-mask-image: none; mask-image: none; }
@keyframes erpDrift { to { background-position: 90px 90px; } }
.erp-scene-wrap { position: relative; z-index: 1; margin-top: auto; width: calc(100% + 2 * clamp(2.5rem, 6vw, 5rem)); margin-inline: calc(-1 * clamp(2.5rem, 6vw, 5rem)); animation: erpFade 1.2s ease .4s both; }
.erp-corniche { display: block; width: 100%; height: auto; max-height: 58vh; }
.erp-corniche * { transform-box: fill-box; }
.cn-sun { transform-origin: center; animation: cnSun 6s ease-in-out infinite; }
@keyframes cnSun { 50% { transform: scale(1.06); } }
.cn-birds { animation: cnBirds 22s linear infinite; }
@keyframes cnBirds { from { transform: translate(-80px, 120px); } to { transform: translate(1260px, 60px); } }
.cn-blink { animation: cnBlink 1.6s steps(2) infinite; }
@keyframes cnBlink { 50% { opacity: .15; } }
.cn-waves path { animation: cnWave 6s linear infinite; }
.cn-waves path + path { animation-duration: 9s; animation-direction: reverse; }
@keyframes cnWave { to { transform: translateX(100px); } }
.cn-dhow { animation: cnSail 38s linear infinite; }
@keyframes cnSail { 0% { transform: translate(-160px, 500px); } 100% { transform: translate(1240px, 500px); } }
.cn-dhow > * { animation: cnBob 2.6s ease-in-out infinite; }
@keyframes cnBob { 50% { transform: translateY(-4px) rotate(-1.5deg); } }
.cn-leaves { transform-origin: 50% 100%; animation: cnSway 4s ease-in-out infinite; }
@keyframes cnSway { 50% { transform: rotate(4deg); } }
.cn-broom { transform-origin: 0% 0%; animation: cnSweep 1.1s ease-in-out infinite; }
@keyframes cnSweep { 0%, 100% { transform: rotate(-12deg); } 50% { transform: rotate(14deg); } }
.cn-dust circle { animation: cnDust 1.1s ease-out infinite; }
.cn-dust circle:nth-child(2) { animation-delay: .2s; } .cn-dust circle:nth-child(3) { animation-delay: .4s; }
@keyframes cnDust { from { opacity: .9; transform: translate(0, 0); } to { opacity: 0; transform: translate(14px, -12px); } }
.cn-walker { animation: cnWalk 30s linear infinite; }
@keyframes cnWalk { from { transform: translateX(-120px); } to { transform: translateX(1300px); } }
.cn-walker .cn-maid { animation: cnStep .5s ease-in-out infinite; }
.cn-walker .cn-maid { transform: translate(0, 560px); }
@keyframes cnStep { 0%, 100% { transform: translate(0, 560px); } 50% { transform: translate(0, 557px); } }
.cn-leg-a { transform-origin: 50% 0%; animation: cnLeg .5s ease-in-out infinite; }
.cn-leg-b { transform-origin: 50% 0%; animation: cnLeg .5s ease-in-out infinite reverse; }
@keyframes cnLeg { 0%, 100% { transform: rotate(18deg); } 50% { transform: rotate(-18deg); } }
.cn-wheel { transform-origin: center; animation: erpSpin 1s linear infinite; stroke-dasharray: 8 4; }
@keyframes erpSpin { to { transform: rotate(360deg); } }
.cn-can { transform-origin: 100% 50%; animation: cnPour 3s ease-in-out infinite; }
@keyframes cnPour { 0%, 30%, 100% { transform: rotate(0); } 45%, 85% { transform: rotate(-16deg); } }
.cn-drops circle { opacity: 0; animation: cnDrop 3s linear infinite; }
.cn-drops circle:nth-child(2) { animation-delay: .25s; } .cn-drops circle:nth-child(3) { animation-delay: .5s; }
@keyframes cnDrop { 0%, 45% { opacity: 0; transform: translateY(-6px); } 55% { opacity: 1; } 85% { opacity: 1; transform: translateY(18px); } 100% { opacity: 0; transform: translateY(22px); } }
.cn-bloom { transform-origin: center; animation: cnBloom 3s ease-in-out infinite; }
@keyframes cnBloom { 0%, 60% { transform: scale(.8); } 90% { transform: scale(1.15); } }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; } }
.erp-company { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border: 1px solid #ece7ea; border-radius: 14px; background: #fbf8f9; margin-bottom: 18px; }
.erp-company img { width: 42px; height: 42px; object-fit: contain; border-radius: 10px; background: #fff; }
.erp-company span { width: 42px; height: 42px; border-radius: 10px; display: grid; place-items: center; background: linear-gradient(135deg, #8a1538, #0f1e3d); color: #fff; font-weight: 700; font-size: 18px; }
.erp-company b { display: block; font-size: 15px; color: #0f1e3d; }
.erp-company small { color: #8a1538; font-size: 11px; font-weight: 600; letter-spacing: .03em; }

.erp-auth-form { background: radial-gradient(1200px 600px at 100% 0%, rgba(138, 21, 56, .07), transparent 60%), radial-gradient(900px 500px at 0% 100%, rgba(15, 30, 61, .06), transparent 60%), #f7f6f8; }
.erp-auth-panel { max-width: 420px; background: #fff; border: 1px solid #ebe6ea; border-radius: 22px; padding: 2.25rem 2rem 2rem; box-shadow: 0 1px 2px rgba(15, 30, 61, .04), 0 24px 60px -30px rgba(15, 30, 61, .35); position: relative; overflow: hidden; }
.erp-auth-panel::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 4px; background: linear-gradient(90deg, #8a1538, #c0265a 45%, #0f1e3d); }
.erp-auth-panel h1 { color: #0f1e3d; letter-spacing: -.01em; }
.erp-auth-panel .erp-float .form-control { border-radius: 14px; border: 1.5px solid #e7e2e6; background: #fbfafb; min-height: 3.6rem; }
.erp-auth-panel .erp-float .form-control:focus { border-color: #8a1538; background: #fff; box-shadow: 0 0 0 4px rgba(138, 21, 56, .12); }
.erp-auth-panel .erp-float .form-control.is-invalid { border-color: #dc3545; box-shadow: 0 0 0 4px rgba(220, 53, 69, .1); }
.erp-auth-panel .erp-btn { border-radius: 14px; min-height: 3.3rem; font-weight: 600; letter-spacing: .01em; background: linear-gradient(135deg, #8a1538, #6b0f2b); box-shadow: 0 14px 28px -16px rgba(138, 21, 56, .9); }
.erp-auth-panel .erp-btn:hover { background: linear-gradient(135deg, #9b1840, #5e0b26); }
.erp-auth-panel .alert { border-radius: 12px; }
.erp-auth-foot { margin-top: 1.25rem !important; }
.erp-demo { border: 1.5px dashed #d9c6cf; background: linear-gradient(180deg, #fdf8fa, #fff); border-radius: 16px; padding: .85rem 1rem; margin: 0 0 1.25rem; font-size: 13px; }
.erp-demo-head { font-weight: 700; color: #8a1538; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; margin-bottom: .45rem; display: flex; gap: .4rem; align-items: center; }
.erp-demo-row { display: flex; justify-content: space-between; align-items: center; gap: .75rem; padding: .2rem 0; color: #64748b; }
.erp-demo-row code { color: #0f1e3d; background: #f1edf0; padding: .15rem .5rem; border-radius: 8px; font-size: 12.5px; }
.erp-demo-use { margin-top: .55rem; width: 100%; border: 1px solid #8a1538; color: #8a1538; background: #fff; border-radius: 10px; padding: .45rem; font-weight: 600; font-size: 13px; transition: background .15s, color .15s; }
.erp-demo-use:hover { background: #8a1538; color: #fff; }
@media (max-width: 575px) { .erp-auth-panel { padding: 1.75rem 1.25rem; border-radius: 18px; } }
.erp-auth-icon { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; background: linear-gradient(135deg, rgba(138, 21, 56, .12), rgba(15, 30, 61, .08)); color: #8a1538; font-size: 22px; margin-bottom: 14px; }
