/*
 * Project-scoped backend visual baseline.
 *
 * Keep this file loaded after FastAdmin and skin styles. The selectors are
 * intentionally limited to authenticated backend content and do not target
 * login, print/PDF templates, rich-text editors, or upload preview internals.
 */

body:not(.login-page) .content-wrapper,
body:not(.login-page) .content,
body:not(.login-page) .panel,
body:not(.login-page) .bootstrap-table,
body:not(.login-page) .form-horizontal,
body:not(.login-page) .modal-content {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
        "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
}

/* Preserve the existing FastAdmin table density while normalizing type. */
body:not(.login-page) .bootstrap-table thead th,
body:not(.login-page) .bootstrap-table thead th .th-inner {
    font-size: 14px;
    font-weight: 600;
}

body:not(.login-page) .bootstrap-table tbody td {
    font-size: 14px;
    line-height: 20px;
}

/* Ordinary form controls only; textarea keeps its content-driven height. */
body:not(.login-page) .content input.form-control,
body:not(.login-page) .content select.form-control,
body:not(.login-page) .panel input.form-control,
body:not(.login-page) .panel select.form-control,
body:not(.login-page) .form-horizontal input.form-control,
body:not(.login-page) .form-horizontal select.form-control,
body:not(.login-page) .modal-content input.form-control,
body:not(.login-page) .modal-content select.form-control {
    height: 34px;
    padding: 6px 12px;
    font-size: 14px;
    line-height: 20px;
}

body:not(.login-page) .content textarea.form-control:not(.note-codable),
body:not(.login-page) .panel textarea.form-control:not(.note-codable),
body:not(.login-page) .form-horizontal textarea.form-control:not(.note-codable),
body:not(.login-page) .modal-content textarea.form-control:not(.note-codable) {
    padding: 6px 12px;
    font-size: 14px;
    line-height: 20px;
}

/* Bootstrap Select: single-line controls align with native form controls. */
body:not(.login-page) .content .bootstrap-select > .dropdown-toggle,
body:not(.login-page) .panel .bootstrap-select > .dropdown-toggle,
body:not(.login-page) .form-horizontal .bootstrap-select > .dropdown-toggle,
body:not(.login-page) .modal-content .bootstrap-select > .dropdown-toggle {
    height: 34px;
    min-height: 34px;
    padding-top: 6px;
    padding-bottom: 6px;
    font-size: 14px;
    line-height: 20px;
}

body:not(.login-page) .bootstrap-select > .dropdown-toggle .filter-option {
    padding-right: 20px;
}

/* Select2 v4 single-select. Multi-select height remains plugin-controlled. */
body:not(.login-page) .content .select2-container,
body:not(.login-page) .panel .select2-container,
body:not(.login-page) .form-horizontal .select2-container,
body:not(.login-page) .modal-content .select2-container {
    font-size: 14px;
    vertical-align: middle;
}

body:not(.login-page) .select2-container .select2-selection--single {
    height: 34px;
    min-height: 34px;
}

body:not(.login-page) .select2-container .select2-selection--single .select2-selection__rendered {
    padding-right: 30px;
    font-size: 14px;
    line-height: 32px;
}

body:not(.login-page) .select2-container .select2-selection--single .select2-selection__arrow {
    height: 32px;
}

/* Select2 v3 compatibility used by some existing FastAdmin pages. */
body:not(.login-page) .select2-container .select2-choice {
    height: 34px;
    min-height: 34px;
    font-size: 14px;
    line-height: 32px;
}

body:not(.login-page) .select2-container .select2-choice > .select2-chosen {
    padding-right: 30px;
    line-height: 32px;
}

body:not(.login-page) .select2-container .select2-choice .select2-arrow {
    height: 32px;
}

/* SelectPage keeps its tag/search layout; only its typography is normalized. */
body:not(.login-page) .sp_container,
body:not(.login-page) .sp_container input.selectpage {
    font-size: 14px;
}

/* Ordinary form actions only; toolbar, small and row-operation buttons stay unchanged. */
body:not(.login-page) .form-horizontal .form-group > [class*="col-"] > .btn:not(.btn-sm):not(.btn-xs):not(.faupload):not(.plupload),
body:not(.login-page) .form-inline > .btn:not(.btn-sm):not(.btn-xs),
body:not(.login-page) .form-layer .form-footer .btn:not(.btn-sm):not(.btn-xs) {
    min-height: 34px;
    font-size: 13px;
    line-height: 20px;
}

/* Secondary and validation text. Colors and positioning remain framework-owned. */
body:not(.login-page) .content .help-block,
body:not(.login-page) .content .help-inline,
body:not(.login-page) .content .form-control-feedback,
body:not(.login-page) .panel .help-block,
body:not(.login-page) .panel .help-inline,
body:not(.login-page) .panel .form-control-feedback,
body:not(.login-page) .form-horizontal .help-block,
body:not(.login-page) .form-horizontal .help-inline,
body:not(.login-page) .form-horizontal .form-control-feedback,
body:not(.login-page) .modal-content .help-block,
body:not(.login-page) .modal-content .help-inline,
body:not(.login-page) .modal-content .form-control-feedback,
body:not(.login-page) .nice-validator .msg-box,
body:not(.login-page) .nice-validator .msg-wrap,
body:not(.login-page) .nice-validator-error,
body:not(.login-page) .nice-validator-success,
body:not(.login-page) .validation-error {
    font-size: 12px;
    line-height: 18px;
}

body:not(.login-page) .help-block,
body:not(.login-page) .help-inline,
body:not(.login-page) .nice-validator .msg-wrap,
body:not(.login-page) .validation-error {
    white-space: normal;
    overflow-wrap: break-word;
}

/* Bootstrap status labels only; badges and icon fonts are untouched. */
body:not(.login-page) .content .label,
body:not(.login-page) .panel .label,
body:not(.login-page) .bootstrap-table .label,
body:not(.login-page) .modal-content .label {
    font-size: 12px;
    line-height: 18px;
    font-weight: 600;
}
