/* Design System & Stylesheet - Antigravity Knowledge Base (AKB) */

/* --- Custom Properties & Themes --- */
:root {
    /* Spacing Scale */
    --space-4: 4px;
    --space-8: 8px;
    --space-12: 12px;
    --space-16: 16px;
    --space-20: 20px;
    --space-24: 24px;
    --space-32: 32px;
    --space-40: 40px;
    --space-44: 44px;
    --space-64: 64px;
    --space-80: 80px;
    --space-96: 96px;
    --space-108: 108px;

    /* Enterprise Tech Precision Typography Stack */
    --font-display: 'Sora', 'Manrope', system-ui, sans-serif;
    --font-heading: 'Sora', 'Manrope', system-ui, sans-serif;
    --font-body: 'Manrope', system-ui, -apple-system, sans-serif;
    --font-code: 'JetBrains Mono', 'Fira Code', Consolas, monospace;

    /* Border Radius Scale */
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 14px;
    --radius-xl: 18px;
    --radius-pill: 9999px;
    --radius-50: 50%;
    --radius-0: 0px;

    /* Backward compatibility mappings for border radius */
    --radius-4: var(--radius-sm);
    --radius-8: var(--radius-md);
    --radius-12: var(--radius-lg);
    --radius-16: var(--radius-xl);

    /* Refined Shadows & Glass Strokes */
    --shadow-card: 0 1px 3px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.24);
    --shadow-elevated: 0 10px 25px -5px rgba(0, 0, 0, 0.3), 0 8px 10px -6px rgba(0, 0, 0, 0.3);

    /* Backward compatibility mappings for shadows */
    --shadow-raised: var(--shadow-card);
    --shadow-floating: var(--shadow-elevated);
    --shadow-lifted: var(--shadow-elevated);
    --shadow-aerial: var(--shadow-elevated);

    /* Motion Scales */
    --duration-fast: 150ms;
    --duration-base: 200ms;
    --duration-slow: 300ms;
    --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
    --easing: var(--ease-out);
}

:root[data-theme="dark"] {
    --bg-primary: #0B0F17; /* Deep Obsidian */
    --bg-secondary: #111827; /* Elevated Card Surface */
    --bg-tertiary: #1F2937; /* Interactive Hover State */
    --border-color: rgba(255, 255, 255, 0.08); /* Crisp Subtle Stroke */
    --border-color-hover: rgba(255, 255, 255, 0.16);
    --text-primary: #F9FAFB;
    --text-secondary: #D1D5DB;
    --text-muted: #9CA3AF;
    --accent: #3B82F6; /* Electric Cobalt Blue */
    --accent-hover: #60A5FA;
    --accent-glow: rgba(59, 130, 246, 0.14);
    --accent-gradient: linear-gradient(135deg, #2563EB, #1D4ED8);
    --card-bg: #111827;
    --sidebar-bg: #070A10;
    --input-bg: #111827;
    --shadow: var(--shadow-elevated);
    
    --success: #10B981;
    --warning: #F59E0B;
    --danger: #EF4444;
    --info: #3B82F6;
}

:root[data-theme="light"] {
    --bg-primary: #F8FAFC;
    --bg-secondary: #FFFFFF;
    --bg-tertiary: #F1F5F9;
    --border-color: #E2E8F0;
    --border-color-hover: #CBD5E1;
    --text-primary: #0F172A;
    --text-secondary: #334155;
    --text-muted: #64748B;
    --accent: #2563EB;
    --accent-hover: #1D4ED8;
    --accent-glow: rgba(37, 99, 235, 0.1);
    --accent-gradient: linear-gradient(135deg, #2563EB, #1E40AF);
    --card-bg: #FFFFFF;
    --sidebar-bg: #F8FAFC;
    --input-bg: #FFFFFF;
    --shadow: var(--shadow-card);

    --success: #059669;
    --warning: #D97706;
    --danger: #DC2626;
    --info: #2563EB;
}

/* --- Base & Reset --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -ms-overflow-style: none;  /* IE and Edge */
    scrollbar-width: none;  /* Firefox */
}
*::-webkit-scrollbar {
    display: none;  /* Chrome, Safari and Opera */
}

body {
    font-family: var(--font-body);
    font-size: 13px;
    font-weight: 600;
    line-height: 1.45;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    transition: background-color var(--duration-slow) var(--easing), color var(--duration-slow) var(--easing);
    height: 100vh;
    overflow: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a {
    color: var(--accent);
    text-decoration: none;
    transition: color var(--duration-base) var(--ease-out), text-decoration var(--duration-base) var(--ease-out);
}
@media (hover: hover) and (pointer: fine) {
    a:hover {
        color: var(--accent-hover);
    }
}

input, textarea, select {
    font-family: inherit;
    font-size: 13px; /* Monospace placeholders/technical, or 13px small text */
    color: var(--text-primary);
    background-color: var(--input-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-8);
    padding: 10px 14px;
    outline: none;
    height: 40px;
    max-width: 100%;
    transition: border-color var(--duration-base) var(--ease-out), box-shadow var(--duration-base) var(--ease-out);
}
input:focus, textarea:focus, select:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

/* --- App Layout Layout --- */
.app-container {
    display: flex;
    height: 100vh;
    background-color: var(--bg-primary);
    overflow: hidden;
}

/* --- Sidebar Overlay for Mobile --- */
.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(0px);
    z-index: 999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease, backdrop-filter 0.3s ease;
}
.sidebar-overlay.active {
    opacity: 1;
    pointer-events: auto;
    backdrop-filter: blur(4px);
}

/* --- Sidebar --- */
.app-sidebar {
    width: 260px;
    background-color: var(--sidebar-bg);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    padding: var(--space-24);
    position: relative; /* In flow on desktop */
    height: 100vh;
    flex-shrink: 0;
    z-index: 1000;
}

.sidebar-close {
    position: absolute;
    top: var(--space-16);
    right: var(--space-16);
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 28px;
    cursor: pointer;
    display: none; /* Hidden on desktop */
    width: 44px;
    height: 44px;
    min-width: 44px;
    min-height: 44px;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-50);
    transition: background-color 0.2s ease;
}
.sidebar-close:hover {
    background-color: var(--bg-tertiary);
}

.sidebar-brand-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: var(--space-8);
    margin-bottom: var(--space-24);
    text-align: center;
    width: 100%;
}
.brand-logo-img {
    max-width: 100%;
    max-height: 70px;
    height: auto;
    object-fit: contain;
    margin-bottom: var(--space-8);
    display: block;
    background: rgba(255, 255, 255, 0.95);
    padding: var(--space-8) var(--space-12);
    border-radius: var(--radius-8);
    box-shadow: var(--shadow-floating);
}
.brand-subtitle {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 13px; /* Caption scale */
    color: var(--text-secondary);
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.sidebar-menu {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    gap: var(--space-8);
}
.menu-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--text-muted);
    margin: var(--space-20) 0 var(--space-8) var(--space-8);
    letter-spacing: 0.08em;
}
.menu-item {
    display: flex;
    align-items: center;
    gap: var(--space-12);
    padding: 10px 14px;
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 13.5px;
    line-height: 1.4;
    position: relative;
    transition: background-color var(--duration-fast) var(--ease-out), 
                color var(--duration-fast) var(--ease-out),
                border-color var(--duration-fast) var(--ease-out);
}
.menu-item:hover {
    background-color: var(--bg-tertiary);
    color: var(--text-primary);
}
.menu-item:active {
    transform: scale(0.98);
}
.menu-item.active {
    background-color: var(--accent-glow);
    color: var(--text-primary);
    font-weight: 700;
}
.menu-item.active::before {
    content: '';
    position: absolute;
    left: -12px;
    top: 20%;
    bottom: 20%;
    width: 4px;
    background-color: var(--accent);
    border-radius: 0 4px 4px 0;
}
.menu-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    transition: color var(--duration-fast) var(--ease-out);
}
.menu-item:hover .menu-icon,
.menu-item.active .menu-icon {
    color: var(--accent);
}
.menu-icon-svg {
    display: block;
}

.sidebar-menu-badge {
    margin-left: auto;
    font-size: 11px;
    font-weight: 700;
    font-family: var(--font-mono);
    padding: 2px 7px;
    border-radius: var(--radius-pill);
    background-color: var(--bg-tertiary);
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
    line-height: 1.2;
    transition: all var(--duration-fast) var(--ease-out);
}
.menu-item:hover .sidebar-menu-badge {
    color: var(--text-primary);
    border-color: var(--border-hover);
    background-color: var(--bg-secondary);
}
.menu-item.active .sidebar-menu-badge {
    background-color: var(--accent);
    color: #FFFFFF;
    border-color: var(--accent);
    box-shadow: 0 0 10px rgba(59, 130, 246, 0.4);
}

.sidebar-footer {
    padding-top: var(--space-16);
    border-top: 1px solid var(--border-color);
}

.user-badge {
    display: flex;
    align-items: center;
    gap: var(--space-12);
    margin-bottom: var(--space-16);
}
.user-avatar {
    width: 36px;
    height: 36px;
    background: var(--accent-gradient);
    border-radius: var(--radius-50);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 700;
    font-size: 16px;
}
.user-info {
    display: flex;
    flex-direction: column;
}
.user-name {
    font-weight: 700;
    font-size: 14px;
    color: var(--text-primary);
}
.user-role {
    font-size: 13px;
    color: var(--text-muted);
    font-weight: 700;
    letter-spacing: 0.5px;
}

.auth-buttons {
    display: flex;
    flex-direction: column;
    gap: var(--space-8);
}

/* --- Main wrapper --- */
.main-wrapper {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
    height: 100vh;
    overflow: hidden;
}

/* --- Header --- */
.app-header {
    height: 68px; /* Clean height (well within Section 4.7 cap of 80px) */
    border-bottom: 1px solid var(--border-color);
    border-top: none;
    padding: 0 var(--space-32);
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    background-color: rgba(11, 15, 23, 0.85); /* Deep obsidian glass */
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    z-index: 99;
}

:root[data-theme="light"] .app-header {
    background-color: rgba(248, 250, 252, 0.88);
}

