﻿:root {
    --af-bg: #f5f7fb;
    --af-surface: #ffffff;
    --af-border: #d9dee7;
    --af-border-strong: #c7cfdb;
    --af-text: #1f2937;
    --af-muted: #6b7280;
    --af-primary: #255f99;
    --af-primary-dark: #1d4e7f;
    --af-primary-soft: #eef5ff;
    --af-success: #1f7a65;
    --af-shadow: 0 10px 28px rgba(15, 23, 42, 0.08);
}

body {
    background: var(--af-bg);
    color: var(--af-text);
}

.navbar.bg-dark {
    background: #172233 !important;
    box-shadow: 0 2px 12px rgba(15, 23, 42, 0.18);
}

.af-navbar-container {
    max-width: 1180px;
    padding-left: 0;
    padding-right: 12px;
}

.af-brand {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    font-weight: 750;
    letter-spacing: 0;
}

.af-brand-mark {
    width: 28px;
    height: 28px;
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 28px;
    color: #ffffff;
    background: linear-gradient(145deg, #2f7dc1, #1f7a65);
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 8px;
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.18);
}

.af-brand-mark::before {
    content: "";
    position: absolute;
    left: 6px;
    right: 6px;
    top: 6px;
    height: 3px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.82);
}

.af-brand-mark::after {
    content: "";
    position: absolute;
    right: 5px;
    bottom: 5px;
    width: 8px;
    height: 5px;
    border-left: 2px solid #ffffff;
    border-bottom: 2px solid #ffffff;
    transform: rotate(-45deg);
}

.af-brand-letter {
    margin-top: 2px;
    font-size: 14px;
    font-weight: 800;
    line-height: 1;
}

main.container {
    max-width: 1180px;
    padding-bottom: 48px;
}

.page-shell {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.page-header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 18px;
}

.page-header h1,
.page-header h2,
.page-header h4 {
    margin: 0;
    color: var(--af-text);
    font-size: 26px;
    font-weight: 750;
    letter-spacing: 0;
}

.page-header p {
    margin: 4px 0 0;
    color: var(--af-muted);
    font-size: 14px;
}

.af-panel {
    padding: 22px;
    background: var(--af-surface);
    border: 1px solid var(--af-border);
    border-radius: 8px;
    box-shadow: var(--af-shadow);
}

.form-section-title {
    margin: 8px 0 14px;
    padding-bottom: 8px;
    color: #334155;
    font-size: 15px;
    font-weight: 750;
    border-bottom: 1px solid #e6eaf0;
}

.form-label {
    color: #374151;
    font-size: 13px;
    font-weight: 700;
}

.form-control,
.form-select {
    min-height: 42px;
    border-color: var(--af-border-strong);
    border-radius: 7px;
    color: var(--af-text);
    box-shadow: none;
}

textarea.form-control {
    min-height: 96px;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--af-primary);
    box-shadow: 0 0 0 3px rgba(37, 95, 153, 0.14);
}

.form-text {
    color: var(--af-muted);
}

.form-check {
    min-height: 34px;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    border: 1px solid var(--af-border);
    border-radius: 7px;
    background: #fbfcfe;
}

.form-check .form-check-input {
    margin-left: 0;
    margin-top: 0;
}

.form-check-input:checked {
    background-color: var(--af-primary);
    border-color: var(--af-primary);
}

.af-check-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 10px;
}

.btn {
    min-height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border-radius: 7px;
    font-weight: 700;
    box-shadow: none;
}

.btn-primary {
    background: var(--af-primary);
    border-color: var(--af-primary);
}

.btn-primary:hover,
.btn-primary:focus {
    background: var(--af-primary-dark);
    border-color: var(--af-primary-dark);
}

.btn-secondary {
    color: #334155;
    background: #eef1f5;
    border-color: #d6dce5;
}

.btn-secondary:hover,
.btn-secondary:focus {
    color: #1f2937;
    background: #e1e7ef;
    border-color: #c7cfdb;
}

.nav-tabs {
    gap: 6px;
    border-bottom: 1px solid var(--af-border);
}

.nav-tabs .nav-link {
    color: var(--af-muted);
    border: 0;
    border-bottom: 3px solid transparent;
    border-radius: 0;
    font-weight: 700;
}

.nav-tabs .nav-link:hover {
    color: var(--af-primary);
    border-color: transparent;
}

.nav-tabs .nav-link.active {
    color: var(--af-primary);
    background: transparent;
    border-bottom-color: var(--af-primary);
}

.table {
    --bs-table-striped-bg: #f8fafc;
    --bs-table-hover-bg: #eef5ff;
    border: 1px solid var(--af-border);
    border-radius: 8px;
    overflow: hidden;
}

.table thead th,
table.dataTable thead th {
    color: #334155;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0;
    background: #f1f5f9;
    border-bottom: 1px solid var(--af-border) !important;
}

.table td,
.table th {
    padding: 11px 12px;
    vertical-align: middle;
}

table.dataTable {
    width: 100% !important;
    overflow: hidden;
    background: var(--af-surface);
    border: 1px solid var(--af-border);
    border-collapse: separate !important;
    border-spacing: 0;
    border-radius: 8px;
}

table.dataTable tbody td {
    padding: 11px 12px;
    border-top: 1px solid #edf1f6;
}

table.dataTable tbody tr:hover {
    background: #eef5ff;
}

.dataTables_wrapper {
    padding: 16px;
    background: var(--af-surface);
    border: 1px solid var(--af-border);
    border-radius: 8px;
    box-shadow: var(--af-shadow);
    overflow-x: auto;
}

.dataTables_wrapper .dataTables_filter input,
.dataTables_wrapper .dataTables_length select {
    min-height: 36px;
    margin-left: 6px;
    border: 1px solid var(--af-border-strong);
    border-radius: 7px;
}

.dataTables_wrapper .dataTables_paginate .paginate_button {
    border-radius: 6px !important;
}

.dataTables_wrapper .dataTables_paginate .paginate_button.current {
    color: #ffffff !important;
    background: var(--af-primary) !important;
    border-color: var(--af-primary) !important;
}

.link-strong,
.link-strong:hover,
.link-strong:focus,
.loja-edit-link,
.loja-edit-link:hover,
.loja-edit-link:focus,
.agenda-loja-link,
.agenda-loja-link:hover,
.agenda-loja-link:focus {
    color: inherit;
    font-weight: 750;
    text-decoration: none;
}

.link-strong:hover,
.loja-edit-link:hover,
.agenda-loja-link:hover {
    color: var(--af-primary);
}

.login-btn {
    background-color: #003366;
    font-weight: bold;
    transition: background-color 0.3s ease-in-out;
}

.login-btn:hover {
    background-color: #004080;
}

@media (max-width: 576px) {
    .af-panel {
        padding: 16px;
    }

    .page-header h1,
    .page-header h2,
    .page-header h4 {
        font-size: 22px;
    }
}
