* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

:root {
    /* Base Palette - Slate/Zinc inspired */
    --bg-body: #020617;
    /* Very dark blue/slate */
    --bg-sidebar: #0f172a;
    /* Slightly lighter */
    --bg-card: rgba(30, 41, 59, 0.7);
    /* Translucent for glass effect */
    --bg-card-hover: rgba(51, 65, 85, 0.8);
    --bg-input: #1e293b;

    --border-color: rgba(148, 163, 184, 0.1);
    --border-highlight: rgba(148, 163, 184, 0.2);

    /* Text */
    --text-main: #f1f5f9;
    --text-muted: #94a3b8;
    --text-highlight: #fff;

    /* Brand Colors */
    --primary: #6366f1;
    /* Indigo 500 */
    --primary-hover: #4f46e5;
    /* Indigo 600 */
    --primary-light: rgba(99, 102, 241, 0.15);

    --success: #10b981;
    /* Emerald 500 */
    --success-light: rgba(16, 185, 129, 0.15);

    --danger: #ef4444;
    /* Red 500 */
    --danger-light: rgba(239, 68, 68, 0.15);

    --warning: #f59e0b;
    /* Amber 500 */
    --warning-light: rgba(245, 158, 11, 0.15);

    /* Effects */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.3), 0 2px 4px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.4), 0 4px 6px -2px rgba(0, 0, 0, 0.2);
    --shadow-glow: 0 0 20px rgba(99, 102, 241, 0.15);

    --backdrop-blur: blur(12px);
    --transition-fast: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

body {
    background: radial-gradient(circle at top center, #1e293b 0%, #020617 80%);
    background-size: cover;
    background-attachment: fixed;
    color: var(--text-main);
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    margin: 0;
    padding: 0;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

/* Login */
.login-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 1rem;
}

.login-container {
    max-width: 420px;
    width: 100%;
}

.logo-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    margin-bottom: 1.5rem;
}

.card-elevated {
    background: rgba(15, 23, 42, 0.9);
    border-radius: 20px;
    padding: 1.6rem;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.9);
    border: 1px solid rgba(148, 163, 184, 0.2);
}

/* Card Glassmorphism */
.card {
    background: var(--bg-card);
    backdrop-filter: var(--backdrop-blur);
    padding: 1.75rem;
    border-radius: 16px;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-md);
    margin-bottom: 2rem;
    transition: var(--transition-fast);
    color: var(--text-main);
}

.card:hover {
    border-color: var(--border-highlight);
    box-shadow: var(--shadow-lg);
    background: var(--bg-card-hover);
}

.card label {
    font-size: 0.9rem;
    color: var(--text-muted);
    font-weight: 500;
    margin-bottom: 0.6rem;
    display: block;
}

.card input,
.card select,
.card textarea {
    width: 100%;
    padding: 0.7rem 0.9rem;
    border-radius: 12px;
    border: 1px solid #1f2937;
    background: #020617;
    color: #f9fafb;
    font-size: 0.95rem;
    min-height: 48px;
    /* Touch target size */
}

.card textarea {
    min-height: 80px;
    resize: vertical;
}

.btn-chip-link {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: var(--primary);
    color: #fff;
    border-radius: 999px;
    text-decoration: none;
    font-size: 0.75rem;
    font-weight: 600;
    transition: background 0.2s;
}

.btn-chip-link:hover {
    background: var(--primary-hover);
}

.btn-primary,
.btn-secondary,
.btn-outline {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    border: none;
    padding: 0.7rem 1.4rem;
    margin-top: 1rem;
    font-weight: 600;
    cursor: pointer;
    font-size: 1rem;
    /* Larger text for tablet */
    min-height: 48px;
    /* Touch target */
    gap: 0.35rem;
    text-decoration: none;
}

.btn-full {
    width: 100%;
}