.menu-hamburger {
    background: none;
    border: 1px solid transparent;
    color: var(--text-secondary);
    cursor: pointer;
    display: none; /* Hidden on desktop */
    padding: var(--space-8);
    border-radius: var(--radius-md);
    align-items: center;
    justify-content: center;
    transition: all var(--duration-fast) var(--ease-out);
}
.menu-hamburger:hover {
    background-color: var(--bg-tertiary);
    color: var(--text-primary);
    border-color: var(--border-color);
}
.menu-hamburger:active {
    transform: scale(0.96);
}

.header-search {
    position: relative;
    width: 100%;
    max-width: 440px;
    margin: 0 var(--space-16);
}
.search-form {
    display: flex;
    align-items: center;
    position: relative;
    width: 100%;
}
.search-form {
    display: flex;
    align-items: center;
    position: relative;
    width: 100%;
}
.search-icon {
    position: absolute;
    left: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    pointer-events: none;
    transition: color var(--duration-fast) var(--ease-out);
}
.search-form:focus-within .search-icon {
    color: var(--accent);
}
.search-form input {
    width: 100%;
    height: 38px;
    padding-left: 40px;
    padding-right: 76px;
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 13.5px;
    color: var(--text-primary);
    transition: all var(--duration-fast) var(--ease-out);
}
.search-form input::placeholder {
    color: var(--text-muted);
    font-size: 13px;
}
.search-form input:focus {
    background-color: var(--bg-primary);
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

/* --- Header Unified Search & Filter Bar --- */
.header-search {
    position: relative;
    width: 100%;
    max-width: 880px;
    margin: 0 var(--space-16);
    display: flex;
    align-items: center;
    gap: 10px;
}

.header-unified-filter-bar {
    display: flex;
    align-items: center;
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    height: 40px;
    flex: 1;
    position: relative;
    transition: all var(--duration-fast) var(--ease-out);
}
.header-unified-filter-bar:focus-within {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-glow);
    background-color: var(--bg-primary);
}

.search-input-section {
    position: relative;
    flex: 1;
    display: flex;
    align-items: center;
    min-width: 160px;
}
.search-input-section input {
    width: 100%;
    height: 38px;
    padding-left: 36px;
    padding-right: 64px;
    background: transparent;
    border: none;
    outline: none;
    box-shadow: none !important;
    font-size: 13.5px;
    color: var(--text-primary);
}
.search-input-section input::placeholder {
    color: var(--text-muted);
    font-size: 13px;
}
.search-input-section .search-icon {
    position: absolute;
    left: 12px;
    display: flex;
    align-items: center;
    color: var(--text-muted);
    pointer-events: none;
}
.search-input-section:focus-within .search-icon {
    color: var(--accent);
}

.header-filter-divider {
    width: 1px;
    height: 22px;
    background-color: var(--border-color);
    flex-shrink: 0;
}

.header-filter-control {
    position: relative;
    display: flex;
    align-items: center;
    padding: 0 8px;
    flex-shrink: 0;
}
.header-filter-icon {
    color: var(--text-muted);
    pointer-events: none;
    margin-right: 4px;
    flex-shrink: 0;
}
.header-filter-select {
    background: transparent;
    border: none;
    outline: none;
    font-size: 12.5px;
    font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
    padding-right: 18px;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 24 24' fill='none' stroke='%2394A3B8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 2px center;
    max-width: 145px;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.header-filter-select:hover, .header-filter-select:focus {
    color: var(--text-primary);
}

.header-filter-clear-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 6px;
    margin-right: 8px;
    color: var(--text-muted);
    border-radius: var(--radius-sm);
    text-decoration: none;
    transition: all var(--duration-fast) var(--ease-out);
    flex-shrink: 0;
}
.header-filter-clear-btn:hover {
    color: #ef4444;
    background-color: rgba(239, 68, 68, 0.1);
}

.search-shortcut-hint {
    position: absolute;
    right: 10px;
    display: flex;
    align-items: center;
    gap: 3px;
    pointer-events: none;
    user-select: none;
}
.kbd-key {
    font-family: var(--font-code);
    font-size: 10.5px;
    font-weight: 600;
    line-height: 1;
    padding: 3px 5px;
    border-radius: 4px;
    background-color: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    box-shadow: 0 1px 1px rgba(0, 0, 0, 0.15);
}

/* --- View Switcher Group (Segmented Controls) --- */
.view-switcher-group {
    display: inline-flex;
    align-items: center;
    background-color: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 3px;
    gap: 3px;
    flex-shrink: 0;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.btn-view-toggle {
    appearance: none;
    -webkit-appearance: none;
    background: transparent;
    border: 1px solid transparent;
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-family: var(--font-body);
    font-size: 12.5px;
    font-weight: 600;
    line-height: 1.2;
    padding: 6px 12px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    user-select: none;
    transition: all var(--duration-fast) var(--ease-out);
}

.btn-view-toggle svg {
    flex-shrink: 0;
    display: block;
    color: inherit;
}

.btn-view-toggle:hover {
    color: var(--text-primary);
    background-color: var(--bg-secondary);
}

.btn-view-toggle:active {
    transform: scale(0.97);
}

.btn-view-toggle.active {
    background-color: var(--bg-primary);
    color: var(--accent);
    border-color: var(--border-color);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
    font-weight: 700;
}

:root[data-theme="dark"] .btn-view-toggle.active {
    background-color: var(--bg-card);
    color: var(--accent);
    border-color: rgba(59, 130, 246, 0.25);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.35);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: var(--space-16);
}

.header-user-section {
    display: flex;
    align-items: center;
    gap: var(--space-12);
}

/* Theme Toggle Button */
.theme-toggle-btn {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    cursor: pointer;
    width: 38px;
    height: 38px;
    min-width: 38px;
    min-height: 38px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--duration-fast) var(--ease-out);
}
.theme-toggle-btn:hover {
    background-color: var(--bg-tertiary);
    color: var(--text-primary);
    border-color: var(--border-color-hover);
}
.theme-toggle-btn:active {
    transform: scale(0.95);
}
[data-theme="dark"] .theme-icon-dark { display: none; }
[data-theme="dark"] .theme-icon-light { display: block; }
[data-theme="light"] .theme-icon-dark { display: block; }
[data-theme="light"] .theme-icon-light { display: none; }

/* --- Search Autocomplete Dropdown --- */
.search-autocomplete-dropdown {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    margin-top: 0;
    max-height: 320px;
    overflow-y: auto;
    box-shadow: var(--shadow-elevated);
    display: none;
    z-index: 100;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}
.autocomplete-item {
    display: block;
    padding: var(--space-12) var(--space-16);
    border-bottom: 1px solid var(--border-color);
    color: var(--text-primary);
    transition: background-color var(--duration-fast) var(--ease-out);
}
.autocomplete-item:last-child {
    border-bottom: none;
}
.autocomplete-item:hover {
    background-color: var(--bg-tertiary);
    color: var(--text-primary);
}
.autocomplete-item-title {
    font-weight: 600;
    font-size: 13.5px;
    margin-bottom: 3px;
}
.autocomplete-item-meta {
    font-size: 12px;
    color: var(--text-muted);
}
.autocomplete-no-results {
    padding: var(--space-16);
    text-align: center;
    color: var(--text-muted);
    font-size: 13px;
}
.highlight-query {
    color: var(--accent);
    font-weight: 600;
}
mark {
    background-color: rgba(245, 158, 11, 0.25);
    color: var(--text-primary);
    border-radius: var(--radius-sm);
    padding: 0 3px;
}

/* --- Main content body --- */
.app-content {
    flex: 1;
    padding: var(--space-20) var(--space-32);
    overflow-y: auto;
    min-height: 0;
}

.app-footer {
    flex-shrink: 0;
    padding: var(--space-16) var(--space-32);
    border-top: 1px solid var(--border-color);
    text-align: center;
    color: var(--text-muted);
    font-size: 13px;
    background-color: var(--bg-primary);
}

/* --- Dashboard Container Layout --- */
.dashboard-grid, .dashboard-container {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: var(--space-24);
    width: 100%;
    height: 100%;
    min-height: 0;
}

@media (max-width: 1080px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
        height: auto;
        overflow-y: auto;
    }
}

.dashboard-main {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.feed-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-20);
    padding-bottom: var(--space-12);
    border-bottom: 1px solid var(--border-color);
}
.feed-title {
    font-family: var(--font-display);
    font-size: 20px;
    font-weight: 700;
    line-height: 1.3;
}
.feed-subtitle {
    color: var(--text-secondary);
    font-size: 13.5px;
    margin-top: 2px;
}

.articles-feed {
    flex: 1;
    overflow-y: auto;
    padding-right: var(--space-4);
    width: 100%;
}

/* Retângulos: Grid de 2 colunas amplas ao lado da barra lateral */
.articles-feed.view-rectangles {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
    gap: var(--space-20);
}
@media (max-width: 900px) {
    .articles-feed.view-rectangles {
        grid-template-columns: 1fr;
    }
}
.articles-feed.view-rectangles .card-title {
    font-size: 17px;
    -webkit-line-clamp: 2;
}
.articles-feed.view-rectangles .card-excerpt p {
    -webkit-line-clamp: 3;
}

/* Listas: Linha horizontal espaçosa, legível e confortável */
.articles-feed.view-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-12);
}
.articles-feed.view-list .article-card {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-20);
    min-height: 84px;
    height: auto;
    padding: var(--space-16) var(--space-24);
    border-radius: var(--radius-12);
    overflow: visible;
}
.articles-feed.view-list .card-header {
    display: flex;
    flex-direction: column;
    gap: var(--space-6);
    flex: 1 1 auto;
    min-width: 0; /* Permite truncamento correto do flex child */
}
.articles-feed.view-list .card-metadata {
    margin-bottom: 0;
    gap: var(--space-8);
    font-size: 12px;
    line-height: 1.2;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
}
.articles-feed.view-list .card-title {
    font-size: 16.5px;
    font-weight: 700;
    line-height: 1.35;
    margin-bottom: 0;
}
.articles-feed.view-list .card-title a {
    color: var(--text-primary);
    text-decoration: none;
    transition: color var(--duration-fast) var(--ease-out);
}
.articles-feed.view-list .card-title a:hover {
    color: var(--accent);
}
.articles-feed.view-list .card-excerpt {
    flex: 1 1 35%;
    max-width: 450px;
    margin-bottom: 0;
    font-size: 13.5px;
    line-height: 1.45;
    color: var(--text-secondary);
}
.articles-feed.view-list .card-excerpt p {
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.articles-feed.view-list .card-footer {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: var(--space-6);
    border-top: none;
    padding-top: 0;
    margin-top: 0;
    flex-shrink: 0;
}
.articles-feed.view-list .card-author {
    font-size: 12px;
    color: var(--text-muted);
}
.articles-feed.view-list .btn-read-more {
    font-size: 13px;
    font-weight: 600;
    padding: 6px 14px;
    background-color: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-6);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    transition: all var(--duration-fast) var(--ease-out);
}
.articles-feed.view-list .btn-read-more:hover {
    background-color: var(--accent);
    color: #ffffff;
    border-color: var(--accent);
}

