.ui-input {
    height: 48px;
    background: white;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 14px;
    font-family: var(--font);
    font-weight: var(--weight-field);
    color: var(--dark);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    outline: none;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.ui-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(30, 141, 174, 0.1);
}

.ui-input::placeholder {
    color: var(--muted);
    font-weight: var(--weight-placeholder);
}

.ui-field-error {
    display: none;
    font-size: 13px;
    color: #e53e3e;
    margin-top: 4px;
}

.ui-field-error.visible {
    display: block;
}

.ui-input.is-invalid,
.form-control.is-invalid,
.form-input.is-invalid {
    border-color: #e53e3e;
}

.ui-input.is-invalid:focus,
.form-control.is-invalid:focus,
.form-input.is-invalid:focus {
    box-shadow: 0 0 0 3px rgba(229, 62, 62, 0.15);
}

.ui-password-wrap {
    position: relative;
}

.ui-password-wrap .ui-input,
.ui-password-wrap .form-control,
.ui-password-wrap .form-input {
    padding-right: 48px;
}

.ui-password-toggle {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    color: var(--muted);
}

.ui-password-wrap .form-control + .ui-password-toggle {
    right: 24px;
    padding: 4px;
}

.ui-password-wrap .ui-input + .ui-password-toggle,
.ui-password-wrap .form-input + .ui-password-toggle {
    right: 14px;
    padding: 0;
}

.ui-password-toggle:hover {
    color: var(--light);
}

.ui-password-toggle img {
    display: block;
    flex-shrink: 0;
}

.ui-check {
    display: flex;
    align-items: center;
    gap: 8px;
    padding-left: 0.2rem;
    font-size: 14px;
    color: var(--medium);
    cursor: pointer;
    user-select: none;
}

.ui-check input[type="checkbox"] {
    width: 20px;
    height: 20px;
    border: 1px solid #cbd5e1;
    border-radius: 4px;
    accent-color: var(--primary);
    cursor: pointer;
    flex-shrink: 0;
}

.ui-text-button {
    margin-top: 12px;
    padding: 0;
    border: none;
    background: none;
    color: var(--primary);
    font-size: 14px;
    font-weight: 600;
    font-family: var(--font);
    cursor: pointer;
    text-align: left;
}

.ui-text-button:hover {
    color: #1a7a99;
    text-decoration: underline;
}

.btn-primary-action {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 11px 20px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 8px;
    box-shadow: 0 10px 15px -3px rgba(30, 141, 174, 0.2), 0 4px 6px -4px rgba(30, 141, 174, 0.2);
    font-size: 14px;
    font-family: var(--font);
    font-weight: 500;
    text-decoration: none;
    white-space: nowrap;
    cursor: pointer;
    transition: background 0.15s;
}

.btn-primary-action:hover {
    background: var(--primary-dark);
}

.btn-primary-action:disabled,
.btn-primary-action[aria-disabled="true"] {
    background: #cbd5e1;
    box-shadow: none;
    color: #f8fafc;
    cursor: not-allowed;
    opacity: 1;
}

.btn-primary-action:hover:disabled,
.btn-primary-action[aria-disabled="true"]:hover {
    background: #cbd5e1;
}

.btn-primary-action img,
.btn-secondary-action img {
    display: block;
    flex-shrink: 0;
}

.btn-primary-action-lg {
    justify-content: center;
    width: 100%;
    min-height: 48px;
    padding: 14px 20px;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 700;
    line-height: 22px;
}

.btn-secondary-action {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 11px 20px;
    background: white;
    color: var(--medium);
    border: 1px solid var(--border);
    border-radius: 8px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    font-size: 14px;
    font-family: var(--font);
    font-weight: 500;
    text-decoration: none;
    white-space: nowrap;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.btn-secondary-action:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
    color: var(--dark);
}

.btn-secondary-action-lg {
    justify-content: center;
    width: 100%;
    min-height: 42px;
    padding: 12px 20px;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 700;
    line-height: 22px;
}

.btn-secondary-action-sm {
    gap: 6px;
    padding: 8px 14px;
    font-size: 12px;
}

.btn-back {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 16px;
    font-weight: 500;
    color: var(--light);
    background: none;
    border: none;
    cursor: pointer;
    text-decoration: none;
    padding: 0;
    font-family: var(--font);
    white-space: nowrap;
}

.btn-back:hover {
    color: var(--dark);
}

