/* Custom Stylesheet для Tailwind миграции */

/* Material Icons fallback */
@font-face {
  font-family: 'Material Icons';
  font-style: normal;
  font-weight: 400;
  src: url(https://fonts.gstatic.com/s/materialicons/v142/flUhRq6tzZclQEJ-Vdg-IuiaDsNc.woff2) format('woff2');
}

.material-icons {
  font-family: 'Material Icons';
  font-weight: normal;
  font-style: normal;
  font-size: 24px;
  display: inline-block;
  line-height: 1;
  text-transform: none;
  letter-spacing: normal;
  word-wrap: normal;
  white-space: nowrap;
  direction: ltr;
  -webkit-font-feature-settings: 'liga';
  -webkit-font-smoothing: antialiased;
}

/* Компоненты */

/* Таблица стили */
.headtable {
  background-color: #bfdbfe;
  padding: 10px;
  border: 1px solid #d1d5db;
  border-radius: 4px;
  font-size: 14px;
  white-space: nowrap;
}

.bodytable {
  padding: 12px 12px;
  font-size: 14px;
  font-weight: 400;
  color: #111827;
}

/* Статусы заказов - Catalyst style */
.cancel_table {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  background-color: #fef2f2;
  color: #991b1b;
  transition: opacity 200ms;
}

.cancel_table:hover {
  opacity: 0.8;
}

.done_table {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  background-color: #dbeafe;
  color: #1e40af;
  transition: opacity 200ms;
}

.done_table:hover {
  opacity: 0.8;
}

.pay_table {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  background-color: #d1fae5;
  color: #065f46;
  transition: opacity 200ms;
}

.pay_table:hover {
  opacity: 0.8;
}

.wait_table {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  background-color: #fef3c7;
  color: #92400e;
  transition: opacity 200ms;
}

.wait_table:hover {
  opacity: 0.8;
}

.accepted_table {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  background-color: #e0e7ff;
  color: #3730a3;
  transition: opacity 200ms;
}

.accepted_table:hover {
  opacity: 0.8;
}

.needmoney_table {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  background-color: #fee2e2;
  color: #991b1b;
  transition: opacity 200ms;
}

.needmoney_table:hover {
  opacity: 0.8;
}

/* Статусы автомобилей */
.wait_car {
  background-color: #9ca3af;
  color: #374151;
  font-weight: bold;
  cursor: pointer;
  border: 1px solid #d1d5db;
  padding: 8px;
  border-radius: 4px;
}

.cancel_car {
  background-color: #f87171;
  color: #374151;
  font-weight: bold;
  cursor: pointer;
  border: 1px solid #d1d5db;
  padding: 8px;
  border-radius: 4px;
}

.work_car {
  background-color: #4ade80;
  color: #374151;
  font-weight: bold;
  cursor: pointer;
  border: 1px solid #d1d5db;
  padding: 8px;
  border-radius: 4px;
}

.sale_car {
  background-color: #d8b4fe;
  color: #374151;
  font-weight: bold;
  cursor: pointer;
  border: 1px solid #d1d5db;
  padding: 8px;
  border-radius: 4px;
}

/* Flex контейнер */
.flex_box {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  gap: 16px;
}

/* Таблица */
.table-money {
  min-width: 240px;
}

/* Старые стили модального окна отключены - используются новые в index.html */
.modal {
  /* Все стили переехали в index.html */
}

.modal.modal-fixed-footer {
  /* Все стили переехали в index.html */
}

/* Скролл */
.dropdown-content {
  max-height: 384px;
}

/* Модальное окно удаления */
#modal_delete {
  padding: 4px;
  max-width: 320px;
  margin-left: auto;
  margin-right: auto;
  margin-top: 40px;
}

/* Заголовок */
.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 20px;
  padding-bottom: 20px;
}

.header .btn-group {
  display: flex;
  gap: 10px;
}

/* Контент */
.content {
  display: flex;
  padding: 10px;
  gap: 20px;
}

