:root {
  --erp-mint-50: #f7fcfb;
  --erp-mint-100: #e7f7f3;
  --erp-mint-200: #c5e9e1;
  --erp-mint-300: #91d5c8;
  --erp-mint-600: #4b9b8f;
  --erp-mint-700: #397f75;
  --erp-mint-800: #306b63;
  --erp-mint-900: #28564f;
  --erp-green: #bfe6ca;
  --erp-green-text: #356b45;
  --erp-amber: #f7dfb2;
  --erp-amber-text: #855f24;
  --erp-red: #f3c3c7;
  --erp-red-text: #8b4550;
  --erp-blue: #c9e5f1;
  --erp-blue-text: #35697c;
  --erp-surface: #ffffff;
  --erp-text: #334155;
  --erp-muted: #708078;
}

html,
body {
  background: #fff;
  color: var(--erp-text);
}

body {
  font-family: "Malgun Gothic", "Apple SD Gothic Neo", sans-serif;
}

::selection {
  background: var(--erp-mint-100);
  color: var(--erp-mint-900);
}

a {
  color: var(--erp-mint-700);
}

a:hover,
a:focus {
  color: var(--erp-mint-900);
}

h1,
h2,
h3,
h4,
h5,
h6 {
  color: var(--erp-mint-800);
}

hr {
  border-top-color: var(--erp-mint-200);
}

.table {
  border: 1px solid var(--erp-mint-200);
  border-radius: 10px;
  background: var(--erp-surface);
  box-shadow: 0 4px 16px rgba(57, 127, 117, 0.06);
}

.table > thead > tr > th,
.table > thead > tr > td {
  border-bottom-color: var(--erp-mint-200);
  background: var(--erp-mint-100);
  color: var(--erp-mint-800);
}

.table > tbody > tr > th,
.table > tbody > tr > td,
.table > tfoot > tr > th,
.table > tfoot > tr > td {
  border-top-color: #e2f1ed;
}

.table-striped > tbody > tr:nth-of-type(odd) {
  background-color: #fbfefd;
}

.table-striped > tbody > tr:nth-of-type(even) {
  background-color: var(--erp-surface);
}

.table-hover > tbody > tr:hover,
.table > tbody > tr:hover {
  background-color: var(--erp-mint-50);
}

input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]),
select,
textarea,
.form-control {
  border-color: var(--erp-mint-200);
  border-radius: 7px;
  background-color: var(--erp-surface);
  color: var(--erp-text);
}

input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):focus,
select:focus,
textarea:focus,
.form-control:focus {
  border-color: var(--erp-mint-600);
  outline: 0;
  box-shadow: 0 0 0 3px rgba(145, 213, 200, 0.28);
}

input[type="checkbox"],
input[type="radio"] {
  accent-color: var(--erp-mint-700);
}

.btn {
  border-radius: 8px;
  font-weight: 700;
  box-shadow: 0 2px 5px rgba(57, 127, 117, 0.08);
}

.btn-primary {
  border-color: var(--erp-mint-300);
  background-color: var(--erp-mint-200);
  color: var(--erp-mint-900);
}

.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active {
  border-color: var(--erp-mint-600);
  background-color: var(--erp-mint-300);
  color: var(--erp-mint-900);
}

.btn-success {
  border-color: #9fd7ae;
  background-color: var(--erp-green);
  color: var(--erp-green-text);
}

.btn-success:hover,
.btn-success:focus,
.btn-success:active {
  border-color: #78c48e;
  background-color: #a9dbb8;
  color: #285b38;
}

.btn-warning {
  border-color: #edca87;
  background-color: var(--erp-amber);
  color: var(--erp-amber-text);
}

.btn-warning:hover,
.btn-warning:focus,
.btn-warning:active {
  border-color: #dfb963;
  background-color: #efd092;
  color: #714b13;
}

.btn-info {
  border-color: #a8d5e7;
  background-color: var(--erp-blue);
  color: var(--erp-blue-text);
}

.btn-info:hover,
.btn-info:focus,
.btn-info:active {
  border-color: #86c5dd;
  background-color: #b1d9e9;
  color: #295b6d;
}

.btn-danger {
  border-color: #e6a5ab;
  background-color: var(--erp-red);
  color: var(--erp-red-text);
}

.btn-danger:hover,
.btn-danger:focus,
.btn-danger:active {
  border-color: #d98892;
  background-color: #e9acb2;
  color: #783641;
}

.btn-default,
.btn-light,
.btn-secondary {
  border-color: var(--erp-mint-300);
  background-color: var(--erp-surface);
  color: var(--erp-mint-800);
}

.btn-default:hover,
.btn-light:hover,
.btn-secondary:hover {
  border-color: var(--erp-mint-600);
  background-color: var(--erp-mint-100);
  color: var(--erp-mint-900);
}

.pagination > li > a,
.pagination > li > span {
  border-color: var(--erp-mint-200);
  color: var(--erp-mint-700);
}

.pagination > .active > a,
.pagination > .active > a:hover,
.pagination > .active > span {
  border-color: var(--erp-mint-300);
  background-color: var(--erp-mint-200);
  color: var(--erp-mint-900);
}

.panel,
.well,
.modal-content,
.dropdown-menu {
  border-color: var(--erp-mint-200);
  background-color: var(--erp-surface);
  box-shadow: 0 8px 24px rgba(57, 127, 117, 0.08);
}

.panel-heading,
.modal-header {
  border-color: var(--erp-mint-200);
  background-color: var(--erp-mint-100);
  color: var(--erp-mint-900);
}

