/* ========================================
   BZPRss - Unified Styles
   ======================================== */

/* ========================================
   1. ROOT & CSS VARIABLES
   ======================================== */
:root {
    --purple-50: #faf5ff;
    --purple-100: #f3e8ff;
    --purple-200: #e9d5ff;
    --purple-300: #d8b4fe;
    --purple-400: #c084fc;
    --purple-500: #a855f7;
    --purple-600: #9333ea;
    --purple-700: #7e22ce;
    --purple-800: #6b21a8;
    --purple-900: #581c87;
    --purple-950: #3b0764;
}

/* Light Theme Variables */
[data-bs-theme="light"] {
    --bg-body: #f8f7fc;
    --bg-surface: #ffffff;
    --bg-sidebar: linear-gradient(180deg, #2d1b69 0%, #1a0f3c 100%);
    --text-primary: #1a1a2e;
    --text-secondary: #6b7280;
    --text-sidebar: #e2d9f3;
    --border-color: #e9e5f5;
    --hover-bg: #f3effb;
    --card-shadow: 0 4px 20px rgba(88, 28, 135, 0.08);
    --accent: var(--purple-600);
    --accent-light: var(--purple-100);
    --accent-hover: var(--purple-700);
    --feed-item-hover: #f9f5ff;
    --feed-item-border: var(--purple-400);
}

/* Dark Theme Variables */
[data-bs-theme="dark"] {
    --bg-body: #0f0a1e;
    --bg-surface: #1a1233;
    --bg-sidebar: linear-gradient(180deg, #1a0f3c 0%, #0d0720 100%);
    --text-primary: #f1eef9;
    --text-secondary: #9ca3af;
    --text-sidebar: #d4c8ef;
    --border-color: #2d2054;
    --hover-bg: #241a42;
    --card-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    --accent: var(--purple-400);
    --accent-light: rgba(168, 85, 247, 0.15);
    --accent-hover: var(--purple-300);
    --feed-item-hover: #1f1540;
    --feed-item-border: var(--purple-500);
}

/* Kindle (Reading-Optimized) Theme Variables */
[data-bs-theme="kindle"] {
    --bg-body: #f7f5f0;
    --bg-surface: #fbfaf7;
    --bg-sidebar: linear-gradient(180deg, #4a4644 0%, #36332f 100%);
    --text-primary: #2d2a26;
    --text-secondary: #6e6b67;
    --text-sidebar: #e8e6e1;
    --border-color: #e0ddd7;
    --hover-bg: #efede8;
    --card-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    --accent: #6b6662;
    --accent-light: #f0eeea;
    --accent-hover: #534f4c;
    --feed-item-hover: #f2f0eb;
    --feed-item-border: #8a8681;
}

/* ========================================
   2. BASE STYLES
   ======================================== */
* {
    box-sizing: border-box;
}

html {
    font-size: 14px;
    position: relative;
    min-height: 100%;
}

@media (min-width: 768px) {
    html {
        font-size: 16px;
    }
}

body {
    font-family: 'Inter', sans-serif;
    background: var(--bg-body);
    color: var(--text-primary);
    transition: background 0.3s, color 0.3s;
    margin-bottom: 60px;
}

/* ========================================
   3. LAYOUT - SIDEBAR
   ======================================== */
.sidebar {
    width: 270px;
    min-height: 100vh;
    max-height: 100vh;
    overflow-y: auto;
    background: var(--bg-sidebar);
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1000;
    border-right: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease;
}

.sidebar .brand {
    padding: 24px 20px;
    font-size: 1.3rem;
    font-weight: 700;
    color: #fff;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    gap: 10px;
}

.sidebar .brand i {
    color: var(--purple-400);
}

.sidebar .nav-link {
    color: var(--text-sidebar);
    padding: 11px 18px;
    border-radius: 10px;
    margin: 3px 12px;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 10px;
}

.sidebar .nav-link i {
    width: 20px;
    text-align: center;
    font-size: 0.85rem;
}

.sidebar .nav-link:hover {
    background: rgba(168, 85, 247, 0.15);
    color: #fff;
}

.sidebar .nav-link.active {
    background: rgba(168, 85, 247, 0.25);
    color: #fff;
    font-weight: 600;
}

.sidebar-section-title {
    padding: 12px 20px 6px;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    color: rgba(255, 255, 255, 0.4);
    font-weight: 600;
}

.sidebar-footer {
    margin-top: auto;
    padding: 16px 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    gap: 10px;
}

.sidebar-footer .user-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--purple-500), var(--purple-700));
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 0.8rem;
    font-weight: 600;
}

