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

body {
  font-family: Georgia, 'Times New Roman', serif;
  background: #e8d5b7;
  min-height: 100vh;
  padding: 20px;
  line-height: 1.8;
  color: #2c2416;
}

#app {
  max-width: 750px;
  margin: 0 auto;
}

.container {
  background: #faf8f3;
  border-radius: 2px;
  box-shadow:
    0 1px 3px rgba(0, 0, 0, 0.12),
    0 8px 24px rgba(0, 0, 0, 0.08);
  overflow: hidden;
  border: 1px solid #d4c4a8;
}

/* Header */
.header {
  background: #8b7355;
  color: #faf8f3;
  padding: 30px 40px;
  text-align: center;
  border-bottom: 3px double #5c4a37;
}

.header h1 {
  font-size: 2.2em;
  margin-bottom: 8px;
  font-weight: 400;
  letter-spacing: 0.05em;
  font-family: 'Palatino Linotype', 'Book Antiqua', Palatino, serif;
}

.header p {
  opacity: 0.95;
  font-size: 1em;
  font-style: italic;
}

/* Sync Section */
.sync-section {
  padding: 20px 30px;
  background: #f5f0e8;
  border-bottom: 1px solid #d4c4a8;
}

.sync-controls {
  display: flex;
  gap: 10px;
  margin-bottom: 15px;
  flex-wrap: wrap;
}

.sync-controls input {
  flex: 1;
  min-width: 300px;
  padding: 10px 14px;
  border: 1px solid #c9b896;
  border-radius: 2px;
  font-size: 13px;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: #faf8f3;
  transition: border-color 0.2s;
}

.sync-controls input:focus {
  outline: none;
  border-color: #8b7355;
  box-shadow: 0 0 0 2px rgba(139, 115, 85, 0.1);
}

.btn {
  padding: 10px 18px;
  border: 1px solid #8b7355;
  border-radius: 2px;
  font-size: 13px;
  font-weight: 500;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
  background: #faf8f3;
  color: #2c2416;
}

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

.btn-primary {
  background: #8b7355;
  color: #faf8f3;
  border-color: #8b7355;
}

.btn-primary:hover:not(:disabled) {
  background: #6e5a44;
  border-color: #6e5a44;
}

.btn-secondary {
  background: #faf8f3;
  color: #5c4a37;
  border-color: #c9b896;
}

.btn-secondary:hover:not(:disabled) {
  background: #f5f0e8;
  border-color: #8b7355;
}

.btn-danger {
  background: #a0522d;
  color: #faf8f3;
  border-color: #a0522d;
}

.btn-danger:hover:not(:disabled) {
  background: #8b4513;
  border-color: #8b4513;
}

.status-indicator {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 15px;
  background: #faf8f3;
  border-radius: 2px;
  font-size: 13px;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  border: 1px solid #d4c4a8;
  color: #5c4a37;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.status-dot.offline {
  background: #a0522d;
}

.status-dot.online {
  background: #6b8e23;
  box-shadow: 0 0 6px rgba(107, 142, 35, 0.6);
}

.status-dot.syncing {
  background: #daa520;
  animation: pulse 1.5s infinite;
}

@keyframes pulse {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0.5;
  }
}

/* Main Content */
.main-content {
  padding: 40px 50px;
  background: #faf8f3;
}

/* Date Navigation */
.date-navigation {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  margin-bottom: 30px;
  padding: 20px;
  background: linear-gradient(to bottom, #f5f0e8 0%, #faf8f3 100%);
  border: 1px solid #d4c4a8;
  border-radius: 2px;
}

.current-date {
  font-size: 1.4em;
  font-weight: 400;
  color: #5c4a37;
  text-align: center;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  font-family: 'Palatino Linotype', 'Book Antiqua', Palatino, serif;
  letter-spacing: 0.02em;
}

.today-badge {
  display: inline-block;
  background: #8b7355;
  color: #faf8f3;
  padding: 3px 10px;
  border-radius: 2px;
  font-size: 0.55em;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Editor */
.editor {
  margin-bottom: 30px;
}

.editor textarea {
  width: 100%;
  min-height: 400px;
  padding: 30px;
  border: 1px solid #d4c4a8;
  border-radius: 2px;
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 17px;
  line-height: 2;
  resize: vertical;
  transition: border-color 0.2s;
  background: #fefdfb;
  color: #2c2416;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.05);
}

.editor textarea:focus {
  outline: none;
  border-color: #8b7355;
  box-shadow:
    inset 0 1px 2px rgba(0, 0, 0, 0.05),
    0 0 0 3px rgba(139, 115, 85, 0.1);
}

.editor textarea::placeholder {
  color: #a89a83;
  font-style: italic;
}

.editor-actions {
  display: flex;
  gap: 10px;
  margin-top: 20px;
  flex-wrap: wrap;
}

/* Info Section */
.info-section {
  background: #f5f0e8;
  border-left: 3px solid #8b7355;
  padding: 20px 25px;
  margin-top: 40px;
  border-radius: 2px;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 14px;
}

.info-section h3 {
  margin-bottom: 12px;
  color: #5c4a37;
  font-size: 1.1em;
  font-weight: 600;
}

.info-section ul {
  margin-left: 20px;
}

.info-section li {
  margin-bottom: 6px;
  color: #5c4a37;
}

/* Import Preview Modal */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(44, 36, 22, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
  backdrop-filter: blur(2px);
}

.modal {
  background: #faf8f3;
  border-radius: 2px;
  padding: 35px;
  max-width: 600px;
  width: 100%;
  max-height: 80vh;
  overflow-y: auto;
  border: 2px solid #8b7355;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.modal h2 {
  margin-bottom: 20px;
  color: #5c4a37;
  font-family: 'Palatino Linotype', 'Book Antiqua', Palatino, serif;
  font-weight: 400;
  font-size: 1.8em;
}

.modal p {
  font-family: Georgia, 'Times New Roman', serif;
  color: #2c2416;
  line-height: 1.8;
}

.modal-actions {
  display: flex;
  gap: 12px;
  margin-top: 25px;
  justify-content: flex-end;
}

.preview-content {
  background: #f5f0e8;
  padding: 20px;
  border-radius: 2px;
  margin: 20px 0;
  max-height: 300px;
  overflow-y: auto;
  border: 1px solid #d4c4a8;
  font-family: Georgia, 'Times New Roman', serif;
}

.preview-content p {
  margin-bottom: 12px;
  color: #5c4a37;
  font-size: 14px;
}

.preview-content strong {
  color: #2c2416;
}

/* Alerts */
.alert {
  padding: 15px 20px;
  border-radius: 2px;
  margin-bottom: 25px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 14px;
}

.alert-success {
  background: #e8f5e9;
  color: #2e7d32;
  border: 1px solid #a5d6a7;
}

.alert-error {
  background: #fce4e4;
  color: #8b3a3a;
  border: 1px solid #e6b3b3;
}

.alert button {
  background: transparent;
  border: none;
  font-size: 20px;
  cursor: pointer;
  padding: 0 8px;
  color: inherit;
  opacity: 0.7;
  transition: opacity 0.2s;
}

.alert button:hover {
  opacity: 1;
}

/* Responsive */
@media (max-width: 600px) {
  .header h1 {
    font-size: 1.8em;
  }

  .main-content {
    padding: 30px 25px;
  }

  .sync-controls {
    flex-direction: column;
  }

  .sync-controls input {
    min-width: 100%;
  }

  .date-navigation {
    flex-direction: column;
    gap: 15px;
  }

  .editor textarea {
    padding: 20px;
    font-size: 16px;
    min-height: 300px;
  }
}
