/* GLOBAL */
body {
    background: #fafaf7;
    font-family: 'Inter', sans-serif;
    color: #1f2937;
}

/* HERO */
.hero-section {
    /* background: linear-gradient(180deg, #f7f3e8, #ffffff); */
}

.hero-logo {
    max-width: 30%;
}

.hero-title {
    font-family: 'Baloo 2', cursive;
    font-size: 2.5rem;
}

.hero-subtitle {
    max-width: 520px;
    margin: 0 auto;
    color: #6b7280;
}

/* ═══════════════════════════════
   HEADER & NAV
═══════════════════════════════ */

.site-header {
    background: linear-gradient(135deg, #5DEDC6 0%, #33C9A8 100%);
    padding: 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 4px 20px rgba(102, 126, 234, 0.35);
}

.header-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0;
}

.site-title {
    font-family: 'Fredoka', cursive;
    font-size: 1.6rem;
    color: white;
    margin: 0;
    text-decoration: none;
    letter-spacing: 0.3px;
}

.site-title:hover {
    color: rgba(255,255,255,0.9);
    text-decoration: none;
}

.header-logo {
    height: 36px;
    filter: brightness(0) invert(1);
}

/* Mobile hamburger */
.nav-toggle {
    display: none;
    background: rgba(255,255,255,0.15);
    border: 1px solid rgba(255,255,255,0.3);
    border-radius: 8px;
    padding: 0.4rem 0.65rem;
    cursor: pointer;
    color: white;
    font-size: 1.2rem;
    line-height: 1;
    transition: background 0.2s;
}

.nav-toggle:hover {
    background: rgba(255,255,255,0.25);
}

/* Folder Nav Container */
.folder-nav {
    padding: 0;
    position: relative;
    z-index: 1;
    overflow-x: auto;
    scrollbar-width: none;
}

.folder-nav::-webkit-scrollbar {
    display: none;
}

/* Bookmarks Layout */
.bookmarks {
    list-style: none;
    display: flex;
    gap: 6px;
    margin: 0;
    padding: 0.5rem 1rem 0;
    flex-wrap: nowrap;
    align-items: flex-end;
}

.bookmark {
    flex-shrink: 0;
}

.bookmark > a {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.55rem 1.1rem;
    font-weight: 600;
    font-size: 0.88rem;
    text-decoration: none;
    color: #1f2937;
    border-radius: 10px 10px 0 0;
    background: var(--tab-bg, #f3f4f6);
    transition: margin-top 0.15s ease, filter 0.15s ease;
    white-space: nowrap;
    margin-top: 18px;
}

.bookmark > a:hover {
    margin-top: 4px;
    color: #111827;
    text-decoration: none;
}

.bookmark.active > a {
    margin-top: 0;
    padding-top: 0.8rem;
    font-weight: 700;
    color: #111827;
    box-shadow: 0 -4px 14px rgba(0,0,0,0.12);
}

/* More dropdown tab */
.bookmark-more {
    position: relative;
}

.more-tab-btn {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.55rem 1.1rem;
    font-weight: 600;
    font-size: 0.88rem;
    color: #1f2937;
    background: #f3f4f6;
    border: none;
    border-radius: 10px 10px 0 0;
    cursor: pointer;
    white-space: nowrap;
    font-family: inherit;
    margin-top: 18px;
    transition: margin-top 0.15s ease;
}

.more-tab-btn:hover {
    margin-top: 4px;
}

.bookmark-more.active .more-tab-btn {
    margin-top: 0;
    padding-top: 0.8rem;
    font-weight: 700;
    box-shadow: 0 -4px 14px rgba(0,0,0,0.12);
}

.bookmark-more-dropdown {
    display: none;
    position: fixed;
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.13);
    min-width: 190px;
    z-index: 2000;
    padding: 0.4rem;
    list-style: none;
    margin: 0;
}

.bookmark-more.open .bookmark-more-dropdown { display: block; }

.bookmark-more-dropdown li a {
    display: block;
    padding: 0.55rem 1rem;
    color: #1f2937;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.88rem;
    border-radius: 8px;
}

