/* ═══════════════════════════════════════════════════════
   Sentinel Tecnologia - Bots — Dashboard Styles
   Enterprise Multi-Agent AI Orchestration
   ═══════════════════════════════════════════════════════ */

:root {
    --bg-primary: #0a0e1a;
    --bg-secondary: #0f1629;
    --bg-card: #141b2d;
    --bg-card-hover: #1a2340;
    --bg-input: #0d1220;
    --border: #1e2a45;
    --border-hover: #2a3a5c;

    --text-primary: #e2e8f0;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --text-bright: #f8fafc;

    --accent: #06b6d4;
    --accent-glow: rgba(6, 182, 212, 0.15);
    --accent-hover: #22d3ee;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --info: #6366f1;

    --sidebar-width: 220px;
    --header-height: 56px;
    --radius: 8px;
    --radius-lg: 12px;
    --transition: all 0.2s ease;

    --priority-low: #64748b;
    --priority-medium: #f59e0b;
    --priority-high: #f97316;
    --priority-critical: #ef4444;

    --kanban-backlog: var(--text-secondary);
    --kanban-todo: var(--warning);
    --kanban-doing: var(--accent);
    --kanban-done: var(--success);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    display: flex;
    min-height: 100vh;
    overflow-x: hidden;
}

/* ─── Sidebar ──────────────────────────────────── */

#sidebar {
    width: var(--sidebar-width);
    background: var(--bg-secondary);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    z-index: 100;
    transition: transform 0.3s ease;
}

.sidebar-brand {
    padding: 20px 16px;
    display: flex;
    align-items: center;
    gap: 10px;
    border-bottom: 1px solid var(--border);
}

.brand-icon {
    font-size: 28px;
}

.brand-text {
    font-size: 18px;
    font-weight: 700;
    color: var(--accent);
    display: block;
}

.version {
    font-size: 11px;
    color: var(--text-muted);
    font-weight: 400;
    display: block;
}

.nav-section-label {
    font-size: 10px;
    font-weight: 600;
    color: var(--text-muted);
    letter-spacing: 1.5px;
    padding: 16px 20px 8px;
}

.nav-links {
    list-style: none;
    flex: 1;
    padding: 4px 8px;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: var(--radius);
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    transition: var(--transition);
    margin-bottom: 2px;
}

.nav-link:hover {
    background: var(--bg-card);
    color: var(--text-primary);
}

.nav-link.active {
    background: linear-gradient(135deg, rgba(6, 182, 212, 0.12), rgba(6, 182, 212, 0.05));
    color: var(--accent);
    border-left: 3px solid var(--accent);
}

.nav-icon {
    font-size: 16px;
    width: 22px;
    text-align: center;
}

.sidebar-footer {
    padding: 16px;
    border-top: 1px solid var(--border);
}

.system-status {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    animation: pulse 2s infinite;
}

.status-dot.online {
    background: var(--success);
    box-shadow: 0 0 8px var(--success);
}

.status-dot.offline {
    background: var(--danger);
    box-shadow: 0 0 8px var(--danger);
    animation: none;
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}

/* ─── Main Content ─────────────────────────────── */

#main-content {
    margin-left: var(--sidebar-width);
    flex: 1;
    padding: 0 24px 24px;
    min-height: 100vh;
}

#header {
    height: var(--header-height);
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    background: var(--bg-primary);
    z-index: 50;
    padding: 0;
    border-bottom: 1px solid var(--border);
    margin-bottom: 20px;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.header-left h1 {
    font-size: 20px;
    font-weight: 700;
}

.page-subtitle {
    font-size: 13px;
    color: var(--text-muted);
}

.header-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.live-badge {
    color: var(--success);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.provider-badge {
    font-size: 12px;
    color: var(--accent);
    padding: 4px 12px;
    border: 1px solid rgba(6, 182, 212, 0.3);
    border-radius: 20px;
    font-weight: 500;
}

.menu-btn {
    display: none;
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 20px;
    cursor: pointer;
}

.page {
    display: none;
}

.page.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ─── Stats Grid ───────────────────────────────── */

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    transition: var(--transition);
}