.btn-next {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 16px 48px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 18px;
    font-weight: 700;
    font-family: var(--font);
    text-decoration: none;
    box-shadow: 0 10px 15px -3px rgba(30, 141, 174, 0.2), 0 4px 6px -4px rgba(30, 141, 174, 0.2);
    white-space: nowrap;
    cursor: pointer;
    transition: background 0.15s, opacity 0.15s;
}

.btn-next:hover:not(:disabled) {
    background: #1a7a99;
}

.btn-next:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-back img {
    width: 12px;
    height: 12px;
}

.btn-next img {
    width: 16px;
    height: 16px;
}

.btn-back img,
.btn-next img {
    display: block;
    flex-shrink: 0;
}

.month-nav {
    display: flex;
    align-items: center;
    gap: 5px;
    min-height: 42px;
    background: white;
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    padding: 5px;
    position: relative;
}

.month-nav-btn {
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: none;
    cursor: pointer;
    border-radius: 8px;
    color: var(--light);
    transition: background 0.15s;
}

.month-nav-btn:hover {
    background: #f1f5f9;
}

.month-nav-btn img {
    display: block;
    width: 7px;
    height: 10px;
}

.month-display {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 30px;
    padding: 6px 16px;
    border: none;
    background: none;
    font-size: 16px;
    font-weight: 700;
    font-family: var(--font);
    color: #1e293b;
    cursor: pointer;
    white-space: nowrap;
}

.month-display img {
    display: block;
    width: 18px;
    height: 20px;
}

.month-nav-picker {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: 0;
    padding: 0;
    opacity: 0;
    pointer-events: none;
}

select.ui-select-source {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: 0;
    padding: 0;
    opacity: 0;
    pointer-events: none;
}

.ui-ts-wrapper {
    width: 160px;
    height: auto;
    padding: 0;
    background: transparent;
    border: none;
    box-shadow: none;
    appearance: none;
}

.ui-ts-wrapper .ts-control {
    min-height: 48px;
    height: 48px;
    padding: 9px 38px 9px 12px;
    background: white;
    border: 1px solid var(--border);
    border-radius: 8px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    cursor: pointer;
}

.ui-ts-wrapper .ts-control:hover {
    border-color: #cbd5e1;
}

.ui-ts-wrapper.focus .ts-control {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(30, 141, 174, 0.1);
}

.ui-ts-wrapper .ts-control > input {
    font-size: 14px;
    font-family: var(--font);
    font-weight: var(--weight-field);
    color: var(--dark);
    cursor: pointer;
}

.ui-ts-wrapper .ts-control > input::placeholder {
    color: var(--muted);
    font-weight: var(--weight-placeholder);
}

.ui-ts-wrapper .ts-control::after {
    content: "";
    position: absolute;
    top: 50%;
    right: 12px;
    width: 18px;
    height: 18px;
    transform: translateY(-50%);
    pointer-events: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2394a3b8' stroke-width='2'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='m19 9-7 7-7-7'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    background-size: 18px;
}

.ui-ts-wrapper.dropdown-active .ts-control::after {
    transform: translateY(-50%) rotate(180deg);
}

.ui-ts-wrapper .ts-control,
.ui-ts-wrapper .ts-dropdown {
    font-family: var(--font);
}

.ui-ts-wrapper .ts-dropdown {
    margin-top: 8px;
    border: 1px solid var(--border);
    border-radius: 10px;
    box-shadow: 0 10px 30px -5px rgba(0, 0, 0, 0.12), 0 4px 10px -5px rgba(0, 0, 0, 0.06);
}

.ui-ts-wrapper .ts-dropdown .option {
    padding: 10px 12px;
    font-size: 14px;
    font-weight: var(--weight-field);
    color: var(--label);
}

.ui-ts-wrapper .ts-dropdown .active {
    background: rgba(30, 141, 174, 0.06);
    color: var(--primary);
}

.ui-ts-wrapper.ui-single-select .ts-control {
    display: flex;
    align-items: center;
}

.ui-ts-wrapper.ui-single-select .ts-control::before {
    content: attr(data-placeholder);
    font-size: 14px;
    font-weight: var(--weight-placeholder);
    color: var(--muted);
}

.ui-ts-wrapper.ui-single-select.has-items .ts-control::before {
    display: none;
}

