* {
  margin: 0;
  padding: 0;
  box-sizing: border-ibox;
}
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: #f5f5f5;
  color: #333;
  line-height: 1.5;
}
header {
  background: #fff;
  padding: 20px;
  border-bottom: 1px solid #ddd;
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}
h1 { font-size: 24px; margin-bottom: 10px; }
nav {
  display: flex;
  gap: 20px;
  border-bottom: 2px solid #eee;
  background: #fff;
  padding: 0 20px;
}
nav button {
  background: none;
  border: none;
  padding: 12px 0;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  color: #666;
  border-bottom: 3px solid transparent;
  margin-bottom: -2px;
}
nav button.active {
  color: #0066cc;
  border-bottom-color: #0066cc;
}
nav button:hover {
  color: #0066cc;
}
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
}
.tab {
  display: none;
}
.tab.active {
  display: block;
}
.filters {
  display: flex;
  gap: 12px;
  margin-bottom: 20px;
  align-items: center;
  flex-wrap: wrap;
}
select, input[type="text"], input[type="number"], button {
  padding: 8px 12px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 14px;
}
input[type="text"], input[type="number"] {
  flex: 1;
  min-width: 150px;
}
button {
  background: #0066cc;
  color: white;
  border: none;
  cursor: pointer;
  font-weight: 600;
  transition: background 0.2s;
}
button:hover {
  background: #0052a3;
}
button:disabled {
  background: #ccc;
  cursor: not-allowed;
}
.budget-bar {
  display: none;
  background: #e8f4f8;
  padding: 12px;
  border-radius: 4px;
  margin-bottom: 20px;
  border-left: 4px solid #0066cc;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.budget-bar.visible {
  display: flex;
}
table {
  width: 100%;
  border-collapse: collapse;
  background: white;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
  border-radius: 4px;
  overflow: hidden;
}
thead {
  background: #f9f9f9;
  border-bottom: 2px solid #ddd;
  position: sticky;
  top: 0;
}
th {
  text-align: left;
  padding: 12px;
  font-weight: 600;
  color: #333;
  font-size: 13px;
}
td {
  padding: 12px;
  border-bottom: 1px solid #eee;
}
tbody tr:nth-child(even) {
  background: #f9f9f9;
}
tbody tr:hover {
  background: #f0f0f0;
}
.status-bar {
  padding: 12px;
  border-radius: 4px;
  margin-top: 20px;
  display: none;
  font-weight: 600;
}
.status-bar.visible {
  display: block;
}
.status-bar.success {
  background: #d4edda;
  border: 1px solid #c3e6cb;
  color: #155724;
}
.status-bar.error {
  background: #f8d7da;
  border: 1px solid #f5c6cb;
  color: #721c24;
}
.status-bar.warning {
  background: #fff3cd;
  border: 1px solid #ffeaa7;
  color: #856404;
}
.error-list {
  max-height: 300px;
  overflow-y: auto;
  margin-top: 12px;
  padding: 12px;
  background: white;
  border-radius: 4px;
}
.error-item {
  padding: 8px;
  border-bottom: 1px solid #eee;
  font-size: 13px;
  font-family: monospace;
}
.error-item:last-child {
  border: none;
}
.import-section {
  background: white;
  padding: 20px;
  border-radius: 4px;
  margin-bottom: 20px;
}
.import-section h3 {
  margin-bottom: 12px;
  color: #333;
}
.import-section p {
  font-size: 13px;
  color: #666;
  margin-bottom: 12px;
}
.import-controls {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 20px;
  flex-wrap: wrap;
}
input[type="file"] {
  padding: 8px;
}
.preview-results {
  margin-top: 20px;
}
.preview-results h4 {
  margin-bottom: 12px;
}
.preview-results table {
  font-size: 13px;
}
.preview-results td {
  padding: 8px;
}
.status-cell {
  font-weight: 600;
}
.status-ok {
  color: #28a745;
}
.status-error {
  color: #dc3545;
}
.import-results {
  margin-top: 20px;
}
.import-results .success-summary {
  background: #d4edda;
  border: 1px solid #c3e6cb;
  color: #155724;
  padding: 12px;
  border-radius: 4px;
  margin-bottom: 12px;
}
.download-link {
  margin-top: 12px;
}
.download-link a {
  display: inline-block;
  background: #28a745;
  color: white;
  padding: 8px 12px;
  border-radius: 4px;
  text-decoration: none;
  font-size: 13px;
}
.download-link a:hover {
  background: #218838;
}
input[type="checkbox"] {
  cursor: pointer;
}
.spinner {
  display: inline-block;
  width: 14px;
  height: 14px;
  border: 2px solid #f3f3f3;
  border-top: 2px solid #0066cc;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}
@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}
@keyframes slideIn {
  from { transform: translateX(400px); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}
@keyframes slideOut {
  from { transform: translateX(0); opacity: 1; }
  to { transform: translateX(400px); opacity: 0; }
}