@media (max-width: 1024px) {
    .articles-feed.view-list .card-excerpt {
        display: none;
    }
}

@media (max-width: 680px) {
    .articles-feed.view-list .article-card {
        flex-direction: column;
        align-items: flex-start;
        gap: var(--space-12);
        padding: var(--space-16);
    }
    .articles-feed.view-list .card-footer {
        flex-direction: row;
        width: 100%;
        justify-content: space-between;
        align-items: center;
        border-top: 1px solid var(--border-color);
        padding-top: var(--space-10);
    }
}
/* Fallback compatibilidade view-squares */
.articles-feed.view-squares {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: var(--space-20);
}
.articles-feed.view-squares .article-card {
    min-height: 240px;
}
.articles-feed.view-squares .card-title {
    font-size: 15.5px;
    line-height: 1.35;
    -webkit-line-clamp: 2;
}
.articles-feed.view-squares .card-excerpt p {
    -webkit-line-clamp: 3;
}
/* --- Article Cards --- */
.article-card {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-16);
    padding: var(--space-20) var(--space-20);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 220px;
    height: 100%;
    overflow: hidden;
    overflow-wrap: anywhere;
    word-break: break-word;
    box-shadow: none;
    transition: background-color var(--duration-base) var(--ease-out), 
                border-color var(--duration-base) var(--ease-out), 
                transform var(--duration-base) var(--ease-out), 
                box-shadow var(--duration-base) var(--ease-out);
}
@media (hover: hover) and (pointer: fine) {
    .article-card:hover {
        background-color: var(--bg-tertiary);
        border-color: var(--accent);
        transform: translateY(-4px);
        box-shadow: var(--shadow-floating);
    }
}
.article-card:active {
    transform: translateY(-2px) scale(0.97);
}

.card-header {
    flex-shrink: 0;
}

.card-metadata {
    display: flex;
    align-items: center;
    gap: var(--space-8);
    font-size: 12.5px;
    color: var(--text-muted);
    margin-bottom: var(--space-8);
    flex-wrap: wrap;
}
.card-category {
    font-weight: 700;
    color: var(--accent);
    text-transform: uppercase;
}
.card-title {
    font-family: var(--font-heading);
    font-size: 16.5px;
    font-weight: 700;
    line-height: 1.35;
    margin-bottom: var(--space-10);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    overflow-wrap: anywhere;
    word-break: break-word;
}
.card-title a {
    color: var(--text-primary);
}
.card-title a:hover {
    color: var(--accent);
}
.card-excerpt {
    color: var(--text-secondary);
    font-size: 13.5px;
    line-height: 1.5;
    margin-bottom: var(--space-14);
    flex-grow: 1;
    overflow: hidden;
}
.card-excerpt p {
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    overflow-wrap: anywhere;
    word-break: break-word;
}
.highlighted-snippet {
    font-style: italic;
    background-color: rgba(64, 156, 255, 0.1);
    padding: var(--space-8) var(--space-12);
    border-radius: var(--radius-4);
    font-size: 13px;
    border-left: 3px solid var(--accent);
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid var(--border-color);
    padding-top: var(--space-12);
    margin-top: auto;
    font-size: 12.5px;
    flex-shrink: 0;
}
.card-author strong {
    color: var(--text-primary);
}
.btn-read-more {
    font-weight: 700;
    color: var(--accent);
    padding: var(--space-4) var(--space-8);
    border-radius: var(--radius-4);
    transition: background-color 0.2s ease;
}
.btn-read-more:hover {
    background-color: var(--accent-glow);
    color: var(--accent-hover);
}

.dashboard-sidebar {
    height: 100%;
    display: flex;
    flex-direction: column;
    gap: var(--space-24);
    min-height: 0;
    overflow: hidden;
}

.dashboard-sidebar .sidebar-card {
    margin-bottom: 0;
}

.dashboard-sidebar .sidebar-card:first-child {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
    overflow: hidden;
}

.dashboard-sidebar .sidebar-card:first-child .card-body {
    flex: 1;
    overflow-y: auto;
    padding-right: var(--space-4);
}

/* --- Sidebar Cards --- */
.sidebar-card {
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-8);
    padding: var(--space-20);
    margin-bottom: var(--space-24);
    box-shadow: none;
}
.card-header-title {
    font-family: var(--font-heading);
    font-size: 16px;
    font-weight: 700;
    margin-bottom: var(--space-16);
    border-bottom: 1px solid var(--border-color);
    padding-bottom: var(--space-10);
}
.info-card {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.05), rgba(139, 92, 246, 0.05));
    border-color: rgba(99, 102, 241, 0.2);
}

/* --- Category Tree List --- */
.category-tree-list {
    list-style: none;
    padding-left: 0;
    margin: 0;
}
.category-tree-item-node {
    margin: 4px 0;
    list-style: none;
}
.category-tree-row-wrapper {
    display: flex;
    align-items: center;
}
.category-tree-link {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-secondary);
    font-size: 0.9rem;
    padding: 6px 10px;
    border-radius: 6px;
    width: 100%;
    transition: background-color 0.2s ease, color 0.2s ease;
    text-decoration: none;
}
.category-tree-link:hover {
    background-color: var(--bg-tertiary);
    color: var(--text-primary);
}
.active-tree-node {
    background-color: var(--accent-glow) !important;
    color: var(--accent) !important;
    font-weight: 700;
}
.tree-icon {
    font-size: 1rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.category-tree-link .folder-icon {
    transition: transform 0.2s ease, filter 0.2s ease;
    cursor: pointer;
}
.category-tree-link .folder-icon:hover {
    transform: scale(1.2);
    filter: brightness(1.2);
}
.category-tree-list .category-tree-list,
.nested-tree-list {
    margin-top: 2px;
    margin-left: 18px; /* alignment under folder icon */
    padding-left: 10px;
    border-left: 1px dashed var(--border-color);
}
.nested-tree-list {
    display: none;
}
.nested-tree-list.is-expanded {
    display: block;
}
.category-tree-root-link {
    margin-bottom: var(--space-8);
}
.category-tree-root-link .category-name-text {
    font-weight: 700;
}

/* --- Article Show View --- */
.article-details-container {
    width: 100%;
    max-width: 100%;
}
.breadcrumb {
    font-size: 13px; /* Caption scale */
    color: var(--text-muted);
    margin-bottom: var(--space-24);
}
.breadcrumb a {
    color: var(--text-muted);
}
.breadcrumb a:hover {
    color: var(--accent);
}
.article-full {
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-8);
    padding: var(--space-40);
    box-shadow: none;
}
.article-title {
    font-family: var(--font-display);
    font-size: 36px;
    font-weight: 700;
    margin-bottom: var(--space-20);
    letter-spacing: -0.02em;
    font-optical-sizing: auto;
}
.article-meta {
    display: flex;
    align-items: center;
    gap: var(--space-20);
    flex-wrap: wrap;
    color: var(--text-secondary);
    font-size: 14px;
}
.meta-item {
    display: flex;
    align-items: center;
    gap: var(--space-8);
}
.meta-label {
    color: var(--text-muted);
}
.header-divider {
    border: none;
    border-top: 1px solid var(--border-color);
    margin: var(--space-32) 0;
}

/* --- Markdown Body Render Styles --- */
.markdown-body {
    font-size: 16px;
    line-height: 22.4px; /* Body scale */
}
.markdown-body h1, .markdown-body h2, .markdown-body h3, 
.markdown-body h4, .markdown-body h5, .markdown-body h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    margin-top: var(--space-24);
    margin-bottom: var(--space-16);
}
.markdown-body h1 { font-size: 24px; border-bottom: 1px solid var(--border-color); padding-bottom: var(--space-8); }
.markdown-body h2 { font-size: 20px; }
.markdown-body h3 { font-size: 18px; }
.markdown-body p { margin-bottom: var(--space-16); color: var(--text-secondary); }
.markdown-body ul, .markdown-body ol {
    margin-bottom: var(--space-16);
    padding-left: var(--space-24);
}
.markdown-body li {
    margin: var(--space-4) 0;
    color: var(--text-secondary);
}
.markdown-body blockquote {
    border-left: 4px solid var(--accent);
    padding: var(--space-12) var(--space-20);
    background-color: var(--bg-tertiary);
    border-radius: 0 var(--radius-8) var(--radius-8) 0;
    margin-bottom: var(--space-20);
}
.markdown-body blockquote p {
    margin: 0;
    font-style: italic;
}

/* --- Markdown Code Highlights --- */
.markdown-body pre {
    background-color: #0d1117;
    border: 1px solid var(--border-color);
    padding: var(--space-16);
    border-radius: var(--radius-8);
    overflow-x: auto;
    margin-bottom: var(--space-20);
}
.markdown-body code {
    font-family: 'Consolas', 'Courier New', monospace;
    font-size: 13px; /* Monospace caption scale */
    background-color: var(--accent-glow);
    color: var(--accent);
    padding: 2px 6px;
    border-radius: var(--radius-4);
}
.markdown-body pre code {
    background-color: transparent;
    padding: 0;
    color: #e6edf3;
    font-size: 13px;
}

/* --- Markdown Tables --- */
.table-responsive {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    margin-bottom: var(--space-20);
}
.markdown-body table {
    display: block;
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-collapse: collapse;
}
.markdown-body th, .markdown-body td {
    border: 1px solid var(--border-color);
    padding: 10px 14px;
    text-align: left;
}
.markdown-body th {
    background-color: var(--bg-tertiary);
    font-weight: 700;
}
.markdown-body tr:nth-child(even) {
    background-color: rgba(64, 156, 255, 0.05);
}