.btn-primary {
    background: linear-gradient(135deg, #6366f1, #22c55e);
    color: white;
}

.btn-secondary {
    background: #020617;
    color: var(--text);
    border: 1px solid #1f2937;
}

.btn-outline {
    background: transparent;
    border: 1px solid #374151;
    color: #e5e7eb;
}

/* Layout geral (app) */
.app-shell {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.app-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.8rem 1.1rem;
    background: rgba(15, 23, 42, 0.95);
    border-bottom: 1px solid #111827;
    position: sticky;
    top: 0;
    z-index: 20;
    backdrop-filter: blur(18px);
}

.app-header-right {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 0.8rem;
    color: var(--muted);
    z-index: 2;
}

.user-pill {
    padding: 0.25rem 0.8rem;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.9);
    border: 1px solid #1f2937;
    font-size: 0.75rem;
}

.app-main {
    padding: 1rem 1.1rem 1.5rem;
}

/* Dashboard cards */
.kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(155px, 1fr));
    gap: 0.6rem;
    margin-bottom: 1rem;
}

.kpi-card {
    position: relative;
    background: rgba(15, 23, 42, 0.6);
    border-radius: 14px;
    padding: 0.75rem 0.9rem;
    border: 1px solid rgba(148, 163, 184, 0.15);
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

.kpi-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, currentColor, transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.kpi-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
    border-color: rgba(148, 163, 184, 0.3);
}

.kpi-card:hover::before {
    opacity: 0.6;
}

/* KPI Card Colors */
.kpi-card-blue {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1), rgba(37, 99, 235, 0.05));
    border-color: rgba(59, 130, 246, 0.2);
}

.kpi-card-blue .kpi-icon {
    color: #60a5fa;
    background: rgba(59, 130, 246, 0.1);
}

.kpi-card-yellow {
    background: linear-gradient(135deg, rgba(234, 179, 8, 0.1), rgba(202, 138, 4, 0.05));
    border-color: rgba(234, 179, 8, 0.2);
}

.kpi-card-yellow .kpi-icon {
    color: #facc15;
    background: rgba(234, 179, 8, 0.1);
}

.kpi-card-red {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.1), rgba(220, 38, 38, 0.05));
    border-color: rgba(239, 68, 68, 0.2);
}

.kpi-card-red .kpi-icon {
    color: #f87171;
    background: rgba(239, 68, 68, 0.1);
}

.kpi-card-green {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.1), rgba(21, 128, 61, 0.05));
    border-color: rgba(34, 197, 94, 0.2);
}

.kpi-card-green .kpi-icon {
    color: #4ade80;
    background: rgba(34, 197, 94, 0.1);
}

.kpi-card-purple {
    background: linear-gradient(135deg, rgba(168, 85, 247, 0.1), rgba(126, 34, 206, 0.05));
    border-color: rgba(168, 85, 247, 0.2);
}

.kpi-card-purple .kpi-icon {
    color: #c084fc;
    background: rgba(168, 85, 247, 0.1);
}

.kpi-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.2rem;
}

/* Leader List Styles - Base */
.leader-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.leader-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.8rem 1rem;
    background: rgba(30, 41, 59, 0.4);
    border: 1px solid rgba(148, 163, 184, 0.1);
    border-radius: 12px;
    gap: 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.leader-item:hover {
    background: rgba(51, 65, 85, 0.6);
    border-color: rgba(148, 163, 184, 0.2);
    transform: translateY(-2px);
}

.leader-left {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex: 1;
}

.leader-avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1rem;
    flex-shrink: 0;
}

.leader-info {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.leader-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.2rem 0.6rem;
    border-radius: 999px;
    font-size: 0.75rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #cbd5e1;
}

.leader-badge-total {
    background: rgba(59, 130, 246, 0.1);
    border-color: rgba(59, 130, 246, 0.2);
    color: #93c5fd;
}

.leader-badge-pending {
    background: rgba(234, 179, 8, 0.1);
    border-color: rgba(234, 179, 8, 0.2);
    color: #fde047;
}

.leader-badge-overdue {
    background: rgba(239, 68, 68, 0.1);
    border-color: rgba(239, 68, 68, 0.2);
    color: #fca5a5;
}

.leader-badge-completed {
    background: rgba(34, 197, 94, 0.1);
    border-color: rgba(34, 197, 94, 0.2);
    color: #86efac;
}

.leader-progress {
    font-weight: 700;
    font-size: 1.2rem;
    color: #fff;
}

.progress-low {
    color: #ef4444;
}

.progress-mid {
    color: #eab308;
}

