/* ==========================================================================
   TranZact Deployment Pipeline - Dashboard Styles
   Dark theme inspired by GitHub Dark
   ========================================================================== */

.canary-loading-overlay {
    position: absolute;
    inset: 0;
    background: rgba(22, 27, 34, 0.92);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    z-index: 10;
    border-radius: 8px;
    font-size: 14px;
    color: #8b949e;
}
.canary-loading-overlay.hidden {
    display: none;
}

.sync-text {
    color: #3fb950;
    font-size: 13px;
}

.deploy-info {
    margin-top: 10px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.deploy-info-row {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: #8b949e;
}

.deploy-env-label {
    font-size: 10px;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: 4px;
    flex-shrink: 0;
    text-align: center;
    display: inline-block;
    white-space: nowrap;
    color: #fff;
}

.stable-label {
    background: #1f6feb;
    color: #fff !important;
    font-size: 10px !important;
}

.canary-label {
    background: #238636;
    color: #fff !important;
    font-size: 10px !important;
}

.deploy-sha {
    font-family: monospace;
    color: #58a6ff;
    background: #0d1117;
    padding: 1px 5px;
    border-radius: 3px;
    font-size: 11px;
    flex-shrink: 0;
}

.deploy-msg {
    color: #c9d1d9;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex: 1;
    min-width: 0;
}

.deploy-time {
    color: #8b949e;
    flex-shrink: 0;
    font-size: 11px;
}

.deploy-none {
    color: #484f58;
    font-style: italic;
}

/* ---- Overview Sidebar Layout ---- */
.overview-layout {
    display: flex;
    gap: 0;
    min-height: calc(100vh - 160px);
}

.repo-sidebar {
    width: 240px;
    flex-shrink: 0;
    background: #161b22;
    border: 1px solid #30363d;
    border-radius: 8px 0 0 8px;
    overflow-y: auto;
}

.repo-sidebar-header {
    padding: 14px 16px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #8b949e;
    border-bottom: 1px solid #30363d;
}

.repo-sidebar-list {
    display: flex;
    flex-direction: column;
}

.repo-sidebar-item {
    padding: 12px 16px;
    cursor: pointer;
    border-bottom: 1px solid #21262d;
    transition: background 0.15s;
}

.repo-sidebar-item:hover {
    background: #1c2128;
}

.repo-sidebar-item.active {
    background: #1f6feb22;
    border-left: 3px solid #1f6feb;
}

.repo-sidebar-item-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
}

.repo-sidebar-name {
    font-size: 14px;
    font-weight: 600;
    color: #f0f6fc;
}

.repo-sidebar-sub {
    font-size: 11px;
    color: #8b949e;
    margin-top: 2px;
}

.badge-sm {
    font-size: 10px;
    padding: 2px 6px;
}

/* ---- Repo Detail Panel ---- */
.repo-detail {
    flex: 1;
    background: #161b22;
    border: 1px solid #30363d;
    border-left: none;
    border-radius: 0 8px 8px 0;
    padding: 24px;
    overflow-y: auto;
}

.repo-detail-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 200px;
    color: #484f58;
    font-size: 14px;
}

.repo-detail-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid #30363d;
}

.repo-detail-name {
    font-size: 20px;
    font-weight: 700;
    color: #f0f6fc;
    margin: 0;
}

.repo-detail-display {
    font-size: 13px;
    color: #8b949e;
    margin-top: 2px;
}

.repo-detail-section {
    margin-bottom: 24px;
}

.repo-detail-section-title {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #8b949e;
    margin: 0 0 12px 0;
}

.branch-status-box {
    background: #0d1117;
    border: 1px solid #21262d;
    border-radius: 6px;
    padding: 12px 16px;
}

/* ---- Deploy Cards ---- */
.deploy-cards {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.deploy-card {
    background: #0d1117;
    border: 1px solid #21262d;
    border-radius: 6px;
    overflow: hidden;
}

.deploy-card-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border-bottom: 1px solid #21262d;
    background: #161b2280;
}

.deploy-card-branch {
    font-size: 11px;
    color: #8b949e;
}

.deploy-card-body {
    padding: 12px 14px;
}

