.icon-tenders::before {
  content: "📋";
}

/* Стили для боковой панели (меню) */
.main-menu {
  width: 250px;
  background-color: #2c3e50;
  color: #ecf0f1;
  height: 100vh;
  position: fixed;
  left: 0;
  top: 0;
  overflow-y: auto;
  z-index: 1000;
  box-shadow: 2px 0 5px rgba(0, 0, 0, 0.1);
  display: flex;
  flex-direction: column;
}

.menu-logo {
  padding: 20px;
  text-align: center;
  border-bottom: 1px solid #34495e;
}

.logo-text {
  font-size: 24px;
  font-weight: bold;
  color: #ecf0f1;
  text-decoration: none;
}

.menu-nav {
  flex: 1;
  padding: 10px 0;
}

.menu-nav ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.menu-nav li {
  margin: 0;
  padding: 0;
}

.menu-nav a {
  display: flex;
  align-items: center;
  padding: 12px 20px;
  color: #ecf0f1;
  text-decoration: none;
  transition: all 0.3s ease;
}

.menu-nav a:hover {
  background-color: #34495e;
}

.menu-nav li.active a {
  background-color: #3498db;
  color: white;
  border-left: 4px solid #2980b9;
}

.menu-icon {
  margin-right: 10px;
  width: 20px;
  text-align: center;
}

.menu-footer {
  padding: 15px;
  border-top: 1px solid #34495e;
}

