@import url("https://fonts.googleapis.com/css2?family=Outfit:wght@400;500;600;700;800&display=swap");

.theme-mofi {
  --primary: #7367f0;
  --success: #22c55e;
  --warning: #f59e0b;
  --danger: #ef4444;
  --surface: #ffffff;
  --bg: #f3f4f8;
  --text: #2a2f45;
  --muted: #8a90a8;
  --border: #e7eaf3;
  --radius: 15px;
  --shadow: 0 8px 26px rgba(37, 45, 71, 0.08);
  font-family: "Outfit", "Inter", sans-serif;
  background: var(--bg);
  color: var(--text);
}

.theme-mofi .app-shell {
  grid-template-columns: 265px 1fr;
}

.theme-mofi .sidebar {
  background: linear-gradient(180deg, #283457 0%, #1f2948 100%);
  border-right: 0;
  box-shadow: inset -1px 0 0 rgba(255, 255, 255, 0.05);
  color: #d8ddf1;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.theme-mofi .sidebar::-webkit-scrollbar {
  width: 0;
  height: 0;
  display: none;
}

.theme-mofi .sidebar-brand {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
}

.theme-mofi .sidebar-brand h1,
.theme-mofi .sidebar-brand p {
  color: #f3f5ff;
}

.theme-mofi .brand-icon {
  background: linear-gradient(140deg, #7f71ff 0%, #58a4ff 100%);
  box-shadow: 0 10px 18px rgba(111, 118, 255, 0.35);
}

.theme-mofi .menu-section {
  color: #b2bbde;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 4px 10px;
  display: inline-block;
  margin-left: 6px;
}

.theme-mofi .module-toggle,
.theme-mofi .nav-btn,
.theme-mofi .subnav-btn {
  color: #dce2f8;
  border-radius: 10px;
  font-weight: 500;
}

.theme-mofi .module-item-link {
  color: #c0c8eb;
}

.theme-mofi .module-group {
  margin: 4px 0;
}

.theme-mofi .module-toggle {
  min-height: 44px;
  padding: 10px 12px;
}

.theme-mofi .module-toggle .fa-chevron-right,
.theme-mofi .module-toggle .fa-chevron-down {
  font-size: 11px;
  opacity: 0.75;
}

.theme-mofi .module-toggle:hover,
.theme-mofi .nav-btn:hover,
.theme-mofi .subnav-btn:hover,
.theme-mofi .module-item-link:hover {
  background: rgba(255, 255, 255, 0.1);
}

.theme-mofi .module-group.open .module-toggle {
  background: rgba(255, 255, 255, 0.08);
  color: #f3f6ff;
  position: relative;
}

.theme-mofi .module-group.open .module-toggle::after {
  content: "";
  position: absolute;
  right: -4px;
  top: 8px;
  bottom: 8px;
  width: 4px;
  border-radius: 6px;
  background: #8f87ff;
}

.theme-mofi .nav-btn.active,
.theme-mofi .subnav-btn.active,
.theme-mofi .module-item-link.active {
  background: rgba(115, 103, 240, 0.36);
  color: #ffffff;
}

.theme-mofi .module-items {
  border-left: 1px solid rgba(216, 222, 241, 0.32);
  margin: 6px 0 0 22px;
  padding: 6px 0 8px 16px;
  position: relative;
}

.theme-mofi .module-item-link {
  position: relative;
  padding: 8px 12px 8px 26px;
  margin: 1px 0;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.1px;
  color: rgba(220, 226, 248, 0.72);
  text-decoration: none;
}

.theme-mofi .module-item-link::before {
  content: "";
  position: absolute;
  left: 6px;
  top: 50%;
  width: 7px;
  height: 7px;
  margin-top: -3.5px;
  border-radius: 50%;
  background: rgba(220, 226, 248, 0.75);
  box-shadow: 0 0 0 2px rgba(31, 41, 72, 0.9);
}

.theme-mofi .module-item-link::after {
  content: "";
  position: absolute;
  left: -16px;
  top: 50%;
  width: 22px;
  margin-top: -0.5px;
  border-top: 1px solid rgba(216, 222, 241, 0.45);
}

.theme-mofi .module-item-link.active {
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
  text-decoration: none;
}

.theme-mofi .module-item-link.active::before {
  background: #9a92ff;
}

.theme-mofi .module-item-link:hover {
  color: #ffffff;
  text-decoration: none;
}

.theme-mofi .topbar {
  background: #ffffff;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  border-radius: var(--radius);
}

.theme-mofi .topbar h2 {
  font-size: 1.35rem;
  font-weight: 700;
  color: #27314d;
}

.theme-mofi .card-soft {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.theme-mofi .kpi-card {
  padding: 16px;
}

.theme-mofi .kpi-label {
  color: #8f96ad;
  font-weight: 600;
}

.theme-mofi .kpi-value {
  font-size: 32px;
  color: #2a3047;
  font-weight: 800;
}

.theme-mofi .btn,
.theme-mofi .btn-primary,
.theme-mofi .btn-soft,
.theme-mofi .btn-outline-primary,
.theme-mofi .btn-light,
.theme-mofi .btn-secondary {
  background: #dde5ef !important;
  border: 1px solid #dde5ef !important;
  color: #1f2a44 !important;
  border-radius: 10px;
  font-weight: 600;
  box-shadow: none !important;
}

.theme-mofi .btn:hover,
.theme-mofi .btn:focus,
.theme-mofi .btn-primary:hover,
.theme-mofi .btn-soft:hover,
.theme-mofi .btn-outline-primary:hover,
.theme-mofi .btn-light:hover,
.theme-mofi .btn-secondary:hover {
  background: #d3dde9 !important;
  border-color: #d3dde9 !important;
  color: #1f2a44 !important;
}

.theme-mofi .form-control,
.theme-mofi .form-select {
  border: 1px solid #e3e7f0;
  border-radius: 8px;
  min-height: 44px;
  background: #ffffff;
  color: #38435f;
  box-shadow: none;
  padding: 10px 12px;
}

.theme-mofi .form-select {
  background-color: #7b72d9;
  border-color: #7b72d9;
  color: #ffffff;
  font-weight: 700;
  font-size: 15px;
  line-height: 1.2;
  letter-spacing: 0.2px;
  box-shadow: 0 8px 16px rgba(123, 114, 217, 0.2);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='none' stroke='%23ffffff' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m4 6 4 4 4-4'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.95rem center;
  background-size: 14px 10px;
  padding-left: 14px;
  padding-right: 2.3rem;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
}

.theme-mofi .form-select option {
  background: #ffffff;
  color: #727b93;
  font-weight: 500;
  font-size: 14px;
  line-height: 1.4;
  letter-spacing: 0.2px;
}

.theme-mofi .form-select.form-select-sm {
  min-height: 42px;
  padding-top: 8px;
  padding-bottom: 8px;
  font-size: 15px;
}

.theme-mofi .form-control:focus,
.theme-mofi .form-select:focus {
  border-color: #6e63d3;
  box-shadow: 0 0 0 2px rgba(115, 103, 240, 0.12);
  background: #ffffff;
}

.theme-mofi .form-select:focus {
  background-color: #7264d8;
  color: #ffffff;
}

.theme-mofi .form-select option:checked {
  background: #edeef3;
  color: #6c7389;
}

.theme-mofi .form-select option:hover {
  background: #f4f5f9;
  color: #636b84;
}

.theme-mofi .mofi-select-native {
  position: absolute !important;
  opacity: 0 !important;
  pointer-events: none !important;
  width: 0 !important;
  height: 0 !important;
  padding: 0 !important;
  border: 0 !important;
}

.theme-mofi .mofi-select-wrap {
  position: relative;
  width: 100%;
}

.theme-mofi .mofi-select-trigger {
  width: 100%;
  min-height: 42px;
  border: 1px solid #7b72d9;
  border-radius: 8px;
  padding: 8px 36px 8px 14px;
  text-align: left;
  background: #7b72d9;
  color: #ffffff;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.15px;
  position: relative;
  box-shadow: 0 8px 16px rgba(123, 114, 217, 0.2);
}

.theme-mofi .mofi-select-sm .mofi-select-trigger {
  min-height: 38px;
  padding-top: 6px;
  padding-bottom: 6px;
}

.theme-mofi .mofi-select-trigger::after {
  content: "";
  position: absolute;
  right: 14px;
  top: 50%;
  width: 10px;
  height: 6px;
  margin-top: -3px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 10'%3E%3Cpath fill='none' stroke='%23ffffff' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 2 6 6 6-6'/%3E%3C/svg%3E");
  background-size: 10px 6px;
  background-repeat: no-repeat;
}

.theme-mofi .mofi-select-wrap.open .mofi-select-trigger {
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
}

.theme-mofi .mofi-select-menu {
  display: none;
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 1px);
  background: #ffffff;
  border: 1px solid #e7eaf2;
  border-top: 0;
  border-bottom-left-radius: 8px;
  border-bottom-right-radius: 8px;
  overflow: hidden;
  z-index: 1080;
  box-shadow: 0 10px 22px rgba(37, 45, 71, 0.1);
}

.theme-mofi .mofi-select-wrap.open .mofi-select-menu {
  display: block;
}

.theme-mofi .mofi-select-option {
  width: 100%;
  border: 0;
  border-bottom: 1px solid #edf1f7;
  background: #ffffff;
  color: #6e7690;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.4;
  text-align: left;
  padding: 6px 14px;
}

.theme-mofi .mofi-select-option:last-child {
  border-bottom: 0;
}

.theme-mofi .mofi-select-option.active {
  background: #2869c6;
  color: #ffffff;
  font-weight: 700;
}

.theme-mofi .mofi-select-option:hover:not(.active):not(.disabled) {
  background: #f4f6fb;
  color: #616a84;
}

.theme-mofi .mofi-select-option.disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.theme-mofi .form-control::placeholder {
  color: #a1a9bc;
}

.theme-mofi textarea.form-control {
  min-height: 110px;
  resize: vertical;
}

.theme-mofi input[type="file"].form-control {
  min-height: 46px;
  padding-top: 9px;
}

.theme-mofi form .form-label,
.theme-mofi form .small.text-secondary {
  color: #5f6b88 !important;
  font-weight: 600;
  font-size: 13px;
  margin-bottom: 6px;
}

.theme-mofi form .row.g-2 > [class*="col-"],
.theme-mofi form .row.g-3 > [class*="col-"] {
  margin-top: 8px;
}

.theme-mofi #pageContainer .card-soft form,
.theme-mofi .modal-body form {
  width: 100%;
}

.theme-mofi #pageContainer .card-soft:has(form) {
  padding: 22px !important;
}

.theme-mofi .modal-dialog {
  max-width: min(1320px, 96vw);
  margin: 1rem auto;
}

.theme-mofi .modal-dialog.modal-lg,
.theme-mofi .modal-dialog.modal-xl {
  max-width: min(1480px, 98vw);
}

.theme-mofi .modal-content {
  min-height: calc(100vh - 2rem);
  border-radius: 14px;
}

.theme-mofi .modal-header,
.theme-mofi .modal-footer {
  padding: 14px 18px;
}

.theme-mofi .modal-body {
  padding: 18px;
  overflow: auto;
  max-height: calc(100vh - 150px);
}

.theme-mofi .modal-body .row.g-2 > [class*="col-"],
.theme-mofi .modal-body .row.g-3 > [class*="col-"] {
  margin-top: 10px;
}

.theme-mofi .dropdown-toggle {
  background: #7a6fd6 !important;
  border-color: #7a6fd6 !important;
  color: #ffffff !important;
  font-weight: 700;
}

.theme-mofi .dropdown-toggle:hover,
.theme-mofi .dropdown-toggle:focus {
  background: #7264d8 !important;
  border-color: #7264d8 !important;
  color: #ffffff !important;
}

.theme-mofi .dropdown-toggle::after {
  border-top-color: #ffffff;
}

.theme-mofi .dropdown-menu {
  border: 1px solid #e7eaf2;
  border-radius: 0 0 12px 12px;
  box-shadow: 0 12px 24px rgba(37, 45, 71, 0.1);
  padding: 0;
  min-width: 190px;
  overflow: hidden;
}

.theme-mofi .dropdown-item {
  color: #6a728c;
  font-weight: 600;
  padding: 12px 14px;
  border-bottom: 1px solid #edf1f7;
}

.theme-mofi .dropdown-item:last-child {
  border-bottom: 0;
}

.theme-mofi .dropdown-item:hover,
.theme-mofi .dropdown-item:focus {
  background: #f7f8fe;
  color: #3f4866;
}

.theme-mofi .flatpickr-calendar {
  width: 365px;
  border: 1px solid #e2e7f1;
  border-radius: 12px;
  box-shadow: 0 8px 20px rgba(37, 45, 71, 0.08);
  font-family: "Outfit", "Inter", sans-serif;
  color: #2a3047;
}

.theme-mofi .flatpickr-months {
  padding: 8px 8px 0;
}

.theme-mofi .flatpickr-current-month {
  font-size: 30px;
  font-weight: 700;
}

.theme-mofi .flatpickr-current-month .flatpickr-monthDropdown-months {
  font-weight: 700;
}

.theme-mofi .flatpickr-current-month input.cur-year {
  font-weight: 700;
}

.theme-mofi .flatpickr-months .flatpickr-prev-month,
.theme-mofi .flatpickr-months .flatpickr-next-month {
  color: #2a3047;
  fill: #2a3047;
  top: 10px;
}

.theme-mofi .flatpickr-weekdays {
  margin-top: 4px;
}

.theme-mofi .flatpickr-weekday {
  color: #7a849f;
  font-size: 14px;
  font-weight: 700;
}

.theme-mofi .flatpickr-day {
  border-radius: 8px;
  color: #2f3854;
  font-weight: 500;
}

.theme-mofi .flatpickr-day.today {
  border-color: #b8c0d4;
}

.theme-mofi .flatpickr-day.selected,
.theme-mofi .flatpickr-day.startRange,
.theme-mofi .flatpickr-day.endRange {
  background: #ffffff;
  border-color: #aeb7ca;
  color: #2a3047;
}

.theme-mofi .flatpickr-day.selected:hover,
.theme-mofi .flatpickr-day.startRange:hover,
.theme-mofi .flatpickr-day.endRange:hover {
  background: #f8faff;
  border-color: #aeb7ca;
  color: #2a3047;
}

.theme-mofi .flatpickr-day:hover {
  background: #f3f6ff;
  border-color: #d0d7e8;
}

.theme-mofi .flatpickr-day.prevMonthDay,
.theme-mofi .flatpickr-day.nextMonthDay {
  color: #bdc5d8;
}

.theme-mofi .table-modern thead th {
  background: #f6f8fd;
  color: #7d86a1;
  font-size: 12px;
  font-weight: 700;
  border-bottom: 1px solid #e9edf7;
}

.theme-mofi .table-modern tbody td {
  border-color: #eff2f9;
}

.theme-mofi .table-modern tbody tr:hover td {
  background: #fbfcff;
}

.theme-mofi .mofi-stat-card {
  min-height: 210px;
}

.theme-mofi .mofi-stat-icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 18px;
}

