/* ===============================================================
   AXEANE KOMPTA — DESIGN SYSTEM SaaS PREMIUM
   Inspiré de Pennylane / Qonto / Agicap / Spendesk
   =============================================================== */

/* ================= GLOBAL CONTAINER ================= */

.axn-container {
  height: 100%;
  display: flex;
  flex-direction: column;
  font-family: "Montserrat-Regular", Roboto, "Segoe UI", sans-serif;
  background: #f5f6fb;
  color: #2b2f38;
  padding: 0;
}

/* ================= COMMAND BAR ================= */

.axn-command-bar {
  display: flex;
  align-items: center;
  padding: 6px 16px;
  background: #fff;
  border-bottom: 1px solid #eef0f6;
  min-height: 48px;
  gap: 10px;
  flex-shrink: 0;
}

.axn-command-bar .axn-bar-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.axn-command-bar .axn-bar-center {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.axn-command-bar .axn-bar-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ================= KPI CARDS ================= */

.axn-kpi-container {
  display: flex;
  gap: 10px;
  padding: 10px 16px 0 16px;
  margin: 0;
  flex-shrink: 0;
}

.axn-kpi-card {
  flex: 1;
  background: #fff;
  border-radius: 10px;
  padding: 10px 14px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  border: 1px solid #eef0f6;
  position: relative;
  overflow: hidden;
  transition:
    box-shadow 0.2s,
    transform 0.15s;
}

.axn-kpi-card:hover {
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
  transform: translateY(-1px);
}

.axn-kpi-card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
}

.axn-kpi-card.kpi-primary::before {
  background: #3f51b5;
}
.axn-kpi-card.kpi-success::before {
  background: #2ecc71;
}
.axn-kpi-card.kpi-warning::before {
  background: #f39c12;
}
.axn-kpi-card.kpi-danger::before {
  background: #e74c3c;
}
.axn-kpi-card.kpi-info::before {
  background: #00bcd4;
}
.axn-kpi-card.kpi-secondary::before {
  background: #7986cb;
}

.axn-kpi-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 4px;
}

.axn-kpi-title {
  font-size: 12px;
  color: #6c7483;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.axn-kpi-icon {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
}

.axn-kpi-icon.icon-primary {
  background: rgba(63, 81, 181, 0.1);
  color: #3f51b5;
}
.axn-kpi-icon.icon-success {
  background: rgba(46, 204, 113, 0.1);
  color: #2ecc71;
}
.axn-kpi-icon.icon-warning {
  background: rgba(243, 156, 18, 0.1);
  color: #f39c12;
}
.axn-kpi-icon.icon-danger {
  background: rgba(231, 76, 60, 0.1);
  color: #e74c3c;
}
.axn-kpi-icon.icon-info {
  background: rgba(0, 188, 212, 0.1);
  color: #00bcd4;
}

.axn-kpi-value {
  font-size: 17px;
  font-weight: 700;
  color: #2c3e50;
  margin-bottom: 2px;
  line-height: 1.2;
}

.axn-kpi-value.positive {
  color: #2ecc71;
}
.axn-kpi-value.negative {
  color: #e74c3c;
}

.axn-kpi-subtitle {
  font-size: 12px;
  color: #95a5a6;
}

/* ================= FILTER PANEL ================= */

.axn-filter-panel {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  border: 1px solid #eef0f6;
  padding: 16px 20px;
  margin: 10px 16px 0 16px;
  flex-shrink: 0;
}

.axn-filter-panel .form-group label,
.axn-filter-panel .control-label {
  font-size: 12px;
  font-weight: 600;
  color: #4a5568;
  margin-bottom: 4px;
}

.axn-filter-panel .form-control {
  border-radius: 8px;
  border: 1.5px solid #e2e8f0;
  font-size: 13px;
  transition:
    border-color 0.2s,
    box-shadow 0.2s;
}

.axn-filter-panel .form-control:focus {
  border-color: #3f51b5;
  box-shadow: 0 0 0 3px rgba(63, 81, 181, 0.1);
}

/* ================= TABLE WRAPPER ================= */

