/* ================================
   工�?流管?�樣�?- ?��???
   ================================ */

/* ========== ?�用模�?框樣�?========== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.modal-content {
    background: white;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-width: 600px;
    width: 100%;
    max-height: 85vh;
    overflow: hidden;
    animation: modalSlideIn 0.3s ease-out;
}

.modal-content.modal-sm {
    max-width: 450px;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-30px) scale(0.95);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.modal-header {
    padding: 24px 24px 16px;
    border-bottom: 2px solid #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: linear-gradient(135deg, #4db8a8 0%, #3a9d8f 100%);
    color: white;
}

.modal-header h3 {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}

.modal-close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 18px;
    transition: all 0.2s;
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

.modal-body {
    padding: 24px;
    max-height: calc(85vh - 160px);
    overflow-y: auto;
}

.modal-footer {
    padding: 16px 24px;
    border-top: 2px solid #f0f0f0;
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    background: #f8f9fa;
}

/* ========== ?��??��??�樣�?========== */
.icon-selector-group {
    margin-bottom: 20px;
}

.icon-selector-wrapper {
    display: grid;
    grid-template-columns: 1fr auto auto;
    gap: 12px;
    align-items: start;
}

.icon-select {
    min-width: 0;
}

.icon-preview {
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #4db8a8 0%, #3a9d8f 100%);
    border-radius: 10px;
    color: white;
    font-size: 24px;
    flex-shrink: 0;
}

.icon-preview img {
    border-radius: 10px;
}

.custom-icon-upload {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.custom-icon-upload small {
    font-size: 11px;
    line-height: 1.2;
    max-width: 150px;
}

/* ========== 表單�?? ========== */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
    font-size: 14px;
}

.form-control {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 15px;
    transition: all 0.2s;
    background: white;
    box-sizing: border-box;
}

.form-control:focus {
    outline: none;
    border-color: #4db8a8;
    box-shadow: 0 0 0 3px rgba(77, 184, 168, 0.1);
}

.form-control:disabled {
    background: #f5f5f5;
    cursor: not-allowed;
}

.form-text {
    display: block;
    margin-top: 6px;
    font-size: 13px;
}

.text-muted {
    color: #999;
}

textarea.form-control {
    resize: vertical;
    min-height: 80px;
    font-family: inherit;
}

/* ========== 複選框樣�?========== */
.checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 12px;
    background: #f8f9fa;
    border-radius: 8px;
}

.checkbox-group label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    padding: 8px 12px;
    border-radius: 6px;
    transition: background 0.2s;
    font-weight: 500;
}

.checkbox-group label:hover {
    background: rgba(77, 184, 168, 0.1);
}

.checkbox-group input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: #4db8a8;
}