.stat-card:hover {
    border-color: var(--border-hover);
    transform: translateY(-1px);
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.stat-value {
    font-size: 28px;
    font-weight: 800;
    display: block;
    line-height: 1;
}

.stat-label {
    font-size: 11px;
    color: var(--text-muted);
    letter-spacing: 1px;
    font-weight: 600;
    text-transform: uppercase;
}

/* ─── Agent Monitor Grid ──────────────────────── */

.monitor-summary {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 16px;
}

.agent-monitor-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 16px;
}

.agent-monitor-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 20px;
    transition: var(--transition);
    cursor: pointer;
}

.agent-monitor-card:hover {
    border-color: var(--accent);
    box-shadow: 0 0 20px var(--accent-glow);
}

.agent-monitor-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
}

.agent-monitor-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.agent-monitor-avatar {
    width: 40px;
    height: 40px;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    background: var(--bg-input);
}

.agent-monitor-name {
    font-weight: 600;
    font-size: 14px;
}

.agent-monitor-role {
    font-size: 12px;
    color: var(--text-muted);
}

.badge-busy {
    padding: 3px 10px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 700;
    background: rgba(6, 182, 212, 0.15);
    color: var(--accent);
    border: 1px solid rgba(6, 182, 212, 0.3);
    letter-spacing: 0.5px;
}

.badge-idle {
    padding: 3px 10px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 700;
    background: rgba(100, 116, 139, 0.15);
    color: var(--text-muted);
    border: 1px solid rgba(100, 116, 139, 0.3);
    letter-spacing: 0.5px;
}

.agent-monitor-task {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 12px;
}

.agent-monitor-metrics {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    color: var(--text-muted);
    padding-top: 12px;
    border-top: 1px solid var(--border);
}

.agent-stack {
    margin-top: 8px;
    font-size: 11px;
    color: var(--text-muted);
}

.agent-stack span {
    color: var(--accent);
}

/* ─── Kanban Board ─────────────────────────────── */

.kanban-board {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-top: 16px;
}

.kanban-column {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 16px;
    min-height: 400px;
}

.kanban-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
}

.kanban-title {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 1.5px;
    color: var(--text-muted);
}

.todo-color {
    color: var(--warning);
}

.doing-color {
    color: var(--accent);
}

.done-color {
    color: var(--success);
}

.kanban-count {
    background: var(--bg-card);
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 600;
    color: var(--text-secondary);
}

.kanban-cards {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.kanban-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 14px;
    cursor: pointer;
    transition: var(--transition);
}

.kanban-card:hover {
    border-color: var(--accent);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.kanban-card-id {
    font-size: 11px;
    color: var(--text-muted);
    font-weight: 500;
}

.kanban-card-title {
    font-size: 14px;
    font-weight: 600;
    margin: 6px 0;
}

.kanban-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 10px;
}

