:root {
  --brand: #4f46e5;
  --brand-dark: #3730a3;
  --bg: #f5f6fa;
  --card-bg: #ffffff;
  --border: #e5e7eb;
  --text-muted: #6b7280;
}

body {
  background: var(--bg);
  font-family: "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto, Arial, sans-serif;
  color: #1f2430;
}

.navbar-brand { font-weight: 700; letter-spacing: .2px; }

.app-sidebar {
  min-height: calc(100vh - 56px);
  background: #171a2b;
  color: #cfd2e6;
}
.app-sidebar a {
  color: #cfd2e6;
  text-decoration: none;
  display: block;
  padding: .55rem 1rem;
  border-radius: 6px;
  margin: 2px 8px;
  font-size: .92rem;
}
.app-sidebar a:hover, .app-sidebar a.active {
  background: rgba(255,255,255,.08);
  color: #fff;
}
.app-sidebar .sidebar-heading {
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: #7f8399;
  padding: 1rem 1rem .25rem;
}

.card { border: 1px solid var(--border); border-radius: 10px; box-shadow: 0 1px 2px rgba(16,24,40,.03); }
.stat-card { border-radius: 12px; padding: 1.1rem 1.25rem; background: var(--card-bg); border: 1px solid var(--border); }
.stat-card .stat-value { font-size: 1.7rem; font-weight: 700; }
.stat-card .stat-label { color: var(--text-muted); font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; }

.badge-priority-low { background:#e5f6ea; color:#1e7e34; }
.badge-priority-medium { background:#fff5e0; color:#9a6700; }
.badge-priority-high { background:#ffe8d9; color:#c2410c; }
.badge-priority-urgent { background:#fde2e2; color:#b91c1c; }

.badge-status-open { background:#e0edff; color:#1d4ed8; }
.badge-status-pending { background:#fef3c7; color:#92400e; }
.badge-status-progress { background:#e0e7ff; color:#4338ca; }
.badge-status-hold { background:#f3e8ff; color:#7e22ce; }
.badge-status-resolved { background:#dcfce7; color:#15803d; }
.badge-status-closed { background:#e5e7eb; color:#374151; }
.badge-status-reopened { background:#fde2e2; color:#b91c1c; }

.badge-priority-low, .badge-priority-medium, .badge-priority-high, .badge-priority-urgent,
.badge-status-open, .badge-status-pending, .badge-status-progress, .badge-status-hold,
.badge-status-resolved, .badge-status-closed, .badge-status-reopened {
  font-weight: 600; padding: .3em .6em; border-radius: 6px; font-size: .75rem;
}

.tier-pill {
  display:inline-block; width:1.6rem; height:1.6rem; line-height:1.6rem; text-align:center;
  border-radius:50%; background:var(--brand); color:#fff; font-size:.72rem; font-weight:700;
}

.reply-bubble { border-radius: 10px; padding: .9rem 1rem; margin-bottom: .75rem; border: 1px solid var(--border); }
.reply-bubble.agent { background:#f5f5ff; }
.reply-bubble.requester { background:#fff; }
.reply-bubble.private { background:#fff8e1; border-color:#f5d78a; }

.ticket-row:hover { background: #fafbff; cursor: pointer; }

.sla-breached { color:#b91c1c; font-weight:600; }
.ai-tag { font-size:.68rem; background:#eef2ff; color:#4338ca; padding:.15em .5em; border-radius:5px; font-weight:600; }

.login-shell {
  min-height: 100vh; display:flex; align-items:center; justify-content:center;
  background: linear-gradient(135deg, #4f46e5, #171a2b);
}
.login-card { width: 100%; max-width: 400px; }
