:root {
  /* Основная тёмная тема */
  --primary-color: #0a84ff;
  --background-color: #000000;
  --surface-color: #1c1c1e;
  --text-primary: #ffffff;
  --text-secondary: #8e8e93;
  --border-color: #38383a;
  --income-color: #30d158;
  --expense-color: #ff453a;
  --positive-color: #30d158;
  --negative-color: #ff453a;
  --premium-color: #5e5ce6;
}

[data-theme="light"] {
  /* Светлая тема */
  --primary-color: #007aff;
  --background-color: #ffffff;
  --surface-color: #f2f2f7;
  --text-primary: #000000;
  --text-secondary: #8e8e93;
  --border-color: #c6c6c8;
  --income-color: #34c759;
  --expense-color: #ff3b30;
  --positive-color: #34c759;
  --negative-color: #ff3b30;
  --premium-color: #5856d6;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen,
    Ubuntu, Cantarell, sans-serif;
}

body {
  background-color: var(--background-color);
  color: var(--text-primary);
  transition: background-color 0.3s, color 0.3s;
  padding-bottom: 20px;
}

.container {
  max-width: 100%;
  padding: 0 16px;
}

/* Header */
.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  position: sticky;
  top: 0;
  background-color: var(--background-color);
  z-index: 100;
  border-bottom: 1px solid var(--border-color);
}

.back-btn {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background-color: var(--surface-color);
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  color: var(--primary-color);
  font-size: 24px;
  font-weight: bold;
}

.app-title {
  font-size: 18px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}

.app-logo {
  width: 24px;
  height: 24px;
  background: linear-gradient(135deg, #007aff, #5856d6);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 12px;
  font-weight: bold;
}

.header-controls {
  display: flex;
  gap: 8px;
  align-items: center;
}

.header-btn {
  background: none;
  border: none;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background-color: var(--surface-color);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary-color);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.2s;
}

/* Period Selector */
.period-selector {
  background-color: var(--surface-color);
  border-radius: 12px;
  padding: 16px;
  margin: 20px 0;
}

.period-options {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
}

.period-option {
  flex: 1;
  text-align: center;
  padding: 10px 8px;
  border-radius: 8px;
  background-color: var(--background-color);
  border: 1px solid var(--border-color);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  min-height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  word-break: break-word;
  line-height: 1.2;
}

.period-option.active {
  background-color: var(--primary-color);
  color: white;
  border-color: var(--primary-color);
}

/* ИСПРАВЛЕННЫЕ СТИЛИ ДЛЯ ПОЛЕЙ ВЫБОРА ДАТ */
.date-range {
  display: none;
  gap: 12px;
  opacity: 0;
  transform: translateY(-10px);
  transition: all 0.3s ease;
  height: 0;
  overflow: hidden;
}

.date-range.active {
  display: flex;
  opacity: 1;
  transform: translateY(0);
  height: auto;
  margin-top: 12px;
}

.date-input-group {
  flex: 1;
  min-width: 0; /* Важно для предотвращения переполнения */
}

.date-input-group label {
  display: block;
  margin-bottom: 6px;
  font-size: 14px;
  color: var(--text-secondary);
  font-weight: 500;
  white-space: nowrap;
}

.date-input-group input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  background-color: var(--background-color);
  color: var(--text-primary);
  font-size: 14px;
  transition: all 0.3s ease;
  min-width: 0; /* Предотвращает растягивание */
  box-sizing: border-box;
}

.date-input-group input:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 2px rgba(0, 122, 255, 0.2);
  outline: none;
}

/* Reports Section */
.reports-section {
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: 100%;
  margin: 0 auto;
}

.report-card {
  background-color: var(--surface-color);
  border-radius: 12px;
  padding: 14px;
  position: relative;
  width: 100%;
  min-height: auto;
  max-height: none;
}

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

.card-title {
  font-size: 17px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
}

.export-btn {
  background: none;
  border: none;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background-color: var(--background-color);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  cursor: pointer;
  transition: background-color 0.2s;
}

