/* =========================================
   TRONO - CSS MAIN (GLOBAL)
   filex/css/style.css
   Este ficheiro é a ÚNICA fonte de verdade para estilos
   partilhados por 2+ páginas. Estilos específicos de uma
   única página NÃO devem estar aqui.
   ========================================= */

/* =========================================
   1. VARIÁVEIS GLOBAIS
   ========================================= */
:root {
    --bg-body: #05080f;
    --bg-sidebar: #0a0f1a;
    --bg-topbar: #0a0f1a;
    --bg-card: #0d1425;
    --text-main: #ffffff;
    --text-muted: #8b9bb4;
    --accent-red: #e60000;
    --success: #00c853;
    --warning: #ffab00;
    --info: #00b0ff;
    --cyan: #00b0ff;
    --border-color: #1a233a;
    --transition-speed: 0.3s;
    --sidebar-width: 270px;
}

body.light-mode {
    --bg-body: #f4f7f6;
    --bg-sidebar: #ffffff;
    --bg-topbar: #ffffff;
    --bg-card: #ffffff;
    --text-main: #1e293b;
    --text-muted: #64748b;
    --border-color: #e2e8f0;
}

/* =========================================
   2. RESET / BODY
   ========================================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg-body);
    color: var(--text-main);
    font-family: 'Inter', sans-serif;
    font-size: 15px;
    overflow-x: hidden;
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* =========================================
   3. UTILITÁRIOS DE TEXTO
   ========================================= */
.text-cyan {
    color: var(--cyan) !important;
}

.text-main {
    color: var(--text-main);
}

.text-muted {
    color: var(--text-muted) !important;
}

/* =========================================
   4. SIDEBAR
   ========================================= */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: var(--sidebar-width);
    height: 100vh;
    background-color: var(--bg-sidebar);
    z-index: 1040;
    transition: transform var(--transition-speed) ease, background-color 0.3s ease;
    display: flex;
    flex-direction: column;
}

.sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 24px;
    font-weight: 700;
    letter-spacing: 1px;
    color: var(--text-main);
}

.brand-icon {
    color: var(--info);
}

.btn-close-sidebar {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 20px;
    cursor: pointer;
}

.sidebar-menu {
    flex: 1;
    overflow-y: auto;
    padding: 10px 0;
}

.sidebar-menu::-webkit-scrollbar { width: 5px; }
.sidebar-menu::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 5px;
}

.menu-category {
    font-size: 12px;
    text-transform: uppercase;
    color: var(--text-muted);
    font-weight: 600;
    padding: 18px 20px 8px;
    letter-spacing: 1px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 20px;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 15px;
    font-weight: 500;
    transition: all 0.2s ease;
    border-left: 3px solid transparent;
}

.nav-item i {
    width: 22px;
    text-align: center;
    font-size: 18px;
}

.nav-item:hover,
.nav-item.active {
    color: var(--text-main);
    background-color: rgba(0, 176, 255, 0.05);
    border-left-color: var(--info);
}

.nav-item.active {
    background-color: rgba(0, 176, 255, 0.1);
}

.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.6);
    z-index: 1030;
    display: none;
    opacity: 0;
    transition: opacity var(--transition-speed);
}

.sidebar-overlay.active {
    display: block;
    opacity: 1;
}

/* =========================================
   5. MAIN CONTENT & TOPBAR
   ========================================= */
.main-content {
    margin-left: var(--sidebar-width);
    min-height: 100vh;
    transition: margin-left var(--transition-speed) ease;
    display: flex;
    flex-direction: column;
}

.topbar {
    height: 80px;
    background-color: var(--bg-topbar);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 30px 0 25px;
    position: sticky;
    top: 0;
    z-index: 1020;
    transition: background-color 0.3s ease;
}

.topbar-left,
.topbar-right {
    display: flex;
    align-items: center;
    gap: 15px;
}

.btn-icon {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 22px;
    cursor: pointer;
    transition: color 0.2s;
    padding: 5px;
}