.alert-info {
  border-color: var(--erp-mint-200);
  background-color: var(--erp-mint-100);
  color: var(--erp-mint-800);
}

.alert-success {
  border-color: #a9dcb7;
  background-color: #edf8f0;
  color: var(--erp-green-text);
}

.alert-warning {
  border-color: #efd39c;
  background-color: #fff8e9;
  color: var(--erp-amber-text);
}

.alert-danger {
  border-color: #e9b1b6;
  background-color: #fff1f2;
  color: var(--erp-red-text);
}

.label-primary,
.badge {
  background-color: var(--erp-mint-200);
  color: var(--erp-mint-900);
}

.label-success {
  background-color: var(--erp-green);
  color: var(--erp-green-text);
}

.label-info {
  background-color: var(--erp-blue);
  color: var(--erp-blue-text);
}

.label-warning {
  background-color: var(--erp-amber);
  color: var(--erp-amber-text);
}

.label-danger {
  background-color: var(--erp-red);
  color: var(--erp-red-text);
}

button:not(.btn):not(.global-timer-action):not(.global-timer-close):not(.timer-action),
input[type="button"]:not(.btn),
input[type="submit"]:not(.btn) {
  border: 1px solid var(--erp-mint-300);
  border-radius: 7px;
  background-color: var(--erp-mint-100);
  color: var(--erp-mint-800);
}

button:not(.btn):not(.global-timer-action):not(.global-timer-close):not(.timer-action):hover,
input[type="button"]:not(.btn):hover,
input[type="submit"]:not(.btn):hover {
  border-color: var(--erp-mint-600);
  background-color: var(--erp-mint-200);
  color: var(--erp-mint-900);
}

small,
.help-block,
.text-muted {
  color: var(--erp-muted);
}

[style*="color:#679b9b" i] {
  color: var(--erp-mint-700) !important;
}

[style*="color:#EB4559" i],
[style*="color:#B40431" i],
[style*="color:#8A0808" i],
[style*="color:red" i],
[style*="color:firebrick" i] {
  color: var(--erp-red-text) !important;
}

[style*="color:blue" i],
[style*="color:#1898d2" i] {
  color: var(--erp-blue-text) !important;
}

[style*="color:gray" i],
[style*="color:#848484" i] {
  color: var(--erp-muted) !important;
}

.erp-app-shell {
  min-height: 100vh;
  background: #fff;
}

.erp-sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 1040;
  display: flex;
  width: 74px;
  flex-direction: column;
  align-items: stretch;
  background: #173957;
  color: #fff;
  box-shadow: 8px 0 24px rgba(23, 57, 87, 0.1);
}

.erp-sidebar-brand {
  display: grid;
  min-height: 76px;
  place-items: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  padding: 10px 8px;
}

.erp-sidebar-brand img {
  display: block;
  width: 48px;
  height: 48px;
  border-radius: 10px;
  object-fit: cover;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.18);
}

.erp-sidebar-nav {
  display: block;
  min-height: 0;
  overflow-y: auto;
  padding: 10px 7px;
  scrollbar-color: rgba(255, 255, 255, 0.25) transparent;
  scrollbar-width: thin;
}

.erp-nav-group {
  display: grid;
  gap: 3px;
}

.erp-nav-group + .erp-nav-group {
  margin-top: 7px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 7px;
}

.erp-nav-section {
  display: block;
  padding: 0 2px 2px;
  color: rgba(255, 255, 255, 0.44);
  text-align: center;
  font-size: 8px;
  font-weight: 900;
  letter-spacing: -0.04em;
}

