* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --primary-blue: #2563EB;
  --primary-blue-hover: #1d4ed8;
  --dark-text: #0F172A;
  --light-bg: #F8FAFC;
  --white: #ffffff;
  --success-green: #16A34A;
  --warning-yellow: #F59E0B;
  --error-red: #DC2626;
  --border-color: #e2e8f0;
  --text-muted: #64748b;
  --sidebar-width: 260px;
  --header-height: 64px;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background-color: var(--light-bg);
  color: var(--dark-text);
  line-height: 1.6;
}

a {
  text-decoration: none;
  color: inherit;
}

.login-container {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.login-card {
  background: var(--white);
  padding: 40px;
  border-radius: 12px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
  width: 100%;
  max-width: 420px;
}

.login-logo {
  text-align: center;
  margin-bottom: 30px;
}

.login-logo h1 {
  font-size: 28px;
  color: var(--primary-blue);
  font-weight: 700;
}

.login-logo p {
  color: var(--text-muted);
  font-size: 14px;
  margin-top: 5px;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 500;
  color: var(--dark-text);
  font-size: 14px;
}

.form-group input,
.form-group select {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  font-size: 14px;
  transition: border-color 0.3s, box-shadow 0.3s;
}

.form-group input:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--primary-blue);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.btn {
  padding: 12px 24px;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
}

.btn-primary {
  background-color: var(--primary-blue);
  color: var(--white);
}

.btn-primary:hover {
  background-color: var(--primary-blue-hover);
}

.btn-secondary {
  background-color: var(--light-bg);
  color: var(--dark-text);
  border: 1px solid var(--border-color);
}

.btn-secondary:hover {
  background-color: #e2e8f0;
}

.btn-success {
  background-color: var(--success-green);
  color: var(--white);
}

.btn-danger {
  background-color: var(--error-red);
  color: var(--white);
}

.forgot-link {
  display: block;
  text-align: center;
  margin-top: 20px;
  color: var(--primary-blue);
  font-size: 14px;
}

.forgot-link:hover {
  text-decoration: underline;
}

.app-container {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  width: var(--sidebar-width);
  background: var(--white);
  border-right: 1px solid var(--border-color);
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  overflow-y: auto;
  z-index: 100;
  transition: transform 0.3s;
}

.sidebar-header {
  padding: 20px;
  border-bottom: 1px solid var(--border-color);
  text-align: center;
}

.sidebar-logo {
  max-width: 180px;
  height: auto;
  margin-bottom: 5px;
}

.sidebar-header .tagline {
  font-size: 11px;
  color: var(--text-muted);
  display: block;
}

.sidebar-menu {
  padding: 15px 0;
}

.menu-item {
  display: flex;
  align-items: center;
  padding: 12px 20px;
  color: var(--dark-text);
  transition: all 0.3s;
  border-left: 3px solid transparent;
}

.menu-item:hover {
  background-color: var(--light-bg);
}

.menu-item.active {
  background-color: rgba(37, 99, 235, 0.1);
  color: var(--primary-blue);
  border-left-color: var(--primary-blue);
}

.menu-item i {
  width: 24px;
  margin-right: 12px;
  font-size: 18px;
}

.menu-item span {
  font-size: 14px;
  font-weight: 500;
}

.menu-item .submenu-arrow {
  margin-left: auto;
  font-size: 12px;
  transition: transform 0.3s;
}

.menu-item.expanded .submenu-arrow {
  transform: rotate(180deg);
}

.submenu {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
  background: var(--light-bg);
}

.submenu.open {
  max-height: 400px;
}

.submenu-item {
  display: flex;
  align-items: center;
  padding: 10px 20px 10px 56px;
  color: var(--text-muted);
  font-size: 13px;
  transition: all 0.3s;
  border-left: 3px solid transparent;
}

.submenu-item:hover {
  color: var(--dark-text);
  background-color: var(--white);
}

.submenu-item.active {
  color: var(--primary-blue);
  background-color: rgba(37, 99, 235, 0.05);
  border-left-color: var(--primary-blue);
}

.submenu-item i {
  width: 18px;
  margin-right: 10px;
  font-size: 12px;
}

.main-wrapper {
  flex: 1;
  margin-left: var(--sidebar-width);
}

.header {
  height: var(--header-height);
  background: var(--white);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 30px;
  position: sticky;
  top: 0;
  z-index: 50;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 20px;
}

.menu-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: var(--dark-text);
}

.page-title {
  font-size: 20px;
  font-weight: 600;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 20px;
}

.notification-btn {
  background: none;
  border: none;
  font-size: 20px;
  cursor: pointer;
  color: var(--text-muted);
  position: relative;
}

.notification-btn .badge {
  position: absolute;
  top: -5px;
  right: -5px;
  background: var(--error-red);
  color: var(--white);
  font-size: 10px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.user-dropdown {
  position: relative;
}

.user-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  border-radius: 8px;
}

.user-btn:hover {
  background-color: var(--light-bg);
}

.user-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--primary-blue);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
}

.user-info {
  text-align: left;
}

.user-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--dark-text);
}

.user-role {
  font-size: 12px;
  color: var(--text-muted);
}

.dropdown-menu {
  position: absolute;
  top: 100%;
  right: 0;
  background: var(--white);
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  min-width: 180px;
  padding: 8px 0;
  display: none;
  z-index: 1000;
}

.dropdown-menu.show {
  display: block;
}

.dropdown-item {
  display: block;
  padding: 10px 16px;
  color: var(--dark-text);
  font-size: 14px;
}

.dropdown-item:hover {
  background-color: var(--light-bg);
}

.dropdown-item.text-danger {
  color: var(--error-red);
}

.main-content {
  padding: 30px;
}

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
  margin-bottom: 30px;
}

.kpi-card {
  background: var(--white);
  padding: 24px;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  display: flex;
  align-items: center;
  gap: 16px;
  transition: transform 0.3s, box-shadow 0.3s;
  cursor: pointer;
}

.kpi-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.kpi-icon {
  width: 56px;
  height: 56px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
}

.kpi-icon.blue {
  background: rgba(37, 99, 235, 0.1);
  color: var(--primary-blue);
}

.kpi-icon.green {
  background: rgba(22, 163, 74, 0.1);
  color: var(--success-green);
}

.kpi-icon.yellow {
  background: rgba(245, 158, 11, 0.1);
  color: var(--warning-yellow);
}

.kpi-icon.red {
  background: rgba(220, 38, 38, 0.1);
  color: var(--error-red);
}

.kpi-details h3 {
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 4px;
}

.kpi-details p {
  font-size: 14px;
  color: var(--text-muted);
}

.card {
  background: var(--white);
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  margin-bottom: 20px;
}

.card-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.card-header h2 {
  font-size: 18px;
  font-weight: 600;
}

.card-body {
  padding: 24px;
}

.chart-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
  gap: 20px;
  margin-bottom: 30px;
}

.chart-card {
  background: var(--white);
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  padding: 24px;
}

.chart-card h3 {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 20px;
}

.chart-placeholder {
  height: 250px;
  background: var(--light-bg);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
}

.table-container {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
}

table th,
table td {
  padding: 14px 16px;
  text-align: left;
  border-bottom: 1px solid var(--border-color);
}