.deploy-card-row {
    display: flex;
    align-items: baseline;
    gap: 10px;
    margin-bottom: 6px;
}

.deploy-card-row:last-child {
    margin-bottom: 0;
}

.deploy-card-label {
    font-size: 11px;
    color: #8b949e;
    width: 60px;
    flex-shrink: 0;
}

.deploy-card-value {
    font-size: 13px;
    color: #c9d1d9;
    word-break: break-word;
}

/* ---- Detail Actions ---- */
.repo-detail-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

/* ---- Detail Commits ---- */
.repo-detail-commits {
    background: #0d1117;
    border: 1px solid #21262d;
    border-radius: 6px;
    max-height: 300px;
    overflow-y: auto;
}

.repo-detail-commits .commit-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 14px;
    border-bottom: 1px solid #21262d;
    font-size: 13px;
}

.repo-detail-commits .commit-item:last-child {
    border-bottom: none;
}

.commit-author {
    color: #8b949e;
    font-size: 12px;
    flex-shrink: 0;
    margin-left: auto;
}

/* --- Reset & Base --- */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --bg-primary: #0d1117;
    --bg-secondary: #161b22;
    --bg-tertiary: #1c2128;
    --border: #30363d;
    --border-light: #3d444d;
    --text-primary: #e6edf3;
    --text-secondary: #8b949e;
    --text-muted: #6e7681;
    --blue: #1f6feb;
    --blue-hover: #388bfd;
    --green: #238636;
    --green-hover: #2ea043;
    --green-light: #3fb950;
    --red: #da3633;
    --red-hover: #f85149;
    --yellow: #d29922;
    --yellow-light: #e3b341;
    --purple: #8957e5;
    --cyan: #58a6ff;
    --orange: #d18616;
    --radius: 6px;
    --radius-lg: 8px;
    --shadow: 0 1px 3px rgba(0,0,0,0.3), 0 1px 2px rgba(0,0,0,0.4);
    --shadow-lg: 0 4px 12px rgba(0,0,0,0.4);
    --transition: 150ms ease;
    --transition-slow: 300ms ease;
}

html {
    font-size: 14px;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Noto Sans', Helvetica, Arial, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.5;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

.hidden {
    display: none !important;
}

/* --- Scrollbar --- */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: var(--bg-primary);
}
::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--border-light);
}

/* ==========================================================================
   Login Screen
   ========================================================================== */

.login-screen {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 20px;
    background: var(--bg-primary);
}

.login-container {
    width: 100%;
    max-width: 380px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 40px 32px;
    box-shadow: var(--shadow-lg);
    animation: fadeInUp 0.4s ease;
}

.login-header {
    text-align: center;
    margin-bottom: 32px;
}

.login-icon {
    margin-bottom: 16px;
}

.login-header h1 {
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.login-subtitle {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 6px;
}

.form-group input,
.input {
    width: 100%;
    padding: 8px 12px;
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text-primary);
    font-size: 0.95rem;
    transition: border-color var(--transition);
    outline: none;
}

.form-group input:focus,
.input:focus {
    border-color: var(--blue);
    box-shadow: 0 0 0 3px rgba(31, 111, 235, 0.15);
}

.form-group input::placeholder,
.input::placeholder {
    color: var(--text-muted);
}

.login-error {
    background: rgba(218, 54, 51, 0.1);
    border: 1px solid var(--red);
    color: var(--red-hover);
    padding: 8px 12px;
    border-radius: var(--radius);
    font-size: 0.85rem;
    margin-bottom: 16px;
}

/* ==========================================================================
   Buttons
   ========================================================================== */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 16px;
    font-size: 0.9rem;
    font-weight: 500;
    border: 1px solid transparent;
    border-radius: var(--radius);
    cursor: pointer;
    transition: all var(--transition);
    white-space: nowrap;
    line-height: 1.3;
    font-family: inherit;
    text-decoration: none;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-full {
    width: 100%;
}

.btn-sm {
    padding: 4px 10px;
    font-size: 0.8rem;
}

.btn-primary {
    background: var(--blue);
    color: #fff;
    border-color: var(--blue);
}
.btn-primary:hover:not(:disabled) {
    background: var(--blue-hover);
    border-color: var(--blue-hover);
}