.erp-nav-link {
  position: relative;
  display: grid;
  min-height: 46px;
  place-items: center;
  gap: 2px;
  border-radius: 10px;
  color: rgba(255, 255, 255, 0.78);
  padding: 6px 2px;
  text-align: center;
  text-decoration: none;
  font-size: 10px;
  font-weight: 800;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.erp-nav-link:hover,
.erp-nav-link:focus,
.erp-nav-link.is-active {
  background: rgba(145, 213, 200, 0.22);
  color: #fff;
  text-decoration: none;
}

.erp-nav-link.is-active {
  box-shadow: inset 3px 0 0 var(--erp-mint-300);
}

.erp-nav-icon {
  display: grid;
  width: 26px;
  height: 26px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: 8px;
  font-size: 13px;
  line-height: 1;
}

.erp-nav-badge {
  position: absolute;
  top: 3px;
  right: 3px;
  display: grid;
  min-width: 18px;
  height: 18px;
  place-items: center;
  border: 2px solid #173957;
  border-radius: 10px;
  background: var(--erp-amber);
  color: var(--erp-amber-text);
  padding: 0 4px;
  font-size: 9px;
  font-variant-numeric: tabular-nums;
  font-weight: 900;
  line-height: 1;
}

.erp-nav-link.is-active .erp-nav-badge {
  border-color: #285f69;
}

.erp-sidebar-footer {
  display: grid;
  margin-top: auto;
  place-items: center;
  gap: 4px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding: 12px 5px;
  font-size: 10px;
}

.erp-user-avatar {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 50%;
  background: var(--erp-mint-300);
  color: #173957;
  font-weight: 900;
}

.erp-sidebar-user {
  max-width: 64px;
  overflow: hidden;
  color: rgba(255, 255, 255, 0.8);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.erp-workspace {
  min-width: 0;
  margin-left: 74px;
}

.erp-topbar {
  position: sticky;
  top: 0;
  z-index: 1030;
  display: flex;
  min-height: 64px;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border-bottom: 1px solid var(--erp-mint-200);
  background: rgba(255, 255, 255, 0.96);
  padding: 10px 22px;
  backdrop-filter: blur(10px);
}

.erp-global-search {
  display: flex;
  width: min(620px, 65vw);
  align-items: center;
  gap: 8px;
  border: 1px solid var(--erp-mint-200);
  border-radius: 11px;
  background: var(--erp-mint-50);
  padding: 0 12px;
}

.erp-global-search input[type="search"] {
  width: 100%;
  height: 38px;
  border: 0;
  background: transparent;
  padding: 0;
  box-shadow: none;
}

.erp-global-search input[type="search"]:focus {
  box-shadow: none;
}

.erp-topbar-account {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--erp-muted);
  white-space: nowrap;
  font-size: 12px;
  font-weight: 700;
}

.erp-notification-link {
  position: relative;
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border: 1px solid var(--erp-mint-200);
  border-radius: 11px;
  background: #fff;
  color: var(--erp-mint-800);
  text-decoration: none;
  font-size: 17px;
}

.erp-notification-link:hover,
.erp-notification-link:focus {
  border-color: var(--erp-mint-300);
  background: var(--erp-mint-100);
  color: var(--erp-mint-900);
  text-decoration: none;
}

.erp-notification-link strong {
  position: absolute;
  top: -6px;
  right: -6px;
  display: grid;
  min-width: 19px;
  height: 19px;
  place-items: center;
  border: 2px solid #fff;
  border-radius: 10px;
  background: var(--erp-red-text);
  color: #fff;
  padding: 0 4px;
  font-size: 9px;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

.erp-page-content {
  width: 100%;
  padding: 22px;
}

.erp-public-shell {
  width: min(540px, calc(100vw - 30px));
  margin: 28px auto;
}

.erp-public-logo {
  display: inline-block;
  margin-bottom: 20px;
}

.erp-public-logo img {
  max-width: 88px;
}

.erp-public-shell-login {
  display: grid;
  width: min(980px, calc(100vw - 48px));
  min-height: calc(100vh - 56px);
  margin: 28px auto;
  align-items: center;
}

.erp-login-shell {
  display: grid;
  grid-template-columns: minmax(310px, 0.9fr) minmax(390px, 1.1fr);
  overflow: hidden;
  border: 1px solid var(--erp-mint-200);
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 24px 70px rgba(40, 86, 79, 0.16);
}

.erp-login-brand-panel {
  display: flex;
  min-height: 560px;
  flex-direction: column;
  justify-content: space-between;
  background:
    radial-gradient(circle at 84% 12%, rgba(197, 233, 225, 0.26), transparent 34%),
    linear-gradient(145deg, #28564f 0%, #397f75 58%, #4b9b8f 100%);
  padding: 40px;
  color: #fff;
}

.erp-login-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.erp-login-logo-frame {
  display: grid;
  width: 56px;
  height: 56px;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: 12px;
  background: #fff;
}

.erp-login-logo-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.erp-login-brand strong,
.erp-login-brand small {
  display: block;
  color: #fff;
}

.erp-login-brand strong {
  font-size: 16px;
  letter-spacing: -0.02em;
}

.erp-login-brand small {
  margin-top: 3px;
  opacity: 0.7;
  font-size: 9px;
  letter-spacing: 0.08em;
}

.erp-login-message .erp-page-eyebrow {
  color: var(--erp-mint-200);
}

.erp-login-message h1 {
  margin: 8px 0 18px;
  color: #fff;
  font-size: clamp(28px, 3.2vw, 40px);
  line-height: 1.28;
  letter-spacing: -0.04em;
}

.erp-login-message > p:last-child {
  max-width: 330px;
  margin: 0;
  color: rgba(255, 255, 255, 0.78);
  font-size: 14px;
  line-height: 1.75;
}

.erp-login-features {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
  color: rgba(255, 255, 255, 0.88);
  font-size: 12px;
  font-weight: 700;
}

.erp-login-features li {
  display: flex;
  align-items: center;
  gap: 9px;
}

.erp-login-features span {
  display: inline-grid;
  width: 21px;
  height: 21px;
  place-items: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
  font-size: 11px;
}

.erp-login-form-panel {
  display: flex;
  min-width: 0;
  flex-direction: column;
  justify-content: center;
  padding: 52px 58px;
  text-align: left;
}

.erp-login-form-panel h2 {
  margin: 5px 0 10px;
  color: var(--erp-mint-900);
  font-size: 30px;
  font-weight: 900;
  letter-spacing: -0.04em;
}

.erp-login-intro {
  margin: 0 0 28px;
  color: var(--erp-muted);
  font-size: 13px;
  line-height: 1.65;
}

.erp-login-form {
  display: grid;
  gap: 18px;
}

.erp-login-form label {
  display: grid;
  gap: 7px;
  margin: 0;
  color: var(--erp-mint-800);
  font-size: 12px;
  font-weight: 900;
}

.erp-login-form input {
  width: 100%;
  min-height: 48px;
  padding: 10px 12px;
  font-size: 14px;
}

.erp-login-submit {
  width: 100%;
  min-height: 48px;
  margin-top: 4px;
  font-size: 14px;
}

.erp-login-support {
  margin: 22px 0 0;
  color: var(--erp-muted);
  font-size: 11px;
  line-height: 1.6;
}

.erp-two-factor-panel .container,
.erp-two-factor-panel .row,
.erp-two-factor-panel [class*="col-"] {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0;
}

.erp-two-factor-panel table {
  width: 100%;
}

.erp-two-factor-panel input[type="text"],
.erp-two-factor-panel input[type="email"],
.erp-two-factor-panel input[type="password"],
.erp-two-factor-panel input[type="number"] {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--erp-mint-200);
  border-radius: 9px;
  padding: 9px 11px;
}

.erp-trust-device-option {
  display: flex !important;
  flex-direction: row !important;
  align-items: flex-start;
  gap: 10px;
  border: 1px solid var(--erp-mint-200);
  border-radius: 10px;
  background: var(--erp-mint-50);
  padding: 12px;
}

.erp-trust-device-option input {
  width: auto !important;
  min-height: 0 !important;
  margin-top: 3px;
}

.erp-trust-device-option span,
.erp-trust-device-option small {
  display: block;
}

.erp-trust-device-option small,
.erp-field-error {
  margin-top: 4px;
  color: #a33;
  font-size: 11px;
}

.erp-auth-actions {
  display: flex;
  gap: 8px;
}

.erp-auth-actions .erp-login-submit {
  flex: 1;
}

.erp-security-card {
  max-width: 980px;
  margin: 0 auto;
}

.erp-security-form {
  display: grid;
  max-width: 420px;
  gap: 10px;
}

.erp-security-form input {
  min-height: 44px;
  border: 1px solid var(--erp-mint-200);
  border-radius: 9px;
  padding: 9px 11px;
}

.erp-page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

.erp-page-eyebrow {
  margin: 0 0 4px;
  color: var(--erp-mint-700);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.erp-page-title {
  margin: 0;
  color: var(--erp-mint-900);
  font-size: clamp(22px, 2.5vw, 30px);
  font-weight: 900;
}

.erp-page-subtitle {
  margin: 6px 0 0;
  color: var(--erp-muted);
  line-height: 1.5;
}

.erp-page-actions,
.erp-inline-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.erp-icon-button {
  display: inline-grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid var(--erp-mint-300);
  border-radius: 11px;
  background: var(--erp-mint-100);
  color: var(--erp-mint-900);
  text-decoration: none;
  font-size: 12px;
  font-weight: 900;
  box-shadow: 0 4px 12px rgba(57, 127, 117, 0.1);
}

.erp-icon-button:hover,
.erp-icon-button:focus {
  border-color: var(--erp-mint-600);
  background: var(--erp-mint-200);
  color: var(--erp-mint-900);
  text-decoration: none;
}

.erp-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(150px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.erp-kpi-card {
  min-width: 0;
  border: 1px solid var(--erp-mint-200);
  border-radius: 14px;
  background: var(--erp-mint-100);
  padding: 15px 16px;
  box-shadow: 0 8px 24px rgba(57, 127, 117, 0.07);
}

.erp-kpi-card.is-green {
  border-color: #b5e1c1;
  background: #edf8f0;
}

.erp-kpi-card.is-amber {
  border-color: #efd39c;
  background: #fff8e9;
}

.erp-kpi-card.is-red {
  border-color: #e9b1b6;
  background: #fff1f2;
}

.erp-kpi-card.is-blue {
  border-color: #b8ddea;
  background: #eef7fa;
}

.erp-kpi-label {
  display: block;
  margin-bottom: 5px;
  color: var(--erp-muted);
  font-size: 11px;
  font-weight: 800;
}

.erp-kpi-value {
  display: block;
  overflow: hidden;
  color: var(--erp-mint-900);
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 20px;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
}

.erp-kpi-note {
  display: block;
  margin-top: 4px;
  color: var(--erp-muted);
  font-size: 10px;
}

.erp-work-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.erp-work-summary-card {
  display: flex;
  min-height: 76px;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  border: 1px solid var(--erp-mint-200);
  border-radius: 13px;
  background: #fff;
  padding: 12px 14px;
  color: var(--erp-mint-800);
  text-decoration: none;
  box-shadow: 0 5px 18px rgba(57, 127, 117, 0.07);
}

.erp-work-summary-card:hover,
.erp-work-summary-card:focus,
.erp-work-summary-card.is-active {
  border-color: var(--erp-mint-300);
  background: var(--erp-mint-50);
  color: var(--erp-mint-900);
  text-decoration: none;
}

.erp-work-summary-card span {
  color: var(--erp-muted);
  font-size: 11px;
  font-weight: 800;
}

.erp-work-summary-card strong {
  color: var(--erp-mint-900);
  font-size: 19px;
  font-variant-numeric: tabular-nums;
}

.erp-card {
  border: 1px solid var(--erp-mint-200);
  border-radius: 15px;
  background: #fff;
  box-shadow: 0 8px 26px rgba(57, 127, 117, 0.08);
}

.erp-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid var(--erp-mint-200);
  padding: 14px 16px;
}

.erp-card-title {
  margin: 0;
  color: var(--erp-mint-900);
  font-size: 16px;
  font-weight: 900;
}

.erp-card-body {
  padding: 16px;
}

.erp-upcoming-card {
  margin-bottom: 14px;
}

.erp-upcoming-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
  gap: 0;
}

.erp-upcoming-item {
  display: grid;
  min-width: 0;
  grid-template-columns: 46px auto minmax(0, 1fr);
  align-items: center;
  gap: 9px;
  border-right: 1px solid #e6f1ef;
  border-bottom: 1px solid #e6f1ef;
  padding: 11px 13px;
  color: var(--erp-text);
  text-decoration: none;
}

.erp-upcoming-item:hover,
.erp-upcoming-item:focus {
  background: var(--erp-mint-50);
  color: var(--erp-text);
  text-decoration: none;
}

.erp-upcoming-item time {
  display: grid;
  color: var(--erp-mint-800);
  font-variant-numeric: tabular-nums;
  line-height: 1.15;
}

.erp-upcoming-item time strong {
  font-size: 13px;
}

.erp-upcoming-item time span {
  color: var(--erp-muted);
  font-size: 10px;
}

.erp-upcoming-identity {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.erp-upcoming-identity strong,
.erp-upcoming-identity small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.erp-upcoming-identity strong {
  color: var(--erp-mint-900);
  font-size: 12px;
}

.erp-upcoming-identity small {
  color: var(--erp-muted);
  font-size: 10px;
}

.erp-filter-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  border: 1px solid var(--erp-mint-200);
  border-radius: 13px;
  background: var(--erp-mint-50);
  padding: 10px;
}

.erp-filter-bar select,
.erp-filter-bar input[type="search"],
.erp-filter-bar input[type="text"] {
  min-height: 36px;
}

.erp-filter-grow {
  flex: 1 1 240px;
}

.erp-switch {
  display: inline-flex;
  min-height: 36px;
  align-items: center;
  gap: 7px;
  margin: 0;
  border: 1px solid var(--erp-mint-200);
  border-radius: 9px;
  background: #fff;
  padding: 6px 10px;
  color: var(--erp-mint-800);
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.erp-switch input {
  margin: 0;
}

.erp-table-wrap {
  width: 100%;
  overflow: auto;
  border: 1px solid var(--erp-mint-200);
  border-radius: 13px;
  background: #fff;
}

.erp-data-table {
  width: 100%;
  margin: 0;
  border: 0;
  border-collapse: separate;
  border-spacing: 0;
  box-shadow: none;
  font-size: 12px;
}

.erp-data-table > thead > tr > th,
.erp-data-table > thead > tr > td {
  position: sticky;
  top: 0;
  z-index: 2;
  border-bottom: 1px solid var(--erp-mint-200);
  background: var(--erp-mint-100);
  color: var(--erp-mint-800);
  padding: 10px;
  white-space: nowrap;
  font-weight: 900;
}

.erp-data-table > thead > tr > th.erp-money {
  text-align: right;
}

.erp-data-table > tbody > tr > td {
  border-top: 1px solid #e6f1ef;
  padding: 9px 10px;
  vertical-align: middle;
}

.erp-data-table > tbody > tr:first-child > td {
  border-top: 0;
}

.erp-data-table .erp-sticky-column {
  position: sticky;
  left: 0;
  z-index: 1;
  background: inherit;
}

.erp-data-table > thead .erp-sticky-column {
  z-index: 3;
  background: var(--erp-mint-100);
}

.erp-case-identity {
  display: grid;
  min-width: 210px;
  gap: 3px;
}

.erp-case-identity strong {
  overflow: hidden;
  color: var(--erp-mint-900);
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
}

.erp-case-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 5px;
  color: var(--erp-muted);
  font-size: 10px;
}

.erp-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border-radius: 999px;
  background: var(--erp-mint-100);
  color: var(--erp-mint-800);
  padding: 3px 8px;
  white-space: nowrap;
  font-size: 10px;
  font-weight: 900;
}

.erp-badge.is-running {
  background: #dcf5e4;
  color: #24713c;
}

.erp-badge.is-paused {
  background: #fff3d7;
  color: #855f24;
}

.erp-badge.is-danger {
  background: #fde8ea;
  color: #8b4550;
}

.erp-badge.is-neutral {
  background: #f1f5f4;
  color: #64748b;
}

.erp-status-stack,
.erp-person-stack,
.erp-amount-stack {
  display: grid;
  gap: 4px;
}

.erp-status-line {
  display: flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
}

.erp-status-dot {
  width: 8px;
  height: 8px;
  flex: 0 0 8px;
  border-radius: 50%;
  background: var(--erp-green-text);
}

.erp-status-dot.is-pending {
  border-radius: 2px;
  background: #d97706;
}

.erp-muted {
  color: var(--erp-muted);
}

.erp-danger-text {
  color: var(--erp-red-text);
  font-weight: 800;
}

.erp-next-schedule {
  display: grid;
  min-width: 145px;
  gap: 2px;
  color: var(--erp-mint-800);
  text-decoration: none;
}

.erp-next-schedule:hover,
.erp-next-schedule:focus {
  color: var(--erp-mint-900);
  text-decoration: underline;
}

.erp-next-schedule strong {
  white-space: nowrap;
  color: var(--erp-mint-900);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}

.erp-next-schedule span {
  max-width: 210px;
  overflow: hidden;
  color: var(--erp-muted);
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 10px;
}

.erp-next-schedule.is-empty {
  display: inline-flex;
  min-width: 24px;
  min-height: 24px;
  align-items: center;
  justify-content: center;
  border: 1px dashed var(--erp-mint-200);
  border-radius: 7px;
  color: var(--erp-muted);
  font-weight: 900;
}

.erp-next-schedule.is-empty:hover,
.erp-next-schedule.is-empty:focus {
  border-color: var(--erp-mint-300);
  background: var(--erp-mint-100);
  text-decoration: none;
}

.erp-money {
  white-space: nowrap;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.erp-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0 0 16px;
  border-bottom: 1px solid var(--erp-mint-200);
  padding: 0 0 8px;
}

.erp-tab {
  border: 1px solid var(--erp-mint-200);
  border-radius: 9px;
  background: #fff;
  color: var(--erp-mint-700);
  padding: 8px 12px;
  text-decoration: none;
  font-size: 12px;
  font-weight: 900;
}

.erp-tab:hover,
.erp-tab.is-active {
  border-color: var(--erp-mint-300);
  background: var(--erp-mint-100);
  color: var(--erp-mint-900);
  text-decoration: none;
}

.erp-form-section {
  margin-bottom: 14px;
  border: 1px solid var(--erp-mint-200);
  border-radius: 14px;
  background: #fff;
  padding: 16px;
}

.erp-form-section-title {
  margin: 0 0 14px;
  color: var(--erp-mint-900);
  font-size: 15px;
  font-weight: 900;
}

.erp-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 13px 16px;
}