.bookmark-more-dropdown li a:hover { background: #f3f4f6; }

/* Tab colour palette — matches action-card colours */
.bookmark.brown  { --tab-bg: #e7cba0; }
.bookmark.blue   { --tab-bg: #dbeafe; }
.bookmark.green  { --tab-bg: #d1fae5; }
.bookmark.purple { --tab-bg: #ede9fe; }
.bookmark.teal   { --tab-bg: #ccfbf1; }
.bookmark.pink   { --tab-bg: #fce7f3; }
.bookmark.orange { --tab-bg: #ffedd5; }
.bookmark.white  { --tab-bg: #ffffff; }

/* Responsive — collapse to hamburger on mobile */
@media (max-width: 768px) {
    .nav-toggle {
        display: block;
    }

    .folder-nav {
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
    }

    .folder-nav.open {
        max-height: 400px;
        overflow-y: auto;
        padding-bottom: 0.5rem;
    }

    .bookmarks {
        flex-direction: column;
        padding: 0.5rem;
        gap: 4px;
        align-items: stretch;
    }

    .bookmark > a {
        border-radius: 10px;
        margin-top: 0;
        padding: 0.65rem 1rem;
    }

    .bookmark.active > a {
        margin-top: 0;
        padding-top: 0.65rem;
    }
}

/* ═══════════════════════════════
   MAIN CONTENT
═══════════════════════════════ */

.main-content {
    padding-top: 2rem;
    padding-bottom: 3rem;
}

.btn-primary {
    background-color: #5DEDC6 !important;
    border-color: #5DEDC6 !important;
}

.btn-primary:hover {
    background-color: #5a6fd6 !important;
    border-color: #5a6fd6 !important;
}

/* ═══════════════════════════════
   SECTION TITLES
═══════════════════════════════ */

.section-title {
    font-family: 'Fredoka', cursive;
    font-size: 2rem;
    font-weight: 700;
    color: #1e293b;
}

/* ═══════════════════════════════
   QUICK ACTIONS
═══════════════════════════════ */

.quick-actions {
    background: #f9fafb;
}

.action-card {
    border-radius: 18px;
    padding: 1.5rem;
    color: #222;
    height: 100%;
    cursor: pointer;
    transition: transform .2s ease, box-shadow .2s ease;
    box-shadow: 0 10px 20px rgba(0,0,0,0.08);
    text-decoration: none !important;
    display: block;
}

.action-card h3 {
    font-family: 'Fredoka', cursive;
    font-size: 1.25rem;
    margin-bottom: .5rem;
    color: #1e293b;
}

.action-card p {
    margin: 0;
    font-size: .95rem;
    color: #475569;
}

.action-card:hover {
    transform: translateY(-6px) scale(1.02);
    box-shadow: 0 18px 30px rgba(0,0,0,0.12);
    color: #222 !important;
}

/* Colour variants */
.action-card.brown  { background: #e6d3a3; }
.action-card.blue   { background: #dbeafe; }
.action-card.green  { background: #dcfce7; }
.action-card.purple { background: #ede9fe; }
.action-card.teal   { background: #ccfbf1; }
.action-card.pink   { background: #fce7f3; }
.action-card.orange { background: #ffedd5; }

/* ═══════════════════════════════
   LEARNING PATHS / CAROUSEL
═══════════════════════════════ */

.learning-paths {
    background: #f9fafb;
}

.path-card {
    background: white;
    border-radius: 16px;
    padding: 1.25rem;
    height: 100%;
    box-shadow: 0 10px 20px rgba(0,0,0,0.08);
    transition: transform .2s ease, box-shadow .2s ease;
}

.path-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 16px 28px rgba(0,0,0,0.12);
}

.path-card h4 {
    font-family: 'Fredoka', cursive;
    margin-top: 0.75rem;
}

.carousel-control-prev,
.carousel-control-next {
    width: 5%;
}

.carousel-control-prev-icon,
.carousel-control-next-icon {
    background-color: #1f2937;
    border-radius: 50%;
    padding: 12px;
}

#learningPathCarousel {
    position: relative;
    padding: 0 60px;
}

#learningPathCarousel .carousel-control-prev {
    left: -60px;
}

#learningPathCarousel .carousel-control-next {
    right: -60px;
}

#learningPathCarousel .carousel-control-prev-icon,
#learningPathCarousel .carousel-control-next-icon {
    background-color: rgba(0, 0, 0, 0.5);
    border-radius: 50%;
    padding: 20px;
}

#learningPathCarousel .carousel-inner {
    min-height: 250px;
}

/* ═══════════════════════════════
   ENCOURAGEMENT
═══════════════════════════════ */

.encouragement-section {
    background: linear-gradient(180deg, #fff7ed, #ffffff);
}

/* ═══════════════════════════════
   FOOTER
═══════════════════════════════ */

.footer {
    background: #f3f4f6;
    padding: 1rem 0;
    font-size: 0.9rem;
    text-align: center;
    color: #6b7280;
}

/* ═══════════════════════════════
   SECTION PAGE (Section.cshtml)
═══════════════════════════════ */

/* ─── Topic Page Shared Styles ─── */

.topic-hero {
    background: linear-gradient(135deg, var(--topic-color) 0%, #33C9A8 100%);
    color: white;
    padding: 4rem 0 3rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.topic-hero-emoji {
    position: absolute;
    right: 8%;
    top: 50%;
    transform: translateY(-55%);
    opacity: 0.12;
    pointer-events: none;
    line-height: 1;
    z-index: 0;
    font-size: 12rem;
}

.topic-hero .container {
    position: relative;
    z-index: 1;
}

.topic-hero h1,
.topic-hero p {
    position: relative;
    z-index: 1;
}

/* ─── Breadcrumb ─── */

.breadcrumb-section {
    background: var(--topic-color-light);
    padding: 0.6rem 0;
    border-bottom: 1px solid var(--topic-color-mid);
}

.breadcrumb {
    margin: 0;
    padding: 0;
    background: none;
}

.breadcrumb-item a {
    color: var(--topic-color);
    text-decoration: none;
    font-size: 0.9rem;
}

.breadcrumb-item a:hover {
    text-decoration: underline;
}

.breadcrumb-item.active {
    color: #64748b;
    font-size: 0.9rem;
}

.breadcrumb-item + .breadcrumb-item::before {
    color: #94a3b8;
}

/* ─── Page Layout ─── */

.topic-content {
    padding: 2rem 0;
}

/* ─── Inline Add Subsection Panel ─── */

.add-subsection-bar {
    margin-bottom: 2rem;
}

.add-subsection-toggle {
    padding: 0.7rem 1.5rem;
    background: var(--topic-color);
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
    font-size: 1rem;
}

.add-subsection-toggle:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.add-subsection-panel {
    display: none;
    background: white;
    border: 2px solid var(--topic-color-mid);
    border-radius: 12px;
    padding: 1.5rem;
    margin-top: 1rem;
    box-shadow: 0 4px 15px rgba(0,0,0,0.07);
}

.add-subsection-panel.show {
    display: block;
    animation: slideDown 0.2s ease;
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-8px); }
    to   { opacity: 1; transform: translateY(0); }
}

.add-subsection-panel h5 {
    margin: 0 0 1rem;
    color: #1e293b;
    font-weight: 700;
}

.add-subsection-input {
    flex: 1;
    padding: 0.6rem 1rem;
    border: 2px solid var(--topic-color-mid);
    border-radius: 8px;
    font-size: 1rem;
    outline: none;
    transition: border-color 0.2s;
}

.add-subsection-input:focus {
    border-color: var(--topic-color);
}

.btn-panel-submit {
    padding: 0.6rem 1.4rem;
    background: var(--topic-color);
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-panel-submit:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

.btn-panel-cancel {
    padding: 0.6rem 1.2rem;
    background: #e2e8f0;
    color: #475569;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-panel-cancel:hover {
    background: #cbd5e1;
}

/* ─── Subsection Accordion ─── */

.subsection-accordion {
    margin-bottom: 1.5rem;
}

.subsection-header {
    background: white;
    border: 2px solid var(--topic-color-mid);
    border-radius: 12px;
    padding: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    user-select: none;
}

.subsection-header:hover {
    background: var(--topic-color-light);
    border-color: var(--topic-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.subsection-header.active {
    background: var(--topic-color-light);
    border-color: var(--topic-color);
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
}

.subsection-title {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 1.3rem;
    font-weight: 700;
    color: #1e293b;
    margin: 0;
}

.subsection-emoji {
    font-size: 2rem;
}

.subsection-count {
    background: var(--topic-color);
    color: white;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

.subsection-header-right {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.subsection-admin-btns {
    display: flex;
    gap: 0.4rem;
}

.btn-subsection-admin {
    padding: 0.3rem 0.7rem;
    border-radius: 6px;
    font-size: 0.78rem;
    font-weight: 600;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
}

.btn-subsection-edit {
    background: #e0f2fe;
    color: #0369a1;
}

.btn-subsection-edit:hover {
    background: #bae6fd;
    color: #0369a1;
    text-decoration: none;
}

.btn-subsection-delete {
    background: #fee2e2;
    color: #dc2626;
}

.btn-subsection-delete:hover {
    background: #fecaca;
    color: #dc2626;
}

.subsection-toggle {
    font-size: 1.5rem;
    color: var(--topic-color);
    transition: transform 0.3s ease;
}

.subsection-header.active .subsection-toggle {
    transform: rotate(180deg);
}

.subsection-content {
    background: white;
    border: 2px solid var(--topic-color-mid);
    border-top: none;
    border-bottom-left-radius: 12px;
    border-bottom-right-radius: 12px;
    padding: 1.5rem;
    display: none;
}

.subsection-content.show {
    display: block;
}

/* ─── Article List within Subsection ─── */

.article-item {
    background: #f9fafb;
    border-left: 4px solid var(--topic-color);
    border-radius: 8px;
    padding: 1.2rem;
    margin-bottom: 1rem;
    transition: all 0.3s ease;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: grab;
}

.article-item:active {
    cursor: grabbing;
}

.article-item:hover {
    background: var(--topic-color-light);
    transform: translateX(5px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.article-info {
    flex: 1;
}

.article-title-link {
    font-size: 1.1rem;
    font-weight: 600;
    color: #1e293b;
    text-decoration: none;
    display: block;
    margin-bottom: 0.5rem;
}

.article-title-link:hover {
    color: var(--topic-color);
}

.article-meta {
    font-size: 0.85rem;
    color: #64748b;
}

.article-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
}

.btn-read-small {
    padding: 0.5rem 1.2rem;
    background: linear-gradient(135deg, var(--topic-color), #33C9A8);
    color: white;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.85rem;
    text-decoration: none;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.btn-read-small:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    color: white;
    text-decoration: none;
}

.btn-article-admin {
    padding: 0.3rem 0.6rem;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    white-space: nowrap;
}

.btn-article-edit {
    background: #e0f2fe;
    color: #0369a1;
}

.btn-article-edit:hover {
    background: #bae6fd;
    color: #0369a1;
    text-decoration: none;
}

.btn-article-delete {
    background: #fee2e2;
    color: #dc2626;
}

.btn-article-delete:hover {
    background: #fecaca;
    color: #dc2626;
}

.sub-drag-handle {
    color: #cbd5e1;
    font-size: 1.2rem;
    cursor: grab;
    padding: 0 0.75rem 0 0;
    flex-shrink: 0;
    transition: color 0.2s;
}

.sub-drag-handle:hover { color: var(--topic-color); }
.sub-drag-handle:active { cursor: grabbing; }

.drag-handle {
    color: #cbd5e1;
    font-size: 1.1rem;
    cursor: grab;
    padding: 0 0.5rem 0 0;
    flex-shrink: 0;
}

.drag-handle:hover { color: var(--topic-color); }
.drag-handle:active { cursor: grabbing; }

.sortable-ghost { opacity: 0.35; }
.sortable-ghost .subsection-header,
.sortable-ghost .article-item { background: var(--topic-color-light) !important; }

/* ─── Sidebar ─── */

.progress-card {
    background: var(--topic-color-light);
    border: 2px solid var(--topic-color-mid);
    border-radius: 15px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.progress-card h3 {
    font-size: 1rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.progress-bar-track {
    height: 8px;
    background: rgba(0,0,0,0.1);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 0.4rem;
}

.progress-bar-fill {
    height: 100%;
    background: var(--topic-color);
    border-radius: 4px;
    width: 0%;
    transition: width 0.4s ease;
}

.progress-count {
    font-size: 0.8rem;
    color: #64748b;
    text-align: right;
    margin-bottom: 0.75rem;
}

.progress-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
    cursor: pointer;
}

.progress-item:last-child { margin-bottom: 0; }

.progress-checkbox {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 2px solid var(--topic-color);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.2s ease;
}

.progress-checkbox.done {
    background: var(--topic-color);
    color: white;
    font-size: 0.7rem;
}

.progress-label {
    font-size: 0.9rem;
    color: #475569;
}

.progress-label.done {
    text-decoration: line-through;
    color: #94a3b8;
}

.article-item.article-read .article-title-link {
    color: #94a3b8;
}

.article-read-badge {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--topic-color);
    flex-shrink: 0;
    margin-left: 0.25rem;
}

.tips-card {
    background: white;
    border-radius: 15px;
    padding: 1.5rem;
    box-shadow: 0 4px 15px rgba(0,0,0,0.07);
    margin-bottom: 1.5rem;
}

.tips-card h3 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 1.2rem;
    color: #1e293b;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.tip-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.75rem 0;
    border-bottom: 1px solid #f1f5f9;
}

.tip-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.tip-item .tip-icon {
    font-size: 1.2rem;
    line-height: 1;
    flex-shrink: 0;
    margin-top: 0.1rem;
}

.tip-item p {
    margin: 0;
    font-size: 0.9rem;
    color: #475569;
    line-height: 1.5;
    flex: 1;
}

.btn-sidebar-add {
    background: none;
    border: 2px dashed #cbd5e1;
    border-radius: 8px;
    color: #94a3b8;
    font-size: 1.1rem;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    padding: 0;
    line-height: 1;
}

.btn-sidebar-add:hover {
    border-color: var(--topic-color);
    color: var(--topic-color);
}

.btn-tip-delete {
    background: none;
    border: none;
    color: #cbd5e1;
    font-size: 1.1rem;
    cursor: pointer;
    padding: 0;
    line-height: 1;
    flex-shrink: 0;
    transition: color 0.15s ease;
}

.btn-tip-delete:hover { color: #ef4444; }

/* ─── Empty States ─── */

.empty-subsections {
    background: white;
    border-radius: 15px;
    padding: 4rem 2rem;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0,0,0,0.07);
}

.empty-subsections-emoji {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.empty-articles {
    text-align: center;
    padding: 2rem;
    color: #94a3b8;
    font-style: italic;
}

/* ═══════════════════════════════
   HOME PAGE (Index.cshtml)
═══════════════════════════════ */

/* ── Hero ── */
.hero-section {
    background: linear-gradient(135deg, #5DEDC6 0%, #33C9A8 100%);
    color: white;
    padding: 1.2rem 0 0 0;
    position: relative;
    overflow: hidden;
}

/* Floating blobs */
.hero-section::before {
    content: '';
    position: absolute;
    width: 400px;
    height: 400px;
    background: rgba(255,255,255,0.06);
    border-radius: 50%;
    top: -120px;
    right: -80px;
    pointer-events: none;
}

.hero-section::after {
    content: '';
    position: absolute;
    width: 250px;
    height: 250px;
    background: rgba(255,255,255,0.05);
    border-radius: 50%;
    bottom: 40px;
    left: -60px;
    pointer-events: none;
}

.hero-inner {
    position: relative;
    z-index: 1;
    padding-bottom: 0.8rem;
}

/* Floating emoji decorations */
.hero-floaties {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.hero-floaties span {
    position: absolute;
    font-size: 2rem;
    opacity: 0.85;
    animation: float 6s ease-in-out infinite;
}

.hero-floaties span:nth-child(1)  { top: 10%; left: 5%;   animation-delay: 0s;    font-size: 2.2rem; }
.hero-floaties span:nth-child(2)  { top: 20%; right: 8%;  animation-delay: 1s;    font-size: 1.8rem; }
.hero-floaties span:nth-child(3)  { top: 60%; left: 3%;   animation-delay: 2s;    font-size: 2.5rem; }
.hero-floaties span:nth-child(4)  { top: 70%; right: 5%;  animation-delay: 0.5s;  font-size: 1.6rem; }
.hero-floaties span:nth-child(5)  { top: 40%; left: 12%;  animation-delay: 1.5s;  font-size: 1.4rem; }
.hero-floaties span:nth-child(6)  { top: 15%; right: 20%; animation-delay: 2.5s;  font-size: 2rem;   }
.hero-floaties span:nth-child(7)  { top: 80%; left: 20%;  animation-delay: 3s;    font-size: 1.7rem; }
.hero-floaties span:nth-child(8)  { top: 50%; right: 12%; animation-delay: 0.8s;  font-size: 2.2rem; }

@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50%       { transform: translateY(-18px) rotate(8deg); }
}

.hero-logo {
    max-width: 480px;
    width: 90%;
    mix-blend-mode: screen;
}

@keyframes logoBounce {
    0%, 100% { transform: translateY(0); }
    50%       { transform: translateY(-8px); }
}

.hero-headline {
    font-size: clamp(1.8rem, 4vw, 2.8rem);
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 1rem;
}

.hero-headline .highlight {
    background: rgba(255,255,255,0.2);
    border-radius: 8px;
    padding: 0 0.4rem;
    display: inline-block;
}

.hero-subtitle {
    font-size: 1.15rem;
    opacity: 0.9;
    max-width: 500px;
    margin: 0 auto 1.75rem;
    line-height: 1.65;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.btn-hero-primary {
    background: white;
    color: #5DEDC6;
    border: none;
    font-weight: 700;
    padding: 0.85rem 2.2rem;
    border-radius: 50px;
    font-size: 1rem;
    text-decoration: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    display: inline-block;
}

.btn-hero-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.2);
    color: #5DEDC6;
    text-decoration: none;
}

.btn-hero-secondary {
    background: rgba(255,255,255,0.15);
    color: white;
    border: 2px solid rgba(255,255,255,0.4);
    font-weight: 600;
    padding: 0.85rem 2.2rem;
    border-radius: 50px;
    font-size: 1rem;
    text-decoration: none;
    transition: all 0.2s ease;
    display: inline-block;
    backdrop-filter: blur(4px);
}

.btn-hero-secondary:hover {
    background: rgba(255,255,255,0.25);
    border-color: white;
    color: white;
    text-decoration: none;
    transform: translateY(-3px);
}

/* Wave divider at bottom of hero */
.hero-wave {
    display: block;
    width: 100%;
    margin-bottom: -2px;
    line-height: 0;
}

.hero-wave svg {
    width: 100%;
    height: 60px;
}

/* ── Section titles ── */
.section-title {
    font-size: 1.9rem;
    font-weight: 800;
    color: #1e293b;
    margin-bottom: 0.5rem;
}

.section-subtitle {
    color: #64748b;
    font-size: 1rem;
    margin-bottom: 2rem;
}

/* ── Action cards (topic cards) ── */
.action-card {
    border-radius: 16px;
    padding: 1.75rem 1.5rem;
    height: 100%;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
    text-decoration: none !important;
    display: block;
    color: inherit !important;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    position: relative;
    overflow: hidden;
}

.action-card::after {
    content: '→';
    position: absolute;
    bottom: 1.25rem;
    right: 1.25rem;
    font-size: 1.1rem;
    opacity: 0;
    transform: translateX(-5px);
    transition: all 0.25s ease;
    font-weight: 700;
}

.action-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 30px rgba(0,0,0,0.12);
    text-decoration: none !important;
    color: inherit !important;
}

.action-card:hover::after {
    opacity: 1;
    transform: translateX(0);
}

.action-card h3 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: #1e293b;
}

.action-card p {
    font-size: 0.9rem;
    color: #475569;
    margin: 0;
    line-height: 1.5;
}

/* ── Learning paths section ── */
.learning-paths {
    background: #f8f9fa;
}

.path-card {
    background: white;
    border-radius: 14px;
    padding: 1.5rem;
    box-shadow: 0 2px 12px rgba(0,0,0,0.07);
    height: 100%;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
}

.path-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.11);
}

.path-card h4 {
    font-size: 1.05rem;
    font-weight: 700;
    margin: 0.75rem 0 0.4rem;
    color: #1e293b;
    overflow-wrap: break-word;
    word-break: break-word;
}

.path-card p {
    font-size: 0.9rem;
    color: #64748b;
    margin: 0;
    overflow-wrap: break-word;
    word-break: break-word;
}

/* Carousel controls */
.carousel-wrapper {
    position: relative;
    padding: 0 60px;
}

#learningPathCarousel .carousel-control-prev,
#learningPathCarousel .carousel-control-next {
    width: 40px;
    height: 40px;
    background: none;
    top: 50%;
    transform: translateY(-50%);
    opacity: 0.75;
    transition: opacity 0.2s ease;
}

#learningPathCarousel .carousel-control-prev:hover,
#learningPathCarousel .carousel-control-next:hover { opacity: 1; }

#learningPathCarousel .carousel-control-prev { left: 0; }
#learningPathCarousel .carousel-control-next { right: 0; }

#learningPathCarousel .carousel-control-prev-icon {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' fill='none' d='M10 4L6 8l4 4'/%3E%3C/svg%3E");
    width: 28px;
    height: 28px;
}

#learningPathCarousel .carousel-control-next-icon {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' fill='none' d='M6 4l4 4-4 4'/%3E%3C/svg%3E");
    width: 28px;
    height: 28px;
}

#learningPathCarousel .carousel-inner {
    min-height: 200px;
}

/* ── Stats strip ── */
.stats-strip {
    background: linear-gradient(135deg, #5DEDC6 0%, #33C9A8 100%);
    color: white;
    padding: 5rem 0;
    position: relative;
    overflow: hidden;
}

.stats-strip::before {
    content: '';
    position: absolute;
    width: 420px;
    height: 420px;
    background: rgba(255,255,255,0.07);
    border-radius: 50%;
    top: -160px;
    right: -100px;
    pointer-events: none;
}

.stats-strip::after {
    content: '';
    position: absolute;
    width: 280px;
    height: 280px;
    background: rgba(255,255,255,0.05);
    border-radius: 50%;
    bottom: -100px;
    left: -60px;
    pointer-events: none;
}

.stats-strip-blob {
    position: absolute;
    border-radius: 50%;
    background: rgba(255,255,255,0.05);
    pointer-events: none;
}

.stats-strip .container {
    position: relative;
    z-index: 1;
}

.stat-item {
    text-align: center;
}

.stat-item .stat-number {
    font-size: 2.5rem;
    font-weight: 800;
    display: block;
    line-height: 1;
    margin-bottom: 0.4rem;
}

.stat-item .stat-label {
    font-size: 0.95rem;
    opacity: 0.85;
}

/* ── Encouragement ── */
.encouragement-section {
    background: white;
    padding: 5rem 0;
}

.encouragement-section h2 {
    font-size: 2rem;
    font-weight: 800;
    color: #1e293b;
    max-width: 600px;
    margin: 0 auto 1rem;
    line-height: 1.3;
}

.encouragement-section p {
    color: #64748b;
    font-size: 1.05rem;
    max-width: 580px;
    margin: 0 auto 2rem;
    line-height: 1.7;
}

.btn-encourage {
    background: linear-gradient(135deg, #5DEDC6 0%, #33C9A8 100%);
    color: white;
    border: none;
    padding: 0.85rem 2.5rem;
    border-radius: 50px;
    font-weight: 700;
    font-size: 1rem;
    text-decoration: none;
    display: inline-block;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 4px 15px rgba(102,126,234,0.35);
}

.btn-encourage:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(102,126,234,0.45);
    color: white;
    text-decoration: none;
}

/* Admin drag handle on section cards */
.home-drag-handle {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    width: 26px;
    height: 26px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,0.75);
    border-radius: 6px;
    font-size: 0.85rem;
    color: #5DEDC6;
    cursor: grab;
    opacity: 0.7;
    transition: opacity 0.2s ease;
    z-index: 10;
    user-select: none;
    text-decoration: none;
}

.home-drag-handle:hover  { opacity: 1; }
.home-drag-handle:active { cursor: grabbing; }

#sortable-sections .sortable-ghost  { opacity: 0.35; }

#sections-toast {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    padding: 0.75rem 1.4rem;
    border-radius: 25px;
    font-weight: 600;
    font-size: 0.9rem;
    color: white;
    z-index: 9999;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.25s ease, transform 0.25s ease;
    pointer-events: none;
}

#sections-toast.show { opacity: 1; transform: translateY(0); }

/* ═══════════════════════════════
   BUDGET TRACKER (BudgetTracker.cshtml)
═══════════════════════════════ */

/* Budget Tracker Styles */
.budget-hero {
    background: linear-gradient(135deg, #5DEDC6 0%, #33C9A8 100%);
    color: white;
    padding: 3rem 0;
    margin-bottom: 2rem;
}

.budget-hero h1 {
    font-size: 2.5rem;
    font-weight: bold;
    margin-bottom: 0.5rem;
}

.budget-hero p {
    font-size: 1.2rem;
    opacity: 0.9;
}

.summary-card {
    background: white;
    border-radius: 15px;
    padding: 1.5rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    text-align: center;
    transition: transform 0.3s ease;
}

.summary-card:hover {
    transform: translateY(-5px);
}

.summary-card .icon {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.summary-card h3 {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    font-weight: 600;
}

.summary-card .amount {
    font-size: 2rem;
    font-weight: bold;
    margin: 0;
}

.summary-card.income .amount {
    color: #10b981;
}

.summary-card.expenses .amount {
    color: #ef4444;
}

.summary-card.balance .amount {
    color: #5DEDC6;
}

.tracker-section {
    background: white;
    border-radius: 15px;
    padding: 2rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    margin-bottom: 2rem;
}

.tracker-section h2 {
    font-size: 1.5rem;
    font-weight: bold;
    margin-bottom: 1.5rem;
    color: #333;
}

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    font-weight: 600;
    color: #555;
    margin-bottom: 0.5rem;
    display: block;
}

.form-control {
    border-radius: 10px;
    border: 2px solid #e5e7eb;
    padding: 0.75rem;
    transition: border-color 0.3s ease;
}

.form-control:focus {
    border-color: #5DEDC6;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.btn-add {
    background: linear-gradient(135deg, #5DEDC6 0%, #33C9A8 100%);
    color: white;
    border: none;
    padding: 0.75rem 2rem;
    border-radius: 10px;
    font-weight: 600;
    transition: transform 0.3s ease;
}

.btn-add:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.transaction-item {
    background: #f9fafb;
    border-radius: 10px;
    padding: 1rem;
    margin-bottom: 0.75rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s ease;
}

.transaction-item:hover {
    background: #f3f4f6;
    transform: translateX(5px);
}

.transaction-info {
    flex: 1;
}

.transaction-info h4 {
    margin: 0 0 0.25rem 0;
    font-size: 1rem;
    color: #333;
}

.transaction-info .category-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
}

.transaction-info .date {
    color: #999;
    font-size: 0.85rem;
    margin-left: 0.5rem;
}

.transaction-amount {
    font-size: 1.25rem;
    font-weight: bold;
    margin-right: 1rem;
}

.transaction-amount.income {
    color: #10b981;
}

.transaction-amount.expense {
    color: #ef4444;
}

.btn-delete {
    background: #ef4444;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.3s ease;
}

.btn-delete:hover {
    background: #dc2626;
}

.empty-state {
    text-align: center;
    padding: 3rem;
    color: #999;
}

.empty-state .icon {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.category-food { background: #fef3c7; color: #92400e; }
.category-transport { background: #dbeafe; color: #1e40af; }
.category-entertainment { background: #fce7f3; color: #9f1239; }
.category-bills { background: #e0e7ff; color: #3730a3; }
.category-shopping { background: #ccfbf1; color: #115e59; }
.category-salary { background: #d1fae5; color: #065f46; }
.category-freelance { background: #ddd6fe; color: #5b21b6; }
.category-gift { background: #fce7f3; color: #9f1239; }
.category-other { background: #f3f4f6; color: #374151; }

.type-selector {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.type-btn {
    flex: 1;
    padding: 1rem;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    background: white;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
}

.type-btn:hover {
    border-color: #5DEDC6;
}

.type-btn.active.income {
    background: #d1fae5;
    border-color: #10b981;
    color: #065f46;
}

.type-btn.active.expense {
    background: #fee2e2;
    border-color: #ef4444;
    color: #991b1b;
}

.filter-buttons {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 0.5rem 1rem;
    border: 2px solid #e5e7eb;
    border-radius: 20px;
    background: white;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.filter-btn:hover {
    border-color: #5DEDC6;
}

.filter-btn.active {
    background: #5DEDC6;
    border-color: #5DEDC6;
    color: white;
}

@keyframes slideIn {
    from { transform: translateX(400px); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

@keyframes slideOut {
    from { transform: translateX(0); opacity: 1; }
    to { transform: translateX(400px); opacity: 0; }
}

/* ═══════════════════════════════
   PRIVACY PAGE (Privacy.cshtml)
═══════════════════════════════ */

.privacy-hero {
    background: linear-gradient(135deg, #5DEDC6 0%, #33C9A8 100%);
    color: white;
    padding: 2.5rem 2rem;
    text-align: center;
}
.privacy-hero h1 { font-size: 2rem; font-weight: 800; margin-bottom: 0.5rem; }
.privacy-hero p  { opacity: 0.9; font-size: 1.05rem; max-width: 540px; margin: 0 auto; }

.privacy-card {
    background: white;
    border-radius: 16px;
    padding: 2rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}
.privacy-card h2 {
    font-size: 1.2rem;
    font-weight: 800;
    color: #1e293b;
    margin-bottom: 1rem;
}
.privacy-card p, .privacy-card li {
    color: #475569;
    font-size: 0.97rem;
    line-height: 1.75;
}
.privacy-card ul { padding-left: 1.25rem; margin: 0.5rem 0 0; }
.privacy-card li { margin-bottom: 0.35rem; }

.quick-summary {
    background: linear-gradient(135deg, #f0fdf9, #e6faf4);
    border: 2px solid #5DEDC6;
    border-radius: 16px;
    padding: 1.75rem 2rem;
    margin-bottom: 1.5rem;
}
.quick-summary h2 { color: #0f766e; font-size: 1.1rem; font-weight: 800; margin-bottom: 0.75rem; }
.quick-summary .point {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    margin-bottom: 0.6rem;
    font-size: 0.97rem;
    color: #1e293b;
    overflow-wrap: break-word;
    word-break: break-word;
    min-width: 0;
}
.quick-summary .point span:first-child { font-size: 1.2rem; flex-shrink: 0; }
.quick-summary .point span:last-child { min-width: 0; flex: 1; }

.clear-btn {
    background: #fee2e2;
    color: #991b1b;
    border: 2px solid #fca5a5;
    border-radius: 10px;
    padding: 0.6rem 1.5rem;
    font-weight: 700;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s;
}
.clear-btn:hover { background: #fecaca; border-color: #ef4444; }
.ico-link { color: #33C9A8; font-weight: 600; }

/* ═══════════════════════════════
   CONTACT US (ContactUs.cshtml)
═══════════════════════════════ */

/* Contact Us Styles */
.contact-hero {
    background: linear-gradient(135deg, #5DEDC6 0%, #33C9A8 100%);
    color: white;
    padding: 3rem 0;
    margin-bottom: 2rem;
}

.contact-hero h1 {
    font-size: 2.5rem;
    font-weight: bold;
    margin-bottom: 0.5rem;
}

.contact-hero p {
    font-size: 1.2rem;
    opacity: 0.9;
}

.contact-section {
    background: white;
    border-radius: 15px;
    padding: 2.5rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    margin-bottom: 2rem;
}

.contact-section h2 {
    font-size: 1.5rem;
    font-weight: bold;
    margin-bottom: 1rem;
    color: #333;
}

.contact-section p {
    color: #666;
    margin-bottom: 2rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    font-weight: 600;
    color: #555;
    margin-bottom: 0.5rem;
    display: block;
}

.form-control {
    border-radius: 10px;
    border: 2px solid #e5e7eb;
    padding: 0.75rem;
    transition: border-color 0.3s ease;
}

.form-control:focus {
    border-color: #5DEDC6;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
    outline: none;
}

textarea.form-control {
    min-height: 150px;
    resize: vertical;
}

.btn-submit {
    background: linear-gradient(135deg, #5DEDC6 0%, #33C9A8 100%);
    color: white;
    border: none;
    padding: 0.75rem 2.5rem;
    border-radius: 10px;
    font-weight: 600;
    transition: transform 0.3s ease;
    cursor: pointer;
}

.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.info-cards {
    margin-top: 3rem;
}

.info-card {
    background: white;
    border-radius: 15px;
    padding: 2rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    text-align: center;
    transition: transform 0.3s ease;
    height: 100%;
}

.info-card:hover {
    transform: translateY(-5px);
}

.info-card .icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.info-card h3 {
    font-size: 1.2rem;
    font-weight: bold;
    margin-bottom: 0.5rem;
    color: #333;
}

.info-card p {
    color: #666;
    margin: 0;
}

.alert {
    border-radius: 10px;
    padding: 1rem 1.5rem;
    margin-bottom: 1.5rem;
}

.alert-success {
    background: #d1fae5;
    border: 2px solid #10b981;
    color: #065f46;
}

.alert-danger {
    background: #fee2e2;
    border: 2px solid #ef4444;
    color: #991b1b;
}

.category-badge {
    display: inline-block;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    margin: 0.25rem;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid #e5e7eb;
    background: white;
}

.category-badge:hover {
    border-color: #5DEDC6;
}

.category-badge.selected {
    background: #5DEDC6;
    border-color: #5DEDC6;
    color: white;
}

.char-counter {
    text-align: right;
    font-size: 0.85rem;
    color: #999;
    margin-top: 0.25rem;
}

.char-counter.warning {
    color: #ef4444;
}

/* ═══════════════════════════════
   ADMIN SUGGESTIONS (AdminSuggestions.cshtml)
═══════════════════════════════ */

.admin-hero {
    background: linear-gradient(135deg, #5DEDC6 0%, #33C9A8 100%);
    color: white;
    padding: 2rem 0;
    margin-bottom: 2rem;
}

.admin-section {
    background: white;
    border-radius: 15px;
    padding: 2rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    margin-bottom: 2rem;
}

.suggestion-card {
    background: #f9fafb;
    border-radius: 10px;
    padding: 1.5rem;
    margin-bottom: 1rem;
    border-left: 4px solid #5DEDC6;
    transition: all 0.3s ease;
}

.suggestion-card:hover {
    background: #f3f4f6;
    transform: translateX(5px);
}

.suggestion-card.unread {
    border-left-color: #10b981;
    background: #ecfdf5;
}

.suggestion-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.suggestion-meta {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.meta-item {
    font-size: 0.85rem;
    color: #666;
}

.category-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
}

.badge-feature { background: #dbeafe; color: #1e40af; }
.badge-bug { background: #fee2e2; color: #991b1b; }
.badge-content { background: #fef3c7; color: #92400e; }
.badge-feedback { background: #e0e7ff; color: #3730a3; }
.badge-other { background: #f3f4f6; color: #374151; }

.suggestion-message {
    color: #333;
    line-height: 1.6;
    margin-bottom: 1rem;
}

.btn-mark-read {
    background: #10b981;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.85rem;
}

.btn-delete {
    background: #ef4444;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.85rem;
}

.filter-buttons {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 0.5rem 1rem;
    border: 2px solid #e5e7eb;
    border-radius: 20px;
    background: white;
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-btn.active {
    background: #5DEDC6;
    border-color: #5DEDC6;
    color: white;
}

.stats-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: white;
    border-radius: 10px;
    padding: 1.5rem;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.stat-number {
    font-size: 2rem;
    font-weight: bold;
    color: #5DEDC6;
}

.stat-label {
    color: #666;
    font-size: 0.9rem;
}

/* ═══════════════════════════════
   ADMIN HOME (Admin/Home.cshtml)
═══════════════════════════════ */

.admin-hero {
    background: linear-gradient(135deg, #5DEDC6 0%, #33C9A8 100%);
    color: white;
    padding: 2rem 0;
    margin-bottom: 2rem;
}

.admin-section {
    background: white;
    border-radius: 15px;
    padding: 2rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    margin-bottom: 2rem;
}

.suggestion-card {
    background: #f9fafb;
    border-radius: 10px;
    padding: 1.5rem;
    margin-bottom: 1rem;
    border-left: 4px solid #5DEDC6;
    transition: all 0.3s ease;
}

.suggestion-card:hover {
    background: #f3f4f6;
    transform: translateX(5px);
}

.suggestion-card.unread {
    border-left-color: #10b981;
    background: #ecfdf5;
}

.suggestion-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.suggestion-meta {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.meta-item {
    font-size: 0.85rem;
    color: #666;
}

.category-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
}

.badge-feature  { background: #dbeafe; color: #1e40af; }
.badge-bug      { background: #fee2e2; color: #991b1b; }
.badge-content  { background: #fef3c7; color: #92400e; }
.badge-feedback { background: #e0e7ff; color: #3730a3; }
.badge-other    { background: #f3f4f6; color: #374151; }

.suggestion-message {
    color: #333;
    line-height: 1.6;
    margin-bottom: 1rem;
}

.btn-mark-read {
    background: #10b981;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.85rem;
}

.btn-delete {
    background: #ef4444;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.85rem;
}

.filter-buttons {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 0.5rem 1rem;
    border: 2px solid #e5e7eb;
    border-radius: 20px;
    background: white;
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-btn.active {
    background: #5DEDC6;
    border-color: #5DEDC6;
    color: white;
}

.stats-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: white;
    border-radius: 10px;
    padding: 1.5rem;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.stat-number {
    font-size: 2rem;
    font-weight: bold;
    color: #5DEDC6;
}

.stat-label {
    color: #666;
    font-size: 0.9rem;
}

/* Sections tab styles */
.section-swatch {
    width: 20px;
    height: 20px;
    border-radius: 4px;
    display: inline-block;
    vertical-align: middle;
}

/* ═══════════════════════════════
   SECTION EDIT (Admin/SectionEdit.cshtml)
═══════════════════════════════ */

.topic-hero {
    background: linear-gradient(135deg, #f97316 0%, #33C9A8 100%);
    color: white;
    padding: 4rem 0 3rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.topic-hero-emoji {
    position: absolute;
    right: 8%;
    top: 50%;
    transform: translateY(-55%);
    font-size: 9rem;
    opacity: 0.12;
    pointer-events: none;
    line-height: 1;
    z-index: 0;
}

.topic-hero .container { position: relative; z-index: 1; }

.topic-hero h1 { font-size: 2.2rem; font-weight: 800; margin-bottom: 0.5rem; }
.topic-hero p  { opacity: 0.9; font-size: 1.05rem; margin: 0; }

.breadcrumb-section {
    background: #fff7ed;
    padding: 0.6rem 0;
    border-bottom: 1px solid #fed7aa;
}

.breadcrumb { margin: 0; padding: 0; background: none; }
.breadcrumb-item a { color: #f97316; text-decoration: none; font-size: 0.9rem; }
.breadcrumb-item a:hover { text-decoration: underline; }
.breadcrumb-item.active { color: #64748b; font-size: 0.9rem; }
.breadcrumb-item + .breadcrumb-item::before { color: #94a3b8; }

.topic-content { padding: 2.5rem 0 4rem; }

.form-card {
    background: white;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.07);
    overflow: hidden;
}

.form-card-header {
    background: #fff7ed;
    border-bottom: 2px solid #fed7aa;
    padding: 1.5rem 2rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.form-card-header .header-emoji { font-size: 2rem; line-height: 1; }

.form-card-header h2 { font-size: 1.2rem; font-weight: 700; color: #1e293b; margin: 0; }
.form-card-header p  { font-size: 0.85rem; color: #64748b; margin: 0.2rem 0 0; }

.form-card-body { padding: 2rem; }

.form-label-styled {
    font-size: 0.9rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 0.5rem;
    display: block;
}

.form-control-styled {
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    padding: 0.7rem 1rem;
    font-size: 0.95rem;
    color: #1e293b;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    width: 100%;
}

.form-control-styled:focus {
    outline: none;
    border-color: #f97316;
    box-shadow: 0 0 0 3px rgba(249,115,22,0.12);
}

.btn-submit {
    display: inline-block;
    padding: 0.7rem 2rem;
    background: linear-gradient(135deg, #f97316, #33C9A8);
    color: white;
    border-radius: 25px;
    font-weight: 700;
    font-size: 0.95rem;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
}

.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    color: white;
}

.btn-cancel {
    display: inline-block;
    padding: 0.7rem 2rem;
    background: #f1f5f9;
    color: #64748b;
    border-radius: 25px;
    font-weight: 600;
    font-size: 0.95rem;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
}

.btn-cancel:hover {
    background: #e2e8f0;
    color: #475569;
    text-decoration: none;
}

.form-divider {
    border: none;
    border-top: 2px solid #f1f5f9;
    margin: 1.5rem 0;
}

/* ─── Subsection Panel ─── */

.subsection-row {
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    margin-bottom: 0.75rem;
    overflow: hidden;
}

.subsection-row-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.2rem;
    cursor: pointer;
    background: #f8fafc;
    transition: background 0.2s;
    user-select: none;
}

.subsection-row-header:hover { background: #fff7ed; }

.sub-icon { font-size: 1.2rem; flex-shrink: 0; }

.sub-title-text {
    font-weight: 600;
    color: #1e293b;
    flex: 1;
}

.sub-count {
    font-size: 0.8rem;
    color: #64748b;
    background: #e2e8f0;
    padding: 0.2rem 0.6rem;
    border-radius: 12px;
    white-space: nowrap;
}

.sub-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.sub-chevron { color: #94a3b8; font-size: 0.85rem; transition: transform 0.2s; }
.sub-chevron.open { transform: rotate(180deg); }

.btn-sub-delete {
    padding: 0.3rem 0.7rem;
    background: #fee2e2;
    color: #dc2626;
    border: none;
    border-radius: 6px;
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-sub-delete:hover { background: #fecaca; }

.subsection-row-edit {
    padding: 1rem 1.2rem;
    border-top: 1px solid #e2e8f0;
    background: white;
    display: none;
}

.subsection-row-edit.open { display: block; }

.btn-sub-save {
    padding: 0.5rem 1.2rem;
    background: #f97316;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: opacity 0.2s;
}

.btn-sub-save:hover { opacity: 0.85; }

.btn-sub-cancel {
    padding: 0.5rem 1rem;
    background: #e2e8f0;
    color: #475569;
    border: none;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-sub-cancel:hover { background: #cbd5e1; }

.btn-add-sub {
    padding: 0.6rem 1.4rem;
    background: #f97316;
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.2s;
}

.btn-add-sub:hover { transform: translateY(-1px); box-shadow: 0 3px 10px rgba(0,0,0,0.15); }

.empty-subsections-note {
    text-align: center;
    padding: 2rem;
    color: #94a3b8;
    font-style: italic;
}

/* ═══════════════════════════════
   ARTICLES CREATE (Articles/Create.cshtml)
═══════════════════════════════ */

/* ─── Hero ─── */
.topic-hero {
    background: linear-gradient(135deg, #f97316 0%, #33C9A8 100%);
    color: white;
    padding: 4rem 0 3rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.topic-hero-emoji {
    position: absolute;
    right: 8%;
    top: 50%;
    transform: translateY(-55%);
    font-size: 9rem;
    opacity: 0.12;
    pointer-events: none;
    line-height: 1;
    z-index: 0;
}

.topic-hero .container {
    position: relative;
    z-index: 1;
}

.topic-hero h1 {
    font-size: 2.2rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
}

.topic-hero p {
    opacity: 0.9;
    font-size: 1.05rem;
    margin: 0;
}

/* ─── Breadcrumb ─── */
.breadcrumb-section {
    background: #fff7ed;
    padding: 0.6rem 0;
    border-bottom: 1px solid #fed7aa;
}

.breadcrumb {
    margin: 0;
    padding: 0;
    background: none;
}

.breadcrumb-item a {
    color: #f97316;
    text-decoration: none;
    font-size: 0.9rem;
}

.breadcrumb-item a:hover { text-decoration: underline; }

.breadcrumb-item.active {
    color: #64748b;
    font-size: 0.9rem;
}

.breadcrumb-item + .breadcrumb-item::before { color: #94a3b8; }

/* ─── Page Layout ─── */
.topic-content { padding: 2.5rem 0 4rem; }

/* ─── Form Card ─── */
.form-card {
    background: white;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.07);
    overflow: hidden;
}

.form-card-header {
    background: #fff7ed;
    border-bottom: 2px solid #fed7aa;
    padding: 1.5rem 2rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.form-card-header .header-emoji {
    font-size: 2rem;
    line-height: 1;
}

.form-card-header h2 {
    font-size: 1.2rem;
    font-weight: 700;
    color: #1e293b;
    margin: 0;
}

.form-card-header p {
    font-size: 0.85rem;
    color: #64748b;
    margin: 0.2rem 0 0;
}

.form-card-body { padding: 2rem; }

/* ─── Form Controls ─── */
.form-label-styled {
    font-size: 0.9rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 0.5rem;
    display: block;
}

.form-control-styled {
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    padding: 0.7rem 1rem;
    font-size: 0.95rem;
    color: #1e293b;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    width: 100%;
}

.form-control-styled:focus {
    outline: none;
    border-color: #f97316;
    box-shadow: 0 0 0 3px rgba(249,115,22,0.12);
}

/* ─── Buttons ─── */
.btn-submit {
    display: inline-block;
    padding: 0.7rem 2rem;
    background: linear-gradient(135deg, #f97316, #33C9A8);
    color: white;
    border-radius: 25px;
    font-weight: 700;
    font-size: 0.95rem;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
}

.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    color: white;
}

.btn-cancel {
    display: inline-block;
    padding: 0.7rem 2rem;
    background: #f1f5f9;
    color: #64748b;
    border-radius: 25px;
    font-weight: 600;
    font-size: 0.95rem;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
}

.btn-cancel:hover {
    background: #e2e8f0;
    color: #475569;
    text-decoration: none;
}

/* ─── Alert Messages ─── */
.alert-custom {
    border-radius: 10px;
    padding: 1rem 1.5rem;
    margin-bottom: 1.5rem;
    border: none;
    font-weight: 600;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.alert-success-custom {
    background: #d1fae5;
    color: #065f46;
}

.alert-error-custom {
    background: #fee2e2;
    color: #991b1b;
}

/* ─── Divider ─── */
.form-divider {
    border: none;
    border-top: 2px solid #f1f5f9;
    margin: 1.5rem 0;
}

/* TinyMCE container fix */
.tox-tinymce { border-radius: 10px !important; border: 2px solid #e2e8f0 !important; }
.tox-tinymce:focus-within { border-color: #f97316 !important; box-shadow: 0 0 0 3px rgba(249,115,22,0.12) !important; }
.tox .tox-edit-area__iframe { background: white !important; }

/* ═══════════════════════════════
   ARTICLES DETAILS (Articles/Details.cshtml)
═══════════════════════════════ */

/* ─── Hero ─── */
.article-hero {
    background: linear-gradient(135deg, #f97316 0%, #33C9A8 100%);
    color: white;
    padding: 3rem 0 2rem;
    position: relative;
    overflow: hidden;
}

.article-hero-emoji {
    position: absolute;
    right: 5%;
    top: 50%;
    transform: translateY(-50%);
    font-size: 8rem;
    opacity: 0.1;
    pointer-events: none;
}

.article-hero .container {
    position: relative;
    z-index: 1;
}

.article-meta-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
    opacity: 0.9;
    font-size: 0.9rem;
}

.article-meta-header span {
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.article-hero h1 {
    font-size: 2.5rem;
    font-weight: 800;
    margin: 0;
    line-height: 1.2;
}

/* ─── Breadcrumb ─── */
.breadcrumb-section {
    background: #fff7ed;
    padding: 0.6rem 0;
    border-bottom: 1px solid #fed7aa;
}

.breadcrumb {
    margin: 0;
    padding: 0;
    background: none;
}

.breadcrumb-item a {
    color: #f97316;
    text-decoration: none;
    font-size: 0.9rem;
}

.breadcrumb-item a:hover { text-decoration: underline; }

.breadcrumb-item.active {
    color: #64748b;
    font-size: 0.9rem;
}

.breadcrumb-item + .breadcrumb-item::before { color: #94a3b8; }

/* ─── Article Content ─── */
.article-section {
    padding: 3rem 0;
}

/* ─── Article Info Card ─── */
.article-info-card {
    background: white;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.07);
    padding: 1.5rem 2rem;
    margin-bottom: 2rem;
    display: flex;
    justify-content: center;
    gap: 3rem;
    flex-wrap: wrap;
}

.info-stat {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.95rem;
    color: #475569;
}

.info-icon {
    font-size: 1.5rem;
    color: #f97316;
}

.info-stat strong {
    color: #1e293b;
    display: block;
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.2rem;
}

/* ─── Article Content Card ─── */
.article-content-card {
    background: white;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.07);
    padding: 3rem;
    margin-bottom: 2rem;
}

.article-body {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #1e293b;
    max-width: 100%;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.article-body h1,
.article-body h2,
.article-body h3,
.article-body h4 {
    color: #0f172a;
    margin-top: 2rem;
    margin-bottom: 1rem;
    font-weight: 700;
    line-height: 1.3;
}

.article-body h1 { font-size: 2rem; }
.article-body h2 { font-size: 1.6rem; }
.article-body h3 { font-size: 1.3rem; }
.article-body h4 { font-size: 1.1rem; }

.article-body p {
    margin-bottom: 1.5rem;
    line-height: 1.8;
}

.article-body ul,
.article-body ol {
    margin-bottom: 1.5rem;
    padding-left: 2rem;
}

.article-body li {
    margin-bottom: 0.5rem;
    line-height: 1.7;
}

.article-body img {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
    margin: 2rem 0;
    display: block;
}

.article-body blockquote {
    border-left: 4px solid #f97316;
    padding-left: 1.5rem;
    margin: 2rem 0;
    font-style: italic;
    color: #475569;
}

.article-body code {
    background: #f1f5f9;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-size: 0.9em;
    color: #e11d48;
    word-break: break-all;
}

.article-body pre {
    background: #1e293b;
    color: #e2e8f0;
    padding: 1.5rem;
    border-radius: 10px;
    overflow-x: auto;
    margin: 2rem 0;
}

.article-body pre code {
    background: none;
    color: inherit;
    padding: 0;
}

.article-body table {
    width: 100%;
    border-collapse: collapse;
    margin: 2rem 0;
    overflow-x: auto;
    display: block;
}

.article-body table th,
.article-body table td {
    padding: 0.75rem;
    border: 1px solid #e2e8f0;
    text-align: left;
}

.article-body table th {
    background: #fff7ed;
    font-weight: 700;
}

/* ─── Action Buttons ─── */
.article-actions {
    background: white;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.07);
    padding: 1.5rem;
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: center;
}

.btn-action {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.7rem 1.5rem;
    border-radius: 25px;
    font-weight: 600;
    font-size: 0.9rem;
    text-decoration: none;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.btn-edit {
    background: linear-gradient(135deg, #f97316, #33C9A8);
    color: white;
}

.btn-edit:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    color: white;
    text-decoration: none;
}

.btn-back {
    background: #f1f5f9;
    color: #64748b;
}

.btn-back:hover {
    background: #e2e8f0;
    color: #475569;
    text-decoration: none;
}

.btn-mark-read {
    background: #f0fdf4;
    color: #16a34a;
    border: 2px solid #bbf7d0;
}

.btn-mark-read:hover {
    background: #dcfce7;
    color: #15803d;
    text-decoration: none;
}

.btn-mark-read.read {
    background: linear-gradient(135deg, #22c55e, #16a34a);
    color: white;
    border-color: transparent;
}

.btn-mark-read.read:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(34,197,94,0.35);
    color: white;
    text-decoration: none;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .article-content-card {
        padding: 1.5rem;
    }

    .article-hero h1 {
        font-size: 2rem;
    }

    .article-body {
        font-size: 1rem;
    }

    .article-info-card {
        gap: 1.5rem;
    }
}

/* ═══════════════════════════════
   ARTICLES EDIT (Articles/Edit.cshtml)
═══════════════════════════════ */

/* ─── Hero ─── */
.topic-hero {
    background: linear-gradient(135deg, #f97316 0%, #33C9A8 100%);
    color: white;
    padding: 4rem 0 3rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.topic-hero-emoji {
    position: absolute;
    right: 8%;
    top: 50%;
    transform: translateY(-55%);
    font-size: 9rem;
    opacity: 0.12;
    pointer-events: none;
    line-height: 1;
    z-index: 0;
}

.topic-hero .container {
    position: relative;
    z-index: 1;
}

.topic-hero h1 {
    font-size: 2.2rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
}

.topic-hero p {
    opacity: 0.9;
    font-size: 1.05rem;
    margin: 0;
}

/* ─── Breadcrumb ─── */
.breadcrumb-section {
    background: #fff7ed;
    padding: 0.6rem 0;
    border-bottom: 1px solid #fed7aa;
}

.breadcrumb {
    margin: 0;
    padding: 0;
    background: none;
}

.breadcrumb-item a {
    color: #f97316;
    text-decoration: none;
    font-size: 0.9rem;
}

.breadcrumb-item a:hover { text-decoration: underline; }

.breadcrumb-item.active {
    color: #64748b;
    font-size: 0.9rem;
}

.breadcrumb-item + .breadcrumb-item::before { color: #94a3b8; }

/* ─── Page Layout ─── */
.topic-content { padding: 2.5rem 0 4rem; }

/* ─── Form Card ─── */
.form-card {
    background: white;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.07);
    overflow: hidden;
}

.form-card-header {
    background: #fff7ed;
    border-bottom: 2px solid #fed7aa;
    padding: 1.5rem 2rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.form-card-header .header-emoji {
    font-size: 2rem;
    line-height: 1;
}

.form-card-header h2 {
    font-size: 1.2rem;
    font-weight: 700;
    color: #1e293b;
    margin: 0;
}

.form-card-header p {
    font-size: 0.85rem;
    color: #64748b;
    margin: 0.2rem 0 0;
}

.form-card-body { padding: 2rem; }

/* ─── Form Controls ─── */
.form-label-styled {
    font-size: 0.9rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 0.5rem;
    display: block;
}

.form-control-styled {
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    padding: 0.7rem 1rem;
    font-size: 0.95rem;
    color: #1e293b;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    width: 100%;
}

.form-control-styled:focus {
    outline: none;
    border-color: #f97316;
    box-shadow: 0 0 0 3px rgba(249,115,22,0.12);
}

/* ─── Buttons ─── */
.btn-submit {
    display: inline-block;
    padding: 0.7rem 2rem;
    background: linear-gradient(135deg, #f97316, #33C9A8);
    color: white;
    border-radius: 25px;
    font-weight: 700;
    font-size: 0.95rem;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
}

.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    color: white;
}

.btn-cancel {
    display: inline-block;
    padding: 0.7rem 2rem;
    background: #f1f5f9;
    color: #64748b;
    border-radius: 25px;
    font-weight: 600;
    font-size: 0.95rem;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
}

.btn-cancel:hover {
    background: #e2e8f0;
    color: #475569;
    text-decoration: none;
}

/* ─── Alert Messages ─── */
.alert-custom {
    border-radius: 10px;
    padding: 1rem 1.5rem;
    margin-bottom: 1.5rem;
    border: none;
    font-weight: 600;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.alert-success-custom {
    background: #d1fae5;
    color: #065f46;
}

.alert-error-custom {
    background: #fee2e2;
    color: #991b1b;
}

/* ─── Divider ─── */
.form-divider {
    border: none;
    border-top: 2px solid #f1f5f9;
    margin: 1.5rem 0;
}

/* TinyMCE container fix */
.tox-tinymce { border-radius: 10px !important; border: 2px solid #e2e8f0 !important; }
.tox-tinymce:focus-within { border-color: #f97316 !important; box-shadow: 0 0 0 3px rgba(249,115,22,0.12) !important; }
.tox .tox-edit-area__iframe { background: white !important; }

/* ═══════════════════════════════
   ARTICLES INDEX (Articles/Index.cshtml)
═══════════════════════════════ */

/* ─── Hero ─── */
.admin-hero {
    background: linear-gradient(135deg, #f97316 0%, #33C9A8 100%);
    color: white;
    padding: 3rem 0 2rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.admin-hero-emoji {
    position: absolute;
    right: 8%;
    top: 50%;
    transform: translateY(-50%);
    font-size: 8rem;
    opacity: 0.1;
    pointer-events: none;
}

.admin-hero .container {
    position: relative;
    z-index: 1;
}

.admin-hero h1 {
    font-size: 2.2rem;
    font-weight: 800;
    margin: 0 0 0.5rem 0;
}

.admin-hero p {
    opacity: 0.9;
    font-size: 1rem;
    margin: 0;
}

/* ─── Breadcrumb ─── */
.breadcrumb-section {
    background: #fff7ed;
    padding: 0.6rem 0;
    border-bottom: 1px solid #fed7aa;
}

.breadcrumb {
    margin: 0;
    padding: 0;
    background: none;
}

.breadcrumb-item a {
    color: #f97316;
    text-decoration: none;
    font-size: 0.9rem;
}

.breadcrumb-item a:hover { text-decoration: underline; }

.breadcrumb-item.active {
    color: #64748b;
    font-size: 0.9rem;
}

.breadcrumb-item + .breadcrumb-item::before { color: #94a3b8; }

/* ─── Content Section ─── */
.admin-content {
    padding: 3rem 0;
}

/* ─── Create Button ─── */
.create-section {
    margin-bottom: 2rem;
}

.btn-create {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.7rem 1.5rem;
    background: linear-gradient(135deg, #f97316, #33C9A8);
    color: white;
    border-radius: 25px;
    font-weight: 600;
    font-size: 0.95rem;
    text-decoration: none;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.btn-create:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    color: white;
    text-decoration: none;
}

/* ─── Articles List Card ─── */
.articles-card {
    background: white;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.07);
    overflow: hidden;
}

.articles-card-header {
    background: #fff7ed;
    border-bottom: 2px solid #fed7aa;
    padding: 1.5rem 2rem;
}

.articles-card-header h2 {
    font-size: 1.3rem;
    font-weight: 700;
    color: #1e293b;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.articles-card-body {
    padding: 0;
}

/* ─── Articles Table ─── */
.articles-table {
    width: 100%;
    margin: 0;
}

.articles-table thead {
    background: #f8fafc;
    border-bottom: 2px solid #e2e8f0;
}

.articles-table th {
    padding: 1rem 1.5rem;
    text-align: left;
    font-weight: 700;
    font-size: 0.85rem;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border: none;
}

.articles-table td {
    padding: 1.2rem 1.5rem;
    border-bottom: 1px solid #f1f5f9;
    vertical-align: middle;
}

.articles-table tbody tr {
    transition: background-color 0.2s ease;
}

.articles-table tbody tr:hover {
    background: #fafafa;
}

.articles-table tbody tr:last-child td {
    border-bottom: none;
}

/* ─── Table Content Styles ─── */
.article-title {
    font-weight: 600;
    color: #1e293b;
    font-size: 1rem;
}

.article-meta {
    color: #64748b;
    font-size: 0.85rem;
    margin-top: 0.2rem;
}

.author-badge {
    display: inline-block;
    padding: 0.3rem 0.8rem;
    background: #fff7ed;
    color: #f97316;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 600;
}

/* ─── Action Buttons ─── */
.action-buttons {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.btn-action {
    padding: 0.4rem 1rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s ease;
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
}

.btn-view {
    background: #dbeafe;
    color: #1e40af;
}

.btn-view:hover {
    background: #bfdbfe;
    color: #1e3a8a;
    text-decoration: none;
}

.btn-edit {
    background: #fff7ed;
    color: #f97316;
}

.btn-edit:hover {
    background: #fed7aa;
    color: #ea580c;
    text-decoration: none;
}

.btn-delete {
    background: #fee2e2;
    color: #991b1b;
}

.btn-delete:hover {
    background: #fecaca;
    color: #7f1d1d;
    text-decoration: none;
}

/* ─── Empty State ─── */
.empty-state {
    padding: 4rem 2rem;
    text-align: center;
}

.empty-state-emoji {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.empty-state h3 {
    font-size: 1.3rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 0.5rem;
}

.empty-state p {
    color: #64748b;
    font-size: 1rem;
    margin-bottom: 1.5rem;
}

/* ─── Responsive ─── */
@media (max-width: 768px) {
    .articles-table {
        font-size: 0.9rem;
    }

    .articles-table th,
    .articles-table td {
        padding: 0.8rem;
    }

    .action-buttons {
        flex-direction: column;
        gap: 0.3rem;
        align-items: stretch;
    }

    .btn-action {
        justify-content: center;
    }
}

/* ─── Modal Styles ─── */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.3);
    max-width: 500px;
    width: 90%;
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from { transform: translateY(30px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.modal-header {
    padding: 1.5rem 2rem;
    border-bottom: 2px solid #f1f5f9;
}

.modal-header h3 {
    margin: 0;
    font-size: 1.3rem;
    font-weight: 700;
    color: #1e293b;
}

.modal-body {
    padding: 2rem;
}

.modal-body p {
    margin-bottom: 1rem;
    font-size: 1rem;
    color: #475569;
}

.article-title-modal {
    font-weight: 700;
    color: #1e293b;
    font-size: 1.1rem;
    padding: 1rem;
    background: #fff7ed;
    border-left: 4px solid #f97316;
    border-radius: 5px;
}

.warning-text {
    color: #991b1b;
    font-weight: 600;
    font-size: 0.95rem;
}

.modal-footer {
    padding: 1.5rem 2rem;
    border-top: 2px solid #f1f5f9;
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
}

.modal-footer form {
    display: flex;
    gap: 1rem;
    margin: 0;
}

.btn-modal {
    padding: 0.7rem 1.5rem;
    border-radius: 25px;
    font-weight: 600;
    font-size: 0.9rem;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-modal-delete {
    background: #dc2626;
    color: white;
}

.btn-modal-delete:hover {
    background: #b91c1c;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(220, 38, 38, 0.3);
}

.btn-modal-cancel {
    background: #f1f5f9;
    color: #64748b;
}

.btn-modal-cancel:hover {
    background: #e2e8f0;
    color: #475569;
}

/* ─── Drag handle ─── */
.drag-handle { cursor: grab; }
.drag-handle:active { cursor: grabbing; }
.sortable-ghost { opacity: 0.4; background: #fff7ed !important; }
.sortable-chosen { box-shadow: 0 4px 20px rgba(0,0,0,0.15); }

/* ─── Save toast ─── */
#order-toast {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    padding: 0.75rem 1.4rem;
    border-radius: 25px;
    font-weight: 600;
    font-size: 0.9rem;
    color: white;
    z-index: 9999;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.25s ease, transform 0.25s ease;
    pointer-events: none;
}

#order-toast.show {
    opacity: 1;
    transform: translateY(0);
}

#order-toast.success { background: #10b981; }
#order-toast.error   { background: #ef4444; }

/* ═══════════════════════════════
   DARK MODE
═══════════════════════════════ */

:root {
    --dark-bg:        #1e2d40;
    --dark-bg-raised: #243350;
    --dark-bg-card:   #2a3a52;
    --dark-border:    #2d3f5a;
    --dark-text:      #e2e8f0;
    --dark-text-muted:#94a3b8;
}

html.dark body {
    background: var(--dark-bg);
    color: var(--dark-text);
}

/* General surfaces */
html.dark .quick-actions,
html.dark .learning-paths,
html.dark .topic-content,
html.dark section.topic-content {
    background: var(--dark-bg);
}

html.dark main.container { background: var(--dark-bg); }

/* Cards */
html.dark .action-card {
    background: var(--dark-bg-card) !important;
    box-shadow: 0 2px 12px rgba(0,0,0,0.3);
    color: var(--dark-text) !important;
}
html.dark .action-card h3 { color: var(--dark-text); }
html.dark .action-card p  { color: var(--dark-text-muted); }

html.dark .article-card {
    box-shadow: 0 2px 12px rgba(0,0,0,0.3);
}
/* Darken the per-card colour via overlay rather than replacing it */
html.dark .article-card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 18px;
    background: rgba(0, 0, 0, 0.45);
    pointer-events: none;
    z-index: 0;
}
/* Only the link content needs to sit above the ::before overlay — NOT the menu which must stay absolute */
html.dark .article-card-link { position: relative; z-index: 1; }
html.dark .article-card-menu { z-index: 2; } /* keep absolute positioning from base CSS */
html.dark .article-card-title { color: var(--dark-text); }
html.dark .article-card-summary { color: var(--dark-text-muted); }
html.dark .article-card-menu-btn {
    background: rgba(255,255,255,0.1);
    color: var(--dark-text);
}
html.dark .article-card-dropdown {
    background: var(--dark-bg-raised);
    box-shadow: 0 8px 24px rgba(0,0,0,0.4);
}
html.dark .article-card-dropdown a,
html.dark .article-card-dropdown button {
    color: var(--dark-text);
}
html.dark .article-card-dropdown a:hover,
html.dark .article-card-dropdown button:hover { background: var(--dark-border); }

/* Form cards */
html.dark .form-card {
    background: var(--dark-bg-raised);
    border-color: var(--dark-border);
}
html.dark .form-card-body { background: var(--dark-bg-raised); }
html.dark .form-card-header { background: var(--dark-bg-card); border-color: var(--dark-border); }

/* Inputs */
html.dark .form-control,
html.dark .form-control-styled,
html.dark .form-select {
    background: var(--dark-bg-raised) !important;
    color: var(--dark-text) !important;
    border-color: var(--dark-border) !important;
}
html.dark .form-control::placeholder,
html.dark .form-control-styled::placeholder { color: var(--dark-text-muted); }
html.dark .form-control:focus,
html.dark .form-control-styled:focus { background: var(--dark-bg-raised) !important; color: var(--dark-text) !important; }

/* Sidebar cards */
html.dark .progress-card,
html.dark .tips-card {
    background: var(--dark-bg-raised);
    border-color: var(--dark-border);
    color: var(--dark-text);
}
html.dark .tip-item { border-color: var(--dark-border); }
html.dark .tip-item p { color: var(--dark-text-muted); }
html.dark .tips-card h3,
html.dark .progress-card h3 { color: var(--dark-text) !important; }
html.dark .tips-card p,
html.dark .tips-card .text-muted,
html.dark .progress-card p,
html.dark .progress-card .text-muted { color: var(--dark-text) !important; }

/* Progress tracker */
html.dark .progress-bar-track { background: var(--dark-border); }
html.dark .progress-item { color: var(--dark-text-muted); }
html.dark .progress-label { color: var(--dark-text-muted); }

/* Tables */
html.dark .table { color: var(--dark-text); }
html.dark .table-light,
html.dark .table-hover tbody tr:hover { background: var(--dark-bg-card) !important; color: var(--dark-text); }
html.dark .table td, html.dark .table th { border-color: var(--dark-border); }

/* Breadcrumb */
html.dark .breadcrumb-section { background: var(--dark-bg-raised); }
html.dark .breadcrumb-item a { color: var(--dark-text-muted); }
html.dark .breadcrumb-item.active { color: var(--dark-text-muted); }

/* Alerts / toasts */
html.dark .alert-custom { background: var(--dark-bg-card); border-color: var(--dark-border); }

/* Admin bars — no background, just the button */
html.dark .add-subsection-bar { background: transparent; border: none; }

/* Hero waves */
html.dark .wave-fill { fill: var(--dark-bg) !important; }

/* Section headings & subtitles */
html.dark .section-title { color: var(--dark-text) !important; }
html.dark .section-subtitle { color: var(--dark-text-muted) !important; }

/* Mint/teal accent — flat solid in dark mode so header & folder-nav are one uniform band */
html.dark .site-header { background: #1d8a70; }
html.dark .folder-nav { background: transparent; }
html.dark .hero-section { background: linear-gradient(135deg, #29a88a 0%, #1d8a70 100%); }
html.dark .topic-hero { background: linear-gradient(135deg, #29a88a 0%, #1d8a70 100%); }

/* Modals */
html.dark .modal-content {
    background: var(--dark-bg-raised);
    color: var(--dark-text);
}
html.dark .modal-body { background: var(--dark-bg-raised); }
html.dark .modal-footer { background: var(--dark-bg-raised); border-color: var(--dark-border); }
/* Testing modal centring — only when Bootstrap has made it visible */
#testingReportModal.show { display: flex !important; align-items: center; justify-content: center; }
#testingReportModal .modal-dialog { margin: 0; }

/* Budget Tracker dark mode */
html.dark .budget-hero { background: linear-gradient(135deg, #29a88a 0%, #1d8a70 100%); }

html.dark .budget-info-bar {
    background: rgba(29,138,112,0.2) !important;
    border-color: rgba(29,138,112,0.3) !important;
    color: #5DEDC6 !important;
}
html.dark .budget-info-bar a { color: #5DEDC6 !important; }

html.dark .summary-card {
    background: var(--dark-bg-raised);
    color: var(--dark-text);
    box-shadow: 0 2px 12px rgba(0,0,0,0.3);
}
html.dark .summary-card h3 { color: var(--dark-text-muted); }
html.dark .summary-card.income .amount  { color: #34d399; }
html.dark .summary-card.expenses .amount { color: #f87171; }
html.dark .summary-card.balance .amount  { color: #5DEDC6; }

html.dark .tracker-section {
    background: var(--dark-bg-raised);
    color: var(--dark-text);
    box-shadow: 0 2px 12px rgba(0,0,0,0.3);
}
html.dark .tracker-section h2 { color: var(--dark-text); }
html.dark .tracker-section label { color: var(--dark-text-muted); }

html.dark .type-btn {
    background: var(--dark-bg-card);
    border-color: var(--dark-border);
    color: var(--dark-text);
}
html.dark .type-btn:hover { border-color: #5DEDC6; }
html.dark .type-btn.active.income {
    background: rgba(16,185,129,0.2);
    border-color: #10b981;
    color: #6ee7b7;
}
html.dark .type-btn.active.expense {
    background: rgba(239,68,68,0.2);
    border-color: #ef4444;
    color: #fca5a5;
}

html.dark .filter-btn {
    background: var(--dark-bg-card);
    border-color: var(--dark-border);
    color: var(--dark-text-muted);
}
html.dark .filter-btn:hover { border-color: #5DEDC6; color: var(--dark-text); }
html.dark .filter-btn.active {
    background: #1d8a70;
    border-color: #1d8a70;
    color: white;
}

html.dark .transaction-item {
    background: var(--dark-bg-card);
    color: var(--dark-text);
}
html.dark .transaction-item:hover { background: var(--dark-border); }
html.dark .transaction-info h4 { color: var(--dark-text); }
html.dark .transaction-info .date { color: var(--dark-text-muted); }

html.dark .empty-state { color: var(--dark-text-muted); }

/* Stats strip */
html.dark .stats-strip { background: linear-gradient(135deg, #29a88a 0%, #1d8a70 100%); }

/* ── Contact Us ── */
html.dark .contact-hero { background: linear-gradient(135deg, #29a88a 0%, #1d8a70 100%); }
html.dark .contact-section {
    background: var(--dark-bg-raised);
    color: var(--dark-text);
}
html.dark .contact-section h2 { color: var(--dark-text); }
html.dark .contact-section p  { color: var(--dark-text-muted); }
html.dark .contact-section label { color: var(--dark-text-muted); }
html.dark .info-card {
    background: var(--dark-bg-raised);
    color: var(--dark-text);
}
html.dark .info-card h3 { color: var(--dark-text); }
html.dark .info-card p  { color: var(--dark-text-muted); }
/* contact form category badges */
html.dark .contact-section .category-badge {
    background: var(--dark-bg-card);
    border-color: var(--dark-border);
    color: var(--dark-text);
}
html.dark .contact-section .category-badge:hover { border-color: #5DEDC6; }
html.dark .contact-section .category-badge.selected {
    background: #1d8a70;
    border-color: #1d8a70;
    color: white;
}
html.dark .char-counter { color: var(--dark-text-muted); }

/* ── Admin pages ── */
html.dark .admin-hero { background: linear-gradient(135deg, #29a88a 0%, #1d8a70 100%); }
html.dark .admin-section {
    background: var(--dark-bg-raised);
    color: var(--dark-text);
}
html.dark .admin-section h2 { color: var(--dark-text); }
html.dark .stat-card {
    background: var(--dark-bg-raised);
    color: var(--dark-text);
}
html.dark .stat-card .stat-number { color: var(--dark-text); }
html.dark .stat-card .stat-label  { color: var(--dark-text-muted); }
html.dark .suggestion-card {
    background: var(--dark-bg-card);
    color: var(--dark-text);
}
html.dark .suggestion-card:hover { background: var(--dark-border); }
html.dark .suggestion-card.unread {
    background: rgba(16,185,129,0.1);
    border-left-color: #10b981;
}
html.dark .suggestion-message { color: var(--dark-text-muted); }
/* Bootstrap nav-tabs */
html.dark .nav-tabs { border-color: var(--dark-border); }
html.dark .nav-tabs .nav-link {
    color: var(--dark-text-muted);
    border-color: transparent;
}
html.dark .nav-tabs .nav-link:hover {
    color: var(--dark-text);
    border-color: var(--dark-border);
    background: var(--dark-bg-card);
}
html.dark .nav-tabs .nav-link.active {
    background: var(--dark-bg-raised);
    color: var(--dark-text);
    border-color: var(--dark-border) var(--dark-border) var(--dark-bg-raised);
}

/* ── Article Details ── */
html.dark .article-hero { background: linear-gradient(135deg, #c2550f 0%, #1d8a70 100%); }
html.dark .article-section { background: var(--dark-bg); }
html.dark .article-info-card {
    background: var(--dark-bg-raised);
    color: var(--dark-text);
}
html.dark .article-info-card strong { color: var(--dark-text); }
html.dark .article-info-card div    { color: var(--dark-text-muted); }
html.dark .article-content-card {
    background: var(--dark-bg-raised);
    color: var(--dark-text);
}
html.dark .article-body { color: var(--dark-text); }
html.dark .article-body h1, html.dark .article-body h2,
html.dark .article-body h3, html.dark .article-body h4 { color: var(--dark-text); }
html.dark .article-body p, html.dark .article-body li { color: var(--dark-text-muted); }
html.dark .article-body a { color: #5DEDC6; }
html.dark .article-body table th { background: var(--dark-bg-card); color: var(--dark-text); }
html.dark .article-body table td { background: var(--dark-bg-raised); color: var(--dark-text); border-color: var(--dark-border); }

/* Article actions bar (Edit/Back buttons row) */
html.dark .article-actions {
    background: var(--dark-bg-raised);
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}

/* Empty state (no articles in section) */
html.dark .empty-subsections {
    background: var(--dark-bg-raised);
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}
html.dark .empty-subsections h3 { color: var(--dark-text); }
html.dark .empty-subsections p  { color: var(--dark-text-muted); }

/* Article action buttons */
html.dark .btn-back {
    background: var(--dark-bg-card);
    color: var(--dark-text-muted);
}
html.dark .btn-back:hover {
    background: var(--dark-border);
    color: var(--dark-text);
}

/* Form card text */
html.dark .form-card-header h2 { color: var(--dark-text); }
html.dark .form-card-header p  { color: var(--dark-text-muted); }
html.dark .form-label-styled   { color: var(--dark-text); }
html.dark .form-label          { color: var(--dark-text-muted); }

/* Custom alert variants */
html.dark .alert-success-custom {
    background: rgba(16,185,129,0.15);
    color: #6ee7b7;
}
html.dark .alert-error-custom {
    background: rgba(239,68,68,0.15);
    color: #fca5a5;
}

/* Bootstrap alerts */
html.dark .alert-success {
    background: rgba(16,185,129,0.15);
    border-color: #10b981;
    color: #6ee7b7;
}
html.dark .alert-danger {
    background: rgba(239,68,68,0.15);
    border-color: #ef4444;
    color: #fca5a5;
}

/* Bootstrap accordion (testing reports) */
html.dark .accordion-item {
    background: var(--dark-bg-raised);
    border-color: var(--dark-border) !important;
    color: var(--dark-text);
}
html.dark .accordion-button {
    background: var(--dark-bg-raised);
    color: var(--dark-text);
    box-shadow: none;
}
html.dark .accordion-button:not(.collapsed) {
    background: var(--dark-bg-card);
    color: var(--dark-text);
}
html.dark .accordion-button::after { filter: invert(1); }
html.dark .accordion-body {
    background: var(--dark-bg-card);
    color: var(--dark-text-muted);
}

/* Bootstrap table — override cell-level backgrounds (Bootstrap 5 sets them inline via CSS vars) */
html.dark .table {
    --bs-table-bg: var(--dark-bg-raised);
    --bs-table-color: var(--dark-text);
    --bs-table-border-color: var(--dark-border);
    --bs-table-striped-bg: var(--dark-bg-card);
    --bs-table-hover-bg: var(--dark-border);
}
html.dark .table > :not(caption) > * > * {
    background-color: var(--dark-bg-raised) !important;
    color: var(--dark-text) !important;
    border-bottom-color: var(--dark-border) !important;
}
/* thead */
html.dark .table-light, html.dark thead.table-light tr {
    background: var(--dark-bg-card) !important;
    color: var(--dark-text) !important;
}
html.dark .table-light th { color: var(--dark-text-muted) !important; border-color: var(--dark-border) !important; }

/* Bootstrap code elements */
html.dark code {
    background: rgba(255,255,255,0.08);
    color: #5DEDC6;
}

/* Privacy page */
html.dark .privacy-hero { background: linear-gradient(135deg, #29a88a 0%, #1d8a70 100%); }
html.dark .privacy-card {
    background: var(--dark-bg-raised);
    color: var(--dark-text);
}
html.dark .privacy-card h2 { color: var(--dark-text); }
html.dark .privacy-card p,
html.dark .privacy-card li { color: var(--dark-text-muted); }
html.dark .quick-summary {
    background: rgba(29,138,112,0.15);
    border-color: #1d8a70;
}
html.dark .quick-summary h2 { color: var(--dark-text); }
html.dark .quick-summary .point span { color: var(--dark-text-muted); }

/* Category badges in dark mode — slightly transparent tints */
html.dark .category-food        { background: rgba(254,243,199,0.15); color: #fcd34d; }
html.dark .category-transport   { background: rgba(219,234,254,0.15); color: #93c5fd; }
html.dark .category-entertainment { background: rgba(252,231,243,0.15); color: #f9a8d4; }
html.dark .category-bills       { background: rgba(224,231,255,0.15); color: #a5b4fc; }
html.dark .category-shopping    { background: rgba(204,251,241,0.15); color: #5DEDC6; }
html.dark .category-salary      { background: rgba(209,250,229,0.15); color: #6ee7b7; }
html.dark .category-freelance   { background: rgba(221,214,254,0.15); color: #c4b5fd; }
html.dark .category-gift        { background: rgba(252,231,243,0.15); color: #f9a8d4; }
html.dark .category-other       { background: rgba(243,244,246,0.1);  color: var(--dark-text-muted); }

/* ═══════════════════════════════
   ARTICLE CARDS (section page)
═══════════════════════════════ */

.article-card {
    border-radius: 18px;
    padding: 2rem 1.6rem 2rem;
    box-shadow: 0 2px 12px rgba(0,0,0,0.07);
    position: relative;
    min-height: 160px;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.article-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 24px rgba(0,0,0,0.11);
}

.article-card-link {
    text-decoration: none !important;
    color: inherit;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 0.5rem;
}

.article-card-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: #1e293b;
    line-height: 1.3;
}

.article-card-summary {
    font-size: 0.9rem;
    color: #475569;
    line-height: 1.5;
    flex: 1;
}

.article-card-meta {
    font-size: 0.78rem;
    color: #94a3b8;
    margin-top: 0.5rem;
}

/* Admin menu */
.article-card-menu {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    z-index: 10;
}

.article-card-menu-btn {
    background: rgba(255,255,255,0.85);
    border: none;
    border-radius: 8px;
    width: 34px;
    height: 34px;
    font-size: 1rem;
    cursor: pointer;
    color: #475569;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s, color 0.15s;
    box-shadow: 0 1px 4px rgba(0,0,0,0.1);
}

.article-card-menu-btn:hover { background: #fff; color: #1e293b; }

.article-card-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    background: white;
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.15);
    min-width: 140px;
    overflow: hidden;
    z-index: 9999;
}

.article-card-dropdown.show { display: block; }

.article-card-dropdown a,
.article-card-dropdown button {
    display: block;
    width: 100%;
    padding: 0.55rem 1rem;
    font-size: 0.88rem;
    color: #1e293b;
    text-decoration: none;
    background: none;
    border: none;
    text-align: left;
    cursor: pointer;
    transition: background 0.12s;
}

.article-card-dropdown a:hover,
.article-card-dropdown button:hover { background: #f1f5f9; }

/* Drag handle on card — hidden until hover */
.article-card-drag {
    position: absolute;
    bottom: 0.6rem;
    left: 0.75rem;
    font-size: 1rem;
    color: transparent;
    cursor: grab;
    padding: 0;
    transition: color 0.15s;
}

.article-card:hover .article-card-drag { color: #cbd5e1; }
.article-card-drag:hover { color: #64748b !important; }
.article-card-drag:active { cursor: grabbing; }

.sortable-ghost .article-card { opacity: 0.35; }
