/**
 * Dark Premium Dashboard v1.0 — glass-soft, textura noise, acento laranja
 * Aplica em todas as páginas quando data-theme-preset="dark-premium"
 */

html[data-theme-preset="dark-premium"] {
    --dp-bg-base: #2B2A2E;
    --dp-bg-surface: #4A4445;
    --dp-bg-elevated: #313136;
    --dp-bg-input: #3A383C;
    --dp-border: #676062;
    --dp-border-strong: #777072;
    --dp-text: #E8E8E8;
    --dp-text-muted: #A8A5AA;
    --dp-text-dim: #777777;
    --dp-accent: #F35C00;
    --dp-accent-hover: #FF6C14;
    --dp-accent-pressed: #D94F00;
    --dp-glow-teal: rgba(20, 184, 166, 0.14);
    --dp-glow-purple: rgba(168, 85, 247, 0.12);
    --primary-color: #F35C00;
    --primary-light: #FF6C14;
    --primary-dark: #D94F00;
    --secondary-color: #7068FF;
    --light-bg: var(--dp-bg-base);
    --card-bg: var(--dp-bg-surface);
    --dark-color: var(--dp-text);
    --border-radius: 14px;
    --border-radius-sm: 10px;
    --border-radius-lg: 14px;
    --shadow-sm: 0 2px 12px rgba(0, 0, 0, 0.22);
    --shadow-md: 0 2px 12px rgba(0, 0, 0, 0.22);
    --shadow-lg: 0 3px 10px rgba(0, 0, 0, 0.25);
    --shadow-button: 0 3px 10px rgba(0, 0, 0, 0.25);
    --surface-modal: #464042;
    --status-green: #22C58B;
    --status-yellow: #FFC107;
    --status-red: #FF5C5C;
}

html[data-theme-preset="dark-premium"],
html[data-theme-preset="dark-premium"] body {
    color-scheme: dark;
}

html[data-theme-preset="dark-premium"] body,
html[data-theme-preset="dark-premium"] body.app-dashboard {
    background-color: var(--dp-bg-base) !important;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.45'/%3E%3C/svg%3E") !important;
    background-blend-mode: overlay !important;
    background-size: 180px 180px !important;
    background-attachment: fixed !important;
    color: var(--dp-text) !important;
}

/* Navbar */
html[data-theme-preset="dark-premium"] .navbar.navbar-dark {
    background: rgba(49, 49, 54, 0.88) !important;
    backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--dp-border);
    box-shadow: none !important;
    padding: 0.75rem 0;
}

html[data-theme-preset="dark-premium"] .navbar-brand {
    color: var(--dp-text) !important;
    font-size: 1.125rem;
}

html[data-theme-preset="dark-premium"] .btn-outline-light {
    border-color: var(--dp-border-strong) !important;
    color: var(--dp-text-muted) !important;
    background: rgba(74, 68, 69, 0.6) !important;
}

html[data-theme-preset="dark-premium"] .btn-outline-light:hover {
    background: rgba(243, 92, 0, 0.15) !important;
    border-color: rgba(243, 92, 0, 0.45) !important;
    color: var(--dp-text) !important;
}

/* Sidebar */
html[data-theme-preset="dark-premium"] .sidebar {
    background: var(--dp-bg-elevated) !important;
    border-right: 1px solid var(--dp-border) !important;
    box-shadow: none !important;
    border-radius: 0 !important;
    padding: 1rem 0.75rem;
}

html[data-theme-preset="dark-premium"] .sidebar .nav-link {
    color: var(--dp-text-muted) !important;
    border-radius: 999px;
    padding: 0.625rem 1rem;
    font-size: 0.875rem;
    transform: none !important;
}

html[data-theme-preset="dark-premium"] .sidebar .nav-link:hover {
    background: rgba(148, 163, 184, 0.08) !important;
    color: var(--dp-text) !important;
    transform: none !important;
}

html[data-theme-preset="dark-premium"] .sidebar .nav-link.active {
    background: var(--dp-accent) !important;
    color: #fff !important;
    box-shadow: 0 4px 14px rgba(243, 92, 0, 0.35) !important;
}

html[data-theme-preset="dark-premium"] .sidebar-nav-label {
    color: rgba(148, 163, 184, 0.75) !important;
}