table th {
  font-weight: 600;
  font-size: 13px;
  color: var(--text-muted);
  text-transform: uppercase;
  background: var(--light-bg);
}

table td {
  font-size: 14px;
}

table tbody tr:hover {
  background-color: var(--light-bg);
}

.status-badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
}

.status-badge.new {
  background: rgba(37, 99, 235, 0.1);
  color: var(--primary-blue);
}

.status-badge.contacted {
  background: rgba(245, 158, 11, 0.1);
  color: var(--warning-yellow);
}

.status-badge.scheduled {
  background: rgba(139, 92, 246, 0.1);
  color: #8b5cf6;
}

.status-badge.completed {
  background: rgba(22, 163, 74, 0.1);
  color: var(--success-green);
}

.status-badge.active {
  background: rgba(22, 163, 74, 0.1);
  color: var(--success-green);
}

.status-badge.expiring {
  background: rgba(245, 158, 11, 0.1);
  color: var(--warning-yellow);
}

.status-badge.expired {
  background: rgba(220, 38, 38, 0.1);
  color: var(--error-red);
}

.status-badge.cancelled {
  background: rgba(220, 38, 38, 0.1);
  color: var(--error-red);
}

.status-badge.trial {
  background: rgba(245, 158, 11, 0.1);
  color: var(--warning-yellow);
}

.status-badge.paid {
  background: rgba(22, 163, 74, 0.1);
  color: var(--success-green);
}

.filters {
  display: flex;
  gap: 15px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.filter-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.filter-group label {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-muted);
}

.filter-group select,
.filter-group input {
  padding: 8px 12px;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  font-size: 14px;
}

.action-btn {
  padding: 6px 12px;
  border: none;
  border-radius: 6px;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.3s;
}

.action-btn.view {
  background: rgba(37, 99, 235, 0.1);
  color: var(--primary-blue);
}

.action-btn.edit {
  background: rgba(245, 158, 11, 0.1);
  color: var(--warning-yellow);
}

.action-btn.delete {
  background: rgba(220, 38, 38, 0.1);
  color: var(--error-red);
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 10px;
  margin-bottom: 30px;
}

.calendar-day {
  text-align: center;
  padding: 8px;
  font-weight: 600;
  color: var(--text-muted);
  font-size: 13px;
}

.calendar-cell {
  background: var(--white);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 10px;
  min-height: 100px;
}

.calendar-cell {
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, box-shadow 0.2s;
}
.calendar-cell:not(.empty):hover {
  background: rgba(37, 99, 235, 0.06);
  border-color: #93c5fd;
}
.calendar-cell.today {
  border-color: var(--primary-blue);
  background: rgba(37, 99, 235, 0.05);
}
.calendar-cell.selected {
  border-color: var(--primary-blue);
  background: rgba(37, 99, 235, 0.12);
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.25);
}
.calendar-cell.selected .calendar-date {
  color: var(--primary-blue);
  font-weight: 700;
}

.calendar-date {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 8px;
}

.calendar-event {
  background: var(--primary-blue);
  color: var(--white);
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 11px;
  margin-bottom: 4px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.package-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 20px;
  padding-top: 16px;
}

.master-tabs {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 10px;
}

.master-tab {
  padding: 10px 20px;
  border: none;
  background: none;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-muted);
  cursor: pointer;
  border-radius: 8px;
  transition: all 0.3s;
}

.master-tab.active {
  background: var(--primary-blue);
  color: var(--white);
}

.master-tab:hover:not(.active) {
  background: var(--light-bg);
}

.compliance-section {
  margin-bottom: 30px;
}

.compliance-section h3 {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 15px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--primary-blue);
}

.compliance-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
}

.compliance-card {
  background: var(--white);
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.compliance-card h4 {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 12px;
  color: var(--primary-blue);
}

.compliance-card p {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.6;
}

.settings-section {
  margin-bottom: 30px;
}

.settings-section h3 {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 20px;
}

.settings-card {
  background: var(--white);
  border-radius: 12px;
  padding: 24px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.settings-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 0;
  border-bottom: 1px solid var(--border-color);
}

.settings-item:last-child {
  border-bottom: none;
}

.settings-item-info h4 {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 4px;
}

.settings-item-info p {
  font-size: 13px;
  color: var(--text-muted);
}

.toggle-switch {
  position: relative;
  width: 50px;
  height: 26px;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #ccc;
  transition: 0.4s;
  border-radius: 26px;
}

.toggle-slider:before {
  position: absolute;
  content: "";
  height: 20px;
  width: 20px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: 0.4s;
  border-radius: 50%;
}

input:checked + .toggle-slider {
  background-color: var(--primary-blue);
}

input:checked + .toggle-slider:before {
  transform: translateX(24px);
}

.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.modal-overlay.show,
.modal-overlay.active {
  display: flex;
}

.modal {
  background: var(--white);
  border-radius: 12px;
  width: 100%;
  max-width: 500px;
  max-height: 90vh;
  overflow-y: auto;
}

.modal-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-header h3 {
  font-size: 18px;
  font-weight: 600;
}

.modal-close {
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: var(--text-muted);
}

.modal-body {
  padding: 24px;
}

.modal-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--border-color);
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

.detail-panel {
  position: fixed;
  top: 0;
  right: -400px;
  width: 400px;
  height: 100vh;
  background: var(--white);
  box-shadow: -4px 0 20px rgba(0, 0, 0, 0.1);
  z-index: 200;
  transition: right 0.3s;
}

.detail-panel.show {
  right: 0;
}