.erp-form-field {
  display: grid;
  min-width: 0;
  gap: 6px;
}

.erp-form-field.is-wide {
  grid-column: 1 / -1;
}

.erp-form-field label {
  margin: 0;
  color: var(--erp-mint-800);
  font-size: 12px;
  font-weight: 900;
}

.erp-form-field input:not([type="checkbox"]):not([type="radio"]),
.erp-form-field select,
.erp-form-field textarea {
  width: 100%;
  min-height: 40px;
}

.erp-form-field textarea {
  min-height: 78px;
  resize: vertical;
}

.erp-customer-combobox {
  position: relative;
  display: flex;
  width: 100%;
  align-items: stretch;
}

.erp-customer-combobox .erp-customer-combobox-input {
  width: 100% !important;
  min-width: 0;
  flex: 1 1 auto;
  border-radius: 7px !important;
}

.erp-customer-select-native {
  display: none !important;
}

body .erp-customer-combobox-menu {
  max-height: 280px;
  overflow-x: hidden;
  overflow-y: auto;
  border: 1px solid var(--erp-mint-300);
  border-radius: 8px;
  background: #fff;
  padding: 4px;
  box-shadow: 0 12px 28px rgba(40, 86, 79, 0.18);
  z-index: 1060 !important;
}

body .erp-customer-combobox-menu .ui-menu-item-wrapper {
  border: 0;
  border-radius: 6px;
  color: var(--erp-text);
  padding: 8px 10px;
  font-family: "Malgun Gothic", "Apple SD Gothic Neo", sans-serif;
  font-size: 12px;
}