.progress-high {
    color: #22c55e;
}

/* Tablet Responsiveness (768px - 1024px) */
@media (min-width: 768px) and (max-width: 1024px) {

    /* Layout & Containers */
    .app-main {
        padding: 1.5rem;
    }

    /* Header Compactness */
    .app-header {
        padding: 0.8rem 1rem;
    }

    .app-header h2 {
        font-size: 1.1rem;
    }

    .app-header-right {
        gap: 0.5rem;
    }

    .user-pill {
        display: none;
        /* Hide user text on smaller tablets to save space if needed, or keep compact */
    }

    /* KPI Grid - Adaptive */
    .kpi-grid {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)) !important;
        gap: 1rem !important;
    }

    .kpi-card {
        padding: 1.2rem !important;
    }

    .kpi-value {
        font-size: 2rem !important;
    }

    /* Touch Targets */
    .btn,
    button,
    input,
    select,
    textarea {
        min-height: 48px;
    }

    /* Filters & Buttons */
    .section-title {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.8rem;
    }

    .section-title div {
        display: flex;
        flex-wrap: wrap;
        gap: 0.5rem;
        width: 100%;
    }

    .section-title .btn-primary,
    .section-title .btn-secondary {
        flex: 1;
        text-align: center;
        justify-content: center;
        font-size: 0.9rem;
        padding: 0.6rem;
    }

    /* Leader List Items */
    .leader-item {
        flex-wrap: wrap;
        /* Allow wrapping if needed */
        gap: 1rem;
        padding: 1rem;
    }

    .leader-left {
        min-width: 200px;
    }

    .leader-progress {
        margin-left: auto;
    }
}

/* Card color themes */
.kpi-card-blue {
    background: radial-gradient(circle at top left, rgba(59, 130, 246, 0.15), rgba(15, 23, 42, 0.6) 60%);
    border-color: rgba(59, 130, 246, 0.2);
    color: #60a5fa;
}

.kpi-card-yellow {
    background: radial-gradient(circle at top left, rgba(250, 204, 21, 0.12), rgba(15, 23, 42, 0.6) 60%);
    border-color: rgba(250, 204, 21, 0.2);
    color: #fbbf24;
}

.kpi-card-red {
    background: radial-gradient(circle at top left, rgba(239, 68, 68, 0.15), rgba(15, 23, 42, 0.6) 60%);
    border-color: rgba(239, 68, 68, 0.2);
    color: #f87171;
}

.kpi-card-green {
    background: radial-gradient(circle at top left, rgba(34, 197, 94, 0.15), rgba(15, 23, 42, 0.6) 60%);
    border-color: rgba(34, 197, 94, 0.2);
    color: #4ade80;
}

.kpi-card-purple {
    background: radial-gradient(circle at top left, rgba(168, 85, 247, 0.15), rgba(15, 23, 42, 0.6) 60%);
    border-color: rgba(168, 85, 247, 0.2);
    color: #c084fc;
}

.kpi-card-orange {
    background: radial-gradient(circle at top left, rgba(249, 115, 22, 0.15), rgba(15, 23, 42, 0.6) 60%);
    border-color: rgba(249, 115, 22, 0.2);
    color: #fb923c;
}

/* Icon styling */
.kpi-icon {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.kpi-card:hover .kpi-icon {
    transform: scale(1.1) rotate(5deg);
    background: rgba(255, 255, 255, 0.08);
}

.kpi-icon svg {
    opacity: 0.9;
    width: 20px;
    height: 20px;
}

/* Content area */
.kpi-content {
    flex: 1;
}

.kpi-label {
    font-size: 0.7rem;
    color: var(--muted);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.kpi-value {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0.2rem 0;
    color: #ffffff;
    line-height: 1;
}

.kpi-sub {
    font-size: 0.7rem;
    color: var(--muted);
    margin-top: 0.3rem;
    opacity: 0.8;
}

/* Badge notifications */
.kpi-badge {
    position: absolute;
    top: 0.8rem;
    right: 0.8rem;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    color: #000;
    font-size: 0.65rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 3px 10px rgba(251, 191, 36, 0.4);
}

.kpi-badge-pulse {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
    background: linear-gradient(135deg, #ef4444, #dc2626);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.5);
    color: #fff;
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
        transform: scale(1);
    }

    50% {
        opacity: 0.8;
        transform: scale(1.05);
    }
}

/* Progress bar */
.kpi-progress {
    height: 4px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 999px;
    overflow: hidden;
    margin-top: 0.4rem;
}

.kpi-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #22c55e, #4ade80);
    border-radius: 999px;
    transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 0 6px rgba(34, 197, 94, 0.5);
}

/* Section title */
.section-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 0.7rem 0 0.4rem;
    font-size: 0.9rem;
}

