/*
 * MalondaPlus Enterprise Design System
 * Presentation layer only. Business logic, routes and data contracts remain unchanged.
 */
:root {
  --mp-ink: #14213d;
  --mp-ink-2: #20345d;
  --mp-brand: #e35d6a;
  --mp-brand-dark: #c74657;
  --mp-brand-soft: #fff0f1;
  --mp-accent: #21a6a1;
  --mp-accent-soft: #e8f7f5;
  --mp-bg: #f5f7fb;
  --mp-surface: #ffffff;
  --mp-surface-muted: #f8fafc;
  --mp-border: #e5eaf2;
  --mp-text: #24324a;
  --mp-muted: #718096;
  --mp-success: #17845f;
  --mp-success-soft: #eaf8f2;
  --mp-warning: #b7791f;
  --mp-warning-soft: #fff7e5;
  --mp-danger: #c43d55;
  --mp-danger-soft: #fff0f2;
  --mp-info: #3478b9;
  --mp-info-soft: #edf6ff;
  --mp-radius: 14px;
  --mp-radius-sm: 9px;
  --mp-shadow: 0 8px 30px rgba(20, 33, 61, .06);
  --mp-shadow-lg: 0 18px 55px rgba(20, 33, 61, .13);
  --mp-focus: 0 0 0 4px rgba(227, 93, 106, .16);
  --mp-ease: 180ms cubic-bezier(.2, .8, .2, 1);
}

