
.crud-form {
    width: 100%;
    margin: 0 auto;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.crud-form .box {
    background: #ffffff;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    border: 1px solid #e1e5e9;
    transition: box-shadow 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.crud-form .box:hover {
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

.crud-form .box-header .box-title {
    font-weight: 600;
    font-size: 1.25rem;
    color: #1a202c;
    border-bottom: 2px solid #3f51b5;
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    position: relative;
}

.crud-form .box-header .box-title::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 60px;
    height: 2px;
    background: linear-gradient(90deg, #3f51b5, #6366f1);
}

.crud-form .box-footer {
    text-align: right;
    padding-top: 1.5rem;
    border-top: 1px solid #f1f5f9;
    margin-top: 1.5rem;
}

.form-control, .form-select, input[type="text"], input[type="email"], input[type="password"], input[type="number"], input[type="tel"], textarea, select {
    width: 100%;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 0.875rem;
    font-family: inherit;
    transition: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
    background-color: #ffffff;
    color: #1a202c;
}

.form-control:focus, .form-select:focus, input:focus, textarea:focus, select:focus {
    outline: none;
    border-color: #3f51b5;
    box-shadow: 0 0 0 3px rgba(63, 81, 181, 0.1);
    transform: translateY(-1px);
}

.form-control:hover, .form-select:hover, input:hover, textarea:hover, select:hover {
    border-color: #9ca3af;
}

.form-label, label {
    font-weight: 500;
    color: #374151;
    margin-bottom: 0.5rem;
    display: block;
    font-size: 0.875rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-text {
    font-size: 0.75rem;
    color: #6b7280;
    margin-top: 0.25rem;
}

input[type="checkbox"], input[type="radio"] {
    width: auto;
    margin-right: 0.5rem;
    accent-color: #3f51b5;
}


select {
    background-image: url('data:image/svg+xml;charset=US-ASCII,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 4 5"><path fill="%23666" d="M2 0L0 2h4zm0 5L0 3h4z"/></svg>');
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 0.75rem;
    padding-right: 2.5rem;
}


.sonata-ba-list .table,
.table-standard {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
}

.sonata-ba-list .table th,
.sonata-ba-list .table td,
.table-standard th,
.table-standard td {
    text-align: left;
    padding: 1rem;
    border-bottom: 1px solid #f1f5f9;
    font-size: 0.875rem;
    vertical-align: middle;
}

.sonata-ba-list .table th,
.table-standard th {
    font-weight: 600;
    background: #f8fafc;
    color: #374151;
    border-bottom: 2px solid #e5e7eb;
}

.sonata-ba-list .table tbody tr:hover,
.table-standard tbody tr:hover {
    background: #f8fafc;
}

.form-control.is-invalid, input.is-invalid, select.is-invalid, textarea.is-invalid {
    border-color: #dc2626;
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1);
}

.form-control.is-valid, input.is-valid, select.is-valid, textarea.is-valid {
    border-color: #059669;
    box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.1);
}

.invalid-feedback {
    color: #dc2626;
    font-size: 0.75rem;
    margin-top: 0.25rem;
}

.valid-feedback {
    color: #059669;
    font-size: 0.75rem;
    margin-top: 0.25rem;
}

/* Auto password modal */
.auto-password-modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.65);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
    z-index: 5000;
}

.auto-password-modal-backdrop.is-visible {
    opacity: 1;
    pointer-events: auto;
}

.auto-password-modal {
    width: min(520px, 100%);
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 25px 50px -12px rgba(15, 23, 42, 0.45);
    padding: 2rem;
    position: relative;
    border: 1px solid rgba(15, 23, 42, 0.08);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.auto-password-modal h3 {
    margin-top: 0;
    font-size: 1.35rem;
    font-weight: 600;
    color: #0f172a;
}

.auto-password-modal p {
    color: #475569;
    font-size: 0.95rem;
    margin-bottom: 1rem;
}

.auto-password-modal .password-field {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    margin: 1rem 0;
}

.auto-password-modal .password-field input {
    flex: 1;
    border-radius: 10px;
    border: 1px solid #cbd5f5;
    background: #f8fafc;
    font-weight: 600;
    letter-spacing: 0.12em;
    height: 46px;
}

.auto-password-modal button {
    border: none;
    border-radius: 10px;
    padding: 0.65rem 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.auto-password-modal button:focus-visible {
    outline: 2px solid #4f46e5;
    outline-offset: 2px;
}

.auto-password-modal .btn-secondary {
    background: #e2e8f0;
    color: #0f172a;
}

.auto-password-modal .btn-primary {
    background: linear-gradient(135deg, #4f46e5, #7c3aed);
    color: #ffffff;
    box-shadow: 0 10px 15px -10px rgba(76, 81, 191, 0.8);
}

.auto-password-modal .btn-link {
    background: transparent;
    color: #475569;
    padding: 0;
}

.auto-password-modal .force-reset-toggle {
    margin: 1rem 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #0f172a;
    font-weight: 500;
}

.auto-password-modal .force-reset-toggle input {
    width: auto;
    margin: 0;
}

.auto-password-modal .modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    margin-top: 1.5rem;
}

.auto-password-modal .close-modal {
    position: absolute;
    top: 1rem;
    right: 1rem;
    border: none;
    background: transparent;
    font-size: 1.5rem;
    line-height: 1;
    color: #94a3b8;
    cursor: pointer;
}

.auto-password-modal .inline-note {
    font-size: 0.85rem;
    color: #64748b;
}