.detail-header {
  padding: 20px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.detail-header h3 {
  font-size: 18px;
  font-weight: 600;
}

.detail-close {
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: var(--text-muted);
}

.detail-body {
  padding: 20px;
  overflow-y: auto;
  height: calc(100vh - 140px);
}

.detail-field {
  margin-bottom: 16px;
}

.detail-field label {
  display: block;
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.detail-field p {
  font-size: 14px;
  font-weight: 500;
}

.detail-footer {
  padding: 16px 20px;
  border-top: 1px solid var(--border-color);
  display: flex;
  gap: 12px;
}

@media (max-width: 1024px) {
  .sidebar {
    transform: translateX(-100%);
  }

  .sidebar.show {
    transform: translateX(0);
  }

  .main-wrapper {
    margin-left: 0;
  }

  .menu-toggle {
    display: block;
  }

  .chart-container {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .kpi-grid {
    grid-template-columns: 1fr;
  }

  .header {
    padding: 0 15px;
  }

  .main-content {
    padding: 15px;
  }

  .filters {
    flex-direction: column;
  }

  .calendar-grid {
    grid-template-columns: repeat(7, 1fr);
    font-size: 12px;
  }

  .calendar-cell {
    min-height: 60px;
    padding: 5px;
  }

  .filter-bar {
    flex-direction: column;
    align-items: stretch;
  }

  .quick-actions .action-buttons {
    grid-template-columns: 1fr;
  }

  .alerts-grid {
    grid-template-columns: 1fr;
  }

  .tables-grid {
    grid-template-columns: 1fr;
  }
}

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: flex-end;
  background: var(--white);
  padding: 20px;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  margin-bottom: 24px;
  position: sticky;
  top: var(--header-height);
  z-index: 40;
}

.filter-bar .filter-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.filter-bar .filter-group label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
}

.filter-bar .filter-group select,
.filter-bar .filter-group input {
  padding: 10px 14px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  font-size: 14px;
  min-width: 140px;
}

.custom-date-inputs {
  flex-direction: row !important;
  align-items: center !important;
  gap: 8px !important;
}

.custom-date-inputs span {
  color: var(--text-muted);
}

.kpi-trend {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
  font-size: 12px;
  font-weight: 500;
}

.kpi-trend.up {
  color: var(--success-green);
}

.kpi-trend.down {
  color: var(--error-red);
}

.kpi-trend i {
  font-size: 10px;
}

.quick-actions {
  background: var(--white);
  padding: 20px 24px;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  margin-bottom: 24px;
}

.quick-actions h3 {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 16px;
  color: var(--dark-text);
}

.quick-actions .action-buttons {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
}

.action-btn-large {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 20px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  transition: all 0.3s;
  text-decoration: none;
}

.action-btn-large.primary {
  background: var(--primary-blue);
  color: var(--white);
}

.action-btn-large.primary:hover {
  background: var(--primary-blue-hover);
}

.action-btn-large.secondary {
  background: var(--light-bg);
  color: var(--dark-text);
  border: 1px solid var(--border-color);
}

.action-btn-large.secondary:hover {
  background: #e2e8f0;
}

.action-btn-large.warning {
  background: rgba(245, 158, 11, 0.1);
  color: #b45309;
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.action-btn-large.warning:hover {
  background: rgba(245, 158, 11, 0.2);
}

.action-btn-large i {
  font-size: 18px;
}

.alerts-section {
  margin-bottom: 24px;
}

.alerts-section h3 {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 16px;
  color: var(--dark-text);
}

.alerts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
}

.alert-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px 20px;
  border-radius: 12px;
  background: var(--white);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.alert-card.warning {
  border-left: 4px solid var(--warning-yellow);
}

.alert-card.danger {
  border-left: 4px solid var(--error-red);
}

.alert-card.info {
  border-left: 4px solid var(--primary-blue);
}

.alert-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}

.alert-card.warning .alert-icon {
  background: rgba(245, 158, 11, 0.1);
  color: var(--warning-yellow);
}

.alert-card.danger .alert-icon {
  background: rgba(220, 38, 38, 0.1);
  color: var(--error-red);
}

.alert-card.info .alert-icon {
  background: rgba(37, 99, 235, 0.1);
  color: var(--primary-blue);
}

.alert-content {
  flex: 1;
}

.alert-content h4 {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 4px;
}

.alert-content p {
  font-size: 13px;
  color: var(--text-muted);
}

.alert-action {
  padding: 8px 16px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--primary-blue);
  background: rgba(37, 99, 235, 0.1);
  text-decoration: none;
  transition: all 0.3s;
}

.alert-action:hover {
  background: rgba(37, 99, 235, 0.2);
}

.chart-container.three-col {
  grid-template-columns: repeat(3, 1fr);
}

.chart-container.two-col {
  grid-template-columns: repeat(2, 1fr);
}

@media (max-width: 1200px) {
  .chart-container.three-col {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 900px) {
  .chart-container.three-col,
  .chart-container.two-col {
    grid-template-columns: 1fr;
  }
}

.tables-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

@media (max-width: 1100px) {
  .tables-grid {
    grid-template-columns: 1fr;
  }
}

.empty-state {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-muted);
}

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

.empty-state p {
  font-size: 14px;
  margin-bottom: 16px;
}

table tbody tr.today-row {
  background: rgba(37, 99, 235, 0.05);
}

table tbody tr.today-row td:first-child::before {
  content: 'TODAY';
  display: inline-block;
  background: var(--primary-blue);
  color: var(--white);
  font-size: 9px;
  padding: 2px 6px;
  border-radius: 4px;
  margin-right: 8px;
  font-weight: 600;
}

table tbody tr.demo-scheduled-row {
  background: rgba(139, 92, 246, 0.05);
}

.btn-disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.readonly-input {
  background: var(--light-bg);
  color: var(--text-muted);
}

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

.detail-section {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--border-color);
}

.detail-section-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--primary-blue);
  margin-bottom: 12px;
}

textarea {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  font-size: 14px;
  font-family: inherit;
  resize: vertical;
  transition: border-color 0.3s, box-shadow 0.3s;
}

textarea:focus {
  outline: none;
  border-color: var(--primary-blue);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

table tbody tr {
  cursor: pointer;
}

.calendar-nav {
  display: flex;
  align-items: center;
  gap: 15px;
}

.calendar-nav h2 {
  min-width: 180px;
  text-align: center;
}

.btn-icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  background: var(--white);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s;
}

.btn-icon:hover {
  background: var(--light-bg);
  border-color: var(--primary-blue);
  color: var(--primary-blue);
}

.calendar-legend {
  display: flex;
  gap: 20px;
  margin-bottom: 15px;
  flex-wrap: wrap;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--text-muted);
}

.legend-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.legend-dot.scheduled {
  background: var(--primary-blue);
}

.legend-dot.completed {
  background: var(--success-green);
}

.legend-dot.cancelled {
  background: var(--error-red);
}

.legend-dot.noshow {
  background: var(--warning-yellow);
}

.calendar-event.status-scheduled {
  background: var(--primary-blue);
  color: white;
}

.calendar-event.status-completed {
  background: var(--success-green);
  color: white;
}

.calendar-event.status-cancelled {
  background: var(--error-red);
  color: white;
}

.calendar-event.status-noshow {
  background: var(--warning-yellow);
  color: white;
}

.status-badge.no-show {
  background: #fef3c7;
  color: #d97706;
}

.chance-badge {
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 500;
}

.chance-badge.high {
  background: #dcfce7;
  color: #15803d;
}

.chance-badge.medium {
  background: #fef3c7;
  color: #d97706;
}

.chance-badge.low {
  background: #fee2e2;
  color: #dc2626;
}

.converted-row {
  background: #f0fdf4 !important;
}

.converted-row:hover {
  background: #dcfce7 !important;
}

.action-btn.feedback {
  color: #8b5cf6;
}

.action-btn.feedback:hover {
  background: #ede9fe;
}

.action-btn.message {
  color: #0891b2;
}

.action-btn.message:hover {
  background: #e0f7fa;
}

.detail-section h4 {
  font-size: 14px;
  font-weight: 600;
  color: var(--dark-text);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.detail-section h4 i {
  color: var(--primary-blue);
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.detail-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.detail-item label {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 500;
}

.detail-item span {
  font-size: 14px;
  color: var(--dark-text);
}

.form-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 15px;
}

.comm-input-group {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}

.comm-input-group input {
  flex: 1;
  padding: 10px 14px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  font-size: 14px;
}

.comm-input-group input:focus {
  outline: none;
  border-color: var(--primary-blue);
}

.comm-notes-list {
  max-height: 200px;
  overflow-y: auto;
}

.comm-note {
  padding: 10px;
  background: var(--light-bg);
  border-radius: 8px;
  margin-bottom: 8px;
}

.comm-note .comm-date {
  font-size: 11px;
  color: var(--text-muted);
  display: block;
  margin-bottom: 4px;
}

.comm-note p {
  font-size: 13px;
  color: var(--dark-text);
  margin: 0;
}

.btn-success {
  background: var(--success-green);
  color: white;
  border: none;
  padding: 10px 16px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.3s;
}

.btn-success:hover {
  background: #15803d;
}

.btn-warning {
  background: var(--warning-yellow);
  color: white;
  border: none;
  padding: 10px 16px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.3s;
}

.btn-warning:hover {
  background: #d97706;
}

.btn-danger {
  background: var(--error-red);
  color: white;
  border: none;
  padding: 10px 16px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.3s;
}

.btn-danger:hover {
  background: #b91c1c;
}

#demoActions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.empty-state {
  text-align: center;
  padding: 40px;
  color: var(--text-muted);
}

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