.axn-table-wrapper {
  flex: 1;
  overflow: auto;
  margin: 10px 16px 16px 16px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.06);
  border: 1px solid #eef0f6;
}

/* ================= TABLE ================= */

.axn-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  table-layout: auto;
}

.axn-table thead th {
  background: linear-gradient(180deg, #4a5cc7 0%, #3f51b5 100%);
  color: #fff;
  padding: 12px 12px;
  text-align: left;
  position: sticky;
  top: 0;
  font-size: 12px;
  font-weight: 600;
  z-index: 2;
  border-bottom: 1px solid #3848a8;
  white-space: nowrap;
}

.axn-table thead th:first-child {
  border-top-left-radius: 12px;
}

.axn-table thead th:last-child {
  border-top-right-radius: 12px;
}

.axn-table thead th input.form-control {
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: #fff;
  border-radius: 6px;
  font-size: 12px;
  padding: 4px 8px;
  height: 28px;
  margin-top: 4px;
}

.axn-table thead th input.form-control::placeholder {
  color: rgba(255, 255, 255, 0.6);
}

.axn-table thead th input.form-control:focus {
  background: rgba(255, 255, 255, 0.25);
  border-color: rgba(255, 255, 255, 0.5);
  box-shadow: none;
  outline: none;
}

.axn-table thead th .nax-header-filter-link,
.axn-table thead th a {
  color: #fff !important;
  text-decoration: none;
  font-weight: 600;
}

.axn-table tbody tr {
  transition: background-color 0.15s;
}

.axn-table tbody tr:nth-child(even) {
  background-color: #fafbfe;
}

.axn-table tbody tr:nth-child(odd) {
  background-color: #fff;
}

.axn-table tbody tr:hover {
  background-color: #eef1fb;
}

.axn-table td {
  padding: 10px 12px;
  border-bottom: 1px solid #eef0f6;
  font-size: 13px;
  color: #2b2f38;
  vertical-align: middle;
}

.axn-table td.montant,
.axn-table td.text-right {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

/* ================= PANEL HEADER TITLE ================= */

.axn-panel-title {
  font-size: 16px;
  font-weight: 700;
  color: #2b2f38;
  padding: 14px 20px;
  border-bottom: 1px solid #eef0f6;
  display: flex;
  align-items: center;
  gap: 10px;
}

.axn-panel-title i {
  color: #3f51b5;
  font-size: 18px;
}

/* ================= TABS ================= */

.axn-tabs {
  display: flex;
  border-bottom: 2px solid #eef0f6;
  padding: 0 20px;
  background: #fff;
  gap: 0;
  overflow-x: auto;
}

.axn-tab-item {
  padding: 12px 20px;
  font-size: 13px;
  font-weight: 500;
  color: #6c7483;
  cursor: pointer;
  border-bottom: 3px solid transparent;
  transition: all 0.2s;
  white-space: nowrap;
  text-decoration: none;
}

.axn-tab-item:hover {
  color: #3f51b5;
  background: rgba(63, 81, 181, 0.04);
}

.axn-tab-item.active,
.axn-tab-item.activeMainMenu {
  color: #3f51b5;
  border-bottom-color: #3f51b5;
  font-weight: 600;
}

/* ================= BUTTONS ================= */

.axn-btn {
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  padding: 8px 16px;
  border: none;
  cursor: pointer;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.axn-btn-primary {
  background: #3f51b5;
  color: #fff;
}

.axn-btn-primary:hover {
  background: #3848a8;
  color: #fff;
}

.axn-btn-secondary {
  background: #fff;
  color: #4a5568;
  border: 1.5px solid #e2e8f0;
}

.axn-btn-secondary:hover {
  background: #f7f8fc;
  border-color: #cbd5e0;
}

.axn-btn-danger {
  background: #e74c3c;
  color: #fff;
}

.axn-btn-danger:hover {
  background: #000;
}

.axn-btn-success {
  background: #2ecc71;
  color: #fff;
}

.axn-btn-success:hover {
  background: #27ae60;
}

.axn-btn-icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  font-size: 14px;
}

/* ================= BADGES / CHIPS ================= */

.axn-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.2px;
}

.axn-badge-success {
  background: #e8f5e9;
  color: #2e7d32;
  border: 1px solid #a5d6a7;
}

.axn-badge-danger {
  background: #fbe9e7;
  color: #c62828;
  border: 1px solid #ef9a9a;
}

.axn-badge-warning {
  background: #fff8e1;
  color: #f57f17;
  border: 1px solid #ffe082;
}

.axn-badge-info {
  background: #e3f2fd;
  color: #1565c0;
  border: 1px solid #90caf9;
}

.axn-badge-default {
  background: #f5f5f5;
  color: #616161;
  border: 1px solid #e0e0e0;
}

/* ================= STATUS LABELS ================= */

.axn-status {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  font-weight: 500;
}

.axn-status::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
}