.btn-success {
    background: var(--green);
    color: #fff;
    border-color: var(--green);
}
.btn-success:hover:not(:disabled) {
    background: var(--green-hover);
    border-color: var(--green-hover);
}

.btn-danger {
    background: var(--red);
    color: #fff;
    border-color: var(--red);
}
.btn-danger:hover:not(:disabled) {
    background: var(--red-hover);
    border-color: var(--red-hover);
}

.btn-outline {
    background: transparent;
    color: var(--text-primary);
    border-color: var(--border);
}
.btn-outline:hover:not(:disabled) {
    background: var(--bg-tertiary);
    border-color: var(--border-light);
}

.btn-outline-danger {
    background: transparent;
    color: var(--red);
    border-color: var(--red);
}
.btn-outline-danger:hover:not(:disabled) {
    background: rgba(218, 54, 51, 0.1);
}

.btn-ghost {
    background: transparent;
    color: var(--text-secondary);
    border: none;
    padding: 4px 8px;
}
.btn-ghost:hover:not(:disabled) {
    color: var(--text-primary);
    background: var(--bg-tertiary);
}

.btn-info {
    background: var(--border);
    color: var(--text-primary);
    border-color: var(--border);
}
.btn-info:hover:not(:disabled) {
    background: var(--border-light);
}

/* ==========================================================================
   Top Bar
   ========================================================================== */

.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 24px;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
}

.topbar-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.topbar-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
}

.topbar-center {
    display: flex;
    align-items: center;
}

.canary-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    border-radius: 20px;
    border: 1px solid var(--border);
}

.canary-indicator .canary-label {
    color: var(--text-secondary);
    font-size: 0.85rem;
    background: none;
    padding: 0;
    min-width: auto;
}

.canary-pct {
    font-weight: 700;
    font-size: 1rem;
    color: var(--yellow-light);
    min-width: 40px;
    text-align: center;
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-info {
    color: var(--text-secondary);
    font-size: 0.85rem;
}

/* ==========================================================================
   Tab Navigation
   ========================================================================== */

.tab-nav {
    display: flex;
    gap: 0;
    padding: 0 24px;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border);
}

.tab-link {
    padding: 10px 16px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    border-bottom: 2px solid transparent;
    transition: all var(--transition);
}

.tab-link:hover {
    color: var(--text-primary);
}

.tab-link.active {
    color: var(--text-primary);
    border-bottom-color: var(--cyan);
}

/* ==========================================================================
   Content Area
   ========================================================================== */

.content {
    padding: 24px;
    max-width: 1400px;
    margin: 0 auto;
}

.tab-panel {
    display: none;
    animation: fadeIn 0.25s ease;
}

.tab-panel.active {
    display: block;
}

.section-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 24px 0 12px 0;
}

.section-title:first-child {
    margin-top: 0;
}

/* ==========================================================================
   Summary Cards
   ========================================================================== */

.summary-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 8px;
}

.summary-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 20px;
    text-align: center;
    transition: border-color var(--transition);
}

.summary-card:hover {
    border-color: var(--border-light);
}

.summary-card-label {
    font-size: 0.8rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.summary-card-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.2;
}

.summary-card-sub {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 4px;
}

/* ==========================================================================
   Repository Cards
   ========================================================================== */

.repo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(420px, 1fr));
    gap: 16px;
}

.repo-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 20px;
    transition: all var(--transition);
    animation: cardAppear 0.3s ease;
}

.repo-card:hover {
    border-color: var(--border-light);
    box-shadow: var(--shadow);
}

.repo-card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 12px;
}

.repo-name {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--cyan);
}

.repo-display-name {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-top: 2px;
}

.repo-status-info {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 14px;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.ahead-behind {
    display: flex;
    gap: 10px;
}

.ahead-behind span {
    font-size: 0.8rem;
}

.ahead-count {
    color: var(--green-light);
}

.behind-count {
    color: var(--red-hover);
}

.repo-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 4px;
}