.section-title h3 {
    font-size: 0.95rem;
}

.section-title small {
    color: var(--muted);
    font-size: 0.75rem;
}

/* Alerts */
.alert {
    margin: 0.5rem 0 0.8rem;
    padding: 0.7rem 0.9rem;
    border-radius: 12px;
    font-size: 0.8rem;
}

.alert-success {
    background: rgba(34, 197, 94, 0.15);
    color: #bbf7d0;
}

.alert-error {
    background: rgba(239, 68, 68, 0.15);
    color: #fecaca;
}

/* Form layout */
.form-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.8rem;
}

@media (max-width: 600px) {
    .form-grid-2 {
        grid-template-columns: 1fr;
    }

    .kpi-grid {
        grid-template-columns: 1fr;
        gap: 0.8rem;
    }

    .kpi-card {
        padding: 1rem 1.1rem;
    }

    .kpi-value {
        font-size: 1.8rem;
    }

    .activity-main {
        grid-template-columns: 1fr;
        gap: 0.4rem;
    }

    .activity-item {
        padding: 0.8rem 0.7rem;
    }
}

/* Tablet adjustments */
@media (min-width: 601px) and (max-width: 1024px) {
    .card {
        padding: 1.5rem;
    }

    .kpi-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Perfil */
.profile-grid {
    display: grid;
    grid-template-columns: 2fr 1.2fr;
    gap: 1rem;
}

@media (max-width: 900px) {
    .profile-grid {
        grid-template-columns: 1fr;
    }
}

/* Chips */
.chip {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.6rem;
    border-radius: 999px;
    border: 1px solid #1f2937;
    font-size: 0.75rem;
    color: var(--muted);
}

/* FILTER BAR */
.filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin: 0.4rem 0 0.8rem;
}

.filter-bar select {
    padding: 0.45rem 0.7rem;
    border-radius: 999px;
    border: 1px solid #1f2937;
    background: #020617;
    color: var(--text);
    font-size: 0.78rem;
}

/* TABLES */
.table-wrapper {
    margin-top: 0.6rem;
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.8rem;
}

th,
td {
    padding: 0.55rem 0.5rem;
    border-bottom: 1px solid #111827;
    text-align: left;
}

th {
    background: #020617;
    position: sticky;
    top: 0;
}

/* ==== LISTA DE ATIVIDADES DO LÍDER (estilo da imagem) ==== */
.activity-list {
    margin-top: 0.4rem;
    border-radius: 12px;
    background: #020617;
    border: 1px solid #111827;
    overflow: hidden;
}

.activity-list-header {
    padding: 0.7rem 0.9rem;
    font-size: 0.85rem;
    color: var(--muted);
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #111827;
}

.activity-list-header span {
    font-weight: 500;
    color: #e5e7eb;
}

.activity-item {
    display: grid;
    grid-template-columns: 4px 1fr auto;
    align-items: center;
    padding: 0.7rem 0.9rem;
    gap: 1rem;
    border-bottom: 1px solid #111827;
    transition: all 0.2s ease;
}

/* Filter Chips */
.filter-chips {
    scrollbar-width: thin;
    scrollbar-color: #334155 transparent;
}

.filter-chips::-webkit-scrollbar {
    height: 4px;
}

.filter-chips::-webkit-scrollbar-thumb {
    background: #334155;
    border-radius: 4px;
}

.filter-chip {
    background: rgba(30, 41, 59, 0.6);
    border: 1px solid rgba(148, 163, 184, 0.2);
    color: var(--muted);
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    font-size: 0.8rem;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s ease;
}

