/* ================================================================
   WIKI-TECH — Style.css
   Design ispirato a Wikipedia.org con miglioramenti moderni
   Responsive, futuristico, ottimizzato mobile-first
   ================================================================ */

:root {
    --mw-primary: #3366cc;
    --mw-primary-hover: #447ff5;
    --mw-red: #d33;
    --mw-border: #a7d7f9;
    --mw-border-dark: #a2a9b1;
    --mw-bg: #f8f9fa;
    --mw-bg-body: #ffffff;
    --mw-text: #202122;
    --mw-text-secondary: #54595d;
    --mw-link: #3366cc;
    --mw-link-visited: #795cb2;
    --mw-sidebar-bg: #f8f9fa;
    --mw-font: -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Lato", "Helvetica Neue", Arial, sans-serif;
    --mw-serif: "Linux Libertine", "Georgia", "Times New Roman", serif;
    --shadow-sm: 0 1px 3px rgba(0,0,0,.08);
    --shadow-md: 0 3px 8px rgba(0,0,0,.12);
    --shadow-lg: 0 6px 20px rgba(0,0,0,.15);
    --radius: 4px;
    --transition: all .2s ease;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
    font-family: var(--mw-font);
    font-size: 16px;
    line-height: 1.6;
    color: var(--mw-text);
    background: var(--mw-bg);
}

a { color: var(--mw-link); text-decoration: none; transition: var(--transition); }
a:hover { color: var(--mw-primary-hover); text-decoration: underline; }
a:visited { color: var(--mw-link-visited); }

img { max-width: 100%; height: auto; }

/* ============ TOP BAR ============ */
.mw-topbar {
    background: linear-gradient(90deg, #f8f9fa 0%, #ffffff 100%);
    border-bottom: 1px solid var(--mw-border);
    position: sticky;
    top: 0;
    z-index: 1000;
    height: 56px;
    box-shadow: var(--shadow-sm);
}
.topbar-inner {
    display: flex;
    align-items: center;
    gap: 8px;
    height: 100%;
    padding: 0 16px;
    max-width: 1440px;
    margin: 0 auto;
}
.mw-nav-toggle {
    background: none;
    border: none;
    font-size: 20px;
    color: var(--mw-text);
    cursor: pointer;
    display: none;
    padding: 8px;
    border-radius: var(--radius);
}
.mw-nav-toggle:hover { background: #eaecf0; }

.mw-globe {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 34px;
    color: var(--mw-primary);
}

.mw-sitename {
    font-family: var(--mw-serif);
    font-size: 22px;
    font-weight: 700;
    color: var(--mw-text) !important;
    white-space: nowrap;
}

.mw-search-box { flex: 1; max-width: 640px; position: relative; }
#wtwSearchForm {
    display: flex;
    border: 1px solid var(--mw-border-dark);
    border-radius: 2px;
    background: #fff;
    min-width: 280px;
}
.search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--mw-text-secondary);
    font-size: 14px;
    pointer-events: none;
}
#wtwSearchInput {
    flex: 1;
    border: none;
    padding: 8px 12px 8px 34px;
    font-size: 14px;
    outline: none;
    background: transparent;
    min-width: 0;
}
.wtw-search-btn {
    background: var(--mw-primary);
    color: #fff;
    border: none;
    padding: 8px 20px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: var(--transition);
}
.wtw-search-btn:hover { background: var(--mw-primary-hover); }