.axn-status.status-ok::before {
  background: #2ecc71;
}
.axn-status.status-error::before {
  background: #e74c3c;
}
.axn-status.status-pending::before {
  background: #f39c12;
}
.axn-status.status-info::before {
  background: #3f51b5;
}

/* ================= PAGINATION ================= */

.axn-pagination-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 16px;
  border-top: 1px solid #eef0f6;
  background: #fff;
  border-bottom-left-radius: 12px;
  border-bottom-right-radius: 12px;
  flex-shrink: 0;
}

.axn-page-size-buttons {
  display: flex;
  gap: 4px;
}

.axn-page-size-btn {
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 500;
  border: 1.5px solid #e2e8f0;
  background: #fff;
  color: #4a5568;
  cursor: pointer;
  transition: all 0.2s;
}

.axn-page-size-btn:hover {
  border-color: #3f51b5;
  color: #3f51b5;
}

.axn-page-size-btn.active {
  background: #3f51b5;
  color: #fff;
  border-color: #3f51b5;
}

/* ================= LOADING OVERLAY ================= */

.axn-loading-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.85);
  z-index: 10;
  gap: 12px;
}

.axn-loading-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid #eef0f6;
  border-top: 3px solid #3f51b5;
  border-radius: 50%;
  animation: axn-spin 0.8s linear infinite;
}

@keyframes axn-spin {
  to {
    transform: rotate(360deg);
  }
}

.axn-loading-text {
  font-size: 14px;
  font-weight: 600;
  color: #3f51b5;
}

/* ================= EMPTY STATE ================= */

.axn-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  color: #95a5a6;
}

.axn-empty-state i {
  font-size: 48px;
  margin-bottom: 12px;
  opacity: 0.5;
}

.axn-empty-state p {
  font-size: 14px;
  font-weight: 500;
}

/* ================= SECTION ROWS IN TABLE ================= */