/* --- Markdown GitHub Alert Blocks --- */
.alert {
    border-left: 4px solid;
    padding: var(--space-16);
    border-radius: 0 var(--radius-8) var(--radius-8) 0;
    margin-bottom: var(--space-20);
}
.alert-title {
    font-family: var(--font-heading);
    font-weight: 700;
    display: block;
    margin-bottom: 6px;
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 0.5px;
}
.alert p {
    margin: 0;
    font-size: 0.95rem;
}

.alert-note {
    border-color: var(--info);
    background-color: rgba(59, 130, 246, 0.1);
}
.alert-note .alert-title { color: var(--info); }

.alert-warning {
    border-color: var(--warning);
    background-color: rgba(245, 158, 11, 0.1);
}
.alert-warning .alert-title { color: var(--warning); }

.alert-tip {
    border-color: var(--success);
    background-color: rgba(16, 185, 129, 0.1);
}
.alert-tip .alert-title { color: var(--success); }

.alert-important {
    border-color: #a855f7;
    background-color: rgba(168, 85, 247, 0.1);
}
.alert-important .alert-title { color: #a855f7; }

.alert-caution {
    border-color: var(--danger);
    background-color: rgba(239, 68, 68, 0.1);
}
.alert-caution .alert-title { color: var(--danger); }

/* --- Dual Pane Editor --- */
.editor-page-container {
    width: 100%;
    max-width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
}
.editor-form {
    height: 100%;
    display: flex;
    flex-direction: column;
}
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-32);
}
.editor-meta-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: var(--space-20);
    margin-bottom: var(--space-20);
}
.form-group {
    display: flex;
    flex-direction: column;
    gap: var(--space-8);
}
.form-group label {
    font-size: 13px; /* Caption scale */
    font-weight: 700;
    color: var(--text-secondary);
}

.dual-pane-editor {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-24);
    margin-bottom: var(--space-32);
    flex: 1;
    min-height: 0;
}
.single-pane-editor {
    display: block;
    width: 100%;
    margin-bottom: var(--space-32);
}
.single-pane-editor .pane {
    width: 100%;
    min-height: 500px;
    padding: var(--space-20);
    display: flex;
    flex-direction: column;
}
#quillEditor {
    width: 100%;
    min-height: 450px;
    background: var(--bg-primary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    border-radius: 0 0 var(--radius-8) var(--radius-8);
}
.ql-toolbar.ql-snow {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-8) var(--radius-8) 0 0;
    padding: var(--space-12);
}
.ql-container.ql-snow {
    border: 1px solid var(--border-color);
    border-top: none;
    border-radius: 0 0 var(--radius-8) var(--radius-8);
    width: 100%;
}
.ql-editor {
    min-height: 450px;
    font-family: var(--font-body);
    font-size: 15px;
    line-height: 1.7;
    color: var(--text-primary);
    padding: var(--space-20);
    width: 100%;
}
.ql-editor p, .ql-editor h1, .ql-editor h2, .ql-editor h3, .ql-editor h4, .ql-editor blockquote, .ql-editor ul, .ql-editor ol {
    max-width: 100% !important;
    width: 100% !important;
}
.pane {
    display: flex;
    flex-direction: column;
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-8);
    padding: var(--space-20);
    height: 100%;
    min-height: 0;
}
.pane-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-12);
    border-bottom: 1px solid var(--border-color);
    padding-bottom: var(--space-6);
}
.pane-header-row .pane-label {
    margin-bottom: 0;
    border-bottom: none;
    padding-bottom: 0;
}
.pane-label {
    font-size: 13px; /* Caption */
    font-weight: 700;
    text-transform: uppercase;
    color: var(--text-muted);
    letter-spacing: 0.5px;
    margin-bottom: var(--space-12);
    border-bottom: 1px solid var(--border-color);
    padding-bottom: var(--space-6);
}
.upload-btn-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
}
.upload-status-text {
    font-size: 13px;
    color: var(--text-muted);
    font-weight: 500;
}
.upload-status-text.success {
    color: var(--success);
}
.upload-status-text.error {
    color: var(--danger);
}
.pane textarea {
    flex-grow: 1;
    border: none;
    background: transparent;
    resize: none;
    font-family: 'Consolas', 'Courier New', monospace;
    font-size: 14px;
    padding: 0;
    line-height: 1.5;
    color: var(--text-primary);
}
.pane textarea:focus {
    box-shadow: none;
}
.preview-output {
    flex-grow: 1;
    overflow-y: auto;
    max-height: 550px;
}

.form-actions {
    display: flex;
    gap: var(--space-12);
}

/* --- Category Management Panel --- */
.categories-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: var(--space-40);
    align-items: start;
}
.categories-list-card, .categories-form-card {
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-8);
    padding: var(--space-24);
    box-shadow: none;
}
.categories-list-card h3, .categories-form-card h3 {
    font-family: var(--font-heading);
    font-size: 20px;
    font-weight: 700;
    margin-bottom: var(--space-20);
}
.categories-table {
    width: 100%;
    border-collapse: collapse;
}
.categories-table th, .categories-table td {
    padding: var(--space-12);
    border-bottom: 1px solid var(--border-color);
    text-align: left;
    font-size: 14px;
}
.categories-table th {
    font-weight: 700;
    color: var(--text-muted);
}
.parent-badge {
    background-color: var(--bg-tertiary);
    padding: 3px 8px;
    border-radius: var(--radius-4);
    font-size: 13px;
}
.form-actions-row {
    display: flex;
    gap: var(--space-8);
    margin-top: var(--space-20);
}

/* --- Auth Card System --- */
body.auth-page-body {
    overflow-y: auto;
    height: auto;
    min-height: 100vh;
}
.auth-page-wrapper {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    width: 100%;
    background-color: var(--bg-primary);
    padding: var(--space-40) var(--space-24);
}
.auth-container {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
}
.auth-card {
    width: 420px;
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-16);
    padding: var(--space-40);
    box-shadow: var(--shadow-floating);
}
.auth-brand {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: var(--space-32);
    text-align: center;
    width: 100%;
}
.auth-logo {
    max-width: 100%;
    max-height: 80px;
    height: auto;
    object-fit: contain;
    margin-bottom: var(--space-8);
    display: block;
    background: rgba(255, 255, 255, 0.95);
    padding: var(--space-8) var(--space-12);
    border-radius: var(--radius-8);
    box-shadow: var(--shadow-floating);
}
.auth-brand-subtitle {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 13px;
    color: var(--text-secondary);
    letter-spacing: 0.5px;
    text-transform: uppercase;
}
.auth-header {
    text-align: center;
    margin-bottom: var(--space-30);
}
.auth-header h2 {
    font-family: var(--font-heading);
    font-size: 24px;
    font-weight: 700;
}
.auth-header p {
    color: var(--text-muted);
    font-size: 14px;
    margin-top: var(--space-4);
}
.auth-form {
    display: flex;
    flex-direction: column;
    gap: var(--space-20);
}
.auth-footer {
    text-align: center;
    margin-top: var(--space-24);
    font-size: 13px;
    color: var(--text-muted);
}

/* --- Alerts & Badges --- */
.flash-alert {
    display: flex;
    align-items: center;
    gap: var(--space-12);
    padding: var(--space-16) var(--space-20);
    border-radius: var(--radius-8);
    margin-bottom: var(--space-24);
    box-shadow: var(--shadow-raised);
    animation: slideIn 0.3s ease;
    transition: opacity 0.5s ease;
}
.alert-success {
    background-color: rgba(16, 185, 129, 0.15);
    border: 1px solid rgba(16, 185, 129, 0.3);
    color: #6ee7b7;
}
.alert-danger {
    background-color: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #fca5a5;
}
.alert-icon {
    font-size: 1.2rem;
}
.alert-message {
    flex-grow: 1;
    font-size: 14px;
    font-weight: 700;
}
.alert-close {
    background: none;
    border: none;
    color: inherit;
    font-size: 1.4rem;
    cursor: pointer;
    line-height: 1;
}

.badge {
    display: inline-block;
    padding: 3px 8px;
    border-radius: var(--radius-16);
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
}
.badge-success { background-color: rgba(16, 185, 129, 0.15); color: #6ee7b7; border: 1px solid rgba(16, 185, 129, 0.3); }
.badge-warning { background-color: rgba(255, 189, 76, 0.15); color: var(--warning); border: 1px solid rgba(255, 189, 76, 0.3); }

/* --- Buttons & Interactive Controls --- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-8);
    font-weight: 600;
    font-size: 14px;
    line-height: 20px;
    letter-spacing: -0.01em;
    font-family: var(--font-body);
    min-height: 36px;
    padding: 8px 18px;
    border-radius: var(--radius-8);
    cursor: pointer;
    border: 1px solid transparent;
    text-decoration: none;
    user-select: none;
    position: relative;
    box-sizing: border-box;
    transition: background-color var(--duration-base) var(--ease-out), 
                border-color var(--duration-base) var(--ease-out), 
                color var(--duration-base) var(--ease-out), 
                box-shadow var(--duration-base) var(--ease-out), 
                transform var(--duration-fast) var(--ease-out);
}

/* Touch Target Expansion (WCAG 2.5.5 / 2.5.8) */
.btn::after {
    content: '';
    position: absolute;
    top: -4px;
    bottom: -4px;
    left: 0;
    right: 0;
    min-height: 44px;
}

/* Focus and Active States */
.btn:focus {
    outline: none;
}
.btn:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
    box-shadow: 0 0 0 4px var(--accent-glow);
}
.btn:active:not(:disabled) {
    transform: scale(0.98);
}

/* Disabled State */
.btn:disabled,
.btn.disabled,
.btn[disabled] {
    opacity: 0.55;
    cursor: not-allowed;
    pointer-events: none;
    transform: none !important;
    box-shadow: none !important;
}