.btn-icon:hover {
    color: var(--text-main);
}

.btn-theme-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    background-color: var(--bg-body);
    border: 1px solid var(--border-color);
    color: var(--text-main);
    padding: 10px 18px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-theme-toggle:hover {
    border-color: var(--info);
}

.btn-theme-toggle i {
    font-size: 16px;
}

/* =========================================
   6. DASHBOARD CONTENT BASE
   ========================================= */
.dashboard-content {
    padding: 10px 30px 35px 30px;
    flex: 1;
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 35px;
    margin-top: 20px;
}

.page-title {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--text-main);
}

.breadcrumb {
    background: transparent;
    padding: 0;
    font-size: 14px;
}

.breadcrumb-item.active {
    color: var(--info);
}

.breadcrumb-item + .breadcrumb-item::before {
    color: var(--text-muted);
}

.btn-date {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-main);
    font-size: 14px;
    font-weight: 500;
    padding: 10px 18px;
    border-radius: 8px;
    transition: all 0.2s;
}

.btn-date:hover {
    background-color: var(--border-color);
    color: var(--text-main);
}

/* =========================================
   7. HEADER ICON BOX (usado em várias páginas)
   ========================================= */
.header-icon-box {
    width: 60px;
    height: 60px;
    background: rgba(0, 176, 255, 0.1);
    border: 1px solid rgba(0, 176, 255, 0.3);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    color: #00b0ff;
    flex-shrink: 0;
}

/* =========================================
   8. 6 CARDS FINTECH (INDEX)
   ========================================= */
.card-fintech {
    position: relative;
    background: #09101a;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    height: 100%;
    min-height: 190px;
    overflow: hidden;
    transition: all 0.25s ease;
    display: flex;
    flex-direction: column;
}

body.light-mode .card-fintech {
    background: #ffffff;
    border-color: #e2e8f0;
}

.card-fintech:hover {
    transform: translateY(-3px);
}

.card-fintech:hover .card-glow {
    opacity: 1;
}

.card-content {
    padding: 20px;
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.card-glow {
    position: absolute;
    inset: 0;
    border-radius: 16px;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    box-shadow: inset 0 0 20px rgba(255, 255, 255, 0.03);
}

.card-top {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
}

.icon-box {
    width: 50px;
    height: 50px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: 700;
    color: #fff;
    flex-shrink: 0;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.card-title-area {
    flex: 1;
}

.card-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-muted);
    letter-spacing: 0.5px;
    text-transform: uppercase;
    line-height: 1.3;
    display: block;
}

.card-value-area {
    margin-bottom: 20px;
}

.card-amount {
    font-size: 32px;
    font-weight: 700;
    color: var(--text-main);
    margin: 0;
    line-height: 1;
    letter-spacing: -0.5px;
}

.card-amount small {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-muted);
    margin-left: 4px;
}

.card-bottom-info {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    margin-top: auto;
    position: relative;
    z-index: 3;
}

.info-text {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 6px;
}

.info-text i {
    color: var(--text-main);
    opacity: 0.7;
}

