/**
 * INFOSSEL ERP — Pro Theme 2026
 * Full-width menu · clean SaaS · fast animations
 */
:root {
  --erp-sidebar-w: 280px;
  --erp-sidebar-sm: 72px;
  --erp-pro-bg: #f8fafc;
  --erp-pro-surface: #ffffff;
  --erp-pro-border: #e2e8f0;
  --erp-pro-text: #0f172a;
  --erp-pro-muted: #64748b;
  --erp-pro-accent: #6366f1;
  --erp-pro-accent-2: #8b5cf6;
  --erp-pro-success: #059669;
  --erp-pro-radius: 12px;
  --erp-pro-radius-lg: 16px;
  --erp-pro-shadow: 0 1px 3px rgba(15,23,42,.06), 0 8px 24px rgba(15,23,42,.06);
  --erp-pro-shadow-lg: 0 12px 40px rgba(15,23,42,.12);
  --erp-pro-fast: 0.18s cubic-bezier(0.4, 0, 0.2, 1);
  --erp-pro-menu-bg: #0c1222;
  --erp-pro-menu-hover: rgba(99,102,241,.15);
  --erp-pro-menu-active: rgba(99,102,241,.28);
}

/* ── Shell: true full width ── */
body.erp-pro,
body.erp-app.erp-pro {
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--erp-pro-bg);
  -webkit-font-smoothing: antialiased;
}

body.erp-pro .container.body,
body.erp-pro .main_container {
  width: 100% !important;
  max-width: 100% !important;
}

body.erp-pro .left_col {
  width: var(--erp-sidebar-w) !important;
  background: var(--erp-pro-menu-bg) !important;
  border-right: 1px solid rgba(255,255,255,.06);
  box-shadow: none !important;
}

body.erp-pro.nav-sm .left_col,
body.erp-pro .nav-sm .left_col {
  width: var(--erp-sidebar-sm) !important;
}

body.erp-pro .right_col {
  margin-left: var(--erp-sidebar-w) !important;
  width: calc(100% - var(--erp-sidebar-w)) !important;
  max-width: none !important;
  padding: 1.25rem 1.75rem 2.5rem !important;
  background: var(--erp-pro-bg) !important;
}

body.erp-pro.nav-sm .right_col {
  margin-left: var(--erp-sidebar-sm) !important;
  width: calc(100% - var(--erp-sidebar-sm)) !important;
}

body.erp-pro .top_nav {
  margin-left: var(--erp-sidebar-w) !important;
  width: calc(100% - var(--erp-sidebar-w)) !important;
  background: rgba(255,255,255,.92) !important;
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--erp-pro-border);
  box-shadow: 0 1px 0 rgba(15,23,42,.04);
  min-height: 56px;
}

body.erp-pro.nav-sm .top_nav {
  margin-left: var(--erp-sidebar-sm) !important;
  width: calc(100% - var(--erp-sidebar-sm)) !important;
}

@media (max-width: 991px) {
  body.erp-pro .right_col,
  body.erp-pro .top_nav {
    margin-left: 0 !important;
    width: 100% !important;
  }
}

/* ── Sidebar brand — full width ── */
body.erp-pro .nav_title {
  background: transparent !important;
  padding: 1.25rem 1rem 1rem !important;
  border-bottom: 1px solid rgba(255,255,255,.08);
  width: 100%;
}
body.erp-pro .erp-sidebar-brand {
  width: 100%;
  padding: 0 .25rem;
}
body.erp-pro .erp-sidebar-brand .brand-icon {
  width: 40px; height: 40px;
  border-radius: 11px;
  background: linear-gradient(135deg, var(--erp-pro-accent), var(--erp-pro-accent-2));
  box-shadow: 0 4px 14px rgba(99,102,241,.4);
}