/* Size Variants */
.btn-sm {
    min-height: 32px;
    padding: 6px 14px;
    font-size: 13px;
    line-height: 18px;
    font-weight: 600;
}
.btn-xs {
    min-height: 26px;
    padding: 3px 8px;
    font-size: 12px;
    line-height: 16px;
    font-weight: 600;
    border-radius: var(--radius-4);
}
.btn-lg {
    min-height: 40px;
    padding: 10px 22px;
    font-size: 15px;
    line-height: 20px;
    font-weight: 600;
}
.btn-block {
    display: flex;
    width: 100%;
}

/* Primary Button */
.btn-primary {
    background-color: var(--accent);
    color: #FFFFFF;
    font-weight: 600;
    border-color: transparent;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.12), 0 0 0 1px rgba(255, 255, 255, 0.12) inset;
}
.btn-primary:hover:not(:disabled) {
    background-color: var(--accent-hover);
    color: #FFFFFF;
    transform: translateY(-1px);
    box-shadow: 0 4px 14px var(--accent-glow), 0 1px 3px rgba(0, 0, 0, 0.16);
}
.btn-primary:focus-visible {
    outline: 2px solid var(--accent-hover);
    outline-offset: 2px;
    box-shadow: 0 0 0 4px var(--accent-glow);
}
.btn-primary:active:not(:disabled) {
    transform: translateY(0) scale(0.98);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}
.btn-primary:disabled {
    background-color: var(--bg-tertiary);
    color: var(--text-muted);
    border-color: var(--border-color);
}

/* Secondary Button */
.btn-secondary {
    background-color: var(--bg-tertiary);
    color: var(--text-primary);
    border-color: var(--border-color);
    font-weight: 600;
}
.btn-secondary:hover:not(:disabled) {
    background-color: var(--border-color);
    color: var(--text-primary);
    transform: translateY(-1px);
}
.btn-secondary:focus-visible {
    outline: 2px solid var(--text-muted);
    outline-offset: 2px;
    box-shadow: 0 0 0 4px rgba(148, 163, 184, 0.2);
}

/* Danger Button */
.btn-danger {
    background-color: rgba(239, 68, 68, 0.15);
    color: #f87171;
    border-color: rgba(239, 68, 68, 0.3);
    font-weight: 600;
}
.btn-danger:hover:not(:disabled) {
    background-color: var(--danger);
    color: #FFFFFF;
    border-color: var(--danger);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.25);
}
.btn-danger:focus-visible {
    outline: 2px solid var(--danger);
    outline-offset: 2px;
    box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.25);
}

/* Logout Button */
.btn-logout {
    background-color: rgba(239, 68, 68, 0.1);
    color: #fca5a5;
    border-color: rgba(239, 68, 68, 0.2);
    font-weight: 600;
}
.btn-logout:hover:not(:disabled) {
    background-color: var(--danger);
    color: #FFFFFF;
    border-color: var(--danger);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.25);
}
.btn-logout:focus-visible {
    outline: 2px solid var(--danger);
    outline-offset: 2px;
    box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.25);
}

/* --- Helpers & Animation --- */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-muted { color: var(--text-muted); }
.small { font-size: 13px; }
.mt-4 { margin-top: var(--space-24); }
.ml-auto { margin-left: auto; }
.d-none { display: none !important; }
.img-fluid { max-width: 100%; height: auto; border-radius: var(--radius-4); }

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

/* --- Responsive Adjustments & Breakpoints --- */

/* Tablet & Mobile Collapsing Layout (screens < 1024px) */
@media (max-width: 1023px) {
    body {
        height: auto !important;
        overflow: auto !important;
    }
    .app-container {
        height: auto !important;
        overflow: visible !important;
    }
    .main-wrapper {
        margin-left: 0;
        height: auto !important;
        overflow: visible !important;
    }
    .app-sidebar {
        position: fixed !important;
        transform: translateX(-100%);
        width: 280px;
        box-shadow: none;
    }
    .app-sidebar.active {
        transform: translateX(0);
        box-shadow: var(--shadow-lifted);
    }
    .sidebar-close {
        display: inline-flex;
    }
    .menu-hamburger {
        display: inline-flex;
    }
    .main-wrapper {
        margin-left: 0;
    }
    .dashboard-grid {
        grid-template-columns: 1fr;
        gap: var(--space-32);
        height: auto !important;
    }
    .dashboard-main {
        height: auto !important;
    }
    .articles-feed {
        overflow-y: visible !important;
        height: auto !important;
    }
    .dashboard-sidebar {
        height: auto !important;
        overflow: visible !important;
    }
    .dashboard-sidebar .sidebar-card:first-child {
        height: auto !important;
        overflow: visible !important;
    }
    .dashboard-sidebar .sidebar-card:first-child .card-body {
        overflow-y: visible !important;
    }
    .feed-title {
        font-size: 20px;
        line-height: 26px;
    }
    .app-content {
        padding: var(--space-24);
        height: auto !important;
        overflow-y: visible !important;
    }
    .categories-grid {
        grid-template-columns: 1fr;
        gap: var(--space-24);
    }
    .dual-pane-editor {
        grid-template-columns: 1fr !important;
        gap: var(--space-20);
    }
    .pane {
        height: auto !important;
        min-height: 400px !important;
    }
    .editor-meta-grid {
        grid-template-columns: 1fr !important;
        gap: var(--space-16);
    }
}

/* Helper to hide elements on mobile screens */
@media (max-width: 767px) {
    .hide-mobile {
        display: none !important;
    }

    /* Fluid header search container */
    .header-search {
        flex: 1;
        min-width: 0;
        width: auto !important;
        gap: var(--space-8);
    }

    /* Hide keyboard shortcut hints on mobile / touch viewports */
    #searchShortcutHint,
    .search-shortcut-hint {
        display: none !important;
    }

    /* View Switcher: hide text labels on mobile, keep clean accessible SVG buttons */
    .view-switcher-group span,
    .view-switcher-group .view-toggle-label {
        display: none !important;
    }
    .view-switcher-group .btn-view-toggle {
        padding: 8px 10px;
        min-width: 38px;
        min-height: 38px;
        justify-content: center;
    }

    /* Collapse inline header select dropdowns into main drawer on compact screens */
    .header-filter-divider,
    .header-filter-control {
        display: none !important;
    }

    /* Touch Targets Compliance (WCAG 2.5.5 / 2.5.8) */
    .table-actions {
        gap: 10px;
    }
    .btn-action {
        width: 42px;
        height: 42px;
        min-width: 42px;
        min-height: 42px;
        border-radius: var(--radius-md);
    }
    .btn-action svg {
        width: 16px;
        height: 16px;
    }
    .btn-settings-trigger,
    .theme-toggle-btn {
        width: 42px;
        height: 42px;
        min-width: 42px;
        min-height: 42px;
    }
}

/* Touch Pointer Target Safeguard */
@media (pointer: coarse) {
    #searchShortcutHint,
    .search-shortcut-hint {
        display: none !important;
    }
    .btn-action {
        width: 42px;
        height: 42px;
        min-width: 42px;
        min-height: 42px;
    }
    .btn-settings-trigger,
    .theme-toggle-btn {
        width: 42px;
        height: 42px;
        min-width: 42px;
        min-height: 42px;
    }
}

/* Mobile Specific (screens < 480px) */
@media (max-width: 479px) {
    /* Refined Spacing Scale: Preserving micro-padding and icon breathing room */
    :root {
        --space-4: 4px;
        --space-8: 8px;
        --space-16: 12px;
        --space-20: 14px;
        --space-24: 16px;
        --space-32: 20px;
        --space-40: 24px;
        --space-44: 28px;
        --space-64: 36px;
        --space-80: 48px;
        --space-96: 56px;
        --space-108: 64px;
    }

    .app-header {
        padding: 0 var(--space-12);
        height: 64px;
        gap: var(--space-8);
    }
    .header-search {
        flex: 1;
        min-width: 0;
        width: auto !important;
    }
    .search-input-section input {
        font-size: 13px;
        padding-left: 32px;
        padding-right: 12px;
        height: 38px;
    }
    .search-icon {
        left: 10px;
        font-size: 0.8rem;
    }
    .app-content {
        padding: var(--space-16) var(--space-12);
    }
    .feed-header {
        flex-direction: column;
        align-items: flex-start;
        gap: var(--space-12);
    }
    .feed-title {
        font-size: 18px;
        line-height: 24px;
    }
    
    /* Button Stacking on Mobile */
    .form-actions, .auth-buttons, .form-actions-row {
        flex-direction: column;
        gap: var(--space-12) !important;
    }
    .form-actions .btn, .auth-buttons .btn, .form-actions-row .btn, .btn-block {
        width: 100%;
        display: flex;
    }
    .editor-meta-grid {
        grid-template-columns: 1fr;
        gap: var(--space-16);
    }
    .dual-pane-editor {
        grid-template-columns: 1fr;
        gap: var(--space-20);
    }
    .auth-card {
        width: 100%;
        padding: var(--space-24);
    }
}

/* Large Desktop constraint - REMOVED to allow full screen layout */

/* --- Settings Dropdown & Header Controls System --- */
.settings-container {
    position: relative;
}

.btn-settings-trigger {
    background: transparent;
    border: 1px solid transparent;
    color: var(--text-muted);
    font-size: 16px;
    cursor: pointer;
    padding: 6px;
    width: 38px;
    height: 38px;
    min-width: 38px;
    min-height: 38px;
    border-radius: var(--radius-md);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all var(--duration-fast) var(--ease-out);
}
.btn-settings-trigger:hover {
    background-color: var(--bg-tertiary);
    color: var(--text-primary);
    border-color: var(--border-color);
}
.btn-settings-trigger:active {
    transform: scale(0.95);
}