.sidebar-footer .user-name {
    color: #e0d8f0;
    font-size: 0.85rem;
    font-weight: 500;
}

.sidebar-footer a {
    color: rgba(255, 255, 255, 0.5);
    transition: color 0.2s;
}

.sidebar-footer a:hover {
    color: #fff;
}

/* ========================================
   4. LAYOUT - MOBILE MENU
   ======================================== */
.mobile-menu-toggle {
    display: none;
    position: fixed;
    top: 16px;
    left: 16px;
    z-index: 1001;
    background: var(--purple-600);
    color: white;
    border: none;
    border-radius: 10px;
    width: 44px;
    height: 44px;
    font-size: 1.2rem;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(147, 51, 234, 0.4);
    transition: all 0.3s;
}

.mobile-menu-toggle:hover {
    background: var(--purple-700);
    transform: scale(1.05);
}

.mobile-menu-toggle:active {
    transform: scale(0.95);
}

.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
    opacity: 0;
    transition: opacity 0.3s;
}

.sidebar-overlay.active {
    opacity: 1;
}

/* ========================================
   5. LAYOUT - MAIN CONTENT
   ======================================== */
.main-content {
    margin-left: 270px;
    padding: 32px 40px;
    min-height: 100vh;
}

/* ========================================
   6. COMPONENTS - CARDS
   ======================================== */
.card-stat {
    border: 1px solid var(--border-color);
    border-radius: 16px;
    background: var(--bg-surface);
    box-shadow: var(--card-shadow);
    transition: transform 0.2s, box-shadow 0.2s;
}

.card-stat:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(88, 28, 135, 0.12);
}

/* ========================================
   7. COMPONENTS - FEED ITEMS
   ======================================== */
.feed-item {
    border-left: 3px solid transparent;
    padding: 14px 18px;
    cursor: pointer;
    transition: all 0.2s;
    border-radius: 8px;
    margin-bottom: 2px;
}

.feed-item:hover {
    background: var(--feed-item-hover);
    border-left-color: var(--feed-item-border);
}

.feed-item.unread {
    font-weight: 600;
}

.feed-item-wrapper {
    position: relative;
}

.feed-item-wrapper .dropdown {
    opacity: 0;
    transition: opacity 0.2s;
}

.feed-item-wrapper:hover .dropdown {
    opacity: 1;
}

/* ========================================
   8. COMPONENTS - BADGES
   ======================================== */
.badge-count {
    font-size: 0.65rem;
    padding: 3px 7px;
}

.badge-purple {
    background: var(--purple-600);
    color: #fff;
}

/* ========================================
   9. COMPONENTS - BUTTONS
   ======================================== */