.kanban-card-agent {
    background: var(--bg-input);
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 11px;
    color: var(--text-secondary);
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.kanban-card-sp {
    font-size: 11px;
    color: var(--text-muted);
    background: var(--bg-input);
    padding: 2px 8px;
    border-radius: 10px;
}

.priority-badge {
    font-size: 10px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 4px;
    letter-spacing: 0.5px;
}

.priority-LOW {
    background: rgba(100, 116, 139, 0.15);
    color: var(--priority-low);
}

.priority-MEDIUM {
    background: rgba(245, 158, 11, 0.15);
    color: var(--priority-medium);
}

.priority-HIGH {
    background: rgba(249, 115, 22, 0.15);
    color: var(--priority-high);
}

.priority-CRITICAL {
    background: rgba(239, 68, 68, 0.15);
    color: var(--priority-critical);
}

.kanban-card-move {
    font-size: 12px;
    color: var(--accent);
    cursor: pointer;
    opacity: 0;
    transition: var(--transition);
}

.kanban-card:hover .kanban-card-move {
    opacity: 1;
}

.btn-add-sprint-task {
    margin-top: 16px;
    background: var(--bg-card);
    border: 1px dashed var(--border);
    color: var(--text-secondary);
    padding: 12px 24px;
    border-radius: var(--radius);
    cursor: pointer;
    font-size: 13px;
    transition: var(--transition);
}

.btn-add-sprint-task:hover {
    border-color: var(--accent);
    color: var(--accent);
}

/* ─── Pipeline Table ───────────────────────────── */

.pipeline-table-wrap {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.pipeline-table {
    width: 100%;
    border-collapse: collapse;
}

.pipeline-table th {
    text-align: left;
    padding: 14px 16px;
    font-size: 11px;
    font-weight: 600;
    color: var(--text-muted);
    letter-spacing: 1px;
    border-bottom: 1px solid var(--border);
    background: var(--bg-secondary);
}

.pipeline-table td {
    padding: 14px 16px;
    font-size: 13px;
    border-bottom: 1px solid var(--border);
    color: var(--text-secondary);
}

.pipeline-table tr:hover td {
    background: var(--bg-card-hover);
}

.pipeline-status {
    padding: 3px 10px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.5px;
    display: inline-block;
}

.pipeline-status.success {
    background: rgba(16, 185, 129, 0.15);
    color: var(--success);
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.pipeline-status.running {
    background: rgba(245, 158, 11, 0.15);
    color: var(--warning);
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.pipeline-status.failed {
    background: rgba(239, 68, 68, 0.15);
    color: var(--danger);
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.branch-name {
    color: var(--accent);
    font-size: 12px;
}

.branch-name::before {
    content: "⌥ ";
    font-size: 11px;
}

/* ─── Task Table ───────────────────────────────── */

.task-table-wrap {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.task-table {
    width: 100%;
    border-collapse: collapse;
}

.task-table th {
    text-align: left;
    padding: 14px 16px;
    font-size: 11px;
    font-weight: 600;
    color: var(--text-muted);
    letter-spacing: 1px;
    border-bottom: 1px solid var(--border);
    background: var(--bg-secondary);
}

.task-table td {
    padding: 12px 16px;
    font-size: 13px;
    border-bottom: 1px solid var(--border);
}

.task-table tr {
    cursor: pointer;
    transition: var(--transition);
}

.task-table tr:hover td {
    background: var(--bg-card-hover);
}

.status-badge {
    padding: 3px 10px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    display: inline-block;
}

.status-success {
    background: rgba(16, 185, 129, 0.15);
    color: var(--success);
}

.status-failed {
    background: rgba(239, 68, 68, 0.15);
    color: var(--danger);
}

.status-pending {
    background: rgba(245, 158, 11, 0.15);
    color: var(--warning);
}

.btn-view {
    background: var(--bg-input);
    border: 1px solid var(--border);
    color: var(--accent);
    padding: 5px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 500;
    transition: var(--transition);
}

.btn-view:hover {
    background: var(--accent);
    color: var(--bg-primary);
}

/* ─── Projects Grid ────────────────────────────── */

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 16px;
}

.project-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 20px;
    transition: var(--transition);
}

.project-card:hover {
    border-color: var(--accent);
}

.project-card-title {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 4px;
}

.project-card-desc {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 12px;
}

.project-card-meta {
    display: flex;
    gap: 16px;
    font-size: 12px;
    color: var(--text-secondary);
    padding-top: 12px;
    border-top: 1px solid var(--border);
}

/* ─── Specs Layout ─────────────────────────────── */

.specs-layout {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 16px;
    min-height: 500px;
}

.specs-sidebar {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 8px;
}

.specs-agent-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 10px 12px;
    background: none;
    border: none;
    border-radius: var(--radius);
    color: var(--text-secondary);
    font-size: 13px;
    cursor: pointer;
    transition: var(--transition);
    text-align: left;
}

.specs-agent-btn:hover {
    background: var(--bg-card-hover);
    color: var(--text-primary);
}

.specs-agent-btn.active {
    background: var(--accent-glow);
    color: var(--accent);
}

.specs-content {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 24px;
}

.empty-specs {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: var(--text-muted);
}

.empty-icon {
    font-size: 48px;
    margin-bottom: 12px;
    opacity: 0.5;
}

.spec-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 20px;
}

.spec-avatar {
    font-size: 36px;
}

.spec-name {
    font-size: 20px;
    font-weight: 700;
}

.spec-role {
    font-size: 13px;
    color: var(--text-muted);
}

.spec-section {
    margin-top: 20px;
}

.spec-section h4 {
    font-size: 12px;
    color: var(--text-muted);
    letter-spacing: 1px;
    margin-bottom: 8px;
    text-transform: uppercase;
}

.spec-stat-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.spec-stat {
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 12px;
    text-align: center;
}

.spec-stat-value {
    font-size: 20px;
    font-weight: 700;
    display: block;
}

.spec-stat-label {
    font-size: 11px;
    color: var(--text-muted);
}

.spec-task-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 200px;
    overflow-y: auto;
}

.spec-task-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    background: var(--bg-input);
    border-radius: var(--radius);
    font-size: 12px;
    cursor: pointer;
    transition: var(--transition);
}

