/* Tenant panel forms — field chrome + clear label / value / placeholder hierarchy */

:root {
    --tc-label-color: #0c2340;
    --tc-label-size: 0.8125rem;
    --tc-value-color: #111827;
    --tc-value-size: 0.9375rem;
    --tc-placeholder-color: #94a3b8;
    --tc-placeholder-size: 0.875rem;
}

/* ——— Labels (above fields) ——— */
.tc-form-page label,
.tc-form-page .form-group > label,
.tc-form-page .form-label,
.tc-form-page .tc-field > label {
    display: block;
    margin-bottom: 0.4rem !important;
    font-size: var(--tc-label-size) !important;
    font-weight: 600 !important;
    line-height: 1.35 !important;
    color: var(--tc-label-color) !important;
    letter-spacing: 0.01em;
    text-transform: none;
}

.tc-form-page .form-check-label {
    font-size: var(--tc-value-size) !important;
    font-weight: 500 !important;
    color: var(--tc-value-color) !important;
}

.tc-form-page label .asterisk,
.tc-form-page label .text-danger {
    color: #dc3545 !important;
    font-weight: 700 !important;
}

/* ——— Typed / selected value text ——— */
.tc-form-page .form-control,
.tc-form-page .form-select,
.tc-form-page textarea.form-control,
.tc-form-page select.form-control {
    border-radius: 0 !important;
    min-height: 42px;
    border: 1px solid #b8c9dc;
    font-size: var(--tc-value-size) !important;
    font-weight: 400 !important;
    line-height: 1.45 !important;
    color: var(--tc-value-color) !important;
    background-color: #fff !important;
    box-shadow: none;
}

/* ——— Placeholder / empty hint text ——— */
.tc-form-page .form-control::placeholder,
.tc-form-page textarea.form-control::placeholder {
    font-size: var(--tc-placeholder-size) !important;
    font-weight: 400 !important;
    font-style: italic !important;
    color: var(--tc-placeholder-color) !important;
    opacity: 1 !important;
}

.tc-form-page .form-control::-webkit-input-placeholder { color: var(--tc-placeholder-color) !important; }
.tc-form-page .form-control::-moz-placeholder { color: var(--tc-placeholder-color) !important; opacity: 1; }
.tc-form-page .form-control:-ms-input-placeholder { color: var(--tc-placeholder-color) !important; }

/* Select first “--Select--” style option */
.tc-form-page select.form-control option {
    color: var(--tc-value-color);
    font-size: var(--tc-value-size);
}

.tc-form-page select.form-control option[value=""],
.tc-form-page select.form-control option:disabled {
    color: var(--tc-placeholder-color) !important;
    font-style: italic;
}

.tc-form-page textarea.form-control {
    min-height: 80px;
    height: auto;
}

.tc-form-page .form-control:focus,
.tc-form-page .form-select:focus {
    border-color: #1a4a7a;
    box-shadow: 0 0 0 2px rgba(26, 74, 122, 0.12);
}

.tc-form-page .select2-container--default .select2-selection--single {
    border-radius: 0 !important;
    min-height: 42px !important;
    height: 42px !important;
    border: 1px solid #b8c9dc !important;
    display: flex;
    align-items: center;
}

.tc-form-page .select2-container--default .select2-selection--single {
    display: flex !important;
    align-items: center !important;
}

.tc-form-page .select2-container--default .select2-selection--single .select2-selection__rendered {
    line-height: 1.35 !important;
    padding-left: 8px !important;
    display: flex !important;
    align-items: center !important;
    flex-wrap: wrap;
    width: 100% !important;
}

.tc-form-page .select2-container--default .select2-selection--single .select2-selection__placeholder {
    font-size: var(--tc-placeholder-size) !important;
    font-style: italic !important;
    color: var(--tc-placeholder-color) !important;
    background: none !important;
    border: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

/* Single select — badge (Chrome/Safari via tc-has-value + data-badge-label) */
.tc-form-page .select2-container.tc-has-value .select2-selection--single .select2-selection__rendered {
    color: transparent !important;
    font-size: 0 !important;
    position: relative;
    min-height: 28px;
}

.tc-form-page .select2-container.tc-has-value .select2-selection--single .select2-selection__rendered::after {
    content: attr(data-badge-label);
    display: inline-block;
    padding: 4px 10px;
    background: #e8eef5;
    border: 1px solid #b8c9dc;
    border-radius: 4px;
    color: #1e3a5f;
    font-size: 0.8125rem;
    font-weight: 600;
    line-height: 1.35;
    max-width: calc(100% - 1.5rem);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    position: absolute;
    left: 6px;
    top: 50%;
    transform: translateY(-50%);
}

.tc-form-page .select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 40px !important;
}

.tc-form-page .select2-container--default .select2-selection--single .select2-selection__clear {
    margin-right: 6px;
    color: #64748b !important;
    font-weight: 700;
}

/* Multi select — badge chips */
.tc-form-page .select2-container--default .select2-selection--multiple {
    min-height: 42px !important;
    padding: 4px 8px !important;
    border-radius: 0 !important;
    border: 1px solid #b8c9dc !important;
}

.tc-form-page .select2-container--default .select2-selection--multiple .select2-selection__rendered {
    display: flex !important;
    flex-wrap: wrap;
    gap: 4px;
    padding: 0 !important;
    margin: 0 !important;
}

.tc-form-page .select2-container--default .select2-selection--multiple .select2-selection__choice {
    background: #e8eef5 !important;
    border: 1px solid #b8c9dc !important;
    border-radius: 4px !important;
    color: #1e3a5f !important;
    font-size: 0.8125rem !important;
    font-weight: 600 !important;
    padding: 4px 10px !important;
    margin: 2px 0 !important;
    line-height: 1.3 !important;
}