.btn:focus,
.btn:active:focus,
.btn-link.nav-link:focus,
.form-control:focus,
.form-check-input:focus {
    box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

.btn-purple {
    background: linear-gradient(135deg, var(--purple-600), var(--purple-700));
    border: none;
    color: #fff;
    font-weight: 600;
    border-radius: 10px;
    padding: 10px 20px;
    transition: all 0.2s;
}

.btn-purple:hover {
    background: linear-gradient(135deg, var(--purple-500), var(--purple-600));
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(147, 51, 234, 0.35);
}

.btn-outline-purple {
    border: 2px solid var(--purple-500);
    color: var(--purple-500);
    font-weight: 600;
    border-radius: 10px;
    background: transparent;
}

.btn-outline-purple:hover {
    background: var(--purple-500);
    color: #fff;
}

.btn-purple-auth {
    background: linear-gradient(135deg, #9333ea, #7e22ce);
    border: none;
    color: #fff;
    font-weight: 600;
    border-radius: 12px;
    padding: 12px;
    transition: all 0.3s;
}

.btn-purple-auth:hover {
    background: linear-gradient(135deg, #a855f7, #9333ea);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(147, 51, 234, 0.4);
}

.btn-glow {
    background: linear-gradient(135deg, #9333ea, #7e22ce);
    border: none;
    color: #fff;
    font-weight: 700;
    border-radius: 12px;
    padding: 14px 32px;
    transition: all 0.3s;
    font-size: 1rem;
}

.btn-glow:hover {
    background: linear-gradient(135deg, #a855f7, #9333ea);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(147, 51, 234, 0.4);
}

.btn-glow-outline {
    border: 2px solid rgba(168, 85, 247, 0.5);
    color: #c084fc;
    background: transparent;
    font-weight: 600;
    border-radius: 12px;
    padding: 12px 24px;
    transition: all 0.3s;
}

.btn-glow-outline:hover {
    border-color: #a855f7;
    background: rgba(168, 85, 247, 0.1);
    color: #e9d5ff;
}

[data-bs-theme="light"] .btn-glow-outline {
    border-color: #fff;
    color: #fff;
}

[data-bs-theme="light"] .btn-glow-outline:hover {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
}

/* ========================================
   10. COMPONENTS - THEME TOGGLE
   ======================================== */
.theme-toggle {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.6);
    cursor: pointer;
    padding: 6px;
    border-radius: 8px;
    transition: all 0.2s;
}

.theme-toggle:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
}

.theme-btn {
    background: none;
    border: 1px solid rgba(168, 85, 247, 0.3);
    color: #c084fc;
    border-radius: 8px;
    padding: 8px 12px;
    cursor: pointer;
    transition: all 0.2s;
}

.theme-btn:hover {
    background: rgba(168, 85, 247, 0.15);
    border-color: #a855f7;
}

[data-bs-theme="light"] .theme-btn {
    border-color: rgba(255, 255, 255, 0.5);
    color: #fff;
}

/* ========================================
   11. COMPONENTS - DROPDOWNS
   ======================================== */
.dropdown-toggle-no-caret::after {
    display: none;
}

.dropdown-menu {
    font-size: 0.9rem;
}

.dropdown-item {
    padding: 0.5rem 1rem;
}

.dropdown-item:hover {
    background-color: var(--hover-bg);
}

.dropdown-item i {
    width: 20px;
}

.brand .dropdown .theme-toggle {
    padding: 8px;
}

.brand .dropdown-menu {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    border-radius: 8px;
    min-width: 200px;
}

.brand .dropdown-item {
    color: var(--text-primary);
    padding: 0.6rem 1rem;
    transition: all 0.2s;
}

.brand .dropdown-item:hover {
    background: var(--hover-bg);
    color: var(--accent);
}

.brand .dropdown-divider {
    border-color: var(--border-color);
    opacity: 0.3;
}

/* ========================================
   12. COMPONENTS - TABLES
   ======================================== */
.table {
    color: var(--text-primary);
}

.table thead {
    border-bottom: 2px solid var(--border-color);
}

.table th {
    font-weight: 600;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-secondary);
}

.table td {
    vertical-align: middle;
    border-color: var(--border-color);
}

/* ========================================
   13. COMPONENTS - MODALS
   ======================================== */
.modal-content {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: 16px;
}

/* ========================================
   14. COMPONENTS - FORMS
   ======================================== */
.form-floating > .form-control-plaintext::placeholder,
.form-floating > .form-control::placeholder {
    color: var(--bs-secondary-color);
    text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder,
.form-floating > .form-control:focus::placeholder {
    text-align: start;
}

[data-bs-theme="dark"] .form-control,
[data-bs-theme="dark"] .form-select {
    background: #1a1233;
    border-color: var(--border-color);
    color: var(--text-primary);
}

[data-bs-theme="dark"] .form-control:focus,
[data-bs-theme="dark"] .form-select:focus {
    border-color: var(--purple-500);
    box-shadow: 0 0 0 3px rgba(168, 85, 247, 0.15);
}

[data-bs-theme="dark"] .list-group-item {
    background: var(--bg-surface);
    border-color: var(--border-color);
    color: var(--text-primary);
}

[data-bs-theme="kindle"] .form-control,
[data-bs-theme="kindle"] .form-select {
    background: #faf6eb;
    border-color: var(--border-color);
    color: var(--text-primary);
}

[data-bs-theme="kindle"] .form-control:focus,
[data-bs-theme="kindle"] .form-select:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-light);
}

[data-bs-theme="kindle"] .list-group-item {
    background: var(--bg-surface);
    border-color: var(--border-color);
    color: var(--text-primary);
}

/* ========================================
   15. COMPONENTS - SCROLLBAR
   ======================================== */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: var(--purple-700);
    border-radius: 3px;
}