.left-table {
  width: 30%;
  border: 1px solid #d1d5db;
  border-radius: 8px;
}

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

.left-table th,
.left-table td {
  padding: 10px;
  border-bottom: 1px solid #d1d5db;
  text-align: left;
}

.left-table tr.highlight-row {
  background-color: #fef08a;
}

.right-details {
  width: 70%;
}

.right-details h5 {
  margin-top: 0;
}

.details-section {
  margin-bottom: 20px;
}

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

.details-section th,
.details-section td {
  padding: 8px;
  border-bottom: 1px solid #d1d5db;
  text-align: left;
}

.details-section .no-border td {
  border-bottom: 0;
}

.details-section td.result {
  text-align: right;
}

.details-section td.ndfl {
  color: #16a34a;
  font-weight: bold;
}

/* Выпадающий список */
select {
  background-color: rgba(255, 255, 255, 0.9);
  width: 100%;
  padding: 6px;
  border: 1px solid #e5e7eb;
  border-radius: 4px;
  height: 36px;
}

/* Wrapper */
.wrapper {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.wrapper .content {
  flex: 1;
}

/* Кнопка вверх */
#scrollToTop {
  position: fixed;
  bottom: 20px;
  right: 20px;
  transition: opacity 200ms;
  display: none;
}

/* Отключенная ссылка */
.disabled-link {
  pointer-events: none;
  color: #9ca3af;
}

/* Фиксированная навигация */
.fixed-nav {
  position: fixed;
  top: 208px;
  left: 10px;
  width: 256px;
  max-height: calc(100vh - 20px);
  overflow-y: auto;
  padding: 10px;
  background-color: #f9fafb;
  border: 1px solid #d1d5db;
  border-radius: 4px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  z-index: 10;
  transition: all 300ms;
}

.nav-faq a {
  display: block;
  margin: 10px 0;
  text-decoration: none;
  color: #1f2937;
  font-size: 14px;
  line-height: 24px;
  word-break: break-word;
}

.nav-faq a:hover {
  text-decoration: underline;
}

.nav-faq span {
  display: block;
  font-weight: bold;
  margin-bottom: 10px;
}

.navp {
  font-size: 12px;
  padding-left: 16px;
  color: #4b5563;
}

.centered-text {
  text-align: center;
  font-size: 18px;
  font-weight: bold;
  color: #1f2937;
}

/* Утилиты */
.margin-right15 {
  margin-right: 16px;
}

.margin-left-10 {
  margin-left: -10px;
}

.margin-left15 {
  margin-left: 16px;
}

.selectmin {
  position: relative;
  max-width: 144px;
  padding-left: 10px;
}

.datepicker-delivery {
  font-size: 12px;
  color: #9ca3af;
  display: block;
}

/* Скролл стили */
::-webkit-scrollbar {
  width: 6px;
  height: 8px;
}

::-webkit-scrollbar-thumb {
  background-color: #6b7280;
  border-radius: 9999px;
}

::-webkit-scrollbar-track {
  background-color: #f3f4f6;
}

/* Плавный скролл */
html {
  scroll-behavior: smooth;
}

/* Мобильные стили */
@media (max-width: 600px) {
  .flex_box {
    flex-direction: column;
    align-items: stretch;
  }

  .button_green {
    width: 100%;
    margin-bottom: 10px;
  }

  .search-field,
  .input-field {
    width: 100%;
  }

  .content-mobile {
    margin-left: -18px;
    min-width: 107%;
    padding: 0 10px;
  }

  .container-mobile {
    margin-left: -20px;
    padding: 0 10px;
    min-width: 110%;
  }
}

@media (max-width: 992px) {
  .modal {
    width: 100%;
    font-size: 14px;
  }

  .select-wrapper {
    font-size: 12px;
  }
}

