/* =========================================
   DARK MODE + THEME TOGGLE
========================================= */

[data-theme="dark"] body {
    background: #0f172a !important;
    color: #e5ecff !important;
}

/* Topbar */
[data-theme="dark"] .topbar {
    background: #111827 !important;
    border-color: rgba(255,255,255,0.06) !important;
    box-shadow: 0 10px 30px rgba(0,0,0,0.4) !important;
}

/* Cards / boxes */
[data-theme="dark"] .card,
[data-theme="dark"] .settings-card,
[data-theme="dark"] .mail-shell,
[data-theme="dark"] .post-view-main,
[data-theme="dark"] .post-view-sidebar,
[data-theme="dark"] .front-hero {
    background: #111827 !important;
    color: #e5ecff !important;
    border: 1px solid rgba(255,255,255,0.06) !important;
}

/* Text */
[data-theme="dark"] .text-muted,
[data-theme="dark"] .front-section-subtitle,
[data-theme="dark"] .front-text-lg,
[data-theme="dark"] .front-card-text,
[data-theme="dark"] .nav-text {
    color: #94a3b8 !important;
}

/* Inputs */
[data-theme="dark"] input,
[data-theme="dark"] textarea,
[data-theme="dark"] select {
    background: #0f172a !important;
    color: #e5ecff !important;
    border: 1px solid #334155 !important;
}

/* Table */
[data-theme="dark"] .table {
    background: #111827 !important;
    border-color: rgba(255,255,255,0.06) !important;
}

[data-theme="dark"] .table th {
    background: #1e293b !important;
    color: #e5ecff !important;
}

[data-theme="dark"] .table td {
    border-color: rgba(255,255,255,0.06) !important;
    color: #e5ecff !important;
}

/* Buttons */
[data-theme="dark"] .button,
[data-theme="dark"] .button-link,
[data-theme="dark"] button {
    background: #7c7cff !important;
    color: #fff !important;
}

/* Secondary buttons */
[data-theme="dark"] .button-link.alt {
    background: transparent !important;
    color: #e5ecff !important;
    border: 1px solid #334155 !important;
}

/* Links */
[data-theme="dark"] a {
    color: inherit;
}

/* Images/cards/nav helpers */
[data-theme="dark"] .bottom-nav,
[data-theme="dark"] .mobile-plus-wrap,
[data-theme="dark"] .fab-menu {
    color: #e5ecff !important;
}

/* =========================================
   FLOATING THEME TOGGLE - BASE STYLE
========================================= */

.theme-float {
    position: fixed;
    top: 88px;
    right: 18px;
    left: auto;
    bottom: auto;
    z-index: 99999;
    user-select: none;

    width: 60px;
    min-width: 60px;
    max-width: 60px;

    height: 114px;
    min-height: 114px;
    max-height: 114px;

    display: block;
    padding: 0;
    margin: 0;
    overflow: visible;
    pointer-events: auto;
}

.theme-float-track {
    width: 60px;
    height: 114px;
    padding: 10px 0;
    border-radius: 32px;
    background:
        linear-gradient(#ffffff, #ffffff) padding-box,
        linear-gradient(135deg, #6c63ff, #00d4ff, #8b5cf6) border-box;
    border: 2px solid transparent;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.12);

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    cursor: pointer;
    box-sizing: border-box;
}

.theme-float-btn {
    width: 38px;
    height: 38px;
    min-width: 38px;
    min-height: 38px;
    max-width: 38px;
    max-height: 38px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #ffffff;
    color: #6c63ff;
    box-shadow: 0 4px 10px rgba(0,0,0,0.08);
    font-size: 18px;
    transition: transform 0.2s ease, background 0.25s ease, color 0.25s ease, box-shadow 0.25s ease;
}

.theme-float-track:hover .theme-float-btn {
    transform: scale(1.05);
}

.theme-float-btn span {
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.theme-float::before,
.theme-float::after {
    content: none !important;
    pointer-events: none !important;
}

/* =========================================
   FLOATING THEME TOGGLE - DARK STYLE
========================================= */

[data-theme="dark"] .theme-float-track {
    background:
        linear-gradient(#111827, #111827) padding-box,
        linear-gradient(135deg, #8b80ff, #22d3ee, #a855f7) border-box;
    border: 2px solid transparent;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.45);
}

[data-theme="dark"] .theme-float-btn {
    background: #1b2431;
    color: #a5b4fc;
    box-shadow: 0 4px 12px rgba(0,0,0,0.4);
}

/* Mobile */
@media (max-width: 768px) {
    .theme-float {
        top: 82px;
        right: 14px;
        left: auto;
        bottom: auto;

        width: 56px;
        min-width: 56px;
        max-width: 56px;

        height: 114px;
        min-height: 114px;
        max-height: 114px;
    }

    .theme-float-track {
        width: 56px;
        height: 114px;
    }
}