.export-btn.premium {
  background: linear-gradient(135deg, #5856d6, #007aff);
  color: white;
}

/* Вертикальная статистика задач */
.tasks-stats-vertical {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin-bottom: 12px;
}

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

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

.stat-row .stat-label {
  font-size: 15px;
  color: var(--text-primary);
  font-weight: 400;
}

.stat-row .stat-value {
  font-size: 15px;
  font-weight: 600;
}

.stat-row .stat-value.completed {
  color: var(--positive-color);
}

.stat-row .stat-value.pending {
  color: var(--expense-color);
}

/* Tasks Breakdown */
.tasks-breakdown {
  margin-bottom: 12px;
  max-height: 140px;
  overflow-y: auto;
}

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

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

.task-date {
  font-size: 13px;
  color: var(--text-secondary);
}

.task-count {
  font-size: 13px;
  font-weight: 600;
}

/* Analytics Summary */
.analytics-summary {
  margin-bottom: 12px;
}

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

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

.summary-row.total {
  border-top: 2px solid var(--border-color);
  margin-top: 6px;
  padding-top: 8px;
  font-weight: 600;
}

.summary-label {
  font-size: 15px;
  color: var(--text-secondary);
}

.summary-value {
  font-size: 15px;
  font-weight: 600;
}

.summary-value.income {
  color: var(--income-color);
}

.summary-value.expense {
  color: var(--expense-color);
}

/* Period Transactions */
.period-transactions {
  margin-bottom: 12px;
  max-height: 140px;
  overflow-y: auto;
}

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

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

.transaction-info {
  display: flex;
  align-items: center;
  gap: 8px;
}

.transaction-icon {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  background-color: var(--background-color);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
}

.transaction-details {
  flex: 1;
}

.transaction-description {
  font-size: 13px;
  margin-bottom: 2px;
}

.transaction-meta {
  font-size: 11px;
  color: var(--text-secondary);
}

.transaction-amount {
  font-size: 13px;
  font-weight: 600;
}

.transaction-amount.income {
  color: var(--income-color);
}

.transaction-amount.expense {
  color: var(--expense-color);
}

/* Button Containers */
.button-container-right {
  display: flex;
  justify-content: flex-end;
  margin-top: 12px;
}

.signature-controls-right {
  display: flex;
  justify-content: flex-end;
  margin-top: 8px;
}

/* Generate Report Buttons */
.generate-report-btn {
  background-color: var(--primary-color);
  color: white;
  border: none;
  border-radius: 10px;
  padding: 10px 16px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.2s;
  white-space: normal;
  text-align: center;
  line-height: 1.2;
}

.generate-report-btn.premium {
  background: linear-gradient(135deg, #5856d6, #007aff);
}

/* Premium Reports */
.premium-report {
  background: linear-gradient(
    135deg,
    rgba(88, 86, 214, 0.1),
    rgba(0, 122, 255, 0.1)
  );
  border: 1px solid rgba(88, 86, 214, 0.3);
  position: relative;
}

.premium-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  background: linear-gradient(135deg, #5856d6, #007aff);
  color: white;
  padding: 4px 8px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 600;
}

.premium-features {
  margin-bottom: 12px;
}

.feature-item {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
  padding: 6px;
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: 8px;
}

.feature-text {
  font-size: 13px;
  line-height: 1.3;
}

.premium-insight {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 10px;
  margin-bottom: 12px;
}

.insight-header {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 6px;
}

.insight-text {
  font-size: 13px;
  line-height: 1.3;
}

.premium-btn {
  background: linear-gradient(135deg, #5856d6, #007aff);
  color: white;
  border: none;
  border-radius: 10px;
  padding: 10px 16px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  white-space: normal;
  text-align: center;
  line-height: 1.2;
  width: 100%;
}

/* Tax Info */
.tax-info {
  margin-bottom: 12px;
}

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

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

.info-label {
  font-size: 13px;
  color: var(--text-secondary);
}

.info-value {
  font-size: 13px;
  font-weight: 600;
}

/* Signature Section */
.signature-section {
  margin-bottom: 12px;
  padding: 12px;
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: 8px;
}

.signature-preview {
  text-align: center;
  margin-bottom: 10px;
}

.signature-line {
  width: 100%;
  height: 2px;
  background-color: var(--text-primary);
  margin-bottom: 4px;
}

.signature-label {
  font-size: 11px;
  color: var(--text-secondary);
}

.add-signature-btn {
  background: none;
  border: 1px solid var(--primary-color);
  color: var(--primary-color);
  border-radius: 8px;
  padding: 6px 12px;
  font-size: 13px;
  cursor: pointer;
  transition: background-color 0.2s;
  white-space: nowrap;
}

/* Модальные окна - УБИРАЕМ КРЕСТИКИ */
.modal-header .close-btn {
  display: none !important;
}

.modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: var(--background-color);
  border-radius: 0;
  z-index: 2001;
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
  transform: translateY(100%);
}

.modal.active {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.modal-content {
  display: flex;
  flex-direction: column;
  height: 100%;
  width: 100%;
  border-radius: 0;
}

.modal-content.large {
  width: 100%;
  height: 100%;
  max-width: 100%;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px;
  border-bottom: 1px solid var(--border-color);
  flex-shrink: 0;
  min-height: 60px;
}

.modal-body {
  padding: 12px 16px;
  overflow-y: auto;
  flex: 1;
  -webkit-overflow-scrolling: touch;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.modal-footer {
  display: flex;
  gap: 8px;
  padding: 12px 16px;
  border-top: 1px solid var(--border-color);
  flex-shrink: 0;
  flex-wrap: wrap;
}

/* Остальные стили */
.ai-analysis-content {
  min-height: 300px;
}

.ai-loading {
  text-align: center;
  padding: 40px 20px;
}

.loading-spinner {
  width: 40px;
  height: 40px;
  border: 4px solid var(--border-color);
  border-top: 4px solid var(--primary-color);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto 16px;
}

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

.loading-text {
  font-size: 16px;
  color: var(--text-secondary);
}

.ai-results {
  padding: 16px 0;
}

.ai-insight-section {
  margin-bottom: 20px;
  padding: 16px;
  background-color: var(--surface-color);
  border-radius: 8px;
  word-wrap: break-word;
  overflow-wrap: break-word;
  max-width: 100%;
}

.ai-insight-section .insight-header {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 12px;
  color: var(--primary-color);
  word-wrap: break-word;
}

.ai-insight-section .insight-text {
  font-size: 14px;
  line-height: 1.5;
  color: var(--text-primary);
  white-space: pre-line;
  word-wrap: break-word;
  overflow-wrap: break-word;
  max-width: 100%;
}

.ai-error {
  text-align: center;
  padding: 40px 20px;
  color: var(--expense-color);
}

.error-icon {
  font-size: 48px;
  margin-bottom: 16px;
}

.error-text {
  font-size: 16px;
}

.report-preview {
  background: white;
  color: black;
  padding: 12px;
  font-size: 14px;
  border-radius: 8px;
  font-family: "Roboto", -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  line-height: 1.4;
  word-wrap: break-word;
  overflow-wrap: break-word;
  max-width: 100%;
  overflow-x: hidden;
}

.report-header {
  text-align: center;
  margin-bottom: 20px;
  border-bottom: 2px solid #333;
  padding-bottom: 10px;
}

.report-title {
  font-size: 24px;
  font-weight: bold;
  margin-bottom: 8px;
  color: #000;
}

.report-period {
  font-size: 16px;
  color: #666;
}

.report-content {
  line-height: 1.6;
}

.report-section {
  margin-bottom: 20px;
  page-break-inside: avoid;
  word-wrap: break-word;
  max-width: 100%;
}

.report-section-title {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 12px;
  border-bottom: 1px solid #ddd;
  padding-bottom: 4px;
  color: #333;
}

.report-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 12px;
  font-size: 12px;
  word-wrap: break-word;
  table-layout: fixed;
}

.report-table th,
.report-table td {
  border: 1px solid #ddd;
  padding: 4px 6px;
  text-align: left;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.report-table th {
  background-color: #f5f5f5;
  font-weight: 600;
  color: #333;
}

.report-table tr:nth-child(even) {
  background-color: #f9f9f9;
}

.report-summary {
  background-color: #f9f9f9;
  padding: 12px 16px;
  border-radius: 6px;
  margin-top: 16px;
  border-left: 4px solid #007aff;
}

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

#signatureCanvas {
  border: 1px solid var(--border-color);
  border-radius: 8px;
  background-color: white;
  cursor: crosshair;
  max-width: 100%;
  height: auto;
}

.signature-controls {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}

.clear-btn {
  flex: 1;
  background: none;
  border: 1px solid var(--expense-color);
  color: var(--expense-color);
  border-radius: 8px;
  padding: 8px;
  cursor: pointer;
}

.settings-modal {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background-color: var(--background-color);
  border-radius: 14px 14px 0 0;
  z-index: 2001;
  transform: translateY(100%);
  transition: transform 0.3s ease;
}

.settings-modal.active {
  transform: translateY(0);
}

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

.settings-title {
  font-size: 18px;
  font-weight: 600;
}

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

.format-options {
  display: flex;
  gap: 8px;
}

.format-option {
  padding: 6px 12px;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  font-size: 12px;
  cursor: pointer;
}

.format-option.active {
  background-color: var(--primary-color);
  color: white;
  border-color: var(--primary-color);
}

.toggle-switch {
  width: 44px;
  height: 24px;
  background-color: var(--border-color);
  border-radius: 12px;
  position: relative;
  cursor: pointer;
  transition: background-color 0.3s;
}

.toggle-switch.active {
  background-color: var(--primary-color);
}

.toggle-knob {
  width: 20px;
  height: 20px;
  background-color: white;
  border-radius: 50%;
  position: absolute;
  top: 2px;
  left: 2px;
  transition: transform 0.3s;
}

.toggle-switch.active .toggle-knob {
  transform: translateX(20px);
}

.cancel-btn,
.save-btn {
  flex: 1;
  padding: 12px;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.3s;
}

.cancel-btn {
  background-color: var(--surface-color);
  color: var(--text-primary);
}

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

.overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 2000;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s, visibility 0.3s;
}

.overlay.active {
  opacity: 1;
  visibility: visible;
}

.no-data-message {
  padding: 40px 20px;
  text-align: center;
  color: var(--text-secondary);
}

.no-data-text {
  font-size: 16px;
  font-style: italic;
}

.custom-notification {
  position: fixed;
  top: 100px;
  right: 20px;
  background: #34c759;
  color: white;
  padding: 12px 16px;
  border-radius: 10px;
  z-index: 10000;
  max-width: 300px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  font-family: inherit;
  transition: opacity 0.3s;
}

.custom-notification.error {
  background: #ff3b30;
}

.custom-notification.info {
  background: #007aff;
}

/* МОБИЛЬНАЯ АДАПТАЦИЯ - ИСПРАВЛЕННЫЕ СТИЛИ ДЛЯ ПОЛЕЙ ДАТ */
@media (max-width: 768px) {
  .container {
    padding: 0 8px;
  }

  .report-card {
    margin: 0;
    padding: 12px;
    width: 100%;
  }

  .reports-section {
    gap: 12px;
  }

  /* Уменьшаем высоту карточек еще больше */
  .report-content {
    min-height: auto;
    padding: 6px 0;
  }

  .tasks-stats-vertical {
    margin-bottom: 10px;
  }

  .stat-row {
    padding: 6px 0;
  }

  .stat-row .stat-label {
    font-size: 14px;
  }

  .stat-row .stat-value {
    font-size: 14px;
  }

  .analytics-summary {
    margin-bottom: 10px;
  }

  .summary-row {
    padding: 5px 0;
  }

  .summary-label {
    font-size: 14px;
  }

  .summary-value {
    font-size: 14px;
  }

  .period-transactions {
    max-height: 120px;
    margin-bottom: 10px;
  }

  .tax-info {
    margin-bottom: 10px;
  }

  .info-item {
    padding: 5px 0;
  }

  .premium-features {
    margin-bottom: 10px;
  }

  .feature-item {
    margin-bottom: 8px;
    padding: 5px;
  }

  .premium-insight {
    margin-bottom: 10px;
    padding: 8px;
  }

  .button-container-right {
    margin-top: 10px;
  }

  .generate-report-btn {
    padding: 8px 12px;
    font-size: 13px;
    width: 100%;
  }

  .premium-btn {
    padding: 8px 12px;
    font-size: 13px;
  }

  .card-header {
    margin-bottom: 10px;
  }

  .card-title {
    font-size: 16px;
  }

  /* ИСПРАВЛЯЕМ КНОПКУ "ПРОИЗВОЛЬНЫЙ" */
  .period-option {
    padding: 8px 6px;
    font-size: 13px;
    min-height: 36px;
    line-height: 1.1;
    word-break: break-word;
  }

  .period-option[data-period="custom"] {
    font-size: 12px;
    padding: 6px 4px;
    min-width: auto;
  }

  /* ИСПРАВЛЕННЫЕ СТИЛИ ДЛЯ ПОЛЕЙ ДАТ В МОБИЛЬНОЙ ВЕРСИИ */
  .date-range.active {
    flex-direction: column;
    gap: 16px; /* Увеличиваем отступ между полями */
  }

  .date-input-group {
    flex: none; /* Убираем flex растягивание */
    width: 100%; /* Занимает всю ширину */
  }

  .date-input-group input {
    padding: 12px; /* Увеличиваем отступы для удобства */
    font-size: 16px; /* Увеличиваем шрифт для удобства на мобильных */
    width: 100%;
  }
}

/* Для очень маленьких экранов */
@media (max-width: 375px) {
  .container {
    padding: 0 6px;
  }

  .period-options {
    flex-wrap: wrap;
    gap: 6px;
  }

  .period-option {
    flex: 1 0 48%;
    margin-bottom: 6px;
    font-size: 12px;
    padding: 6px 4px;
    min-height: 34px;
  }

  .period-option[data-period="custom"] {
    font-size: 11px;
    padding: 5px 3px;
    line-height: 1;
  }

  .report-card {
    padding: 10px;
  }

  .card-title {
    font-size: 15px;
  }

  .generate-report-btn {
    font-size: 12px;
    padding: 8px 10px;
  }

  .button-container-right {
    justify-content: center;
  }

  .generate-report-btn,
  .premium-btn,
  .add-signature-btn {
    width: 100%;
    max-width: 100%;
  }

  /* Дополнительные исправления для полей дат на очень маленьких экранах */
  .date-range.active {
    gap: 12px;
    margin-top: 10px;
  }

  .date-input-group input {
    padding: 10px;
    font-size: 14px;
  }

  /* Еще больше уменьшаем высоту элементов */
  .tasks-breakdown,
  .period-transactions {
    max-height: 100px;
  }

  .task-breakdown-item,
  .transaction-item {
    padding: 4px 0;
  }
}

@media (max-width: 320px) {
  .card-title {
    font-size: 14px;
  }

  .generate-report-btn,
  .premium-btn {
    font-size: 11px;
    padding: 6px 8px;
  }

  .period-option {
    font-size: 11px;
    padding: 5px 3px;
  }

  .period-option[data-period="custom"] {
    font-size: 10px;
  }

  .date-input-group input {
    padding: 8px 10px;
    font-size: 14px;
  }
}

/* Адаптивные кнопки в модальных окнах */
@media (max-width: 480px) {
  .modal-body {
    padding: 10px;
  }

  .modal-footer {
    flex-direction: column;
    padding: 10px;
  }

  .modal-footer .cancel-btn,
  .modal-footer .save-btn {
    width: 100%;
    padding: 10px;
  }

  .report-table {
    font-size: 11px;
  }
}
/* reports.css - ДОПОЛНИТЕЛЬНЫЕ СТИЛИ ДЛЯ PREMIUM ИНТЕГРАЦИИ */

/* iOS-стильное модальное окно для Premium предложения */
.ios-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.ios-modal.active {
  opacity: 1;
  visibility: visible;
}

.ios-modal-content {
  background: #ffffff;
  border-radius: 14px;
  width: 90%;
  max-width: 340px;
  max-height: 80vh;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  transform: scale(0.9);
  transition: transform 0.3s ease;
}

.ios-modal.active .ios-modal-content {
  transform: scale(1);
}

.ios-modal-header {
  padding: 16px;
  border-bottom: 1px solid #e5e5ea;
  text-align: center;
  position: relative;
}

.ios-modal-title {
  font-size: 17px;
  font-weight: 600;
  color: #000000;
}

.ios-modal-close {
  position: absolute;
  right: 16px;
  top: 16px;
  background: none;
  border: none;
  font-size: 18px;
  color: #8e8e93;
  cursor: pointer;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ios-modal-close:hover {
  background: #f2f2f7;
}

.ios-modal-body {
  padding: 20px 16px;
  max-height: 60vh;
  overflow-y: auto;
}

.ios-modal-footer {
  padding: 16px;
  border-top: 1px solid #e5e5ea;
  display: flex;
  gap: 8px;
}

.ios-button {
  flex: 1;
  padding: 12px 16px;
  border: none;
  border-radius: 10px;
  font-size: 17px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.ios-button.primary {
  background: #007aff;
  color: white;
}

.ios-button.primary:hover {
  background: #0056cc;
}

.ios-button.secondary {
  background: #f2f2f7;
  color: #007aff;
}

.ios-button.secondary:hover {
  background: #e5e5ea;
}

/* Стили для Premium предложения */
.premium-offer-icon {
  text-align: center;
  font-size: 64px;
  margin-bottom: 16px;
}

.premium-offer-title {
  text-align: center;
  font-size: 22px;
  font-weight: 700;
  color: #000000;
  margin-bottom: 20px;
}

.premium-features-list {
  margin-bottom: 24px;
}

.premium-feature-item {
  display: flex;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid #f2f2f7;
}

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

.feature-icon {
  font-size: 24px;
  margin-right: 12px;
  width: 32px;
  text-align: center;
}

.feature-text {
  font-size: 16px;
  color: #000000;
  flex: 1;
}

.premium-pricing {
  text-align: center;
  margin-bottom: 16px;
  padding: 16px;
  background: #f8f9fa;
  border-radius: 12px;
}

.price-amount {
  font-size: 32px;
  font-weight: 700;
  color: #000000;
}

.price-period {
  font-size: 16px;
  color: #8e8e93;
  margin-top: 4px;
}

.premium-guarantee {
  text-align: center;
  font-size: 14px;
  color: #8e8e93;
  margin-bottom: 16px;
}

/* Стили для заблокированных элементов */
.export-btn:disabled,
.generate-report-btn:disabled {
  opacity: 0.5 !important;
  cursor: not-allowed !important;
}

/* Анимация подсветки Premium элементов */
.premium-highlight {
  animation: premiumPulse 2s ease-in-out;
}

@keyframes premiumPulse {
  0% {
    box-shadow: 0 0 0 0 rgba(0, 122, 255, 0.4);
  }
  50% {
    box-shadow: 0 0 0 8px rgba(0, 122, 255, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(0, 122, 255, 0);
  }
}

/* Адаптация кнопок для iOS */
.generate-report-btn {
  width: auto !important;
  min-width: 200px;
  margin-left: auto;
  margin-right: 0;
  display: block;
}

.button-container-right {
  display: flex;
  justify-content: flex-end;
  margin-top: 16px;
}

/* Стили для Premium бейджей */
.premium-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  background: linear-gradient(135deg, #007aff, #5856d6);
  color: white;
  padding: 4px 8px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
}

.premium-report {
  position: relative;
}

/* Адаптация для мобильных */
@media (max-width: 768px) {
  .ios-modal-content {
    width: 95%;
    margin: 20px;
  }

  .generate-report-btn {
    width: 100% !important;
    min-width: auto;
  }

  .button-container-right {
    justify-content: stretch;
  }
}

/* Темная тема */
[data-theme="dark"] .ios-modal-content {
  background: #1c1c1e;
  color: #ffffff;
}

[data-theme="dark"] .ios-modal-header {
  border-bottom-color: #38383a;
}

[data-theme="dark"] .ios-modal-title {
  color: #ffffff;
}

[data-theme="dark"] .ios-button.secondary {
  background: #2c2c2e;
  color: #0a84ff;
}

[data-theme="dark"] .premium-pricing {
  background: #2c2c2e;
}

[data-theme="dark"] .price-amount {
  color: #ffffff;
}

[data-theme="dark"] .feature-text {
  color: #ffffff;
}
/* Стили для логотипа как в login.html и bankcards.html */
.app-title .logo {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  margin-right: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  background: rgba(0, 0, 0, 0.15);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
  flex-shrink: 0;
}

[data-theme="dark"] .app-title .logo {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

[data-theme="light"] .app-title .logo {
  background: rgba(0, 0, 0, 0.15);
  border: 1px solid rgba(0, 0, 0, 0.15);
}

.app-title .logo-content {
  text-align: center;
  position: relative;
  z-index: 2;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.app-title .logo-main-text {
  font-size: 1.2rem;
  font-weight: 800;
  background: linear-gradient(135deg, #000000 0%, #222222 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -1px;
  line-height: 1;
  position: relative;
  text-shadow: 1px 0 0 rgba(120, 120, 120, 0.8),
    2px 0 0 rgba(150, 150, 150, 0.5);
  margin: 0;
}

[data-theme="dark"] .app-title .logo-main-text {
  background: linear-gradient(135deg, #ffffff 0%, #cccccc 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-shadow: 1px 0 0 rgba(0, 0, 0, 0.4), 2px 0 0 rgba(0, 0, 0, 0.2);
}

.app-title .logo-sub-text {
  display: none; /* Скрываем подпись Analyst в header */
}

/* Анимация для логотипа */
@keyframes subtleGlow {
  0%,
  100% {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2),
      inset 0 1px 0 rgba(255, 255, 255, 0.1);
  }
  50% {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25),
      inset 0 1px 0 rgba(255, 255, 255, 0.15),
      0 0 10px rgba(255, 255, 255, 0.05);
  }
}

.app-title .logo {
  animation: subtleGlow 4s ease-in-out infinite;
}

/* Обновляем app-title для правильного расположения */
.app-title {
  font-size: 18px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0;
}

/* Убираем старую синюю иконку */
.app-logo {
  display: none;
}

/* Адаптивность для мобильных */
@media (max-width: 768px) {
  .app-title .logo {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    margin-right: 10px;
  }

  .app-title .logo-main-text {
    font-size: 1rem;
  }

  .app-title {
    font-size: 16px;
  }
}

@media (max-width: 480px) {
  .app-title .logo {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    margin-right: 8px;
  }

  .app-title .logo-main-text {
    font-size: 0.9rem;
  }

  .app-title {
    font-size: 15px;
  }
}
.custom-notification {
  position: fixed;
  top: 20px;
  right: 20px;
  background: #34c759;
  color: white;
  padding: 12px 20px;
  border-radius: 10px;
  z-index: 10000;
  max-width: 300px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  font-family: inherit;
}

.custom-notification.error {
  background: #ff3b30;
}

.custom-notification.info {
  background: #007aff;
}

.custom-notification.warning {
  background: #ff9500;
}
