/* style.css — Obrize · Identidade Visual 2026 */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&display=swap');

:root {
    --primary:       #1a7a4a;
    --primary-dark:  #145f38;
    --primary-light: #22a05e;
    --primary-xlt:   #ecfdf5;
    --accent:        #34d399;
    --accent-dark:   #10b981;

    --gray-900: #111827;
    --gray-800: #1f2937;
    --gray-700: #374151;
    --gray-600: #6b7280;
    --gray-500: #9ca3af;
    --gray-400: #d1d5db;
    --gray-300: #e5e7eb;
    --gray-200: #f3f4f6;
    --gray-100: #f9fafb;
    --white:    #ffffff;

    --success: #10b981;
    --warning: #f59e0b;
    --danger:  #ef4444;
    --info:    #3b82f6;

    --shadow-sm:  0 1px 3px rgba(0,0,0,.08);
    --shadow-md:  0 4px 16px rgba(26,122,74,.10);
    --shadow-lg:  0 12px 40px rgba(26,122,74,.14);
    --radius:     12px;
    --radius-lg:  18px;
    --radius-xl:  24px;
}

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

body {
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    background: #f8faf9;
    min-height: 100vh;
    color: var(--gray-900);
    padding: 24px;
    line-height: 1.6;
}

/* ── Layout principal ─────────────────────────────── */
.container {
    max-width: 1400px;
    margin: 0 auto;
    background: var(--white);
    border-radius: var(--radius-xl);
    box-shadow: 0 0 0 1px rgba(26,122,74,.07), var(--shadow-lg);
    padding: 32px;
}

/* ── Header ─────────────────────────────────────────── */
header {
    border-bottom: 2px solid var(--gray-200);
    padding-bottom: 20px;
    margin-bottom: 28px;
}

h1 { color: var(--gray-900); font-size: 2rem; font-weight: 800; margin-bottom: 8px; }
h2 { color: var(--gray-800); font-size: 1.45rem; font-weight: 700; margin-bottom: 18px; }
h3 { color: var(--primary); font-size: 1.15rem; font-weight: 600; margin-bottom: 12px; }

/* ── Nav ─────────────────────────────────────────────── */
nav {
    margin-bottom: 28px;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
    background: var(--gray-100);
    padding: 8px;
    border-radius: var(--radius);
}

nav a, nav button {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 20px;
    background: transparent;
    color: var(--gray-600);
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.2s ease;
    font-weight: 600;
    font-size: 0.88rem;
    border: none;
    cursor: pointer;
    font-family: inherit;
}

nav a:hover, nav button:hover,
nav a.active { background: var(--white); color: var(--primary); box-shadow: var(--shadow-sm); }

/* ── Formulários ─────────────────────────────────────── */
.form-group { margin-bottom: 18px; }

label {
    display: block;
    margin-bottom: 6px;
    color: var(--gray-700);
    font-weight: 600;
    font-size: 0.85rem;
}

input, select, textarea {
    width: 100%;
    padding: 11px 15px;
    border: 1.5px solid var(--gray-300);
    border-radius: 10px;
    font-size: 0.95rem;
    font-family: inherit;
    background: var(--white);
    color: var(--gray-900);
    transition: border-color 0.2s, box-shadow 0.2s;
}

input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(26,122,74,.12);
}

textarea { resize: vertical; min-height: 100px; }

/* ── Botões ──────────────────────────────────────────── */
button, .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 11px 24px;
    background: var(--primary);
    color: var(--white);
    border: none;
    border-radius: 10px;
    font-size: 0.92rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
}

button:hover, .btn:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(26,122,74,.25);
}

button:active, .btn:active { transform: translateY(0); }