.empty-state p {
  margin: 0;
}

.action-btn.start-trial {
  color: #8b5cf6;
}

.action-btn.start-trial:hover {
  background: #ede9fe;
}

.action-btn.convert {
  color: #16a34a;
}

.action-btn.convert:hover {
  background: #dcfce7;
}

.action-btn.agreement {
  color: #0891b2;
}

.action-btn.agreement:hover {
  background: #e0f7fa;
}

.action-btn.notes {
  color: #f59e0b;
}

.action-btn.notes:hover {
  background: #fef3c7;
}

.action-btn.lost {
  color: #dc2626;
}

.action-btn.lost:hover {
  background: #fee2e2;
}

.status-badge.pipeline {
  background: #dbeafe;
  color: #1e40af;
}

.status-badge.trial {
  background: #fef3c7;
  color: #92400e;
}

.status-badge.converted {
  background: #dcfce7;
  color: #166534;
}

.status-badge.lost {
  background: #fee2e2;
  color: #991b1b;
}

.status-badge.expiring {
  background: #fed7aa;
  color: #c2410c;
}

.status-badge.expired {
  background: #fecaca;
  color: #b91c1c;
}

.status-badge.active {
  background: #d1fae5;
  color: #047857;
}

.status-badge.completed {
  background: #dbeafe;
  color: #1d4ed8;
}

.usage-bar {
  width: 80px;
  height: 8px;
  background: #e2e8f0;
  border-radius: 4px;
  overflow: hidden;
  display: inline-block;
  vertical-align: middle;
}

.usage-fill {
  height: 100%;
  background: linear-gradient(90deg, #16a34a, #22c55e);
  border-radius: 4px;
  transition: width 0.3s ease;
}

.usage-text {
  margin-left: 8px;
  font-size: 12px;
  color: var(--text-muted);
}

.expiring-row {
  background: #fff7ed !important;
}

.expiring-row:hover {
  background: #fed7aa !important;
}

.checkbox-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

.checkbox-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  cursor: pointer;
}

.checkbox-item input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--primary-blue);
}

.modules-submodules-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  max-height: 400px;
  overflow-y: auto;
  padding: 4px;
}

.module-block {
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 10px 12px;
  background: #f8fafc;
  transition: all 0.2s;
}

.module-block.active {
  border-color: #2563eb;
  background: #eff6ff;
}

.module-checkbox {
  font-weight: 600;
  font-size: 13px;
  margin-bottom: 6px;
}

.sub-checkboxes {
  padding-left: 24px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  border-top: 1px solid #e2e8f0;
  padding-top: 6px;
  margin-top: 4px;
}

.sub-checkbox {
  font-size: 12px;
  color: #64748b;
}

.sub-checkbox span {
  color: #475569;
}

.agreements-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.agreement-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: #f8fafc;
  border-radius: 8px;
}

.agreement-item i {
  font-size: 24px;
  color: #dc2626;
}

.agreement-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.agreement-name {
  font-weight: 500;
  color: var(--dark-text);
}

.agreement-type {
  font-size: 12px;
  color: var(--text-muted);
}

.btn-icon {
  background: none;
  border: none;
  padding: 6px;
  cursor: pointer;
  color: var(--text-muted);
  border-radius: 4px;
  transition: all 0.2s;
}

.btn-icon:hover {
  background: #fee2e2;
  color: #dc2626;
}

.detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.converted-notice,
.lost-notice {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
}

.converted-notice {
  background: #dcfce7;
  color: #166534;
}

.lost-notice {
  background: #fee2e2;
  color: #991b1b;
}

.detail-item.full-width {
  grid-column: span 2;
}

.modal-lg {
  max-width: 700px;
}

.action-buttons {
  display: flex;
  gap: 4px;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.section-header h3 {
  margin: 0;
}

.permissions-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 20px;
}

.permission-category {
  background: #f8fafc;
  padding: 16px;
  border-radius: 8px;
}

.permission-category h5 {
  margin: 0 0 12px 0;
  font-size: 14px;
  font-weight: 600;
  color: var(--primary-blue);
  border-bottom: 1px solid #e2e8f0;
  padding-bottom: 8px;
}

.permission-category .checkbox-item {
  margin-bottom: 8px;
}

.permissions-display {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.permission-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: #dbeafe;
  color: #1e40af;
  border-radius: 20px;
  font-size: 13px;
}

.permission-tag i {
  font-size: 10px;
}

.action-btn.delete {
  color: #dc2626;
}

.action-btn.delete:hover {
  background: #fee2e2;
}

.package-badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
}

.package-badge.free-trial {
  background: #e0e7ff;
  color: #4338ca;
}

.package-badge.bronze {
  background: #fef3c7;
  color: #92400e;
}

.package-badge.silver {
  background: #f1f5f9;
  color: #475569;
}

.package-badge.gold {
  background: #fef3c7;
  color: #b45309;
}

.package-badge.platinum {
  background: #ede9fe;
  color: #6d28d9;
}

.new-badge {
  display: inline-block;
  padding: 2px 6px;
  background: #fef3c7;
  color: #92400e;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 600;
  margin-left: 8px;
}

.module-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.module-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.module-tag-block {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.module-tag {
  display: inline-block;
  padding: 6px 12px;
  background: #e0f2fe;
  color: #0369a1;
  border-radius: 16px;
  font-size: 13px;
  font-weight: 600;
}

.module-sub-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 3px;
  padding-left: 8px;
}

.sub-tag {
  display: inline-block;
  padding: 2px 8px;
  background: #f1f5f9;
  color: #64748b;
  border-radius: 10px;
  font-size: 11px;
}

.agreement-item,
.document-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: #f8fafc;
  border-radius: 8px;
  margin-bottom: 8px;
}

.agreement-item i,
.document-item i {
  color: #dc2626;
  font-size: 20px;
}

.agreement-type,
.document-meta {
  background: #e2e8f0;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
  color: #475569;
  margin-left: auto;
}

.agreement-date {
  color: #64748b;
  font-size: 12px;
}

.document-info {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
}

.document-info div {
  display: flex;
  flex-direction: column;
}

.document-actions {
  display: flex;
  gap: 4px;
}

.upload-section {
  background: #f8fafc;
  padding: 16px;
  border-radius: 8px;
  margin-bottom: 16px;
}

.text-warning {
  color: #f59e0b !important;
  font-weight: 500;
}

.text-danger {
  color: #dc2626 !important;
}

.text-muted {
  color: #94a3b8 !important;
}