@media (min-width: 769px) {
  .wrapper {
    display: flex;
  }

  .fixed-nav {
    flex-shrink: 0;
    margin-right: 20px;
  }

  .main-content {
    flex-grow: 1;
  }
}

@media (max-width: 1549px) {
  .fixed-nav {
    display: none;
  }
}

/* Специальные стили для совместимости */
.icon-block {
  padding: 0 16px;
}

#currentOrderStatus {
  margin-right: auto;
  margin-left: auto;
}

.dropdown-content {
  min-width: 144px;
}

/* Переходные стили для Material CSS селекторов */
.select-wrapper {
  position: relative;
}

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

.input-field label {
  display: block;
  font-size: 14px;
  font-weight: 500;
  color: #374151;
  margin-bottom: 4px;
}

.input-field input,
.input-field textarea {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  outline: none;
}

.input-field input:focus,
.input-field textarea:focus {
  outline: none;
  ring: 2px;
  ring-color: #3b82f6;
  border-color: #3b82f6;
}

/* Для совместимости с Material JS селекторами */
.waves-effect {
  cursor: pointer;
  transition: all 200ms;
}

.waves-effect:hover {
  opacity: 0.8;
}

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

.active {
  background-color: #9ca3af;
}


/* ========================================
   КРИТИЧЕСКИЕ ИСПРАВЛЕНИЯ ДЛЯ СОВМЕСТИМОСТИ
   ======================================== */

/* Кнопки для совместимости с Material CSS */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 16px;
  border-radius: 6px;
  font-weight: 500;
  font-size: 14px;
  text-align: center;
  cursor: pointer;
  transition: opacity 200ms;
  border: none;
  text-decoration: none;
  line-height: 1.5;
  vertical-align: middle;
}

.btn:hover {
  opacity: 0.9;
  text-decoration: none;
}

.btn:active {
  opacity: 0.8;
}

.btn.green {
  background-color: #10b981;
  color: white;
}

.btn.blue {
  background-color: #3b82f6;
  color: white;
}

.btn.red {
  background-color: #ef4444;
  color: white;
}

/* Modal trigger */
.modal-trigger {
  cursor: pointer;
}



.modal-overlay {
  display: none !important;
}

.modal-overlay.show {
  display: none !important;
}


.modal-footer {
  border-top: 1px solid #e5e7eb;
  padding: 20px 32px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  background-color: #f9fafb;
  border-bottom-left-radius: 12px;
  border-bottom-right-radius: 12px;
  position: relative;
}


/* Dropdown */
.dropdown-content {
  display: none;
  position: absolute;
  right: 0;
  margin-top: 8px;
  min-width: 200px;
  background-color: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  z-index: 1001;
  overflow: hidden;
}

.dropdown-content.show {
  display: block;
  animation: dropdownFadeIn 150ms ease-out;
}

@keyframes dropdownFadeIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.dropdown-content button {
  display: block;
  width: 100%;
  text-align: left;
  padding: 12px 16px;
  color: #374151;
  background: none;
  border: none;
  cursor: pointer;
  transition: background-color 150ms;
  font-size: 14px;
}

.dropdown-content button:hover {
  background-color: #f3f4f6;
}

.dropdown-content button:first-child {
  border-top-left-radius: 8px;
  border-top-right-radius: 8px;
}

.dropdown-content button:last-child {
  border-bottom-left-radius: 8px;
  border-bottom-right-radius: 8px;
}

.dropdown-trigger {
  position: relative;
}

/* Pagination */
.pagination {
  display: flex;
  list-style: none;
  padding: 0;
  margin: 0;
  gap: 4px;
}

.pagination li {
  display: inline-block;
}

.pagination li a {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  height: 32px;
  padding: 0 8px;
  border-radius: 4px;
  text-decoration: none;
  color: #374151;
  background-color: #fff;
  border: 1px solid #e5e7eb;
  font-weight: 400;
  font-size: 13px;
  transition: all 150ms;
}

.pagination li a:hover {
  background-color: #f3f4f6;
}

