/* ============================================================
   DARK MODE — Tech All
   Ativado por <body class="dark-mode"> via js/dark-mode.js
   ============================================================ */

body.dark-mode {
    background-color: #12161c !important;
    color: #d7dde5 !important;
}

/* Fundos e superfícies */
body.dark-mode .bg-light,
body.dark-mode .section,
body.dark-mode .main,
body.dark-mode .body,
body.dark-mode .card,
body.dark-mode .list-group-item,
body.dark-mode .modal-content,
body.dark-mode .dropdown-menu,
body.dark-mode .thumb-info,
body.dark-mode .pc-container,
body.dark-mode .pc-content {
    background-color: #1a2029 !important;
    color: #d7dde5 !important;
}

body.dark-mode .card,
body.dark-mode .list-group-item,
body.dark-mode .modal-content {
    border-color: #2c3644 !important;
}

/* Textos */
body.dark-mode h1, body.dark-mode h2, body.dark-mode h3,
body.dark-mode h4, body.dark-mode h5, body.dark-mode h6,
body.dark-mode p, body.dark-mode span, body.dark-mode td,
body.dark-mode th, body.dark-mode label, body.dark-mode li,
body.dark-mode .post-info, body.dark-mode .post-meta,
body.dark-mode .text-dark, body.dark-mode .card-title {
    color: #d7dde5 !important;
}

body.dark-mode .text-muted,
body.dark-mode small {
    color: #8b95a3 !important;
}

/* Links */
body.dark-mode a:not(.btn):not(.pc-link) { color: #6db3f2; }
body.dark-mode a:not(.btn):not(.pc-link):hover { color: #9cc7f7; }

/* Tabelas */
body.dark-mode .table,
body.dark-mode .table td,
body.dark-mode .table th {
    background-color: #1a2029 !important;
    color: #d7dde5 !important;
    border-color: #2c3644 !important;
}
body.dark-mode .table-striped tbody tr:nth-of-type(odd) {
    background-color: #212a36 !important;
}
body.dark-mode .table-hover tbody tr:hover {
    background-color: #28323f !important;
}

/* Formulários */
body.dark-mode .form-control,
body.dark-mode input:not([type=submit]):not([type=button]):not([type=checkbox]):not([type=radio]),
body.dark-mode select,
body.dark-mode textarea {
    background-color: #232c39 !important;
    color: #e4e9f0 !important;
    border-color: #3a4656 !important;
}
body.dark-mode .form-control::placeholder,
body.dark-mode input::placeholder,
body.dark-mode textarea::placeholder {
    color: #6b7684 !important;
}
body.dark-mode .form-control:focus,
body.dark-mode input:focus,
body.dark-mode textarea:focus {
    background-color: #28323f !important;
    color: #fff !important;
    border-color: #157dad !important;
}

/* Blocos de código */
body.dark-mode pre.code-block,
body.dark-mode pre,
body.dark-mode code {
    background-color: #0d1117 !important;
    color: #7ee787 !important;
    border-color: #30363d !important;
}

/* Badges/alerts mantêm cor própria */
body.dark-mode .badge, body.dark-mode .alert { color: inherit; }
body.dark-mode .alert-info    { background-color: #1c3a4d !important; color: #9cc7f7 !important; border-color: #2a4f66 !important; }
body.dark-mode .alert-success { background-color: #1d4028 !important; color: #7ee787 !important; border-color: #2a5a38 !important; }
body.dark-mode .alert-danger  { background-color: #4d2020 !important; color: #f29898 !important; border-color: #663030 !important; }
body.dark-mode .alert-warning { background-color: #4d3a1a !important; color: #f2d398 !important; border-color: #66512a !important; }

/* Bordas genéricas */
body.dark-mode .border,
body.dark-mode .border-top,
body.dark-mode .border-bottom,
body.dark-mode hr,
body.dark-mode .page-header,
body.dark-mode .breadcrumb {
    border-color: #2c3644 !important;
}
body.dark-mode .breadcrumb { background-color: transparent !important; }
body.dark-mode .breadcrumb-item.active { color: #8b95a3 !important; }

/* Simple post list / meta */
body.dark-mode .simple-post-list li { border-color: #2c3644 !important; }

/* Rodapé escuro já é escuro — suaviza */
body.dark-mode footer,
body.dark-mode #footer { background-color: #0d1117 !important; }

/* Paginação */
body.dark-mode .page-link {
    background-color: #232c39 !important;
    color: #6db3f2 !important;
    border-color: #3a4656 !important;
}
body.dark-mode .page-item.active .page-link {
    background-color: #157dad !important;
    color: #fff !important;
}

/* Botão flutuante do tema */
#darkToggle {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: none;
    background: #157dad;
    color: #fff;
    font-size: 20px;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0,0,0,.4);
    transition: transform .2s, background .3s;
}
#darkToggle:hover { transform: scale(1.1); }
body.dark-mode #darkToggle { background: #f2c94c; color: #1a2029; }

/* Transição suave */
body, .card, .section, .form-control, .list-group-item {
    transition: background-color .3s ease, color .3s ease, border-color .3s ease;
}