body .erp-customer-combobox-menu .ui-state-active {
  margin: 0;
  border: 0;
  background: var(--erp-mint-100);
  color: var(--erp-mint-900);
}

.erp-attendee-picker {
  min-width: 230px;
  padding: 7px 8px 6px;
  border: 1px solid #cbded9;
  border-radius: 8px;
  background: #fff;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.erp-attendee-picker:focus-within {
  border-color: var(--erp-mint-600);
  box-shadow: 0 0 0 2px rgba(50, 170, 145, 0.12);
}

.erp-attendee-user-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin: 0;
}

.erp-attendee-user-chip {
  border: 1px solid var(--erp-mint-200);
  border-radius: 999px;
  background: #fff;
  color: var(--erp-mint-800);
  padding: 3px 8px;
  font-size: 11px;
  font-weight: 600;
  opacity: 0.42;
  transition: opacity 0.15s ease, background 0.15s ease;
}

.erp-attendee-user-chip:hover,
.erp-attendee-user-chip:focus {
  opacity: 0.75;
  outline: 0;
}

.erp-attendee-user-chip.is-selected {
  border-color: var(--erp-mint-600);
  background: #d9f7ef;
  color: var(--erp-mint-900);
  font-weight: 900;
  opacity: 1;
  box-shadow: 0 1px 3px rgba(36, 135, 113, 0.18);
}

