/* c:\Users\kairo\Downloads\kairotv\assets\css\style.css */

/* 1. Reset e Variáveis de Tema (Cores e Fontes) */
:root {
    /* Cores base (Tema Claro) */
    --md-sys-color-primary: #00639a;
    --md-sys-color-on-primary: #ffffff;
    --md-sys-color-primary-container: #cce5ff;
    --md-sys-color-on-primary-container: #001e32;
    --md-sys-color-secondary: #51606f;
    --md-sys-color-on-secondary: #ffffff;
    --md-sys-color-secondary-container: #d4e4f6;
    --md-sys-color-on-secondary-container: #0d1d2a;
    --md-sys-color-tertiary: #67587a;
    --md-sys-color-on-tertiary: #ffffff;
    --md-sys-color-tertiary-container: #ecdcff;
    --md-sys-color-on-tertiary-container: #221533;
    --md-sys-color-error: #ba1a1a;
    --md-sys-color-on-error: #ffffff;
    --md-sys-color-error-container: #ffdad6;
    --md-sys-color-on-error-container: #410002;
    --md-sys-color-background: #fcfcff;
    --md-sys-color-on-background: #1a1c1e;
    --md-sys-color-surface: #fcfcff;
    --md-sys-color-on-surface: #1a1c1e;
    --md-sys-color-surface-variant: #dee3eb;
    --md-sys-color-on-surface-variant: #42474e;
    --md-sys-color-outline: #72787e;
    --md-sys-color-shadow: #000000;

    /* Tipografia */
    --md-sys-font-family: 'Roboto', sans-serif, system-ui;
    --md-sys-border-radius: 16px; /* Raio de borda maior para um look M3 */
    --md-sys-border-radius-full: 9999px; /* Para botões "pílula" */
}

/* Cores para o Tema Escuro */
[data-bs-theme="dark"] {
    --md-sys-color-primary: #92caff;
    --md-sys-color-on-primary: #003352;
    --md-sys-color-primary-container: #004a74;
    --md-sys-color-on-primary-container: #cce5ff;
    --md-sys-color-secondary: #b8c8da;
    --md-sys-color-on-secondary: #23323f;
    --md-sys-color-secondary-container: #394857;
    --md-sys-color-on-secondary-container: #d4e4f6;
    --md-sys-color-tertiary: #d0bfe7;
    --md-sys-color-on-tertiary: #382a49;
    --md-sys-color-tertiary-container: #4f4161;
    --md-sys-color-on-tertiary-container: #ecdcff;
    --md-sys-color-error: #ffb4ab;
    --md-sys-color-on-error: #690005;
    --md-sys-color-error-container: #93000a;
    --md-sys-color-on-error-container: #ffdad6;
    --md-sys-color-background: #1a1c1e;
    --md-sys-color-on-background: #e2e2e5;
    --md-sys-color-surface: #1a1c1e;
    --md-sys-color-on-surface: #e2e2e5;
    --md-sys-color-surface-variant: #42474e;
    --md-sys-color-on-surface-variant: #c2c7ce;
    --md-sys-color-outline: #8c9198;
}

/* 2. Estilos Globais */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--md-sys-font-family);
    font-size: 16px;
    line-height: 1.6;
    background-color: var(--md-sys-color-background);
    color: var(--md-sys-color-on-background);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    transition: background-color 0.3s, color 0.3s;
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 500;
    margin-bottom: 0.75em;
    color: var(--md-sys-color-primary);
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.75rem; }

p {
    margin-bottom: 1rem;
}

a {
    color: var(--md-sys-color-primary);
    text-decoration: none;
    font-weight: 500;
}

a:hover {
    text-decoration: none;
}

ul {
    list-style-position: inside;
    padding-left: 1.5rem;
    margin-bottom: 1rem;
}

/* 3. Layout e Contêineres */
.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 0;
}

.container-fullwidth {
    width: 100%;
}

main {
    flex-grow: 1;
}

/* 4. Header */
header {
    background-color: var(--md-sys-color-surface);
    border-bottom: none;
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(8px);
    background-color: rgba(252, 252, 255, 0.8); /* Fundo semi-transparente */
}