.theme-mofi .mofi-stat-purple {
  background: rgba(125, 110, 242, 0.15);
  color: #7d6ef2;
}

.theme-mofi .mofi-stat-cyan {
  background: rgba(34, 184, 207, 0.15);
  color: #22b8cf;
}

.theme-mofi .mofi-stat-orange {
  background: rgba(240, 139, 70, 0.16);
  color: #f08b46;
}

.theme-mofi .mofi-stat-pink {
  background: rgba(222, 95, 166, 0.16);
  color: #de5fa6;
}

.theme-mofi .mofi-stat-value {
  font-size: 34px;
  font-weight: 800;
  line-height: 1;
  margin-top: 2px;
  color: #2a3047;
}

.theme-mofi .mofi-stat-label {
  font-size: 15px;
  font-weight: 700;
  color: #5f6a88;
  margin-top: 3px;
}

.theme-mofi .mofi-stat-hint {
  font-size: 13px;
  color: #9aa3bc;
  margin-bottom: 6px;
}

.theme-mofi .mofi-order-table thead th {
  white-space: nowrap;
}

.theme-mofi .mofi-order-name {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  color: #394360;
}

.theme-mofi .mofi-avatar {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  font-size: 15px;
}

.theme-mofi .mofi-sales-card canvas {
  max-height: 300px;
}