.filter-chip:hover {
    background: rgba(51, 65, 85, 0.8);
    color: #f1f5f9;
}

.filter-chip.active {
    background: #3b82f6;
    border-color: #3b82f6;
    color: white;
    font-weight: 500;
}

.filter-chip.highlight-purple {
    border-color: #a855f7;
    color: #c084fc;
    background: rgba(168, 85, 247, 0.1);
}

.filter-chip.highlight-purple.active {
    background: #a855f7;
    color: white;
}

/* KPI Card Interaction */
.kpi-card {
    cursor: pointer;
    /* Indicar clicável */
}

.kpi-card.active-filter {
    border-width: 2px;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.2);
}

/* Leader Item Animation */
.leader-item {
    transition: opacity 0.3s ease, transform 0.3s ease, box-shadow 0.2s ease;
}

.activity-item:last-child {
    border-bottom: none;
}

.activity-status-bar {
    width: 4px;
    height: 100%;
    min-height: 40px;
    border-radius: 999px;
}

/* cores da barrinha lateral */
.status-pendente {
    background: #fbbf24;
}

.status-atrasado {
    background: #ef4444;
}

.status-finalizada {
    background: #22c55e;
}

.activity-main {
    display: grid;
    grid-template-columns: 2fr 1fr auto;
    gap: 1rem;
    align-items: center;
    flex: 1;
}

.activity-title {
    font-size: 1.05rem;
    font-weight: 600;
    color: #f9fafb;
    line-height: 1.3;
}

.activity-sub {
    font-size: 0.85rem;
    color: var(--muted);
    margin-top: 0.25rem;
}

.activity-meta-row {
    display: flex;
    gap: 0.6rem;
    align-items: center;
    font-size: 0.8rem;
    color: #9ca3af;
}

/* Deadline badges */
.deadline-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.45rem 0.9rem;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    white-space: nowrap;
    transition: all 0.2s ease;
}

.deadline-badge:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

/* Prazo vencido - Vermelho */
.deadline-overdue {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.2), rgba(220, 38, 38, 0.15));
    border: 1px solid rgba(239, 68, 68, 0.4);
    color: #fca5a5;
}

/* Vence hoje - Laranja */
.deadline-today {
    background: linear-gradient(135deg, rgba(251, 146, 60, 0.2), rgba(249, 115, 22, 0.15));
    border: 1px solid rgba(251, 146, 60, 0.4);
    color: #fdba74;
}

/* Vence amanhã - Amarelo */
.deadline-tomorrow {
    background: linear-gradient(135deg, rgba(250, 204, 21, 0.2), rgba(234, 179, 8, 0.15));
    border: 1px solid rgba(250, 204, 21, 0.4);
    color: #fde047;
}

/* Prazo normal - Azul */
.deadline-normal {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.15), rgba(37, 99, 235, 0.1));
    border: 1px solid rgba(59, 130, 246, 0.3);
    color: #93c5fd;
}

/* Sem prazo - Cinza */
.deadline-none {
    background: linear-gradient(135deg, rgba(107, 114, 128, 0.15), rgba(75, 85, 99, 0.1));
    border: 1px solid rgba(107, 114, 128, 0.3);
    color: #9ca3af;
}

.activity-actions {
    display: flex;
    align-items: center;
    font-size: 0.8rem;
}

/* Removed specific link color rule to avoid conflict with buttons */

/* ==== LISTA DE LÍDERES PARA O SUPERVISOR (estilo avatar + círculo) ==== */
.leader-list {
    margin-top: 0.4rem;
}

.leader-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.9rem 0.4rem;
    border-bottom: 1px solid #111827;
    transition: all 0.2s ease;
    border-radius: 8px;
    margin-bottom: 0.3rem;
}

.leader-item:hover {
    background: rgba(99, 102, 241, 0.05);
    transform: translateX(3px);
    border-color: rgba(99, 102, 241, 0.2);
}

.leader-left {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    flex: 1;
}