/* ── FULL WIDTH SIDEBAR MENU ── */
body.erp-pro #sidebar-menu {
  width: 100%;
  padding: .5rem 0 2rem;
}
body.erp-pro #sidebar-menu .menu_section {
  width: 100%;
  padding: 0;
}
body.erp-pro #sidebar-menu .side-menu {
  width: 100%;
  padding: 0;
  margin: 0;
  list-style: none;
}
body.erp-pro #sidebar-menu .side-menu > li {
  width: 100%;
  float: none;
  display: block;
}
body.erp-pro #sidebar-menu .side-menu > li > a {
  display: flex !important;
  align-items: center;
  gap: .65rem;
  width: 100% !important;
  margin: 1px 0 !important;
  padding: .7rem 1.25rem !important;
  border-radius: 0 !important;
  color: #94a3b8 !important;
  font-size: .84rem !important;
  font-weight: 500 !important;
  letter-spacing: .01em;
  border-left: 3px solid transparent;
  transition: background var(--erp-pro-fast), color var(--erp-pro-fast), border-color var(--erp-pro-fast);
  transform: none !important;
}
body.erp-pro #sidebar-menu .side-menu > li > a:hover,
body.erp-pro #sidebar-menu .side-menu > li.active > a {
  background: var(--erp-pro-menu-hover) !important;
  color: #f1f5f9 !important;
  border-left-color: var(--erp-pro-accent);
  transform: none !important;
}
body.erp-pro #sidebar-menu .side-menu > li.active > a {
  background: var(--erp-pro-menu-active) !important;
  color: #fff !important;
  font-weight: 600 !important;
}
body.erp-pro #sidebar-menu .side-menu > li > a i.fa,
body.erp-pro #sidebar-menu .side-menu > li > a i.bi {
  width: 20px;
  text-align: center;
  font-size: .95rem;
  opacity: .9;
  flex-shrink: 0;
}
body.erp-pro #sidebar-menu .side-menu > li > a .fa-chevron-down,
body.erp-pro #sidebar-menu .side-menu > li > a .fa-chevron-up {
  margin-left: auto;
  float: none !important;
  font-size: .65rem;
  opacity: .5;
  transition: transform var(--erp-pro-fast);
}
body.erp-pro #sidebar-menu .side-menu > li.active > a .fa-chevron-down {
  transform: rotate(180deg);
}

/* Child menus — full width */
body.erp-pro #sidebar-menu .child_menu {
  width: 100% !important;
  background: rgba(0,0,0,.2);
  padding: .25rem 0 !important;
  margin: 0 !important;
  border-left: none;
  animation: erp-menu-slide .2s ease-out;
}
@keyframes erp-menu-slide {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}
body.erp-pro #sidebar-menu .child_menu li {
  width: 100%;
}
body.erp-pro #sidebar-menu .child_menu li a {
  display: block;
  width: 100% !important;
  padding: .55rem 1.25rem .55rem 2.75rem !important;
  color: #64748b !important;
  font-size: .8rem !important;
  border-radius: 0 !important;
  border-left: 3px solid transparent;
  transition: all var(--erp-pro-fast);
}
body.erp-pro #sidebar-menu .child_menu li a:hover {
  color: #e2e8f0 !important;
  background: rgba(99,102,241,.1) !important;
  border-left-color: var(--erp-pro-accent);
  padding-left: 2.85rem !important;
}

/* Sidebar search — full width */
body.erp-pro #sidebar-menu .side-menu > li form {
  padding: .5rem 1rem 1rem;
  width: 100%;
}
body.erp-pro #sidebar-menu .input-group {
  width: 100%;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.1);
  background: rgba(255,255,255,.06);
}
body.erp-pro #sidebar-menu .input-group .form-control {
  background: transparent !important;
  border: none !important;
  color: #e2e8f0 !important;
  font-size: .82rem;
  padding: .55rem .75rem;
}
body.erp-pro #sidebar-menu .input-group .form-control::placeholder {
  color: #64748b;
}
body.erp-pro #sidebar-menu .input-group-btn .btn {
  background: var(--erp-pro-accent) !important;
  border: none !important;
  border-radius: 0 !important;
}

/* Sidebar footer */
body.erp-pro .sidebar-footer {
  width: 100%;
  background: rgba(0,0,0,.25) !important;
  border-top: 1px solid rgba(255,255,255,.08) !important;
}
body.erp-pro .sidebar-footer a {
  transition: color var(--erp-pro-fast), background var(--erp-pro-fast);
  padding: .75rem !important;
}
body.erp-pro .sidebar-footer a:hover {
  background: var(--erp-pro-menu-hover) !important;
  color: #fff !important;
}