.spec-task-item:hover {
    background: var(--bg-card-hover);
}

/* ─── Form Elements ────────────────────────────── */

.page-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 12px;
}

.page-meta {
    font-size: 13px;
    color: var(--text-muted);
    display: block;
}

.header-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

.select-input {
    background: var(--bg-input);
    border: 1px solid var(--border);
    color: var(--text-primary);
    padding: 8px 12px;
    border-radius: var(--radius);
    font-size: 13px;
    font-family: inherit;
    cursor: pointer;
    transition: var(--transition);
    min-width: 140px;
}

.select-input:focus {
    border-color: var(--accent);
    outline: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent), #0891b2);
    color: var(--bg-primary);
    border: none;
    padding: 8px 18px;
    border-radius: var(--radius);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px var(--accent-glow);
}

.btn-secondary {
    background: var(--bg-input);
    border: 1px solid var(--border);
    color: var(--text-primary);
    padding: 8px 18px;
    border-radius: var(--radius);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
}

.btn-secondary:hover {
    border-color: var(--border-hover);
}

/* ─── Modals ───────────────────────────────────── */

.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 500;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
}

.modal-overlay.open {
    opacity: 1;
    pointer-events: all;
}

.modal {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    width: 90%;
    max-width: 520px;
    max-height: 85vh;
    overflow-y: auto;
    animation: modalIn 0.2s ease;
}

.modal-wide {
    max-width: 720px;
}

@keyframes modalIn {
    from {
        transform: scale(0.95) translateY(8px);
        opacity: 0;
    }

    to {
        transform: scale(1) translateY(0);
        opacity: 1;
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
}

.modal-header h3 {
    font-size: 16px;
    font-weight: 600;
}

.modal-close {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 18px;
    cursor: pointer;
    padding: 4px;
}

.modal-close:hover {
    color: var(--text-primary);
}

.form-group {
    padding: 0 20px;
    margin-top: 16px;
}

.form-group label {
    display: block;
    font-size: 12px;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text-primary);
    padding: 10px 12px;
    font-size: 13px;
    font-family: inherit;
    transition: var(--transition);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    border-color: var(--accent);
    outline: none;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
}

.form-row .form-group {
    padding: 0 10px 0 20px;
}

.form-row .form-group:last-child {
    padding: 0 20px 0 10px;
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    padding: 16px 20px;
    border-top: 1px solid var(--border);
    margin-top: 16px;
}

/* ─── Result Content ───────────────────────────── */

.result-content {
    padding: 20px;
    line-height: 1.7;
    font-size: 14px;
}

.result-meta {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border);
}

.result-meta div {
    font-size: 13px;
}

.result-meta span {
    color: var(--text-muted);
    font-size: 11px;
    display: block;
}

/* ─── Responsive ───────────────────────────────── */

@media (max-width: 1024px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .kanban-board {
        grid-template-columns: repeat(2, 1fr);
    }

    .specs-layout {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    #sidebar {
        transform: translateX(-100%);
    }

    #sidebar.open {
        transform: translateX(0);
    }

    #main-content {
        margin-left: 0;
    }

    .menu-btn {
        display: block;
    }

    .stats-grid {
        grid-template-columns: 1fr 1fr;
    }

    .kanban-board {
        grid-template-columns: 1fr;
    }

    .agent-monitor-grid {
        grid-template-columns: 1fr;
    }
}

/* ─── Smart Task Button ──────────────────────── */

.btn-smart {
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    border: none;
    color: white;
    padding: 8px 16px;
    border-radius: var(--radius);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 6px;
}

.btn-smart:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4);
}