.leader-avatar {
    width: 44px;
    height: 44px;
    border-radius: 999px;
    background: radial-gradient(circle at top, #1f2937, #020617);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.9rem;
    color: #e5e7eb;
    box-shadow: 0 0 12px rgba(15, 23, 42, 0.9);
}

.leader-info {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.leader-info span:first-child {
    font-size: 0.95rem;
    font-weight: 600;
}

/* Leader badges */
.leader-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.25rem 0.6rem;
    border-radius: 6px;
    font-size: 0.72rem;
    font-weight: 500;
    white-space: nowrap;
}

.leader-badge-total {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.15), rgba(37, 99, 235, 0.1));
    border: 1px solid rgba(59, 130, 246, 0.3);
    color: #93c5fd;
}

.leader-badge-pending {
    background: linear-gradient(135deg, rgba(250, 204, 21, 0.15), rgba(234, 179, 8, 0.1));
    border: 1px solid rgba(250, 204, 21, 0.3);
    color: #fde047;
}

.leader-badge-overdue {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.2), rgba(220, 38, 38, 0.15));
    border: 1px solid rgba(239, 68, 68, 0.4);
    color: #fca5a5;
}

.leader-badge-completed {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.15), rgba(22, 163, 74, 0.1));
    border: 1px solid rgba(34, 197, 94, 0.3);
    color: #86efac;
}

.leader-progress {
    width: 50px;
    height: 50px;
    border-radius: 999px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 700;
    color: #e5e7eb;
}

/* cores de progresso */
.progress-low {
    border: 2px solid #ef4444;
}

.progress-mid {
    border: 2px solid #3b82f6;
}

.progress-high {
    border: 2px solid #22c55e;
}

/* ==== BLOCO DE AÇÕES NA TELA DO LÍDER (CONCLUIR vs JUSTIFICAR) ==== */
.action-switch {
    display: flex;
    gap: 0.5rem;
    margin: 0.4rem 0 0.8rem;
}

.action-tab {
    flex: 1;
    padding: 0.6rem 0.8rem;
    border-radius: 999px;
    border: 1px solid #1f2937;
    background: #020617;
    color: #9ca3af;
    font-size: 0.8rem;
    text-align: center;
    cursor: pointer;
}

.action-tab.active {
    background: linear-gradient(135deg, #6366f1, #22c55e);
    border-color: transparent;
    color: white;
}

.action-block {
    margin-top: 0.4rem;
}

.callout-warning {
    margin-top: 0.6rem;
    padding: 0.6rem 0.7rem;
    border-radius: 12px;
    background: rgba(250, 204, 21, 0.04);
    border: 1px solid rgba(250, 204, 21, 0.4);
    font-size: 0.78rem;
    color: #eab308;
}

/* GALERIA DE EVIDÊNCIAS */
.evidence-gallery {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin-top: 0.3rem;
}

.evidence-thumb {
    width: 52px;
    height: 52px;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid #111827;
}

.evidence-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-fit: cover;
    cursor: zoom-in;
}

.zoomable-img {
    cursor: zoom-in;
    transition: transform 0.2s;
}

.zoomable-img:hover {
    transform: scale(1.02);
}

/* Lightbox */
.lightbox {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.9);
    align-items: center;
    justify-content: center;
}

.lightbox-content {
    margin: auto;
    display: block;
    max-width: 90%;
    max-height: 90vh;
    border-radius: 8px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 35px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    z-index: 1001;
}

/* TAGS DE STATUS / TIPO (PILLS) */
.tag {
    display: inline-flex;
    align-items: center;
    padding: 0.35rem 0.85rem;
    border-radius: 999px;
    font-size: 0.8rem;
    border: 1px solid #1f2937;
    background: #020617;
    color: var(--muted);
    gap: 0.25rem;
    font-weight: 500;
}

.tag-status-pendente {
    background: rgba(250, 204, 21, 0.1);
    border-color: rgba(250, 204, 21, 0.6);
    color: #facc15;
}

.tag-status-atrasado {
    background: rgba(248, 113, 113, 0.1);
    border-color: rgba(248, 113, 113, 0.7);
    color: #fca5a5;
}

.tag-status-finalizada {
    background: rgba(34, 197, 94, 0.1);
    border-color: rgba(34, 197, 94, 0.7);
    color: #bbf7d0;
}

.tag-individual {
    background: rgba(59, 130, 246, 0.12);
    border-color: rgba(59, 130, 246, 0.6);
    color: #bfdbfe;
}