/* Conteúdo principal */
html[data-theme-preset="dark-premium"] .app-viewport,
html[data-theme-preset="dark-premium"] [id$="-content"] {
    color: var(--dp-text);
}

html[data-theme-preset="dark-premium"] h1,
html[data-theme-preset="dark-premium"] h2,
html[data-theme-preset="dark-premium"] h3,
html[data-theme-preset="dark-premium"] h4,
html[data-theme-preset="dark-premium"] h5,
html[data-theme-preset="dark-premium"] h6 {
    color: var(--dp-text);
}

html[data-theme-preset="dark-premium"] .text-muted {
    color: var(--dp-text-muted) !important;
}

/* Cards */
html[data-theme-preset="dark-premium"] .card,
html[data-theme-preset="dark-premium"] .menu-card,
html[data-theme-preset="dark-premium"] .dashboard-card,
html[data-theme-preset="dark-premium"] .stat-card {
    background: var(--dp-bg-surface) !important;
    border: 1px solid var(--dp-border) !important;
    color: var(--dp-text) !important;
    box-shadow: var(--shadow-sm) !important;
    border-radius: var(--border-radius-lg) !important;
}

html[data-theme-preset="dark-premium"] .card-header {
    background: rgba(49, 49, 54, 0.65) !important;
    border-bottom: 1px solid var(--dp-border) !important;
    color: var(--dp-text) !important;
}

html[data-theme-preset="dark-premium"] .card-header.bg-primary,
html[data-theme-preset="dark-premium"] .card-header.bg-success,
html[data-theme-preset="dark-premium"] .card-header.bg-info,
html[data-theme-preset="dark-premium"] .card-header.bg-warning,
html[data-theme-preset="dark-premium"] .card-header.bg-danger,
html[data-theme-preset="dark-premium"] .card-header.bg-secondary,
html[data-theme-preset="dark-premium"] .card-header.bg-dark {
    background: rgba(243, 92, 0, 0.2) !important;
    border-bottom-color: var(--dp-border) !important;
    color: var(--dp-text) !important;
}

html[data-theme-preset="dark-premium"] .card.bg-light,
html[data-theme-preset="dark-premium"] .bg-light {
    background-color: rgba(74, 68, 69, 0.75) !important;
    color: var(--dp-text) !important;
}

html[data-theme-preset="dark-premium"] .stat-card.primary,
html[data-theme-preset="dark-premium"] .stat-card.success,
html[data-theme-preset="dark-premium"] .stat-card.warning,
html[data-theme-preset="dark-premium"] .stat-card.danger,
html[data-theme-preset="dark-premium"] .stat-card.info {
    background: var(--dp-bg-surface) !important;
}

html[data-theme-preset="dark-premium"] .stat-card h6,
html[data-theme-preset="dark-premium"] .stat-card small {
    color: var(--dp-text-muted) !important;
}

html[data-theme-preset="dark-premium"] .stat-card h2,
html[data-theme-preset="dark-premium"] .stat-card h3 {
    color: var(--dp-text) !important;
}

/* Formulários */
html[data-theme-preset="dark-premium"] .form-control,
html[data-theme-preset="dark-premium"] .form-select,
html[data-theme-preset="dark-premium"] .input-group-text {
    background-color: var(--dp-bg-input) !important;
    border: 1px solid var(--dp-border-strong) !important;
    color: var(--dp-text) !important;
    border-radius: var(--border-radius-sm) !important;
}

html[data-theme-preset="dark-premium"] .form-control::placeholder {
    color: var(--dp-text-dim) !important;
}

html[data-theme-preset="dark-premium"] .form-control:focus,
html[data-theme-preset="dark-premium"] .form-select:focus {
    border-color: rgba(243, 92, 0, 0.55) !important;
    box-shadow: 0 0 0 3px rgba(243, 92, 0, 0.15) !important;
    background-color: var(--dp-bg-input) !important;
    color: var(--dp-text) !important;
}

html[data-theme-preset="dark-premium"] .form-label {
    color: var(--dp-text-muted);
    font-size: 0.875rem;
}

/* Tabelas */
html[data-theme-preset="dark-premium"] .table {
    color: var(--dp-text) !important;
    --bs-table-bg: transparent;
    --bs-table-color: var(--dp-text);
    border-color: var(--dp-border) !important;
}

