/*
Feito por Joel Alexandre da Rosa Realino - Itajubá/MG 2026-04-22 19:00
Versão 6
+- Padronização TOTAL de todas as fontes da tabela
+-
*/
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&family=Space+Grotesk:wght@400;500;600;700&display=swap');

:root {
    --bg-base: #f5f7fb;
    --bg-layer: #edf3ff;
    --bg-gradient: linear-gradient(140deg, #fdfdfd 0%, #eef3fb 55%, #e0e7ff 100%);
    --bg-card: #ffffff;
    --bg-card-strong: #f8faff;
    --bg-input: #ffffff;
    --surface: #ffffff;
    --border-soft: rgba(15, 23, 42, 0.15);
    --border-strong: rgba(15, 23, 42, 0.25);
    --text: #0f172a;
    --text-muted: #475569;
    --text-secondary: #64748b;
    --accent: #2563eb;
    --accent-strong: #3b82f6;
    --accent-warm: #f97316;
    --code-bg: rgba(15, 23, 42, 0.04);
    --shadow-heavy: 0 25px 40px rgba(15, 23, 42, 0.15);
    --cor-primaria: #2563eb;
    --cor-secundaria: rgba(59, 130, 246, 0.4);
    --cor-acento: #3b82f6;
    --danger: #ef4444;
    --success: #10b981;
    --info: #17a2b8;
    --warning: #f59e0b;
    --texto-sec: var(--text-muted);
}

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

html, body {
    font-family: 'Poppins', 'Space Grotesk', system-ui, -apple-system, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: var(--text);
}

body {
    font-family: 'Poppins', 'Space Grotesk', system-ui, sans-serif;
    background: var(--bg-base);
    color: var(--text);
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
    background-image: var(--bg-gradient);
    background-attachment: fixed;
}

body::before,
body::after {
    content: '';
    position: absolute;
    width: 360px;
    height: 360px;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.35;
    z-index: 0;
}

body::before {
    background: radial-gradient(circle, rgba(37, 99, 235, 0.25), transparent 70%);
    top: -120px;
    left: -60px;
}

body::after {
    background: radial-gradient(circle, rgba(14, 165, 233, 0.3), transparent 75%);
    bottom: -180px;
    right: -90px;
}

::selection {
    background: rgba(0, 212, 170, 0.4);
    color: var(--text);
}

a {
    color: inherit;
}

.btn {
    border: none;
    border-radius: 999px;
    padding: 12px 22px;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.08);
    border: 1px solid transparent;
}

.btn-primary {
    background: linear-gradient(145deg, var(--accent), var(--accent-strong));
    color: #fff;
}

.btn-primary:hover {
    transform: translateY(-3px) scale(1.01);
    box-shadow: 0 18px 40px rgba(37, 99, 235, 0.25);
}

.btn-secondary {
    background: rgba(15, 23, 42, 0.05);
    color: var(--accent);
    border: 1px solid rgba(15, 23, 42, 0.08);
}

.btn-secondary:hover {
    border-color: var(--accent);
    color: var(--accent-strong);
}

.btn-sm {
    padding: 8px 16px;
    font-size: 0.8rem;
}

.btn-danger {
    background: var(--danger);
    color: white;
}

.btn-success {
    background: var(--success);
    color: white;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Space Grotesk', 'Poppins', system-ui, sans-serif;
    color: var(--text);
    letter-spacing: 0.05em;
}

p {
    color: var(--text-secondary);
    line-height: 1.7;
}

small {
    color: var(--text-muted);
}

code, pre {
    font-family: 'JetBrains Mono', 'Courier New', monospace;
    font-size: 0.9rem;
    background: var(--code-bg);
    border-radius: 6px;
    padding: 2px 6px;
    color: var(--text);
}

code {
    background: var(--code-bg);
    padding: 3px 8px;
    border-radius: 6px;
    font-size: 0.9em;
}

main, section {
    position: relative;
    z-index: 1;
}

button, input, select, textarea {
    font-family: inherit;
}

.login-body {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 40px 20px;
    position: relative;
    z-index: 1;
}