.theme-mofi .status-badge {
  border-radius: 999px;
  font-weight: 700;
}

.theme-mofi .status-ok {
  background: rgba(34, 197, 94, 0.14);
  color: #189b46;
}

.theme-mofi .status-warn {
  background: rgba(245, 158, 11, 0.2);
  color: #a16207;
}

.theme-mofi .status-danger {
  background: rgba(239, 68, 68, 0.16);
  color: #c83333;
}

.theme-mofi .workflow-step {
  background: rgba(115, 103, 240, 0.15);
  color: #5a4fd0;
}

.theme-mofi .empty-state {
  background: #fbfcff;
  border-color: #e5eaf6;
}

.theme-mofi .notif-dot {
  box-shadow: 0 0 0 3px #ffffff;
}

.theme-mofi.dark {
  --bg: #121936;
  --surface: #1a2345;
  --text: #e9edff;
  --muted: #99a8d3;
  --border: #2f3b65;
}

.theme-mofi.dark .sidebar {
  background: linear-gradient(180deg, #1c2444 0%, #141a33 100%);
}

.theme-mofi.dark .topbar,
.theme-mofi.dark .card-soft,
.theme-mofi.dark .btn-soft,
.theme-mofi.dark .modal-content,
.theme-mofi.dark .offcanvas {
  background: #1a2345 !important;
  color: #e9edff;
}

.theme-mofi.dark .table-modern thead th {
  background: #222c52 !important;
  color: #a5b0d6;
  border-bottom-color: #2f3b65;
}

.theme-mofi.dark .form-control,
.theme-mofi.dark .form-select {
  background: #131b39;
  border-color: #2f3b65;
  color: #e9edff;
}
