@import url('https://fonts.googleapis.com/css2?family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&family=Onest:wght@100..900&display=swap');

:root {
    --accent: rgb(0, 105, 110);
    --accent-bright: rgb(0, 180, 190);
    --accent-glow: rgba(0, 105, 110, 0.4);
    --accent-dim: rgba(0, 105, 110, 0.12);
    --accent-border: rgba(0, 150, 160, 0.45);
    --bg: #0d0d0f;
    --sidebar-bg: rgba(10, 12, 14, 0.97);
    --content-bg: rgba(13, 14, 17, 0.97);
    --card-bg: rgba(255, 255, 255, 0.04);
    --card-border: rgba(255, 255, 255, 0.08);
    --text: #fff;
    --muted: rgba(255, 255, 255, 0.45);
    --muted2: rgba(255, 255, 255, 0.22);
    --sidebar-w: 250px;
    --header-h: 58px;
}

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

html, body {
    height: 100%;
    background: var(--bg);
    color: var(--text);
    font-family: "Onest", sans-serif;
    overflow: hidden;
}

/* ── HEADER ── */
.header {
    position: fixed;
    top: 0; left: 0; right: 0;
    height: var(--header-h);
    background: rgba(10, 12, 14, 0.92);
    border-bottom: 1px solid var(--card-border);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    display: flex;
    align-items: center;
    padding: 0 22px;
    gap: 16px;
    z-index: 100;
    opacity: 0;
    animation: slideDownHeader 0.4s ease-out 0.1s forwards;
}
@keyframes slideDownHeader {
    from { opacity: 0; transform: translateY(-10px); }
    to   { opacity: 1; transform: translateY(0); }
}

.header-back {
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--muted);
    text-decoration: none;
    transition: color 0.2s;
    flex-shrink: 0;
}
.header-back:hover { color: var(--accent-bright); }

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

.header-logo img {
    height: 28px;
    display: block;
}

.header-title {
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.header-tag {
    font-size: 0.65rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--accent-bright);
    background: var(--accent-dim);
    border: 1px solid var(--accent-border);
    padding: 2px 8px;
    border-radius: 20px;
}

.header-search {
    margin-left: auto;
    position: relative;
}
.header-search input {
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--card-border);
    border-radius: 8px;
    color: var(--text);
    font-family: "Onest", sans-serif;
    font-size: 0.8rem;
    padding: 7px 14px 7px 34px;
    width: 210px;
    outline: none;
    transition: border-color 0.2s, background 0.2s;
}
.header-search input::placeholder { color: var(--muted2); }
.header-search input:focus {
    border-color: var(--accent-border);
    background: var(--accent-dim);
}
.header-search svg {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    width: 13px; height: 13px;
    color: var(--muted2);
    pointer-events: none;
}

/* ── LAYOUT ── */
.layout {
    display: flex;
    height: 100vh;
    padding-top: var(--header-h);
}

/* ── SIDEBAR ── */
.sidebar {
    width: var(--sidebar-w);
    flex-shrink: 0;
    background: var(--sidebar-bg);
    border-right: 1px solid var(--card-border);
    overflow-y: auto;
    overflow-x: hidden;
    padding: 12px 0 40px;
    scrollbar-width: thin;
    scrollbar-color: rgba(0,150,160,0.2) transparent;
}
.sidebar::-webkit-scrollbar { width: 3px; }
.sidebar::-webkit-scrollbar-thumb { background: rgba(0,150,160,0.2); border-radius: 2px; }

.sidebar-section-label {
    font-size: 0.65rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--muted2);
    padding: 14px 18px 5px;
    font-weight: 600;
}

.tab {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 18px;
    cursor: pointer;
    border-left: 2px solid transparent;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
    color: var(--muted);
    font-size: 0.85rem;
    font-weight: 500;
    user-select: none;
}
.tab:hover {
    background: rgba(0, 150, 160, 0.06);
    color: rgba(255,255,255,0.75);
}
.tab.active {
    background: var(--accent-dim);
    border-left-color: var(--accent-bright);
    color: var(--text);
}
.tab .tab-icon { font-size: 15px; width: 18px; text-align: center; flex-shrink: 0; }
.tab .tab-name { flex: 1; }
.tab .tab-badge {
    font-size: 0.55rem;
    background: var(--accent-dim);
    border: 1px solid var(--accent-border);
    color: var(--accent-bright);
    padding: 1px 5px;
    border-radius: 10px;
    letter-spacing: 0.05em;
    font-weight: 700;
}