.text-center {
  text-align: center;
}

.notes-content {
  background: #fffbeb;
  padding: 12px;
  border-radius: 8px;
  border-left: 3px solid #f59e0b;
}

.notes-content p {
  margin: 0;
  color: #78350f;
}

.btn-success {
  background: #16a34a;
  color: white;
}

.btn-success:hover {
  background: #15803d;
}

.kpi-icon.purple {
  background: rgba(139, 92, 246, 0.1);
  color: #8b5cf6;
}

.btn-sm {
  padding: 6px 14px;
  font-size: 13px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  border-radius: 6px;
  font-weight: 500;
}

.reminders-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

.reminder-card {
  padding: 16px;
  border-radius: 8px;
  transition: transform 0.2s, box-shadow 0.2s;
}

.reminder-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.reminder-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.info-box {
  background: #f0f9ff;
  border: 1px solid #bae6fd;
  padding: 16px;
  border-radius: 8px;
  margin-bottom: 20px;
}

.info-box p {
  margin: 4px 0;
  color: #0369a1;
}

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

.mini-table th,
.mini-table td {
  padding: 8px 12px;
  text-align: left;
  border-bottom: 1px solid #e2e8f0;
}

.mini-table th {
  background: #f8fafc;
  font-weight: 600;
  color: #64748b;
}

.status-badge.expiring {
  background: #fef3c7;
  color: #92400e;
}

.status-badge.expired {
  background: #fee2e2;
  color: #991b1b;
}

.status-badge.trial {
  background: #e0f2fe;
  color: #0369a1;
}

.status-badge.inactive {
  background: #f1f5f9;
  color: #64748b;
}

.module-name-cell {
  display: flex;
  align-items: center;
}

.modules-checkbox-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
}

.module-checkbox {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
}

.module-checkbox:hover {
  border-color: #2563eb;
  background: #f8fafc;
}

.module-checkbox.checked {
  border-color: #2563eb;
  background: #eff6ff;
}

.module-checkbox input {
  width: 18px;
  height: 18px;
  accent-color: #2563eb;
}

.module-checkbox i {
  color: #2563eb;
  width: 20px;
  text-align: center;
}

.package-card {
  position: relative;
  background: white;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 24px;
  text-align: center;
  transition: all 0.3s;
}

.package-card:hover {
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
  transform: translateY(-4px);
}

.package-card.popular {
  border: 2px solid #dc2626;
  box-shadow: 0 4px 20px rgba(220, 38, 38, 0.15);
}

.package-card.hidden-package {
  opacity: 0.7;
  background: #f8fafc;
}

.popular-badge {
  position: absolute;
  top: -13px;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(135deg, #dc2626, #ef4444);
  color: white;
  padding: 5px 20px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  white-space: nowrap;
  box-shadow: 0 2px 8px rgba(220, 38, 38, 0.3);
  z-index: 2;
}

.popular-toggle-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 6px;
}

.popular-toggle-label {
  font-size: 13px;
  color: #64748b;
}

.hidden-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  background: #64748b;
  color: white;
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 11px;
}

.package-name {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 8px;
}

.package-price-main {
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 8px;
}

.package-price-main span {
  font-size: 14px;
  font-weight: 400;
  color: #64748b;
}

.package-employee-info {
  font-size: 13px;
  color: #64748b;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.trial-badge {
  display: inline-block;
  background: #dbeafe;
  color: #2563eb;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
  margin-bottom: 16px;
}

.pricing-tiers {
  margin: 16px 0;
  border-top: 1px solid #f1f5f9;
  padding-top: 12px;
}

.tier-row {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid #f8fafc;
}

.tier-row:last-child {
  border-bottom: none;
}

.tier-price {
  font-size: 20px;
  font-weight: 700;
  color: #0f172a;
}

.tier-range {
  font-size: 11px;
  color: #94a3b8;
  margin-top: 2px;
}

.tier-connect {
  padding: 6px 16px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

.package-support {
  font-size: 13px;
  color: #64748b;
  padding: 8px 0;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.package-actions {
  display: flex;
  gap: 10px;
  margin-top: auto;
}

.package-actions .btn {
  flex: 1;
}

.btn-outline {
  background: transparent;
  border: 1px solid #e2e8f0;
  color: #64748b;
}

.btn-outline:hover {
  background: #f8fafc;
  border-color: #cbd5e1;
}

.comparison-table {
  width: 100%;
}

.comparison-table th {
  padding: 12px 16px;
  background: #f8fafc;
  font-weight: 600;
}

.comparison-table td {
  padding: 10px 16px;
  border-bottom: 1px solid #f1f5f9;
}

.comparison-cell {
  text-align: center;
}

.feature-name-cell {
  display: flex;
  align-items: center;
  font-weight: 500;
  color: #374151;
}

.checkbox-inline {
  display: flex;
  align-items: center;
  gap: 8px;
}
.checkbox-inline input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: #2563eb;
  cursor: pointer;
}
.checkbox-inline label {
  margin: 0;
  font-size: 13px;
  color: #475569;
}

.form-hint {
  font-size: 12px;
  color: #64748b;
  margin-top: 8px;
}

.form-hint i {
  color: #2563eb;
}

.searchable-dropdown {
  position: relative;
}
.searchable-dropdown input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  font-size: 14px;
  background: #fff;
}
.searchable-dropdown input:focus {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37,99,235,0.1);
}
.dropdown-list {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  max-height: 220px;
  overflow-y: auto;
  background: #fff;
  border: 1px solid #d1d5db;
  border-top: none;
  border-radius: 0 0 8px 8px;
  z-index: 100;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}
.dropdown-list .dropdown-item {
  padding: 10px 14px;
  cursor: pointer;
  font-size: 14px;
  border-bottom: 1px solid #f1f5f9;
  transition: background 0.15s;
}
.dropdown-list .dropdown-item:hover {
  background: #f0f4ff;
}
.dropdown-list .dropdown-item.disabled {
  color: #94a3b8;
  cursor: default;
  font-style: italic;
}
.dropdown-list .dropdown-item.disabled:hover {
  background: #fff;
}

.kpi-hint {
  display: block;
  font-size: 11px;
  color: #94a3b8;
  margin-top: 4px;
}
.kpi-hint i {
  margin-right: 3px;
}

.badge-open-ended {
  display: inline-block;
  background: #ecfdf5;
  color: #059669;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 10px;
  border: 1px solid #a7f3d0;
}

.badge-payment-due {
  display: inline-block;
  background: #fee2e2;
  color: #dc2626;
  font-size: 10px;
  font-weight: 600;
  padding: 1px 6px;
  border-radius: 8px;
  margin-left: 6px;
  white-space: nowrap;
}
.badge-payment-due i {
  margin-right: 2px;
}

.badge-notice {
  display: inline-block;
  background: #fef3c7;
  color: #d97706;
  font-size: 10px;
  font-weight: 600;
  padding: 1px 6px;
  border-radius: 8px;
  margin-left: 4px;
  white-space: nowrap;
}
.badge-notice i {
  margin-right: 2px;
}

