/* Assistant Service Styles */
:root {
  --color-bg: #ffffff;
  --color-surface: #f8fafc;
  --color-border: #e2e8f0;
  --color-text: #0f172a;
  --color-text-muted: #64748b;
  --color-primary: #0f172a;
  --color-success: #10b981;
  --color-error: #ef4444;
  --color-warning: #f59e0b;
  --color-info: #3b82f6;
}

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

body {
  font-family: "Inter", system-ui, -apple-system, sans-serif;
  background: var(--color-surface);
  color: var(--color-text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Header */
header {
  background: var(--color-bg);
  border-bottom: 1px solid var(--color-border);
  padding: 0.75rem 1.5rem;
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1400px;
  margin: 0 auto;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.logo .material-symbols-outlined {
  font-size: 1.5rem;
  color: var(--color-primary);
}

.logo h1 {
  font-size: 1.125rem;
  font-weight: 700;
}

nav {
  display: flex;
  gap: 0.5rem;
}

nav a {
  padding: 0.5rem 1rem;
  text-decoration: none;
  color: var(--color-text-muted);
  font-size: 0.875rem;
  font-weight: 500;
  border-radius: 0.375rem;
  transition: all 0.15s;
}

nav a:hover {
  background: var(--color-surface);
  color: var(--color-text);
}

nav a.nav-active {
  background: var(--color-primary);
  color: white;
}

/* Main Content */
main {
  flex: 1;
  padding: 1.5rem;
  max-width: 1400px;
  margin: 0 auto;
  width: 100%;
}

.page-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.page-header h2 {
  font-size: 1.5rem;
  font-weight: 700;
}

.badge {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--color-text-muted);
}

.badge-simple {
  background: #dbeafe;
  color: #1d4ed8;
  border-color: #93c5fd;
}
.badge-complex {
  background: #fef3c7;
  color: #b45309;
  border-color: #fcd34d;
}
.badge-path {
  background: #f3e8ff;
  color: #7c3aed;
  border-color: #c4b5fd;
}

/* Sessions Table */
.sessions-table-wrapper {
  background: var(--color-bg);
  border-radius: 0.5rem;
  border: 1px solid var(--color-border);
  overflow: hidden;
}

.sessions-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}

.sessions-table th {
  background: var(--color-surface);
  padding: 0.75rem 1rem;
  text-align: left;
  font-weight: 600;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-text-muted);
  border-bottom: 1px solid var(--color-border);
}

.sessions-table td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--color-border);
  vertical-align: middle;
}

.sessions-table tr:last-child td {
  border-bottom: none;
}

.sessions-table tr:hover {
  background: var(--color-surface);
}

.status-badge {
  font-size: 1rem;
}

.mono {
  font-family: "SF Mono", "Monaco", monospace;
  font-size: 0.8125rem;
}

.title-cell {
  max-width: 300px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.time-cell {
  color: var(--color-text-muted);
}

.empty-state {
  text-align: center;
  padding: 3rem !important;
  color: var(--color-text-muted);
}

.btn-view {
  background: var(--color-primary);
  color: white;
  padding: 0.375rem 0.75rem;
  border-radius: 0.375rem;
  text-decoration: none;
  font-size: 0.75rem;
  font-weight: 500;
  transition: opacity 0.15s;
}

.btn-view:hover {
  opacity: 0.9;
}

/* Session Detail */
.session-header {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: 0.5rem;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

.session-meta h2 {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
}

.meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 0.75rem;
}

.meta-item {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  font-size: 0.875rem;
  color: var(--color-text-muted);
}

.meta-item .material-symbols-outlined {
  font-size: 1rem;
}

/* Tabs */
.tabs {
  display: flex;
  gap: 0.25rem;
  margin-bottom: 1rem;
}

.tab {
  padding: 0.75rem 1.25rem;
  border: none;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 0.375rem 0.375rem 0 0;
  cursor: pointer;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--color-text-muted);
  transition: all 0.15s;
}

.tab:hover {
  background: var(--color-bg);
}

.tab.active {
  background: var(--color-bg);
  color: var(--color-text);
  border-bottom-color: var(--color-bg);
}

.tab-content {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: 0 0.5rem 0.5rem 0.5rem;
  padding: 1.5rem;
}

.audit-panel h3,
.debug-panel h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

.output-box,
.error-box {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 0.375rem;
  padding: 1rem;
  overflow-x: auto;
}

.output-box pre,
.output-pre {
  white-space: pre-wrap;
  word-break: break-word;
  font-family: "SF Mono", "Monaco", monospace;
  font-size: 0.8125rem;
  line-height: 1.5;
}

.error-box {
  background: #fef2f2;
  border-color: #fecaca;
  color: #991b1b;
}

.error-pre {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #991b1b;
  padding: 1rem;
  border-radius: 0.375rem;
  font-family: "SF Mono", "Monaco", monospace;
  font-size: 0.8125rem;
  white-space: pre-wrap;
  word-break: break-word;
}

.debug-table {
  width: 100%;
  margin-bottom: 1.5rem;
}

.debug-table td {
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--color-border);
}

.debug-table td:first-child {
  font-weight: 500;
  width: 150px;
  color: var(--color-text-muted);
}

.debug-panel h4 {
  font-size: 0.875rem;
  font-weight: 600;
  margin: 1.5rem 0 0.75rem;
}

.btn-external {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  background: var(--color-info);
  color: white;
  padding: 0.5rem 1rem;
  border-radius: 0.375rem;
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
}

.btn-external:hover {
  opacity: 0.9;
}

.no-output {
  color: var(--color-text-muted);
  font-style: italic;
}

.truncated {
  margin-top: 0.75rem;
  font-size: 0.75rem;
  color: var(--color-text-muted);
}

/* Footer */
footer {
  background: var(--color-bg);
  border-top: 1px solid var(--color-border);
  padding: 0.75rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.75rem;
  color: var(--color-text-muted);
}

.status-indicator {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: var(--color-success);
}