/* ── CONTENT ── */
.content {
    flex: 1;
    overflow-y: auto;
    background: var(--content-bg);
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,0.08) transparent;
}
.content::-webkit-scrollbar { width: 5px; }
.content::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.08); border-radius: 3px; }

.page-section { display: none; padding: 36px 44px 80px; max-width: 860px; animation: fadeInSection 0.2s ease; }
.page-section.visible { display: block; }
@keyframes fadeInSection { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }

.no-results { display: none; padding: 60px 44px; color: var(--muted); font-size: 0.9rem; }
.no-results.visible { display: block; }

/* Section header */
.section-header {
    display: flex;
    align-items: flex-end;
    gap: 14px;
    margin-bottom: 28px;
    padding-bottom: 18px;
    border-bottom: 1px solid var(--card-border);
}
.section-icon { font-size: 36px; line-height: 1; }
.section-title {
    font-size: clamp(1.6rem, 3vw, 2.4rem);
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    line-height: 1;
}
.section-desc { color: var(--muted); font-size: 0.8rem; margin-top: 4px; font-weight: 400; }

h2 {
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--muted);
    margin: 28px 0 10px;
    padding-bottom: 6px;
    border-bottom: 1px solid var(--card-border);
}

p { color: rgba(255,255,255,0.68); font-size: 0.875rem; line-height: 1.75; margin-bottom: 10px; }

.link { color: var(--accent-bright); text-decoration: none; }
.link:hover { text-decoration: underline; }

/* Info cards */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 10px;
    margin: 14px 0 22px;
}
.info-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 10px;
    padding: 14px;
    transition: border-color 0.2s, background 0.2s;
}
.info-card:hover {
    border-color: var(--accent-border);
    background: var(--accent-dim);
}
.info-card-icon { font-size: 22px; margin-bottom: 7px; }
.info-card-title {
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 4px;
}
.info-card-text { font-size: 0.75rem; color: var(--muted); line-height: 1.5; }

/* Rule list */
.rule-list { list-style: none; margin: 10px 0 22px; }
.rule-list li {
    display: flex;
    gap: 12px;
    padding: 10px 14px;
    border-radius: 8px;
    margin-bottom: 5px;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    font-size: 0.85rem;
    color: rgba(255,255,255,0.68);
    line-height: 1.5;
    transition: border-color 0.15s;
}
.rule-list li:hover { border-color: var(--card-border); }
.rule-num {
    font-weight: 700;
    color: var(--accent-bright);
    font-size: 0.8rem;
    flex-shrink: 0;
    width: 22px;
}

/* Callouts */
.callout {
    display: flex;
    gap: 11px;
    padding: 12px 14px;
    border-radius: 8px;
    margin: 14px 0;
    font-size: 0.825rem;
    line-height: 1.6;
}
.callout.warn { background: rgba(255,180,50,0.07); border: 1px solid rgba(255,180,50,0.2); color: rgba(255,200,80,0.85); }
.callout.tip { background: var(--accent-dim); border: 1px solid var(--accent-border); color: rgba(0,200,210,0.9); }
.callout.danger { background: rgba(255,80,80,0.06); border: 1px solid rgba(255,80,80,0.2); color: rgba(255,120,120,0.9); }
.callout-icon { flex-shrink: 0; font-size: 15px; }

/* Tables */
.job-table { width: 100%; border-collapse: collapse; margin: 12px 0 22px; font-size: 0.825rem; }
.job-table th {
    font-size: 0.65rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--muted2);
    text-align: left;
    padding: 7px 11px;
    border-bottom: 1px solid var(--card-border);
    font-weight: 600;
}
.job-table td {
    padding: 9px 11px;
    color: rgba(255,255,255,0.68);
    border-bottom: 1px solid rgba(255,255,255,0.04);
}
.job-table tr:hover td { background: rgba(255,255,255,0.02); }

.job-tag {
    display: inline-block;
    font-size: 0.6rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 2px 7px;
    border-radius: 4px;
}
.job-tag.civil   { background: rgba(100,200,100,0.1); color: rgba(120,220,120,0.9); border: 1px solid rgba(100,200,100,0.2); }
.job-tag.criminal{ background: rgba(255,100,100,0.1); color: rgba(255,130,130,0.9); border: 1px solid rgba(255,100,100,0.2); }
.job-tag.gov     { background: var(--accent-dim); color: var(--accent-bright); border: 1px solid var(--accent-border); }
.job-tag.vip     { background: rgba(180,100,255,0.1); color: rgba(190,130,255,0.9); border: 1px solid rgba(180,100,255,0.2); }