.settings-dropdown-menu {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: 230px;
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-elevated), 0 0 0 1px var(--border-color);
    z-index: 1010;
    flex-direction: column;
    overflow: hidden;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 6px;
    animation: dropdownFadeIn 0.15s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes dropdownFadeIn {
    from {
        opacity: 0;
        transform: translateY(-4px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.settings-dropdown-item {
    width: 100%;
    text-align: left;
    padding: 8px 12px;
    border: none;
    background: transparent;
    color: var(--text-primary);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    border-radius: var(--radius-md);
    transition: background-color var(--duration-fast) var(--ease-out), color var(--duration-fast) var(--ease-out);
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
}
.settings-dropdown-item:hover {
    background-color: var(--bg-tertiary);
    color: var(--text-primary);
}
.dropdown-item-icon {
    color: var(--text-muted);
    flex-shrink: 0;
    transition: color var(--duration-fast) var(--ease-out);
}
.settings-dropdown-item:hover .dropdown-item-icon {
    color: var(--accent);
}
.dropdown-divider {
    height: 1px;
    background-color: var(--border-color);
    margin: 4px 0;
}
.settings-dropdown-item.btn-danger-item {
    color: #F87171;
}
.settings-dropdown-item.btn-danger-item:hover {
    background-color: rgba(239, 68, 68, 0.12) !important;
    color: #FCA5A5 !important;
}
.settings-dropdown-item.btn-danger-item:hover .dropdown-item-icon {
    color: #FCA5A5 !important;
}

/* Header profile button and logout */
.btn-header-profile {
    padding: 6px 12px;
    height: 32px;
    font-size: 13px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.btn-header-logout {
    padding: 6px 12px;
    height: 32px;
    font-size: 13px;
}
.user-badge-header {
    margin-bottom: 0;
    margin-left: 8px;
    text-decoration: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
}
.user-info-header {
    text-align: right;
}
.auth-buttons-header {
    display: flex;
    gap: 8px;
    align-items: center;
}

/* Modals Refinements */
.modal-danger-banner {
    border-left: 4px solid var(--danger);
    background-color: rgba(239, 68, 68, 0.08);
    padding: 14px 16px;
    border-radius: var(--radius-md);
    margin-bottom: 16px;
}
.modal-danger-title {
    color: var(--danger);
    font-weight: 700;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
    letter-spacing: 0.02em;
}
.modal-danger-text {
    margin: 0;
    font-size: 13.5px;
    line-height: 1.5;
    color: var(--text-secondary);
}
.modal-actions-row {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 20px;
}
.btn-confirm-delete {
    height: 38px;
    padding: 0 16px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.db-password-group {
    margin-top: 16px;
}
.db-password-error {
    color: var(--danger);
    font-size: 13px;
    margin-top: 6px;
    display: none;
}
.db-password-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 20px;
}
.db-connection-modal-desc {
    margin-bottom: var(--space-16);
    font-size: 13.5px;
    line-height: 1.5;
    color: var(--text-muted);
}

/* Modal Overlay Styling */
.custom-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    display: flex;
    opacity: 0;
    visibility: hidden;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    transition: opacity var(--duration-slow) var(--ease-out), 
                visibility var(--duration-slow) var(--ease-out);
}

.custom-modal-overlay.open {
    opacity: 1;
    visibility: visible;
}

/* Modal Dialog */
.custom-modal-dialog {
    width: 460px;
    max-width: 90%;
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-16);
    padding: var(--space-32);
    box-shadow: var(--shadow-aerial);
    color: var(--text-primary);
    transform: scale(0.95);
    opacity: 0;
    transition: transform var(--duration-slow) var(--ease-out), 
                opacity var(--duration-slow) var(--ease-out);
}

.custom-modal-overlay.open .custom-modal-dialog {
    transform: scale(1);
    opacity: 1;
}

.custom-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-20);
    border-bottom: 1px solid var(--border-color);
    padding-bottom: var(--space-12);
}

.custom-modal-header h3 {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 20px;
    margin: 0;
}

.custom-modal-close {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 28px;
    cursor: pointer;
    line-height: 1;
    transition: color 0.2s ease;
}

.custom-modal-close:hover {
    color: var(--text-primary);
}

.custom-modal-body {
    margin-bottom: var(--space-24);
}

.custom-modal-footer {
    display: flex;
    gap: var(--space-12);
    justify-content: flex-end;
    border-top: 1px solid var(--border-color);
    padding-top: var(--space-16);
}

/* Logo Preview */
.logo-preview-container {
    display: flex;
    justify-content: center;
    background: rgba(255, 255, 255, 0.95);
    padding: var(--space-16);
    border-radius: var(--radius-8);
    border: 1px solid var(--border-color);
    margin-bottom: var(--space-20);
    margin-top: var(--space-12);
}

.logo-upload-preview-img {
    max-height: 70px;
    object-fit: contain;
}

.custom-file-upload-label {
    display: inline-block;
    background-color: var(--accent);
    color: #000;
    font-weight: 700;
    padding: 10px 16px;
    border-radius: var(--radius-8);
    cursor: pointer;
    transition: background-color var(--duration-base) var(--ease-out), 
                color var(--duration-base) var(--ease-out), 
                box-shadow var(--duration-base) var(--ease-out), 
                transform var(--duration-fast) var(--ease-out);
    text-align: center;
}
@media (hover: hover) and (pointer: fine) {
    .custom-file-upload-label:hover {
        background-color: var(--accent-hover);
        color: #fff;
        box-shadow: 0 0 10px var(--accent-glow);
    }
}
.custom-file-upload-label:active {
    transform: scale(0.97);
}

.file-name-text {
    margin-left: var(--space-12);
    font-size: 13.5px;
    color: var(--text-muted);
}

.form-control-block {
    width: 100%;
    margin-top: 6px;
}

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

/* --- Articles Count Pill (Header) --- */
.articles-count-pill {
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-16);
    padding: 6px 12px;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-secondary);
    display: inline-flex;
    align-items: center;
    gap: var(--space-8);
    box-shadow: var(--shadow-raised);
    transition: all 0.2s ease;
    user-select: none;
    white-space: nowrap;
}
.articles-count-pill .pill-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background-color: var(--success);
    box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.2);
    transition: all 0.2s ease;
}
.articles-count-pill.has-search-results .pill-dot {
    background-color: var(--info);
    box-shadow: 0 0 0 2px rgba(64, 156, 255, 0.2);
}

/* --- Count Above Title Badge --- */
.count-above-title-badge {
    display: inline-flex;
    align-items: center;
    gap: var(--space-8);
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-4);
    padding: 4px 10px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    box-shadow: var(--shadow-raised);
    user-select: none;
}
.count-above-title-badge .count-badge-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background-color: var(--success);
    box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.2);
}

/* --- DB Option Cards Grid --- */
.db-options-grid {
    display: flex;
    flex-direction: column;
    gap: var(--space-12);
    margin-top: var(--space-16);
}

.db-option-card {
    display: flex;
    align-items: center;
    gap: var(--space-16);
    padding: var(--space-16);
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-12);
    cursor: pointer;
    transition: border-color var(--duration-base) var(--ease-out), 
                background-color var(--duration-base) var(--ease-out), 
                transform var(--duration-base) var(--ease-out), 
                box-shadow var(--duration-base) var(--ease-out);
    position: relative;
    user-select: none;
}
@media (hover: hover) and (pointer: fine) {
    .db-option-card:hover {
        border-color: var(--accent);
        background-color: var(--bg-tertiary);
        transform: translateY(-2px);
        box-shadow: var(--shadow-raised);
    }
}
.db-option-card:active {
    transform: scale(0.98);
}

.db-option-card.selected {
    border-color: var(--accent);
    background-color: var(--accent-glow);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

.hidden-radio {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.db-option-icon {
    font-size: 1.6rem;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    background-color: var(--bg-primary);
    border-radius: var(--radius-8);
    transition: background-color var(--duration-base) var(--ease-out);
}

.db-option-card.selected .db-option-icon {
    background-color: var(--bg-secondary);
}

.db-option-details {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
}

.db-option-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-primary);
}

.db-option-desc {
    font-size: 0.78rem;
    line-height: 1.35;
    color: var(--text-muted);
}

.db-option-check {
    display: flex;
    align-items: center;
    justify-content: center;
    padding-left: var(--space-8);
}

/* Custom radio circle indicator */
.custom-radio-circle {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 2px solid var(--border-color);
    background-color: var(--bg-primary);
    position: relative;
    transition: border-color var(--duration-base) var(--ease-out), 
                background-color var(--duration-base) var(--ease-out);
}

.db-option-card:hover .custom-radio-circle {
    border-color: var(--accent);
}

.db-option-card.selected .custom-radio-circle {
    border-color: var(--accent);
    background-color: var(--accent);
}

.db-option-card.selected .custom-radio-circle::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 8px;
    height: 8px;
    background-color: #ffffff;
    border-radius: 50%;
    transform: translate(-50%, -50%);
}

/* --- Connection Status Badge (Bottom Right) --- */
.connection-status-badge {
    position: fixed;
    bottom: var(--space-20);
    right: var(--space-20);
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-16);
    padding: 6px 12px;
    font-size: 11px;
    font-weight: 600;
    color: var(--text-secondary);
    display: inline-flex;
    align-items: center;
    gap: var(--space-8);
    box-shadow: var(--shadow-lifted);
    z-index: 9999;
    pointer-events: none;
    user-select: none;
    transition: all 0.3s ease;
}
.connection-status-badge .status-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
}
.connection-status-badge .status-dot.dot-turso {
    background-color: var(--success);
    box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.25);
}
.connection-status-badge .status-dot.dot-local {
    background-color: var(--warning);
    box-shadow: 0 0 0 2px rgba(255, 189, 76, 0.25);
}

/* --- Session Timeout Inactivity Status Badge (Bottom Right, Above Connection Badge) --- */
.session-status-badge {
    position: fixed;
    bottom: 54px;
    right: var(--space-20);
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-16);
    padding: 6px 12px;
    font-size: 11px;
    font-weight: 600;
    color: var(--text-secondary);
    display: inline-flex;
    align-items: center;
    gap: var(--space-8);
    box-shadow: var(--shadow-lifted);
    z-index: 9999;
    pointer-events: none;
    user-select: none;
    transition: all 0.3s ease;
}
.session-status-badge .status-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background-color: var(--accent);
    box-shadow: 0 0 0 2px rgba(64, 156, 255, 0.25);
}

/* --- Adjust Primary Button size in Modal Footers to match Secondary Button --- */
.custom-modal-footer .btn-primary {
    height: 32px;
    padding: 0 var(--space-24);
    font-size: 14px;
    border-radius: var(--radius-8);
}

/* --- Instructional Design Features (Feedback & Progress) --- */
.btn-progress-toggle {
    display: inline-flex;
    align-items: center;
    gap: var(--space-8);
    height: 32px;
    padding: 0 var(--space-16);
    font-size: 13.5px;
    font-weight: 600;
    border-radius: var(--radius-8);
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    user-select: none;
}

