:root {
  --primary-color: #2c3e50;
  --secondary-color: #3498db;
  --accent-color: #e74c3c;
  --success-color: #2ecc71;
  --light-bg: #f8f9fa;
  --border-color: #dfe4ea;
  --text-color: #333;
  --highlight-color: #fff9c4;
  --highlight-animation: #ffeb3b;
}

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

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

.app-container {
  display: flex;
  min-height: 100vh;
  max-width: 1400px;
  margin: 0 auto;
  padding: 1rem;
}

.generator-panel {
  flex: 1;
  background-color: white;
  border-radius: 8px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
  margin-right: 1rem;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  max-width: 650px;
}

.preview-panel {
  flex: 1;
  background-color: white;
  border-radius: 8px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
  position: sticky;
  top: 1rem;
  height: calc(100vh - 2rem);
  display: flex;
  flex-direction: column;
}

.panel-header {
  background-color: var(--primary-color);
  color: white;
  padding: 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.panel-header h1 {
  font-size: 1.2rem;
  margin: 0;
}

.panel-content {
  padding: 1rem;
  flex: 1;
  overflow-y: auto;
}

.preview-content {
  padding: 1.5rem;
  overflow-y: auto;
  flex: 1;
}

.tab-navigation {
  display: flex;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 1rem;
  position: sticky;
  top: 0;
  background-color: white;
  z-index: 10;
}

.tab-button {
  padding: 0.75rem 1rem;
  background: none;
  border: none;
  cursor: pointer;
  font-weight: 500;
  transition: all 0.2s;
  border-bottom: 3px solid transparent;
  color: var(--text-color);
}

.tab-button:hover {
  background-color: var(--light-bg);
}

.tab-button.active {
  border-bottom-color: var(--secondary-color);
  color: var(--secondary-color);
}

.form-section {
  margin-bottom: 1.5rem;
}

.form-section h2 {
  font-size: 1.1rem;
  margin-bottom: 1rem;
  color: var(--primary-color);
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border-color);
}

.form-group {
  margin-bottom: 1rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
  color: var(--primary-color);
}

.tooltip-label {
  display: flex;
  align-items: center;
}

.tooltip-icon {
  margin-left: 0.5rem;
  color: var(--secondary-color);
  cursor: help;
  position: relative;
}

.tooltip-text {
  visibility: hidden;
  width: 250px;
  background-color: var(--primary-color);
  color: white;
  text-align: left;
  border-radius: 4px;
  padding: 0.5rem;
  position: absolute;
  z-index: 1;
  bottom: 125%;
  left: 50%;
  margin-left: -125px;
  opacity: 0;
  transition: opacity 0.3s;
  font-weight: 400;
  font-size: 0.75rem;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
  pointer-events: none;
}

.tooltip-icon:hover .tooltip-text {
  visibility: visible;
  opacity: 1;
}

input[type="text"],
input[type="email"],
input[type="number"],
input[type="date"],
input[type="tel"],
select,
textarea {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  font-size: 0.9rem;
  transition: border-color 0.3s, box-shadow 0.3s;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="number"]:focus,
input[type="date"]:focus,
input[type="tel"]:focus,
select:focus,
textarea:focus {
  border-color: var(--secondary-color);
  outline: none;
  box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.radio-group, .checkbox-group {
  margin-bottom: 0.5rem;
}

.radio-label, .checkbox-label {
  display: flex;
  align-items: center;
  cursor: pointer;
  font-weight: 400;
}

.radio-label input, .checkbox-label input {
  margin-right: 0.5rem;
}

.navigation-buttons {
  display: flex;
  justify-content: space-between;
  margin-top: 1.5rem;
}

.nav-button {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.6rem 1rem;
  background-color: var(--secondary-color);
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-weight: 500;
  transition: background-color 0.3s;
}

.nav-button:hover {
  background-color: #2980b9;
}

.nav-button.prev-button {
  background-color: #95a5a6;
}

.nav-button.prev-button:hover {
  background-color: #7f8c8d;
}

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

.document-preview {
  font-family: 'Times New Roman', Times, serif;
  font-size: 0.9rem;
  line-height: 1.5;
  color: #000;
  white-space: pre-wrap;
}

.document-title {
  font-weight: bold;
  font-size: 1.2rem;
  text-align: center;
  margin: 1.5rem 0;
}

.highlighted-text {
  background-color: var(--highlight-color);
  animation: highlight 2s;
}

@keyframes highlight {
  0% { background-color: var(--highlight-animation); }
  100% { background-color: var(--highlight-color); }
}

.action-buttons {
  display: flex;
  gap: 0.5rem;
}

@media (max-width: 992px) {
  .app-container {
    flex-direction: column;
  }
  
  .generator-panel {
    margin-right: 0;
    margin-bottom: 1rem;
    max-width: 100%;
  }
  
  .preview-panel {
    position: relative;
    top: 0;
    height: 500px;
  }
}