[data-bs-theme="dark"] header {
    background-color: rgba(26, 28, 30, 0.8);
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0;
}

#branding #logo {
    height: 40px;
    vertical-align: middle;
}

/* Estilos do Menu */
.navbar-nav .nav-link {
    color: var(--md-sys-color-on-surface-variant);
    font-weight: 500;
    transition: all 0.2s ease-in-out;
    border-radius: 50rem; /* Formato de pílula */
}

.navbar-nav .nav-link:hover {
    color: var(--md-sys-color-primary);
    background-color: rgba(var(--bs-primary-rgb), 0.08); /* Fundo sutil ao passar o mouse */
    text-decoration: none;
}

.navbar-nav .nav-link.active {
    color: var(--md-sys-color-primary);
    font-weight: 700;
    background-color: rgba(var(--bs-primary-rgb), 0.12); /* Destaque para item ativo */
}

/* 5. Footer */
footer {
    text-align: center;
    padding: 2rem 0;
    margin-top: 2rem;
    background-color: var(--md-sys-color-surface-variant);
    color: var(--md-sys-color-on-surface-variant);
}

/* 6. Componentes (Botões, Cards, Formulários) */

/* Botões (Estilo Material 3) */
.btn, .theme-toggle-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 24px;
    border-radius: var(--md-sys-border-radius-full);
    border: 1px solid transparent;
    font-size: 0.9rem;
    font-weight: 500;
    text-transform: none;
    letter-spacing: 0.1px;
    cursor: pointer;
    transition: background-color 0.2s, box-shadow 0.2s;
    text-decoration: none;
    line-height: 1.25rem;
}

.btn .material-symbols-outlined {
    font-size: 18px;
}

/* Botão Primário (Filled) */
.btn {
    background-color: var(--md-sys-color-primary);
    color: var(--md-sys-color-on-primary);
}
.btn:hover {
    box-shadow: 0 1px 3px 1px rgba(0,0,0,0.15);
    text-decoration: none;
}

/* Botão Secundário (Outlined) */
.btn.btn-secondary {
    background-color: transparent;
    color: var(--md-sys-color-primary);
    border-color: var(--md-sys-color-outline);
}
.btn.btn-secondary:hover {
    background-color: rgba(0, 99, 154, 0.08); /* Cor primária com baixa opacidade */
}
[data-bs-theme="dark"] .btn.btn-secondary:hover {
    background-color: rgba(146, 202, 255, 0.08);
}

/* Botão Terciário (Text) - Usado para o toggle de tema */
.theme-toggle-btn {
    background-color: transparent;
    color: var(--md-sys-color-on-surface-variant);
    border: none;
    width: 48px;
    height: 48px;
    padding: 0;
    border-radius: 50%;
}
.theme-toggle-btn:hover {
    background-color: var(--md-sys-color-surface-variant);
}

/* Botões de Download (Tonal) */
.btn.btn-primary {
    background-color: var(--md-sys-color-secondary-container);
    color: var(--md-sys-color-on-secondary-container);
}
.btn.btn-primary:hover {
    box-shadow: 0 1px 3px 1px rgba(0,0,0,0.15);
}


/* Cards (Estilo Material 3) */
.card {
    background-color: var(--md-sys-color-surface);
    border: 1px solid var(--md-sys-color-outline);
    border-radius: var(--md-sys-border-radius);
    padding: 1.5rem;
    margin-bottom: 2rem;
    box-shadow: none; /* M3 prefere elevação via cor ou borda */
    transition: background-color 0.3s, border-color 0.3s;
}

.card-info, .card-warning {
    padding: 1rem 1.5rem;
    border-radius: var(--md-sys-border-radius);
    margin-bottom: 1.5rem;
}
.card-info {
    background-color: var(--md-sys-color-primary-container);
    color: var(--md-sys-color-on-primary-container);
}
.card-warning {
    background-color: var(--md-sys-color-tertiary-container);
    color: var(--md-sys-color-on-tertiary-container);
}

