/* App Custom Styles & Dark Mode Theme */

/* ==========================================================================
   DARK MODE SYSTEM - PREMIUM HIGH-CONTRAST THEME
   ========================================================================== */

/* Dark Mode Base Styles */
html.theme-dark,
body.theme-dark,
.theme-dark .page,
.theme-dark .page-content,
.theme-dark .views {
    background-color: #121212 !important;
    color: #f3f4f6 !important;
}

/* Cards & Containers */
.plan-card {
    background-color: #ffffff;
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
    border: 1px solid rgba(192, 202, 180, 0.4);
    margin-bottom: 16px;
    cursor: pointer;
    transition: transform 0.1s ease, box-shadow 0.2s ease;
}

.plan-card .plan-title {
    color: #181d14;
}

.plan-card .plan-subtitle {
    color: #707a67;
}

.plan-card .plan-price {
    color: #0B6000;
}

.plan-card .plan-price-sub {
    color: #707a67;
}

.plan-card .plan-divider {
    background-color: #f0f4ec;
}

.plan-card .plan-check {
    color: #0B6000;
}

.plan-card .plan-desc-text {
    color: #404a39;
}

.plan-card .plan-diferenca {
    color: #0B6000;
}

.theme-dark .stat-card,
.theme-dark .form-card,
.theme-dark .perfil-card,
.theme-dark .ambiente-main-box,
.theme-dark .ambiente-card,
.theme-dark .btn-card-link,
.theme-dark .btn-logout,
.theme-dark .plan-card,
.theme-dark .search-item-bar,
.theme-dark #div_complano,
.theme-dark #div_gratis,
.theme-dark #div_semplano,
.theme-dark #div_logomarca,
.theme-dark #row_meus_corretores > a > div {
    background-color: #1e1e1e !important;
    border-color: rgba(255, 255, 255, 0.12) !important;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.5) !important;
    color: #ffffff !important;
}

.theme-dark .search-item-bar input {
    color: #ffffff !important;
}

.theme-dark .plan-card .plan-title {
    color: #ffffff !important;
}

.theme-dark .plan-card .plan-subtitle {
    color: #d1d5db !important;
}

.theme-dark .plan-card .plan-price {
    color: #9ff96d !important;
}

.theme-dark .plan-card .plan-price-sub {
    color: #d1d5db !important;
}

.theme-dark .plan-card .plan-divider {
    background-color: rgba(255, 255, 255, 0.12) !important;
}

.theme-dark .plan-card .plan-check {
    color: #9ff96d !important;
}

.theme-dark .plan-card .plan-desc-text {
    color: #f3f4f6 !important;
}

.theme-dark .plan-card .plan-diferenca {
    color: #9ff96d !important;
}

/* Typography & Headings */
.theme-dark h1,
.theme-dark h2,
.theme-dark h3,
.theme-dark h4,
.theme-dark .title,
.theme-dark .item-title,
.theme-dark #nomeusuario,
.theme-dark #nomeplano,
.theme-dark #nomeplano_mp,
.theme-dark #qtd_pendentes,
.theme-dark #qtd_finalizadas,
.theme-dark .perfil-menu-text,
.theme-dark .perfil-card span,
.theme-dark .btn-logout,
.theme-dark .btn-logout span {
    color: #ffffff !important;
}

/* Universal Text Contrast Override for Inline Dark Colors */
.theme-dark [style*="color: #181d14"],
.theme-dark [style*="color:#181d14"] {
    color: #ffffff !important;
}

.theme-dark [style*="color: #404a39"],
.theme-dark [style*="color:#404a39"],
.theme-dark [style*="color: #5c6650"],
.theme-dark [style*="color:#5c6650"],
.theme-dark [style*="color: #707a67"],
.theme-dark [style*="color:#707a67"],
.theme-dark [style*="color: #5a6454"],
.theme-dark [style*="color:#5a6454"],
.theme-dark [style*="color: #4d4c4c"],
.theme-dark [style*="color:#4d4c4c"],
.theme-dark [style*="color: #5c5c5c"],
.theme-dark [style*="color:#5c5c5c"] {
    color: #d1d5db !important;
}

.theme-dark .form-label,
.theme-dark .item-after,
.theme-dark .item-subtitle,
.theme-dark #tipousuario,
.theme-dark #restante,
.theme-dark #txt_adicional,
.theme-dark #txt_adicional_mp,
.theme-dark .perfil-section-title,
.theme-dark #texto_vazio_finalizadas,
.theme-dark p {
    color: #d1d5db !important;
}

.theme-dark .btn-logout .material-symbols-outlined {
    color: #9ff96d !important;
}

/* Form Inputs, Selects and Textareas */
.theme-dark .form-input,
.theme-dark .form-textarea,
.theme-dark input[type="text"],
.theme-dark input[type="number"],
.theme-dark input[type="email"],
.theme-dark input[type="password"],
.theme-dark select,
.theme-dark textarea {
    background-color: #262626 !important;
    border-color: #3f3f46 !important;
    color: #ffffff !important;
}

.theme-dark select.form-input {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%3Cd1d5db' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E") !important;
}

.theme-dark .form-input:focus,
.theme-dark select.form-input:focus,
.theme-dark .form-textarea:focus,
.theme-dark input:focus {
    border-color: #87BF4A !important;
    box-shadow: 0 0 0 3px rgba(135, 191, 74, 0.3) !important;
}