.btn-progress-toggle.pending {
    background-color: var(--bg-tertiary);
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
}

.btn-progress-toggle.pending:hover {
    background-color: var(--border-color);
    border-color: var(--accent);
    color: var(--text-primary);
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

.btn-progress-toggle.completed {
    background-color: rgba(16, 185, 129, 0.12);
    color: #34d399;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.btn-progress-toggle.completed:hover {
    background-color: rgba(16, 185, 129, 0.2);
    border-color: #10b981;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.2);
}

.footer-divider {
    border: 0;
    height: 1px;
    background: linear-gradient(to right, transparent, var(--border-color) 20%, var(--border-color) 80%, transparent);
    margin: var(--space-40) 0 var(--space-32) 0;
}

.article-feedback-box {
    background: transparent;
    border: none;
    border-radius: 0;
    padding: var(--space-4) 0;
    max-width: 100%;
    margin: var(--space-8) 0;
    box-shadow: none;
    text-align: left;
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--space-8);
    width: 100%;
}

.article-feedback-box:hover {
    box-shadow: none;
    border-color: transparent;
}

.feedback-question {
    font-size: 10.5px;
    font-weight: 600;
    color: var(--text-muted);
}

.feedback-guest-msg {
    font-size: 10px;
    color: var(--text-muted);
    font-style: italic;
}

.feedback-buttons {
    display: inline-flex;
    align-items: center;
    gap: var(--space-4);
    margin: 0;
}

.btn-feedback-choice {
    background-color: transparent;
    color: var(--text-secondary);
    border: 1px solid transparent;
    border-radius: var(--radius-4);
    padding: 2px var(--space-8);
    font-size: 10.5px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: var(--space-4);
    transition: all 0.2s ease;
    user-select: none;
}

.btn-feedback-choice:hover {
    transform: none;
    background-color: rgba(255, 255, 255, 0.05);
    border-color: var(--border-color);
    color: var(--text-primary);
}

.btn-feedback-choice.active-helpful {
    background-color: rgba(59, 130, 246, 0.1);
    color: #60a5fa;
    border-color: rgba(59, 130, 246, 0.3);
    box-shadow: none;
}

.btn-feedback-choice.active-unhelpful {
    background-color: rgba(239, 68, 68, 0.1);
    color: #f87171;
    border-color: rgba(239, 68, 68, 0.3);
    box-shadow: none;
}

.feedback-message {
    font-size: 10.5px;
    font-weight: 600;
    color: var(--success);
    margin: 0;
    animation: fadeIn 0.3s ease;
}

.feedback-stats {
    border: none;
    padding: 0;
    margin: 0;
    font-size: 10.5px;
    color: var(--text-muted);
    display: inline-flex;
    align-items: center;
    gap: var(--space-4);
}

.feedback-stats strong {
    color: var(--accent);
}

.stats-divider {
    color: rgba(255, 255, 255, 0.1);
    user-select: none;
}

/* Accessibility: Support prefers-reduced-motion */
@media (prefers-reduced-motion: reduce) {
    *, ::before, ::after {
        animation-delay: -1ms !important;
        animation-duration: 1ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0s !important;
        scroll-behavior: auto !important;
    }
}

/* --- Enterprise Tech Precision: Reading Measure & Code Formatting --- */
.article-detail-content, .article-body, .article-full, .markdown-body {
    max-width: 100% !important;
    width: 100% !important;
    line-height: 1.7;
    font-size: 15px;
    color: var(--text-secondary);
}

.article-body p, .article-body div, .article-body ul, .article-body ol, 
.article-body blockquote, .article-body pre, .article-body table,
.markdown-body p, .markdown-body div, .markdown-body ul, .markdown-body ol, 
.markdown-body blockquote, .markdown-body pre, .markdown-body table {
    max-width: 100% !important;
    width: 100% !important;
}

.ql-editor {
    max-width: 100% !important;
    width: 100% !important;
    line-height: 1.7;
    font-size: 14.5px;
    color: var(--text-secondary);
}

.article-detail-content h1, .article-detail-content h2, .article-detail-content h3,
.article-body h1, .article-body h2, .article-body h3 {
    font-family: var(--font-heading);
    letter-spacing: -0.02em;
    color: var(--text-primary);
    margin-top: 1.8em;
    margin-bottom: 0.6em;
}

code, pre, .code-block, .ql-syntax {
    font-family: var(--font-code) !important;
    font-size: 13px !important;
}

pre, .ql-syntax {
    background-color: #0B0F19 !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    border-radius: var(--radius-md) !important;
    padding: 16px 20px !important;
    overflow-x: auto;
    color: #E2E8F0 !important;
}

p code, li code {
    background-color: rgba(99, 102, 241, 0.12);
    color: var(--accent-hover);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 12.5px !important;
}

/* ==========================================================================
   USER PROFILE PAGE - Enterprise Swiss Minimalist (ui-ux-pro-max compliant)
   ========================================================================== */

.profile-wrapper {
    max-width: 1040px;
    margin: 0 auto;
    padding: var(--space-12) 0 var(--space-48) 0;
    display: flex;
    flex-direction: column;
    gap: var(--space-24);
}

/* Profile Header Hero Card */
.profile-hero-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: var(--space-32);
    box-shadow: var(--shadow-card);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    gap: var(--space-24);
}

.profile-hero-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--accent-gradient);
}

.profile-hero-main {
    display: flex;
    align-items: center;
    gap: var(--space-24);
    flex-wrap: wrap;
}

.profile-avatar-container {
    position: relative;
    flex-shrink: 0;
}