/* Formulários (Estilo Material 3 Outlined) */
.form-control, .form-select {
    padding: 12px 16px;
    background-color: var(--md-sys-color-surface);
    border: 1px solid var(--md-sys-color-outline);
    border-radius: 4px;
    font-size: 1rem;
    color: var(--md-sys-color-on-surface);
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-control:focus, .form-select:focus {
    background-color: var(--md-sys-color-surface);
    border-color: var(--md-sys-color-primary);
    box-shadow: 0 0 0 0.25rem rgba(0, 99, 154, 0.25); /* Cor primária com transparência */
    color: var(--md-sys-color-on-surface);
    outline: none;
}

/* Ajuste para Labels Flutuantes do Bootstrap (usado no install.php) */
.form-floating > .form-control:focus ~ label,
.form-floating > .form-control:not(:placeholder-shown) ~ label {
    color: var(--md-sys-color-primary);
    opacity: 1;
}

/* 7. Seções Específicas */

/* Hero Banner */
.hero-banner {
    text-align: center;
    padding: 5rem 1rem;
    background-color: var(--md-sys-color-surface-variant);
    color: var(--md-sys-color-on-surface-variant);
}

.hero-icon {
    font-size: 6rem;
    margin-bottom: 1rem;
}

.hero-banner h1 {
    color: var(--md-sys-color-on-surface);
    font-size: 3rem;
    font-weight: 700;
}

.hero-banner p {
    font-size: 1.25rem;
    max-width: 600px;
    margin: 1rem auto 2rem auto;
}

.hero-buttons {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
}

/* Tabelas de Gerenciamento */
.table-responsive {
    width: 100%;
    overflow-x: auto;
}

.management-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}

.management-table th, .management-table td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid var(--md-sys-color-outline);
}

.management-table th {
    background-color: var(--md-sys-color-surface);
    font-weight: 500;
    color: var(--md-sys-color-on-surface-variant);
}

.management-table tbody tr:hover {
    background-color: var(--md-sys-color-surface-variant);
}

.text-danger { color: var(--md-sys-color-error); }
.text-danger:hover { color: var(--md-sys-color-error); }
.text-primary { color: var(--md-sys-color-primary); }

/* Abas (Tabs) */
.tab-nav ul {
    display: flex;
    list-style: none;
    padding: 0;
    border-bottom: 1px solid var(--md-sys-color-outline);
    margin-bottom: 1.5rem;
}

.tab-nav a {
    display: block;
    padding: 0.75rem 1rem;
    text-decoration: none;
    color: var(--md-sys-color-on-surface-variant);
    border-bottom: 2px solid transparent;
    margin-bottom: -1px; /* Alinha com a borda da ul */
}

.tab-nav a.active {
    color: var(--md-sys-color-primary);
    border-bottom-color: var(--md-sys-color-primary);
    font-weight: 700;
}

/* --- ESTILOS UNIFICADOS --- */

/* Ícones Material Symbols - Ajuste Fino */
.material-symbols-outlined {
  font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
  vertical-align: middle;
}

/* Seção de Features (Home) */
.features-section {
    padding: 40px 0;
}
.features-section h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 48px;
}
.feature-card {
    border-radius: 12px;
    border: 1px solid var(--md-sys-color-outline);
    background-color: var(--md-sys-color-surface);
    text-align: center;
    transition: transform 0.2s, box-shadow 0.2s;
    height: 100%;
}
.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}
.feature-card .card-body {
    padding: 2rem;
}
.feature-icon {
    font-size: 36px;
    color: var(--md-sys-color-primary);
}

/* Página de Manutenção */
body.maintenance-page {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--md-sys-color-surface);
    color: var(--md-sys-color-on-surface);
}
.maintenance-card {
    max-width: 600px;
    text-align: center;
    padding: 3rem;
    border-radius: 1rem;
    background-color: var(--md-sys-color-surface-variant);
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}
.maintenance-icon {
    font-size: 4rem;
    color: var(--md-sys-color-primary);
    margin-bottom: 1.5rem;
}