.btn-secondary { background: var(--gray-600); }
.btn-secondary:hover { background: var(--gray-700); }
.btn-danger { background: var(--danger); }
.btn-danger:hover { background: #dc2626; }
.btn-success { background: var(--success); }
.btn-success:hover { background: var(--primary); }
.btn-warning { background: var(--warning); color: var(--white); }
.btn-warning:hover { background: #d97706; }
.btn-outline {
    background: transparent;
    border: 1.5px solid var(--primary);
    color: var(--primary);
}
.btn-outline:hover { background: var(--primary-xlt); box-shadow: none; }

/* ── Tabelas ─────────────────────────────────────────── */
table { width: 100%; border-collapse: separate; border-spacing: 0; margin-top: 20px; border-radius: var(--radius); overflow: hidden; border: 1.5px solid var(--gray-200); }

th, td { padding: 13px 16px; text-align: left; border-bottom: 1px solid var(--gray-200); }

th {
    background: var(--gray-100);
    color: var(--gray-700);
    font-weight: 700;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    border-bottom: 2px solid var(--gray-200);
}

tr:hover td { background: var(--primary-xlt); }
tr:last-child td { border-bottom: none; }

/* ── Cards ───────────────────────────────────────────── */
.card {
    background: var(--white);
    border: 1.5px solid var(--gray-200);
    border-radius: var(--radius-lg);
    padding: 24px;
    margin-bottom: 20px;
    transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
}

.card:hover {
    border-color: var(--accent);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.card-title {
    color: var(--gray-900);
    font-size: 1.1rem;
    margin-bottom: 14px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
}

.card-icon {
    width: 38px;
    height: 38px;
    background: var(--primary-xlt);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    font-size: 1.1rem;
    border: 1.5px solid rgba(26,122,74,.15);
}

/* ── Grid ────────────────────────────────────────────── */
.grid   { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px; margin-top: 20px; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(380px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }

/* ── Stat Cards ─────────────────────────────────────── */
.stat-card {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: var(--white);
    padding: 26px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    transition: transform 0.2s, box-shadow 0.2s;
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: -20px; right: -20px;
    width: 100px; height: 100px;
    border-radius: 50%;
    background: rgba(255,255,255,.07);
}

.stat-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }

.stat-value { font-size: 2.2rem; font-weight: 800; margin: 8px 0; letter-spacing: -1px; }
.stat-label { font-size: 0.88rem; opacity: 0.85; font-weight: 500; }

/* ── Indicadores / Badges ───────────────────────────── */
.indicator {
    display: inline-flex;
    align-items: center;
    padding: 5px 14px;
    border-radius: 20px;
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

.indicator-success { background: #d1fae5; color: #065f46; }
.indicator-warning { background: #fef3c7; color: #92400e; }
.indicator-danger  { background: #fee2e2; color: #991b1b; }
.indicator-info    { background: #dbeafe; color: #1e40af; }

.badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    background: var(--primary);
    color: var(--white);
    border-radius: 12px;
    font-size: 0.78rem;
    font-weight: 700;
}

/* ── Mensagens ───────────────────────────────────────── */
.message {
    padding: 14px 18px;
    border-radius: 10px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 500;
    font-size: 0.92rem;
}

.message-success { background: #d1fae5; color: #065f46; border-left: 4px solid var(--success); }
.message-error   { background: #fee2e2; color: #991b1b; border-left: 4px solid var(--danger); }
.message-warning { background: #fef3c7; color: #92400e; border-left: 4px solid var(--warning); }
.message-info    { background: #dbeafe; color: #1e40af; border-left: 4px solid var(--info); }

/* ── Loading ─────────────────────────────────────────── */
.loading { text-align: center; padding: 60px 20px; color: var(--gray-500); }

.spinner {
    border: 3px solid var(--gray-200);
    border-top: 3px solid var(--primary);
    border-radius: 50%;
    width: 44px; height: 44px;
    animation: spin 0.9s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }

/* ── Progress Bar ────────────────────────────────────── */
.progress-bar { width: 100%; height: 7px; background: var(--gray-200); border-radius: 10px; overflow: hidden; margin: 8px 0; }
.progress-fill { height: 100%; background: linear-gradient(90deg, var(--primary) 0%, var(--accent) 100%); transition: width 0.6s ease; border-radius: 10px; }

/* ── Divisor ─────────────────────────────────────────── */
.divider { height: 1.5px; background: var(--gray-200); margin: 32px 0; border-radius: 2px; }

/* ── Gráficos ────────────────────────────────────────── */
#chart, .chart-container {
    margin-top: 28px;
    height: 400px;
    padding: 20px;
    background: var(--gray-100);
    border-radius: var(--radius-lg);
}

.gantt-container {
    overflow-x: auto;
    margin-top: 20px;
    border: 1.5px solid var(--gray-200);
    border-radius: var(--radius);
    padding: 20px;
    background: var(--white);
}

/* ── Responsivo ──────────────────────────────────────── */
@media (max-width: 768px) {
    body { padding: 12px; }
    .container { padding: 20px; border-radius: var(--radius); }
    nav { flex-direction: column; }
    nav a, nav button { width: 100%; justify-content: center; }
    .grid, .grid-2, .grid-3 { grid-template-columns: 1fr; }
    th, td { padding: 10px 12px; }
    .stat-value { font-size: 1.8rem; }
}

/* ── Animações ───────────────────────────────────────── */
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(16px); }
    to   { opacity: 1; transform: translateY(0); }
}

.fade-in { animation: fadeUp 0.4s ease-out both; }

/* ── Utilitários ─────────────────────────────────────── */
.text-center  { text-align: center; }
.text-right   { text-align: right; }
.mt-20 { margin-top: 20px; }
.mb-20 { margin-bottom: 20px; }
.p-20  { padding: 20px; }
.hidden { display: none; }
.flex  { display: flex; }
.flex-between { justify-content: space-between; }
.flex-center  { justify-content: center; align-items: center; }
.gap-10 { gap: 10px; }
.gap-20 { gap: 20px; }