html[data-theme-preset="dark-premium"] .table thead,
html[data-theme-preset="dark-premium"] .table thead.bg-light,
html[data-theme-preset="dark-premium"] .table thead th {
    background-color: rgba(49, 49, 54, 0.9) !important;
    color: var(--dp-text-muted) !important;
    border-color: var(--dp-border) !important;
}

html[data-theme-preset="dark-premium"] .table tbody tr:hover {
    background: rgba(243, 92, 0, 0.06) !important;
    transform: none !important;
}

html[data-theme-preset="dark-premium"] .table td,
html[data-theme-preset="dark-premium"] .table th {
    border-color: var(--dp-border) !important;
}

/* Botões */
html[data-theme-preset="dark-premium"] .btn-primary {
    background: var(--dp-accent) !important;
    border: none !important;
    box-shadow: 0 4px 12px rgba(243, 92, 0, 0.3) !important;
}

html[data-theme-preset="dark-premium"] .btn-primary:hover {
    background: var(--dp-accent-hover) !important;
}

html[data-theme-preset="dark-premium"] .btn-secondary,
html[data-theme-preset="dark-premium"] .btn-outline-secondary {
    background: rgba(74, 68, 69, 0.8) !important;
    border-color: var(--dp-border-strong) !important;
    color: var(--dp-text-muted) !important;
}

html[data-theme-preset="dark-premium"] .btn-outline-primary {
    border-color: rgba(243, 92, 0, 0.5) !important;
    color: #FFB380 !important;
}

/* Modais */
html[data-theme-preset="dark-premium"] .modal-content {
    background: var(--dp-bg-surface) !important;
    border: 1px solid var(--dp-border) !important;
    color: var(--dp-text) !important;
    border-radius: var(--border-radius-lg) !important;
}

html[data-theme-preset="dark-premium"] .modal-header {
    border-bottom-color: var(--dp-border) !important;
    background: rgba(43, 42, 46, 0.5) !important;
}

html[data-theme-preset="dark-premium"] .modal-footer {
    border-top-color: var(--dp-border) !important;
}

html[data-theme-preset="dark-premium"] .modal-header.bg-primary,
html[data-theme-preset="dark-premium"] .modal-header.bg-info,
html[data-theme-preset="dark-premium"] .modal-header.bg-success,
html[data-theme-preset="dark-premium"] .modal-header.bg-warning,
html[data-theme-preset="dark-premium"] .modal-header.bg-danger {
    background: rgba(243, 92, 0, 0.18) !important;
    color: var(--dp-text) !important;
}

/* Dropdowns */
html[data-theme-preset="dark-premium"] .dropdown-menu {
    background: var(--dp-bg-surface) !important;
    border: 1px solid var(--dp-border) !important;
    box-shadow: var(--shadow-md) !important;
}

html[data-theme-preset="dark-premium"] .dropdown-item {
    color: var(--dp-text-muted) !important;
}

html[data-theme-preset="dark-premium"] .dropdown-item:hover,
html[data-theme-preset="dark-premium"] .dropdown-item:focus {
    background: rgba(243, 92, 0, 0.12) !important;
    color: var(--dp-text) !important;
}

html[data-theme-preset="dark-premium"] .dropdown-header {
    color: var(--dp-text-dim) !important;
}

/* Alerts */
html[data-theme-preset="dark-premium"] .alert {
    border-radius: var(--border-radius-sm);
    border-width: 1px;
}

html[data-theme-preset="dark-premium"] .alert-primary {
    background: rgba(243, 92, 0, 0.12) !important;
    border-color: rgba(243, 92, 0, 0.35) !important;
    color: #FFD4B8 !important;
}

html[data-theme-preset="dark-premium"] .alert-info {
    background: rgba(14, 165, 233, 0.1) !important;
    border-color: rgba(14, 165, 233, 0.3) !important;
    color: #bae6fd !important;
}

html[data-theme-preset="dark-premium"] .alert-success {
    background: rgba(16, 185, 129, 0.1) !important;
    border-color: rgba(16, 185, 129, 0.3) !important;
    color: #a7f3d0 !important;
}

html[data-theme-preset="dark-premium"] .alert-warning {
    background: rgba(245, 158, 11, 0.1) !important;
    border-color: rgba(245, 158, 11, 0.3) !important;
    color: #fde68a !important;
}

