/**
 * CRM workspace. Brand colors stay; emphasis is IBM Plex Sans 600.
 */

:root {
  --crm-radius: 10px;
  --crm-line: #e8d5d6;
  --crm-canvas: #f8f9fa;
  --crm-ink: #1a1a1a;
  --crm-muted: #6b6b6b;
  --bs-body-bg: #f8f9fa;
  --bs-body-font-size: 0.875rem;
  --bs-body-line-height: 1.5;
  --bs-border-color: #e8d5d6;
  --bs-border-radius: 10px;
  --bs-border-radius-sm: 8px;
  --bs-primary: #47040a;
  --bs-primary-rgb: 71, 4, 10;
  --bs-link-color: #7a0b14;
  --bs-link-hover-color: #2e0207;
  --bs-focus-ring-color: rgba(71, 4, 10, 0.18);
}

body.ems-body {
  font-size: 0.875rem;
  line-height: 1.5;
  letter-spacing: 0;
  color: var(--crm-ink);
  background: var(--crm-canvas);
  -webkit-font-smoothing: antialiased;
}

strong,
b,
th,
label,
h1, h2, h3, h4, h5, h6,
.h1, .h2, .h3, .h4, .h5, .h6,
.fw-bold, .fw-semibold, .fw-bolder,
.btn, .form-label, .card-header, .modal-title,
.dropdown-header, .nav-link, .page-link,
.topbar-title, .logo-text, .stat-value, .stat-card .stat-value {
  font-weight: 600;
}

.bi,
.bi::before,
[class^="bi-"]::before,
[class*=" bi-"]::before {
  font-weight: 400;
}

.topbar {
  min-height: 56px;
  background: #fff;
  border-bottom: 1px solid var(--crm-line);
  box-shadow: none;
}

.topbar-title {
  font-size: 0.95rem;
  letter-spacing: 0;
  color: var(--crm-ink) !important;
}

.topbar .btn {
  border-radius: 8px;
}

.sidebar {
  box-shadow: none;
  border-right: 1px solid var(--crm-line);
}

.sidebar-brand {
  padding: 1rem 0.9rem 0.75rem !important;
}

.logo-text {
  font-size: 0.92rem;
  letter-spacing: 0;
  font-weight: 600;
}

.sidebar-brand-kicker,
.nav-section-label {
  font-weight: 600;
  letter-spacing: 0.06em;
}

.sidebar-user {
  border-radius: 10px;
}

.sidebar-link {
  border-radius: 8px;
  font-size: 0.875rem;
  font-weight: 500;
}

.sidebar-link.active {
  background: #f7efef;
  box-shadow: inset 3px 0 0 #47040a;
  font-weight: 600;
}

.sidebar-link .badge {
  font-weight: 600;
}

.content-area {
  background: var(--crm-canvas);
}

.card,
.stat-card,
.hrms-dash-card,
.hrms-kpi,
.modal-content,
.dropdown-menu,
.list-group-item {
  border-color: var(--crm-line);
}

.card,
.stat-card,
.hrms-dash-card,
.modal-content {
  border-radius: var(--crm-radius);
  box-shadow: 0 1px 2px rgba(71, 4, 10, 0.05);
}

.card-header,
.hrms-dash-card .hdr,
.hrms-att-compact .hdr {
  background: #fff;
  background-image: none;
  border-bottom: 1px solid var(--crm-line);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0;
  color: var(--crm-ink);
}

.stat-card {
  border-left-width: 3px;
  box-shadow: 0 1px 2px rgba(71, 4, 10, 0.05);
  padding: 1rem 1.05rem;
}

.stat-card .stat-value,
.hrms-kpi .v,
.hrms-dash-page-title,
.hrms-dash-section-title {
  font-weight: 600;
  letter-spacing: -0.02em;
}

.hrms-dash-kicker,
.hrms-dash-section-title {
  letter-spacing: 0.04em;
}

.hrms-mini-tools .btn,
.hrms-dash .btn,
.hrms-dash-actions .btn,
.hrms-quick-links .btn,
.lpr-submit,
.btn:not(.btn-link):not(.btn-close) {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 36px;
  padding: 0 14px;
  border-radius: 6px;
  font-family: "IBM Plex Sans", system-ui, sans-serif;
  font-size: 13px;
  font-weight: 600;
  line-height: 1;
  letter-spacing: 0;
  white-space: nowrap;
  box-shadow: none;
  text-decoration: none;
  vertical-align: middle;
}

.btn-sm:not(.btn-link):not(.btn-close),
.hrms-mini-tools .btn,
.hrms-quick-links .btn {
  min-height: 32px;
  padding: 0 12px;
  font-size: 13px;
}

.btn .bi,
.btn > i,
.lpr-submit .bi {
  font-size: 14px;
  line-height: 1;
  margin: 0;
  position: static;
  top: auto;
}

.btn-primary,
.btn-accent,
.btn-dash-in,
.lpr-submit {
  background: #47040a !important;
  background-image: none !important;
  border: 1px solid #47040a !important;
  color: #fff !important;
  box-shadow: none !important;
  letter-spacing: 0 !important;
  transform: none;
}