/* ── Top navigation ── */
body.erp-pro .nav_menu {
  padding: 0 1rem;
}
body.erp-pro #menu_toggle {
  color: var(--erp-pro-text);
  padding: .5rem;
  border-radius: 10px;
  transition: background var(--erp-pro-fast);
}
body.erp-pro #menu_toggle:hover {
  background: #f1f5f9;
}
body.erp-pro .user-profile {
  font-weight: 600 !important;
  font-size: .875rem !important;
  color: var(--erp-pro-text) !important;
  padding: .4rem .75rem !important;
  border-radius: 10px;
  transition: background var(--erp-pro-fast);
}
body.erp-pro .user-profile:hover {
  background: #f1f5f9;
}
body.erp-pro .dropdown-usermenu {
  border-radius: var(--erp-pro-radius) !important;
  padding: .35rem !important;
  animation: erp-drop-in .18s ease-out;
}
@keyframes erp-drop-in {
  from { opacity: 0; transform: translateY(-6px) scale(.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

/* ── Content cards & panels ── */
body.erp-pro .panel,
body.erp-pro .x_panel,
body.erp-pro .erp-card,
body.erp-pro .tile-stats,
body.erp-pro .tile_stats_count {
  background: var(--erp-pro-surface) !important;
  border: 1px solid var(--erp-pro-border) !important;
  border-radius: var(--erp-pro-radius-lg) !important;
  box-shadow: var(--erp-pro-shadow) !important;
  transition: box-shadow var(--erp-pro-fast), transform var(--erp-pro-fast);
}
body.erp-pro .panel:hover,
body.erp-pro .erp-card:hover {
  box-shadow: var(--erp-pro-shadow-lg) !important;
}
body.erp-pro .panel-heading,
body.erp-pro .erp-page-header {
  background: linear-gradient(135deg, #f8fafc, #f1f5f9) !important;
  border-bottom: 1px solid var(--erp-pro-border) !important;
  border-radius: var(--erp-pro-radius-lg) var(--erp-pro-radius-lg) 0 0 !important;
  font-weight: 700 !important;
  font-size: .9rem !important;
  color: var(--erp-pro-text) !important;
  padding: 1rem 1.25rem !important;
}
body.erp-pro .erp-page-header {
  background: linear-gradient(135deg, var(--erp-pro-accent), #4f46e5) !important;
  color: #fff !important;
  border: none !important;
}
body.erp-pro .erp-page-header h4 { color: #fff !important; }
body.erp-pro .panel-body {
  padding: 1.25rem !important;
}

/* ── Stat cards ── */
body.erp-pro .erp-stat-card {
  border-radius: var(--erp-pro-radius-lg) !important;
  border: 1px solid var(--erp-pro-border) !important;
  transition: transform var(--erp-pro-fast), box-shadow var(--erp-pro-fast);
}
body.erp-pro .erp-stat-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--erp-pro-shadow-lg) !important;
}
body.erp-pro .erp-stat-card .stat-icon {
  transition: transform var(--erp-pro-fast);
}
body.erp-pro .erp-stat-card:hover .stat-icon {
  transform: scale(1.08);
}

/* ── Dashboard shortcut buttons ── */
body.erp-pro .button,
body.erp-pro .button2,
body.erp-pro .button3,
body.erp-pro .button4 {
  border-radius: var(--erp-pro-radius-lg) !important;
  border: none !important;
  font-weight: 600 !important;
  letter-spacing: .02em;
  transition: transform var(--erp-pro-fast), box-shadow var(--erp-pro-fast) !important;
  box-shadow: var(--erp-pro-shadow) !important;
}
body.erp-pro .button2:hover,
body.erp-pro .button:hover {
  transform: translateY(-4px) scale(1.02) !important;
  box-shadow: var(--erp-pro-shadow-lg) !important;
}

/* ── Forms — kill garish inline colors (register11 etc) ── */
body.erp-pro .form-control,
body.erp-pro input[type="text"],
body.erp-pro input[type="number"],
body.erp-pro input[type="date"],
body.erp-pro input[type="password"],
body.erp-pro select,
body.erp-pro textarea {
  background: #fff !important;
  color: var(--erp-pro-text) !important;
  border: 1.5px solid var(--erp-pro-border) !important;
  border-radius: 10px !important;
  font-size: .875rem !important;
  font-weight: 500 !important;
  padding: .55rem .85rem !important;
  transition: border-color var(--erp-pro-fast), box-shadow var(--erp-pro-fast) !important;
}
body.erp-pro .form-control:focus,
body.erp-pro input:focus,
body.erp-pro select:focus {
  border-color: var(--erp-pro-accent) !important;
  box-shadow: 0 0 0 3px rgba(99,102,241,.15) !important;
  outline: none !important;
}
body.erp-pro .form-group label,
body.erp-pro label {
  color: var(--erp-pro-muted) !important;
  font-size: .75rem !important;
  font-weight: 600 !important;
  text-transform: uppercase;
  letter-spacing: .05em;
  margin-bottom: .35rem !important;
}
/* Highlight important fields subtly */
body.erp-pro input[name="pno"],
body.erp-pro input[name="name"],
body.erp-pro input[name="vno"],
body.erp-pro input[name="hpl"] {
  border-color: #c7d2fe !important;
  background: #fafaff !important;
}

/* ── Tables ── */
body.erp-pro .table {
  border-radius: var(--erp-pro-radius);
  overflow: hidden;
}
body.erp-pro .table > thead > tr > th {
  background: #f8fafc !important;
  color: var(--erp-pro-muted) !important;
  font-size: .72rem !important;
  font-weight: 700 !important;
  text-transform: uppercase;
  letter-spacing: .06em;
  border-bottom: 2px solid var(--erp-pro-border) !important;
  padding: .75rem !important;
}
body.erp-pro .table > tbody > tr {
  transition: background var(--erp-pro-fast);
}
body.erp-pro .table > tbody > tr:hover {
  background: #f8fafc !important;
}

/* ── Buttons ── */
body.erp-pro .btn {
  border-radius: 10px !important;
  font-weight: 600 !important;
  font-size: .84rem !important;
  padding: .5rem 1.1rem !important;
  transition: transform var(--erp-pro-fast), box-shadow var(--erp-pro-fast), background var(--erp-pro-fast) !important;
}
body.erp-pro .btn-primary {
  background: linear-gradient(135deg, var(--erp-pro-accent), #4f46e5) !important;
  border: none !important;
}
body.erp-pro .btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(99,102,241,.35) !important;
}

/* ── Wizard pro style ── */
body.erp-pro ul.wizard_steps li a {
  border-radius: var(--erp-pro-radius) !important;
  transition: all var(--erp-pro-fast);
}
body.erp-pro ul.wizard_steps li a.selected {
  background: linear-gradient(135deg, var(--erp-pro-accent), #4f46e5) !important;
  box-shadow: 0 4px 14px rgba(99,102,241,.35);
}

/* ── Page enter animation ── */
body.erp-pro .right_col {
  animation: erp-pro-enter .35s ease-out both;
}
@keyframes erp-pro-enter {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
body.erp-pro .erp-animate-in,
body.erp-pro .erp-reveal.erp-visible {
  animation: erp-pro-stagger .4s ease-out both;
}
@keyframes erp-pro-stagger {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ── Tile count dashboard full width ── */
body.erp-pro .tile_count {
  width: 100%;
  gap: 1rem;
}
body.erp-pro .tile_count .col-md-3,
body.erp-pro .tile_count .col-md-2 {
  flex: 1 1 240px;
}

/* ── Loader pro ── */
body.erp-pro #erp-loader {
  background: rgba(12,18,34,.94);
}
body.erp-pro .erp-spinner {
  border-top-color: var(--erp-pro-accent);
}

/* prefers-reduced-motion */
@media (prefers-reduced-motion: reduce) {
  body.erp-pro *, body.erp-pro *::before, body.erp-pro *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* ── Submodule pages ── */
body.erp-pro.erp-submodule .left_col,
body.erp-pro.erp-submodule .right_col,
body.erp-pro.erp-submodule .top_nav {
  /* same full-width rules apply */
}

/* ── Login pages ── */
body.erp-pro.erp-login-page .erp-login-card {
  border: 1px solid rgba(255,255,255,.2);
  transition: transform var(--erp-pro-fast), box-shadow var(--erp-pro-fast);
}
body.erp-pro.erp-login-page .erp-login-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 24px 60px rgba(15,23,42,.25);
}
body.erp-pro.erp-login-page .form-control {
  background: #fff !important;
}
