* {
    box-sizing: border-box
}

body {
    margin: 0;
    font-family: Arial, sans-serif;
    background: #f5f7fb;
    color: #18202f
}

.erp-layout {
    display: flex;
    min-height: 100vh
}

.erp-sidebar {
    width: 240px;
    background: #111827;
    color: #fff;
    padding: 22px 16px
}

.brand {
    font-weight: 700;
    font-size: 20px;
    letter-spacing: .08em;
    margin-bottom: 28px
}

.nav {
    display: flex;
    flex-direction: column;
    gap: 6px
}

.nav-link {
    display: block;
    padding: 10px 12px;
    border-radius: 8px;
    color: #d1d5db;
    text-decoration: none
}

.nav-link.active {
    background: #2563eb;
    color: #fff
}

.nav-link.disabled {
    opacity: .45;
    cursor: not-allowed
}

.erp-main {
    flex: 1;
    min-width: 0
}

.topbar {
    height: 74px;
    background: #fff;
    border-bottom: 1px solid #e5e7eb;
    padding: 16px 28px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px
}

.topbar-title {
    font-size: 22px;
    font-weight: 700
}

.topbar-subtitle {
    font-size: 13px;
    color: #6b7280;
    margin-top: 3px
}

.erp-content {
    padding: 28px
}

.search-form {
    display: flex;
    gap: 10px;
    margin-bottom: 20px
}

.search-input {
    flex: 1;
    padding: 13px 14px;
    border: 1px solid #d1d5db;
    border-radius: 10px;
    font-size: 16px
}

.btn {
    padding: 12px 18px;
    border: 0;
    border-radius: 10px;
    background: #2563eb;
    color: #fff;
    font-weight: 700;
    cursor: pointer
}

.btn:hover {
    background: #1d4ed8
}

.btn-secondary {
    background: #374151
}

.btn-secondary:hover {
    background: #1f2937
}

.topbar-logout {
    margin: 0
}

.auth-screen {
    min-height: 100vh;
    display: grid;
    place-items: center;
    background: #f8fafc;
    padding: 24px
}

.auth-panel {
    width: min(100%, 320px);
    display: grid;
    gap: 22px;
    justify-items: center
}

.auth-brand {
    color: #111827;
    font-size: 28px;
    font-weight: 800;
    letter-spacing: .12em
}

.auth-button {
    width: 100%
}

.auth-denied-title {
    font-size: 22px;
    font-weight: 700
}

.auth-denied-text {
    margin: 0;
    color: #374151;
    text-align: center;
    line-height: 1.45
}

.filter-muted, .empty-text {
    color: #6b7280;
    font-size: 14px
}

.empty-title {
    font-weight: 700;
    font-size: 18px;
    margin-bottom: 6px
}

.results-summary {
    font-size: 14px;
    color: #4b5563;
    margin-bottom: 14px
}

.results-list {
    display: flex;
    flex-direction: column;
    gap: 12px
}

.result-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 16px
}

.result-header {
    display: flex;
    justify-content: space-between;
    gap: 16px
}

.result-title {
    font-weight: 700;
    font-size: 16px;
    margin-bottom: 5px
}

.result-meta {
    font-size: 13px;
    color: #6b7280
}

.result-snippet {
    margin-top: 12px;
    line-height: 1.5;
    color: #374151
}

.result-snippet mark {
    background: #ffd59d;
    padding: 1px 3px;
    border-radius: 3px
}

.small-link {
    font-size: 13px;
    color: #2563eb;
    text-decoration: none;
    white-space: nowrap
}

.regular-link {
    font-size: 16px;
    color: #2563eb;
    text-decoration: none;
    white-space: nowrap
}

.pagination {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 18px
}

.page-link {
    padding: 8px 12px;
    background: #eef2ff;
    border-radius: 8px;
    color: #2563eb;
    text-decoration: none
}

.page-info {
    font-size: 14px;
    color: #6b7280
}

.alert {
    border-color: #fecaca;
    background: #fff1f2;
    color: #991b1b
}

.messages {
    margin-bottom: 16px
}

.message {
    padding: 10px 12px;
    border-radius: 8px;
    background: #eef2ff
}

.search-layout {
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 20px;
    align-items: start;
}

.filters-panel {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.filter-title {
    font-weight: 700;
    margin-bottom: 4px;
}

.filters-panel label {
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 13px;
    color: #374151;
}

.filters-panel select {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    background: #fff;
}

.results-panel {
    min-width: 0;
}


@media (max-width: 900px) {
    .erp-layout {
        display: block
    }

    .erp-sidebar {
        width: auto
    }

    .search-layout {
        grid-template-columns: 1fr
    }

    .search-form {
        flex-direction: column
    }
}