.btn-primary:hover,
.btn-primary:focus,
.btn-accent:hover,
.btn-accent:focus,
.btn-dash-in:hover,
.btn-dash-in:focus,
.lpr-submit:hover:not(:disabled),
.lpr-submit:focus {
  background: #2e0207 !important;
  border-color: #2e0207 !important;
  color: #fff !important;
  filter: none;
  transform: none;
  box-shadow: none !important;
}

.btn-dash-in:active:not(:disabled),
.btn-dash-in.is-pressed,
.btn-dash-in.is-clock-busy {
  background: #2e0207 !important;
  border-color: #2e0207 !important;
  color: #fff !important;
  opacity: 1 !important;
}

.btn-dash-out:active:not(:disabled),
.btn-dash-out.is-pressed,
.btn-dash-out.is-clock-busy {
  background: #f7efef !important;
  border-color: #47040a !important;
  color: #47040a !important;
  opacity: 1 !important;
}

.btn-dash-in,
.btn-dash-out {
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}

.btn-outline-primary {
  background: #fff;
  color: #47040a;
  border: 1px solid #d7b4b7;
}

.btn-outline-primary:hover,
.btn-outline-primary:focus {
  background: #47040a;
  border-color: #47040a;
  color: #fff;
}

.btn-outline-secondary,
.btn-light,
.btn-dash-ghost,
.btn-dash-out,
.hrms-mini-tools .btn {
  background: #fff;
  border: 1px solid #e8d5d6;
  color: #1a1a1a;
}

.btn-outline-secondary:hover,
.btn-light:hover,
.btn-dash-ghost:hover,
.btn-dash-out:hover,
.hrms-mini-tools .btn:hover {
  background: #f7efef;
  border-color: #d7b4b7;
  color: #47040a;
}

.btn-outline-danger {
  background: #fff;
  color: #721c24;
  border: 1px solid #e7c4c8;
}

.btn-outline-danger:hover,
.btn-outline-danger:focus {
  background: #721c24;
  border-color: #721c24;
  color: #fff;
}

.btn-danger {
  background: #721c24;
  border-color: #721c24;
  color: #fff;
}

.btn-danger:hover,
.btn-danger:focus {
  background: #5a161c;
  border-color: #5a161c;
  color: #fff;
}

.btn:disabled,
.btn.disabled,
.btn-dash-in:disabled,
.btn-dash-out:disabled {
  background: #f3ecec !important;
  border-color: #e8d5d6 !important;
  color: #8a7578 !important;
  opacity: 1;
  box-shadow: none !important;
}

.btn-group > .btn {
  border-radius: 0;
}

.btn-group > .btn:first-child {
  border-radius: 6px 0 0 6px;
}

.btn-group > .btn:last-child {
  border-radius: 0 6px 6px 0;
}

.crm-status {
  display: inline;
  padding: 0;
  background: none;
  border: 0;
  border-radius: 0;
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0;
  line-height: 1.4;
  text-transform: capitalize;
}

.crm-status.is-active {
  color: #1e7e34;
}

.crm-status.is-inactive {
  color: #6b6b6b;
}

.crm-status.is-terminated {
  color: #721c24;
}

.table {
  --bs-table-hover-bg: #fbf7f7;
  --bs-table-striped-bg: #fbf8f8;
}

.table thead th {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--crm-muted);
  background: #fbf7f7;
  border-bottom: 1px solid var(--crm-line);
  white-space: nowrap;
  vertical-align: middle;
}

.table td,
.table th {
  vertical-align: middle;
  border-color: #f0e4e5;
}

.table td {
  font-size: 0.875rem;
  font-weight: 400;
}

.form-label {
  margin-bottom: 0.3rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: #3d2a2c;
}

.form-control,
.form-select {
  border-color: var(--crm-line);
  border-radius: 8px;
  font-size: 0.875rem;
  min-height: 38px;
}

.form-control:focus,
.form-select:focus {
  border-color: #7a0b14;
  box-shadow: 0 0 0 3px rgba(71, 4, 10, 0.12);
}

.form-text {
  color: var(--crm-muted);
}

.text-secondary.badge,
.badge {
  font-weight: 600;
}

.alert {
  border-radius: 8px;
  border-width: 1px;
}

.modal-header,
.modal-footer {
  border-color: var(--crm-line);
}

.dropdown-menu {
  border-radius: 10px;
  border: 1px solid var(--crm-line);
  box-shadow: 0 8px 24px rgba(71, 4, 10, 0.08);
  padding: 0.35rem;
}

.dropdown-item {
  border-radius: 6px;
  font-size: 0.875rem;
}

.dropdown-item:hover,
.dropdown-item:focus {
  background: #f7efef;
  color: #47040a;
}

.pagination .page-link {
  border-radius: 8px;
  margin: 0 0.12rem;
  color: #47040a;
  border-color: var(--crm-line);
  font-weight: 600;
}

.pagination .page-item.active .page-link {
  background: #47040a;
  border-color: #47040a;
}

.hrms-dash-hero {
  margin-bottom: 1.15rem;
  padding-bottom: 0.9rem;
}

.hrms-dash h1.hrms-dash-page-title {
  font-weight: 600;
  letter-spacing: -0.02em;
}

.hrms-kpi-icon {
  border-radius: 8px;
}
