/* Reminder Webbgränssnitt — Fas 7 */

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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: #f5f7fa;
  color: #1a1a1a;
  line-height: 1.5;
}

a { color: #2563eb; text-decoration: none; }
a:hover { text-decoration: underline; }

/* Header */
header {
  background: #1e293b;
  color: #fff;
  padding: 0.75rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

header h1 { font-size: 1.25rem; font-weight: 600; }

nav { display: flex; flex-wrap: wrap; gap: 0.25rem 0; align-items: center; }
nav a {
  color: #cbd5e1;
  margin-left: 1.5rem;
  padding: 0.5rem 0;
  border-bottom: 2px solid transparent;
}

nav a.active,
nav a:hover {
  color: #fff;
  border-bottom-color: #2563eb;
}

/* Layout */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1.5rem;
}

.page-title {
  font-size: 1.5rem;
  margin-bottom: 1rem;
  color: #0f172a;
}

/* Cards */
.card {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 0.5rem;
  padding: 1.25rem;
  margin-bottom: 1rem;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.card h2 { font-size: 1rem; margin-bottom: 0.75rem; color: #0f172a; }

/* Tables */
table { width: 100%; border-collapse: collapse; }
th, td { padding: 0.75rem; text-align: left; border-bottom: 1px solid #f1f5f9; }
th { background: #f8fafc; font-weight: 600; color: #475569; font-size: 0.875rem; text-transform: uppercase; letter-spacing: 0.05em; }
tr:hover { background: #f8fafc; }

/* Badges */
.badge {
  display: inline-block;
  padding: 0.125rem 0.5rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 600;
}
.badge-open { background: #fef3c7; color: #92400e; }
.badge-investigating { background: #dbeafe; color: #1e40af; }
.badge-waiting_customer { background: #f3e8ff; color: #6b21a8; }
.badge-resolved { background: #d1fae5; color: #065f46; }
.badge-closed { background: #e2e8f0; color: #475569; }

.badge-low { background: #d1fae5; color: #065f46; }
.badge-normal { background: #bfdbfe; color: #1e40af; }
.badge-high { background: #fecaca; color: #991b1b; }
.badge-urgent { background: #ffedd5; color: #c2410c; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  padding: 0.5rem 1rem;
  border: none;
  border-radius: 0.375rem;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s;
}
.btn-primary { background: #2563eb; color: #fff; }
.btn-primary:hover { background: #1d4ed8; }
.btn-secondary { background: #e2e8f0; color: #475569; }
.btn-secondary:hover { background: #cbd5e1; }
.btn-sm { padding: 0.25rem 0.5rem; font-size: 0.75rem; }

/* Forms */
.form-group { margin-bottom: 1rem; }
.form-group label { display: block; margin-bottom: 0.25rem; font-weight: 500; color: #334155; font-size: 0.875rem; }
.form-group input, .form-group select, .form-group textarea {
  width: 100%;
  padding: 0.5rem;
  border: 1px solid #cbd5e1;
  border-radius: 0.375rem;
  font-size: 0.875rem;
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
  outline: none;
  border-color: #2563eb;
  ring: 2px;
}

/* Alerts */
.alert {
  padding: 0.75rem;
  border-radius: 0.375rem;
  margin-bottom: 1rem;
  font-size: 0.875rem;
}
.alert-success { background: #d1fae5; color: #065f46; border: 1px solid #a7f3d0; }
.alert-error { background: #fee2e2; color: #991b1b; border: 1px solid #fecaca; }
.alert-info { background: #dbeafe; color: #1e40af; border: 1px solid #bfdbfe; }

/* Empty state */
.empty {
  text-align: center;
  padding: 3rem;
  color: #64748b;
}

/* Suggestion card */
.suggestion {
  border-left: 4px solid #2563eb;
  padding-left: 1rem;
  margin-bottom: 1rem;
}
.suggestion.low-confidence { border-left-color: #f59e0b; }
.suggestion-meta {
  font-size: 0.875rem;
  color: #64748b;
  margin-bottom: 0.5rem;
}
.suggestion-text {
  background: #f8fafc;
  padding: 1rem;
  border-radius: 0.375rem;
  white-space: pre-wrap;
  margin-bottom: 0.75rem;
}

/* Dispute detail */
.dispute-actions {
  display: flex;
  gap: 0.5rem;
  margin-top: 1rem;
}

.muted { color: #64748b; font-size: 0.875rem; margin-bottom: 0.75rem; }
.chip {
  display: inline-block;
  margin: 0.25rem 0.5rem 0.25rem 0;
  padding: 0.35rem 0.7rem;
  background: #f1f5f9;
  border-radius: 999px;
  font-size: 0.8125rem;
  color: #334155;
}
.nav-toggle {
  display: none;
  background: transparent;
  color: #fff;
  border: 1px solid #94a3b8;
  border-radius: 0.375rem;
  padding: 0.35rem 0.75rem;
  font-size: 0.875rem;
  cursor: pointer;
}
.actions { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 0.75rem 0; }

/* Responsive */
@media (max-width: 800px) {
  .container, main { padding: 0.75rem; overflow-x: auto; }
  header { flex-wrap: wrap; gap: 0.5rem; }
  .nav-toggle { display: inline-flex; margin-left: auto; }
  header nav { display: none; width: 100%; flex-direction: column; }
  header nav.open { display: flex; }
  header nav a { margin-left: 0; padding: 0.4rem 0; }
  table { min-width: 42rem; width: max-content; font-size: 0.875rem; }
  th, td { padding: 0.5rem; white-space: nowrap; }
}