.erp-attendee-user-chip.is-selected::before {
  content: '✓';
  display: inline-block;
  margin-right: 4px;
  color: var(--erp-mint-800);
  font-weight: 900;
}

.erp-attendee-email-input {
  margin-top: 6px;
  padding-top: 5px;
  border-top: 1px dashed var(--erp-mint-200);
}

.erp-attendee-email-storage {
  display: none !important;
}

.erp-attendee-email-input textarea.erp-attendee-external-input {
  min-height: 42px;
  padding: 3px 2px 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  resize: vertical;
}

.erp-attendee-email-input textarea.erp-attendee-external-input:focus {
  border: 0;
  outline: 0;
  box-shadow: none;
}

.erp-schedule-time-cell.is-inactive {
  background: #f8fbfa;
}

.erp-schedule-time-cell.is-inactive .form-control,
.erp-schedule-time-cell.is-inactive .errorlist {
  visibility: hidden;
  pointer-events: none;
}

.erp-task-choice,
.erp-task-choice label {
  display: grid;
  gap: 6px;
}

.erp-task-choice label {
  grid-template-columns: auto minmax(110px, 1fr);
  align-items: center;
  margin: 0;
  font-size: 11px;
}

.erp-task-choice .erp-task-checkbox {
  width: 16px;
  height: 16px;
  margin: 0;
}

.erp-create-form-card {
  max-width: 900px;
}

.erp-sales-view-switch {
  display: inline-flex;
  gap: 3px;
  margin: 0 0 14px;
  border: 1px solid var(--erp-mint-200);
  border-radius: 11px;
  background: var(--erp-mint-50);
  padding: 3px;
}

.erp-sales-view-switch a {
  border-radius: 8px;
  padding: 7px 11px;
  color: var(--erp-mint-700);
  text-decoration: none;
  font-size: 11px;
  font-weight: 900;
}