html[data-theme-preset="dark-premium"] .alert-danger {
    background: rgba(239, 68, 68, 0.1) !important;
    border-color: rgba(239, 68, 68, 0.3) !important;
    color: #fecaca !important;
}

/* Tabs */
html[data-theme-preset="dark-premium"] .nav-tabs {
    border-bottom-color: var(--dp-border) !important;
}

html[data-theme-preset="dark-premium"] .nav-tabs .nav-link {
    color: var(--dp-text-muted) !important;
    border-color: transparent !important;
    border-radius: var(--border-radius-sm) var(--border-radius-sm) 0 0 !important;
}

html[data-theme-preset="dark-premium"] .nav-tabs .nav-link.active {
    background: var(--dp-bg-surface) !important;
    color: var(--dp-text) !important;
    border-color: var(--dp-border) var(--dp-border) var(--dp-bg-surface) !important;
}

/* List group */
html[data-theme-preset="dark-premium"] .list-group-item {
    background: var(--dp-bg-surface) !important;
    border-color: var(--dp-border) !important;
    color: var(--dp-text) !important;
}

/* Pagination */
html[data-theme-preset="dark-premium"] .page-link {
    background: var(--dp-bg-input) !important;
    border-color: var(--dp-border) !important;
    color: var(--dp-text-muted) !important;
}

html[data-theme-preset="dark-premium"] .page-item.active .page-link {
    background: var(--dp-accent) !important;
    border-color: var(--dp-accent) !important;
}