.smart-info {
    display: flex;
    gap: 10px;
    align-items: center;
    background: rgba(99, 102, 241, 0.1);
    border: 1px solid rgba(99, 102, 241, 0.2);
    border-radius: var(--radius);
    padding: 12px 16px;
    margin: 12px 0;
    font-size: 13px;
    color: var(--text-secondary);
}

/* ─── Voice Button ───────────────────────────── */

.btn-voice {
    background: linear-gradient(135deg, #10b981, #34d399);
    border: none;
    color: white;
    padding: 6px 14px;
    border-radius: var(--radius);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.btn-voice:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.4);
}

/* ─── Git Log ────────────────────────────────── */

.git-commits {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.git-commit-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 14px 18px;
    display: flex;
    align-items: center;
    gap: 16px;
    transition: var(--transition);
}

.git-commit-card:hover {
    border-color: var(--accent);
}

.git-commit-hash {
    font-family: 'Courier New', monospace;
    font-size: 12px;
    color: var(--accent);
    background: var(--bg-input);
    padding: 4px 10px;
    border-radius: 4px;
    font-weight: 600;
    white-space: nowrap;
}

.git-commit-msg {
    flex: 1;
    font-size: 13px;
    font-weight: 500;
}

.git-commit-meta {
    font-size: 11px;
    color: var(--text-muted);
    white-space: nowrap;
}

/* ═══ APPROVALS TAB ═══ */

.approval-badge {
    background: var(--danger);
    color: #fff;
    border-radius: 10px;
    padding: 1px 7px;
    font-size: 11px;
    font-weight: 700;
    margin-left: 8px;
    animation: pulse-glow 2s infinite;
}

@keyframes pulse-glow {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.6;
    }
}

.approval-section {
    margin-bottom: 32px;
}

.approval-section-title {
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border);
}

.pending-title {
    color: var(--warning);
    border-color: rgba(245, 158, 11, 0.3);
}

.approved-title {
    color: var(--success);
    border-color: rgba(16, 185, 129, 0.3);
}

.rejected-title {
    color: var(--danger);
    border-color: rgba(239, 68, 68, 0.3);
}

.approval-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
    gap: 16px;
}

.approval-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    transition: all 0.2s;
}

.approval-card:hover {
    border-color: var(--border-hover);
    background: var(--bg-card-hover);
}

.approval-card.pending {
    border-left: 3px solid var(--warning);
}

.approval-card.approved {
    border-left: 3px solid var(--success);
}

.approval-card.rejected {
    border-left: 3px solid var(--danger);
}

.approval-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
}

.approval-card-title {
    font-weight: 600;
    font-size: 15px;
    color: var(--text-bright);
    line-height: 1.3;
}

.approval-card-status {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    padding: 3px 10px;
    border-radius: 12px;
    white-space: nowrap;
}

.status-pending {
    background: rgba(245, 158, 11, 0.15);
    color: var(--warning);
}

.status-approved {
    background: rgba(16, 185, 129, 0.15);
    color: var(--success);
}

.status-rejected {
    background: rgba(239, 68, 68, 0.15);
    color: var(--danger);
}

.approval-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 16px;
}

.approval-card-meta span {
    display: flex;
    align-items: center;
    gap: 4px;
}

.approval-card-actions {
    display: flex;
    gap: 10px;
}

.btn-approve {
    flex: 1;
    padding: 10px 16px;
    border: none;
    border-radius: var(--radius);
    font-weight: 600;
    font-size: 13px;
    cursor: pointer;
    background: linear-gradient(135deg, #10b981, #059669);
    color: #fff;
    transition: all 0.2s;
}

.btn-approve:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.btn-reject {
    flex: 1;
    padding: 10px 16px;
    border: 1px solid var(--danger);
    border-radius: var(--radius);
    font-weight: 600;
    font-size: 13px;
    cursor: pointer;
    background: transparent;
    color: var(--danger);
    transition: all 0.2s;
}

.btn-reject:hover {
    background: rgba(239, 68, 68, 0.1);
}

.btn-notion-link {
    display: inline-block;
    padding: 8px 16px;
    background: rgba(99, 102, 241, 0.1);
    border: 1px solid rgba(99, 102, 241, 0.3);
    border-radius: var(--radius);
    color: var(--info);
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.2s;
}

.btn-notion-link:hover {
    background: rgba(99, 102, 241, 0.2);
}

.approval-feedback {
    background: var(--bg-input);
    border-radius: 6px;
    padding: 10px 14px;
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 10px;
    line-height: 1.5;
    border-left: 2px solid var(--text-muted);
}

.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-muted);
    font-size: 14px;
}