.ui-ts-wrapper.ui-single-select .ts-control > input {
    position: absolute;
    width: 1px !important;
    min-width: 1px;
    margin: 0;
    opacity: 0;
    pointer-events: none;
}

.ui-ts-wrapper.ui-single-select .ts-control .item {
    margin: 0;
    font-size: 14px;
    font-weight: var(--weight-selected);
    color: var(--label);
}

.ui-ts-wrapper.ui-single-select.is-placeholder .ts-control .item {
    color: var(--muted);
    font-weight: var(--weight-placeholder);
}

.ui-ts-wrapper.ui-single-select:not(.is-placeholder) .ts-control .item {
    color: var(--dark);
    font-weight: var(--weight-selected);
}

.ui-ts-wrapper.ui-multi-select .ts-control {
    align-items: center;
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: none;
}

.ui-ts-wrapper.ui-multi-select .ts-control::-webkit-scrollbar {
    display: none;
}

.ui-ts-wrapper.ui-multi-select.has-items .ts-control > input {
    width: 1px !important;
    min-width: 1px;
    margin: 0;
    opacity: 0;
}

.ui-ts-wrapper.ui-multi-select.summary-mode .item {
    display: none;
}

.ui-ts-summary {
    display: inline-flex;
    align-items: center;
    height: 28px;
    padding: 0 10px;
    border-radius: 9999px;
    background: rgba(30, 141, 174, 0.08);
    border: 1px solid rgba(30, 141, 174, 0.14);
    font-size: 13px;
    font-weight: var(--weight-selected);
    color: var(--primary);
    white-space: nowrap;
}

.ui-ts-checkbox-option {
    display: flex;
    align-items: center;
    gap: 10px;
}

.ui-ts-option-check {
    position: relative;
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    border: 1.5px solid #cbd5e1;
    border-radius: 4px;
    background: white;
}

.ui-ts-wrapper .ts-dropdown .option.selected .ui-ts-option-check::after,
.ui-ts-wrapper .ts-dropdown .option.active.selected .ui-ts-option-check::after {
    content: "";
    position: absolute;
    top: 1px;
    left: 4px;
    width: 5px;
    height: 9px;
    border-right: 2px solid var(--primary);
    border-bottom: 2px solid var(--primary);
    transform: rotate(45deg);
}

.ui-ts-wrapper .ts-dropdown .option.selected .ui-ts-option-check,
.ui-ts-wrapper .ts-dropdown .option.active.selected .ui-ts-option-check {
    border-color: rgba(30, 141, 174, 0.4);
    background: rgba(30, 141, 174, 0.06);
}

.ui-ts-wrapper.ui-multi-select .ts-control > div {
    margin: 2px 6px 2px 0;
    padding: 3px 8px;
    background: rgba(30, 141, 174, 0.08);
    border: 1px solid rgba(30, 141, 174, 0.14);
    border-radius: 9999px;
    font-size: 12px;
    font-weight: var(--weight-selected);
    color: var(--primary);
}

.ui-ts-wrapper.ui-multi-select .ts-control > div.active {
    background: rgba(30, 141, 174, 0.14);
}

.ui-ts-wrapper.plugin-remove_button .item .remove {
    margin-left: 6px;
    padding-left: 6px;
    border-left: 1px solid rgba(30, 141, 174, 0.14);
    color: rgba(30, 141, 174, 0.7);
}

.ui-ts-wrapper.plugin-remove_button .item .remove:hover {
    color: var(--primary-dark);
}

/* ===== STATUS BADGE ===== */
.status-badge {
    display: inline-block;
    font-size: 11px;
    font-weight: 500;
    padding: 3px 9px;
    border-radius: 6px;
    border: 1px solid #e2e8f0;
    background: #f8fafc;
    color: #475569;
    white-space: nowrap;
}

.status-badge.status-badge-success {
    background: #dcfce7;
    border-color: #bbf7d0;
    color: #15803d;
}

.status-badge.status-badge-warning {
    background: #fef9c3;
    border-color: #fef08a;
    color: #a16207;
}

.status-badge.status-badge-danger {
    background: #fee2e2;
    border-color: #fecaca;
    color: #b91c1c;
}

.status-badge.status-badge-info {
    background: #dbeafe;
    border-color: #bfdbfe;
    color: #1d4ed8;
}

.status-badge-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px;
}

.field-hint {
    margin: 0;
    font-size: 12px;
    line-height: 18px;
    color: #a16207;
}