.repo-commits-toggle {
    background: none;
    border: none;
    color: var(--cyan);
    cursor: pointer;
    font-size: 0.8rem;
    padding: 4px 0;
    margin-top: 8px;
    font-family: inherit;
    transition: color var(--transition);
}

.repo-commits-toggle:hover {
    color: var(--blue-hover);
}

.repo-commits {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid var(--border);
    animation: slideDown 0.2s ease;
}

.commit-item {
    display: flex;
    gap: 8px;
    padding: 4px 0;
    font-size: 0.8rem;
}

.commit-sha {
    font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
    color: var(--cyan);
    flex-shrink: 0;
}

.commit-msg {
    color: var(--text-secondary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.commit-meta {
    color: var(--text-muted, #484f58);
    font-size: 0.7rem;
    white-space: nowrap;
    flex-shrink: 0;
}

.branch-commits-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.branch-commits-col {
    background: var(--card-bg, #161b22);
    border: 1px solid var(--border, #30363d);
    border-radius: 6px;
    overflow: hidden;
}

.branch-commits-header {
    padding: 8px 12px;
    border-bottom: 1px solid var(--border, #30363d);
    background: rgba(255,255,255,0.02);
}

.branch-commits-col .commit-item {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 8px;
    padding: 6px 12px;
    font-size: 0.8rem;
    border-bottom: 1px solid var(--border, #30363d);
}

.branch-commits-col .commit-item:last-child {
    border-bottom: none;
}

/* ==========================================================================
   Badges
   ========================================================================== */

.badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 10px;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 12px;
    letter-spacing: 0.2px;
    white-space: nowrap;
}

.badge-synced {
    background: rgba(35, 134, 54, 0.15);
    color: var(--green-light);
    border: 1px solid rgba(35, 134, 54, 0.3);
}

.badge-ahead {
    background: rgba(210, 153, 34, 0.15);
    color: var(--yellow-light);
    border: 1px solid rgba(210, 153, 34, 0.3);
}

.badge-behind {
    background: rgba(218, 54, 51, 0.15);
    color: var(--red-hover);
    border: 1px solid rgba(218, 54, 51, 0.3);
}

.badge-diverged {
    background: rgba(137, 87, 229, 0.15);
    color: var(--purple);
    border: 1px solid rgba(137, 87, 229, 0.3);
}

.badge-env {
    font-size: 0.7rem;
    text-transform: uppercase;
}

.badge-canary {
    background: rgba(210, 153, 34, 0.15);
    color: var(--yellow-light);
    border: 1px solid rgba(210, 153, 34, 0.3);
}

.badge-stable {
    background: rgba(35, 134, 54, 0.15);
    color: var(--green-light);
    border: 1px solid rgba(35, 134, 54, 0.3);
}

/* ==========================================================================
   Deployment Status Badges
   ========================================================================== */

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.8rem;
    font-weight: 500;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.status-success .status-dot { background: var(--green-light); }
.status-success { color: var(--green-light); }

.status-failure .status-dot { background: var(--red-hover); }
.status-failure { color: var(--red-hover); }

.status-running .status-dot {
    background: var(--yellow);
    animation: pulse 1.5s infinite;
}
.status-running { color: var(--yellow-light); }

.status-cancelled .status-dot { background: var(--text-muted); }
.status-cancelled { color: var(--text-muted); }

.status-pending .status-dot {
    background: var(--yellow);
    animation: pulse 1.5s infinite;
}
.status-pending { color: var(--yellow-light); }

/* ==========================================================================
   Filter Bar
   ========================================================================== */

.filter-bar {
    display: flex;
    align-items: flex-end;
    gap: 16px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.filter-group label {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.filter-group select {
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text-primary);
    padding: 6px 10px;
    font-size: 0.85rem;
    font-family: inherit;
    cursor: pointer;
    outline: none;
    min-width: 160px;
}

.filter-group select:focus {
    border-color: var(--blue);
}

/* ==========================================================================
   Data Table
   ========================================================================== */

.table-container {
    overflow-x: auto;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
}

.data-table thead {
    background: var(--bg-tertiary);
}

.data-table th {
    padding: 10px 14px;
    text-align: left;
    font-weight: 600;
    color: var(--text-secondary);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
}

.data-table td {
    padding: 10px 14px;
    border-bottom: 1px solid var(--border);
    color: var(--text-primary);
    vertical-align: middle;
}

.data-table tbody tr {
    transition: background var(--transition);
}

.data-table tbody tr:hover {
    background: var(--bg-tertiary);
}

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

.data-table tbody tr.clickable {
    cursor: pointer;
}

.table-loading {
    text-align: center;
    padding: 30px !important;
    color: var(--text-secondary);
}

.table-empty {
    text-align: center;
    padding: 30px !important;
    color: var(--text-muted);
}

.commit-link {
    font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
    font-size: 0.8rem;
    color: var(--cyan);
    text-decoration: none;
}

.commit-link:hover {
    text-decoration: underline;
}

.duration-text {
    color: var(--text-secondary);
    font-size: 0.8rem;
}

.time-text {
    color: var(--text-secondary);
    font-size: 0.8rem;
    white-space: nowrap;
}

/* ==========================================================================
   Health Cards
   ========================================================================== */

.health-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 12px;
    margin-bottom: 8px;
}

.health-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 16px;
    transition: border-color var(--transition);
    animation: cardAppear 0.3s ease;
}

.health-card:hover {
    border-color: var(--border-light);
}

.health-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}

.health-card-title {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-primary);
    word-break: break-all;
}

.health-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}

.health-dot-healthy {
    background: var(--green-light);
    box-shadow: 0 0 6px rgba(63, 185, 80, 0.4);
}

.health-dot-unhealthy {
    background: var(--red-hover);
    box-shadow: 0 0 6px rgba(248, 81, 73, 0.4);
}

.health-dot-unknown {
    background: var(--text-muted);
}

.health-card-details {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.health-detail-row {
    display: flex;
    justify-content: space-between;
    padding: 3px 0;
}

.health-detail-label {
    color: var(--text-muted);
}

.health-detail-value {
    color: var(--text-primary);
    font-family: 'SFMono-Regular', Consolas, monospace;
    font-size: 0.8rem;
}

/* ==========================================================================
   Settings
   ========================================================================== */

.settings-section {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 24px;
    margin-bottom: 20px;
}

.settings-section .section-title {
    margin-top: 0;
    margin-bottom: 16px;
}

.canary-control {
    max-width: 500px;
}

.slider-container {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 16px;
}

.slider-container input[type="range"] {
    flex: 1;
    -webkit-appearance: none;
    appearance: none;
    height: 6px;
    background: var(--border);
    border-radius: 3px;
    outline: none;
}

.slider-container input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--blue);
    cursor: pointer;
    border: 2px solid var(--bg-primary);
    transition: transform var(--transition);
}

.slider-container input[type="range"]::-webkit-slider-thumb:hover {
    transform: scale(1.2);
}

.slider-container input[type="range"]::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--blue);
    cursor: pointer;
    border: 2px solid var(--bg-primary);
}