.logo-upload-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 18px;
  gap: 8px;
}
.logo-preview-wrapper {
  width: 90px;
  height: 90px;
  border-radius: 12px;
  border: 2px dashed #cbd5e1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  overflow: hidden;
  background: #f8fafc;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.logo-preview-wrapper:hover {
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37,99,235,0.1);
}
.logo-preview-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.logo-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  color: #94a3b8;
  font-size: 12px;
}
.logo-placeholder i {
  font-size: 22px;
}
.btn-remove-logo {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: none;
  border: none;
  color: #dc2626;
  font-size: 12px;
  cursor: pointer;
  padding: 2px 8px;
  border-radius: 4px;
  transition: background 0.2s;
}
.btn-remove-logo:hover {
  background: #fef2f2;
}
.client-company-cell {
  display: flex;
  align-items: center;
  gap: 10px;
}
.client-table-logo {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  object-fit: contain;
  border: 1px solid #e2e8f0;
  background: #fff;
  flex-shrink: 0;
}
.client-table-logo-placeholder {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #94a3b8;
  font-size: 14px;
  flex-shrink: 0;
}

.detail-logo-section {
  text-align: center;
  margin-bottom: 12px;
}
.detail-logo-img {
  max-width: 80px;
  max-height: 80px;
  border-radius: 10px;
  border: 1px solid #e2e8f0;
  object-fit: contain;
  background: #fff;
  padding: 4px;
}

.contact-group-card {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 14px 16px;
  margin-bottom: 10px;
  position: relative;
}
.contact-group-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}
.contact-group-label {
  font-size: 13px;
  font-weight: 600;
  color: #2563eb;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.btn-icon-remove {
  background: none;
  border: none;
  color: #dc2626;
  cursor: pointer;
  font-size: 16px;
  padding: 2px 6px;
  border-radius: 4px;
  transition: background 0.2s;
}
.btn-icon-remove:hover {
  background: #fef2f2;
}
.contact-detail-card {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 12px 16px;
  margin-bottom: 8px;
}
.contact-detail-row {
  font-size: 13px;
  color: #334155;
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.contact-detail-row:last-child {
  margin-bottom: 0;
}
.contact-detail-row i {
  color: #94a3b8;
  width: 14px;
  text-align: center;
  font-size: 12px;
}
.contact-detail-purpose {
  display: inline-block;
  background: #dbeafe;
  color: #1e40af;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 10px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}
.contacts-count-badge {
  display: inline-block;
  background: #dbeafe;
  color: #2563eb;
  font-size: 11px;
  font-weight: 600;
  padding: 1px 6px;
  border-radius: 8px;
  margin-left: 4px;
}

.cp-direction-banner {
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 14px;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.cp-direction-banner i {
  font-size: 16px;
}
.cp-direction-banner.upgrade {
  background: #ecfdf5;
  border: 1px solid #86efac;
  color: #166534;
}
.cp-direction-banner.downgrade {
  background: #fef2f2;
  border: 1px solid #fca5a5;
  color: #991b1b;
}
.cp-direction-banner.same {
  background: #eff6ff;
  border: 1px solid #93c5fd;
  color: #1e40af;
}

.revenue-breakdown-grid {
  display: flex;
  flex-direction: column;
  gap: 0;
}
.revenue-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 16px;
  border-bottom: 1px solid #e2e8f0;
}
.revenue-row:last-child {
  border-bottom: none;
}
.revenue-row.total {
  background: #f0f4ff;
  border-radius: 0 0 8px 8px;
  border-bottom: none;
}
.revenue-row.total .revenue-label,
.revenue-row.total .revenue-value {
  font-weight: 700;
  font-size: 16px;
  color: #1e40af;
}
.revenue-label {
  font-size: 14px;
  color: #475569;
  font-weight: 500;
}
.revenue-label i {
  margin-right: 8px;
  color: #94a3b8;
  width: 16px;
  text-align: center;
}
.revenue-value {
  font-size: 15px;
  font-weight: 600;
  color: #0f172a;
}

.text-success {
  color: #16a34a !important;
}

.text-danger {
  color: #dc2626 !important;
}

.modal-sm {
  max-width: 400px;
}

.modal-lg {
  max-width: 700px;
}

.input-readonly {
  background: #f1f5f9 !important;
  color: #64748b !important;
  cursor: not-allowed;
}

.user-cell {
  display: flex;
  align-items: center;
  gap: 12px;
}

.user-avatar-sm {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, #2563eb, #7c3aed);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 14px;
}

.user-avatar-lg {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: linear-gradient(135deg, #2563eb, #7c3aed);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 28px;
}

.user-profile-header {
  display: flex;
  align-items: center;
  gap: 20px;
  padding-bottom: 20px;
  border-bottom: 1px solid #e2e8f0;
  margin-bottom: 20px;
}

.user-profile-info h2 {
  margin: 0 0 4px 0;
  font-size: 20px;
}

.user-profile-info p {
  color: #64748b;
  margin: 0 0 8px 0;
}

.role-badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
}

.role-badge.admin {
  background: #fef3c7;
  color: #92400e;
}

.role-badge.bd {
  background: #dbeafe;
  color: #1e40af;
}

.role-badge.ops {
  background: #dcfce7;
  color: #166534;
}

.role-badge.finance {
  background: #f3e8ff;
  color: #7c3aed;
}

.role-badge.support {
  background: #e0f2fe;
  color: #0369a1;
}

.role-badge.default {
  background: #f1f5f9;
  color: #475569;
}

.password-input-group {
  display: flex;
  gap: 8px;
  align-items: center;
}

.password-input-group input {
  flex: 1;
}

.btn-icon {
  background: none;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 8px 12px;
  cursor: pointer;
  color: #64748b;
}

.btn-icon:hover {
  background: #f8fafc;
  color: #2563eb;
}

.settings-nav-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px;
  background: white;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  text-decoration: none;
  color: inherit;
  transition: all 0.2s;
  flex: 1;
  max-width: 350px;
}

.settings-nav-card:hover {
  border-color: #2563eb;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.15);
  transform: translateY(-2px);
}

.nav-card-icon {
  width: 50px;
  height: 50px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
}

.nav-card-icon.blue {
  background: #eff6ff;
  color: #2563eb;
}

.nav-card-info h4 {
  margin: 0 0 4px 0;
  font-size: 16px;
  font-weight: 600;
}

.nav-card-info p {
  margin: 0;
  font-size: 13px;
  color: #64748b;
}

.settings-nav-card > .fa-chevron-right {
  margin-left: auto;
  color: #94a3b8;
}

.billing-toggle {
  display: flex;
  background: #f1f5f9;
  border-radius: 8px;
  padding: 3px;
  gap: 2px;
}

.billing-toggle-btn {
  padding: 6px 16px;
  border: none;
  background: transparent;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  color: #64748b;
  cursor: pointer;
  transition: all 0.2s;
}

.billing-toggle-btn.active {
  background: #2563eb;
  color: white;
  box-shadow: 0 1px 3px rgba(37, 99, 235, 0.3);
}

.package-price-sub {
  font-size: 12px;
  color: #64748b;
  margin-bottom: 12px;
}

.package-modules-count {
  font-size: 13px;
  color: #64748b;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.pricing-tiers-title {
  font-size: 11px;
  font-weight: 600;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 6px;
  text-align: center;
}

.sub-modules-list {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 4px;
}

.sub-module-tag {
  background: #f1f5f9;
  color: #64748b;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
}

.sub-module-input-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}