.btn-revise {
    flex: 1;
    padding: 10px 16px;
    border: 1px solid var(--warning);
    border-radius: var(--radius);
    font-weight: 600;
    font-size: 13px;
    cursor: pointer;
    background: rgba(245, 158, 11, 0.1);
    color: var(--warning);
    transition: all 0.2s;
}

.btn-revise:hover {
    background: rgba(245, 158, 11, 0.2);
    transform: translateY(-1px);
}

.approval-card.in_revision {
    border-left: 3px solid #8b5cf6;
    opacity: 0.6;
}

.status-in_revision {
    background: rgba(139, 92, 246, 0.15);
    color: #8b5cf6;
}

.approval-card-version {
    font-size: 11px;
    font-weight: 600;
    color: #8b5cf6;
    margin-left: 8px;
}

/* ═══════════════════════════════════════════════════════
   Login Overlay
   ═══════════════════════════════════════════════════════ */

.login-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 10000;
    background: var(--bg-primary);
    justify-content: center;
    align-items: center;
}

.login-overlay.active {
    display: flex;
}

.login-container {
    width: 100%;
    max-width: 400px;
    padding: 48px 40px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    animation: loginSlideUp 0.5s ease;
}

@keyframes loginSlideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.login-logo {
    text-align: center;
    margin-bottom: 36px;
}

.login-shield {
    margin-bottom: 16px;
    filter: drop-shadow(0 0 20px rgba(6, 182, 212, 0.3));
    animation: shieldPulse 3s ease-in-out infinite;
}

@keyframes shieldPulse {

    0%,
    100% {
        filter: drop-shadow(0 0 20px rgba(6, 182, 212, 0.3));
    }

    50% {
        filter: drop-shadow(0 0 30px rgba(6, 182, 212, 0.6));
    }
}

.login-title {
    font-size: 22px;
    font-weight: 700;
    color: var(--text-bright);
    margin-bottom: 4px;
}

.login-subtitle {
    font-size: 13px;
    color: var(--text-muted);
    letter-spacing: 1px;
    text-transform: uppercase;
}

.login-field {
    margin-bottom: 20px;
}

.login-field label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.login-field input {
    width: 100%;
    padding: 12px 16px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text-primary);
    font-size: 14px;
    font-family: 'Inter', sans-serif;
    transition: var(--transition);
}

.login-field input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

.login-error {
    padding: 10px 14px;
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: var(--radius);
    color: var(--danger);
    font-size: 13px;
    margin-bottom: 16px;
}

.login-btn {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, var(--accent), #0891b2);
    border: none;
    border-radius: var(--radius);
    color: white;
    font-size: 15px;
    font-weight: 700;
    font-family: 'Inter', sans-serif;
    cursor: pointer;
    transition: var(--transition);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.login-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(6, 182, 212, 0.3);
}

.login-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.login-footer {
    text-align: center;
    margin-top: 32px;
    font-size: 11px;
    color: var(--text-muted);
}

/* ═══════════════════════════════════════════════════════
   Sidebar user & logout
   ═══════════════════════════════════════════════════════ */

.sidebar-user {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    margin-bottom: 8px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: var(--radius);
    border: 1px solid var(--border);
}

.user-name {
    flex: 1;
    font-size: 12px;
    color: var(--text-secondary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.btn-logout {
    background: none;
    border: none;
    padding: 4px;
    cursor: pointer;
    color: var(--text-muted);
    border-radius: 4px;
    transition: var(--transition);
    display: flex;
    align-items: center;
}

.btn-logout:hover {
    color: var(--danger);
    background: rgba(239, 68, 68, 0.1);
}

/* Nav icon SVG alignment */
.nav-icon svg {
    vertical-align: middle;
    margin-right: 2px;
}

.brand-shield {
    flex-shrink: 0;
}