.axn-section-header td {
  background: linear-gradient(135deg, #e8eaf6 0%, #dde1f7 100%);
  font-weight: 700;
  font-size: 13px;
  color: #283593;
  border-left: 4px solid #3f51b5;
  padding: 10px 12px;
}

.axn-sub-section td {
  background: #eef1fb;
  font-weight: 600;
  font-size: 13px;
  color: #3949ab;
  border-left: 3px solid #7986cb;
  padding: 8px 12px;
}

.axn-total-row td {
  background: #dfe5f7;
  font-weight: 700;
  color: #1a237e;
  font-size: 13px;
  padding: 10px 12px;
}

.axn-grand-total td {
  background: linear-gradient(135deg, #1a237e 0%, #0d1557 100%);
  color: #fff !important;
  font-weight: 700;
  font-size: 14px;
  padding: 12px;
  border-bottom: none;
}

/* ================= FORM CARD ================= */

.axn-form-card {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.06);
  border: 1px solid #eef0f6;
  padding: 20px;
  margin: 10px 16px;
}

.axn-form-card .form-group label {
  font-size: 12px;
  font-weight: 600;
  color: #4a5568;
  margin-bottom: 4px;
}

.axn-form-card .form-control {
  border-radius: 8px;
  border: 1.5px solid #e2e8f0;
  font-size: 13px;
}

.axn-form-card .form-control:focus {
  border-color: #3f51b5;
  box-shadow: 0 0 0 3px rgba(63, 81, 181, 0.1);
}

/* ================= TOTALS BAR ================= */

.axn-totals-bar {
  display: flex;
  gap: 12px;
  padding: 10px 16px;
  flex-shrink: 0;
}

.axn-total-chip {
  flex: 1;
  padding: 10px 16px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  text-align: center;
}

.axn-total-chip.chip-success {
  background: linear-gradient(135deg, #e8f5e9 0%, #c8e6c9 100%);
  color: #2e7d32;
  border: 1px solid #a5d6a7;
}

.axn-total-chip.chip-danger {
  background: linear-gradient(135deg, #fbe9e7 0%, #ffccbc 100%);
  color: #c62828;
  border: 1px solid #ef9a9a;
}

.axn-total-chip.chip-primary {
  background: linear-gradient(135deg, #e8eaf6 0%, #c5cae9 100%);
  color: #283593;
  border: 1px solid #9fa8da;
}

/* ================= DROPDOWN ACTIONS ================= */

.axn-table .btn-group .btn {
  border-radius: 6px;
  font-size: 12px;
  padding: 4px 8px;
}

.axn-table .dropdown-menu {
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  border: 1px solid #eef0f6;
  padding: 4px;
}

.axn-table .dropdown-menu li a {
  border-radius: 6px;
  padding: 6px 12px;
  font-size: 13px;
  transition: background-color 0.15s;
}

.axn-table .dropdown-menu li a:hover {
  background: #eef1fb;
}

/* ================= SWITCH OVERRIDE ================= */

.axn-container md-switch {
  margin-bottom: 0;
  margin-top: 0;
}

.axn-container md-switch .md-label {
  font-size: 13px;
  font-weight: 600;
  color: #3f51b5;
}

/* ================= ALERT MESSAGES ================= */

.axn-alert {
  padding: 10px 16px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 8px 16px 0 16px;
}

.axn-alert-warning {
  background: #fff8e1;
  border: 1px solid #ffe082;
  color: #f57f17;
}

.axn-alert-danger {
  background: #fbe9e7;
  border: 1px solid #ef9a9a;
  color: #c62828;
}

.axn-alert-success {
  background: #e8f5e9;
  border: 1px solid #a5d6a7;
  color: #2e7d32;
}

.axn-alert-info {
  background: #e3f2fd;
  border: 1px solid #90caf9;
  color: #1565c0;
}

/* ================= SCROLLBAR STYLING ================= */

.axn-table-wrapper::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

.axn-table-wrapper::-webkit-scrollbar-track {
  background: #f5f6fb;
  border-radius: 4px;
}

.axn-table-wrapper::-webkit-scrollbar-thumb {
  background: #c5cae9;
  border-radius: 4px;
}

.axn-table-wrapper::-webkit-scrollbar-thumb:hover {
  background: #9fa8da;
}

/* ================= RESPONSIVE ADJUSTMENTS ================= */

@media (max-width: 1280px) {
  .axn-kpi-container {
    flex-wrap: wrap;
  }
  .axn-kpi-card {
    min-width: calc(50% - 10px);
  }
}

/* ================= DROPDOWN ACTIONS — TABLE ROWS (compact / fin) ================= */

ul.nax-actions-dropdown {
  border-radius: 10px !important;
  box-shadow:
    0 10px 40px rgba(0, 0, 0, 0.1),
    0 2px 8px rgba(0, 0, 0, 0.06) !important;
  padding: 4px !important;
  border: 1px solid #e5e7eb !important;
  min-width: 170px !important;
  font-family:
    "Inter",
    "Montserrat-Regular",
    -apple-system,
    sans-serif;
  background: #fff !important;
}
ul.nax-actions-dropdown > li > a {
  display: flex !important;
  align-items: center;
  gap: 8px;
  padding: 7px 12px !important;
  font-size: 12.5px !important;
  font-weight: 500;
  color: #374151 !important;
  border-radius: 6px;
  cursor: pointer;
  white-space: nowrap;
  line-height: 1.4;
  transition: background 0.12s ease;
}
ul.nax-actions-dropdown > li > a:hover {
  background: #f3f4f6 !important;
  color: #111827 !important;
}
ul.nax-actions-dropdown > li > a > i {
  width: 15px;
  text-align: center;
  font-size: 12px;
  flex-shrink: 0;
}