.erp-sales-view-switch a:hover,
.erp-sales-view-switch a:focus,
.erp-sales-view-switch a.is-active {
  background: #fff;
  color: var(--erp-mint-900);
  text-decoration: none;
  box-shadow: 0 2px 8px rgba(57, 127, 117, 0.12);
}

.erp-sales-line-card {
  order: 2;
  margin-bottom: 16px;
}

.erp-sales-analysis-stack {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.erp-sales-analysis-stack > .erp-card {
  margin-bottom: 0 !important;
}

.erp-sales-table-card {
  order: 1;
}

.erp-sales-analysis-stack > .erp-card:not(.erp-sales-table-card):not(.erp-sales-line-card) {
  order: 3;
}

.erp-sales-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  color: var(--erp-muted);
  font-size: 10px;
  font-weight: 900;
}

.erp-sales-legend span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.erp-sales-legend span::before {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: currentColor;
  content: "";
}

.erp-sales-legend .is-advisory {
  color: #3b9b8d;
}

.erp-sales-legend .is-registration {
  color: #4f86b8;
}

.erp-sales-legend .is-other {
  color: #d28b42;
}

.erp-sales-line-wrap {
  width: 100%;
  overflow-x: auto;
  padding: 8px 14px 2px;
}

.erp-sales-line-chart {
  display: block;
  width: 100%;
  min-width: 720px;
  height: auto;
}

.erp-chart-grid,
.erp-chart-axis {
  fill: none;
  stroke: #e2efec;
  stroke-width: 1;
}

.erp-chart-axis {
  stroke: #b7d8d1;
}

.erp-chart-line {
  fill: none;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.erp-chart-line.is-advisory,
.erp-chart-point.is-advisory {
  stroke: #3b9b8d;
}

.erp-chart-line.is-registration,
.erp-chart-point.is-registration {
  stroke: #4f86b8;
}

.erp-chart-line.is-other,
.erp-chart-point.is-other {
  stroke: #d28b42;
}

.erp-chart-point {
  fill: #fff;
  stroke-width: 3;
}

.erp-chart-label {
  fill: #708078;
  font-size: 11px;
  font-weight: 700;
}

.erp-form-actions {
  position: sticky;
  bottom: 10px;
  z-index: 20;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  border: 1px solid var(--erp-mint-200);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.96);
  padding: 10px;
  box-shadow: 0 10px 28px rgba(57, 127, 117, 0.14);
  backdrop-filter: blur(10px);
}

.erp-history-list,
.erp-notification-list {
  display: grid;
  gap: 0;
}

.erp-history-item {
  display: grid;
  gap: 9px;
  border-bottom: 1px solid var(--erp-mint-200);
  padding: 14px 16px;
}

.erp-history-item:last-child {
  border-bottom: 0;
}

.erp-history-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
  color: var(--erp-muted);
  font-size: 11px;
}

.erp-history-changes,
.erp-history-compact {
  display: grid;
  gap: 5px;
}

.erp-history-changes > div {
  display: grid;
  grid-template-columns: minmax(110px, 180px) minmax(0, 1fr);
  gap: 10px;
  border-radius: 8px;
  background: var(--erp-mint-50);
  padding: 7px 9px;
  font-size: 12px;
}

.erp-history-compact {
  min-width: 260px;
  font-size: 11px;
}

.erp-notification-item {
  display: grid;
  grid-template-columns: 10px minmax(0, 1fr);
  align-items: start;
  gap: 11px;
  border-bottom: 1px solid var(--erp-mint-200);
  background: #fff;
  color: var(--erp-mint-900);
  padding: 14px 16px;
  text-decoration: none;
}

.erp-notification-item:hover,
.erp-notification-item:focus {
  background: var(--erp-mint-50);
  color: var(--erp-mint-900);
  text-decoration: none;
}

.erp-notification-item.is-unread {
  background: #f1fbf8;
}

.erp-notification-marker {
  width: 9px;
  height: 9px;
  margin-top: 5px;
  border-radius: 50%;
  background: var(--erp-mint-300);
}

.erp-notification-item.is-warning .erp-notification-marker {
  border-radius: 2px;
  background: var(--erp-amber);
}

.erp-notification-item.is-danger .erp-notification-marker {
  background: var(--erp-red-text);
}

.erp-notification-copy {
  display: grid;
  gap: 4px;
}

.erp-notification-copy > span,
.erp-notification-copy > small {
  color: var(--erp-muted);
}

.erp-export-card {
  max-width: 780px;
}

.erp-export-form {
  display: grid;
  gap: 18px;
}

.erp-export-period {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  align-items: end;
  gap: 18px;
}

.erp-export-all-period {
  justify-content: center;
  min-height: 40px;
}

.erp-export-date-grid {
  width: 100%;
}

.erp-export-date-grid input:disabled {
  background: #f2f7f6;
  color: #91a19e;
  cursor: not-allowed;
}

.erp-export-divider {
  border-top: 1px solid var(--erp-mint-200);
}

.erp-export-options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.erp-export-note {
  display: grid;
  gap: 4px;
  border: 1px solid var(--erp-mint-200);
  border-radius: 11px;
  background: var(--erp-mint-50);
  padding: 12px 14px;
  color: var(--erp-muted);
  font-size: 11px;
  line-height: 1.6;
}

.erp-export-note strong {
  color: var(--erp-mint-800);
  font-size: 12px;
}

.erp-export-actions {
  position: static;
  margin-top: 2px;
  box-shadow: none;
}

.erp-formset-table input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]),
.erp-formset-table select,
.erp-formset-table textarea {
  width: 100%;
  min-width: 110px;
  max-width: none;
  font-size: 12px;
}