/* Cores dos 6 cards */
.card-kwanza { border-color: rgba(230, 0, 0, 0.2); }
.card-kwanza:hover { border-color: rgba(230, 0, 0, 0.5); box-shadow: 0 0 25px rgba(230, 0, 0, 0.15); }
.card-kwanza .icon-box { background: linear-gradient(135deg, #e60000, #990000); }
.card-kwanza .card-glow { box-shadow: inset 0 0 30px rgba(230, 0, 0, 0.05); }
.card-kwanza .progress-fill { background: #e60000; box-shadow: 0 0 10px rgba(230, 0, 0, 0.5); }
.card-bg-kwanza span { background: #e60000; opacity: 0.2; }

.card-dolar { border-color: rgba(0, 176, 255, 0.2); }
.card-dolar:hover { border-color: rgba(0, 176, 255, 0.5); box-shadow: 0 0 25px rgba(0, 176, 255, 0.15); }
.card-dolar .icon-box { background: linear-gradient(135deg, #00b0ff, #0055ff); }
.card-dolar .card-glow { box-shadow: inset 0 0 30px rgba(0, 176, 255, 0.05); }
.card-dolar .progress-fill { background: #00b0ff; box-shadow: 0 0 10px rgba(0, 176, 255, 0.5); }
.card-bg-dolar { color: #00b0ff; opacity: 0.15; }

.card-euro { border-color: rgba(138, 43, 226, 0.2); }
.card-euro:hover { border-color: rgba(138, 43, 226, 0.5); box-shadow: 0 0 25px rgba(138, 43, 226, 0.15); }
.card-euro .icon-box { background: linear-gradient(135deg, #8a2be2, #4b0082); }
.card-euro .card-glow { box-shadow: inset 0 0 30px rgba(138, 43, 226, 0.05); }
.card-euro .progress-fill { background: #8a2be2; box-shadow: 0 0 10px rgba(138, 43, 226, 0.5); }
.card-bg-euro { color: #8a2be2; opacity: 0.15; }

.card-auth { border-color: rgba(255, 140, 0, 0.2); }
.card-auth:hover { border-color: rgba(255, 140, 0, 0.5); box-shadow: 0 0 25px rgba(255, 140, 0, 0.15); }
.card-auth .icon-box { background: linear-gradient(135deg, #ff8c00, #cc5500); }
.card-auth .card-glow { box-shadow: inset 0 0 30px rgba(255, 140, 0, 0.05); }
.card-auth .progress-fill { background: #ff8c00; box-shadow: 0 0 10px rgba(255, 140, 0, 0.5); }
.card-bg-auth span { background: #ff8c00; opacity: 0.2; }

.card-cards-balance { border-color: rgba(0, 200, 83, 0.2); }
.card-cards-balance:hover { border-color: rgba(0, 200, 83, 0.5); box-shadow: 0 0 25px rgba(0, 200, 83, 0.15); }
.card-cards-balance .icon-box { background: linear-gradient(135deg, #00c853, #009624); }
.card-cards-balance .card-glow { box-shadow: inset 0 0 30px rgba(0, 200, 83, 0.05); }
.card-cards-balance .progress-fill { background: #00c853; box-shadow: 0 0 10px rgba(0, 200, 83, 0.5); }
.card-bg-cards-balance { color: #00c853; opacity: 0.15; }

.card-total-cards { border-color: rgba(155, 89, 182, 0.2); }
.card-total-cards:hover { border-color: rgba(155, 89, 182, 0.5); box-shadow: 0 0 25px rgba(155, 89, 182, 0.15); }
.card-total-cards .icon-box { background: linear-gradient(135deg, #9b59b6, #6c3483); }
.card-total-cards .card-glow { box-shadow: inset 0 0 30px rgba(155, 89, 182, 0.05); }
.card-total-cards .progress-fill { background: #9b59b6; box-shadow: 0 0 10px rgba(155, 89, 182, 0.5); }
.card-bg-total-cards span { background: #9b59b6; opacity: 0.2; }

/* Elementos gráficos de fundo */
.bg-bars {
    position: absolute;
    right: 0;
    bottom: 30px;
    height: 50px;
    display: flex;
    align-items: flex-end;
    gap: 4px;
    z-index: 1;
    pointer-events: none;
    padding-right: 20px;
}

.bg-bars span {
    width: 6px;
    border-radius: 3px 3px 0 0;
}

.bg-bars span:nth-child(1) { height: 20%; }
.bg-bars span:nth-child(2) { height: 40%; }
.bg-bars span:nth-child(3) { height: 30%; }
.bg-bars span:nth-child(4) { height: 70%; }
.bg-bars span:nth-child(5) { height: 100%; }

.bg-line {
    position: absolute;
    right: 0;
    bottom: 40px;
    width: 50%;
    height: 40px;
    z-index: 1;
    pointer-events: none;
    opacity: 0.2;
}

.bg-line svg {
    width: 100%;
    height: 100%;
}

.card-progress-bar {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.05);
    z-index: 3;
}

body.light-mode .card-progress-bar {
    background: rgba(0, 0, 0, 0.05);
}

.card-progress-bar .progress-fill {
    height: 100%;
    width: 40%;
    border-radius: 0 2px 2px 0;
}

/* =========================================
   9. SEPARADOR BALANÇO
   ========================================= */
.balance-separator {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 45px 0 30px;
    width: 100%;
}

.balance-line {
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(230, 0, 0, 0.3), rgba(0, 176, 255, 0.3), transparent);
    position: relative;
}

.balance-line::after {
    content: '';
    position: absolute;
    width: 6px;
    height: 6px;
    background: #fff;
    border-radius: 50%;
    top: 50%;
    transform: translateY(-50%);
    box-shadow: 0 0 10px #fff;
}

.balance-line:first-child::after { right: 15px; }
.balance-line:last-child::after  { left: 15px; }

.balance-title {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-main);
    font-size: 20px;
    font-weight: 700;
    padding: 0 20px;
    white-space: nowrap;
}

.crown-icon {
    color: var(--accent-red);
    font-size: 22px;
    filter: drop-shadow(0 0 5px rgba(230, 0, 0, 0.5));
}

/* =========================================
   10. 5 CARDS PEQUENOS (INDEX)
   ========================================= */
.card-balance {
    position: relative;
    background: #07111f;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    height: 100%;
    min-height: 170px;
    overflow: hidden;
    transition: all 0.25s ease;
    display: flex;
    flex-direction: column;
}

body.light-mode .card-balance {
    background: #ffffff;
    border-color: #e2e8f0;
}

.card-balance:hover {
    transform: translateY(-3px);
}

.card-balance-content {
    padding: 16px;
    display: flex;
    flex-direction: column;
    height: 100%;
    position: relative;
    z-index: 2;
}

.card-balance-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 15px;
}

.icon-circle {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: #fff;
    flex-shrink: 0;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.card-balance-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-main);
    margin-bottom: 10px;
    line-height: 1.3;
    min-height: 36px;
}

.card-balance-bottom {
    display: flex;
    justify-content: flex-start;
    align-items: flex-end;
    margin-top: auto;
    margin-bottom: 15px;
    position: relative;
    z-index: 3;
}

.card-balance-value {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-main);
    margin: 0;
    line-height: 1;
}

.text-blue {
    color: #00b0ff;
}

.mini-chart {
    display: flex;
    align-items: flex-end;
    gap: 3px;
    height: 30px;
    margin-top: 5px;
    opacity: 0.8;
}

.mini-chart span {
    width: 4px;
    border-radius: 2px 2px 0 0;
    background: currentColor;
}

.mini-chart span:nth-child(1) { height: 20%; }
.mini-chart span:nth-child(2) { height: 40%; }
.mini-chart span:nth-child(3) { height: 30%; }
.mini-chart span:nth-child(4) { height: 70%; }
.mini-chart span:nth-child(5) { height: 100%; }

.balance-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.05);
    z-index: 3;
}

body.light-mode .balance-progress {
    background: rgba(0, 0, 0, 0.05);
}

.progress-fill {
    height: 100%;
    width: 40%;
    border-radius: 0 2px 2px 0;
}

/* Cores dos 5 cards */
.card-green:hover { border-color: rgba(0, 200, 83, 0.4); box-shadow: 0 0 20px rgba(0, 200, 83, 0.1); }
.card-green .icon-circle { background: linear-gradient(135deg, #00c853, #009624); }
.card-green .mini-chart { color: #00c853; }
.card-green .green-fill { background: #00c853; box-shadow: 0 0 8px rgba(0, 200, 83, 0.5); }

.card-orange:hover { border-color: rgba(255, 140, 0, 0.4); box-shadow: 0 0 20px rgba(255, 140, 0, 0.1); }
.card-orange .icon-circle { background: linear-gradient(135deg, #ff8c00, #cc5500); }
.card-orange .mini-chart { color: #ff8c00; }
.card-orange .orange-fill { background: #ff8c00; box-shadow: 0 0 8px rgba(255, 140, 0, 0.5); }

.card-purple:hover { border-color: rgba(138, 43, 226, 0.4); box-shadow: 0 0 20px rgba(138, 43, 226, 0.1); }
.card-purple .icon-circle { background: linear-gradient(135deg, #8a2be2, #4b0082); }
.card-purple .mini-chart { color: #8a2be2; }
.card-purple .purple-fill { background: #8a2be2; box-shadow: 0 0 8px rgba(138, 43, 226, 0.5); }

.card-blue:hover { border-color: rgba(0, 176, 255, 0.4); box-shadow: 0 0 20px rgba(0, 176, 255, 0.1); }
.card-blue .icon-circle { background: linear-gradient(135deg, #00b0ff, #0055ff); }
.card-blue .mini-chart { color: #00b0ff; }
.card-blue .blue-fill { background: #00b0ff; box-shadow: 0 0 8px rgba(0, 176, 255, 0.5); }

.card-red:hover { border-color: rgba(230, 0, 0, 0.4); box-shadow: 0 0 20px rgba(230, 0, 0, 0.1); }
.card-red .icon-circle { background: linear-gradient(135deg, #e60000, #990000); }
.card-red .mini-chart { color: #e60000; }
.card-red .red-fill { background: #e60000; box-shadow: 0 0 8px rgba(230, 0, 0, 0.5); }

/* =========================================
   11. FORMULÁRIOS (PARTILHADOS)
   ========================================= */
.form-label-custom {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-main);
    margin-bottom: 8px;
}

.input-icon-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon {
    position: absolute;
    left: 15px;
    color: #00b0ff;
    font-size: 16px;
    pointer-events: none;
    z-index: 2;
}

.form-input-dark,
.form-select-dark {
    width: 100%;
    background: #050b14;
    border: 1px solid rgba(0, 176, 255, 0.3);
    color: var(--text-main);
    border-radius: 8px;
    padding: 12px 15px 12px 45px;
    font-size: 14px;
    font-weight: 500;
    height: 48px;
    transition: all 0.3s ease;
}

body.light-mode .form-input-dark,
body.light-mode .form-select-dark {
    background: #f8fafc;
    border-color: #cbd5e1;
    color: #17324d;
}

.form-input-dark:focus,
.form-select-dark:focus {
    outline: none;
    border-color: #00b0ff;
    box-shadow: 0 0 10px rgba(0, 176, 255, 0.2);
}

.form-select-dark {
    cursor: pointer;
}

/* =========================================
   12. BOTÕES DE FILTRAR (UNIFICADO)
   ========================================= */
.btn-filter,
.btn-filter-main {
    height: 52px;
    padding: 0 30px;
    background: linear-gradient(135deg, #00b0ff, #0077ff);
    color: #ffffff;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 176, 255, 0.3);
    white-space: nowrap;
}

.btn-filter:hover,
.btn-filter-main:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 176, 255, 0.5);
    background: linear-gradient(135deg, #00c3ff, #0088ff);
}

.btn-filter-main {
    height: 48px;
    padding: 0 30px;
    font-size: 14px;
    border-radius: 8px;
}

/* =========================================
   13. DATEPICKER (PARTILHADO)
   ========================================= */
.custom-datepicker {
    position: relative;
    width: 100%;
}

.datepicker-trigger {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background-color: #050b14;
    border: 1px solid rgba(0, 176, 255, 0.3);
    border-radius: 8px;
    padding: 14px 15px;
    color: var(--text-main);
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    height: 52px;
}

body.light-mode .datepicker-trigger {
    background-color: #f8fafc;
    border-color: #cbd5e1;
}

.custom-datepicker.active .datepicker-trigger {
    border-color: #00b0ff;
    box-shadow: 0 0 10px rgba(0, 176, 255, 0.2);
    background-color: #071426;
}

.datepicker-dropdown {
    position: absolute;
    top: calc(100% + 5px);
    left: 0;
    width: 320px;
    background: #071426;
    border: 1px solid rgba(0, 176, 255, 0.3);
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s ease;
    padding: 15px;
}

body.light-mode .datepicker-dropdown {
    background: #ffffff;
    border-color: #d9e5f2;
    box-shadow: 0 10px 30px rgba(20, 80, 130, 0.15);
}

.custom-datepicker.active .datepicker-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dp-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 15px;
}

.dp-month-year {
    font-weight: 600;
    color: var(--text-main);
    text-transform: capitalize;
}

.dp-btn-nav {
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 5px 10px;
    font-size: 14px;
    transition: color 0.2s;
}

.dp-btn-nav:hover { color: #00b0ff; }

.dp-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    text-align: center;
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 600;
    margin-bottom: 10px;
}

.dp-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
}

.dp-day {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 36px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-main);
    cursor: pointer;
    transition: all 0.2s;
}

.dp-day:hover { background: rgba(0, 176, 255, 0.1); color: #00b0ff; }
.dp-day.empty { cursor: default; }
.dp-day.selected { background: #00b0ff; color: #ffffff; box-shadow: 0 0 10px rgba(0, 176, 255, 0.4); }

.dp-footer {
    display: flex;
    justify-content: space-between;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid rgba(0, 176, 255, 0.1);
}

.dp-btn-text {
    background: transparent;
    border: none;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    padding: 0;
}

.dp-btn-text:hover { text-decoration: underline; }

/* =========================================
   14. TABELA BASE (custom-table)
   ========================================= */
.custom-table {
    --bs-table-bg: transparent;
    --bs-table-color: var(--text-main);
    border-collapse: separate;
    width: 100%;
}

/* Variante "spaced" (autorizar) */
.custom-table--spaced {
    border-spacing: 0 8px;
}

.custom-table--spaced thead th {
    background: transparent;
    border-bottom: 1px solid rgba(0, 176, 255, 0.15);
    color: #00b0ff;
    font-size: 12px;
    text-transform: uppercase;
    font-weight: 600;
    padding: 15px;
    white-space: nowrap;
}

.custom-table--spaced tbody tr {
    background-color: rgba(2, 9, 20, 0.4);
    transition: background-color 0.2s ease;
}

body.light-mode .custom-table--spaced tbody tr {
    background-color: #ffffff;
}

.custom-table--spaced tbody tr:hover {
    background-color: rgba(0, 176, 255, 0.05) !important;
}

.custom-table--spaced tbody td {
    padding: 12px 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.03);
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
    vertical-align: middle;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-main);
}

body.light-mode .custom-table--spaced tbody td {
    border-color: #e5edf5;
    color: #17324d;
}

.custom-table--spaced tbody tr td:first-child {
    border-left: 1px solid rgba(255, 255, 255, 0.03);
    border-top-left-radius: 8px;
    border-bottom-left-radius: 8px;
}

.custom-table--spaced tbody tr td:last-child {
    border-right: 1px solid rgba(255, 255, 255, 0.03);
    border-top-right-radius: 8px;
    border-bottom-right-radius: 8px;
}

body.light-mode .custom-table--spaced tbody tr td:first-child,
body.light-mode .custom-table--spaced tbody tr td:last-child {
    border-color: #e5edf5;
}

/* Variante "flat" (depósitos/clientes) */
.custom-table--flat {
    border-spacing: 0;
}

.custom-table--flat thead th {
    background: rgba(0, 176, 255, 0.05);
    border-bottom: 1px solid rgba(0, 176, 255, 0.2);
    border-top: 1px solid rgba(0, 176, 255, 0.2);
    color: #00b0ff;
    font-size: 12px;
    text-transform: uppercase;
    font-weight: 600;
    padding: 15px;
    white-space: nowrap;
}

body.light-mode .custom-table--flat thead th {
    background: #eef6fc;
    border-color: #e2e8f0;
    color: #087fc4;
}

.custom-table--flat tbody td {
    padding: 16px 15px;
    border-bottom: 1px solid var(--border-color);
    vertical-align: middle;
    font-size: 14px;
    font-weight: 500;
}

.custom-table--flat tbody tr {
    transition: background-color 0.2s ease;
}

.custom-table--flat tbody tr:hover {
    background-color: rgba(0, 176, 255, 0.03) !important;
}

.custom-table .sort-icon,
.custom-table thead th i {
    margin-left: 5px;
    opacity: 0.5;
    font-size: 10px;
}

/* =========================================
   15. BADGES DE STATUS
   ========================================= */
.badge-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.badge-success {
    background-color: rgba(0, 200, 83, 0.15);
    color: #00c853;
    border: 1px solid rgba(0, 200, 83, 0.3);
}

.badge-warning {
    background-color: rgba(255, 171, 0, 0.15);
    color: #ffab00;
    border: 1px solid rgba(255, 171, 0, 0.3);
}

.badge-active {
    background-color: rgba(0, 200, 83, 0.15);
    color: #00c853;
    border: 1px solid rgba(0, 200, 83, 0.3);
}

.badge-inactive {
    background-color: rgba(0, 176, 255, 0.15);
    color: #00b0ff;
    border: 1px solid rgba(0, 176, 255, 0.3);
}

.badge-danger {
    background-color: rgba(230, 0, 0, 0.15);
    color: #e60000;
    border: 1px solid rgba(230, 0, 0, 0.3);
}

/* =========================================
   16. PAGINAÇÃO / TABLE FOOTER
   ========================================= */
.table-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 15px;
}

.pagination-buttons {
    display: flex;
    gap: 5px;
}

.btn-pagination {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-main);
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.2s;
}

.btn-pagination:not(:disabled):hover,
.btn-pagination.active {
    background: #00b0ff;
    border-color: #00b0ff;
    color: #ffffff;
    box-shadow: 0 0 10px rgba(0, 176, 255, 0.3);
}

.btn-pagination:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* =========================================
   17. SUMMARY (CARD VALOR / RESUMO)
   ========================================= */
.summary-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: rgba(0, 176, 255, 0.1);
    border: 1px solid rgba(0, 176, 255, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #00b0ff;
    font-size: 20px;
    flex-shrink: 0;
}

.summary-label {
    font-size: 13px;
    color: var(--text-muted);
    font-weight: 500;
    display: block;
}

.summary-value {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-main);
    line-height: 1.2;
    display: block;
}

/* =========================================
   18. ICON BOX LARGE (histórico/moedas)
   ========================================= */
.icon-box-large {
    width: 55px;
    height: 55px;
    background: rgba(0, 176, 255, 0.1);
    border: 1px solid rgba(0, 176, 255, 0.2);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: #00b0ff;
    flex-shrink: 0;
}

/* =========================================
   19. STATUS BOX (histórico/moedas)
   ========================================= */
.status-box {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 15px;
    border-radius: 8px;
    border: 1px solid transparent;
    min-width: 130px;
}

.status-success {
    background: rgba(0, 200, 83, 0.05);
    border-color: rgba(0, 200, 83, 0.2);
}

.status-warning {
    background: rgba(255, 171, 0, 0.05);
    border-color: rgba(255, 171, 0, 0.2);
}

.status-inactive {
    background: rgba(0, 176, 255, 0.05);
    border-color: rgba(0, 176, 255, 0.2);
}

.status-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    color: #fff;
}

.status-success .status-icon { background: #00c853; }
.status-warning .status-icon { background: #ffab00; color: #000; }
.status-inactive .status-icon { background: #00b0ff; }

.status-label {
    display: block;
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 500;
}

.status-value {
    display: block;
    font-size: 18px;
    font-weight: 700;
    color: var(--text-main);
    line-height: 1;
}

/* =========================================
   20. COIN LOGO (BASE)
   ========================================= */
.coin-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.coin-logo svg {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

/* =========================================
   21. TAXAS (SUBSCRIÇÃO / INATIVIDADE)
   Blocos partilhados pelas duas páginas
   ========================================= */

/* ---------- Abas ---------- */
.subs-tabs {
    display: flex;
    gap: 8px;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.subs-tab {
    background: transparent;
    border: none;
    color: var(--text-muted);
    padding: 14px 20px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.subs-tab:hover { color: var(--text-main); }

.subs-tab.active {
    color: var(--info);
    border-bottom-color: var(--info);
}

.subs-pane { display: none; }
.subs-pane.active { display: block; animation: subsFadeIn 0.3s ease; }

@keyframes subsFadeIn { from { opacity: 0; } to { opacity: 1; } }

/* ---------- Painel genérico ---------- */
.subs-panel {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 25px;
}

/* ---------- Tabelas ---------- */
.subs-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin-top: 15px;
}

.subs-table thead th {
    background: rgba(0, 176, 255, 0.05);
    border-bottom: 1px solid rgba(0, 176, 255, 0.2);
    color: var(--info);
    font-size: 12px;
    text-transform: uppercase;
    font-weight: 600;
    padding: 14px 15px;
    text-align: left;
    white-space: nowrap;
}

.subs-table tbody td {
    padding: 14px 15px;
    border-bottom: 1px solid var(--border-color);
    font-size: 14px;
    color: var(--text-main);
}

.subs-table tbody tr:hover td {
    background: rgba(0, 176, 255, 0.03);
}

/* ---------- Formulário de parâmetros ---------- */
.param-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 0;
    border-bottom: 1px solid var(--border-color);
    gap: 20px;
}

.param-row:last-child { border-bottom: none; }

.param-label {
    font-weight: 600;
    color: var(--text-main);
}

.param-desc {
    font-size: 13px;
    color: var(--text-muted);
    margin-top: 4px;
}

.param-control {
    width: 220px;
    flex-shrink: 0;
}

/* ---------- Botão primário TRONO ---------- */
.btn-primary-trono {
    background: linear-gradient(135deg, var(--info), #0077ff);
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 12px 24px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.25s;
    box-shadow: 0 4px 15px rgba(0, 176, 255, 0.3);
}

.btn-primary-trono:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 176, 255, 0.5);
    color: #fff;
}

/* ---------- Badges de estado ---------- */
.badge-estado {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.badge-estado.ativa {
    background: rgba(0, 200, 83, 0.15);
    color: #00c853;
    border: 1px solid rgba(0, 200, 83, 0.3);
}

.badge-estado.expirada {
    background: rgba(255, 171, 0, 0.15);
    color: #ffab00;
    border: 1px solid rgba(255, 171, 0, 0.3);
}

/* ---------- Filtros de subscrição ---------- */
.subs-filter-row {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 15px;
}

.subs-filter-btn {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-main);
    border-radius: 20px;
    padding: 8px 18px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.subs-filter-btn:hover {
    border-color: var(--info);
    color: var(--info);
}

.subs-filter-btn.active {
    background: var(--info);
    border-color: var(--info);
    color: #fff;
}

/* =========================================
   22. RESPONSIVIDADE GLOBAL
   ========================================= */
@media (max-width: 991.98px) {
    .sidebar {
        transform: translateX(-100%);
    }
    .sidebar.active {
        transform: translateX(0);
    }
    .main-content {
        margin-left: 0;
    }
    .topbar {
        padding: 0 15px;
    }
    .dashboard-content {
        padding: 10px 15px 20px 15px;
    }
    .page-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
}

@media (max-width: 768px) {
    .table-footer {
        flex-direction: column;
        gap: 15px;
        align-items: flex-start;
    }

    /* Taxas: parâmetros em coluna */
    .param-row {
        flex-direction: column;
        align-items: flex-start;
    }
    .param-control {
        width: 100%;
    }
}

@media (max-width: 575.98px) {
    .card-amount {
        font-size: 28px;
    }
    .btn-theme-toggle span {
        display: none;
    }
}