[data-bs-theme="kindle"] ::-webkit-scrollbar-thumb {
    background: #8b6f47;
}

/* ========================================
   16. READER - SCROLL TO TOP BUTTON
   ======================================== */
.scroll-to-top {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1040;
    background: var(--accent);
    color: white;
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    opacity: 0;
    visibility: hidden;
    transform: scale(0.8);
}

.scroll-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: scale(1);
}

.scroll-to-top:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
    background: var(--accent-hover);
}

.scroll-to-top:active {
    transform: scale(0.95);
}

/* ========================================
   17. READER - ARTICLE NAVIGATION (DEPRECATED)
   ======================================== */
/* Old floating navigation buttons - kept for compatibility but hidden */
.article-nav-btn {
    display: none;
}

/* ========================================
   18. READER - MODAL IMPROVEMENTS
   ======================================== */
.article-nav-buttons .btn {
    min-width: 90px;
}

.article-action-buttons {
    flex-wrap: nowrap;
}

#articleModal .modal-footer {
    padding: 1rem;
    background: var(--bg-body);
    border-top: 1px solid var(--border-color);
}

#articleModal .modal-body {
    padding: 1.5rem;
    font-size: 1rem;
    line-height: 1.7;
}

#articleModal .modal-body img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 1rem 0;
}

/* Touch indicator for swipe gesture on mobile */
@media (max-width: 768px) {
    #articleModal .modal-body {
        position: relative;
        padding-bottom: 2rem;
    }

    #articleModal .modal-body::after {
        content: '← Deslize para navegar →';
        display: block;
        text-align: center;
        font-size: 0.75rem;
        color: var(--text-secondary);
        opacity: 0.5;
        padding: 1rem 0 0;
        margin-top: 2rem;
        border-top: 1px solid var(--border-color);
    }
}

/* ========================================
   19. READER - PWA INSTALL POPUP
   ======================================== */
.pwa-install-popup {
    border-radius: 16px !important;
}

.pwa-install-content {
    text-align: left !important;
}

.pwa-install-content ol {
    padding-left: 20px;
    margin: 0;
}

.pwa-install-content li {
    margin-bottom: 8px;
}

.pwa-install-content ul {
    list-style-type: disc;
    padding-left: 20px;
}

/* ========================================
   18. HOME PAGE (LANDING)
   ======================================== */
[data-bs-theme="dark"] body.landing-page {
    background: #0a0614;
    overflow-x: hidden;
}

[data-bs-theme="light"] body.landing-page {
    background: #faf8ff;
    overflow-x: hidden;
}

[data-bs-theme="dark"] .hero-section {
    background: radial-gradient(ellipse at top center, rgba(147, 51, 234, 0.2) 0%, transparent 60%),
        linear-gradient(180deg, #0f0a1e 0%, #1a0f3c 50%, #0f0a1e 100%);
}

[data-bs-theme="dark"] .features-section {
    background: #0d0820;
}

[data-bs-theme="dark"] .plans-section {
    background: #0f0a1e;
}

[data-bs-theme="dark"] .feature-card {
    background: rgba(26, 18, 51, 0.8);
    border: 1px solid rgba(168, 85, 247, 0.15);
}

[data-bs-theme="dark"] .feature-card:hover {
    border-color: rgba(168, 85, 247, 0.4);
    box-shadow: 0 8px 30px rgba(147, 51, 234, 0.15);
}

[data-bs-theme="dark"] .plan-card {
    background: rgba(26, 18, 51, 0.9);
    border: 1px solid rgba(168, 85, 247, 0.2);
}

[data-bs-theme="dark"] .plan-card.featured {
    border-color: #a855f7;
    box-shadow: 0 0 40px rgba(147, 51, 234, 0.2);
}

[data-bs-theme="dark"] .plan-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 50px rgba(147, 51, 234, 0.2);
}