.sub-module-input-row input {
  flex: 1;
  padding: 6px 10px;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  font-size: 13px;
}

.module-parent-row td {
  background: #f8fafc;
  font-weight: 500;
}

.sub-module-row td {
  font-size: 13px;
}

.tier-input-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}

.tier-input-row input {
  padding: 6px 10px;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  font-size: 13px;
}

.tier-input-row input[type="number"] {
  width: 110px;
}

.tier-label {
  font-size: 12px;
  color: #94a3b8;
  min-width: 25px;
}

.tier-header-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
  font-size: 11px;
  font-weight: 600;
  color: #94a3b8;
  text-transform: uppercase;
}

.tier-header-row span {
  flex: 1;
}

.tier-header-row span:first-child {
  width: 100px;
  flex: none;
}

.tier-header-row span:nth-child(2) {
  width: 25px;
  flex: none;
}

.tier-header-row span:last-child {
  width: 32px;
  flex: none;
}

.module-checkbox-item {
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 10px 12px;
  margin-bottom: 8px;
  transition: all 0.2s;
}

.module-checkbox-item.checked {
  border-color: #2563eb;
  background: #eff6ff;
}

.module-checkbox-label {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-weight: 500;
}

.module-checkbox-label input[type="checkbox"] {
  width: 16px;
  height: 16px;
}

.module-sub-checkboxes {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid #e2e8f0;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.sub-module-checkbox {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  color: #475569;
  background: white;
  padding: 3px 8px;
  border-radius: 4px;
  border: 1px solid #e2e8f0;
  cursor: pointer;
}

.sub-module-checkbox input[type="checkbox"] {
  width: 13px;
  height: 13px;
}

.package-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 500;
  margin: 1px;
}

