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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: #f5f7fa;
  color: #333;
  line-height: 1.6;
}

.container {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Header */
header {
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
  color: white;
  padding: 40px 0;
  text-align: center;
}

header h1 {
  font-size: 2rem;
  margin-bottom: 8px;
}

header p {
  font-size: 1.1rem;
  opacity: 0.8;
}

/* Tabs */
.tabs {
  display: flex;
  justify-content: center;
  background: white;
  border-bottom: 2px solid #e0e0e0;
  padding: 0;
}

.tab {
  padding: 15px 30px;
  border: none;
  background: none;
  font-size: 1rem;
  cursor: pointer;
  color: #666;
  border-bottom: 3px solid transparent;
  transition: all 0.2s;
}

.tab:hover {
  color: #1a1a2e;
}

.tab.active {
  color: #1a1a2e;
  border-bottom-color: #4CAF50;
  font-weight: 600;
}

/* Main */
main {
  padding: 30px 0;
}

.tab-content {
  display: none;
  background: white;
  padding: 30px;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

.tab-content.active {
  display: block;
}

h2 {
  margin-bottom: 20px;
  color: #1a1a2e;
}

/* Forms */
.form-group {
  margin-bottom: 20px;
}

.form-row {
  display: flex;
  gap: 20px;
}

.form-row .form-group {
  flex: 1;
}

label {
  display: block;
  margin-bottom: 6px;
  font-weight: 600;
  font-size: 0.9rem;
  color: #444;
}

input, select, textarea {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 1rem;
  transition: border-color 0.2s;
}

input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: #4CAF50;
  box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.1);
}

textarea {
  resize: vertical;
}

.btn {
  background: #4CAF50;
  color: white;
  padding: 12px 30px;
  border: none;
  border-radius: 6px;
  font-size: 1rem;
  cursor: pointer;
  transition: background 0.2s;
  width: 100%;
}

.btn:hover {
  background: #43A047;
}

.btn:disabled {
  background: #ccc;
  cursor: not-allowed;
}

/* Results */
.result {
  margin-top: 20px;
  padding: 20px;
  border-radius: 8px;
  animation: fadeIn 0.3s ease;
}

.result.success {
  background: #E8F5E9;
  border: 1px solid #A5D6A7;
}

.result.error {
  background: #FFEBEE;
  border: 1px solid #EF9A9A;
}

.result.info {
  background: #E3F2FD;
  border: 1px solid #90CAF9;
}

.result h3 {
  margin-bottom: 10px;
}

.result table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 10px;
}

.result td {
  padding: 8px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.result td:first-child {
  font-weight: 600;
  width: 40%;
}

/* Status badge */
.status-badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
}

.status-OPEN { background: #FFF3E0; color: #E65100; }
.status-IN_PROGRESS { background: #E3F2FD; color: #1565C0; }
.status-AWAITING_CUSTOMER { background: #F3E5F5; color: #7B1FA2; }
.status-RESOLVED { background: #E8F5E9; color: #2E7D32; }
.status-CLOSED { background: #ECEFF1; color: #546E7A; }

.priority-P1 { color: #D32F2F; font-weight: 700; }
.priority-P2 { color: #F57C00; font-weight: 600; }
.priority-P3 { color: #1976D2; }

/* FAQ */
.faq-item {
  border-bottom: 1px solid #eee;
  padding: 15px 0;
}

.faq-item h3 {
  cursor: pointer;
  font-size: 1rem;
  color: #1a1a2e;
  padding: 5px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.faq-item h3::after {
  content: '+';
  font-size: 1.5rem;
  color: #999;
  transition: transform 0.2s;
}

.faq-item h3.open::after {
  content: '-';
}

.faq-answer {
  display: none;
  padding: 10px 0;
  color: #555;
}

.faq-answer.open {
  display: block;
}

.faq-answer table {
  width: 100%;
  border-collapse: collapse;
  margin: 10px 0;
}

.faq-answer th, .faq-answer td {
  padding: 8px 12px;
  border: 1px solid #ddd;
  text-align: left;
}

.faq-answer th {
  background: #f5f5f5;
}

/* Footer */
footer {
  text-align: center;
  padding: 20px;
  color: #666;
  font-size: 0.9rem;
}

footer a {
  color: #4CAF50;
  text-decoration: none;
}

/* Loading spinner */
.spinner {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: white;
  animation: spin 0.8s linear infinite;
  vertical-align: middle;
  margin-right: 8px;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

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

/* Responsive */
@media (max-width: 600px) {
  .form-row {
    flex-direction: column;
    gap: 0;
  }

  .tab {
    padding: 12px 15px;
    font-size: 0.9rem;
  }

  header h1 {
    font-size: 1.5rem;
  }
}
