:root {
    --asm-header: #18212f;
    --asm-surface: #ffffff;
    --asm-bg: #f4f6f9;
    --asm-text: #172033;
    --asm-muted: #687386;
    --asm-border: #d9dee8;
    --asm-bordo: #7a1f2b;
    --asm-green: #198754;
    --asm-gray: #6c757d;
    --asm-blue: #007bff;
    --asm-black: #000000;
    --asm-shadow: 0 8px 20px rgba(23, 32, 51, .08);
}

* {
    letter-spacing: 0;
}

body {
    font-family: Arial, "Noto Sans Hebrew", sans-serif;
    color: var(--asm-text);
    background: var(--asm-bg);
    min-height: 100vh;
}

.app-body {
    display: flex;
    flex-direction: column;
}

.app-header,
.app-footer {
    width: 100%;
    background: var(--asm-header);
    color: #fff;
}

.app-header .navbar {
    min-height: 68px;
}

.app-footer {
    margin-top: auto;
    padding: 18px 0;
    background: #eef2f8;
    border-top: 1px solid var(--asm-border);
    color: #687386;
}

.app-footer-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
}

.footer-agency-credit {
    display: flex;
    align-items: center;
    gap: 12px;
}

.footer-agency-logo {
    width: 46px;
    height: 46px;
    object-fit: contain;
    flex: 0 0 46px;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 8px 18px rgba(23, 32, 51, .14);
    padding: 4px;
}

.footer-agency-text {
    color: #687386;
    font-size: .92rem;
    font-weight: 700;
    line-height: 1.5;
}

.footer-agency-text a {
    color: #687386;
    text-decoration: none;
    font-weight: 800;
}

.footer-agency-text a:hover,
.footer-agency-text a:focus {
    color: var(--asm-black);
    text-decoration: underline;
}

.footer-copyright {
    direction: ltr;
    color: #687386;
    font-size: .94rem;
    font-weight: 700;
    white-space: nowrap;
}

.app-main {
    width: 80%;
    margin: 28px auto;
}

.page-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
}

.panel {
    background: var(--asm-surface);
    border: 1px solid var(--asm-border);
    border-radius: 8px;
    box-shadow: var(--asm-shadow);
}

.panel-body {
    padding: 20px;
}

.table {
    margin-bottom: 0;
    vertical-align: middle;
}

.table thead th {
    color: var(--asm-muted);
    font-size: .86rem;
    font-weight: 700;
    border-bottom: 1px solid var(--asm-border);
    white-space: nowrap;
}

.badge-status {
    background: #e8f0ff;
    color: #0a58ca;
    border: 1px solid #cfe0ff;
    font-weight: 700;
}

.btn-action,
.btn-save-action,
.btn-close-action {
    min-height: 38px;
    border: 0;
    border-radius: 6px;
    color: #fff !important;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 8px 12px;
    box-shadow: 0 6px 14px rgba(23, 32, 51, .15);
    transition: transform .15s ease, box-shadow .15s ease, filter .15s ease;
}

.btn-action:hover,
.btn-action:focus,
.btn-action:active,
.btn-save-action:hover,
.btn-save-action:focus,
.btn-save-action:active,
.btn-close-action:hover,
.btn-close-action:focus,
.btn-close-action:active {
    background: var(--asm-black) !important;
    border-color: var(--asm-black) !important;
    color: #fff !important;
    font-weight: 700;
    transform: translateY(-1px);
    filter: none;
    box-shadow: 0 9px 18px rgba(23, 32, 51, .2);
}

.btn-action:hover i,
.btn-action:focus i,
.btn-action:active i,
.btn-save-action:hover i,
.btn-save-action:focus i,
.btn-save-action:active i,
.btn-close-action:hover i,
.btn-close-action:focus i,
.btn-close-action:active i {
    color: #fff !important;
}

.btn-icon-only {
    width: 38px;
    padding: 8px;
}

.btn-delete-action {
    background: var(--asm-bordo);
}

.btn-edit-action {
    background: var(--asm-green);
}

.btn-info-action {
    background: var(--asm-gray);
}

.btn-save-action {
    background: var(--asm-blue);
}

.btn-close-action {
    background: var(--asm-black);
}

