/*
 * CSS Completo e Final - Sistema Café do Padrim
 * Última atualização: 13/07/2025
 */

:root {
    --font-sans: 'Inter', sans-serif;
    --sidebar-width: 260px;
    --header-height: 70px;
    --bg-light: #f8f9fa;
    --bg-main: #e9ecef;
    --text-dark: #212529;
    --text-muted: #6c757d;
    --border-color: #dee2e6;
    --primary-blue: #0d6efd;
    --primary-blue-dark: #0b5ed7;
    --secondary-gray: #6c757d;
    --secondary-gray-dark: #5a6268;
    --shadow-sm: 0 .125rem .25rem rgba(0,0,0,.075);
    /* Cores dos Cards KPI */
    --kpi-red: #dc3545;
    --kpi-green: #198754;
    --kpi-blue: #0d6efd;
    --kpi-orange: #fd7e14;
}

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

/* ================================================= */
/* LAYOUT GERAL E INTERNO (DASHBOARD)                */
/* ================================================= */
body { font-family: var(--font-sans); background-color: var(--bg-main); color: var(--text-dark); margin: 0; }
body:not(.login-page-v2) { display: flex; }
.sidebar { width: var(--sidebar-width); background-color: var(--bg-light); position: fixed; height: 100vh; padding: 1.5rem; display: flex; flex-direction: column; border-right: 1px solid var(--border-color); box-sizing: border-box; }
.main-content { margin-left: var(--sidebar-width); width: calc(100% - var(--sidebar-width)); padding: 0; }
.sidebar-profile { display: flex; align-items: center; gap: 1rem; padding-bottom: 1.5rem; border-bottom: 1px solid var(--border-color); margin-bottom: 1rem; flex-shrink: 0; }
.sidebar-profile img { width: 50px; height: 50px; border-radius: 50%; object-fit: cover; }
.sidebar-profile h3 { margin: 0; font-size: 1rem; font-weight: 600; }
.sidebar-profile span { font-size: 0.85rem; color: var(--text-muted); }
.sidebar nav { flex-grow: 1; overflow-y: auto; }
.sidebar nav a { display: flex; align-items: center; gap: 1rem; padding: 0.75rem 1rem; border-radius: 8px; color: var(--text-muted); font-weight: 500; text-decoration: none; transition: background-color 0.2s, color 0.2s; }
.sidebar nav a:hover { background-color: #e9ecef; color: var(--text-dark); }
.sidebar nav a.active { background-color: var(--primary-blue); color: #fff; }
.sidebar nav .fa { font-size: 1.2rem; width: 20px; text-align: center; }
.sidebar-footer { margin-top: auto; flex-shrink: 0; }
.sidebar-footer a { display: flex; align-items: center; gap: 1rem; padding: 0.75rem 1rem; border-radius: 8px; color: var(--text-muted); font-weight: 500; text-decoration: none; }
.sidebar-footer a:hover { background-color: #e9ecef; color: var(--text-dark); }
.sidebar nav .menu-title { padding: 10px 20px 5px 20px; font-size: 0.8rem; font-weight: bold; color: #8a99b5; text-transform: uppercase; letter-spacing: 1px; margin-top: 10px; }
.sidebar nav .menu-title:first-of-type { margin-top: 0; }
.main-header { height: var(--header-height); background-color: var(--primary-blue); color: #fff; border-bottom: 1px solid var(--border-color); display: flex; align-items: center; justify-content: space-between; padding: 0 2rem; }
.main-header h1 { font-size: 1.5rem; margin: 0; }
.main-header h1 small { color: rgba(255, 255, 255, 0.8); display: block; font-size: 0.9rem; font-weight: 400; }
.content-body { padding: 2rem; }

/* --- Componentes (Cards, Tabelas, Formulários, Botões) --- */
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 1.5rem; }
.kpi-card { color: #fff; border-radius: 8px; padding: 1.5rem; display: flex; justify-content: space-between; align-items: center; box-shadow: var(--shadow-sm); }
.kpi-card .kpi-text h3 { font-size: 2.5rem; margin: 0 0 0.25rem 0; font-weight: 700; }
.kpi-card .kpi-text span { font-size: 1rem; opacity: 0.9; }
.kpi-card .kpi-icon .fa { font-size: 4rem; opacity: 0.3; }
.kpi-red { background-color: var(--kpi-red); }
.kpi-green { background-color: var(--kpi-green); }
.kpi-blue { background-color: var(--kpi-blue); }
.kpi-orange { background-color: var(--kpi-orange); }
.card { background-color: #fff; border: 1px solid var(--border-color); border-radius: 8px; box-shadow: var(--shadow-sm); margin-top: 2rem; }
.card-header { padding: 1rem 1.5rem; border-bottom: 1px solid var(--border-color); }
.card-header h2 { font-size: 1.2rem; margin: 0; }
.card-body { padding: 1.5rem; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 1rem; text-align: left; border-bottom: 1px solid var(--border-color); }
thead th { font-weight: 600; color: var(--text-muted); }
tbody tr:last-child td { border-bottom: none; }
.acoes a { text-decoration: none; color: var(--text-muted); }
.acoes .fa { font-size: 1.2rem; transition: color 0.2s ease; padding: 0 0.5rem; }
.acoes a:hover .fa { color: var(--primary-blue); }

/* Estilo geral para todos os campos de formulário */
form input[type="text"], form input[type="email"], form input[type="password"], form input[type="number"], form input[type="tel"], form input[type="date"], form textarea, form select { display: block; width: 100%; padding: 0.5rem; font-size: 1rem; margin-top: 0.25rem; border: 1px solid var(--border-color); border-radius: 5px; box-sizing: border-box; }
form label { display: block; margin-bottom: 1rem; font-weight: 500; }
.card-body .grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 1rem; margin-bottom: 1rem; }
select { appearance: none; -webkit-appearance: none; -moz-appearance: none; background-image: url('data:image/svg+xml;utf8,<svg fill="%236c757d" height="16" viewBox="0 0 24 24" width="16" xmlns="http://www.w3.org/2000/svg"><path d="M7 10l5 5 5-5z"/></svg>'); background-repeat: no-repeat; background-position: right 0.75rem center; background-size: 1rem; padding-right: 2rem; }

/* ⭐⭐⭐ INÍCIO DA CORREÇÃO DOS BOTÕES ⭐⭐⭐ */
/* Estilo base para TODOS os botões e links que parecem botões, com a cor primária como padrão */
button, a[role="button"] {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    font-weight: 500;
    text-align: center;
    text-decoration: none;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.1s ease;
    background-color: var(--primary-blue);
    color: #fff;
}

button:active, a[role="button"]:active {
    transform: translateY(1px);
}

button:hover, a[role="button"]:hover {
    background-color: var(--primary-blue-dark);
}

/* Estilo do botão secundário (cinza) - para ações como "Adicionar" */
button.secondary, a.secondary {
    background-color: var(--secondary-gray);
    color: #fff;
    font-size: 0.9rem;
    padding: 0.6rem 1.2rem;
}
button.secondary:hover, a.secondary:hover {
    background-color: var(--secondary-gray-dark);
}
/* ⭐⭐⭐ FIM DA CORREÇÃO DOS BOTÕES ⭐⭐⭐ */

/* ================================================= */
/* ESTILOS PARA A PÁGINA DE LOGIN                    */
/* ================================================= */
.login-page-v2 { display: flex; justify-content: center; align-items: center; min-height: 100vh; background-color: var(--bg-main); font-family: var(--font-sans); }
.login-wrapper { background-color: #fff; padding: 2.5rem 2rem; border-radius: 12px; box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1); width: 100%; max-width: 400px; text-align: center; }
.login-avatar { width: 90px; height: 90px; border-radius: 50%; object-fit: cover; margin-bottom: 1rem; border: 3px solid var(--bg-main); }
.login-title { font-size: 1.5rem; color: var(--text-dark); margin: 0; margin-bottom: 1.5rem; }
.login-form .input-group { position: relative; margin-bottom: 1rem; }
.login-form .input-icon { position: absolute; left: 15px; top: 50%; transform: translateY(-50%); color: var(--text-muted); }
.login-form input[type="email"], .login-form input[type="password"] { width: 100%; padding: 12px 12px 12px 40px; border: 1px solid var(--border-color); border-radius: 8px; font-size: 1rem; transition: border-color 0.2s, box-shadow 0.2s; box-sizing: border-box; }
.login-form input[type="email"]:focus, .login-form input[type="password"]:focus { outline: none; border-color: #80bdff; box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25); }
.login-button { width: 100%; padding: 12px; border: none; border-radius: 8px; background-color: var(--primary-blue); color: white; font-size: 1rem; font-weight: bold; cursor: pointer; margin-top: 1rem; transition: background-color 0.2s; }
.login-button:hover { background-color: var(--primary-blue-dark); }
.login-error { color: #dc3545; background-color: #f8d7da; border: 1px solid #f5c6cb; border-radius: 8px; padding: 10px; margin: 0 0 1rem 0; font-size: 0.9rem; text-align: center; }
.forgot-password { display: block; margin-top: 1.5rem; color: var(--primary-blue); text-decoration: none; font-size: 0.9rem; }
.forgot-password:hover { text-decoration: underline; }

/* ================================================= */
/* ESTILOS PARA ABAS E FORMULÁRIO DE AVALIAÇÃO       */
/* ================================================= */
.tab-buttons { display: flex; border-bottom: 2px solid var(--border-color); margin-bottom: 1.5rem; }
.tab-btn { padding: 0.75rem 1.5rem; cursor: pointer; background-color: transparent; border: none; font-size: 1rem; font-weight: 500; color: var(--text-muted); border-bottom: 2px solid transparent; margin-bottom: -2px; transition: color 0.2s, border-color 0.2s; }
.tab-btn:hover { color: var(--text-dark); }
.tab-btn.active { color: var(--primary-blue); border-bottom-color: var(--primary-blue); }
.tab-content { display: none; }
.tab-content.active { display: block; }
.tab-title { font-size: 1.3rem; margin-top: 0; margin-bottom: 2rem; border-bottom: 1px solid var(--border-color); padding-bottom: 1rem; }
.form-group-avaliacao { display: flex; align-items: flex-start; padding: 1rem 0; border-bottom: 1px solid #f0f2f5; }
.form-group-avaliacao:last-child { border-bottom: none; }
.item-label { flex-basis: 180px; flex-shrink: 0; font-weight: 600; padding-right: 1rem; }
.item-label small { display: block; font-weight: 400; color: var(--text-muted); }
.radio-group, .checkbox-group { display: flex; gap: 1.5rem; flex-wrap: wrap; }
.radio-group label, .checkbox-group label { display: flex; align-items: center; gap: 0.5rem; font-weight: 400; white-space: nowrap; }