.login-container {
    background: var(--bg-card);
    border-radius: 24px;
    padding: 42px;
    width: min(420px, 100%);
    border: 1px solid var(--border-soft);
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.12);
    backdrop-filter: blur(18px);
    position: relative;
    overflow: hidden;
    animation: appear 0.8s cubic-bezier(0.23, 1, 0.32, 1);
}

.login-container::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.03), transparent 50%);
    pointer-events: none;
}

.login-header {
    text-align: center;
    margin-bottom: 32px;
}

.login-header i {
    font-size: 3rem;
    color: var(--accent-strong);
    display: block;
    margin-bottom: 12px;
    animation: floatGlow 4s ease-in-out infinite;
}

.login-header h1 {
    font-size: 2rem;
    margin-bottom: 6px;
    letter-spacing: 0.04em;
}

.login-header p {
    font-size: 0.95rem;
    color: var(--text-muted);
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.login-form label {
    font-size: 0.9rem;
    color: var(--text-muted);
    font-weight: 500;
}

.login-form input {
    width: 100%;
    padding: 14px 16px;
    background: var(--bg-input);
    border: 1.5px solid var(--border-soft);
    border-radius: 12px;
    color: var(--text);
    font-size: 1rem;
    transition: border-color 0.3s ease, transform 0.3s ease;
}

.login-form input:focus {
    border-color: var(--accent-strong);
    outline: none;
    transform: translateY(-1px);
}

.alert {
    background: rgba(239, 68, 68, 0.12);
    color: var(--danger);
    border: 1px solid rgba(239, 68, 68, 0.4);
    border-radius: 12px;
    padding: 14px 18px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.alert-success {
    background: rgba(16, 185, 129, 0.15);
    color: var(--success);
    border: 1px solid rgba(16, 185, 129, 0.35);
}

.alert-info {
    background: rgba(59, 130, 246, 0.14);
    color: #bfdbfe;
    border: 1px solid rgba(59, 130, 246, 0.35);
}

.alert-error {
    background: rgba(239, 68, 68, 0.18);
    color: var(--danger);
    border: 1px solid rgba(239, 68, 68, 0.5);
}

.login-footer {
    margin-top: 22px;
    text-align: center;
    font-size: 0.9rem;
}

.login-footer a {
    color: var(--accent);
    transition: color 0.3s ease;
}

.login-footer a:hover {
    color: var(--accent-strong);
}

.admin-body {
    display: flex;
    min-height: 100vh;
    position: relative;
    z-index: 1;
}

.sidebar {
    width: 260px;
    background: #ffffff;
    border-right: 1px solid var(--border-soft);
    min-height: 100vh;
    position: fixed;
    padding-top: 30px;
    padding-bottom: 24px;
    box-shadow: 8px 0 20px rgba(15, 23, 42, 0.1);
}

.sidebar-logo {
    padding: 0 30px 25px;
    border-bottom: 1px solid var(--border-soft);
    margin-bottom: 25px;
}

.sidebar-logo h2 {
    font-size: 1.6rem;
    letter-spacing: 0.05em;
    color: var(--accent);
}

.sidebar-logo span {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.sidebar-menu {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 0 6px;
}

.sidebar-menu li a {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 18px;
    border-radius: 12px;
    color: #0f172a;
    text-decoration: none;
    transition: background 0.3s ease, color 0.3s ease;
    font-weight: 500;
}

.sidebar-menu li a.active,
.sidebar-menu li a:hover {
    background: rgba(0, 212, 170, 0.12);
    color: var(--accent-strong);
}

.sidebar-user {
    position: absolute;
    bottom: 24px;
    left: 0;
    right: 0;
    padding: 0 30px;
    border-top: 1px solid var(--border-soft);
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.sidebar-user .nome {
    font-size: 0.95rem;
    font-weight: 600;
}

.sidebar-user .nivel {
    font-size: 0.8rem;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 0.2em;
}

.main-content {
    margin-left: 280px;
    padding: 44px;
    width: calc(100% - 280px);
}

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

.page-header h1 {
    font-size: 2rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.acoes {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.table-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
    flex-wrap: wrap;
    gap: 12px;
}

.table-search {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.table-search input {
    padding: 10px 16px;
    border-radius: 12px;
    border: 1px solid var(--border-soft);
    background: var(--bg-input);
    color: var(--text);
    min-width: 220px;
}

.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.card {
    background: linear-gradient(160deg, rgba(255, 255, 255, 0.6), rgba(255, 255, 255, 0.2));
    border: 1px solid var(--border-soft);
    border-radius: 18px;
    padding: 24px;
    min-height: 170px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    overflow: hidden;
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.12);
}

.card::after {
    content: '';
    position: absolute;
    inset: 12px;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.04);
    pointer-events: none;
}

.card-icon {
    width: 58px;
    height: 58px;
    border-radius: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 18px;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.card-icon.green { background: rgba(0, 212, 170, 0.12); color: var(--accent); }
.card-icon.purple { background: rgba(124, 58, 237, 0.12); color: #c084fc; }
.card-icon.red { background: rgba(239, 68, 68, 0.12); color: var(--danger); }
.card-icon.yellow { background: rgba(245, 158, 11, 0.15); color: var(--accent-warm); }

.card-value {
    font-size: 2.4rem;
    font-weight: 700;
}

.card-label {
    color: var(--text-muted);
    font-size: 0.95rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.table-container {
    background: var(--bg-card);
    border-radius: 18px;
    border: 1px solid var(--border-soft);
    overflow: hidden;
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.12);
}

.table-container table {
    width: 100%;
    border-collapse: collapse;
    font-family: inherit;
    font-size: 0.95rem;
}

thead {
    background: rgba(255, 255, 255, 0.02);
}

th, td {
    padding: 16px 20px;
    text-align: left;
    font-size: 0.95rem;
    color: var(--text);
    font-weight: 400;
}

th {
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    font-size: 0.8rem;
}

tbody tr {
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

tbody tr:hover {
    background: rgba(255, 255, 255, 0.03);
}

.td-numero { color: var(--texto-sec); font-weight: 500; font-size: 15px; }
.td-nome { color: var(--texto); font-weight: 600; font-size: 15px; }
.td-slug { color: var(--texto-sec); font-size: 15px; }
.td-dominio { color: var(--texto-sec); font-size: 15px; }
.td-banco { color: var(--texto-sec); font-size: 15px; }
.td-imoveis { color: var(--texto-sec); font-size: 15px; }

.tabs-wrapper {
    margin-bottom: 20px;
}

.tabs {
    display: flex;
    gap: 8px;
    background: var(--bg-card);
    padding: 6px;
    border-radius: 12px;
    border: 1px solid var(--border-soft);
    width: fit-content;
}

.tabs .tab {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: 8px;
    text-decoration: none;
    color: var(--text-muted);
    font-weight: 500;
    font-size: 0.95rem;
    transition: all 0.2s;
}

.tabs .tab:hover {
    background: rgba(255, 255, 255, 0.5);
    color: var(--text);
}

.tabs .tab.active {
    background: var(--accent);
    color: white;
}

.tabs .badge {
    background: rgba(255, 255, 255, 0.25);
    padding: 2px 8px;
    border-radius: 20px;
    font-size: 0.8rem;
}

.tabs .tab.active .badge {
    background: rgba(255, 255, 255, 0.3);
}

.status-badge {
    padding: 4px 12px;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 600;
}

.status-ativo { background: rgba(16, 185, 129, 0.18); color: var(--success); }
.status-inativo { background: rgba(239, 68, 68, 0.18); color: var(--danger); }

.acoes-btns {
    display: flex;
    gap: 10px;
}

.acoes-btns a,
.acoes-btns button {
    width: 36px;
    height: 36px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid transparent;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.btn-view {
    background: rgba(0, 212, 170, 0.12);
    color: var(--accent);
}

.btn-view:hover { background: var(--accent); color: #050912; }

.btn-edit {
    background: rgba(124, 58, 237, 0.15);
    color: #d8b4fe;
}

.btn-edit:hover { background: #9333ea; color: white; }

.btn-delete {
    background: rgba(239, 68, 68, 0.18);
    color: var(--danger);
}

.btn-delete:hover { background: var(--danger); color: white; }

.form-container {
    background: var(--surface);
    border: 1px solid var(--border-soft);
    border-radius: 22px;
    padding: 34px;
    max-width: 640px;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.12);
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-group label {
    color: var(--text-muted);
    font-weight: 600;
}

.form-group input,
.form-group select,
.form-group textarea {
    padding: 12px 16px;
    background: var(--bg-input);
    border: 1px solid var(--border-soft);
    border-radius: 12px;
    color: var(--text);
    font-size: 1rem;
    font-family: inherit;
}

.form-group textarea {
    min-height: 120px;
}

.config-container {
    background: var(--surface);
    border-radius: 20px;
    padding: 32px;
    border: 1px solid var(--border-soft);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.5);
    margin-bottom: 30px;
}

.config-container h2,
.config-container h3,
.config-container h4 {
    color: var(--text);
    margin-bottom: 12px;
}

.config-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 25px;
    flex-wrap: wrap;
}

.config-tab {
    padding: 10px 18px;
    border-radius: 12px;
    border: 1px solid transparent;
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
}

.config-tab.active {
    border-color: rgba(255, 255, 255, 0.2);
    background: rgba(0, 212, 170, 0.1);
    color: var(--cor-primaria);
}

.config-content {
    display: none;
}

.config-content.active {
    display: block;
}

.code-block {
    background: var(--code-bg);
    border-radius: 16px;
    padding: 18px;
    border: 1px solid var(--border-soft);
    font-size: 0.85rem;
    line-height: 1.4;
    max-width: 100%;
    overflow-x: auto;
}

.btn-copy {
    background: var(--accent);
    color: var(--bg-base);
    border-radius: 12px;
    padding: 10px 20px;
    font-weight: 600;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
    transition: transform 0.3s ease;
}

.btn-copy:hover {
    transform: translateY(-2px);
}

.info-box,
.warning-box,
.success-box,
.dominio-info {
    border-radius: 14px;
    padding: 16px;
    margin: 20px 0;
}

.info-box {
    background: rgba(59, 130, 246, 0.18);
    border-left: 4px solid rgba(59, 130, 246, 0.6);
    color: #bfdbfe;
}

.warning-box {
    background: rgba(249, 115, 22, 0.18);
    border-left: 4px solid rgba(249, 115, 22, 0.7);
    color: #fcd34d;
}

.success-box {
    background: rgba(16, 185, 129, 0.18);
    border-left: 4px solid rgba(16, 185, 129, 0.7);
    color: #bbf7d0;
}

.dominio-info {
    background: rgba(248, 250, 252, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.dominio-info p {
    margin: 6px 0;
}

.instrucoes {
    list-style: none;
    padding: 0;
}

.instrucoes li {
    padding: 10px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    color: var(--text-secondary);
}

.instrucoes li:last-child {
    border-bottom: none;
}

.instrucoes li:before {
    content: '→ ';
    color: var(--cor-primaria);
    font-weight: 700;
    margin-right: 8px;
}

.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.modal-overlay.show {
    opacity: 1;
    pointer-events: auto;
}

.modal {
    background: #ffffff;
    border-radius: 20px;
    padding: 28px;
    width: min(520px, 90%);
    border: 1px solid var(--border-soft);
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.2);
    position: relative;
    animation: appear 0.4s ease;
}

.modal h3 {
    margin-bottom: 18px;
    letter-spacing: 0.04em;
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 22px;
}

@media (max-width: 1024px) {
    .main-content {
        margin-left: 0;
        width: 100%;
        padding: 26px;
    }

    .sidebar {
        position: relative;
        width: 100%;
        border-right: none;
        border-bottom: 1px solid var(--border-soft);
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
    }
}

@media (max-width: 768px) {
    .admin-body {
        flex-direction: column;
    }

    .sidebar {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        padding: 18px;
    }

    .sidebar-logo,
    .sidebar-menu,
    .sidebar-user {
        display: none;
    }

    .main-content {
        padding: 20px;
    }
}

@keyframes floatGlow {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-6px); }
}

@keyframes appear {
    from { opacity: 0; transform: translateY(10px) scale(0.97); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}