.user-menu {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.user-info-mini {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.user-name {
  font-weight: bold;
  color: #ecf0f1;
}

.role-badge-mini {
  font-size: 12px;
  padding: 2px 8px;
  border-radius: 10px;
  background-color: #7f8c8d;
  color: white;
  margin-top: 5px;
}

.user-actions {
  display: flex;
  justify-content: space-between;
  margin-top: 10px;
}

/* Стили для основного контейнера с учетом боковой панели */
.container {
  margin-left: 250px;
  padding: 20px;
  width: calc(100% - 250px);
  max-width: 100%;
  box-sizing: border-box;
  overflow-x: hidden;
}

/* Глобальные стили для заголовка и кнопок действий */
.header,
div.header,
.page-header,
.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding-bottom: 15px;
  border-bottom: 1px solid #e9ecef;
  width: 100%;
  flex-wrap: wrap;
}

.header h1,
div.header h1,
.page-header h1,
.section-header h1 {
  margin: 0;
  font-size: 24px;
  color: #2c3e50;
}

.header-actions,
.page-actions,
.action-buttons {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

/* Добавляем улучшенные стили для кнопок в header-actions */
.header-actions .btn,
.page-actions .btn,
.action-buttons .btn {
  margin: 0;
  white-space: nowrap;
  transition: all 0.3s ease;
}

.header-actions .btn:hover,
.page-actions .btn:hover,
.action-buttons .btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* Глобальные стили для кнопок */
.btn {
  display: inline-block;
  font-weight: 400;
  text-align: center;
  white-space: nowrap;
  vertical-align: middle;
  user-select: none;
  border: 1px solid transparent;
  padding: 0.375rem 0.75rem;
  font-size: 1rem;
  line-height: 1.5;
  border-radius: 0.25rem;
  transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, box-shadow
    0.15s ease-in-out;
  cursor: pointer;
  text-decoration: none;
}

.btn-sm {
  padding: 0.25rem 0.5rem;
  font-size: 0.875rem;
  line-height: 1.5;
  border-radius: 0.2rem;
}

.btn-primary {
  color: #fff;
  background-color: #007bff;
  border-color: #007bff;
}

.btn-primary:hover {
  background-color: #0069d9;
  border-color: #0062cc;
}

.btn-secondary {
  color: #fff;
  background-color: #6c757d;
  border-color: #6c757d;
}

.btn-secondary:hover {
  background-color: #5a6268;
  border-color: #545b62;
}

.btn-success {
  color: #fff;
  background-color: #28a745;
  border-color: #28a745;
}

.btn-success:hover {
  background-color: #218838;
  border-color: #1e7e34;
}

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

.btn-danger:hover {
  background-color: #c82333;
  border-color: #bd2130;
}

.btn-warning {
  color: #212529;
  background-color: #ffc107;
  border-color: #ffc107;
}

.btn-warning:hover {
  background-color: #e0a800;
  border-color: #d39e00;
}

.btn-info {
  color: #fff;
  background-color: #17a2b8;
  border-color: #17a2b8;
}

.btn-info:hover {
  background-color: #138496;
  border-color: #117a8b;
}

/* Адаптивность для мобильных устройств */
@media (max-width: 768px) {
  .main-menu {
    width: 100%;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
  }

  .main-menu.active {
    transform: translateX(0);
  }

  .container {
    margin-left: 0;
    width: 100%;
    padding: 15px;
  }

  .menu-toggle {
    display: block;
    position: fixed;
    top: 10px;
    left: 10px;
    z-index: 1001;
    background-color: #2c3e50;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 8px 12px;
    cursor: pointer;
  }

  .header,
  div.header,
  .page-header,
  .section-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .header-actions,
  .page-actions,
  .action-buttons {
    margin-top: 15px;
    width: 100%;
    justify-content: flex-start;
    flex-wrap: wrap;
    gap: 8px;
  }
}

/* Стили для иконок меню */
.icon-dashboard::before {
  content: "📊";
}
.icon-clients::before {
  content: "👥";
}
.icon-contracts::before {
  content: "📝";
}
.icon-expenses::before {
  content: "💸";
}
.icon-invoices::before {
  content: "📄";
}
.icon-payments::before {
  content: "💰";
}
.icon-logs::before {
  content: "📋";
}
.icon-users::before {
  content: "👤";
}
.icon-settings::before {
  content: "⚙️";
}
.icon-employees::before {
  content: "👷";
}
.icon-salaries::before {
  content: "💵";
}
.icon-suppliers::before {
  content: "🏭";
}
.icon-supplier-debts::before {
  content: "🔄";
}
.icon-creditors::before {
  content: "🏦";
}
.icon-debts::before {
  content: "📊";
}
.icon-chart::before {
  content: "📊";
}

/* Стили для статистики */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 15px;
  margin-bottom: 20px;
}

.stat-item {
  background-color: white;
  border-radius: 8px;
  padding: 15px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.stat-item:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.stat-icon {
  font-size: 24px;
  margin-bottom: 10px;
  opacity: 0.8;
}

.stat-number {
  font-size: 24px;
  font-weight: bold;
  margin-bottom: 5px;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.stat-label {
  color: #6c757d;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Цветовые варианты для блоков статистики */
.stat-clients {
  border-left: 4px solid #3498db;
  background: linear-gradient(135deg, #ffffff 0%, #f0f8ff 100%);
}

.stat-success {
  border-left: 4px solid #2ecc71;
  background: linear-gradient(135deg, #ffffff 0%, #f0fff0 100%);
}

.stat-warning {
  border-left: 4px solid #f39c12;
  background: linear-gradient(135deg, #ffffff 0%, #fff8e1 100%);
}

.stat-info {
  border-left: 4px solid #9b59b6;
  background: linear-gradient(135deg, #ffffff 0%, #f8f0ff 100%);
}

.stat-money {
  border-left: 4px solid #e74c3c;
  background: linear-gradient(135deg, #ffffff 0%, #fff0f0 100%);
}

/* Адаптивность для мобильных устройств */
@media (max-width: 768px) {
  .stats-grid {
    grid-template-columns: 1fr;
  }
}

/* Стили для таблиц */
.table-container {
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  margin-bottom: 20px;
  width: 100%;
}

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

.table th {
  background-color: #f8f9fa;
  padding: 12px 15px;
  text-align: left;
  font-weight: 600;
  font-size: 14px;
  color: #495057;
  border-bottom: 2px solid #dee2e6;
}

.table td {
  padding: 12px 15px;
  border-bottom: 1px solid #e9ecef;
  vertical-align: top;
}

.table tr:hover {
  background-color: #f8f9fa;
}

/* Стили для текста */
.text-center {
  text-align: center !important;
}

.text-right {
  text-align: right !important;
}

.text-muted {
  color: #6c757d !important;
}

.text-success {
  color: #28a745 !important;
}

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

.text-warning {
  color: #ffc107 !important;
}

.text-info {
  color: #17a2b8 !important;
}

/* Стили для форм */
.form-container {
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  padding: 20px;
  margin-bottom: 20px;
}

.form-row {
  display: flex;
  flex-wrap: wrap;
  margin-right: -10px;
  margin-left: -10px;
}

.form-group {
  margin-bottom: 15px;
  padding-right: 10px;
  padding-left: 10px;
  flex: 1;
}

.form-group label {
  display: block;
  margin-bottom: 5px;
  font-weight: 500;
  color: #495057;
}

.form-control {
  display: block;
  width: 100%;
  padding: 0.375rem 0.75rem;
  font-size: 1rem;
  line-height: 1.5;
  color: #495057;
  background-color: #fff;
  background-clip: padding-box;
  border: 1px solid #ced4da;
  border-radius: 0.25rem;
  transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.form-control:focus {
  color: #495057;
  background-color: #fff;
  border-color: #80bdff;
  outline: 0;
  box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 20px;
}

/* Адаптивность для форм */
@media (max-width: 768px) {
  .form-row {
    flex-direction: column;
  }

  .form-group {
    width: 100%;
  }
}

/* Стили для уведомлений */
.alert {
  position: relative;
  padding: 0.75rem 1.25rem;
  margin-bottom: 1rem;
  border: 1px solid transparent;
  border-radius: 0.25rem;
}

.alert-success {
  color: #155724;
  background-color: #d4edda;
  border-color: #c3e6cb;
}

.alert-danger,
.alert-error {
  color: #721c24;
  background-color: #f8d7da;
  border-color: #f5c6cb;
}

.alert-warning {
  color: #856404;
  background-color: #fff3cd;
  border-color: #ffeeba;
}

.alert-info {
  color: #0c5460;
  background-color: #d1ecf1;
  border-color: #bee5eb;
}

/* Стили для модальных окон */
.modal {
  display: none;
  position: fixed;
  z-index: 1050;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.4);
}

.modal-content {
  position: relative;
  background-color: #fefefe;
  margin: 10% auto;
  padding: 20px;
  border: 1px solid #888;
  width: 80%;
  max-width: 600px;
  border-radius: 8px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 15px;
  border-bottom: 1px solid #e9ecef;
  margin-bottom: 15px;
}

.modal-title {
  margin: 0;
  font-size: 20px;
  color: #2c3e50;
}

.modal-close {
  color: #aaa;
  float: right;
  font-size: 28px;
  font-weight: bold;
  cursor: pointer;
}

.modal-close:hover,
.modal-close:focus {
  color: black;
  text-decoration: none;
  cursor: pointer;
}

.modal-body {
  padding: 10px 0;
}

.modal-footer {
  padding-top: 15px;
  border-top: 1px solid #e9ecef;
  margin-top: 15px;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

/* Стили для бейджей */
.badge {
  display: inline-block;
  padding: 0.25em 0.4em;
  font-size: 75%;
  font-weight: 700;
  line-height: 1;
  text-align: center;
  white-space: nowrap;
  vertical-align: baseline;
  border-radius: 0.25rem;
}

.badge-primary {
  color: #fff;
  background-color: #007bff;
}

.badge-secondary {
  color: #fff;
  background-color: #6c757d;
}

.badge-success {
  color: #fff;
  background-color: #28a745;
}

.badge-danger {
  color: #fff;
  background-color: #dc3545;
}

.badge-warning {
  color: #212529;
  background-color: #ffc107;
}

.badge-info {
  color: #fff;
  background-color: #17a2b8;
}

/* Стили для ролей */
.role-admin {
  background-color: #dc3545;
}

.role-manager {
  background-color: #007bff;
}

.role-accountant {
  background-color: #28a745;
}

.role-user {
  background-color: #6c757d;
}

/* Стили для клиентской формы */
.client-form {
  background-color: rgba(0, 0, 0, 0.5);
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1000;
  display: flex;
  justify-content: center;
  align-items: center;
}

.client-form .form-container {
  width: 100%;
  max-width: 800px;
  max-height: 90vh;
  overflow-y: auto;
}

/* Стили для таблицы клиентов */
.clients-table {
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  margin-bottom: 20px;
  width: 100%;
}

.clients-table .table-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 20px;
  background-color: #f8f9fa;
  border-bottom: 1px solid #dee2e6;
}

.clients-table .table-header h2 {
  margin: 0;
  font-size: 18px;
  color: #495057;
}

.clients-table .table-filters {
  display: flex;
  gap: 10px;
}

.clients-table .table-filters input,
.clients-table .table-filters select {
  padding: 8px 12px;
  border: 1px solid #ced4da;
  border-radius: 4px;
  font-size: 14px;
}

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

.clients-table th {
  background-color: #f8f9fa;
  padding: 12px 15px;
  text-align: left;
  font-weight: 600;
  font-size: 14px;
  color: #495057;
  border-bottom: 2px solid #dee2e6;
}

.clients-table td {
  padding: 12px 15px;
  border-bottom: 1px solid #e9ecef;
}

.clients-table tr:hover {
  background-color: #f8f9fa;
}

.clients-table .action-buttons {
  display: flex;
  gap: 5px;
}

/* Стили для пагинации */
.pagination {
  display: flex;
  justify-content: center;
  margin-top: 20px;
  margin-bottom: 20px;
}

.pagination-list {
  display: flex;
  list-style: none;
  padding: 0;
  margin: 0;
}

.pagination-item {
  margin: 0 5px;
}

.pagination-link {
  display: block;
  padding: 8px 12px;
  border: 1px solid #dee2e6;
  border-radius: 4px;
  color: #007bff;
  text-decoration: none;
  transition: all 0.3s ease;
}

.pagination-link:hover {
  background-color: #e9ecef;
}

.pagination-link.active {
  background-color: #007bff;
  color: white;
  border-color: #007bff;
}

.pagination-link.disabled {
  color: #6c757d;
  pointer-events: none;
  cursor: default;
}

/* Стили для карточек */
.card {
  background-color: white;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  margin-bottom: 20px;
  overflow: hidden;
}

.card-header {
  padding: 15px 20px;
  background-color: #f8f9fa;
  border-bottom: 1px solid #dee2e6;
}

.card-title {
  margin: 0;
  font-size: 18px;
  color: #495057;
}

.card-body {
  padding: 20px;
}

.card-footer {
  padding: 15px 20px;
  background-color: #f8f9fa;
  border-top: 1px solid #dee2e6;
}

/* Стили для вкладок */
.tabs {
  margin-bottom: 20px;
}

.tabs-nav {
  display: flex;
  list-style: none;
  padding: 0;
  margin: 0;
  border-bottom: 1px solid #dee2e6;
}

.tabs-nav-item {
  margin-right: 5px;
}

.tabs-nav-link {
  display: block;
  padding: 10px 15px;
  border: 1px solid transparent;
  border-top-left-radius: 4px;
  border-top-right-radius: 4px;
  color: #495057;
  text-decoration: none;
  transition: all 0.3s ease;
}

.tabs-nav-link:hover {
  border-color: #e9ecef #e9ecef #dee2e6;
}

.tabs-nav-link.active {
  color: #495057;
  background-color: #fff;
  border-color: #dee2e6 #dee2e6 #fff;
}

.tabs-content {
  padding: 20px 0;
}

.tabs-panel {
  display: none;
}

.tabs-panel.active {
  display: block;
}

/* Стили для загрузки */
.loading {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100px;
}

.loading-spinner {
  border: 4px solid rgba(0, 0, 0, 0.1);
  border-radius: 50%;
  border-top: 4px solid #007bff;
  width: 30px;
  height: 30px;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* Стили для графиков */
.chart-container {
  background-color: white;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  padding: 20px;
  margin-bottom: 20px;
}

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

.chart-title {
  margin: 0;
  font-size: 18px;
  color: #495057;
}

.chart-filters {
  display: flex;
  gap: 10px;
}

.chart-filters select {
  padding: 8px 12px;
  border: 1px solid #ced4da;
  border-radius: 4px;
  font-size: 14px;
}

.chart-body {
  height: 300px;
}

/* Стили для таблиц */
.clients-table {
  width: 100%;
  overflow-x: auto;
}

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

.clients-table th,
.clients-table td {
  padding: 12px 15px;
  text-align: left;
  border-bottom: 1px solid #e9ecef;
}

.clients-table th {
  background-color: #f8f9fa;
  font-weight: bold;
}

/* Адаптивность для таблиц */
@media (max-width: 768px) {
  .clients-table {
    overflow-x: auto;
  }
}