.form-control,
.form-select {
    border-color: var(--asm-border);
    min-height: 42px;
}

.filter-row .form-label {
    font-size: .86rem;
    font-weight: 700;
    margin-bottom: 5px;
}

.filter-row .form-control,
.filter-row .form-select,
.filter-row .btn-save-action {
    min-height: 40px;
}

.pagination-wrap {
    margin: 18px 0 4px;
}

.pagination-wrap .pagination {
    gap: 6px;
}

.pagination-wrap .page-link {
    min-width: 38px;
    border: 1px solid var(--asm-border);
    border-radius: 6px;
    color: var(--asm-text);
    font-weight: 700;
    text-align: center;
    box-shadow: 0 5px 12px rgba(23, 32, 51, .07);
}

.pagination-wrap .page-link:hover,
.pagination-wrap .page-link:focus {
    background: var(--asm-black);
    border-color: var(--asm-black);
    color: #fff;
}

.pagination-wrap .page-item.active .page-link {
    background: var(--asm-black);
    border-color: var(--asm-black);
    color: #fff;
}

.pagination-wrap .page-item.disabled .page-link {
    color: #9aa3b2;
    background: #eef2f8;
    box-shadow: none;
}

.modal-content {
    border-radius: 8px;
    border: 0;
}

.modal-header {
    position: relative;
    min-height: 58px;
    padding: 16px 20px 16px 56px;
    background: #f7f9fc;
    border-bottom-color: var(--asm-border);
}

.modal-header .modal-title {
    margin: 0;
    text-align: right;
}

.modal-header .btn-close {
    position: absolute;
    left: 18px;
    right: auto;
    top: 50%;
    transform: translateY(-50%);
    margin: 0 !important;
}

.btn-help-action {
    min-height: 30px;
    border: 1px solid #b9dcff;
    border-radius: 6px;
    background: #eaf4ff;
    color: #0a58ca;
    font-size: .82rem;
    font-weight: 800;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 5px 10px;
}

.btn-help-action i {
    color: #b42318;
}

.btn-help-action:hover,
.btn-help-action:focus {
    background: var(--asm-black);
    border-color: var(--asm-black);
    color: #fff;
}

.btn-help-action:hover i,
.btn-help-action:focus i {
    color: #fff;
}

.permissions-table {
    margin-bottom: 0;
}

.permissions-table thead th {
    background: #eef1f5;
    color: #687386;
    text-align: center;
}

.permissions-table thead th:first-child,
.permissions-table tbody td:first-child {
    text-align: right;
}

.permissions-table td {
    text-align: center;
    border-color: var(--asm-border);
    color: #2e3440;
}

.permission-yes {
    color: #2e7d32;
    font-weight: 800;
}

.permission-no {
    color: #b8bec9;
}

.auth-body {
    min-height: 100vh;
    background: #111827;
}

.auth-shell {
    min-height: 100vh;
    display: flex;
}

.auth-visual {
    flex: 0 0 70%;
    background:
        linear-gradient(rgba(16, 24, 39, .36), rgba(16, 24, 39, .36)),
        url("../images/login-bg.svg") center/cover no-repeat,
        #18212f;
    color: #fff;
    display: flex;
    align-items: end;
    padding: 56px;
}

.auth-visual h1 {
    font-size: clamp(2rem, 4vw, 4.5rem);
    font-weight: 800;
    max-width: 720px;
}

.auth-form-area {
    flex: 0 0 30%;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 32px;
}

.auth-form {
    width: min(100%, 420px);
}

.empty-state {
    color: var(--asm-muted);
    padding: 42px 20px;
    text-align: center;
}

.note-item {
    border: 1px solid var(--asm-border);
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 10px;
    background: #fbfcfe;
}

@media (max-width: 992px) {
    .app-main {
        width: 100%;
        padding: 0 12px;
    }

    .auth-shell {
        flex-direction: column;
    }

    .auth-visual,
    .auth-form-area {
        flex: 0 0 auto;
        width: 100%;
    }

    .auth-visual {
        min-height: 34vh;
        padding: 32px 24px;
    }

    .auth-form-area {
        min-height: 66vh;
    }

    .page-title {
        align-items: stretch;
        flex-direction: column;
    }

    .app-footer-inner {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
}