.pagination li.active a {
  background-color: #3b82f6;
  color: #fff;
  border-color: #3b82f6;
}

.pagination li.disabled a {
  color: #d1d5db;
  cursor: not-allowed;
  pointer-events: none;
}

/* Row */
.row {
  margin-left: auto;
  margin-right: auto;
  margin-bottom: 20px;
}

.row:after {
  content: "";
  display: table;
  clear: both;
}

/* Col */
.col {
  float: left;
  box-sizing: border-box;
  padding: 0 0.75rem;
}

.col.s6 {
  width: 50%;
}

.col.s12 {
  width: 100%;
}

/* Material Icons left */
.material-icons.left {
  margin-right: 8px;
  vertical-align: middle;
}

.material-icons.right {
  margin-left: 8px;
  vertical-align: middle;
}

/* Prefix icon */
.prefix {
  position: absolute;
  width: 3rem;
  font-size: 2rem;
  transition: color 0.2s;
  top: 0.5rem;
}

.prefix~input,
.prefix~textarea {
  margin-left: 3rem;
  width: calc(100% - 3rem);
}

/* Table - Catalyst style */
table {
  border-collapse: separate;
  border-spacing: 0;
}

table tbody tr {
  transition: background-color 150ms;
}

table tbody tr:hover {
  background-color: #f9fafb;
}

/* Статусы в таблице */
table td:first-child {
  padding-left: 24px;
}

table th:first-child {
  padding-left: 24px;
}

/* Button group */
.button_green {
  display: flex;
  gap: 10px;
}

/* Head table */
.head-table {
  font-size: 24px;
  font-weight: 500;
  margin-bottom: 20px;
}

/* Blue text */
.blue-text {
  color: #2196f3;
}


/* ========================================
   СОВРЕМЕННЫЕ СТИЛИ ДЛЯ ФОРМ
   ======================================== */

/* Input и textarea */
input[type="text"],
input[type="number"],
input[type="email"],
input[type="date"],
textarea,
select {
  font-size: 14px;
  transition: all 200ms;
}

input[type="text"]:focus,
input[type="number"]:focus,
input[type="email"]:focus,
input[type="date"]:focus,
textarea:focus,
select:focus {
  border-color: #3b82f6;
  ring: 2px;
  ring-color: rgba(59, 130, 246, 0.2);
  outline: none;
}

/* Labels */
label {
  font-size: 14px;
  font-weight: 500;
  color: #374151;
}

/* Readonly inputs */
input[readonly],
textarea[readonly] {
  background-color: #f3f4f6;
  cursor: not-allowed;
}

/* Grid для форм */
.grid {
  display: grid;
}

.grid-cols-1 {
  grid-template-columns: repeat(1, minmax(0, 1fr));
}

.grid-cols-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.gap-4 {
  gap: 16px;
}

.gap-6 {
  gap: 24px;
}

@media (min-width: 768px) {
  .md\:grid-cols-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Заголовки в модальных окнах */
.modal h5 {
  font-size: 16px;
  font-weight: 600;
  color: #1f2937;
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 2px solid #e5e7eb;
}

/* Улучшенные тени для модальных окон */
.modal {
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25), 0 0 0 1px rgba(0, 0, 0, 0.05);
}

/* Анимация для toast уведомлений */
.toast {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: linear-gradient(135deg, #1f2937 0%, #111827 100%);
  color: white;
  padding: 16px 24px;
  border-radius: 8px;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.3);
  z-index: 9999;
  animation: toastSlideIn 300ms ease-out;
}

@keyframes toastSlideIn {
  from {
    opacity: 0;
    transform: translateX(100px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.toast.fade-out {
  animation: toastFadeOut 300ms ease-out forwards;
}

@keyframes toastFadeOut {
  from {
    opacity: 1;
    transform: translateX(0);
  }

  to {
    opacity: 0;
    transform: translateX(100px);
  }
}