/* assets/css/styles.css - Tema LS Distribuidora (Amarelo e Preto) */

/* Importação de fontes */
@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;500;700;900&display=swap');

/* Reset básico e tipografia */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Roboto', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f5f5f5;
    color: #333;
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Cabeçalho */
.header {
    background: #000000;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.logo {
    font-size: 32px;
    font-weight: 900;
    color: #FFD700;
    text-align: center;
    letter-spacing: 2px;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.logo::before {
    content: "LS";
    background: #FFD700;
    color: #000000;
    padding: 5px 12px;
    border-radius: 5px;
    font-size: 24px;
    font-weight: 900;
}

/* Menu Principal */
.menu {
    background: #FFD700;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0;
    padding: 0;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.menu a {
    background-color: transparent;
    color: #000000;
    padding: 15px 25px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    border-bottom: 3px solid transparent;
    text-transform: uppercase;
    font-size: 14px;
    letter-spacing: 1px;
}

.menu a:hover {
    background-color: #000000;
    color: #FFD700;
    border-bottom-color: #FFA500;
}

/* Menu Lateral (Dashboard) */
.main-content {
    display: flex;
    flex-grow: 1;
    min-height: calc(100vh - 150px);
}

.menu-lateral {
    width: 260px;
    background: linear-gradient(180deg, #1a1a1a 0%, #000000 100%);
    padding: 0;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
}

.menu-lateral a {
    display: block;
    color: #FFD700;
    padding: 18px 25px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    border-left: 4px solid transparent;
    font-size: 15px;
}

.menu-lateral a:hover {
    background-color: #FFD700;
    color: #000000;
    border-left-color: #FFA500;
    padding-left: 30px;
}

.menu-lateral a:first-child {
    margin-top: 20px;
}

/* Container de conteúdo */
.content {
    flex-grow: 1;
    padding: 30px;
    background-color: #f5f5f5;
    max-width: 100%;
    margin: 0;
    width: 90%;
    max-width: 1200px;
    margin: 20px auto;
}

.content h2 {
    color: #000000;
    margin-bottom: 30px;
    font-size: 28px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-bottom: 3px solid #FFD700;
    padding-bottom: 10px;
    display: inline-block;
    width: 100%;
    text-align: center;
}

/* Cards e Containers */
.card, .chart-card, .ranking-card, .upload-card {
    background: #FFFFFF;
    padding: 25px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    margin-bottom: 20px;
    border-top: 3px solid #FFD700;
}

.card h3, .chart-card h3, .ranking-card h3, .upload-card h3 {
    color: #000000;
    margin-bottom: 20px;
    font-size: 20px;
    font-weight: 700;
    text-transform: uppercase;
}

/* Formulários */
form {
    background: #FFFFFF;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    border-top: 3px solid #FFD700;
}

form label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #000000;
    text-transform: uppercase;
    font-size: 12px;
    letter-spacing: 1px;
}

form input[type="text"],
form input[type="password"],
form input[type="number"],
form input[type="date"],
form input[type="file"],
form select,
form textarea {
    width: 100%;
    padding: 12px 15px;
    margin-bottom: 20px;
    border: 2px solid #ddd;
    border-radius: 5px;
    font-size: 16px;
    transition: all 0.3s ease;
    background: #FFFFFF;
}

form input:focus,
form select:focus,
form textarea:focus {
    border-color: #FFD700;
    outline: none;
    box-shadow: 0 0 0 3px rgba(255, 215, 0, 0.2);
}

/* Botões */
button[type="submit"], .button {
    background: #FFD700;
    color: #000000;
    border: none;
    padding: 15px 30px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s ease;
    display: inline-block;
    text-decoration: none;
    box-shadow: 0 3px 10px rgba(255, 215, 0, 0.3);
}

button[type="submit"]:hover, .button:hover {
    background: #000000;
    color: #FFD700;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.4);
}

/* Filtros */
.filters {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 30px;
    background: #FFFFFF;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    border-left: 4px solid #FFD700;
}

.filter-group {
    flex: 1;
    min-width: 200px;
}

.filter-group label {
    color: #000000;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 11px;
    letter-spacing: 1px;
}

#clear-filters {
    background: #333333;
    color: #FFFFFF;
    border: none;
    padding: 12px 25px;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 600;
    text-transform: uppercase;
    transition: all 0.3s ease;
    align-self: flex-end;
}

#clear-filters:hover {
    background: #000000;
    color: #FFD700;
}

/* Tabelas */
table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    background: #FFFFFF;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

th {
    background: #000000;
    color: #FFD700;
    padding: 15px;
    text-align: left;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 13px;
    letter-spacing: 1px;
}

td {
    padding: 15px;
    border-bottom: 1px solid #f0f0f0;
}

tr:hover {
    background-color: #fffbf0;
}

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

/* Botões de ação */
.whatsapp-btn, .edit-btn, .delete-btn {
    display: inline-block;
    padding: 8px 16px;
    margin-right: 8px;
    text-decoration: none;
    border-radius: 5px;
    font-weight: 600;
    font-size: 13px;
    text-transform: uppercase;
    transition: all 0.3s ease;
}

.whatsapp-btn {
    background: #25D366;
    color: #FFFFFF;
}

.whatsapp-btn:hover {
    background: #1ebe57;
    transform: translateY(-2px);
}

.edit-btn {
    background: #FFD700;
    color: #000000;
}

.edit-btn:hover {
    background: #000000;
    color: #FFD700;
    transform: translateY(-2px);
}

.delete-btn {
    background: #dc3545;
    color: #FFFFFF;
    border: none;
    cursor: pointer;
}

.delete-btn:hover {
    background: #c82333;
    transform: translateY(-2px);
}