.pagination-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0 4px;
  margin-top: 8px;
  border-top: 1px solid #e2e8f0;
}
.pg-info {
  font-size: 13px;
  color: #64748b;
}
.pg-buttons {
  display: flex;
  align-items: center;
  gap: 4px;
}
.pg-btn {
  min-width: 32px;
  height: 32px;
  padding: 0 8px;
  border: 1px solid #e2e8f0;
  background: #fff;
  color: #334155;
  font-size: 13px;
  font-weight: 500;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.pg-btn:hover:not(:disabled):not(.active) {
  background: #f1f5f9;
  border-color: #94a3b8;
}
.pg-btn.active {
  background: #2563eb;
  color: #fff;
  border-color: #2563eb;
}
.pg-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
.pg-btn.pg-nav {
  color: #64748b;
}
.pg-btn.pg-nav i {
  font-size: 11px;
}
.pg-ellipsis {
  font-size: 13px;
  color: #94a3b8;
  padding: 0 4px;
}

/* ============== Ticket Management ============== */
.tk-status { display:inline-block; padding:4px 10px; border-radius:12px; font-size:12px; font-weight:600; }
.tk-status-open { background:#DBEAFE; color:#1D4ED8; }
.tk-status-assigned { background:#E0E7FF; color:#4338CA; }
.tk-status-in-progress { background:#FEF3C7; color:#92400E; }
.tk-status-on-hold { background:#F3F4F6; color:#374151; }
.tk-status-awaiting-client { background:#FCE7F3; color:#9D174D; }
.tk-status-resolved { background:#D1FAE5; color:#065F46; }
.tk-status-closed { background:#E5E7EB; color:#1F2937; }
.tk-status-reopened { background:#FEE2E2; color:#991B1B; }

.tk-priority { display:inline-block; padding:3px 8px; border-radius:6px; font-size:11px; font-weight:700; text-transform:uppercase; letter-spacing:0.4px; }
.tk-priority-low { background:#E0F2FE; color:#075985; }
.tk-priority-medium { background:#FEF3C7; color:#92400E; }
.tk-priority-high { background:#FED7AA; color:#9A3412; }
.tk-priority-critical { background:#FEE2E2; color:#991B1B; border:1px solid #FCA5A5; }

.tk-sla { display:inline-flex; align-items:center; gap:4px; padding:3px 8px; border-radius:6px; font-size:12px; font-weight:600; }
.tk-sla-ok { background:#D1FAE5; color:#065F46; }
.tk-sla-risk { background:#FEF3C7; color:#92400E; }
.tk-sla-breached { background:#FEE2E2; color:#991B1B; }

.tk-kpi-grid { display:grid; grid-template-columns:repeat(auto-fit, minmax(180px, 1fr)); gap:16px; margin-bottom:20px; }
.tk-kpi { background:#fff; border-radius:12px; padding:18px; box-shadow:0 1px 3px rgba(0,0,0,0.05); border-left:4px solid #2563EB; }
.tk-kpi.warning { border-left-color:#F59E0B; }
.tk-kpi.danger { border-left-color:#DC2626; }
.tk-kpi.success { border-left-color:#16A34A; }
.tk-kpi-label { font-size:12px; color:#64748B; text-transform:uppercase; letter-spacing:0.5px; margin-bottom:6px; }
.tk-kpi-value { font-size:28px; font-weight:700; color:#0F172A; }
.tk-kpi-sub { font-size:12px; color:#64748B; margin-top:4px; }

.tk-row-breached { background:#FEF2F2 !important; }
.tk-row-risk { background:#FFFBEB !important; }

.tk-detail-section { padding:16px 0; border-bottom:1px solid #E2E8F0; }
.tk-detail-section h4 { margin:0 0 12px 0; font-size:14px; color:#0F172A; }
.tk-comment { background:#F8FAFC; border-radius:8px; padding:12px; margin-bottom:8px; border-left:3px solid #2563EB; }
.tk-comment.internal { border-left-color:#F59E0B; background:#FFFBEB; }
.tk-comment-meta { font-size:11px; color:#64748B; margin-bottom:6px; display:flex; justify-content:space-between; }
.tk-comment-vis { padding:1px 6px; border-radius:4px; font-weight:600; }
.tk-comment-vis.internal { background:#F59E0B; color:#fff; }
.tk-comment-vis.client { background:#16A34A; color:#fff; }
.tk-history-item { padding:8px 0; border-bottom:1px dashed #E2E8F0; font-size:13px; }
.tk-history-item:last-child { border-bottom:none; }
.tk-history-meta { font-size:11px; color:#64748B; }

.tk-link-pill { display:inline-block; background:#EFF6FF; color:#1D4ED8; padding:2px 8px; border-radius:10px; font-size:11px; font-weight:600; cursor:pointer; }
.tk-link-pill:hover { background:#DBEAFE; }

.tk-comment-input { display:flex; flex-direction:column; gap:8px; margin-top:8px; }
.tk-comment-input textarea { width:100%; padding:8px; border:1px solid #CBD5E1; border-radius:6px; font-family:inherit; resize:vertical; min-height:60px; }
.tk-comment-input-row { display:flex; gap:8px; align-items:center; justify-content:space-between; }

/* Tickets — extended UI */
.tk-view-tabs { display:flex; gap:6px; margin-bottom:14px; border-bottom:1px solid #E2E8F0; padding-bottom:0; }
.tk-view-tab { background:transparent; border:none; padding:10px 16px; cursor:pointer; font-size:13px; color:#64748B; font-weight:500; border-bottom:2px solid transparent; display:flex; align-items:center; gap:6px; }
.tk-view-tab:hover { color:#0F172A; }
.tk-view-tab.active { color:#2563EB; border-bottom-color:#2563EB; font-weight:600; }

.tk-attach-drop { border:2px dashed #CBD5E1; border-radius:8px; padding:18px; text-align:center; cursor:pointer; color:#64748B; display:flex; flex-direction:column; align-items:center; gap:6px; transition:all 0.15s ease; }
.tk-attach-drop:hover, .tk-attach-drop.drag { border-color:#2563EB; background:#EFF6FF; color:#2563EB; }
.tk-attach-drop i { font-size:24px; }
.tk-attach-list { display:flex; flex-direction:column; gap:6px; margin-top:8px; }
.tk-attach-item { display:flex; align-items:center; gap:8px; padding:6px 10px; background:#F8FAFC; border-radius:6px; font-size:13px; }
.tk-attach-remove { margin-left:auto; background:transparent; border:none; color:#DC2626; cursor:pointer; }

.tk-esc-item { display:flex; justify-content:space-between; gap:12px; padding:10px; border-bottom:1px solid #E2E8F0; cursor:pointer; }
.tk-esc-item:hover { background:#F8FAFC; }
.tk-esc-item:last-child { border-bottom:none; }

.tk-tier { display:inline-block; padding:2px 8px; border-radius:10px; font-size:11px; font-weight:600; margin-left:6px; }
.tk-tier-enterprise { background:#2563EB; color:#fff; }
.tk-tier-premium { background:#7C3AED; color:#fff; }
.tk-tier-standard { background:#E2E8F0; color:#475569; }

.tk-paused-badge { display:inline-block; padding:2px 8px; border-radius:10px; font-size:11px; font-weight:600; background:#F59E0B; color:#fff; margin-left:4px; }
.tk-readonly-badge { display:inline-block; padding:2px 8px; border-radius:10px; font-size:11px; font-weight:600; background:#64748B; color:#fff; margin-left:8px; }


.tk-note { background:#EFF6FF; border-left:3px solid #2563EB; padding:8px 12px; margin-bottom:10px; font-size:13px; color:#0F172A; border-radius:4px; }

.tk-filter-bar {
  display:flex; flex-wrap:wrap; gap:14px; align-items:flex-end;
  background:#fff; padding:14px 18px; border-radius:12px;
  box-shadow:0 2px 8px rgba(0,0,0,0.05);
  margin-bottom:20px;
  position:sticky; top:var(--header-height, 64px); z-index:30;
}
.tk-filter-group { display:flex; flex-direction:column; gap:6px; }
.tk-filter-group label { font-size:11px; font-weight:600; color:#64748B; text-transform:uppercase; letter-spacing:0.4px; }
.tk-filter-group select, .tk-filter-group input[type="date"] {
  padding:8px 12px; border:1px solid #E2E8F0; border-radius:8px; font-size:13px; min-width:140px; background:#fff;
}
.tk-filter-meta { font-size:12px; color:#64748B; white-space:nowrap; }

.tk-ms { position:relative; }
.tk-ms-toggle {
  padding:8px 28px 8px 12px; border:1px solid #E2E8F0; border-radius:8px; background:#fff;
  font-size:13px; min-width:170px; text-align:left; cursor:pointer; color:#0F172A;
  position:relative;
}
.tk-ms-toggle::after {
  content:'\f078'; font-family:'Font Awesome 6 Free'; font-weight:900;
  position:absolute; right:10px; top:50%; transform:translateY(-50%); font-size:10px; color:#64748B;
}
.tk-ms-toggle.active { border-color:#2563EB; }
.tk-ms-panel {
  position:absolute; top:calc(100% + 4px); left:0; min-width:200px; max-height:260px; overflow-y:auto;
  background:#fff; border:1px solid #E2E8F0; border-radius:8px; box-shadow:0 8px 24px rgba(15,23,42,0.12);
  padding:6px; z-index:50; display:none;
}
.tk-ms.open .tk-ms-panel { display:block; }
.tk-ms-panel label {
  display:flex; align-items:center; gap:8px; padding:6px 10px; border-radius:6px;
  font-size:13px; color:#0F172A; cursor:pointer;
}
.tk-ms-panel label:hover { background:#F1F5F9; }
.tk-ms-panel input[type="checkbox"] { margin:0; }

.tk-section-title { display:flex; align-items:baseline; gap:12px; margin:8px 0 12px; }
.tk-section-title h2 { font-size:16px; font-weight:600; color:#0F172A; }
.tk-section-title h2 i { color:#2563EB; margin-right:6px; }
.tk-section-title .text-muted { font-size:12px; }

.tk-chart-grid-3 { display:grid; grid-template-columns:repeat(3, minmax(0, 1fr)); gap:16px; }
.tk-chart-grid-4 { display:grid; grid-template-columns:repeat(4, minmax(0, 1fr)); gap:16px; }
.tk-chart-grid-tier-heat { display:grid; grid-template-columns:1fr 2fr; gap:16px; }
@media (max-width: 1280px) {
  .tk-chart-grid-4 { grid-template-columns:repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 1024px) {
  .tk-chart-grid-3, .tk-chart-grid-4, .tk-chart-grid-tier-heat { grid-template-columns:1fr; }
}

.tk-canvas-wrap { position:relative; height:240px; width:100%; }
.tk-canvas-wrap > canvas { max-width:100% !important; max-height:100% !important; }
.tk-canvas-wrap-scroll { overflow:auto; -webkit-overflow-scrolling:touch; }

.tk-chart-caption { margin-top:8px; font-size:12px; color:#64748B; }

.tk-heatmap-scroll { overflow-x:auto; -webkit-overflow-scrolling:touch; }
.tk-heatmap { width:100%; border-collapse:separate; border-spacing:4px; }
.tk-heatmap th { font-size:11px; font-weight:600; color:#64748B; text-align:center; padding:4px 6px; white-space:nowrap; }
.tk-heatmap td.tk-heat-rowlabel { font-size:12px; font-weight:600; color:#0F172A; text-align:left; white-space:nowrap; padding:4px 8px; background:#F8FAFC; border-radius:4px; }
.tk-heat-cell { width:48px; height:34px; text-align:center; vertical-align:middle; font-size:12px; font-weight:600; color:#0F172A; border-radius:4px; cursor:pointer; transition:transform 0.1s; }
.tk-heat-cell:hover { transform:scale(1.08); outline:2px solid #2563EB; }
.tk-heat-0 { background:#F1F5F9; color:#94A3B8; cursor:default; }
.tk-heat-0:hover { transform:none; outline:none; }
.tk-heat-1 { background:#DCFCE7; }
.tk-heat-2 { background:#BBF7D0; }
.tk-heat-3 { background:#FEF3C7; }
.tk-heat-4 { background:#FDE68A; }
.tk-heat-5 { background:#FED7AA; }
.tk-heat-6 { background:#FCA5A5; color:#fff; }
.tk-heat-7 { background:#F87171; color:#fff; }
.tk-heat-8 { background:#DC2626; color:#fff; }