.profile-avatar-large {
    width: 80px;
    height: 80px;
    border-radius: var(--radius-50);
    background: linear-gradient(135deg, #4F46E5 0%, #312E81 100%);
    color: #FFFFFF;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-heading);
    font-size: 28px;
    font-weight: 700;
    letter-spacing: -0.02em;
    box-shadow: 0 4px 14px rgba(79, 70, 229, 0.35);
    border: 3px solid var(--bg-secondary);
    user-select: none;
}

.profile-status-indicator {
    position: absolute;
    bottom: 2px;
    right: 2px;
    width: 16px;
    height: 16px;
    border-radius: var(--radius-50);
    background-color: var(--success);
    border: 3px solid var(--bg-secondary);
    box-shadow: 0 0 8px rgba(16, 185, 129, 0.4);
}

.profile-title-group {
    display: flex;
    flex-direction: column;
    gap: var(--space-6);
    flex: 1;
    min-width: 240px;
}

.profile-name-row {
    display: flex;
    align-items: center;
    gap: var(--space-12);
    flex-wrap: wrap;
}

.profile-user-name {
    font-family: var(--font-heading);
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.02em;
    margin: 0;
}

.profile-badge-role {
    font-family: var(--font-code);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 3px 10px;
    border-radius: var(--radius-pill);
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.role-admin {
    background-color: rgba(99, 102, 241, 0.15);
    color: #818CF8;
    border: 1px solid rgba(99, 102, 241, 0.35);
}

.role-editor {
    background-color: rgba(16, 185, 129, 0.15);
    color: #34D399;
    border: 1px solid rgba(16, 185, 129, 0.35);
}

.role-user {
    background-color: rgba(148, 163, 184, 0.15);
    color: #CBD5E1;
    border: 1px solid rgba(148, 163, 184, 0.35);
}

.profile-email-row {
    display: flex;
    align-items: center;
    gap: var(--space-8);
    color: var(--text-secondary);
    font-size: 14px;
}

.profile-meta-chips {
    display: flex;
    align-items: center;
    gap: var(--space-12);
    flex-wrap: wrap;
    margin-top: var(--space-6);
}

.meta-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    background-color: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 12px;
    color: var(--text-secondary);
}

.meta-chip svg {
    color: var(--text-muted);
    flex-shrink: 0;
}

.user-id-badge {
    font-family: var(--font-code);
    font-size: 12px;
    color: var(--text-muted);
    background: var(--bg-tertiary);
    padding: 3px 8px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.copy-id-btn {
    background: transparent;
    border: none;
    cursor: pointer;
    color: var(--text-muted);
    padding: 2px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    transition: color var(--duration-fast) var(--ease-out), background-color var(--duration-fast) var(--ease-out);
}

.copy-id-btn:hover {
    color: var(--text-primary);
    background-color: rgba(255, 255, 255, 0.08);
}

.copy-id-btn:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

/* Quick Statistics Counter Ribbon */
.profile-stats-ribbon {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--space-16);
    border-top: 1px solid var(--border-color);
    padding-top: var(--space-20);
}

.stat-item {
    display: flex;
    align-items: center;
    gap: var(--space-16);
    padding: var(--space-12) var(--space-16);
    background-color: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    transition: transform var(--duration-fast) var(--ease-out), border-color var(--duration-fast) var(--ease-out);
}

.stat-item:hover {
    border-color: rgba(99, 102, 241, 0.3);
    transform: translateY(-1px);
}

.stat-icon-box {
    width: 42px;
    height: 42px;
    border-radius: var(--radius-md);
    background-color: var(--accent-glow);
    color: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.stat-data {
    display: flex;
    flex-direction: column;
}

.stat-value {
    font-family: var(--font-heading);
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.2;
}

.stat-label {
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

/* Tabbed Navigation Bar */
.profile-nav-tabs {
    display: flex;
    gap: var(--space-8);
    border-bottom: 1px solid var(--border-color);
    padding-bottom: var(--space-4);
    overflow-x: auto;
    scrollbar-width: none;
}

.profile-tab-btn {
    display: inline-flex;
    align-items: center;
    gap: var(--space-8);
    padding: 10px 18px;
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    color: var(--text-muted);
    font-family: var(--font-body);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: color var(--duration-fast) var(--ease-out), border-color var(--duration-fast) var(--ease-out), background-color var(--duration-fast) var(--ease-out);
    border-radius: var(--radius-md) var(--radius-md) 0 0;
}

.profile-tab-btn:hover {
    color: var(--text-primary);
    background-color: rgba(255, 255, 255, 0.03);
}

.profile-tab-btn.active {
    color: var(--accent);
    border-bottom-color: var(--accent);
    background-color: var(--accent-glow);
}

.profile-tab-btn:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

/* Tab Panels */
.profile-tab-pane {
    display: none;
    animation: fadeIn 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.profile-tab-pane.active {
    display: block;
}

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

/* Profile Content Card */
.profile-panel-card {
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: var(--space-32);
    box-shadow: var(--shadow-card);
}

.panel-section-header {
    margin-bottom: var(--space-24);
    border-bottom: 1px solid var(--border-color);
    padding-bottom: var(--space-16);
}

.panel-section-title {
    font-family: var(--font-heading);
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.01em;
    display: flex;
    align-items: center;
    gap: var(--space-10);
}

.panel-section-title svg {
    color: var(--accent);
}

.panel-section-desc {
    font-size: 13.5px;
    color: var(--text-muted);
    margin-top: 4px;
    line-height: 1.5;
}

/* Form Layout */
.profile-form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-24);
}

.form-full-width {
    grid-column: 1 / -1;
}

.profile-form-group {
    display: flex;
    flex-direction: column;
    gap: var(--space-8);
}

.profile-form-label {
    font-family: var(--font-body);
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.field-required {
    color: var(--danger);
    font-size: 14px;
    margin-left: 2px;
}

.profile-input-container {
    position: relative;
    display: flex;
    align-items: center;
}

.profile-input-icon {
    position: absolute;
    left: 14px;
    color: var(--text-muted);
    pointer-events: none;
    display: flex;
    align-items: center;
    justify-content: center;
}

.profile-input-container input {
    width: 100%;
    height: 42px;
    padding-left: 42px;
    padding-right: 14px;
    background-color: var(--input-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 14px;
    transition: border-color var(--duration-fast) var(--ease-out), box-shadow var(--duration-fast) var(--ease-out);
}

.profile-input-container input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-glow);
    outline: none;
}

.profile-input-container input[readonly], 
.profile-input-container input:disabled {
    background-color: rgba(255, 255, 255, 0.03);
    color: var(--text-muted);
    cursor: not-allowed;
    border-color: rgba(255, 255, 255, 0.06);
}

.input-password-toggle {
    position: absolute;
    right: 12px;
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    transition: color var(--duration-fast) var(--ease-out);
}

.input-password-toggle:hover {
    color: var(--text-primary);
}

.input-password-toggle:focus-visible {
    outline: 2px solid var(--accent);
}

.form-helper-text {
    font-size: 12px;
    color: var(--text-muted);
    line-height: 1.4;
}

/* Real-Time Password Strength Meter */
.password-meter-wrapper {
    margin-top: var(--space-8);
    display: flex;
    flex-direction: column;
    gap: var(--space-8);
}

.password-strength-bars {
    display: flex;
    gap: 4px;
    height: 5px;
    width: 100%;
}

.strength-segment {
    flex: 1;
    height: 100%;
    background-color: var(--bg-tertiary);
    border-radius: var(--radius-pill);
    transition: background-color var(--duration-base) var(--ease-out);
}

.password-strength-label {
    font-size: 12px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.strength-text {
    color: var(--text-muted);
    transition: color var(--duration-fast) var(--ease-out);
}

.password-rules-checklist {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--space-8);
    margin-top: var(--space-12);
    padding: var(--space-14);
    background-color: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
}

.rule-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: var(--text-muted);
    transition: color var(--duration-fast) var(--ease-out);
}

.rule-item.valid {
    color: var(--success);
    font-weight: 600;
}

.rule-icon {
    width: 14px;
    height: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

/* Security Audit Log Feed */
.audit-log-card {
    margin-top: var(--space-32);
    border-top: 1px solid var(--border-color);
    padding-top: var(--space-24);
}

.audit-table-wrapper {
    overflow-x: auto;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
}

.audit-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.audit-table th {
    background-color: var(--bg-tertiary);
    color: var(--text-secondary);
    font-weight: 700;
    text-align: left;
    padding: 10px 14px;
    border-bottom: 1px solid var(--border-color);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.audit-table td {
    padding: 12px 14px;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-primary);
    vertical-align: middle;
}

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

.audit-table tr:hover td {
    background-color: rgba(255, 255, 255, 0.02);
}

.audit-timestamp {
    font-family: var(--font-code);
    font-size: 12px;
    color: var(--text-muted);
    white-space: nowrap;
}

.audit-event-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-family: var(--font-code);
    font-size: 11px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: var(--radius-sm);
    text-transform: uppercase;
}

.badge-event-success {
    background-color: rgba(16, 185, 129, 0.15);
    color: #34D399;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.badge-event-warning {
    background-color: rgba(245, 158, 11, 0.15);
    color: #FBBF24;
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.badge-event-danger {
    background-color: rgba(239, 68, 68, 0.15);
    color: #F87171;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.audit-ip {
    font-family: var(--font-code);
    font-size: 12px;
    color: var(--text-muted);
}

/* User Articles Grid */
.user-articles-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-12);
}

.user-article-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-16);
    background-color: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    transition: border-color var(--duration-fast) var(--ease-out), transform var(--duration-fast) var(--ease-out);
}

.user-article-item:hover {
    border-color: var(--accent);
    transform: translateX(2px);
}

.user-article-main {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.user-article-title {
    font-family: var(--font-heading);
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
}

.user-article-title:hover {
    color: var(--accent);
}

.user-article-meta {
    display: flex;
    align-items: center;
    gap: var(--space-12);
    font-size: 12px;
    color: var(--text-muted);
}

/* Preferences Tab Options */
.pref-option-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-16) 0;
    border-bottom: 1px solid var(--border-color);
}

.pref-option-row:last-child {
    border-bottom: none;
}

.pref-info-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}

.pref-info-desc {
    font-size: 12.5px;
    color: var(--text-muted);
    margin-top: 2px;
}

.theme-choice-pills {
    display: flex;
    gap: var(--space-8);
}

.theme-pill-btn {
    padding: 6px 14px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background-color: var(--bg-tertiary);
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all var(--duration-fast) var(--ease-out);
}

.theme-pill-btn:hover {
    color: var(--text-primary);
    border-color: var(--accent);
}

.theme-pill-btn.active {
    background-color: var(--accent);
    color: #000000;
    border-color: var(--accent);
    font-weight: 700;
}

/* Form Action Buttons */
.profile-actions-bar {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: var(--space-12);
    margin-top: var(--space-28);
    border-top: 1px solid var(--border-color);
    padding-top: var(--space-20);
}

/* Responsiveness */
@media (max-width: 768px) {
    .profile-hero-card {
        padding: var(--space-20);
    }
    .profile-hero-main {
        flex-direction: column;
        align-items: flex-start;
        gap: var(--space-16);
    }
    .profile-form-grid {
        grid-template-columns: 1fr;
    }
    .profile-panel-card {
        padding: var(--space-20);
    }
    .profile-stats-ribbon {
        grid-template-columns: 1fr;
    }
    .pref-option-row {
        flex-direction: column;
        align-items: flex-start;
        gap: var(--space-12);
    }
}

/* Accessibility: Respect Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    .profile-hero-card,
    .stat-item,
    .profile-tab-btn,
    .user-article-item,
    .strength-segment,
    .profile-tab-pane,
    .btn-action {
        transition: none !important;
        animation: none !important;
        transform: none !important;
    }
}

/* ==========================================================================
   COMPACT TABLE & LIST ACTION BUTTONS (Lápis, Lixeira, Lupa)
   ========================================================================== */

.table-actions {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    vertical-align: middle;
}

td.text-right {
    white-space: nowrap;
}

.btn-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    min-width: 36px;
    min-height: 36px;
    padding: 0;
    margin: 0;
    border-radius: var(--radius-sm);
    cursor: pointer;
    text-decoration: none;
    line-height: 1;
    border: 1px solid transparent;
    transition: background-color var(--duration-fast) var(--ease-out),
                border-color var(--duration-fast) var(--ease-out),
                color var(--duration-fast) var(--ease-out),
                box-shadow var(--duration-fast) var(--ease-out),
                transform var(--duration-fast) var(--ease-out);
    background: transparent;
    box-sizing: border-box;
}

.btn-action svg {
    pointer-events: none;
    flex-shrink: 0;
    display: block;
}

/* Edit - Pencil Action */
.btn-action-edit {
    background-color: rgba(99, 102, 241, 0.12);
    border-color: rgba(99, 102, 241, 0.25);
    color: var(--accent);
}

.btn-action-edit:hover:not(:disabled) {
    background-color: var(--accent);
    border-color: var(--accent);
    color: #FFFFFF;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px var(--accent-glow);
}

/* Delete - Trash Action */
.btn-action-delete {
    background-color: rgba(239, 68, 68, 0.12);
    border-color: rgba(239, 68, 68, 0.25);
    color: #f87171;
}

.btn-action-delete:hover:not(:disabled) {
    background-color: var(--danger);
    border-color: var(--danger);
    color: #FFFFFF;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.35);
}

.btn-action-delete:disabled {
    opacity: 0.35;
    cursor: not-allowed;
    background-color: rgba(239, 68, 68, 0.05);
    border-color: rgba(239, 68, 68, 0.15);
    color: #f87171;
}

/* View - Magnifying Glass (Lupa) Action */
.btn-action-view {
    background-color: rgba(59, 130, 246, 0.12);
    border-color: rgba(59, 130, 246, 0.25);
    color: #60a5fa;
}

.btn-action-view:hover:not(:disabled) {
    background-color: #3b82f6;
    border-color: #3b82f6;
    color: #FFFFFF;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.35);
}

/* Download Action */
.btn-action-download {
    background-color: rgba(16, 185, 129, 0.12);
    border-color: rgba(16, 185, 129, 0.25);
    color: #34d399;
}

.btn-action-download:hover:not(:disabled) {
    background-color: var(--success);
    border-color: var(--success);
    color: #FFFFFF;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.35);
}

.btn-action:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}




/* Print Action */
.btn-action-print {
    background-color: rgba(168, 85, 247, 0.12);
    border-color: rgba(168, 85, 247, 0.25);
    color: #c084fc;
}

.btn-action-print:hover:not(:disabled) {
    background-color: #9333ea;
    border-color: #9333ea;
    color: #FFFFFF;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(168, 85, 247, 0.35);
}