/* Login Container */
.login-container {
    background: #FFFFFF;
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    width: 400px;
    margin: auto;
    margin-top: 100px;
    border-top: 5px solid #FFD700;
    position: relative;
}

.login-container .logo {
    margin-bottom: 30px;
    font-size: 28px;
    color: #000000;
    text-align: center;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 2px;
    text-shadow: none;
}

.login-container input {
    margin-bottom: 20px;
    border: 2px solid #ddd;
}

.login-container input:focus {
    border-color: #FFD700;
}

.login-container button {
    width: 100%;
    padding: 15px;
    font-size: 16px;
    background: #FFD700;
    color: #000000;
    font-weight: 700;
}

.login-container button:hover {
    background: #000000;
    color: #FFD700;
}

/* Gráficos */
.metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(500px, 1fr));
    gap: 25px;
    margin-bottom: 30px;
}

.chart-container {
    position: relative;
    height: 350px;
    width: 100%;
    padding: 15px;
}

/* Rankings */
.ranking-container {
    display: flex;
    justify-content: space-between;
    gap: 25px;
    margin-top: 30px;
    flex-wrap: wrap;
}

.ranking-card {
    flex: 1 1 350px;
    background: #FFFFFF;
    border-left: 4px solid #FFD700;
}

.ranking-card h3 {
    color: #000000;
    border-bottom: 2px solid #FFD700;
    padding-bottom: 15px;
}

.ranking-card ol {
    list-style: none;
    padding: 0;
    counter-reset: item;
}

.ranking-card li {
    background: #f8f9fa;
    padding: 15px;
    margin-bottom: 10px;
    border-radius: 5px;
    position: relative;
    padding-left: 50px;
    counter-increment: item;
    transition: all 0.3s ease;
}

.ranking-card li::before {
    content: counter(item);
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    background: #FFD700;
    color: #000000;
    width: 25px;
    height: 25px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 12px;
}

.ranking-card li:hover {
    background: #fffbf0;
    transform: translateX(5px);
}

/* Central Area */
.central-area {
    flex: 2;
    min-width: 400px;
}

/* Autocomplete */
.autocomplete-container {
    position: relative;
    width: 100%;
}

.autocomplete-list {
    position: absolute;
    border: 2px solid #FFD700;
    border-top: none;
    z-index: 99;
    top: 100%;
    left: 0;
    right: 0;
    max-height: 200px;
    overflow-y: auto;
    background-color: #FFFFFF;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    border-radius: 0 0 5px 5px;
}

.autocomplete-item {
    padding: 12px;
    cursor: pointer;
    transition: background-color 0.2s;
    border-bottom: 1px solid #f0f0f0;
}

.autocomplete-item:hover {
    background-color: #fffbf0;
}

.autocomplete-item.no-results {
    color: #888;
    cursor: default;
    font-style: italic;
}

/* Mensagens */
.message, .success, .error {
    padding: 15px 20px;
    border-radius: 5px;
    margin-bottom: 20px;
    font-weight: 600;
    text-align: center;
}

.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Responsividade */
@media (max-width: 768px) {
    .main-content {
        flex-direction: column;
    }
    
    .menu-lateral {
        width: 100%;
        order: 2;
    }
    
    .content {
        order: 1;
        padding: 20px;
    }
    
    .metrics-grid {
        grid-template-columns: 1fr;
    }
    
    .ranking-container {
        flex-direction: column;
    }
    
    .login-container {
        width: 90%;
        margin: 50px auto;
    }
    
    .filters {
        flex-direction: column;
    }
    
    .filter-group {
        width: 100%;
    }
}

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

.card, .chart-card, .ranking-card, form {
    animation: fadeIn 0.5s ease-out;
}

/* Scrollbar personalizada */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #FFD700;
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: #FFA500;
}

/* Loading spinner */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #FFD700;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Badges */
.badge {
    display: inline-block;
    padding: 5px 10px;
    border-radius: 15px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.badge-success {
    background: #28a745;
    color: #FFFFFF;
}

.badge-danger {
    background: #dc3545;
    color: #FFFFFF;
}

.badge-warning {
    background: #FFD700;
    color: #000000;
}

.badge-info {
    background: #17a2b8;
    color: #FFFFFF;
}

/* ===== Topbar Unificada (consistente em todas as páginas) ===== */
:root {
  --c-bg: #f6f8fa;
  --c-surface: #ffffff;
  --c-text: #1f2937;
  --c-subtle: #6b7280;
  --c-border: #e5e7eb;
  --c-brand: #1a73e8;
  --c-brand-weak: #e8f0fe;
}
body { background: var(--c-bg); color: var(--c-text); }

.topbar {
  position: sticky; top: 0; z-index: 100;
  background: var(--c-surface);
  border-bottom: 1px solid var(--c-border);
  box-shadow: 0 1px 2px rgba(0,0,0,.04);
}
.topbar__inner {
  max-width: 1200px; margin: 0 auto; padding: 10px 16px;
  display: flex; align-items: center; justify-content: space-between;
}
.topbar__brand { display:flex; align-items:center; gap:8px; font-weight:700 }
.topbar__logo {
  background: var(--c-brand); color: #fff; border-radius: 10px;
  display:inline-block; padding:6px 10px; font-weight:800;
}
.topbar__title { letter-spacing:.4px }
.topbar__nav { display:flex; gap:12px; flex-wrap:wrap }
.topbar__nav a {
  text-decoration:none; color: var(--c-text);
  padding:8px 10px; border-radius:8px; border: 1px solid transparent;
}
.topbar__nav a:hover { background: var(--c-brand-weak); border-color: var(--c-brand-weak); }

/* Normaliza container das páginas antigas */
.content, .page {
  max-width: 1200px; margin: 18px auto; padding: 0 16px 24px;
}