.tag-grupo {
    background: rgba(139, 92, 246, 0.12);
    border-color: rgba(139, 92, 246, 0.6);
    color: #ddd6fe;
}

/* TOGGLE PARA TIPO DE ATIVIDADE (INDIVIDUAL vs GRUPO) */
.toggle-group {
    display: inline-flex;
    gap: 0.4rem;
    margin-top: 0.35rem;
}

.toggle-option input {
    display: none;
}

.toggle-option label {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.45rem 0.9rem;
    border-radius: 999px;
    border: 1px solid #1f2937;
    background: #020617;
    color: #e5e7eb;
    font-size: 0.78rem;
    cursor: pointer;
    white-space: nowrap;
}

.toggle-option.active label {
    background: linear-gradient(135deg, #6366f1, #22c55e);
    border-color: transparent;
    color: white;
}

/* LÍDER SELECIONADO NA DASH DO SUPERVISOR */
.leader-item.selected {
    background: radial-gradient(circle at top left, rgba(129, 140, 248, 0.3), #020617 55%);
}

/* Header layout with central title and logo image */
.app-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.8rem 1.1rem;
    background: rgba(15, 23, 42, 0.95);
    border-bottom: 1px solid #111827;
    position: sticky;
    top: 0;
    z-index: 20;
    backdrop-filter: blur(18px);
    position: relative;
}

.app-header-left {
    display: flex;
    align-items: center;
    z-index: 2;
}

.app-header-center {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    font-size: 0.9rem;
    color: var(--muted);
    z-index: 1;
}

.app-header-center h2 {
    font-size: 0.95rem;
    font-weight: 500;
    color: #ffffff;
    white-space: nowrap;
}

.logo-img {
    height: 48px;
    width: auto;
}

/* Small rounded button link (Abrir) */
.btn-chip-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.45rem 1.1rem;
    border-radius: 999px;
    border: none;
    background: linear-gradient(135deg, #6366f1, #22c55e);
    color: #ffffff !important;
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
    transition: all 0.2s ease;
}

.btn-chip-link:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4);
}

/* Adjust filter controls to have similar height as buttons */
.filter-bar select,
.filter-bar button {
    min-height: 2.3rem;
}

/* Mobile Responsiveness for Tables */
@media (max-width: 768px) {

    /* Force table to not be like tables anymore */
    table,
    thead,
    tbody,
    th,
    td,
    tr {
        display: block;
    }

    /* Hide table headers (but not display: none;, for accessibility) */
    thead tr {
        position: absolute;
        top: -9999px;
        left: -9999px;
    }

    tr {
        margin-bottom: 1rem;
        background: rgba(30, 41, 59, 0.4);
        border: 1px solid rgba(148, 163, 184, 0.1);
        border-radius: 12px;
        padding: 1rem;
    }

    td {
        border: none;
        position: relative;
        padding-left: 0;
        padding-right: 0;
        padding-top: 0.5rem;
        padding-bottom: 0.5rem;
        display: flex;
        justify-content: space-between;
        align-items: center;
        text-align: right;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    }

    td:last-child {
        border-bottom: none;
    }

    td:before {
        content: attr(data-label);
        font-weight: 600;
        color: var(--muted);
        font-size: 0.85rem;
        text-align: left;
        margin-right: 1rem;
    }

    /* Adjust specific elements in mobile */
    .btn-sm,
    .tag {
        font-size: 0.75rem;
        padding: 0.2rem 0.5rem;
    }

    .evidence-thumb img {
        width: 60px;
        height: 60px;
    }
}

/* Header Mobile Adjustments */
@media (max-width: 768px) {
    .app-header {
        padding: 0.8rem 1rem;
        justify-content: space-between;
    }

    .app-header-center {
        display: none;
        /* Hide title on very small screens or move it */
    }

    .app-header-left img {
        height: 32px !important;
    }

    .app-header-right span {
        display: none;
        /* Hide user name and chip on mobile */
    }

    .app-header-right {
        gap: 0.4rem;
    }

    .btn-secondary,
    .btn-outline {
        padding: 0.4rem 0.6rem;
        font-size: 0.8rem;
    }
}