/* =========================================================
   TarefasAdmin — Global Design System
   ========================================================= */

/* Fontes e suavização */
body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    font-feature-settings: "cv02","cv03","cv04","cv11";
}

[x-cloak] {
    display: none !important;
}

/* ── Scrollbar personalizada ── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 99px; }
::-webkit-scrollbar-thumb:hover { background: #94a3b8; }

/* ── Sidebar ── */
.sidebar-logo-gradient {
    background: linear-gradient(135deg, #0c4a6e 0%, #0284c7 100%);
}

.nav-item {
    display: flex;
    align-items: center;
    padding: 0.625rem 1rem;
    border-radius: 0.625rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: #64748b;
    transition: all 0.15s ease;
    gap: 0.75rem;
}
.nav-item:hover {
    background: #f0f9ff;
    color: #0c4a6e;
}
.nav-item:hover svg { color: #0ea5e9; }
.nav-item.active {
    background: linear-gradient(135deg, #e0f2fe, #f0f9ff);
    color: #0c4a6e;
    font-weight: 600;
    box-shadow: 0 1px 3px rgba(2, 132, 199, 0.15);
}
.nav-item.active svg { color: #0284c7; }

/* ── Stat cards ── */
.stat-card {
    background: white;
    border-radius: 1rem;
    padding: 1.5rem;
    border: 1px solid #f1f5f9;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04), 0 1px 2px rgba(0,0,0,0.06);
    transition: box-shadow 0.2s, transform 0.2s;
}
.stat-card:hover {
    box-shadow: 0 8px 25px rgba(0,0,0,0.07);
    transform: translateY(-2px);
}
.stat-icon {
    width: 2.75rem;
    height: 2.75rem;
    border-radius: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ── Botões ── */
.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1.25rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: white;
    background: linear-gradient(135deg, #0284c7, #0ea5e9);
    border-radius: 0.625rem;
    box-shadow: 0 1px 3px rgba(2, 132, 199, 0.4);
    transition: all 0.2s;
    border: none;
    cursor: pointer;
}
.btn-primary:hover {
    background: linear-gradient(135deg, #0369a1, #0284c7);
    box-shadow: 0 4px 12px rgba(2, 132, 199, 0.4);
    transform: translateY(-1px);
}
.btn-primary:active { transform: translateY(0); }

.btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1.25rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: #374151;
    background: white;
    border-radius: 0.625rem;
    border: 1px solid #e5e7eb;
    transition: all 0.15s;
    cursor: pointer;
}
.btn-secondary:hover {
    background: #f9fafb;
    border-color: #d1d5db;
}

.btn-danger {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1.25rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: white;
    background: linear-gradient(135deg, #dc2626, #ef4444);
    border-radius: 0.625rem;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
}
.btn-danger:hover { background: linear-gradient(135deg, #b91c1c, #dc2626); }

/* ── Cards genéricos ── */
.card {
    background: white;
    border-radius: 1rem;
    border: 1px solid #f1f5f9;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
    overflow: hidden;
}
.card-header {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* ── Badges de status ── */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.2rem 0.65rem;
    border-radius: 99px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.badge-success { background: #dcfce7; color: #15803d; }
.badge-warning { background: #fef9c3; color: #a16207; }
.badge-danger  { background: #fee2e2; color: #b91c1c; }
.badge-info    { background: #e0f2fe; color: #0369a1; }
.badge-gray    { background: #f1f5f9; color: #475569; }

/* ── Modais ── */
.modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.4);
    backdrop-filter: blur(4px);
    z-index: 50;
    display: flex;
    align-items: center;
    justify-content: center;
}
.modal-box {
    background: white;
    border-radius: 1.25rem;
    box-shadow: 0 25px 60px rgba(0,0,0,0.15);
    max-width: 32rem;
    width: calc(100% - 2rem);
    overflow: hidden;
    animation: modalIn 0.2s ease;
}
@keyframes modalIn {
    from { opacity: 0; transform: scale(0.96) translateY(8px); }
    to   { opacity: 1; transform: scale(1) translateY(0); }
}
.modal-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.modal-body { padding: 1.5rem; }
.modal-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.75rem;
    background: #fafafa;
}

/* ── Form inputs ── */
.form-label {
    display: block;
    font-size: 0.8125rem;
    font-weight: 500;
    color: #374151;
    margin-bottom: 0.375rem;
}
.form-input {
    width: 100%;
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
    color: #111827;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    transition: border-color 0.15s, box-shadow 0.15s;
    outline: none;
}
.form-input:focus {
    border-color: #0ea5e9;
    box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.12);
}
.form-input::placeholder { color: #9ca3af; }

/* ── Tabelas ── */
.table-row {
    transition: background 0.1s;
}
.table-row:hover { background: #f8fafc; }

/* ── Animações utilitárias ── */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(6px); }
    to   { opacity: 1; transform: translateY(0); }
}
.anim-fade-in { animation: fadeIn 0.25s ease; }

/* ── Page header ── */
.page-header {
    margin-bottom: 1.5rem;
}
.page-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.2;
}
.page-subtitle {
    font-size: 0.875rem;
    color: #64748b;
    margin-top: 0.25rem;
}

/* ── Sidebar logo strip ── */
.sidebar-strip {
    height: 4px;
    background: linear-gradient(90deg, #0284c7, #38bdf8, #7dd3fc);
    width: 100%;
}

/* ── Empty state ── */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4rem 2rem;
    gap: 1rem;
    color: #94a3b8;
    text-align: center;
}
.empty-state svg { width: 3rem; height: 3rem; opacity: 0.4; }
.empty-state p { font-size: 0.9rem; font-weight: 500; }