.tc-form-page .select2-container--default .select2-selection--multiple .select2-selection__choice__remove {
    color: #64748b !important;
    margin-right: 6px !important;
    border-right: none !important;
    font-weight: 700;
}

.tc-form-page .select2-container--default .select2-selection--multiple .select2-selection__choice__remove:hover {
    color: #dc3545 !important;
    background: transparent !important;
}

.tc-form-page .select2-container--default .select2-search--inline .select2-search__field {
    font-size: var(--tc-placeholder-size) !important;
    color: var(--tc-placeholder-color) !important;
    margin-top: 4px;
}

.tc-form-page a.btn-import.form-control.b-r-0,
.tc-form-page .tc-catalog-trigger {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    min-height: 42px;
    padding: 0.5rem 0.75rem;
    border-radius: 0 !important;
    border: 1px solid #b8c9dc;
    background: #fff;
    font-size: var(--tc-placeholder-size) !important;
    font-style: italic;
    color: var(--tc-placeholder-color) !important;
    text-decoration: none;
    cursor: pointer;
}

.tc-form-page a.btn-import.form-control.b-r-0:hover,
.tc-form-page .tc-catalog-trigger:hover {
    border-color: #1a4a7a;
    font-style: normal;
    color: var(--tc-value-color) !important;
    background: #f8fafc;
}

.tc-form-page .form-group strong {
    display: block;
    margin-bottom: 0.35rem;
    font-size: var(--tc-label-size) !important;
    font-weight: 600 !important;
    color: var(--tc-label-color) !important;
}

/* Auth pages — same hierarchy as dashboard forms */
.tc-form-page .tc-input,
.tc-form-page .tc-select {
    border-radius: 0 !important;
    min-height: 42px;
    border: 1px solid #b8c9dc;
    background: #fff;
    font-size: var(--tc-value-size) !important;
    font-weight: 400 !important;
    color: var(--tc-value-color) !important;
    box-shadow: none;
    padding: 0.5rem 0.75rem;
}

.tc-form-page .tc-input::placeholder {
    font-size: var(--tc-placeholder-size) !important;
    font-style: italic !important;
    color: var(--tc-placeholder-color) !important;
    opacity: 1 !important;
}

.tc-form-page .tc-select option[value=""] {
    color: var(--tc-placeholder-color);
    font-style: italic;
}

.tc-form-page .tc-input-wrap .tc-input {
    padding-left: 2.75rem;
}

.tc-form-page .tc-input--plain {
    padding-left: 0.75rem !important;
}

.tc-form-page .tc-input:focus,
.tc-form-page .tc-select:focus {
    border-color: #1a4a7a;
    box-shadow: 0 0 0 2px rgba(26, 74, 122, 0.12);
    outline: none;
}

.tc-form-page .tc-field-hint {
    font-size: var(--tc-placeholder-size) !important;
    color: var(--tc-placeholder-color) !important;
    font-style: italic;
}

/* Disabled / readonly — muted value, not placeholder */
.tc-form-page .form-control:disabled,
.tc-form-page .form-control[readonly] {
    color: #64748b !important;
    background-color: #f1f5f9 !important;
}

/* Settings hub — bare labels in columns and legacy <strong> labels */
.tc-form-page [class*="col-"] > label:not(.form-check-label),
.tc-settings-panel [class*="col-"] > label:not(.form-check-label) {
    display: block;
    margin-bottom: 0.4rem !important;
    font-size: var(--tc-label-size) !important;
    font-weight: 600 !important;
    line-height: 1.35 !important;
    color: var(--tc-label-color) !important;
}

.tc-form-page .form-group > strong,
.tc-settings-panel .form-group > strong {
    display: block;
    margin-bottom: 0.4rem !important;
    font-size: var(--tc-label-size) !important;
    font-weight: 600 !important;
    line-height: 1.35 !important;
    color: var(--tc-label-color) !important;
}

.tc-form-page .form-group > strong .txt-danger,
.tc-settings-panel .form-group > strong .txt-danger {
    color: #dc3545 !important;
}

.tc-form-page input[type="file"].form-control,
.tc-settings-panel input[type="file"].form-control {
    min-height: auto;
    padding: 0.35rem 0.75rem;
    font-size: var(--tc-value-size);
}

/* Password show/hide (panel forms) */
.tc-form-page .tc-input-wrap--password,
.tc-settings-panel .tc-input-wrap--password,
.tc-form-page .tc-password-wrap,
.tc-settings-panel .tc-password-wrap {
    position: relative;
}

.tc-password-toggle {
    position: absolute;
    right: 0.65rem;
    top: 50%;
    transform: translateY(-50%);
    z-index: 3;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    padding: 0;
    border: none;
    background: transparent;
    color: var(--tc-muted, #6c757d);
    cursor: pointer;
    border-radius: 6px;
}

.tc-password-toggle:hover {
    color: var(--tc-navy, #0c2340);
    background: rgba(12, 35, 64, 0.06);
}

.tc-form-page .tc-input-wrap--password .tc-input,
.tc-settings-panel .tc-input-wrap--password .tc-input,
.tc-form-page .tc-password-wrap input[type="password"],
.tc-settings-panel .tc-password-wrap input[type="password"] {
    padding-right: 2.75rem;
}

.tc-form-page .tc-input-wrap--password .tc-input {
    padding-left: 2.75rem;
}
