/* crud-custom.css: Styles for CRUD UI (migrated from inline Blade styles)
   Customize as needed. */

.crud-card {
    border: 1px solid #e5edf3;
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 12px 22px -20px rgba(0, 0, 0, 0.45);
}

.crud-table-wrap {
    max-height: 64vh;
    overflow: auto;
}

.crud-table-wrap table thead th {
    position: sticky;
    top: 0;
    z-index: 2;
    background: #f8fbfd;
    border-bottom: 1px solid #d9e7f0;
    font-weight: 700;
    color: #446078;
}

.crud-table-wrap table tbody tr:hover {
    background: #f7fbff;
}

.actions-cell {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.action-icon-btn {
    width: 30px;
    height: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #cad9e5;
    border-radius: 8px;
    background: #fff;
    color: #446078;
    line-height: 1;
    text-decoration: none;
}

.action-icon-btn:hover,
.action-icon-btn:focus {
    background: #077BA1;
    border-color: #077BA1;
    color: #fff;
}

.responsable-highlight {
    font-weight: 700;
    color: #077BA1;
}

.detail-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.8rem;
}

.detail-card {
    border: 1px solid #e5edf3;
    border-radius: 12px;
    background: #fbfdff;
    padding: 0.75rem 0.85rem;
    min-width: 0;
}

.detail-card.full {
    grid-column: 1 / -1;
}

.detail-label {
    font-size: 0.76rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #7E8080;
    margin-bottom: 0.3rem;
    font-weight: 700;
}

.detail-value {
    color: #446078;
    font-weight: 600;
    overflow-wrap: anywhere;
    word-break: break-word;
    min-height: 1.25rem;
}

.detail-photo-wrap {
    display: flex;
    justify-content: center;
    margin-bottom: 0.9rem;
}

.detail-photo {
    width: 180px;
    height: 180px;
    object-fit: cover;
    border-radius: 16px;
    border: 1px solid #d7e4ee;
    background: #f4f8fb;
}

.observation-cell {
    display: flex;
    align-items: center;
    justify-content: center;
}

.obs-col {
    width: 72px;
    min-width: 72px;
    white-space: nowrap;
    text-align: center;
}

.crud-modal .modal-content {
    border: 1px solid #dde8f0;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 20px 38px -24px rgba(0, 0, 0, 0.45);
    max-height: calc(100vh - 2rem);
}

.crud-modal .modal-header {
    background: linear-gradient(180deg, #f8fbfd 0%, #eef5fa 100%);
    border-bottom: 1px solid #dce8f1;
    padding: 0.9rem 1rem;
}

.crud-modal .modal-title {
    color: #446078;
    font-weight: 700;
    letter-spacing: 0.01em;
}

.crud-modal .modal-body {
    background: #ffffff;
    padding: 1rem;
    overflow-y: auto;
    max-height: calc(100vh - 230px);
}

.modal-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.8rem;
}

.modal-field {
    border: 1px solid #e5edf3;
    border-radius: 12px;
    background: #fbfdff;
    padding: 0.7rem;
    min-width: 0;
}

.modal-field.full {
    grid-column: 1 / -1;
}

.modal-group-title {
    grid-column: 1 / -1;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #446078;
    font-weight: 700;
    margin-top: 0.25rem;
    margin-bottom: -0.15rem;
}

.modal-field .form-label {
    font-size: 0.76rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #7E8080;
    margin-bottom: 0.4rem;
    font-weight: 700;
}

.modal-field .form-control {
    border: 1px solid #d7e4ee;
    border-radius: 10px;
    min-height: 2.4rem;
}

.modal-field .form-control:focus {
    border-color: #077BA1;
    box-shadow: 0 0 0 0.2rem rgba(7, 123, 161, 0.14);
}

.crud-modal .modal-footer {
    border-top: 1px solid #e6eef5;
    background: #fbfdff;
    padding: 0.85rem 1rem;
}

.crud-modal .btn {
    min-height: 2.35rem;
    font-weight: 600;
    border-radius: 10px;
    padding: 0.45rem 1rem;
}

.user-thumb {
    width: 72px;
    height: 72px;
    border-radius: 8px;
    object-fit: cover;
    border: 1px solid #cad9e5;
    background: #f4f8fb;
}

.photo-input-sm {
    max-width: 260px;
}

.avatar-picker-btn {
    border: 0;
    background: transparent;
    padding: 0;
    cursor: pointer;
}

.avatar-circle {
    width: 170px;
    height: 170px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #cad9e5;
    background: #f4f8fb;
}

.avatar-placeholder {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: #446078;
}

.personal-modal-layout {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.8rem;
}

.personal-modal-col {
    display: grid;
    gap: 0.8rem;
    align-content: start;
}

.avatar-picker-wrap {
    text-align: center;
}

.credentials-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.8rem;
}

.general-compact-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.6rem;
}

.compact-field {
    padding: 0.55rem;
}

.compact-field .form-control,
.compact-field .form-select {
    min-height: 2rem;
    font-size: 0.9rem;
    padding-top: 0.3rem;
    padding-bottom: 0.3rem;
}

@media (max-width: 767.98px) {
    .modal-form-grid {
        grid-template-columns: 1fr;
    }
    .personal-modal-layout {
        grid-template-columns: 1fr;
    }
    .credentials-row {
        grid-template-columns: 1fr;
    }
    .general-compact-grid {
        grid-template-columns: 1fr;
    }
    .crud-modal .modal-content {
        max-height: calc(100vh - 1rem);
    }
    .crud-modal .modal-body {
        max-height: calc(100vh - 210px);
    }
}
