/* ── FaxServer Dashboard Styles ─────────────────────────────────────────────
   Scope: all fq-* classes used by FaxQueueDashboard.razor
────────────────────────────────────────────────────────────────────────────── */

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

body {
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    font-size: 13px;
    background: #f5f5f5;
    color: #1a1a1a;
}

.fq-shell { min-height: 100vh; background: #fff; display: flex; flex-direction: column; }

/* Top bar */
.fq-topbar { display: flex; align-items: center; justify-content: space-between; padding: 12px 20px; border-bottom: 1px solid #e5e5e5; background: #fff; gap: 12px; }
.fq-topbar-left { display: flex; align-items: center; gap: 10px; }
.fq-title { font-size: 15px; font-weight: 600; color: #111; }
.fq-tenant-pill { font-size: 11px; font-weight: 500; padding: 2px 9px; border-radius: 20px; background: #f0f0f0; border: 1px solid #ddd; color: #555; }
.fq-live-indicator { font-size: 11px; color: #555; display: flex; align-items: center; gap: 5px; }
.fq-live-indicator::before { content: ''; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: #ccc; }
.fq-live-indicator.live::before { background: #16a34a; }
.fq-live-indicator.reconnecting::before { background: #d97706; }
.fq-topbar-actions { display: flex; gap: 8px; }
.fq-btn { font-size: 12px; padding: 5px 12px; border: 1px solid #d1d5db; border-radius: 6px; background: #fff; color: #374151; cursor: pointer; display: inline-flex; align-items: center; gap: 5px; }
.fq-btn:hover { background: #f9fafb; }

/* Metrics row */
.fq-metrics-row { display: grid; grid-template-columns: repeat(5, 1fr); border-bottom: 1px solid #e5e5e5; }
.fq-metric-card { padding: 14px 20px; border-right: 1px solid #e5e5e5; }
.fq-metric-card:last-child { border-right: none; }
.fq-metric-label { font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em; color: #9ca3af; margin-bottom: 5px; }
.fq-metric-value { font-size: 26px; font-weight: 600; line-height: 1; color: #111; }
.fq-metric-card.success .fq-metric-value { color: #16a34a; }
.fq-metric-card.warning .fq-metric-value { color: #d97706; }
.fq-metric-card.danger  .fq-metric-value { color: #dc2626; }

/* Node strip */
.fq-node-strip { display: flex; align-items: center; gap: 6px; padding: 8px 20px; border-bottom: 1px solid #e5e5e5; background: #fafafa; overflow-x: auto; flex-wrap: wrap; }
.fq-node-strip-label { font-size: 10px; text-transform: uppercase; letter-spacing: 0.07em; color: #9ca3af; font-weight: 500; white-space: nowrap; margin-right: 4px; }
.fq-node-chip { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; padding: 3px 9px; border-radius: 4px; white-space: nowrap; border: 1px solid transparent; font-weight: 500; }
.fq-node-online   { background: #f0fdf4; color: #15803d; border-color: #bbf7d0; }
.fq-node-degraded { background: #fffbeb; color: #92400e; border-color: #fde68a; }
.fq-node-offline  { background: #fef2f2; color: #991b1b; border-color: #fecaca; }
.fq-node-dot { width: 6px; height: 6px; border-radius: 50%; display: inline-block; }
.fq-node-online   .fq-node-dot { background: #16a34a; }
.fq-node-degraded .fq-node-dot { background: #d97706; }
.fq-node-offline  .fq-node-dot { background: #dc2626; }

/* Queue panel */
.fq-queue-wrapper { flex: 1; display: flex; flex-direction: column; }
.fq-queue-header { display: flex; align-items: center; justify-content: space-between; padding: 10px 20px; border-bottom: 1px solid #e5e5e5; gap: 12px; flex-wrap: wrap; }
.fq-queue-title { font-size: 13px; font-weight: 600; color: #111; display: flex; align-items: center; gap: 8px; }
.fq-count-badge { font-size: 11px; padding: 1px 8px; border-radius: 20px; background: #f3f4f6; color: #6b7280; border: 1px solid #e5e7eb; font-weight: 400; }

/* Filter tabs */
.fq-filter-tabs { display: flex; }
.fq-tab { font-size: 11px; padding: 4px 11px; border: 1px solid #d1d5db; border-left: none; background: #fff; color: #6b7280; cursor: pointer; }
.fq-tab:first-child { border-left: 1px solid #d1d5db; border-radius: 6px 0 0 6px; }
.fq-tab:last-child { border-radius: 0 6px 6px 0; }
.fq-tab:hover { background: #f9fafb; }
.fq-tab.active { background: #111; color: #fff; border-color: #111; }

/* Table */
.fq-table-scroll { overflow-x: auto; }
.fq-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.fq-table th { font-size: 10px; text-transform: uppercase; letter-spacing: 0.07em; color: #9ca3af; padding: 8px 16px; text-align: left; border-bottom: 1px solid #e5e5e5; font-weight: 500; background: #fafafa; white-space: nowrap; }
.fq-table td { padding: 9px 16px; border-bottom: 1px solid #f3f4f6; vertical-align: middle; color: #374151; }
.fq-table tr:last-child td { border-bottom: none; }
.fq-table tr:hover td { background: #fafafa; }
.fq-table tr.fq-row-new td { background: #f0fdf4; animation: rowFadeOut 2.5s ease forwards; }
@keyframes rowFadeOut { 0% { background: #f0fdf4; } 100% { background: transparent; } }

.fq-job-id { font-family: ui-monospace, monospace; font-size: 11px; color: #6b7280; background: #f3f4f6; padding: 1px 5px; border-radius: 3px; }
.fq-dir-tag { font-size: 10px; color: #9ca3af; text-transform: uppercase; letter-spacing: 0.05em; }
.fq-number    { font-size: 12px; color: #111; }
.fq-pages     { font-size: 12px; color: #6b7280; }
.fq-node-cell { font-size: 11px; color: #9ca3af; }
.fq-queued-at { font-size: 11px; color: #9ca3af; white-space: nowrap; }

/* Status badges */
.fq-status-badge { display: inline-flex; align-items: center; font-size: 11px; font-weight: 500; padding: 2px 8px; border-radius: 4px; white-space: nowrap; }
.fq-status-queued   { background: #eff6ff; color: #1d4ed8; }
.fq-status-sending  { background: #fffbeb; color: #92400e; }
.fq-status-sent     { background: #f0fdf4; color: #15803d; }
.fq-status-received { background: #f5f3ff; color: #6d28d9; }
.fq-status-failed   { background: #fef2f2; color: #991b1b; }
.fq-status-retrying { background: #fdf2f8; color: #9d174d; }
.fq-status-cancelled{ background: #f9fafb; color: #6b7280; }

/* Progress */
.fq-progress { height: 3px; background: #e5e7eb; border-radius: 2px; width: 80px; margin-top: 4px; overflow: hidden; }
.fq-progress-fill { height: 100%; background: #d97706; border-radius: 2px; transition: width 0.3s ease; }
.fq-retry-tag { font-size: 10px; color: #dc2626; margin-left: 5px; }

/* Action button */
.fq-action-btn { font-size: 11px; padding: 3px 8px; border: 1px solid #e5e7eb; border-radius: 4px; background: #fff; color: #6b7280; cursor: pointer; }
.fq-action-btn:hover { background: #f3f4f6; color: #111; }

/* Empty state */
.fq-empty { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 60px 20px; color: #9ca3af; gap: 10px; }
.fq-empty p { font-size: 13px; }

/* Responsive */
@media (max-width: 768px) {
    .fq-metrics-row { grid-template-columns: repeat(2, 1fr); }
    .fq-metric-card:nth-child(2) { border-right: none; }
    .fq-topbar { flex-wrap: wrap; }
}

/* ── Login page ─────────────────────────────────────────────────────────────── */
.login-shell { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: #f5f5f5; }
.login-card { background: #fff; border: 1px solid #e5e5e5; border-radius: 12px; padding: 40px; width: 100%; max-width: 380px; box-shadow: 0 2px 8px rgba(0,0,0,0.06); }
.login-logo { font-size: 36px; color: #111; text-align: center; margin-bottom: 12px; }
.login-title { font-size: 20px; font-weight: 700; text-align: center; color: #111; margin-bottom: 4px; }
.login-sub { font-size: 13px; color: #9ca3af; text-align: center; margin-bottom: 28px; }
.login-error { background: #fef2f2; border: 1px solid #fecaca; color: #991b1b; font-size: 12px; padding: 8px 12px; border-radius: 6px; margin-bottom: 16px; }
.login-form { display: flex; flex-direction: column; gap: 14px; }
.login-field { display: flex; flex-direction: column; gap: 5px; }
.login-label { font-size: 12px; font-weight: 500; color: #374151; }
.login-input { font-size: 13px; padding: 8px 12px; border: 1px solid #d1d5db; border-radius: 6px; outline: none; transition: border-color 0.15s; }
.login-input:focus { border-color: #111; }
.login-input:disabled { background: #f9fafb; color: #9ca3af; }
.login-btn { font-size: 13px; font-weight: 600; padding: 10px; border: none; border-radius: 6px; background: #111; color: #fff; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 7px; transition: background 0.15s; margin-top: 4px; }
.login-btn:hover:not(:disabled) { background: #333; }
.login-btn:disabled { background: #9ca3af; cursor: not-allowed; }
@keyframes spin { to { transform: rotate(360deg); } }
.spin { animation: spin 0.8s linear infinite; display: inline-block; }