[data-bs-theme="dark"] footer {
    background: #080510;
    border-top: 1px solid rgba(168, 85, 247, 0.1);
}

[data-bs-theme="light"] .hero-section {
    background: linear-gradient(135deg, #7e22ce 0%, #9333ea 40%, #a855f7 100%);
}

[data-bs-theme="light"] .hero-section * {
    color: #fff !important;
}

[data-bs-theme="light"] .features-section {
    background: #fff;
}

[data-bs-theme="light"] .plans-section {
    background: #f9f5ff;
}

[data-bs-theme="light"] .feature-card {
    background: #fff;
    border: 1px solid #e9d5ff;
    box-shadow: 0 4px 15px rgba(88, 28, 135, 0.06);
}

[data-bs-theme="light"] .feature-card:hover {
    border-color: #c084fc;
    box-shadow: 0 8px 30px rgba(88, 28, 135, 0.1);
}

[data-bs-theme="light"] .plan-card {
    background: #fff;
    border: 1px solid #e9d5ff;
}

[data-bs-theme="light"] .plan-card.featured {
    border-color: #9333ea;
    box-shadow: 0 8px 40px rgba(147, 51, 234, 0.15);
}

[data-bs-theme="light"] .plan-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(88, 28, 135, 0.12);
}

[data-bs-theme="light"] footer {
    background: #1a0f3c;
}

[data-bs-theme="light"] .text-muted {
    color: #6b21a8 !important;
    opacity: 0.7;
}

.hero-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
}

.hero-section::before {
    content: '';
    position: absolute;
    width: 500px;
    height: 500px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(168, 85, 247, 0.12), transparent 70%);
    top: -150px;
    right: -100px;
    pointer-events: none;
}

.hero-section h1 {
    font-size: 4rem;
    font-weight: 900;
    line-height: 1.1;
}