/* ========== ?��?�?? ========== */
.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-primary {
    background: linear-gradient(135deg, #4db8a8 0%, #3a9d8f 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(77, 184, 168, 0.3);
}

.btn-success {
    background: linear-gradient(135deg, #56ab2f 0%, #a8e063 100%);
    color: white;
}

.btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(86, 171, 47, 0.3);
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background: #5a6268;
}

.btn-danger {
    background: linear-gradient(135deg, #eb3349 0%, #f45c43 100%);
    color: white;
}

.btn-danger:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(235, 51, 73, 0.3);
}

.btn-info {
    background: linear-gradient(135deg, #2193b0 0%, #6dd5ed 100%);
    color: white;
}

.btn-info:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(33, 147, 176, 0.3);
}

.btn-sm {
    padding: 6px 14px;
    font-size: 13px;
}

.btn-outline {
    background: white;
    border: 2px solid #4db8a8;
    color: #4db8a8;
}

.btn-outline:hover {
    background: #4db8a8;
    color: white;
}

.btn-icon {
    background: rgba(0, 0, 0, 0.05);
    border: none;
    padding: 8px;
    cursor: pointer;
    color: #666;
    transition: all 0.2s;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
}

.btn-icon:hover {
    background: #f0f0f0;
    color: #4db8a8;
}

.btn-icon:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.btn-icon.btn-danger {
    color: #e74c3c;
}

.btn-icon.btn-danger:hover {
    background: #fee;
    color: #c0392b;
}

/* ========== 工�?流�?置卡??========== */
.task-type-configs {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.task-config-card {
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    padding: 20px;
    background: white;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.task-config-card:hover {
    border-color: #4db8a8;
    box-shadow: 0 4px 20px rgba(77, 184, 168, 0.15);
    transform: translateY(-2px);
}

/* ?��??�部?�??- ?��? + 標�? + ?��??��? */
.card-header-section {
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.card-header-row {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.card-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #4db8a8 0%, #3a9d8f 100%);
    color: white;
    border-radius: 12px;
    font-size: 22px;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(77, 184, 168, 0.3);
}

/* 標�?行�?標�??��? + 編輯/?�除?��? */
.card-title-row {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.card-title-row h5 {
    margin: 0;
}

.title-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

.card-title-section {
    flex: 1;
    min-width: 0;
}

.card-title {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.workflow-name {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #333;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.card-title-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

.edit-name-btn {
    font-size: 14px;
    opacity: 0.6;
    flex-shrink: 0;
    transition: all 0.2s;
    color: #4db8a8;
    padding: 4px 8px;
}

.edit-name-btn:hover {
    opacity: 1;
    transform: scale(1.05);
    background: rgba(77, 184, 168, 0.1);
}

.delete-workflow-btn {
    color: #e74c3c;
    font-size: 14px;
    padding: 4px 8px;
    opacity: 0.6;
    transition: all 0.2s;
}

.delete-workflow-btn:hover {
    opacity: 1;
    background: rgba(231, 76, 60, 0.1);
    transform: scale(1.05);
}

/* ?��??�容?�??- ?�??+ ?��??��? */
.card-content {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.config-status {
    width: 100%;
    /* 確�?寬度一??*/
    padding: 10px 12px;
    border-radius: 8px;
    background: #f8f9fa;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 8px;
    box-sizing: border-box;
    /* ?�含 padding ?�寬度�?算中 */
}

.config-status.configured {
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
    border-left: 4px solid #28a745;
}

.config-status.not-configured {
    background: linear-gradient(135deg, #fff3cd 0%, #ffeaa7 100%);
    border-left: 4px solid #ffc107;
}

.status-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: white;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.configured .status-badge {
    color: #28a745;
}

.not-configured .status-badge {
    color: #ffc107;
}

.file-name {
    color: #666;
    font-size: 12px;
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.card-actions {
    width: 100%;
    /* 確�?寬度??config-status 一??*/
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    box-sizing: border-box;
    /* ?�含 padding ?�寬度�?算中 */
}

/* ========== 工�?流管?��???========== */
.workflow-management-section {
    margin-top: 24px;
    padding: 18px 20px;
    background: linear-gradient(135deg, rgba(77, 184, 168, 0.05) 0%, rgba(118, 75, 162, 0.05) 100%);
    border-radius: 10px;
    border: 2px dashed #4db8a8;
}

.workflow-management-section h4 {
    margin: 0 0 12px 0;
    font-size: 16px;
    color: #333;
    display: flex;
    align-items: center;
    gap: 8px;
}

.management-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

/* ========== ?��??�表�?? ========== */
.sortable-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-height: 450px;
    overflow-y: auto;
    padding: 4px;
}

.sortable-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    transition: all 0.2s;
    cursor: move;
}

.sortable-item:hover {
    border-color: #4db8a8;
    box-shadow: 0 4px 12px rgba(77, 184, 168, 0.15);
    transform: translateX(4px);
}

.sortable-item.dragging {
    opacity: 0.5;
    transform: scale(1.05);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

.drag-handle {
    color: #999;
    cursor: grab;
    font-size: 20px;
    transition: color 0.2s;
    display: flex;
    align-items: center;
}

.drag-handle:active {
    cursor: grabbing;
}

.drag-handle:hover {
    color: #4db8a8;
}

.workflow-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #4db8a8 0%, #3a9d8f 100%);
    color: white;
    border-radius: 10px;
    font-size: 22px;
    flex-shrink: 0;
}

.workflow-icon img {
    width: 32px;
    height: 32px;
    object-fit: contain;
}

.workflow-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.workflow-name {
    font-weight: 600;
    font-size: 16px;
    color: #333;
}

.workflow-order {
    color: #999;
    font-size: 13px;
}

.sort-buttons {
    display: flex;
    gap: 6px;
}

.btn-icon {
    width: 36px;
    height: 36px;
    border: none;
    background: #f5f5f5;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    color: #666;
}

.btn-icon:hover:not(:disabled) {
    background: #4db8a8;
    color: white;
    transform: translateY(-2px);
}

.btn-icon:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.sortable-handle {
    color: #999;
    cursor: grab;
    font-size: 20px;
    transition: color 0.2s;
}

.sortable-handle:active {
    cursor: grabbing;
}

.sortable-handle:hover {
    color: #4db8a8;
}

.sortable-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #4db8a8 0%, #3a9d8f 100%);
    color: white;
    border-radius: 10px;
    font-size: 22px;
    flex-shrink: 0;
}

.sortable-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.sortable-name {
    font-weight: 600;
    font-size: 16px;
    color: #333;
}

.sortable-order {
    color: #999;
    font-size: 13px;
}

.sortable-actions {
    display: flex;
    gap: 6px;
}

/* ========== ?�放?��?�?? ========== */
.schedule-container {
    padding: 0;
    width: 100%;
}

.schedule-overview {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 10px;
    padding: 5px 0;
    background: transparent;
    border: none;
}

.overview-item {
    position: relative;
    border: 2px solid #dee2e6;
    border-radius: 8px;
    padding: 5px 5px 5px;
    background: #f8f9fa;
    min-height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.overview-item label {
    position: absolute;
    top: 2px;
    left: 5px;
    font-weight: 500;
    color: #495057;
    font-size: 12px;
    margin: 0;
}

.overview-item .form-control {
    font-size: 14px;
    font-weight: 600;
    border: none;
    background: transparent;
    text-align: center;
    width: 100%;
    padding: 10px 14px;
}

/* ========== ?��?表格�?? ========== */
.schedule-table-wrapper {
    margin-bottom: 24px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    background: white;
}

.schedule-table {
    width: 100%;
    border-collapse: collapse;
}

.schedule-table thead {
    background: linear-gradient(135deg, #4db8a8 0%, #3a9d8f 100%);
    color: white;
}

.schedule-table th {
    padding: 16px 12px;
    text-align: center;
    font-weight: 600;
    font-size: 15px;
    letter-spacing: 0.5px;
}

.schedule-table td {
    padding: 16px 12px;
    border-bottom: 1px solid #f0f0f0;
    text-align: center;
    vertical-align: middle;
}

.schedule-table tbody tr {
    transition: background 0.2s;
}

.schedule-table tbody tr:hover {
    background: #f8f9fa;
}

.schedule-table tbody tr:last-child td {
    border-bottom: none;
}

.preview-cell {
    padding: 8px;
}

.preview-thumbnail {
    width: 120px;
    height: 80px;
    background: linear-gradient(135deg, #f0f0f0 0%, #e0e0e0 100%);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    color: #999;
    margin: 0 auto;
    border: 2px solid #e0e0e0;
    overflow: hidden;
}

.preview-thumbnail img,
.preview-thumbnail video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.schedule-title-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
    text-align: left;
}

.schedule-title-group input {
    margin-bottom: 0;
    font-weight: 600;
}

.schedule-title-group small {
    color: #666;
    font-size: 13px;
    padding-left: 4px;
}

/* ========== ?��??��??��???�側?��?�?========== */
.schedule-media-sidebar {
    height: 100%;
    display: flex;
    flex-direction: column;
    background: white;
    border-radius: 12px;
    overflow: hidden;
}

.media-sidebar-header {
    padding: 20px;
    background: linear-gradient(135deg, #4db8a8 0%, #3a9d8f 100%);
    color: white;
}

.media-sidebar-header h4 {
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 18px;
}

.media-grid {
    flex: 1;
    max-height: 500px;
    overflow-y: auto;
    padding: 16px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 16px;
    align-content: start;
    position: relative;
}

/* 滾�?條樣�?*/
.media-grid::-webkit-scrollbar {
    width: 6px;
}

.media-grid::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.media-grid::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

.media-grid::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* ?�到?�部?��? */
.scroll-to-top-btn {
    position: absolute;
    bottom: 8px;
    right: 8px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #4db8a8;
    color: white;
    border: none;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    transition: all 0.2s;
    z-index: 10;
}

.scroll-to-top-btn:hover {
    background: #5a6fd8;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.scroll-to-top-btn.show {
    display: flex;
}

.loading-placeholder {
    grid-column: 1;
    text-align: center;
    padding: 40px 20px;
    color: #999;
}

.loading-placeholder i {
    font-size: 32px;
    margin-bottom: 12px;
    display: block;
}

.loading-placeholder p {
    margin: 0;
    font-size: 14px;
}

.media-item {
    aspect-ratio: 16/9;
    border-radius: 10px;
    overflow: hidden;
    border: 3px solid transparent;
    cursor: grab;
    transition: all 0.2s;
    position: relative;
    background: #f0f0f0;
}

.media-item:active {
    cursor: grabbing;
}

.media-item:hover {
    border-color: #4db8a8;
    transform: scale(1.03);
    box-shadow: 0 4px 12px rgba(77, 184, 168, 0.2);
}

.media-item.selected {
    border-color: #4db8a8;
    box-shadow: 0 0 0 3px rgba(77, 184, 168, 0.2);
}

.media-item img,
.media-item video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.media-item-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 8px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.7), transparent);
    color: white;
    font-size: 12px;
    font-weight: 600;
}

/* ========== ?�放?��? ========== */
.media-item.dragging {
    opacity: 0.5;
    transform: scale(0.95);
}

.schedule-table tbody tr.drag-over {
    background: rgba(77, 184, 168, 0.1);
    border-left: 4px solid #4db8a8;
}

.schedule-table tbody tr {
    cursor: pointer;
    position: relative;
}

/* ========== 媒�?上傳?��? ========== */
.media-upload-action {
    padding: 16px;
    border-top: 2px solid #f0f0f0;
}

.media-upload-action .btn {
    width: 100%;
}

/* ========== 住�? ID 顯示 ========== */
.resident-id-display {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 8px;
}

.id-label {
    font-size: 13px;
    opacity: 0.9;
}

.id-value {
    font-size: 16px;
    font-weight: 700;
    background: white;
    color: #4db8a8;
    padding: 4px 12px;
    border-radius: 6px;
}

/* ========== ?��??��? ========== */
.schedule-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
    padding: 16px 20px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 -2px 6px rgba(0, 0, 0, 0.04);
}

.schedule-actions .btn {
    padding: 8px 16px;
    font-size: 14px;
}

/* ========== ?��??�表�?? ========== */
.schedule-list-wrapper {
    margin-bottom: 20px;
}

.schedule-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.schedule-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    transition: all 0.3s ease;
    cursor: move;
}

.schedule-item:hover {
    border-color: #4db8a8;
    box-shadow: 0 3px 15px rgba(77, 184, 168, 0.12);
    transform: translateY(-1px);
}

.schedule-details {
    flex: 1;
}

.schedule-title {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.schedule-title i {
    color: #4db8a8;
}

.schedule-meta {
    font-size: 13px;
    color: #888;
}

.schedule-actions {
    display: flex;
    gap: 6px;
}

.schedule-placeholder {
    padding: 40px;
    text-align: center;
    color: #999;
}

.schedule-placeholder i {
    font-size: 48px;
    margin-bottom: 12px;
    opacity: 0.5;
}

.schedule-placeholder p {
    margin: 0;
    font-size: 15px;
}

/* ========== ?��?式調??========== */
@media (max-width: 1200px) {
    .schedule-overview {
        grid-template-columns: 1fr;
    }

    .media-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .modal-content {
        width: 95%;
        max-height: 90vh;
    }

    .modal-header,
    .modal-body,
    .modal-footer {
        padding: 16px;
    }

    .schedule-header {
        flex-direction: column;
        gap: 12px;
        align-items: stretch;
    }

    .schedule-table th,
    .schedule-table td {
        padding: 8px 4px;
        font-size: 13px;
    }

    .preview-thumbnail {
        width: 80px;
        height: 60px;
    }

    .card-actions {
        flex-direction: column;
    }

    .management-actions {
        flex-direction: column;
    }
}

/* ========== �����޲z�˦� ========== */
.resident-management {
    margin-top: 30px;
}

.resident-management .section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.resident-list-container {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 20px;
    min-height: 300px;
}

.resident-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.resident-card {
    background: white;
    border-radius: 10px;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.resident-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.resident-info {
    display: flex;
    align-items: center;
    gap: 15px;
    flex: 1;
}

.resident-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, #4db8a8 0%, #3a9d8f 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 28px;
}

.resident-details {
    flex: 1;
}

.resident-name {
    margin: 0 0 8px 0;
    color: #2c3e50;
    font-weight: 600;
    font-size: 16px;
}

.resident-meta {
    display: flex;
    gap: 15px;
    align-items: center;
    color: #7f8c8d;
    font-size: 13px;
}

.resident-meta i {
    margin-right: 5px;
    color: #95a5a6;
}

.resident-description {
    margin: 8px 0 0 0;
    color: #7f8c8d;
    font-size: 13px;
    line-height: 1.5;
}

.resident-actions {
    display: flex;
    gap: 12px;
    align-items: center;
}

.resident-modal {
    max-width: 500px;
}

.resident-modal .form-hint {
    display: block;
    margin-top: 5px;
    color: #95a5a6;
    font-size: 12px;
}

.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #95a5a6;
}

.empty-state i {
    font-size: 64px;
    margin-bottom: 20px;
    opacity: 0.5;
}

.empty-state p {
    margin: 10px 0;
    font-size: 16px;
}

.empty-state .hint {
    font-size: 13px;
    color: #bdc3c7;
}

.loading {
    text-align: center;
    padding: 40px;
    color: #95a5a6;
}

/* Toast �q�� */
.toast {
    position: fixed;
    top: 20px;
    right: 20px;
    background: white;
    padding: 15px 20px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    gap: 12px;
    opacity: 0;
    transform: translateX(400px);
    transition: all 0.3s ease;
    z-index: 10000;
}

.toast.show {
    opacity: 1;
    transform: translateX(0);
}

.toast-success {
    border-left: 4px solid #27ae60;
}

.toast-error {
    border-left: 4px solid #e74c3c;
}

.toast-info {
    border-left: 4px solid #3498db;
}

.toast i {
    font-size: 20px;
}

.toast-success i {
    color: #27ae60;
}

.toast-error i {
    color: #e74c3c;
}

.toast-info i {
    color: #3498db;
}

/* ========== �����ҺA�ح״_ ========== */
.modal.resident-modal-wrapper {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal.resident-modal-wrapper .modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: 1;
    opacity: 0;
    transition: opacity 0.3s ease-out;
}

.modal.resident-modal-wrapper.fade-in .modal-overlay {
    opacity: 1;
}

.modal.resident-modal-wrapper .modal-content {
    position: relative;
    z-index: 2;
    background: white;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-width: 500px;
    width: 90%;
    max-height: 85vh;
    overflow-y: auto;
    opacity: 0;
    transform: scale(0.9);
    transition: opacity 0.3s ease-out, transform 0.3s ease-out;
}

.modal.resident-modal-wrapper.fade-in .modal-content {
    opacity: 1;
    transform: scale(1);
}

.modal.resident-modal-wrapper.fade-out .modal-overlay {
    opacity: 0;
}

.modal.resident-modal-wrapper.fade-out .modal-content {
    opacity: 0;
    transform: scale(0.9);
}

.modal.fade-in {
    animation: none;
    /* 移除?��??�畫 */
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* ========== �u�@�y�G���s�边 ========== */
.layout-editor-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.layout-editor-modal .modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: 1;
}

.layout-editor-modal .modal-container {
    position: relative;
    z-index: 2;
    max-width: 1400px;
    width: 95%;
    max-height: 90vh;
    background: white;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.layout-editor-body {
    display: grid;
    grid-template-columns: 400px 1fr;
    gap: 24px;
    flex: 1;
    min-height: 0;
    padding: 24px;
    overflow: hidden;
}

/* 左側?��? */
.editor-sidebar {
    background: #f8f9fa;
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    max-height: calc(90vh - 180px);
    min-height: 0;
}

.sidebar-header {
    padding: 16px;
    background: white;
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.sidebar-header h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
}

.parameter-list {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 16px;
    min-height: 0;
}

.param-section {
    margin-bottom: 24px;
}

.section-title {
    font-size: 14px;
    font-weight: 600;
    color: #666;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 2px solid #e0e0e0;
}

.group-title {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #4a90e2;
    border-bottom-color: #4a90e2;
}

.group-title span {
    flex: 1;
}

/* �Ѽƥd�� */
.param-card {
    background: linear-gradient(145deg, #ffffff, #f8f9fa);
    border: 2px solid #e3e8ef;
    border-radius: 12px;
    padding: 14px 16px;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: move;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.04);
}

.param-card:hover {
    border-color: #2196F3;
    box-shadow: 0 6px 16px rgba(33, 150, 243, 0.15), 0 2px 4px rgba(0, 0, 0, 0.08);
    transform: translateY(-2px);
}

.param-card.dragging {
    opacity: 0.6;
    transform: scale(0.98) rotate(2deg);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.param-card.hidden {
    /* �?使用 !important 覆�??��? .hidden ??display: none */
    display: flex !important;
    opacity: 0.5;
    border-color: #ccc;
    background: linear-gradient(145deg, #f5f5f5, #e8e8e8);
    /* �?不使??display: none，改?��?覺�?表示?��??�??*/
    filter: grayscale(80%);
}

.param-card.hidden .param-label {
    text-decoration: line-through;
    color: #999;
}

.param-card.hidden .param-icon {
    opacity: 0.4;
}

.param-card.hidden .btn-icon {
    opacity: 0.6;
}

/* 節點�??�卡?�樣�?*/
.param-card.node-only-card {
    background: linear-gradient(145deg, #e3f2fd, #bbdefb);
    border-color: #2196F3;
}

.param-card.node-only-card .param-icon {
    background: linear-gradient(135deg, #2196F3 0%, #1976D2 100%);
}

.param-card.node-only-card:hover {
    border-color: #1976D2;
    box-shadow: 0 6px 16px rgba(33, 150, 243, 0.25);
}

/* ??��類�??��?�?? */
.param-card.connection-card {
    background: linear-gradient(145deg, #fff3e0, #ffe0b2);
    border-color: #FF9800;
}

.param-card.connection-card .param-icon {
    background: linear-gradient(135deg, #FF9800 0%, #F57C00 100%);
}

.param-card.connection-card:hover {
    border-color: #F57C00;
    box-shadow: 0 6px 16px rgba(255, 152, 0, 0.25);
}

/* ?�數?��?�?*/
.param-value-preview {
    margin-top: 6px;
    padding: 6px 10px;
    background: rgba(255, 255, 255, 0.7);
    border-radius: 6px;
    font-size: 11px;
    font-family: 'Courier New', monospace;
    color: #666;
    border: 1px solid rgba(0, 0, 0, 0.1);
}

/* ?�覽?�?�中?��?�???��信息 */
.node-info-preview,
.connection-info-preview {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
}

.node-info-preview {
    background: linear-gradient(145deg, #e3f2fd, #bbdefb);
    border: 2px solid #2196F3;
    color: #1976D2;
}

.node-info-preview i {
    font-size: 18px;
}

.connection-info-preview {
    background: linear-gradient(145deg, #fff3e0, #ffe0b2);
    border: 2px solid #FF9800;
    color: #F57C00;
}

.connection-info-preview i {
    font-size: 18px;
}

.param-icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: linear-gradient(135deg, #4db8a8 0%, #3a9d8f 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 16px;
}

.param-info {
    flex: 1;
    min-width: 0;
}

.param-label {
    font-weight: 600;
    color: #333;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.param-meta {
    font-size: 12px;
    color: #999;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.param-actions {
    display: flex;
    gap: 4px;
}

.btn-icon {
    width: 36px;
    height: 36px;
    border: none;
    background: linear-gradient(145deg, #ffffff, #f5f5f5);
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    cursor: pointer;
    color: #555;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.btn-icon:hover {
    background: linear-gradient(145deg, #f8f8f8, #e8e8e8);
    border-color: #2196F3;
    color: #2196F3;
    box-shadow: 0 4px 12px rgba(33, 150, 243, 0.2);
    transform: translateY(-1px);
}

.btn-icon:active {
    transform: translateY(0) scale(0.95);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

/* �k���w�� */
.editor-preview {
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 0;
}

.preview-header {
    padding: 16px;
    background: #f8f9fa;
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.preview-header h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
}

.preview-actions {
    display: flex;
    gap: 8px;
}

.preview-content {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 24px;
    min-height: 0;
}

.preview-form {
    max-width: 100%;
    width: 100%;
}

.preview-param {
    margin-bottom: 20px;
}

.preview-label {
    display: block;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
    font-size: 14px;
}

.preview-param input,
.preview-param textarea,
.preview-param select {
    width: 100%;
    padding: 10px 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.2s;
}

.preview-param input:focus,
.preview-param textarea:focus,
.preview-param select:focus {
    outline: none;
    border-color: #4a90e2;
}

.preview-param input[type="checkbox"] {
    width: auto;
    height: 20px;
}

/* ?��?�?? */
.btn-sm {
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 600;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.btn-sm.btn-secondary {
    background: linear-gradient(145deg, #6c757d, #5a6268);
    color: white;
    border: 1px solid #545b62;
    box-shadow: 0 2px 6px rgba(108, 117, 125, 0.3);
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-sm.btn-secondary:hover {
    background: linear-gradient(145deg, #5a6268, #495057);
    box-shadow: 0 4px 12px rgba(108, 117, 125, 0.4);
    transform: translateY(-1px);
}

.btn-sm.btn-secondary:active {
    transform: translateY(0) scale(0.98);
    box-shadow: 0 1px 3px rgba(108, 117, 125, 0.3);
}

/* �Ū��A */
.empty-state {
    text-align: center;
    padding: 40px;
    color: #999;
}

/* �ʵe */
.fade-out {
    animation: fadeOut 0.3s ease-out forwards;
}

@keyframes fadeOut {
    to {
        opacity: 0;
        transform: scale(0.95);
    }
}


.layout-editor-modal .modal-container {
    position: relative;
    z-index: 2;
    max-width: 1400px;
    width: 95%;
    max-height: 90vh;
    background: white;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
}

.layout-editor-modal .modal-header {
    padding: 20px 24px;
    border-bottom: 2px solid #e0e0e0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(135deg, #4db8a8 0%, #3a9d8f 100%);
    border-radius: 16px 16px 0 0;
}

.layout-editor-modal .modal-header h2 {
    margin: 0;
    color: white;
    font-size: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.layout-editor-modal .close-btn {
    width: 36px;
    height: 36px;
    border: none;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.layout-editor-modal .close-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

.layout-editor-modal .modal-footer {
    padding: 20px 24px;
    border-top: 2px solid #e0e0e0;
    display: flex;
    justify-content: flex-end;
    gap: 16px;
    background: linear-gradient(180deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 0 0 16px 16px;
}

.layout-editor-modal .modal-footer .btn-sm {
    min-width: 120px;
    justify-content: center;
}

.layout-editor-modal .modal-footer .btn-primary {
    background: linear-gradient(145deg, #4db8a8, #3a9d8f);
    color: white;
    box-shadow: 0 4px 12px rgba(77, 184, 168, 0.4);
}

.layout-editor-modal .modal-footer .btn-primary:hover {
    background: linear-gradient(145deg, #5568d3, #654a8f);
    box-shadow: 0 6px 16px rgba(77, 184, 168, 0.5);
    transform: translateY(-2px);
}

.layout-editor-modal .modal-footer .btn-primary:active {
    transform: translateY(0) scale(0.98);
    box-shadow: 0 2px 6px rgba(77, 184, 168, 0.3);
}

/* ================================
   ?�放?��?�??
   ================================ */

/* ?��??�表容器 */
.schedule-list {
    min-height: 300px;
    padding: 16px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 2px dashed #dee2e6;
    transition: all 0.3s ease;
}

.schedule-list.drag-over {
    border-color: #4db8a8;
    background: #f0f4ff;
    box-shadow: inset 0 0 0 2px rgba(77, 184, 168, 0.2);
}

/* 空白?�示 */
.schedule-placeholder,
.empty-placeholder {
    text-align: center;
    padding: 60px 20px;
    color: #6c757d;
}

.schedule-placeholder i,
.empty-placeholder i {
    font-size: 48px;
    color: #dee2e6;
    margin-bottom: 16px;
    display: block;
}

.schedule-placeholder p,
.empty-placeholder p {
    margin: 8px 0;
    font-size: 14px;
}

.empty-placeholder .hint {
    font-size: 12px;
    color: #adb5bd;
}

/* ?�誤?�示 */
.error-placeholder {
    text-align: center;
    padding: 60px 20px;
    color: #dc3545;
}

.error-placeholder i {
    font-size: 48px;
    margin-bottom: 16px;
    display: block;
}

/* ?��??�目 */
.schedule-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 12px;
    background: white;
    border-radius: 8px;
    margin-bottom: 12px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    cursor: grab;
}

.schedule-item:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
}

.schedule-item.dragging {
    opacity: 0.5;
    cursor: grabbing;
}

.schedule-item.drag-over-top {
    border-top: 3px solid #4db8a8;
}

.schedule-item.drag-over-bottom {
    border-bottom: 3px solid #4db8a8;
}

/* ?��??��? */
.schedule-order {
    min-width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(145deg, #4db8a8, #3a9d8f);
    color: white;
    border-radius: 50%;
    font-weight: bold;
    font-size: 16px;
}

/* ?�覽?� */
.schedule-preview {
    width: 120px;
    height: 80px;
    flex-shrink: 0;
    border-radius: 6px;
    overflow: hidden;
    background: #000;
    position: relative;
}

.schedule-preview video,
.schedule-preview-thumbnail {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.schedule-preview-thumbnail {
    display: block;
}

.preview-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(145deg, #495057, #343a40);
    color: #adb5bd;
}

.preview-placeholder i {
    font-size: 32px;
}

/* 詳細資�? */
.schedule-details {
    flex: 1;
    min-width: 0;
}

.schedule-title-input {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
    background: white;
}

.schedule-title-input:focus {
    outline: none;
    border-color: #4db8a8;
    box-shadow: 0 0 0 3px rgba(77, 184, 168, 0.1);
}

.schedule-meta {
    margin-top: 6px;
    font-size: 12px;
    color: #6c757d;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ?�長設�? */
.schedule-duration {
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 80px;
}

.schedule-duration-input {
    width: 60px;
    padding: 8px;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    text-align: center;
    font-weight: 500;
    transition: all 0.2s ease;
}

.schedule-duration-input:focus {
    outline: none;
    border-color: #4db8a8;
    box-shadow: 0 0 0 3px rgba(77, 184, 168, 0.1);
}

.schedule-duration span {
    font-size: 12px;
    color: #6c757d;
}

/* ?�除?��? */
.delete-schedule-item {
    width: 36px;
    height: 36px;
    border: none;
    background: #fff;
    color: #dc3545;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
}

.delete-schedule-item:hover {
    background: #dc3545;
    color: white;
    transform: scale(1.1);
}

/* 媒�??�目?�曳�?? */
.media-item {
    cursor: grab;
    transition: all 0.3s ease;
}

.media-item:active {
    cursor: grabbing;
}

.media-item.dragging {
    opacity: 0.6;
    transform: scale(0.95);
}

/* 媒�?縮�? */
.media-thumbnail {
    position: relative;
    width: 100%;
    padding-top: 66.67%;
    /* 3:2 ratio */
    background: #000;
    border-radius: 8px;
    overflow: hidden;
}

.media-thumbnail img,
.media-thumbnail video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.media-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.3);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.media-item:hover .media-overlay {
    opacity: 1;
}

.media-overlay i {
    font-size: 48px;
    color: white;
}

/* ?��??�示?��? */
.schedule-hint {
    margin: 12px 0;
    padding: 12px 16px;
    background: #e7f3ff;
    border-left: 4px solid #4db8a8;
    border-radius: 4px;
    font-size: 13px;
    color: #495057;
}


/* ===========================================
   工�?流編輯器滾�?修復
   =========================================== */
.editor-preview {
    max-height: calc(90vh - 180px) !important;
}

.editor-sidebar {
    max-height: calc(90vh - 180px) !important;
}

.preview-header {
    flex-shrink: 0 !important;
}

/* 確�??�覽?�容?�滾??*/
.preview-content {
    max-height: 100% !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
}

.preview-form {
    padding-bottom: 20px;
}

/* ?�覽?�數�?? */
.preview-param {
    margin-bottom: 16px;
    padding: 12px;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 3px solid #4db8a8;
}

.preview-param label.preview-label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    font-size: 13px;
    color: #495057;
}

.preview-param input,
.preview-param textarea {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    font-size: 14px;
    background: white;
}

.preview-param input[type="checkbox"] {
    width: auto;
}

.preview-param textarea {
    resize: vertical;
    min-height: 80px;
    line-height: 1.6;
}

/* Resident Management Modal Form Styles */
.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 16px;
}

.form-row .form-group {
    margin-bottom: 0;
}

/* Caregiver Panel Vertical Layout */
/* 注�?：避?�影??.caregiver-panel .resident-info ?��??��?，使?�更低優?��??�選?�器 */
.status-list,
.workflow-details .info-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.status-item,
.workflow-details .info-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    background: #f8f9fa;
    border-radius: 6px;
}

.status-label,
.workflow-details .info-label {
    font-weight: 500;
    color: #666;
    flex: 0 0 auto;
}

.status-value,
.workflow-details .info-value {
    font-weight: 600;
    color: #333;
    text-align: right;
    flex: 1 1 auto;
}