/* Shared admin form design, based on the tank editor. Opt in with common-form. */
form[data-required-form] .server-error > .error { margin: 0; }
/* Chrome, Safari, Edge, Opera */
.common-form input::-webkit-outer-spin-button,
.common-form input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* Firefox */
.common-form input[type=number] {
    -moz-appearance: textfield;
}
.common-form { --form-border: #e2e8f0; --form-ink: #29374d; }
.common-form > .col-12 > .card { border: 1px solid var(--form-border); border-radius: 12px; box-shadow: 0 4px 20px rgba(35, 48, 70, .04); }
.common-form .card-body { padding: 24px; }
.common-form .card-body > .cust-card-title { display: flex; align-items: center; gap: 10px; margin-bottom: 18px; font-size: 21px; font-weight: 600; color: var(--form-ink); }
.common-form .cust-card-title > .cust-box-icon { display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px; flex-shrink: 0; line-height: 1; border-radius: 9px; background: #f0edfb; color: #331cbf; }
.common-form .pending_request { margin-left: auto; float: none !important; }
.common-form .form-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 0; }
.common-form .form-panel { width: 100%; max-width: 100%; min-width: 0; padding: 16px; border: 1px solid var(--form-border); border-radius: 10px; background: #f7f9fc; }
.common-form .form-section-title { font-size: 14px; font-weight: 600; color: var(--form-ink); margin: 0 0 14px; }
.common-form .form-group.row { flex-direction: column; align-items: stretch; margin: 0 0 8px; }
.common-form .form-group.row:last-child { margin-bottom: 0; }
.common-form .col-form-label { flex: none; width: 100%; max-width: 100%; margin: 0; padding: 0 0 3px; color: #49586d; font-size: 13px; font-weight: 500; line-height: 1.4; }
.common-form .col-sm-9 { flex: none; width: 100%; max-width: 100%; min-width: 0; padding: 0; }
.common-form .form-control { height: auto; min-height: 42px; padding: 10px 12px; border: 1px solid #d9e1eb; border-radius: 7px; background: #fff; color: var(--form-ink); font-size: 13px; }
.common-form .form-control:focus { border-color: #a79bd8; box-shadow: 0 0 0 3px rgba(51, 28, 191, .07); }
.common-form #custom_color { display: block; width: 100%; height: 42px; padding: 5px; border: 1px solid #d9e1eb; border-radius: 7px; background: #fff; cursor: pointer; }
.common-form #custom_color::-webkit-color-swatch-wrapper { padding: 0; }
.common-form #custom_color::-webkit-color-swatch { border: 0; border-radius: 4px; }
.common-form #custom_color::-moz-color-swatch { border: 0; border-radius: 4px; }
.common-form .select2-container { width: 100% !important; max-width: 100%; }
.common-form .select2-container--default .select2-selection--multiple { height: auto !important; min-height: 42px; border: 1px solid #d9e1eb; border-radius: 7px; background: #fff; }
.common-form .select2-container--default .select2-selection--multiple .select2-selection__rendered { display: flex; align-items: center; flex-wrap: wrap; gap: 4px; box-sizing: border-box; height: auto; min-height: 40px; margin: 0; padding: 4px 10px; line-height: 30px; }
.common-form .select2-container--default .select2-selection--multiple .select2-selection__choice { float: none; margin: 0; padding: 0 8px; background: #f0edfb; border: 1px solid #e2dcf5; border-radius: 5px; font-size: 13px; line-height: 28px; }
.common-form .select2-container .select2-search--inline { display: flex; align-items: center; float: none; margin: 0; padding: 0; min-width: 0; }
.common-form .select2-container .select2-search--inline .select2-search__field { display: block; box-sizing: border-box; height: 30px; min-height: 0; margin: 0; padding: 0; line-height: 30px; font-size: 13px; }
.common-form .form-select-control { display: flex; flex-direction: column; }
.common-form .form-select-control > .select2-container { order: 0; }
.common-form .form-select-control > .error,
.common-form .form-select-control > .server-error { order: 1; }
.common-form .btn, .common-form .btn-common { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 42px; margin: 0 !important; padding: 0 20px; line-height: 1.2; float: none !important; border-radius: 7px; }
.common-form .pending_request .btn { width: 38px; min-height: 38px; padding: 0; }
.common-form .form-actions { grid-column: 1 / -1; display: flex; justify-content: flex-end; padding-top: 14px; margin: 0; border-top: 1px solid var(--form-border); }
.common-form .form-actions .btn { min-width: 140px; }
/* Match the Add User .btn-common submit button colors. */
.common-form .form-actions .btn-primary,
.common-form .form-actions .btn-common {
    background: #331cbf;
    border: 1px solid #331cbf;
    color: #fff;
}
.common-form .form-actions .btn-primary:not(:disabled):not(.disabled):hover,
.common-form .form-actions .btn-common:not(:disabled):not(.disabled):hover {
    background: transparent;
    border-color: #331cbf;
    color: #331cbf;
}
.common-form .form-actions .btn-primary:not(:disabled):not(.disabled):active,
.common-form .form-actions .btn-common:not(:disabled):not(.disabled):active {
    background: transparent;
    border-color: #331cbf;
    color: #331cbf;
}
.common-form label.error, .common-form label.server-error,
.common-form span.error, .common-form span.server-error { position: relative !important; bottom: auto; left: auto; display: block; margin: 5px 0 0; font-size: 12px; line-height: 1.4; color: #dc3545; }
.common-form label.error:empty, .common-form label.server-error:empty,
.common-form span.error:empty, .common-form span.server-error:empty { display: none; }
@media (max-width: 767px) {
    .common-form .card-body { padding: 16px; }
    .common-form .form-fields { grid-template-columns: minmax(0, 1fr); }
    .common-form .form-actions .btn { width: 100%; }
}

/* Shared layouts for compact forms, enhanced selects, uploads, and API tokens. */
.common-form .form-fields--single { grid-template-columns: minmax(0, 1fr); }
.common-form .form-actions .btn-common { min-width: 140px; }
.common-form .form-actions > .form-group { margin: 0; }
.common-form .form-actions--wrap { flex-wrap: wrap; gap: 10px; }
.common-form .form-panel > .jumbotron { margin: 0; padding: 0 !important; background: transparent; }
.common-form .form-panel > .jumbotron .display-6 { margin-bottom: 14px; font-size: 14px; font-weight: 600; color: var(--form-ink); }
.common-form .form-panel > .jumbotron .lead { font-size: 13px; line-height: 1.5; }
.common-form .form-panel > .jumbotron img { max-width: 100%; height: auto; }
.common-form .select2-container { height: auto; min-height: 42px; }
.common-form .select2-container--default .select2-selection--single { height: 42px; border: 1px solid #d9e1eb; border-radius: 7px; background: #fff; }
.common-form .select2-container--default .select2-selection--single .select2-selection__rendered { padding: 0 32px 0 12px; line-height: 40px; color: var(--form-ink); font-size: 13px; }
.common-form .select2-container--default .select2-selection--single .select2-selection__arrow { height: 40px; }
.common-form .select2-container--default.select2-container--focus .select2-selection--multiple,
.common-form .select2-container--default.select2-container--focus .select2-selection--single { border-color: #a79bd8; box-shadow: 0 0 0 3px rgba(51, 28, 191, .07); }
.common-form .dropify-wrapper { border: 1px solid #d9e1eb; border-radius: 7px; }
.common-form .alert { border-radius: 7px; font-size: 13px; overflow-wrap: anywhere; }
.common-form .token-input { min-width: 0; border-right: 0; border-radius: 7px 0 0 7px; }
.common-form .token-copy-btn { border: 1px solid #d9e1eb; border-left: 0; border-radius: 0; background: #fff; color: #6c757d; padding: 0 12px; }
.common-form .token-copy-btn:last-child { border-radius: 0 7px 7px 0; }
.common-form .token-copy-btn:hover { background: #f0edfb; color: #331cbf; }
.common-form .token-copy-btn:focus { box-shadow: inset 0 0 0 2px #a79bd8; }
@media (max-width: 767px) {
    .common-form .form-actions .btn-common,
    .common-form .form-actions > .form-group { width: 100%; }
}