.erp-formset-table textarea {
  min-height: 58px;
  resize: vertical;
}

.erp-summary-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}

.erp-summary-chip {
  min-width: 130px;
  border: 1px solid var(--erp-mint-200);
  border-radius: 11px;
  background: var(--erp-mint-50);
  padding: 9px 11px;
}

.erp-summary-chip span {
  display: block;
  color: var(--erp-muted);
  font-size: 10px;
  font-weight: 800;
}

.erp-summary-chip strong {
  display: block;
  margin-top: 3px;
  color: var(--erp-mint-900);
  font-size: 14px;
}

.erp-empty-state {
  display: grid;
  min-height: 180px;
  place-items: center;
  color: var(--erp-muted);
  text-align: center;
}

.erp-pagination {
  display: flex;
  justify-content: center;
  margin: 14px 0 0;
}

.erp-sales-chart {
  display: grid;
  gap: 12px;
}

.erp-sales-chart-row {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr) 110px;
  align-items: center;
  gap: 10px;
}

.erp-sales-year {
  color: var(--erp-mint-900);
  font-weight: 900;
}

.erp-sales-track {
  height: 24px;
  overflow: hidden;
  border-radius: 8px;
  background: #edf3f2;
}

.erp-sales-total-bar {
  display: flex;
  height: 100%;
  min-width: 2px;
  overflow: hidden;
  border-radius: inherit;
}

.erp-sales-segment {
  min-width: 0;
  height: 100%;
}

.erp-sales-segment:nth-child(1) { background: #5db7a8; }
.erp-sales-segment:nth-child(2) { background: #4b8ca6; }
.erp-sales-segment:nth-child(3) { background: #b97b46; }
.erp-sales-segment:nth-child(4) { background: #91d5c8; }
.erp-sales-segment:nth-child(5) { background: #c85965; }

.erp-sales-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 14px;
}

.erp-sales-legend span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--erp-muted);
  font-size: 11px;
  font-weight: 800;
}

.erp-sales-legend i {
  display: inline-block;
  width: 9px;
  height: 9px;
  border-radius: 3px;
}

.erp-sales-legend span:nth-child(1) i { background: #5db7a8; }
.erp-sales-legend span:nth-child(2) i { background: #4b8ca6; }
.erp-sales-legend span:nth-child(3) i { background: #b97b46; }
.erp-sales-legend span:nth-child(4) i { background: #91d5c8; }
.erp-sales-legend span:nth-child(5) i { background: #c85965; }

.unpaid-bulk-actions {
  position: sticky;
  bottom: 10px;
  z-index: 25;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 12px;
  border: 1px solid var(--erp-mint-300);
  border-radius: 12px;
  background: rgba(247, 252, 251, 0.97);
  padding: 10px 12px;
  box-shadow: 0 10px 28px rgba(57, 127, 117, 0.14);
  backdrop-filter: blur(10px);
}

.erp-message-stack {
  display: grid;
  gap: 8px;
  margin-bottom: 12px;
}

.erp-alert {
  border: 1px solid var(--erp-mint-200);
  border-radius: 10px;
  background: var(--erp-mint-50);
  color: var(--erp-mint-800);
  padding: 10px 12px;
  font-weight: 800;
}

.erp-alert-error {
  border-color: #e9b1b6;
  background: #fff1f2;
  color: var(--erp-red-text);
}

@media (max-width: 980px) {
  .erp-kpi-grid {
    grid-template-columns: repeat(2, minmax(150px, 1fr));
  }

  .erp-form-grid {
    grid-template-columns: 1fr;
  }

  .erp-form-field.is-wide {
    grid-column: auto;
  }
}

@media (max-width: 700px) {
  .erp-public-shell-login {
    width: min(560px, calc(100vw - 24px));
    min-height: auto;
    margin: 12px auto;
  }

  .erp-login-shell {
    grid-template-columns: 1fr;
    border-radius: 18px;
  }

  .erp-login-brand-panel {
    min-height: auto;
    gap: 28px;
    padding: 26px;
  }

  .erp-login-message h1 {
    font-size: 27px;
  }

  .erp-login-features {
    display: none;
  }

  .erp-login-form-panel {
    padding: 32px 26px;
  }

  .erp-export-period {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .erp-export-all-period {
    justify-content: flex-start;
  }

  .erp-sidebar {
    width: 60px;
  }

  .erp-sidebar-brand {
    min-height: 64px;
  }

  .erp-sidebar-brand img {
    width: 40px;
    height: 40px;
  }

  .erp-nav-link {
    min-height: 48px;
    font-size: 9px;
  }

  .erp-workspace {
    margin-left: 60px;
  }

  .erp-topbar {
    padding: 8px 10px;
  }

  .erp-global-search {
    width: 100%;
  }

  .erp-topbar-account > span {
    display: none;
  }

  .erp-page-content {
    padding: 14px 10px;
  }

  .erp-page-header {
    display: grid;
  }

  .erp-kpi-grid {
    grid-template-columns: 1fr;
  }

  .erp-sales-chart-row {
    grid-template-columns: 48px minmax(0, 1fr);
  }

  .erp-sales-chart-row > strong:last-child {
    grid-column: 2;
  }
}

@media print {
  html,
  body {
    background: #fff;
  }

  .erp-sidebar,
  .erp-topbar,
  .global-timer-status,
  .erp-page-actions,
  .erp-form-actions {
    display: none !important;
  }

  .erp-workspace {
    margin-left: 0;
  }

  .erp-page-content {
    padding: 0;
  }
}
