/* =========================================================
   Orathor — identidade visual própria (distinta do NR-01)
   NR-01 usa verde/dourado + Cormorant Garamond/DM Sans (clínico).
   Orathor é a ferramenta interna de operação/chamados: paleta
   indigo/âmbar, tipografia única (Inter), feel de SaaS de ops.
   ========================================================= */

:root {
  --orathor-bg: #f8fafc;
  --orathor-surface: #ffffff;
  --orathor-border: #e2e8f0;

  --orathor-sidebar-bg: #1e1b4b;
  --orathor-sidebar-bg-soft: #2e2a6b;
  --orathor-sidebar-text: #c7d2fe;
  --orathor-sidebar-text-active: #ffffff;

  --orathor-primary: #4f46e5;
  --orathor-primary-soft: #eef2ff;
  --orathor-accent: #f59e0b;
  --orathor-accent-soft: #fffbeb;

  --orathor-text: #0f172a;
  --orathor-text-muted: #64748b;

  --orathor-success: #059669;
  --orathor-success-soft: #ecfdf5;
  --orathor-info: #0891b2;
  --orathor-info-soft: #ecfeff;
  --orathor-warning: #d97706;
  --orathor-warning-soft: #fffbeb;
  --orathor-danger: #dc2626;
  --orathor-danger-soft: #fef2f2;
  --orathor-muted-soft: #f1f5f9;

  --orathor-radius: 10px;
  --orathor-shadow: 0 1px 2px rgba(15, 23, 42, 0.06), 0 1px 1px rgba(15, 23, 42, 0.04);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--orathor-bg);
  color: var(--orathor-text);
  font-size: 14px;
  line-height: 1.5;
}

a { color: var(--orathor-primary); text-decoration: none; }
a:hover { text-decoration: underline; }

.orathor-shell {
  display: flex;
  min-height: 100vh;
}

/* Sidebar */
.orathor-sidebar {
  width: 240px;
  flex-shrink: 0;
  background: var(--orathor-sidebar-bg);
  color: var(--orathor-sidebar-text);
  display: flex;
  flex-direction: column;
  padding: 20px 0;
}

.orathor-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 20px 20px;
  margin-bottom: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.orathor-brand-mark {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: var(--orathor-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #1e1b4b;
  font-weight: 700;
  font-size: 14px;
}

.orathor-brand-name {
  font-weight: 700;
  font-size: 16px;
  color: #ffffff;
  letter-spacing: 0.02em;
}

.orathor-nav { flex: 1; padding: 0 12px; }

.orathor-nav-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 9px 12px;
  border-radius: 8px;
  color: var(--orathor-sidebar-text);
  font-size: 13.5px;
  font-weight: 500;
  margin-bottom: 2px;
  cursor: pointer;
}

.orathor-nav-item:hover { background: var(--orathor-sidebar-bg-soft); text-decoration: none; }

.orathor-nav-item.active {
  background: var(--orathor-sidebar-bg-soft);
  color: var(--orathor-sidebar-text-active);
}

.orathor-nav-item.disabled {
  color: rgba(199, 210, 254, 0.45);
  cursor: default;
}
.orathor-nav-item.disabled:hover { background: transparent; }

.orathor-badge-soon {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  background: rgba(255, 255, 255, 0.1);
  padding: 2px 6px;
  border-radius: 999px;
}

.orathor-sidebar-footer {
  padding: 12px 20px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 12px;
  color: rgba(199, 210, 254, 0.6);
}

/* Main area */
.orathor-main { flex: 1; display: flex; flex-direction: column; min-width: 0; }

.orathor-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 28px;
  background: var(--orathor-surface);
  border-bottom: 1px solid var(--orathor-border);
}

.orathor-topbar-tenant {
  font-size: 13px;
  color: var(--orathor-text-muted);
}

.orathor-topbar-user {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 13px;
}

.orathor-content { padding: 28px; flex: 1; }

.orathor-page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.orathor-page-header h1 {
  font-size: 20px;
  font-weight: 700;
  margin: 0;
  color: var(--orathor-text);
}