.hero-section h1 span {
    background: linear-gradient(135deg, #c084fc, #a855f7, #7e22ce);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

[data-bs-theme="light"] .hero-section h1 span {
    -webkit-text-fill-color: #fff;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.hero-section p {
    font-size: 1.2rem;
    max-width: 550px;
}

.navbar-landing {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 9999;
    padding: 18px 0;
    transition: all 0.3s;
}

.navbar-landing.scrolled {
    padding: 10px 0;
    backdrop-filter: blur(12px);
}

[data-bs-theme="dark"] .navbar-landing.scrolled {
    background: rgba(15, 10, 30, 0.9) !important;
    border-bottom: 1px solid rgba(168, 85, 247, 0.15);
}

[data-bs-theme="light"] .navbar-landing.scrolled {
    background: rgba(255, 255, 255, 0.95) !important;
    border-bottom: 1px solid #e9d5ff;
}

.feature-card {
    border-radius: 16px;
    padding: 32px 24px;
    transition: all 0.3s;
    text-align: center;
}

.feature-icon-circle {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    font-size: 1.5rem;
    background: linear-gradient(135deg, rgba(168, 85, 247, 0.2), rgba(147, 51, 234, 0.1));
    color: #c084fc;
}

.plan-card {
    border-radius: 20px;
    padding: 36px 28px;
    text-align: center;
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
}

.plan-card.featured::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #9333ea, #c084fc, #9333ea);
}

.plan-price {
    font-size: 3rem;
    font-weight: 900;
    background: linear-gradient(135deg, #a855f7, #7e22ce);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.plan-features li {
    padding: 8px 0;
    border-bottom: 1px solid rgba(168, 85, 247, 0.1);
}

.plan-features li:last-child {
    border: none;
}

/* ========================================
   19. AUTH PAGES (LOGIN / REGISTER)
   ======================================== */
[data-bs-theme="dark"] body.auth-page {
    background: linear-gradient(135deg, #1a0f3c 0%, #0d0720 50%, #1a0533 100%);
    min-height: 100vh;
}

[data-bs-theme="light"] body.auth-page {
    background: linear-gradient(135deg, #f3e8ff 0%, #e9d5ff 50%, #faf5ff 100%);
    min-height: 100vh;
}

[data-bs-theme="dark"] .auth-card {
    background: rgba(26, 18, 51, 0.9);
    backdrop-filter: blur(20px);
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.5), 0 0 80px rgba(147, 51, 234, 0.1);
    color: #f1eef9;
}

[data-bs-theme="light"] .auth-card {
    background: #fff;
    box-shadow: 0 25px 60px rgba(88, 28, 135, 0.12);
    color: #1a1a2e;
}

.auth-card {
    max-width: 460px;
    margin: 70px auto;
    border-radius: 20px;
    border: 1px solid rgba(168, 85, 247, 0.2);
}

[data-bs-theme="dark"] .form-control {
    background: rgba(15, 10, 30, 0.8);
    border: 1px solid rgba(168, 85, 247, 0.3);
    color: #f1eef9;
}

[data-bs-theme="dark"] .form-control:focus {
    border-color: #a855f7;
    box-shadow: 0 0 0 3px rgba(168, 85, 247, 0.2);
    background: rgba(15, 10, 30, 0.9);
    color: #fff;
}

[data-bs-theme="dark"] .input-group-text {
    background: rgba(168, 85, 247, 0.15);
    border-color: rgba(168, 85, 247, 0.3);
    color: #c084fc;
}

.auth-brand {
    color: #c084fc;
}

[data-bs-theme="dark"] a {
    color: #c084fc;
}

[data-bs-theme="dark"] a:hover {
    color: #e9d5ff;
}

[data-bs-theme="dark"] .form-label {
    color: #e2d8f0;
}

[data-bs-theme="dark"] .text-muted {
    color: #a89bc2 !important;
}

[data-bs-theme="light"] .form-control {
    border-color: #d8b4fe;
}

[data-bs-theme="light"] .form-control:focus {
    border-color: #a855f7;
    box-shadow: 0 0 0 3px rgba(168, 85, 247, 0.15);
}

[data-bs-theme="light"] .input-group-text {
    background: #f3e8ff;
    border-color: #d8b4fe;
    color: #7e22ce;
}

.glow-dot {
    position: fixed;
    width: 300px;
    height: 300px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(147, 51, 234, 0.15), transparent 70%);
    pointer-events: none;
}

/* ========================================
   20. PAYMENTS PAGE
   ======================================== */
.payment-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

.payment-card {
    background: var(--bg-surface);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1rem;
    border: 1px solid var(--border-color);
    box-shadow: var(--card-shadow);
    transition: transform 0.2s, box-shadow 0.2s;
}

.payment-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(88, 28, 135, 0.15);
}

.status-badge {
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
}

.status-paid {
    background: #10b981;
    color: white;
}

.status-pending {
    background: #f59e0b;
    color: white;
}

.status-overdue {
    background: #ef4444;
    color: white;
}

.status-cancelled {
    background: #6b7280;
    color: white;
}

.alert-suspended {
    background: linear-gradient(135deg, #dc2626 0%, #991b1b 100%);
    color: white;
    border: none;
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.plan-info-card {
    background: linear-gradient(135deg, var(--purple-600) 0%, var(--purple-800) 100%);
    color: white;
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 2rem;
}

.pix-info-card {
    background: var(--bg-surface);
    border-radius: 12px;
    padding: 1rem 1.5rem;
    margin-bottom: 1.5rem;
    border: 1px solid var(--border-color);
    box-shadow: var(--card-shadow);
    transition: all 0.3s ease;
}

.pix-info-card.expanded {
    padding: 1.5rem;
}

.pix-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    user-select: none;
}

.pix-header:hover {
    opacity: 0.8;
}

.pix-details {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 1rem;
    margin-top: 1rem;
    display: none;
}

.pix-details.show {
    display: block;
}

.pix-copy-btn {
    background: var(--purple-600);
    border: none;
    color: white;
    transition: all 0.2s;
}

.pix-copy-btn:hover {
    background: var(--purple-700);
    color: white;
}

.expand-icon {
    transition: transform 0.3s ease;
}

.expand-icon.rotated {
    transform: rotate(180deg);
}

/* ========================================
   21. MOBILE RESPONSIVE
   ======================================== */
@media (max-width: 992px) {
    /* Scroll to top button adjustments */
    .scroll-to-top {
        width: 45px;
        height: 45px;
        bottom: 15px;
        right: 15px;
        font-size: 1rem;
    }
}

@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .sidebar {
        transform: translateX(-100%);
    }

    .sidebar.active {
        transform: translateX(0);
    }

    .sidebar-overlay.active {
        display: block;
    }

    .main-content {
        margin-left: 0;
        padding: 80px 16px 20px;
    }

    .card-stat {
        margin-bottom: 1rem;
    }

    .d-flex.justify-content-between.align-items-center {
        flex-direction: column;
        align-items: flex-start !important;
        gap: 0.75rem;
    }

    .d-flex.justify-content-between.align-items-center > * {
        width: 100%;
    }

    .d-flex.justify-content-between.align-items-center .btn,
    .d-flex.justify-content-between.align-items-center a.btn {
        width: 100%;
        justify-content: center;
    }

    .table-responsive {
        overflow-x: auto;
    }

    .table {
        font-size: 0.85rem;
    }

    .modal-dialog {
        margin: 0.5rem;
        max-width: calc(100% - 1rem);
    }

    .feed-item {
        padding: 10px 12px;
    }

    .feed-item h6 {
        font-size: 0.9rem;
    }

    .feed-item-thumb,
    .feed-item-thumb-placeholder {
        width: 60px !important;
        height: 45px !important;
    }

    .payment-card .row {
        flex-direction: column;
    }

    .payment-card .col-md-3,
    .payment-card .col-md-2 {
        margin-bottom: 0.5rem;
    }

    .payment-card .text-end {
        text-align: left !important;
    }

    .hero-section {
        min-height: 80vh;
        padding-top: 100px;
    }

    .hero-section h1 {
        font-size: 2.5rem;
    }

    /* Modal footer improvements for mobile */
    #articleModal .modal-footer {
        flex-direction: column;
        gap: 0.75rem;
        align-items: stretch !important;
    }

    #articleModal .article-nav-buttons,
    #articleModal .article-action-buttons {
        width: 100%;
        justify-content: space-between;
    }

    #articleModal .article-nav-buttons .btn,
    #articleModal .article-action-buttons .btn,
    #articleModal .article-action-buttons a {
        flex: 1;
    }

    /* Scroll to top button on mobile */
    .scroll-to-top {
        width: 44px;
        height: 44px;
        bottom: 20px;
        right: 16px;
        font-size: 1rem;
    }
}

@media (max-width: 576px) {
    .main-content {
        padding: 70px 12px 16px;
    }

    .sidebar .brand {
        padding: 18px 16px;
        font-size: 1.1rem;
    }

    .sidebar .nav-link {
        padding: 10px 14px;
        margin: 2px 8px;
        font-size: 0.85rem;
    }

    h2,
    h4 {
        font-size: 1.25rem;
    }

    .card-stat h3 {
        font-size: 1.5rem;
    }

    /* Compact modal buttons on small screens */
    #articleModal .article-nav-buttons .btn,
    #articleModal .article-action-buttons .btn,
    #articleModal .article-action-buttons a {
        font-size: 0.85rem;
        padding: 0.5rem 0.75rem;
    }

    #articleModal .modal-header h5 {
        font-size: 1rem;
        line-height: 1.3;
    }

    #articleModal .modal-body {
        padding: 1rem;
        font-size: 0.95rem;
    }

    /* Scroll to top button on very small screens */
    .scroll-to-top {
        width: 42px;
        height: 42px;
        bottom: 15px;
        right: 12px;
        font-size: 0.95rem;
    }
}