/* Login */
html[data-theme-preset="dark-premium"] body.login-page,
html[data-theme-preset="dark-premium"] body:has(#app > .login-wrapper) {
    background-color: var(--dp-bg-base) !important;
    background-image:
        radial-gradient(ellipse 70% 55% at 8% 95%, var(--dp-glow-teal), transparent 55%),
        radial-gradient(ellipse 55% 45% at 92% 88%, var(--dp-glow-purple), transparent 50%),
        linear-gradient(rgba(148, 163, 184, 0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(148, 163, 184, 0.04) 1px, transparent 1px) !important;
    background-size: 100% 100%, 100% 100%, 210px 210px, 210px 210px !important;
}

html[data-theme-preset="dark-premium"] body.login-page .login-card,
html[data-theme-preset="dark-premium"] body:has(#app > .login-wrapper) .login-card {
    background: rgba(74, 68, 69, 0.92) !important;
    border: 1px solid var(--dp-border) !important;
    box-shadow: var(--shadow-lg) !important;
    color: var(--dp-text) !important;
}

html[data-theme-preset="dark-premium"] body.login-page .login-card .login-title,
html[data-theme-preset="dark-premium"] body:has(#app > .login-wrapper) .login-card .login-title {
    color: var(--dp-text) !important;
}

html[data-theme-preset="dark-premium"] body.login-page .login-icon,
html[data-theme-preset="dark-premium"] body:has(#app > .login-wrapper) .login-icon {
    background: var(--dp-accent) !important;
    box-shadow: 0 10px 24px rgba(243, 92, 0, 0.4) !important;
}

/* Mobile bottom nav */
html[data-theme-preset="dark-premium"] .mobile-bottom-nav {
    background: rgba(43, 42, 46, 0.95) !important;
    border-top-color: var(--dp-border) !important;
}

html[data-theme-preset="dark-premium"] .mobile-bottom-nav__item.active {
    color: var(--dp-accent) !important;
}

/* Neon cards — alinhado ao Photomaker */
html[data-theme-preset="dark-premium"] .neon-card {
    background: var(--dp-bg-surface) !important;
    border-color: var(--dp-border-strong) !important;
}

/* Cards coloridos do dashboard */
html[data-theme-preset="dark-premium"] .card.bg-primary,
html[data-theme-preset="dark-premium"] .card.bg-success,
html[data-theme-preset="dark-premium"] .card.bg-info,
html[data-theme-preset="dark-premium"] .card.bg-warning {
    background: var(--dp-bg-surface) !important;
    color: var(--dp-text) !important;
    border: 1px solid var(--dp-border) !important;
}

html[data-theme-preset="dark-premium"] .card.bg-primary .card-body,
html[data-theme-preset="dark-premium"] .card.bg-success .card-body,
html[data-theme-preset="dark-premium"] .card.bg-info .card-body,
html[data-theme-preset="dark-premium"] .card.bg-warning .card-body {
    color: var(--dp-text) !important;
}

html[data-theme-preset="dark-premium"] .bg-primary.bg-opacity-10 {
    background-color: rgba(243, 92, 0, 0.12) !important;
}

html[data-theme-preset="dark-premium"] .bg-success.bg-opacity-10 {
    background-color: rgba(16, 185, 129, 0.1) !important;
}

html[data-theme-preset="dark-premium"] .bg-warning.bg-opacity-10 {
    background-color: rgba(245, 158, 11, 0.1) !important;
}

html[data-theme-preset="dark-premium"] .bg-danger.bg-opacity-10 {
    background-color: rgba(239, 68, 68, 0.1) !important;
}

html[data-theme-preset="dark-premium"] .text-primary { color: #FF6C14 !important; }
html[data-theme-preset="dark-premium"] .text-success { color: #34d399 !important; }
html[data-theme-preset="dark-premium"] .text-warning { color: #fbbf24 !important; }
html[data-theme-preset="dark-premium"] .text-danger { color: #f87171 !important; }
html[data-theme-preset="dark-premium"] .text-info { color: #38bdf8 !important; }

/* Toast */
html[data-theme-preset="dark-premium"] .toast {
    background: var(--dp-bg-surface) !important;
    border: 1px solid var(--dp-border) !important;
    color: var(--dp-text) !important;
}

/* Theme option cards (configurações) */
html[data-theme-preset="dark-premium"] .theme-option-card {
    background: var(--dp-bg-input) !important;
    border-color: var(--dp-border) !important;
    color: var(--dp-text-muted) !important;
}

html[data-theme-preset="dark-premium"] .theme-option-card.active {
    border-color: var(--dp-accent) !important;
    background: rgba(243, 92, 0, 0.12) !important;
    color: var(--dp-text) !important;
}

/* Overlay sidebar mobile */
html[data-theme-preset="dark-premium"] .sidebar-overlay {
    background: rgba(0, 0, 0, 0.65) !important;
}

/* Watermark */
html[data-theme-preset="dark-premium"] .watermark {
    color: var(--dp-text-dim) !important;
    opacity: 0.35;
}

/* Scrollbar sutil */
html[data-theme-preset="dark-premium"] ::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

html[data-theme-preset="dark-premium"] ::-webkit-scrollbar-thumb {
    background: rgba(148, 163, 184, 0.25);
    border-radius: 4px;
}

html[data-theme-preset="dark-premium"] ::-webkit-scrollbar-track {
    background: transparent;
}

/* Dark Premium — ajustes finais */
html[data-theme-preset="dark-premium"] .sidebar .nav-link {
    border-radius: 12px !important;
}

html[data-theme-preset="dark-premium"] .sidebar .nav-link.active {
    box-shadow: var(--shadow-button) !important;
}

html[data-theme-preset="dark-premium"] .btn-primary,
html[data-theme-preset="dark-premium"] .btn-info.text-white {
    background: var(--dp-accent) !important;
    border: none !important;
    border-radius: 12px !important;
    min-height: 44px;
    box-shadow: var(--shadow-button) !important;
}

html[data-theme-preset="dark-premium"] .btn-primary:hover,
html[data-theme-preset="dark-premium"] .btn-info.text-white:hover {
    background: var(--dp-accent-hover) !important;
}

html[data-theme-preset="dark-premium"] .btn-primary:active,
html[data-theme-preset="dark-premium"] .btn-info.text-white:active {
    background: var(--dp-accent-pressed) !important;
}

html[data-theme-preset="dark-premium"] .card-header.bg-info,
html[data-theme-preset="dark-premium"] .card-header.bg-primary {
    background: rgba(243, 92, 0, 0.22) !important;
    color: var(--dp-text) !important;
}

html[data-theme-preset="dark-premium"] .btn-warning {
    color: #1a1a1a !important;
}

html[data-theme-preset="dark-premium"] .btn-danger {
    background-color: var(--status-red) !important;
    border-color: var(--status-red) !important;
}

@media (max-width: 1023px) {
    html[data-theme-preset="dark-premium"] .btn,
    html[data-theme-preset="dark-premium"] .form-control,
    html[data-theme-preset="dark-premium"] .form-select {
        min-height: 48px;
        font-size: 12.8px;
    }
}

@media (prefers-reduced-motion: reduce) {
    html[data-theme-preset="dark-premium"] * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