/* Carrinho */
.cart-item-img {
    width: 75px;
    height: 75px;
    object-fit: cover;
    border-radius: 8px;
}

/* QR Code PIX */
#pix-qrcode {
    background-color: #ffffff;
    padding: 10px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin: 0 auto;
}

/* Login e Instalação */
html, body.install-page {
    height: 100%;
}
body.install-page {
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--md-sys-color-background);
}
.login-card {
    padding: 24px;
    background-color: var(--md-sys-color-surface);
    border: 1px solid var(--md-sys-color-outline);
    border-radius: var(--md-sys-border-radius);
}
.login-card .card-title {
    color: var(--md-sys-color-primary);
    font-weight: 700;
}

/* 8. Responsividade */
@media (max-width: 768px) {

/* ---------- Conteúdo de páginas dinâmicas (CMS) ---------- */
.page-content {
    line-height: 1.75;
    overflow-wrap: break-word;
}

.page-content img {
    max-width: 100%;
    height: auto;
    border-radius: 6px;
}

.page-content h1 { font-size: 2rem; margin-top: 1.5rem; margin-bottom: 1rem; }
.page-content h2 { font-size: 1.6rem; margin-top: 1.4rem; margin-bottom: .85rem; }
.page-content h3 { font-size: 1.3rem; margin-top: 1.25rem; margin-bottom: .75rem; }

.page-content blockquote {
    border-left: 4px solid var(--bs-primary, #00639a);
    padding-left: 1.1rem;
    color: #6c757d;
    margin: 1.25rem 0;
}

.page-content pre {
    background: rgba(0, 0, 0, .05);
    padding: 1rem;
    border-radius: 6px;
    overflow-x: auto;
}

[data-bs-theme="dark"] .page-content pre {
    background: rgba(255, 255, 255, .07);
}

.page-content table {
    width: 100%;
    margin: 1.25rem 0;
    border-collapse: collapse;
}

.page-content th,
.page-content td {
    border: 1px solid var(--bs-border-color, #dee2e6);
    padding: .55rem .75rem;
}

.page-content hr { margin: 2rem 0; }

    h1 { font-size: 2rem; }
    .hero-banner h1 { font-size: 2.5rem; }

    /* Ajuste para tabelas em telas pequenas */
    .management-table thead {
        display: none;
    }
    .management-table, .management-table tbody, .management-table tr, .management-table td {
        display: block;
        width: 100%;
    }
    .management-table tr {
        margin-bottom: 1rem;
        border: 1px solid var(--md-sys-color-outline);
        border-radius: 8px;
        padding: 0.5rem;
    }
    .management-table td {
        text-align: right;
        padding-left: 50%;
        position: relative;
        border: none;
    }
    .management-table td::before {
        content: attr(data-label);
        position: absolute;
        left: 1rem;
        width: calc(50% - 2rem);
        text-align: left;
        font-weight: bold;
        color: var(--md-sys-color-on-surface-variant);
    }

   
    .btn-danger {
    --bs-btn-color: var(--md-sys-color-on-error);
    --bs-btn-bg: var(--md-sys-color-error);
    --bs-btn-border-color: transparent;
    --bs-btn-hover-color: var(--md-sys-color-on-error);
    --bs-btn-hover-bg: var(--md-sys-color-error);
    --bs-btn-hover-border-color: transparent;
    --bs-btn-active-color: var(--md-sys-color-on-error);
    --bs-btn-active-bg: var(--md-sys-color-error);
    --bs-btn-active-border-color: transparent;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.3);
    }

    .btn-outline-danger {
    --bs-btn-color: var(--md-sys-color-error);
    --bs-btn-border-color: var(--md-sys-color-error);
    --bs-btn-hover-color: var(--md-sys-color-error);
    --bs-btn-hover-bg: var(--md-sys-color-error-container);
    --bs-btn-hover-border-color: var(--md-sys-color-error);
    --bs-btn-active-color: var(--md-sys-color-error);
    --bs-btn-active-bg: var(--md-sys-color-error-container);
    --bs-btn-active-border-color: var(--md-sys-color-error);
    box-shadow: none;
    }

 
    
}