/* Buttons */
.orathor-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 13.5px;
  font-weight: 600;
  border: 1px solid transparent;
  cursor: pointer;
  background: var(--orathor-primary);
  color: #ffffff;
}
.orathor-btn:hover { background: #4338ca; text-decoration: none; }

.orathor-btn-secondary {
  background: var(--orathor-surface);
  color: var(--orathor-text);
  border-color: var(--orathor-border);
}
.orathor-btn-secondary:hover { background: var(--orathor-muted-soft); }

.orathor-btn-accent { background: var(--orathor-accent); color: #1e1b4b; }
.orathor-btn-accent:hover { background: #d97706; color: #ffffff; }

/* Card / table surfaces */
.orathor-card {
  background: var(--orathor-surface);
  border: 1px solid var(--orathor-border);
  border-radius: var(--orathor-radius);
  box-shadow: var(--orathor-shadow);
}

.orathor-table { width: 100%; border-collapse: collapse; }
.orathor-table th {
  text-align: left;
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--orathor-text-muted);
  padding: 10px 16px;
  border-bottom: 1px solid var(--orathor-border);
}
.orathor-table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--orathor-border);
  font-size: 13.5px;
  vertical-align: middle;
}
.orathor-table tr:last-child td { border-bottom: none; }
.orathor-table tr:hover { background: var(--orathor-muted-soft); }

/* Badges */
.orathor-pill {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 600;
  white-space: nowrap;
}

.status-open { background: var(--orathor-info-soft); color: var(--orathor-info); }
.status-in_progress { background: var(--orathor-warning-soft); color: var(--orathor-warning); }
.status-waiting { background: var(--orathor-muted-soft); color: var(--orathor-text-muted); }
.status-resolved { background: var(--orathor-success-soft); color: var(--orathor-success); }
.status-closed { background: #334155; color: #ffffff; }

.priority-low { background: var(--orathor-muted-soft); color: var(--orathor-text-muted); }
.priority-medium { background: var(--orathor-info-soft); color: var(--orathor-info); }
.priority-high { background: var(--orathor-warning-soft); color: var(--orathor-warning); }
.priority-critical { background: var(--orathor-danger-soft); color: var(--orathor-danger); }

.orathor-pill-internal { background: var(--orathor-accent-soft); color: #92400e; }
.orathor-pill-external { background: var(--orathor-success-soft); color: var(--orathor-success); }

/* Forms */
.orathor-field { margin-bottom: 16px; }
.orathor-field label {
  display: block;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--orathor-text-muted);
  margin-bottom: 6px;
}
.orathor-field input[type="text"],
.orathor-field input[type="email"],
.orathor-field input[type="password"],
.orathor-field textarea,
.orathor-field select {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid var(--orathor-border);
  border-radius: 8px;
  font-size: 13.5px;
  font-family: inherit;
  color: var(--orathor-text);
  background: var(--orathor-surface);
}
.orathor-field textarea { resize: vertical; min-height: 90px; }
.orathor-field input:focus,
.orathor-field textarea:focus,
.orathor-field select:focus {
  outline: none;
  border-color: var(--orathor-primary);
  box-shadow: 0 0 0 3px var(--orathor-primary-soft);
}

.orathor-checkbox-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--orathor-text-muted);
}

/* Messages (django.contrib.messages) */
.orathor-messages { margin-bottom: 16px; }
.orathor-message {
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 13px;
  margin-bottom: 8px;
}
.orathor-message.success { background: var(--orathor-success-soft); color: var(--orathor-success); }
.orathor-message.error { background: var(--orathor-danger-soft); color: var(--orathor-danger); }

/* Empty state */
.orathor-empty {
  padding: 48px 16px;
  text-align: center;
  color: var(--orathor-text-muted);
  font-size: 13.5px;
}

/* Login screen */
.orathor-login-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--orathor-sidebar-bg);
}
.orathor-login-card {
  width: 360px;
  background: var(--orathor-surface);
  border-radius: 14px;
  padding: 32px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.25);
}
.orathor-login-card .orathor-brand { border-bottom: none; padding: 0 0 24px; margin: 0; justify-content: center; }
.orathor-login-card .orathor-brand-name { color: var(--orathor-text); }
.orathor-login-card .orathor-btn { width: 100%; justify-content: center; padding: 10px 14px; }

/* Ticket detail */
.orathor-ticket-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 8px;
}
.orathor-ticket-meta {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 10px 0 18px;
}
.orathor-ticket-meta span.orathor-meta-item {
  font-size: 12.5px;
  color: var(--orathor-text-muted);
}
.orathor-section-title {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--orathor-text-muted);
  margin: 24px 0 10px;
}
.orathor-comment {
  padding: 14px 16px;
  border-bottom: 1px solid var(--orathor-border);
}
.orathor-comment:last-child { border-bottom: none; }
.orathor-comment-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
  font-size: 12.5px;
  color: var(--orathor-text-muted);
}
.orathor-comment-body { font-size: 13.5px; white-space: pre-wrap; }
