/* Global polish overrides for operational screens */
:root {
    --ui-font: "Plus Jakarta Sans", "Segoe UI", sans-serif;
    --ui-bg: #f4f6fb;
    --ui-surface: #ffffff;
    --ui-border: #e4e8f1;
    --ui-text: #2a3347;
    --ui-muted: #7a8499;
    --ui-primary: #3a6ff8;
    --ui-primary-strong: #2f5ae0;
    --ui-radius: 12px;
    --ui-shadow: 0 8px 24px rgba(17, 24, 39, 0.06);
}

body {
    font-family: var(--ui-font);
    background: var(--ui-bg);
    color: var(--ui-text);
}

h1, h2, h3, h4, h5, h6,
.page-title-box h4,
.card-title,
.btn,
.form-label,
.table {
    font-family: var(--ui-font);
}

.page-content {
    padding-top: calc(70px + 1.25rem);
}

.card {
    border: 1px solid var(--ui-border);
    border-radius: var(--ui-radius);
    box-shadow: var(--ui-shadow);
}

.card + .card {
    margin-top: 1rem;
}

.card .card-body {
    padding: 1.1rem 1.25rem;
}

.form-label {
    font-weight: 600;
    color: #5a6478;
    margin-bottom: 0.4rem;
}

.form-control,
.form-select,
.dataTables_wrapper .dataTables_filter input {
    border: 1px solid #d7deec;
    border-radius: 10px;
    min-height: 42px;
    box-shadow: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.form-control:focus,
.form-select:focus,
.dataTables_wrapper .dataTables_filter input:focus {
    border-color: var(--ui-primary);
    box-shadow: 0 0 0 3px rgba(58, 111, 248, 0.16);
}

.btn {
    border-radius: 10px;
    font-weight: 600;
    padding: 0.56rem 1rem;
    line-height: 1.2;
    min-height: 40px;
}

.btn-sm {
    border-radius: 8px;
    padding: 0.42rem 0.78rem;
    min-height: 34px;
}

.btn-lg {
    padding: 0.68rem 1.2rem;
    min-height: 46px;
}

.btn-primary {
    background-color: var(--ui-primary);
    border-color: var(--ui-primary);
}

.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active {
    background-color: var(--ui-primary-strong);
    border-color: var(--ui-primary-strong);
}

.btn-outline-primary {
    color: var(--ui-primary);
    border-color: #8eb0ff;
}

.btn-outline-primary:hover,
.btn-outline-primary:focus,
.btn-outline-primary:active {
    background-color: var(--ui-primary);
    border-color: var(--ui-primary);
}

.alert {
    border: 1px solid transparent;
    border-radius: 10px;
}

.table {
    margin-bottom: 0;
    border-color: #e6e9f2;
}

.table thead th {
    background: #f7f9fe;
    border-bottom: 1px solid #dfe5f2;
    color: #5c667a;
    font-size: 0.76rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    vertical-align: middle;
}

.table td {
    vertical-align: middle;
}

.table tbody tr:hover {
    background-color: #f6f9ff;
}

.table-responsive {
    border: 1px solid #e6eaf4;
    border-radius: 10px;
}

.badge {
    font-weight: 600;
    border-radius: 7px;
    padding: 0.45em 0.65em;
}

.pagination {
    gap: 0.25rem;
}

.page-link {
    border-radius: 8px;
    border-color: #dfe5f2;
    color: #4b5670;
}

.page-item.active .page-link {
    background-color: var(--ui-primary);
    border-color: var(--ui-primary);
}

.navbar-header {
    border-bottom: 1px solid #e8ecf5;
    box-shadow: 0 1px 0 rgba(31, 41, 55, 0.03);
}

.vertical-menu {
    border-right: 1px solid #e6ebf5;
    box-shadow: 2px 0 20px rgba(31, 41, 55, 0.04);
}

#sidebar-menu ul li a {
    border-radius: 8px;
    margin: 2px 8px;
    padding-top: 0.58rem;
    padding-bottom: 0.58rem;
}

#sidebar-menu ul li a:hover {
    background-color: #eef3ff;
}

#sidebar-menu ul li.mm-active > a {
    background: #e8efff;
    color: #2e5bde !important;
}

#sidebar-menu ul li ul.sub-menu li a {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 0.45rem;
    white-space: nowrap;
}

#sidebar-menu ul li ul.sub-menu li a i {
    min-width: 1rem;
    text-align: center;
}

.footer {
    background: transparent;
}

@media (max-width: 767.98px) {
    .card .card-body {
        padding: 0.95rem;
    }

    .btn {
        padding: 0.52rem 0.88rem;
        min-height: 38px;
    }

    .btn-sm {
        padding: 0.4rem 0.7rem;
        min-height: 32px;
    }
}