.mw-user-menu {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-left: auto;
    white-space: nowrap;
}
.mw-user-name {
    font-size: 13px;
    color: var(--mw-text-secondary);
    font-weight: 600;
}
.mw-user-link {
    font-size: 13px;
    color: var(--mw-primary);
    padding: 6px 8px;
    border-radius: var(--radius);
}
.mw-user-link:hover { background: #eaecf0; text-decoration: none; }
.mw-user-link-admin {
    background: var(--mw-primary);
    color: #fff !important;
    font-weight: 700;
    padding: 7px 12px;
}
.mw-user-link-admin:hover { background: var(--mw-primary-hover); }
.mw-user-link-admin i { margin-right: 2px; }
.mw-user-link-logout {
    border: 1px solid var(--mw-border-dark);
    background: #fff;
    color: var(--mw-text) !important;
    font-weight: 600;
}
.mw-user-link-logout:hover { background: #fdeeec; border-color: #d33; color: #a22 !important; }

.mw-skip-link {
    position: absolute;
    left: -9999px;
    top: 0;
    z-index: 2000;
    background: #fff;
    color: var(--mw-text) !important;
    padding: 10px 16px;
    border: 2px solid var(--mw-primary);
    border-radius: 0 0 4px 0;
    font-weight: 700;
}
.mw-skip-link:focus { left: 0; }

/* ============ LAYOUT ============ */
.mw-layout { display: flex; max-width: 1440px; margin: 0 auto; min-height: calc(100vh - 56px); }

/* Sidebar */
.mw-sidebar {
    width: 248px;
    background: var(--mw-sidebar-bg);
    border-right: 1px solid var(--mw-border-dark);
    flex-shrink: 0;
    transition: left .3s ease;
}
.mw-sidebar-inner {
    position: sticky;
    top: 56px;
    height: calc(100vh - 56px);
    overflow-y: auto;
    padding: 20px 12px 40px;
    scrollbar-width: thin;
    scrollbar-color: var(--mw-border-dark) transparent;
}
.mw-logo { text-align: center; margin-bottom: 20px; }
.mw-logo a { display: block; padding: 8px; border-radius: var(--radius); }
.mw-logo a:hover { background: #eaecf0; text-decoration: none; }
.mw-logo-globe {
    font-size: 48px;
    color: var(--mw-primary);
    text-shadow: 0 2px 8px rgba(51,102,204,.25);
    margin-bottom: 4px;
}
.mw-logo img { max-height: 90px; margin-bottom: 6px; }
.mw-logo-text {
    display: block;
    font-family: var(--mw-serif);
    font-size: 18px;
    font-weight: 700;
    color: var(--mw-text);
}
.mw-logo-tagline { display: block; font-size: 12px; color: var(--mw-text-secondary); font-style: italic; }

.mw-panel-heading {
    font-size: 14px;
    color: #54595d;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .03em;
    padding: 12px 0 6px;
    margin-top: 8px;
}
.mw-nav-list { list-style: none; margin-bottom: 16px; }
.mw-nav-list li a {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 8px;
    font-size: 14px;
    color: var(--mw-text);
    border-radius: var(--radius);
}
.mw-nav-list li a i { width: 16px; text-align: center; color: var(--mw-primary); font-size: 13px; }
.mw-nav-list li a:hover { background: #eaecf0; text-decoration: none; color: var(--mw-primary); }
.mw-nav-list li a.active { font-weight: 700; }
.mw-langs a.active { font-weight: 700; color: var(--mw-primary); }

.mw-sidebar-footer { text-align: center; font-size: 12px; color: var(--mw-text-secondary); padding: 20px 0 0; border-top: 1px solid var(--mw-border-dark); margin-top: 12px; }

/* Toolbar (tab bar) */
.mw-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 16px;
    background: #fff;
    border-bottom: 1px solid var(--mw-border);
    flex-wrap: wrap;
    gap: 8px;
}
.mw-toolbar-left, .mw-toolbar-right { display: flex; align-items: center; gap: 6px; }
.mw-toolbar-btn {
    padding: 6px 12px;
    font-size: 13px;
    border-radius: var(--radius);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--mw-text);
    background: transparent;
    border: 1px solid transparent;
    cursor: pointer;
    font-family: inherit;
    transition: var(--transition);
}
.mw-toolbar-btn:hover { background: #f0f2f5; text-decoration: none; color: var(--mw-primary); }
.mw-lang-switch { display: flex; gap: 2px; }
.mw-lang-switch a { font-size: 12px; padding: 4px 8px; border-radius: 3px; color: var(--mw-text-secondary); font-weight: 600; }
.mw-lang-switch a:hover { background: #eaecf0; text-decoration: none; }
.mw-lang-switch a.active { background: var(--mw-primary); color: #fff; }

/* ============ BODY CONTENT ============ */
.mw-body {
    background: var(--mw-bg-body);
    padding: 24px 32px 32px;
    max-width: 100%;
    min-height: 65vh;
}

.mw-body-header {
    border-bottom: 1px solid var(--mw-border-dark);
    padding-bottom: 10px;
    margin-bottom: 20px;
}
.mw-page-title {
    font-family: var(--mw-serif);
    font-size: 30px;
    font-weight: 400;
    line-height: 1.2;
}
.mw-subtitle { color: var(--mw-text-secondary); font-size: 14px; margin-top: 4px; }

.mw-content-block { font-family: var(--mw-serif); font-size: 17px; line-height: 1.7; }
.mw-content-block p { margin: 8px 0; }
.mw-content-block h2, .mw-content-block h3, .mw-content-block h4 {
    font-family: var(--mw-serif);
    margin: 16px 0 10px;
    border-bottom: 1px solid var(--mw-border-dark);
    padding-bottom: 4px;
}
.mw-content-block h2 { font-size: 24px; }
.mw-content-block h3 { font-size: 20px; border-bottom: none; }
.mw-content-block ul, .mw-content-block ol { margin: 8px 0 8px 28px; }
.mw-content-block img { border: 1px solid #eaecf0; border-radius: var(--radius); }
.mw-content-block table { border-collapse: collapse; width: 100%; margin: 12px 0; }
.mw-content-block table th, .mw-content-block table td { border: 1px solid var(--mw-border-dark); padding: 6px 12px; }
.mw-content-block table th { background: var(--mw-bg); }

.mw-info-box {
    float: right;
    clear: right;
    width: 220px;
    background: var(--mw-bg);
    border: 1px solid var(--mw-border-dark);
    border-radius: var(--radius);
    padding: 12px;
    margin: 4px 0 16px 20px;
    font-size: 13px;
    font-family: var(--mw-font);
    box-shadow: var(--shadow-sm);
}
.mw-info-box img { display: block; margin: 0 auto 8px; border-radius: var(--radius); }
.mw-info-box-title { font-size: 15px; font-weight: 700; text-align: center; margin-bottom: 8px; padding-bottom: 6px; border-bottom: 1px solid var(--mw-border-dark); }
.mw-info-box table { font-size: 12px; }
.mw-info-box table td { padding: 3px 4px !important; border: none !important; }
.mw-info-box table td:first-child { font-weight: 600; white-space: nowrap; }

.mw-toc {
    background: var(--mw-bg);
    border: 1px solid var(--mw-border-dark);
    border-radius: var(--radius);
    display: inline-block;
    padding: 12px 24px;
    margin: 16px 0;
    font-family: var(--mw-font);
    font-size: 14px;
}
.mw-toc-title { font-weight: 700; margin-bottom: 8px; text-align: center; }
.mw-toc a { display: block; padding: 2px 0; }

.mw-metadata {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    font-size: 13px;
    color: var(--mw-text-secondary);
    border-top: 1px solid var(--mw-border-dark);
    padding-top: 12px;
    margin-top: 24px;
}
.mw-metadata span { display: flex; align-items: center; gap: 6px; }
.mw-metadata i { color: var(--mw-primary); }

/* ============ FLASH / ALERT ============ */
.mw-flash {
    padding: 12px 16px;
    border-radius: var(--radius);
    margin-bottom: 16px;
    font-size: 14px;
    font-family: var(--mw-font);
    border: 1px solid;
}
.mw-flash-success { background: #e7f4e7; border-color: #9fdf9f; color: #1d6b1d; }
.mw-flash-error { background: #fdeeec; border-color: #f4b6ae; color: #87312a; }
.mw-flash-info { background: #e8f1fd; border-color: #b5d2f7; color: #1a4f96; }

/* ============ HOME WIKI HERO ============ */
.wiki-hero {
    background: linear-gradient(135deg, #f5f9ff 0%, #ffffff 60%, #eef4ff 100%);
    text-align: center;
    padding: 40px 20px;
    border-bottom: 3px solid var(--mw-border);
    position: relative;
    overflow: hidden;
}
.wiki-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at 30% 20%, rgba(51,102,204,.08) 0%, transparent 50%),
                radial-gradient(ellipse at 80% 90%, rgba(51,102,204,.06) 0%, transparent 50%);
    pointer-events: none;
}
.wiki-hero h1 {
    font-family: var(--mw-serif);
    font-size: clamp(28px, 5vw, 48px);
    font-weight: 400;
    position: relative;
    z-index: 1;
}
.wiki-hero h1 span { font-weight: 700; background: linear-gradient(120deg, var(--mw-primary), #4488ff); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.wiki-hero p.tagline { font-size: 15px; color: var(--mw-text-secondary); margin-top: 8px; }

/* ============ SECTIONS GRID ============ */
.mw-section-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-top: 24px;
}
.mw-widget {
    background: #fff;
    border: 1px solid var(--mw-border-dark);
    border-radius: var(--radius);
    padding: 16px;
    box-shadow: var(--shadow-sm);
}
.mw-widget h2,
.mw-widget h3 {
    font-family: var(--mw-serif);
    font-size: 18px;
    border-bottom: 1px solid var(--mw-border-dark);
    padding-bottom: 8px;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.mw-widget h2 i,
.mw-widget h3 i { color: var(--mw-primary); }
.mw-article-list { list-style: none; }
.mw-article-list li { padding: 8px 0; border-bottom: 1px dashed #eaecf0; }
.mw-article-list li:last-child { border-bottom: none; }
.mw-article-list a { font-weight: 600; font-size: 15px; }
.mw-article-list .cat { font-size: 12px; color: var(--mw-text-secondary); display: block; }
.mw-cat-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.mw-cat-tag {
    background: #eaecf0;
    padding: 5px 12px;
    border-radius: 16px;
    font-size: 13px;
    color: var(--mw-text);
    transition: var(--transition);
    border: 1px solid transparent;
}
.mw-cat-tag:hover { background: var(--mw-primary); color: #fff; text-decoration: none; }

/* News widget */
.mw-news-item { display: flex; gap: 12px; padding: 10px 0; border-bottom: 1px dashed #eaecf0; }
.mw-news-item:last-child { border-bottom: none; }
.mw-news-icon { width: 36px; height: 36px; background: #e8f1fd; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: var(--mw-primary); font-size: 14px; flex-shrink: 0; }
.mw-news-item h4 { font-size: 14px; margin-bottom: 2px; }
.mw-news-item h4 a { color: var(--mw-text); font-weight: 600; }
.mw-news-item h4 a:hover { color: var(--mw-primary); }
.mw-news-item p { font-size: 13px; color: var(--mw-text-secondary); overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }

/* ============ SEARCH RESULTS ============ */
.search-result {
    border: 1px solid var(--mw-border-dark);
    border-radius: var(--radius);
    padding: 16px;
    margin-bottom: 14px;
    background: #fff;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
}
.search-result:hover { box-shadow: var(--shadow-md); border-color: var(--mw-primary); transform: translateY(-1px); }
.search-result h3 { font-family: var(--mw-serif); font-size: 18px; margin-bottom: 4px; }
.search-result h3 a { color: var(--mw-primary); }
.search-result p { font-size: 14px; color: var(--mw-text-secondary); }
.search-result .result-meta { font-size: 12px; color: var(--mw-text-secondary); margin-top: 6px; display: flex; gap: 12px; flex-wrap: wrap; }
.search-result .result-source {
    display: inline-block;
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 12px;
    font-weight: 600;
}
.search-result .result-source.internal { background: #e7f4e7; color: #1d6b1d; }
.search-result .result-source.external { background: #e8f1fd; color: #1a4f96; }

.result-group-head {
    font-size: 14px;
    font-weight: 700;
    color: var(--mw-text-secondary);
    text-transform: uppercase;
    letter-spacing: .05em;
    margin: 24px 0 12px;
    padding-bottom: 6px;
    border-bottom: 2px solid var(--mw-border);
}

/* ============ CATEGORY PAGES ============ */
.cat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 14px;
}
.cat-card {
    background: #fff;
    border: 1px solid var(--mw-border-dark);
    border-radius: var(--radius);
    padding: 14px;
    transition: var(--transition);
    text-align: center;
}
.cat-card:hover { box-shadow: var(--shadow-md); border-color: var(--mw-primary); transform: translateY(-2px); }
.cat-card i { font-size: 26px; color: var(--mw-primary); display: block; margin-bottom: 8px; }
.cat-card a { font-weight: 600; }
.cat-card small { display: block; color: var(--mw-text-secondary); font-size: 12px; margin-top: 4px; }

/* ============ PAGINATION ============ */
.pagination { display: flex; gap: 6px; justify-content: center; margin: 24px 0; flex-wrap: wrap; }
.pagination a, .pagination span {
    padding: 6px 12px;
    border: 1px solid var(--mw-border-dark);
    border-radius: var(--radius);
    font-size: 14px;
    color: var(--mw-text);
    background: #fff;
}
.pagination a:hover { background: var(--mw-primary); color: #fff; text-decoration: none; }
.pagination .current { background: var(--mw-primary); color: #fff; border-color: var(--mw-primary); }

/* ============ MEDIA GRID ============ */
.media-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 14px;
    margin-top: 16px;
}
.media-card { position: relative; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--mw-border-dark); background: #fff; }
.media-card img { width: 100%; height: 180px; object-fit: cover; display: block; }
.media-card figcaption { padding: 8px; font-size: 12px; color: var(--mw-text-secondary); background: #fff; }
.media-card video { width: 100%; max-height: 200px; }

/* ============ FORMS ============ */
.mw-form { max-width: 500px; margin: 0 auto; }
.mw-form wide { max-width: 900px; }
.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-size: 14px; font-weight: 600; margin-bottom: 6px; }
.form-group input[type="text"], .form-group input[type="email"], .form-group input[type="password"], .form-group input[type="number"], .form-group select, .form-group textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--mw-border-dark);
    border-radius: var(--radius);
    font-size: 14px;
    font-family: var(--mw-font);
    outline: none;
    transition: var(--transition);
    background: #fff;
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus { border-color: var(--mw-primary); box-shadow: 0 0 0 3px rgba(51,102,204,.15); }
.form-group textarea { min-height: 120px; resize: vertical; }
.frm-checkbox { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.frm-checkbox input[type="checkbox"] { width: 18px; height: 18px; accent-color: var(--mw-primary); }

.btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 22px;
    border: none;
    border-radius: var(--radius);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    font-family: var(--mw-font);
    text-decoration: none;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn-primary { background: var(--mw-primary); color: #fff !important; box-shadow: var(--shadow-sm); }
.btn-primary:hover { background: var(--mw-primary-hover); box-shadow: var(--shadow-md); }
.btn-secondary { background: #eaecf0; color: var(--mw-text) !important; }
.btn-secondary:hover { background: #d0d5db; }
.btn-danger { background: #d33; color: #fff !important; }
.btn-danger:hover { background: #a22; }
.btn-success { background: #2d8f4e; color: #fff !important; }
.btn-success:hover { background: #1f6d39; }
.btn-sm { padding: 6px 14px; font-size: 13px; }
.btn-block { display: block; width: 100%; text-align: center; }

/* ============ ADMIN LAYOUT ============ */
.admin-wrapper { display: flex; min-height: 100vh; background: var(--mw-bg); }
.admin-sidebar {
    width: 240px;
    background: #1d2233;
    color: #fff;
    padding: 20px 0;
    flex-shrink: 0;
    transition: margin-left .3s;
}
.admin-sidebar .admin-logo { padding: 10px 20px 20px; font-family: var(--mw-serif); font-size: 20px; border-bottom: 1px solid rgba(255,255,255,.1); margin-bottom: 12px; text-align: center; }
.admin-sidebar .admin-logo a { color: #fff; }
.admin-sidebar .admin-logo i { color: #8ab4f8; margin-right: 6px; }
.admin-nav-list { list-style: none; }
.admin-nav-list li a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 20px;
    color: #aab3c5;
    transition: var(--transition);
    border-left: 3px solid transparent;
    font-size: 14px;
}
.admin-nav-list li a i { width: 18px; text-align: center; }
.admin-nav-list li a:hover { background: rgba(255,255,255,.06); color: #fff; text-decoration: none; border-left-color: #8ab4f8; }
.admin-nav-list li a.active { background: rgba(138,180,248,.12); color: #8ab4f8; border-left-color: #8ab4f8; }
.admin-nav-list .sep { border-top: 1px solid rgba(255,255,255,.1); margin: 12px 20px; }

.admin-main { flex: 1; padding: 24px 32px; overflow-x: hidden; }
.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 12px;
}
.admin-header h1 { font-family: var(--mw-serif); font-size: 26px; }
.admin-header .admin-user { font-size: 14px; color: var(--mw-text-secondary); }

.stat-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 16px; margin-bottom: 24px; }
.stat-card {
    background: #fff;
    border: 1px solid var(--mw-border-dark);
    border-left: 4px solid var(--mw-primary);
    border-radius: var(--radius);
    padding: 16px;
    box-shadow: var(--shadow-sm);
}
.stat-card .stat-num { font-size: 28px; font-weight: 700; color: var(--mw-primary); }
.stat-card .stat-label { font-size: 13px; color: var(--mw-text-secondary); }

.table-responsive { overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; background: #fff; box-shadow: var(--shadow-sm); border-radius: var(--radius); overflow: hidden; }
.data-table th { background: #f0f2f5; text-align: left; padding: 10px 14px; font-size: 13px; text-transform: uppercase; letter-spacing: .03em; color: var(--mw-text-secondary); border-bottom: 2px solid var(--mw-border-dark); }
.data-table td { padding: 10px 14px; border-bottom: 1px solid #eaecf0; font-size: 14px; }
.data-table tr:hover td { background: #fafbfd; }
.data-table .actions { display: flex; gap: 6px; }
.data-table .actions a { padding: 4px 10px; font-size: 12px; border-radius: 3px; }

.badge { display: inline-block; padding: 3px 10px; border-radius: 12px; font-size: 11px; font-weight: 600; }
.badge-green { background: #e7f4e7; color: #1d6b1d; }
.badge-red { background: #fdeeec; color: #87312a; }
.badge-blue { background: #e8f1fd; color: #1a4f96; }
.badge-gray { background: #eaecf0; color: #54595d; }
.badge-orange { background: #fdf3e7; color: #8a5a1d; }

/* ============ BACKUP PAGE ============ */
.backup-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.backup-card { background: #fff; border: 1px solid var(--mw-border-dark); border-radius: var(--radius); padding: 16px; }
.backup-card .b-name { font-weight: 600; word-break: break-all; font-size: 14px; }
.backup-card .b-meta { font-size: 12px; color: var(--mw-text-secondary); margin: 6px 0 12px; }
.backup-card .b-actions { display: flex; gap: 8px; }

/* ============ NEWS PAGE ============ */
.news-full { max-width: 760px; margin: 0 auto; }
.news-full-item {
    background: #fff;
    border: 1px solid var(--mw-border-dark);
    border-radius: var(--radius);
    padding: 20px;
    margin-bottom: 16px;
    box-shadow: var(--shadow-sm);
}
.news-full-item h2 { font-family: var(--mw-serif); font-size: 20px; }
.news-full-item p { font-size: 14px; color: var(--mw-text-secondary); margin-top: 8px; }
.news-meta { font-size: 12px; color: var(--mw-text-secondary); display: flex; gap: 12px; margin-bottom: 8px; }

/* ============ FOOTER ============ */
.mw-footer { background: var(--mw-bg); border-top: 1px solid var(--mw-border-dark); margin-top: 40px; clear: both; }
.mw-footer-inner { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 24px; max-width: 1200px; margin: 0 auto; padding: 28px 24px; }
.mw-footer-col h2,
.mw-footer-col h4 { font-size: 15px; margin-bottom: 8px; }
.mw-footer-col ul { list-style: none; }
.mw-footer-col ul li { padding: 3px 0; }
.mw-footer-col ul a { font-size: 13px; }
.mw-footer-col p { font-size: 13px; color: var(--mw-text-secondary); }
.mw-footer-col p a { text-decoration: underline; text-underline-offset: 2px; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.mw-content-wrap main p a { text-decoration: underline; text-underline-offset: 2px; }
.mw-footer-bottom { border-top: 1px solid var(--mw-border-dark); text-align: center; padding: 14px 16px; font-size: 13px; color: var(--mw-text-secondary); }

/* ============ RESPONSIVE ============ */
@media (max-width: 768px) {
    .mw-nav-toggle { display: block; }
    .topbar-inner { padding: 0 10px; gap: 4px; }
    .mw-globe { display: none; }
    .mw-sitename { font-size: 17px; }
    .mw-search-box { position: static; }
    #wtwSearchForm { min-width: 0; }
    .wtw-search-btn { padding: 8px 12px; font-size: 12px; }
    .mw-user-name { display: none; }
    
    .mw-sidebar {
        position: fixed;
        left: -260px;
        top: 56px;
        bottom: 0;
        z-index: 999;
        box-shadow: var(--shadow-lg);
        width: 260px;
    }
    .mw-sidebar.open { left: 0; }
    
    .mw-layout { flex-direction: column; }
    .mw-body { padding: 16px; }
    .mw-section-grid { grid-template-columns: 1fr; }
    .mw-info-box { float: none; width: 100%; margin: 16px 0; }
    .mw-page-title { font-size: 24px; }
    .mw-toolbar { padding: 6px 10px; }
    
    .admin-wrapper { flex-direction: column; }
    .admin-sidebar { width: 100%; padding: 8px 0; }
    .admin-nav-list { display: flex; overflow-x: auto; padding: 0 8px; }
    .admin-nav-list li a { border-left: none; border-bottom: 3px solid transparent; padding: 10px 14px; white-space: nowrap; }
    .admin-nav-list li a:hover, .admin-nav-list li a.active { border-bottom-color: #8ab4f8; }
    .admin-nav-list .sep { display: none; }
    .admin-main { padding: 16px; }
}

@media (max-width: 480px) {
    .mw-sitename { display: none; }
    .topbar-inner { justify-content: flex-start; }
    .mw-search-box { max-width: 100%; }
    #wtwSearchInput { font-size: 13px; }
    .stat-cards { grid-template-columns: 1fr 1fr; }
}

/* ============ ANIMATIONS & FUTURISTIC TOUCHES ============ */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}
.mw-widget, .search-result, .news-full-item, .cat-card { animation: fadeInUp .35s ease both; }

.mw-topbar { backdrop-filter: blur(6px); background: rgba(248,249,250,.95); }

.mw-body-content::selection { background: rgba(51,102,204,.2); }

/* Scrollbar */
::-webkit-scrollbar { width: 9px; height: 9px; }
::-webkit-scrollbar-track { background: #f0f2f5; }
::-webkit-scrollbar-thumb { background: #b8bec4; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #98a0a8; }

/* Print */
@media print {
    .mw-sidebar, .mw-topbar, .mw-toolbar, .mw-footer, .mw-nav { display: none !important; }
    .mw-body { padding: 0; }
    body { background: #fff; }
}

/* Utility */
.text-center { text-align: center; }
.text-right { text-align: right; }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mb-2 { margin-bottom: 16px; }
.hidden { display: none !important; }
.clearfix { clear: both; }
.prose { max-width: 720px; }

.lang-label { display: inline-block; background: var(--mw-primary); color: #fff; font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 3px; margin-right: 6px; vertical-align: middle; }