/* Input Placeholders */
.theme-dark ::placeholder {
    color: #9ca3af !important;
    opacity: 1 !important;
}

/* Lists & List Items */
.theme-dark .list li,
.theme-dark #div_vistorias li a,
.theme-dark #div_vistorias_finalizadas li > div {
    background-color: #1e1e1e !important;
    border-color: rgba(255, 255, 255, 0.1) !important;
    color: #ffffff !important;
}

.theme-dark #div_vistorias li a div,
.theme-dark #div_vistorias_finalizadas li div {
    color: #f3f4f6 !important;
}

/* Searchbar */
.theme-dark .searchbar {
    background-color: transparent !important;
    border-color: transparent !important;
}

.theme-dark .searchbar-input-wrap {
    background-color: #262626 !important;
    border-color: #3f3f46 !important;
}

.theme-dark .searchbar input {
    background-color: transparent !important;
    color: #ffffff !important;
}

/* Segment Switcher Toggle Buttons */
.theme-dark div[style*="background-color: #ffffff"] > .tab-btn,
.theme-dark .tab-btn {
    color: #d1d5db;
}

.theme-dark .tab-btn-active {
    background-color: #0B6000 !important;
    color: #ffffff !important;
}

.theme-dark .tab-btn-inactive {
    background-color: transparent !important;
    color: #9ca3af !important;
}

.theme-dark div[style*="background-color: #ffffff"][style*="border-radius: 16px"] {
    background-color: #1e1e1e !important;
    border-color: rgba(255, 255, 255, 0.12) !important;
}

/* Scrollable Tabs Navigation Header */
.theme-dark .tabs-header-nav {
    background-color: #1e1e1e !important;
    border-bottom-color: rgba(255, 255, 255, 0.12) !important;
}

.theme-dark .tab-item-inactive {
    color: #9ca3af !important;
}

.theme-dark .tab-item-active {
    color: #9ff96d !important;
    border-bottom-color: #9ff96d !important;
}

/* Bottom Navigation Bar */
.theme-dark .bottom-nav {
    background-color: #181c15 !important;
    border-top-color: rgba(255, 255, 255, 0.12) !important;
}

.theme-dark .bottom-nav-item {
    color: #a3b395 !important;
}

.theme-dark .bottom-nav-item.active {
    color: #9ff96d !important;
}

/* Fixed Bottom Actions Bar */
.theme-dark #bottom_actions_bar {
    background-color: #1e1e1e !important;
    border-top-color: rgba(255, 255, 255, 0.12) !important;
}

/* Brand Management Box (Logo display box) */
.theme-dark div[style*="background-color: #f1f6ea"] {
    background-color: #262626 !important;
    border-color: rgba(135, 191, 74, 0.5) !important;
}

/* Icons, Badges & Steppers */
.theme-dark .ambiente-ordem-badge {
    background-color: #262626 !important;
    color: #87BF4A !important;
    border: 1px solid #3f3f46 !important;
}

.theme-dark .ambiente-qtd-badge {
    background-color: rgba(135, 191, 74, 0.2) !important;
    color: #9ff96d !important;
}

.theme-dark .icon-circle-red {
    background-color: rgba(200, 30, 30, 0.3) !important;
    color: #f87171 !important;
}

.theme-dark .icon-circle-green,
.theme-dark .icon-circle-green-sm {
    background-color: rgba(135, 191, 74, 0.25) !important;
    color: #9ff96d !important;
}

.theme-dark .icon-box-sq {
    background-color: #262626 !important;
    color: #9ff96d !important;
}

.theme-dark .stepper-pill {
    background-color: #262626 !important;
}

.theme-dark .btn-qty {
    color: #ffffff !important;
}

.theme-dark .ambiente-checkbox-box {
    background-color: #262626 !important;
    border-color: #3f3f46 !important;
}

/* Theme Switcher Controls */
.theme-dark .theme-toggle-container {
    background-color: #262626 !important;
}

.theme-dark .theme-slider {
    background-color: #3f3f46 !important;
}

.theme-dark .theme-btn {
    color: #9ca3af !important;
}

.theme-dark .theme-btn.active {
    color: #ffffff !important;
}

/* FAB Labels & Action Buttons */
.theme-dark .fab-label {
    background-color: #262626 !important;
    color: #ffffff !important;
    border: 1px solid #3f3f46 !important;
}

.theme-dark .btn-secondary {
    border-color: #4b5563 !important;
    color: #e5e7eb !important;
}

/* Tag Overrides in Dark Mode */
.theme-dark span[style*="background-color: #dae2fd"] {
    background-color: #26334a !important;
    color: #93c5fd !important;
}

.theme-dark span[style*="background-color: #f0f6e6"] {
    background-color: #1e3312 !important;
    color: #9ff96d !important;
}

.theme-dark span[style*="background-color: #d6eb3c"] {
    background-color: #3b4200 !important;
    color: #facc15 !important;
}

.theme-dark span[style*="background-color: #9ff96d"] {
    background-color: #1b4a00 !important;
    color: #9ff96d !important;
}

/* Framework7 Dialogs & Modals */
.theme-dark .dialog {
    background-color: #1e1e1e !important;
    color: #ffffff !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
}

.theme-dark .dialog-title {
    color: #ffffff !important;
}

.theme-dark .dialog-text {
    color: #d1d5db !important;
}

.theme-dark .dialog-button {
    color: #9ff96d !important;
}