/* Job cards */
.job-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
    gap: 10px;
    margin: 12px 0 24px;
}
.job-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 10px;
    padding: 12px 14px;
    transition: border-color 0.2s, background 0.2s;
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.job-card:hover {
    border-color: rgba(255,255,255,0.15);
    background: rgba(255,255,255,0.05);
}
.job-card-name {
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    line-height: 1.2;
}
.job-card-desc {
    font-size: 0.75rem;
    color: var(--muted);
    line-height: 1.5;
    flex: 1;
}
.job-card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 4px;
}
.jt {
    font-size: 0.6rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    padding: 2px 6px;
    border-radius: 4px;
    background: rgba(255,255,255,0.07);
    color: rgba(255,255,255,0.5);
    border: 1px solid rgba(255,255,255,0.1);
}
.jt.raid   { background: rgba(255,60,60,0.12); color: rgba(255,120,120,0.9); border-color: rgba(255,60,60,0.25); }
.jt.mug    { background: rgba(255,200,0,0.1); color: rgba(255,200,60,0.9); border-color: rgba(255,200,0,0.2); }
.jt.kidnap { background: rgba(180,80,255,0.1); color: rgba(200,120,255,0.9); border-color: rgba(180,80,255,0.2); }
.jt.level  { background: rgba(0,180,190,0.1); color: rgb(0,180,190); border-color: rgba(0,180,190,0.25); }
.jt.vote   { background: rgba(255,255,255,0.07); color: rgba(255,255,255,0.6); }
.jt.vip    { background: rgba(255,180,0,0.1); color: rgba(255,200,60,0.9); border-color: rgba(255,180,0,0.25); }
.jt.vipplus{ background: rgba(255,120,0,0.1); color: rgba(255,160,60,0.9); border-color: rgba(255,120,0,0.25); }
.jt.fist   { background: rgba(255,140,0,0.1); color: rgba(255,180,60,0.9); border-color: rgba(255,140,0,0.2); }
.jt.max    { background: rgba(255,255,255,0.05); color: rgba(255,255,255,0.4); border-color: rgba(255,255,255,0.08); }

kbd {
    display: inline-block;
    background: rgba(255,255,255,0.07);
    border: 1px solid rgba(255,255,255,0.14);
    border-radius: 4px;
    padding: 1px 6px;
    font-family: monospace;
    font-size: 0.75rem;
    color: var(--text);
}

.jt.custom { background: rgba(0,180,190,0.1); color: rgb(0,180,190); border-color: rgba(0,180,190,0.25); }

/* ── MOBILE ── */
@media (max-width: 768px) {

    html, body { overflow-x: hidden; overflow-y: auto; height: auto; }

    .layout {
        flex-direction: column;
        height: auto;
        padding-top: var(--header-h);
    }

    .header { padding: 0 14px; gap: 10px; }
    .header-back { display: none; }
    .header-divider { display: none; }
    .header-logo img { height: 22px; }
    .header-title { font-size: 0.85rem; }
    .header-tag { display: none; }
    .header-search { margin-left: auto; }
    .header-search input { width: 140px; font-size: 0.75rem; }

    .sidebar {
        width: 100%;
        height: auto;
        border-right: none;
        border-bottom: 1px solid var(--card-border);
        display: flex;
        flex-direction: row;
        flex-wrap: nowrap;
        overflow-x: auto;
        overflow-y: hidden;
        padding: 6px 0;
        scrollbar-width: none;
    }
    .sidebar::-webkit-scrollbar { display: none; }
    .sidebar-section-label { display: none; }

    .tab {
        flex-shrink: 0;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 3px;
        padding: 6px 12px;
        border-left: none;
        border-bottom: 2px solid transparent;
        font-size: 0.65rem;
        white-space: nowrap;
        min-width: 56px;
    }
    .tab.active {
        border-left: none;
        border-bottom: 2px solid var(--accent-bright);
        background: var(--accent-dim);
    }
    .tab .tab-icon { font-size: 18px; width: auto; }
    .tab .tab-name { font-size: 0.6rem; }
    .tab .tab-badge { display: none; }

    .content { flex: 1; overflow-y: auto; overflow-x: hidden; }

    .page-section { padding: 20px 16px 60px; max-width: 100%; }

    .card-grid { grid-template-columns: 1fr 1fr; }
    .job-card-grid { grid-template-columns: 1fr; }

    .section-title { font-size: 1.4rem; }
    .section-icon { font-size: 28px; }

    .rule-list li { padding: 9px 11px; font-size: 0.8rem; }

    .job-table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; }
}

@media (max-width: 420px) {
    .card-grid { grid-template-columns: 1fr; }
    .header-search input { width: 110px; }
}