:root {
    --repinho-primary: var(--wl-primary, #385a3c);
    --repinho-primary-dark: var(--wl-primary-dark, #27422b);
    --repinho-accent: var(--wl-accent, #d7a43b);
    --repinho-bg: var(--wl-bg, #f4f7f1);
    --repinho-card: var(--wl-card, #ffffff);
    --repinho-text: var(--wl-text, #17231d);
    --repinho-muted: var(--wl-muted, #66756a);
    --repinho-border: var(--wl-border, #dfe8dc);
}

html[data-theme="dark"] {
    --repinho-bg: #101811;
    --repinho-card: #17231d;
    --repinho-text: #eef6ef;
    --repinho-muted: #b7c7ba;
    --repinho-border: #2b3a30;
}

body {
    background: var(--repinho-bg) !important;
    color: var(--repinho-text) !important;
}

.page-wrapper,
.page-content,
.content,
.container-fluid {
    color: var(--repinho-text);
}

.sidebar-wrapper,
.sidebar-content,
.sidebar-menu,
.page-wrapper .sidebar-wrapper {
    background: linear-gradient(180deg, var(--repinho-primary-dark), var(--repinho-primary)) !important;
}

.sidebar-menu a,
.sidebar-menu span,
.sidebar-brand,
.sidebar-header,
.sidebar-wrapper .sidebar-menu ul li a {
    color: #f6fff7 !important;
}

.sidebar-menu .header-menu span {
    color: rgba(255,255,255,.72) !important;
}

.sidebar-menu ul li a:hover,
.sidebar-dropdown.active > a,
.sidebar-menu .sidebar-loaded a {
    background: rgba(255,255,255,.12) !important;
    color: #ffffff !important;
}

.navbar,
.topbar,
.card,
.modal-content,
.dropdown-menu,
.table,
.dataTables_wrapper,
.admin-card,
.repinho-panel {
    background: var(--repinho-card) !important;
    color: var(--repinho-text) !important;
    border-color: var(--repinho-border) !important;
}

.table,
table,
td,
th {
    color: var(--repinho-text) !important;
}

input,
select,
textarea,
.form-control,
.custom-select,
.bootstrap-select .dropdown-toggle {
    background: var(--repinho-card) !important;
    border-color: var(--repinho-border) !important;
    color: var(--repinho-text) !important;
}

.btn-primary,
.button,
button[type="submit"] {
    background: var(--repinho-primary) !important;
    border-color: var(--repinho-primary) !important;
    color: #ffffff !important;
}

.btn-primary:hover,
.button:hover,
button[type="submit"]:hover {
    background: var(--repinho-primary-dark) !important;
    border-color: var(--repinho-primary-dark) !important;
}

.badge-primary,
.bg-primary {
    background-color: var(--repinho-primary) !important;
}

.text-primary,
a {
    color: var(--repinho-primary) !important;
}

.repinho-login-page {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 24px;
}

.repinho-login-card {
    width: min(100%, 560px);
    background: var(--repinho-card);
    border: 1px solid var(--repinho-border);
    border-radius: 28px;
    box-shadow: 0 24px 80px rgba(23,35,29,.14);
    padding: clamp(24px, 5vw, 44px);
    text-align: center;
}

.repinho-login-logo {
    max-height: 76px;
    max-width: 240px;
    object-fit: contain;
    margin-bottom: 18px;
}

.repinho-eyebrow {
    color: var(--repinho-primary);
    display: block;
    font-size: .78rem;
    font-weight: 900;
    letter-spacing: .12em;
    text-transform: uppercase;
}

.repinho-login-card h1 {
    color: var(--repinho-text);
    font-size: clamp(2rem, 5vw, 3rem);
    margin: 8px 0 12px;
}

.repinho-login-card p,
.repinho-login-card small {
    color: var(--repinho-muted);
    line-height: 1.6;
}

.repinho-login-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    margin: 24px 0 14px;
}

.repinho-button,
.repinho-ghost {
    border-radius: 16px;
    font-weight: 900;
    padding: 12px 18px;
    text-decoration: none !important;
}

.repinho-button {
    background: var(--repinho-primary);
    color: #ffffff !important;
}

.repinho-ghost {
    border: 1px solid var(--repinho-border);
    color: var(--repinho-primary) !important;
}

.repinho-theme-toggle {
    align-items: center;
    background: var(--repinho-card);
    border: 1px solid var(--repinho-border);
    border-radius: 999px;
    box-shadow: 0 12px 32px rgba(0,0,0,.16);
    color: var(--repinho-text);
    cursor: pointer;
    display: inline-flex;
    font-size: 1.15rem;
    height: 42px;
    justify-content: center;
    bottom: 18px;
    position: fixed;
    right: 18px;
    width: 42px;
    z-index: 99999;
}

@media (max-width: 720px) {
    .repinho-theme-toggle {
        bottom: 12px;
        right: 12px;
    }
}

html[data-theme="dark"] .table-striped tbody tr:nth-of-type(odd),
html[data-theme="dark"] .table-hover tbody tr:hover {
    background-color: rgba(255,255,255,.05) !important;
}