.slider-value {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--yellow-light);
    min-width: 60px;
    text-align: right;
}

.preset-buttons {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.preset-btn.active {
    border-color: var(--blue);
    color: var(--blue);
    background: rgba(31, 111, 235, 0.1);
}

.lambda-versions {
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
}

.version-row {
    display: flex;
    justify-content: space-between;
    padding: 4px 0;
    font-size: 0.85rem;
}

.version-label {
    color: var(--text-secondary);
}

.version-value {
    color: var(--text-primary);
    font-family: 'SFMono-Regular', Consolas, monospace;
}

.checker-control {
    max-width: 500px;
}

.checker-input-row {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
}

.checker-input-row .input {
    flex: 1;
}

.checker-result {
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px;
    animation: fadeIn 0.2s ease;
}

.result-row {
    display: flex;
    justify-content: space-between;
    padding: 4px 0;
    font-size: 0.85rem;
}

.result-label {
    color: var(--text-secondary);
}

.result-value {
    color: var(--text-primary);
    font-weight: 600;
}

.result-target-canary {
    color: var(--yellow-light);
}

.result-target-stable {
    color: var(--green-light);
}

/* ==========================================================================
   Modal
   ========================================================================== */

.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    animation: fadeIn 0.15s ease;
    padding: 20px;
}