html { background: var(--mp-bg); }
body {
  background: var(--mp-bg);
  color: var(--mp-text);
  font-size: 14px;
  letter-spacing: -.01em;
}
body, input, select, textarea, button { font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
a { color: var(--mp-brand-dark); }
a:hover { color: var(--mp-brand); }
:focus-visible { outline: 0; box-shadow: var(--mp-focus); }

/* Public navigation */
.navbar {
  height: 74px;
  padding: 0 2.5rem;
  background: rgba(20, 33, 61, .96);
  border-bottom: 1px solid rgba(255,255,255,.08);
  box-shadow: 0 5px 25px rgba(20,33,61,.16);
  backdrop-filter: blur(14px);
}
.navbar-inner { height: 74px; max-width: 1280px; }
.navbar-brand, .sidebar-logo, .footer-brand {
  letter-spacing: -.045em;
  font-size: 1.45rem;
}
.navbar-brand::before, .sidebar-logo::before {
  content: "M+";
  display: inline-flex;
  width: 29px;
  height: 29px;
  align-items: center;
  justify-content: center;
  margin-right: .55rem;
  border-radius: 8px;
  background: var(--mp-brand);
  color: #fff;
  font-size: .75rem;
  letter-spacing: -.08em;
  vertical-align: 2px;
}
.navbar-brand span, .footer-brand span, .sidebar-logo span { color: #f48b94; }
.navbar-nav { gap: .35rem; }
.navbar-nav a {
  padding: .55rem .75rem;
  border-radius: 8px;
  color: rgba(255,255,255,.68);
  font-size: .84rem;
}
.navbar-nav a:hover, .navbar-nav a.active { color: #fff; background: rgba(255,255,255,.08); }
.navbar-nav .btn-nav {
  margin-left: .35rem;
  padding: .62rem 1.1rem;
  background: var(--mp-brand);
  border-radius: 8px;
  box-shadow: 0 6px 16px rgba(227,93,106,.22);
}
.navbar-nav .btn-nav:hover { background: var(--mp-brand-dark); transform: none; }

/* Controls */
.btn {
  min-height: 40px;
  padding: .62rem 1rem;
  border-radius: 9px;
  border: 1px solid transparent;
  font-size: .84rem;
  font-weight: 700;
  letter-spacing: 0;
  transition: transform var(--mp-ease), background var(--mp-ease), border-color var(--mp-ease), box-shadow var(--mp-ease);
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--mp-brand); color: #fff; box-shadow: 0 6px 15px rgba(227,93,106,.18); }
.btn-primary:hover { background: var(--mp-brand-dark); box-shadow: 0 8px 20px rgba(227,93,106,.24); }
.btn-secondary { background: #eef2f7; color: var(--mp-ink); }
.btn-secondary:hover { background: #e2e8f0; }
.btn-success { background: var(--mp-success); }
.btn-warning { background: #c58a25; }
.btn-danger { background: var(--mp-danger); }
.btn-dark { background: var(--mp-ink); }
.btn-outline { color: var(--mp-ink); background: transparent; border-color: var(--mp-border); }
.btn-outline:hover { color: var(--mp-brand-dark); background: var(--mp-brand-soft); border-color: #f1b1b8; }
.btn-block { border-radius: 9px; }
.btn-sm { min-height: 34px; padding: .42rem .75rem; }

/* Surfaces */
.card, .feature-card, .pricing-card, .stat-card, .pos-cart, .ai-chat-box {
  background: var(--mp-surface);
  border: 1px solid var(--mp-border);
  border-radius: var(--mp-radius);
  box-shadow: var(--mp-shadow);
}
.card { overflow: hidden; }
.card:hover, .feature-card:hover, .pricing-card:hover, .stat-card:hover { transform: translateY(-2px); box-shadow: var(--mp-shadow-lg); }
.card-header {
  min-height: 58px;
  padding: 1rem 1.25rem;
  background: var(--mp-surface);
  border-bottom: 1px solid var(--mp-border);
  color: var(--mp-ink);
  font-size: .88rem;
}
.card-body { padding: 1.25rem; }
.feature-card, .pricing-card { box-shadow: var(--mp-shadow); }
.feature-card::before { background: linear-gradient(90deg, var(--mp-brand), var(--mp-accent)); }
.feature-icon { border-radius: 11px; background: var(--mp-brand-soft); color: var(--mp-brand-dark); }

/* Forms */
.form-group { margin-bottom: 1.1rem; }
.form-label {
  color: var(--mp-ink);
  font-size: .78rem;
  font-weight: 750;
  letter-spacing: .01em;
}
.form-control {
  min-height: 43px;
  padding: .68rem .82rem;
  border: 1px solid #d7deea;
  border-radius: 9px;
  background: #fff;
  color: var(--mp-text);
  box-shadow: 0 1px 2px rgba(20,33,61,.02);
}
.form-control:hover { border-color: #bdc9da; }
.form-control:focus { border-color: var(--mp-brand); box-shadow: var(--mp-focus); }
.form-control::placeholder { color: #9aa7b9; }
.form-text, .text-muted { color: var(--mp-muted); }
.form-check input[type=checkbox], .form-check input[type=radio] { accent-color: var(--mp-brand); }
hr { border: 0; border-top: 1px solid var(--mp-border); }

/* Feedback */
.alert {
  padding: .85rem 1rem;
  border: 1px solid transparent;
  border-left-width: 4px;
  border-radius: 10px;
  box-shadow: none;
}
.alert-success { background: var(--mp-success-soft); color: #16634a; border-color: #bce8d3; border-left-color: var(--mp-success); }
.alert-warning { background: var(--mp-warning-soft); color: #825b16; border-color: #f4dda2; border-left-color: var(--mp-warning); }
.alert-danger { background: var(--mp-danger-soft); color: #8f2d42; border-color: #f3bdc7; border-left-color: var(--mp-danger); }
.alert-info { background: var(--mp-info-soft); color: #245c8f; border-color: #c6e1fa; border-left-color: var(--mp-info); }
.badge {
  padding: .28rem .56rem;
  border-radius: 6px;
  font-size: .67rem;
  letter-spacing: .045em;
}
.badge-primary { background: var(--mp-brand-soft); color: var(--mp-brand-dark); }
.badge-success { background: var(--mp-success-soft); color: #16634a; }
.badge-warning { background: var(--mp-warning-soft); color: #825b16; }
.badge-danger { background: var(--mp-danger-soft); color: #8f2d42; }
.badge-info { background: var(--mp-info-soft); color: #245c8f; }

/* Tables */
.table-wrapper { border: 1px solid var(--mp-border); border-radius: 11px; background: #fff; }
table { font-size: .83rem; }
thead th {
  padding: .75rem .9rem;
  background: #f8fafc;
  color: #697992;
  border-bottom: 1px solid var(--mp-border);
  font-size: .68rem;
  letter-spacing: .07em;
}
tbody tr { border-bottom: 1px solid #edf1f6; }
tbody tr:hover { background: #fff8f8; }
tbody td { padding: .8rem .9rem; }
code { padding: .16rem .35rem; border-radius: 5px; background: #f2f5f9; color: var(--mp-ink-2); }

/* Auth */
.auth-screen {
  min-height: calc(100vh - 0px);
  display: grid;
  grid-template-columns: minmax(280px, .92fr) minmax(360px, 1.08fr);
  align-items: stretch;
  background: var(--mp-ink);
}
.auth-brand-panel {
  position: relative;
  display: flex;
  align-items: flex-end;
  padding: clamp(2rem, 6vw, 5.5rem);
  overflow: hidden;
  color: #fff;
  background:
    radial-gradient(circle at 18% 18%, rgba(227,93,106,.35), transparent 33%),
    radial-gradient(circle at 75% 85%, rgba(33,166,161,.26), transparent 38%),
    linear-gradient(150deg, #14213d 0%, #20345d 100%);
}
.auth-brand-panel::after {
  content: "";
  position: absolute;
  width: 520px;
  height: 520px;
  right: -220px;
  top: -150px;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 50%;
  box-shadow: 0 0 0 44px rgba(255,255,255,.025), 0 0 0 88px rgba(255,255,255,.02);
}
.auth-brand-content { position: relative; z-index: 1; max-width: 460px; }
.auth-kicker { display: inline-flex; align-items: center; gap: .5rem; color: #f7b2b8; font-size: .72rem; font-weight: 800; letter-spacing: .13em; text-transform: uppercase; }
.auth-kicker::before { content: ""; width: 24px; height: 2px; background: var(--mp-brand); }
.auth-brand-content h1 { max-width: 440px; margin: 1rem 0; color: #fff; font-size: clamp(2rem, 4vw, 3.7rem); line-height: 1.05; letter-spacing: -.06em; }
.auth-brand-content p { max-width: 430px; color: rgba(255,255,255,.66); font-size: 1rem; line-height: 1.7; }
.auth-trust-row { display: flex; gap: 1rem; flex-wrap: wrap; margin-top: 2rem; color: rgba(255,255,255,.7); font-size: .78rem; }
.auth-trust-row span { display: inline-flex; align-items: center; gap: .38rem; }
.auth-trust-row i { color: #7dd8c8; }
.auth-form-panel { display: flex; align-items: center; justify-content: center; padding: 2rem; background: #f8fafc; }
.auth-form-wrap { width: min(100%, 440px); }
.auth-form-brand { display: none; color: var(--mp-ink); font-size: 1.35rem; font-weight: 800; letter-spacing: -.05em; }
.auth-form-brand span { color: var(--mp-brand); }
.auth-heading { margin-bottom: 1.5rem; }
.auth-heading h2 { color: var(--mp-ink); font-size: 1.65rem; letter-spacing: -.04em; }
.auth-heading p { margin-top: .35rem; color: var(--mp-muted); }
.auth-card { padding: 1.75rem; border: 1px solid var(--mp-border); border-radius: var(--mp-radius); background: #fff; box-shadow: var(--mp-shadow-lg); }
.auth-card .card-body { padding: 0; }
.auth-footer { margin-top: 1rem; color: var(--mp-muted); text-align: center; font-size: .78rem; }
.auth-footer a { color: var(--mp-brand-dark); }
.auth-forgot { margin: -.15rem 0 1.15rem; text-align: right; font-size: .78rem; }
.auth-divider { margin: 1.35rem 0; }
.auth-signup { color: var(--mp-muted); font-size: .85rem; }
.auth-signup a { color: var(--mp-brand-dark); font-weight: 750; }
.auth-demo { margin-top: .65rem; color: #9aa7b9; font-size: .73rem; }
.input-with-icon { position: relative; }
.input-with-icon .form-control { padding-left: 2.45rem; }
.input-with-icon > i { position: absolute; left: .85rem; top: 50%; z-index: 1; transform: translateY(-50%); color: #9aa7b9; pointer-events: none; }
.password-field { position: relative; }
.password-field .form-control { padding-right: 2.8rem; }
.password-toggle { position: absolute; right: .7rem; top: 50%; z-index: 2; transform: translateY(-50%); border: 0; background: transparent; color: var(--mp-muted); cursor: pointer; }
.register-hero { padding: 4.25rem 2rem 3rem !important; background: linear-gradient(135deg, var(--mp-ink), var(--mp-ink-2)) !important; }
.register-hero h1 { font-size: clamp(2rem, 4vw, 3rem) !important; letter-spacing: -.05em; }
.register-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 1.5rem; max-width: 1060px !important; }
.register-layout > .card { box-shadow: var(--mp-shadow-lg); }
.register-aside .card { margin-bottom: 1rem !important; }
.register-aside .card-body { border-radius: var(--mp-radius) !important; }
.section-kicker { padding-bottom: .55rem; margin: 1.5rem 0 1rem; border-bottom: 1px solid var(--mp-border); color: var(--mp-brand-dark); font-size: .72rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }

/* Application shell */
.dashboard-wrap { background: var(--mp-bg); }
.sidebar {
  width: 248px;
  background: var(--mp-ink);
  border-right: 1px solid rgba(255,255,255,.07);
  box-shadow: 6px 0 25px rgba(20,33,61,.08);
}
.sidebar-logo { display: flex; align-items: center; min-height: 74px; padding: 1.2rem 1.25rem; border-bottom-color: rgba(255,255,255,.09); }
.sidebar-user { padding: 1rem 1.25rem; background: rgba(255,255,255,.025); border-bottom-color: rgba(255,255,255,.09); }
.sidebar-avatar { width: 36px; height: 36px; border-radius: 10px; background: var(--mp-brand); }
.sidebar-user-info .name { color: #fff; font-size: .83rem; }
.sidebar-user-info .role { color: rgba(255,255,255,.48); font-size: .67rem; letter-spacing: .07em; }
.sidebar-nav { padding: .7rem .65rem 1.5rem; }
.sidebar-nav-title { padding: .75rem .65rem .35rem; margin-top: .55rem; color: rgba(255,255,255,.35); font-size: .63rem; letter-spacing: .13em; }
.sidebar-nav a { gap: .68rem; margin: .13rem 0; padding: .6rem .65rem; border-left: 0; border-radius: 8px; color: rgba(255,255,255,.62); font-size: .78rem; }
.sidebar-nav a:hover, .sidebar-nav a.active { background: rgba(255,255,255,.09); color: #fff; border-left-color: transparent; }
.sidebar-nav a.active { box-shadow: inset 3px 0 0 var(--mp-brand); background: linear-gradient(90deg, rgba(227,93,106,.18), rgba(255,255,255,.05)); }
.sidebar-nav a i { width: 18px; color: rgba(255,255,255,.45); font-size: .95rem; }
.sidebar-nav a.active i { color: #f48b94; }
.main-content { margin-left: 248px; }
.top-bar { min-height: 74px; height: auto; padding: .75rem 2rem; border-bottom: 1px solid var(--mp-border); box-shadow: 0 3px 16px rgba(20,33,61,.04); }
.top-bar-left h1 { color: var(--mp-ink); font-size: 1.05rem; letter-spacing: -.025em; }
.top-bar-right { gap: .65rem; }
.page-content { padding: 1.65rem 2rem 2.5rem; }
.page-content > * { animation: mpRise .35s ease both; }
.stat-grid { gap: .85rem; margin-bottom: 1.35rem; }
.stat-card { min-height: 118px; padding: 1.15rem; border-left: 0 !important; position: relative; overflow: hidden; }
.stat-card::after { content: ""; position: absolute; inset: 0 0 auto; height: 3px; background: var(--mp-brand); }
.stat-card:nth-child(2)::after { background: var(--mp-accent); }
.stat-card:nth-child(3)::after { background: #5894ce; }
.stat-card:nth-child(4)::after { background: #b58a38; }
.stat-card:nth-child(5)::after { background: #a75f9a; }
.stat-card:nth-child(6)::after { background: var(--mp-success); }
.stat-icon { width: 42px; height: 42px; border-radius: 10px; }
.stat-info .value { color: var(--mp-ink); font-size: 1.34rem; letter-spacing: -.04em; }
.stat-info .label { color: var(--mp-muted); font-size: .68rem; letter-spacing: .08em; }
.top-bar .navbar-toggle { display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; color: var(--mp-ink); border-radius: 8px; }
.top-bar .navbar-toggle:hover { background: var(--mp-brand-soft); color: var(--mp-brand-dark); }
.notif-bell { position: fixed; }
.notif-bell .nb-btn { width: 36px; height: 36px; border: 1px solid var(--mp-border); border-radius: 9px; color: var(--mp-ink); box-shadow: none; }
.notif-bell .nb-cnt { background: var(--mp-brand); }
.notif-bell .nb-panel { top: 58px; border-radius: 11px; border-color: var(--mp-border); box-shadow: var(--mp-shadow-lg); }
.notif-bell .nb-i.unread { background: var(--mp-brand-soft); border-left-color: var(--mp-brand); }

/* POS and assistant */
.pos-layout { gap: 1rem; }
.pos-product-item { border: 1px solid var(--mp-border); border-radius: 10px; box-shadow: var(--mp-shadow); }
.pos-product-item:hover { border-color: #efa4ab; box-shadow: 0 8px 22px rgba(227,93,106,.12); }
.pos-cart { border-radius: var(--mp-radius); }
.ai-message.user .ai-bubble { background: var(--mp-brand); }
.ai-message.bot .ai-bubble { background: var(--mp-accent-soft); }

/* Public sections/footer */
.section { padding: 5.5rem 2rem; }
.section-title h2 { color: var(--mp-ink); letter-spacing: -.05em; }
.footer { background: var(--mp-ink); border-top: 4px solid var(--mp-brand); }
.social-link { border-radius: 8px; }

@keyframes mpRise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
@media (max-width: 1024px) {
  .auth-screen { grid-template-columns: 1fr; }
  .auth-brand-panel { min-height: 330px; align-items: center; }
  .auth-form-panel { min-height: 620px; }
  .register-layout { grid-template-columns: 1fr; }
  .main-content { margin-left: 0; }
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: translateX(0); }
}
@media (max-width: 768px) {
  .navbar { padding: 0 1rem; }
  .navbar-nav.open { top: 74px; background: var(--mp-ink); padding: .75rem; }
  .page-content { padding: 1rem; }
  .top-bar { padding: .65rem 1rem; }
  .top-bar-right > span:not(.badge) { display: none; }
  .auth-brand-panel { min-height: 260px; padding: 2.25rem 1.5rem; }
  .auth-brand-content h1 { font-size: 2.1rem; }
  .auth-form-panel { padding: 1.2rem; }
  .auth-card { padding: 1.2rem; }
  .register-layout { display: block; }
  .register-hero { padding: 3rem 1.25rem 2.5rem !important; }
  .section { padding: 3rem 1.25rem; }
}
@media (max-width: 480px) {
  .stat-grid { grid-template-columns: 1fr; }
  .top-bar { align-items: flex-start; }
  .top-bar-right { max-width: 48%; justify-content: flex-end; }
  .auth-brand-panel { min-height: 235px; }
  .auth-brand-content p, .auth-trust-row { display: none; }
}
@media print {
  .sidebar { display: none !important; }
  .main-content { margin-left: 0 !important; }
}