.modal {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 460px;
    box-shadow: var(--shadow-lg);
    animation: scaleIn 0.2s ease;
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
}

.modal-header h3 {
    font-size: 1rem;
    font-weight: 600;
}

.modal-close {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1.4rem;
    cursor: pointer;
    padding: 0;
    line-height: 1;
    transition: color var(--transition);
}

.modal-close:hover {
    color: var(--text-primary);
}

.modal-body {
    padding: 20px;
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

.modal-body strong {
    color: var(--text-primary);
}

.modal-body code {
    background: var(--bg-primary);
    padding: 2px 6px;
    border-radius: 3px;
    font-family: 'SFMono-Regular', Consolas, monospace;
    font-size: 0.85em;
    color: var(--cyan);
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    padding: 12px 20px;
    border-top: 1px solid var(--border);
}

/* ==========================================================================
   Toast Notifications
   ========================================================================== */

.toast-container {
    position: fixed;
    top: 16px;
    right: 16px;
    z-index: 2000;
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-width: 380px;
}

.toast {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 16px;
    border-radius: var(--radius);
    font-size: 0.85rem;
    line-height: 1.4;
    box-shadow: var(--shadow-lg);
    animation: slideInRight 0.3s ease;
    border: 1px solid;
    min-width: 280px;
}

.toast-removing {
    animation: slideOutRight 0.3s ease forwards;
}

.toast-icon {
    font-size: 1.1rem;
    flex-shrink: 0;
    line-height: 1;
    margin-top: 1px;
}

.toast-content {
    flex: 1;
}

.toast-title {
    font-weight: 600;
    margin-bottom: 2px;
}

.toast-message {
    color: var(--text-secondary);
    font-size: 0.8rem;
}

.toast-close {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 1rem;
    padding: 0;
    line-height: 1;
    flex-shrink: 0;
}

.toast-close:hover {
    color: var(--text-primary);
}

.toast-success {
    background: var(--bg-secondary);
    border-color: var(--green);
}
.toast-success .toast-icon { color: var(--green-light); }
.toast-success .toast-title { color: var(--green-light); }

.toast-error {
    background: var(--bg-secondary);
    border-color: var(--red);
}
.toast-error .toast-icon { color: var(--red-hover); }
.toast-error .toast-title { color: var(--red-hover); }

.toast-info {
    background: var(--bg-secondary);
    border-color: var(--blue);
}
.toast-info .toast-icon { color: var(--cyan); }
.toast-info .toast-title { color: var(--cyan); }

/* ==========================================================================
   Loading & Spinner
   ========================================================================== */

.loading-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 40px;
    color: var(--text-secondary);
    font-size: 0.9rem;
    grid-column: 1 / -1;
}

.spinner {
    width: 20px;
    height: 20px;
    border: 2px solid var(--border);
    border-top-color: var(--cyan);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    flex-shrink: 0;
}

.spinner-sm {
    width: 14px;
    height: 14px;
    border-width: 2px;
}

/* ==========================================================================
   Animations
   ========================================================================== */

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(16px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes cardAppear {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes slideDown {
    from { opacity: 0; max-height: 0; }
    to { opacity: 1; max-height: 500px; }
}

@keyframes slideInRight {
    from { opacity: 0; transform: translateX(100%); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes slideOutRight {
    from { opacity: 1; transform: translateX(0); }
    to { opacity: 0; transform: translateX(100%); }
}

@keyframes scaleIn {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 768px) {
    .topbar {
        flex-wrap: wrap;
        gap: 10px;
        padding: 10px 16px;
    }

    .topbar-center {
        order: 3;
        width: 100%;
        justify-content: center;
    }

    .content {
        padding: 16px;
    }

    .summary-cards {
        grid-template-columns: 1fr;
    }

    .repo-grid {
        grid-template-columns: 1fr;
    }

    .health-grid {
        grid-template-columns: 1fr;
    }

    .tab-nav {
        padding: 0 16px;
        overflow-x: auto;
    }

    .filter-bar {
        flex-direction: column;
        align-items: stretch;
    }

    .filter-group select {
        min-width: auto;
        width: 100%;
    }
}
