/* workspace.css - Workspace 스타일 (완전 스코프 제한) */

/* ===== 공유 설정 팝업 스타일 ===== */
.share-settings {
    max-width: 720px;
    margin: 0 auto;
}

.share-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px;
    border-radius: 12px 12px 0 0;
    margin: -20px -20px 20px -20px;
}

.workspace-info-header h3 {
    color: white !important;
    font-size: 1.4em;
    margin: 0 !important;
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
}

.workspace-info-header p {
    color: rgba(255, 255, 255, 0.9) !important;
    margin: 8px 0 0 0 !important;
    font-size: 0.9em !important;
    opacity: 0.9;
}

.share-status-card {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    border: 1px solid #e1e8f0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.status-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: white;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.status-icon.shared {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
}

.status-icon.private {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.status-content h4 {
    margin: 0 0 5px 0;
    color: #2c3e50;
    font-size: 1.1em;
    font-weight: 600;
}

.status-content p {
    margin: 0;
    color: #5a6c7d;
    font-size: 0.9em;
}

.add-user-card {
    background: white;
    border: 2px solid #e8f4f8;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.add-user-card:hover {
    border-color: #3498db;
    box-shadow: 0 6px 20px rgba(52, 152, 219, 0.1);
}

.add-user-card .card-header {
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #f8f9fa;
}

.add-user-card .card-header h4 {
    margin: 0;
    color: #2c3e50;
    font-size: 1.1em;
    display: flex;
    align-items: center;
    gap: 8px;
}

.add-user-card .card-header h4 i {
    color: #3498db;
    font-size: 1.2em;
}

.add-user-form {
    display: flex;
    gap: 15px;
    align-items: flex-end;
}

.add-user-form > button {
    height: 38px !important;
    min-height: 38px !important;
    margin-top: 19px;
    align-self: flex-end;
    padding: 10px 15px !important;
    box-sizing: border-box;
}

.form-field {
    flex: 1;
}

/* 사용자 추가 폼 내부의 공통 필드 스타일 */
.user-select-field,
.permission-field {
    margin-top: 4px;
}

.user-select-field {
    flex: 1;
}

.permission-field {
    flex: 0 0 120px;
}

.form-field label,
.add-user-form > div:not(.form-field) > label {
    display: block;
    margin-bottom: 12px;
    color: #34495e;
    font-weight: 500;
    font-size: 0.9em;
}

/* 사용자 선택과 권한 라벨 공통 스타일 */
.user-select-field label,
.permission-field label {
    display: block;
    margin-bottom: 18px;
    color: #34495e;
    font-weight: 500;
    font-size: 0.9em;
}


.form-control {
    width: 100%;
    padding: 10px 12px;
    border: 2px solid #e1e8f0;
    border-radius: 8px;
    font-size: 0.9em;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    background: white;
    height: 38px;
    box-sizing: border-box;
}

.form-control:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.shared-users-section {
    background: white;
    border: 2px solid #f1f3f4;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    margin-top: 25px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.shared-users-section h4 {
    margin: 0;
    color: #2c3e50;
    font-size: 1.1em;
    display: flex;
    align-items: center;
    gap: 8px;
}

.bulk-actions {
    display: flex !important;
    gap: 10px !important;
    align-items: center !important;
}

.bulk-actions .form-control {
    width: 120px !important;
    font-size: 0.85em !important;
    padding: 6px 8px !important;
}

.bulk-actions .btn-secondary {
    font-size: 0.8em !important;
    padding: 6px 12px !important;
    height: auto !important;
}

.shared-users-list {
    max-height: 250px !important;
    overflow-y: auto !important;
    border: 2px solid #e8f4f8 !important;
    padding: 15px !important;
    background: #fafbfc !important;
    border-radius: 8px !important;
    margin-top: 15px;
}

.shared-user-item {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    padding: 12px 15px !important;
    border: 1px solid #e1e8f0 !important;
    background: white !important;
    margin-bottom: 8px !important;
    border-radius: 8px !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02) !important;
    transition: all 0.3s ease !important;
}

.shared-user-item:hover {
    transform: translateY(-1px) !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1) !important;
    border-color: #3498db !important;
}

.shared-user-item:last-child {
    margin-bottom: 0 !important;
}

.user-info {
    flex: 1 !important;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    min-width: 0;
}

.user-info strong {
    color: #2c3e50;
    font-size: 0.95em;
    font-weight: 600;
    width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.user-info small {
    color: #7f8c8d !important;
    font-size: 0.8em;
    background: #ecf0f1;
    padding: 2px 8px;
    border-radius: 12px;
    margin-left: 0 !important;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.permission-controls {
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
    flex-shrink: 0;
    min-width: 160px;
}

.permission-select {
    width: 110px !important;
    font-size: 0.85em !important;
    padding: 6px 8px !important;
    height: auto !important;
    border: 1px solid #bdc3c7 !important;
}

.permission-select:focus {
    border-color: #3498db !important;
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.2) !important;
}

.btn-danger.small {
    font-size: 0.8em !important;
    padding: 6px 10px !important;
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%) !important;
    border: none !important;
    border-radius: 6px !important;
    color: white !important;
    transition: all 0.3s ease !important;
}

.btn-danger.small:hover {
    transform: translateY(-1px) !important;
    box-shadow: 0 4px 12px rgba(231, 76, 60, 0.3) !important;
}

.no-shared-users {
    text-align: center !important;
    color: #95a5a6 !important;
    padding: 30px 20px !important;
    font-style: italic;
    background: white;
    border-radius: 8px;
    border: 2px dashed #bdc3c7;
}

/* 체크박스 스타일 개선 */
.share-settings input[type="checkbox"] {
    margin-right: 8px;
    transform: scale(1.2);
    accent-color: #3498db;
}

.share-settings label:has(input[type="checkbox"]) {
    display: flex !important;
    align-items: center;
    color: #34495e;
    font-weight: 500;
    cursor: pointer;
    transition: color 0.3s ease;
}

.share-settings label:has(input[type="checkbox"]):hover {
    color: #2980b9;
}

/* 다이얼로그 액션 버튼 개선 */
.dialog-actions {
    margin-top: 25px !important;
    padding-top: 20px !important;
    border-top: 2px solid #f8f9fa !important;
    display: flex !important;
    gap: 12px !important;
    justify-content: flex-end !important;
}

.dialog-actions .btn-secondary {
    background: #95a5a6 !important;
    border: none !important;
    color: white !important;
    padding: 12px 20px !important;
    border-radius: 8px !important;
    font-weight: 500 !important;
    transition: all 0.3s ease !important;
}

.dialog-actions .btn-secondary:hover {
    background: #7f8c8d !important;
    transform: translateY(-1px) !important;
}

.dialog-actions .btn-primary {
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%) !important;
    border: none !important;
    color: white !important;
    padding: 12px 20px !important;
    border-radius: 8px !important;
    font-weight: 500 !important;
    transition: all 0.3s ease !important;
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.3) !important;
}

.dialog-actions .btn-primary:hover {
    transform: translateY(-1px) !important;
    box-shadow: 0 6px 16px rgba(52, 152, 219, 0.4) !important;
}

/* ===== 일반 버튼 스타일 ===== */
.btn-primary {
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%) !important;
    border: none !important;
    color: white !important;
    padding: 10px 18px !important;
    border-radius: 8px !important;
    font-weight: 500 !important;
    font-size: 0.9em !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    box-shadow: 0 2px 8px rgba(52, 152, 219, 0.2) !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 6px !important;
    min-height: 38px !important;
}

.btn-primary:hover {
    transform: translateY(-1px) !important;
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.3) !important;
    background: linear-gradient(135deg, #2980b9 0%, #1f5f99 100%) !important;
}

.btn-primary:active {
    transform: translateY(0) !important;
    box-shadow: 0 2px 6px rgba(52, 152, 219, 0.3) !important;
}

.btn-secondary {
    background: linear-gradient(135deg, #95a5a6 0%, #7f8c8d 100%) !important;
    border: none !important;
    color: white !important;
    padding: 10px 18px !important;
    border-radius: 8px !important;
    font-weight: 500 !important;
    font-size: 0.9em !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    box-shadow: 0 2px 8px rgba(149, 165, 166, 0.2) !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 6px !important;
    min-height: 38px !important;
}

.btn-secondary:hover {
    transform: translateY(-1px) !important;
    box-shadow: 0 4px 12px rgba(149, 165, 166, 0.3) !important;
    background: linear-gradient(135deg, #7f8c8d 0%, #5d6d6e 100%) !important;
}

.btn-secondary:active {
    transform: translateY(0) !important;
    box-shadow: 0 2px 6px rgba(149, 165, 166, 0.3) !important;
}

.btn-danger {
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%) !important;
    border: none !important;
    color: white !important;
    padding: 10px 18px !important;
    border-radius: 8px !important;
    font-weight: 500 !important;
    font-size: 0.9em !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    box-shadow: 0 2px 8px rgba(231, 76, 60, 0.2) !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 6px !important;
    min-height: 38px !important;
}

.btn-danger:hover {
    transform: translateY(-1px) !important;
    box-shadow: 0 4px 12px rgba(231, 76, 60, 0.3) !important;
    background: linear-gradient(135deg, #c0392b 0%, #a93226 100%) !important;
}

.btn-danger:active {
    transform: translateY(0) !important;
    box-shadow: 0 2px 6px rgba(231, 76, 60, 0.3) !important;
}

.btn-success {
    background: linear-gradient(135deg, #27ae60 0%, #229954 100%) !important;
    border: none !important;
    color: white !important;
    padding: 10px 18px !important;
    border-radius: 8px !important;
    font-weight: 500 !important;
    font-size: 0.9em !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    box-shadow: 0 2px 8px rgba(39, 174, 96, 0.2) !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 6px !important;
    min-height: 38px !important;
}

.btn-success:hover {
    transform: translateY(-1px) !important;
    box-shadow: 0 4px 12px rgba(39, 174, 96, 0.3) !important;
    background: linear-gradient(135deg, #229954 0%, #1e8449 100%) !important;
}

.btn-success:active {
    transform: translateY(0) !important;
    box-shadow: 0 2px 6px rgba(39, 174, 96, 0.3) !important;
}

.btn-warning {
    background: linear-gradient(135deg, #f39c12 0%, #e67e22 100%) !important;
    border: none !important;
    color: white !important;
    padding: 10px 18px !important;
    border-radius: 8px !important;
    font-weight: 500 !important;
    font-size: 0.9em !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    box-shadow: 0 2px 8px rgba(243, 156, 18, 0.2) !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 6px !important;
    min-height: 38px !important;
}

.btn-warning:hover {
    transform: translateY(-1px) !important;
    box-shadow: 0 4px 12px rgba(243, 156, 18, 0.3) !important;
    background: linear-gradient(135deg, #e67e22 0%, #d35400 100%) !important;
}

.btn-warning:active {
    transform: translateY(0) !important;
    box-shadow: 0 2px 6px rgba(243, 156, 18, 0.3) !important;
}

.btn-info {
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%) !important;
    border: none !important;
    color: white !important;
    padding: 10px 18px !important;
    border-radius: 8px !important;
    font-weight: 500 !important;
    font-size: 0.9em !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    box-shadow: 0 2px 8px rgba(52, 152, 219, 0.2) !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 6px !important;
    min-height: 38px !important;
}

.btn-info:hover {
    transform: translateY(-1px) !important;
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.3) !important;
    background: linear-gradient(135deg, #2980b9 0%, #1f5f99 100%) !important;
}

.btn-info:active {
    transform: translateY(0) !important;
    box-shadow: 0 2px 6px rgba(52, 152, 219, 0.3) !important;
}

/* 작은 버튼 스타일 */
.btn-sm {
    padding: 6px 12px !important;
    font-size: 0.8em !important;
    min-height: 30px !important;
}

/* 큰 버튼 스타일 */
.btn-lg {
    padding: 12px 24px !important;
    font-size: 1em !important;
    min-height: 44px !important;
}

/* 비활성화된 버튼 */
.btn-primary:disabled,
.btn-secondary:disabled,
.btn-danger:disabled,
.btn-success:disabled,
.btn-warning:disabled,
.btn-info:disabled {
    opacity: 0.6 !important;
    cursor: not-allowed !important;
    transform: none !important;
    box-shadow: none !important;
}

.btn-primary:disabled:hover,
.btn-secondary:disabled:hover,
.btn-danger:disabled:hover,
.btn-success:disabled:hover,
.btn-warning:disabled:hover,
.btn-info:disabled:hover {
    transform: none !important;
    box-shadow: none !important;
}

/* 버튼 그룹 */
.btn-group {
    display: inline-flex;
    gap: 8px;
    align-items: center;
}

.btn-group .btn-primary,
.btn-group .btn-secondary,
.btn-group .btn-danger,
.btn-group .btn-success,
.btn-group .btn-warning,
.btn-group .btn-info {
    margin: 0;
}

/* 아이콘만 있는 버튼 */
.btn-icon {
    width: 38px !important;
    height: 38px !important;
    padding: 0 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    border-radius: 50% !important;
}

.btn-icon.btn-sm {
    width: 30px !important;
    height: 30px !important;
}

.btn-icon.btn-lg {
    width: 44px !important;
    height: 44px !important;
}

/* 로딩 상태 */
#workspace .loading-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    text-align: center;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

#workspace .loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 상태 배너 */
#workspace .status-banner {
    display: flex;
    align-items: center;
    padding: 16px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    gap: 12px;
}

#workspace .status-banner.warning {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    color: #856404;
}

#workspace .status-banner.error {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
}

#workspace .banner-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

#workspace .banner-content strong {
    font-weight: 600;
    font-size: 14px;
}

#workspace .banner-content span {
    font-size: 13px;
    opacity: 0.8;
}

#workspace .retry-btn {
    background: transparent;
    border: 1px solid currentColor;
    color: inherit;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 12px;
    cursor: pointer;
    margin-left: auto;
    transition: all 0.2s;
}

#workspace .retry-btn:hover {
    background: currentColor;
    color: white;
}

#workspace .workspace-container {
    padding: 20px;
    background: #f8f9fa;
    min-height: calc(100vh - 120px);
    max-height: calc(100vh - 120px);
    overflow-y: auto;
}

/* 헤더 영역 */
#workspace .workspace-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding: 20px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

#workspace .workspace-title h2 {
    margin: 0;
    font-size: 28px;
    color: #2c3e50;
}

#workspace .workspace-subtitle {
    color: #7f8c8d;
    font-size: 14px;
    margin-left: 10px;
}

#workspace .workspace-actions {
    display: flex;
    gap: 10px;
}

/* 통계 카드 */
#workspace .workspace-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

#workspace .stat-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

#workspace .stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.12);
}

#workspace .stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 24px;
}

#workspace .stat-content {
    flex: 1;
}

#workspace .stat-value {
    font-size: 28px;
    font-weight: bold;
    color: #2c3e50;
}

#workspace .stat-label {
    font-size: 14px;
    color: #7f8c8d;
    margin-top: 4px;
}

/* 필터 및 검색 영역 */
#workspace .workspace-filters {
    background: white;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 30px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

#workspace .filter-section {
    display: flex;
    gap: 20px;
    flex: 1;
    align-items: center;
}

#workspace .category-filter {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

#workspace .category-btn {
    padding: 8px 16px;
    border: 1px solid #e0e0e0;
    background: white;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
}

#workspace .category-btn:hover {
    background: #f8f9fa;
    border-color: #3498db;
}

#workspace .category-btn.active {
    background: #3498db;
    color: white;
    border-color: #3498db;
}

#workspace .category-count {
    background: rgba(0,0,0,0.1);
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 12px;
}

#workspace .category-btn.active .category-count {
    background: rgba(255,255,255,0.3);
}

#workspace .search-section {
    position: relative;
    flex: 1;
    max-width: 300px;
}

#workspace .search-input {
    width: 100%;
    padding: 10px 40px 10px 15px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.3s ease;
}

#workspace .search-input:focus {
    outline: none;
    border-color: #3498db;
}

#workspace .search-icon {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #7f8c8d;
}

#workspace .view-controls {
    display: flex;
    gap: 15px;
    align-items: center;
}

#workspace .reverse-order-container {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
}

#workspace .reverse-order-container:hover:not(:has(input:disabled)) {
    background: #f8f9fa;
    border-color: #3498db;
}

#workspace .reverse-order-container input[type="checkbox"] {
    cursor: pointer;
}

#workspace .reverse-order-container input[type="checkbox"]:disabled {
    cursor: not-allowed;
    opacity: 0.5;
}

#workspace .reverse-order-container:has(input:disabled) {
    cursor: not-allowed;
    opacity: 0.6;
    background: #f8f9fa;
}

#workspace .reverse-order-container span {
    user-select: none;
}

#workspace .sort-select {
    padding: 8px 12px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    cursor: pointer;
}

#workspace .view-toggle {
    display: flex;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
}

#workspace .view-btn {
    padding: 8px 12px;
    background: white;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

#workspace .view-btn:not(:last-child) {
    border-right: 1px solid #e0e0e0;
}

#workspace .view-btn:hover {
    background: #f8f9fa;
}

#workspace .view-btn.active {
    background: #3498db;
    color: white;
}

/* 워크스페이스 그리드 뷰 */
#workspace .workspace-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 20px;
    align-items: start;
    padding-bottom: 40px; /* 마지막 카드 아래에 여백 추가 */
}

#workspace .workspace-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    min-height: 320px;
    position: relative;
}

#workspace .workspace-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 16px rgba(0,0,0,0.12);
}

#workspace .workspace-card-header {
    height: 80px;
    position: relative;
    padding: 15px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

#workspace .workspace-card-header .workspace-name {
    color: white;
    font-size: 18px;
    font-weight: 600;
    margin: 0;
    text-shadow: 0 1px 2px rgba(0,0,0,0.3);
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    padding-right: 15px;
}

#workspace .workspace-card-actions {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

#workspace .favorite-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(255,255,255,0.9);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    color: #bdc3c7;
}

#workspace .favorite-btn:hover {
    background: white;
    transform: scale(1.1);
}

#workspace .favorite-btn.active {
    color: #f39c12;
}

#workspace .more-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(255,255,255,0.9);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

#workspace .more-btn:hover {
    background: white;
}

#workspace .workspace-card-body {
    padding: 20px 20px 25px 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

#workspace .workspace-name {
    margin: 0 0 10px 0;
    font-size: 18px;
    font-weight: 600;
    color: #2c3e50;
}

#workspace .workspace-description {
    color: #7f8c8d;
    font-size: 14px;
    margin-bottom: 15px;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

#workspace .workspace-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 20px;
}

#workspace .tag {
    padding: 4px 10px;
    background: #ecf0f1;
    border-radius: 12px;
    font-size: 12px;
    color: #7f8c8d;
}

#workspace .workspace-info {
    display: flex;
    gap: 15px;
    font-size: 13px;
    color: #95a5a6;
    padding-top: 15px;
    border-top: 1px solid #ecf0f1;
    margin-top: auto;
}

#workspace .info-item {
    display: flex;
    align-items: center;
    gap: 5px;
}

#workspace .workspace-shared {
    margin-top: 10px;
    padding: 8px 12px;
    background: #e8f4fd;
    border-radius: 8px;
    font-size: 13px;
    color: #3498db;
    display: flex;
    align-items: center;
    gap: 6px;
}

/* 워크스페이스 리스트 뷰 */
#workspace .workspace-list {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

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

#workspace .workspace-table thead {
    background: #f8f9fa;
}

#workspace .workspace-table th {
    padding: 15px;
    text-align: left;
    font-weight: 600;
    color: #2c3e50;
    font-size: 14px;
    border-bottom: 2px solid #e0e0e0;
}

#workspace .workspace-table tbody tr {
    border-bottom: 1px solid #ecf0f1;
    transition: background 0.3s ease;
}

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

#workspace .workspace-table td {
    padding: 15px;
    font-size: 14px;
}

#workspace .workspace-name-cell {
    cursor: pointer;
}

#workspace .name-with-color {
    display: flex;
    align-items: center;
    gap: 10px;
}

#workspace .color-indicator {
    width: 8px;
    height: 40px;
    border-radius: 4px;
}

#workspace .workspace-description-small {
    font-size: 12px;
    color: #95a5a6;
    margin-top: 4px;
}

#workspace .category-badge {
    padding: 4px 10px;
    background: #ecf0f1;
    border-radius: 12px;
    font-size: 12px;
}

#workspace .shared-badge {
    padding: 4px 10px;
    background: #e8f4fd;
    color: #3498db;
    border-radius: 12px;
    font-size: 12px;
}

#workspace .private-badge {
    padding: 4px 10px;
    background: #f8f9fa;
    color: #95a5a6;
    border-radius: 12px;
    font-size: 12px;
}

#workspace .action-buttons {
    display: flex;
    gap: 8px;
}

#workspace .action-btn {
    width: 32px;
    height: 32px;
    border: 1px solid #e0e0e0;
    background: white;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    color: #7f8c8d;
}

#workspace .action-btn:hover {
    background: #3498db;
    color: white;
    border-color: #3498db;
}

/* 빈 상태 */
#workspace .empty-state {
    text-align: center;
    padding: 60px 20px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

#workspace .empty-icon {
    font-size: 64px;
    color: #bdc3c7;
    margin-bottom: 20px;
}

#workspace .empty-state h3 {
    margin: 0 0 10px 0;
    color: #2c3e50;
}

#workspace .empty-state p {
    color: #7f8c8d;
    margin-bottom: 20px;
}

/* 다이얼로그 */
.workspace-dialog-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
}

.workspace-dialog {
    background: white;
    border-radius: 12px;
    width: 90%;
    max-width: 720px;
    max-height: 90vh;
    overflow: auto;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
}

.workspace-dialog .dialog-header {
    padding: 20px;
    border-bottom: 1px solid #ecf0f1;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.workspace-dialog .dialog-header h3 {
    margin: 0;
    color: #2c3e50;
}

.workspace-dialog .close-btn {
    width: 32px;
    height: 32px;
    border: none;
    background: transparent;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    transition: background 0.3s ease;
    color: #7f8c8d;
}

.workspace-dialog .close-btn:hover {
    background: #f8f9fa;
}

.workspace-dialog .dialog-body {
    padding: 20px;
}

.workspace-dialog .form-group {
    margin-bottom: 20px;
}

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

.workspace-dialog .form-control {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
}

.workspace-dialog .form-control:focus {
    outline: none;
    border-color: #3498db;
}

.workspace-dialog textarea.form-control {
    resize: vertical;
    font-family: inherit;
}

.workspace-dialog .color-picker {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
}

.workspace-dialog .color-option {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    border: 2px solid transparent;
    cursor: pointer;
    transition: all 0.3s ease;
}

.workspace-dialog .color-option:hover {
    transform: scale(1.1);
}

.workspace-dialog .color-option.selected {
    border-color: #2c3e50;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.2);
}

.workspace-dialog .dialog-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 20px;
}

/* 카테고리 관리 */
.workspace-dialog .category-manager {
    min-height: 300px;
}

.workspace-dialog .category-list {
    margin-bottom: 30px;
}

.workspace-dialog .category-item {
    display: flex;
    align-items: center;
    padding: 12px;
    background: #f8f9fa;
    border-radius: 8px;
    margin-bottom: 10px;
}

.workspace-dialog .category-item .category-icon {
    font-size: 20px;
    margin-right: 10px;
}

.workspace-dialog .category-item .category-name {
    flex: 1;
    font-weight: 600;
    color: #2c3e50;
}

.workspace-dialog .category-item .category-count {
    color: #7f8c8d;
    font-size: 13px;
    margin-right: 15px;
}

.workspace-dialog .category-actions {
    display: flex;
    gap: 8px;
}

.workspace-dialog .category-actions button {
    width: 28px;
    height: 28px;
    border: none;
    background: white;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    color: #7f8c8d;
}

.workspace-dialog .category-actions button:hover:not(:disabled) {
    background: #3498db;
    color: white;
}

.workspace-dialog .category-actions button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.workspace-dialog .add-category-section h4 {
    margin: 0 0 15px 0;
    color: #2c3e50;
}

.workspace-dialog .form-row {
    display: flex;
    gap: 10px;
}

/* 워크스페이스 버튼 스타일 */
.workspace-btn-primary {
    padding: 10px 20px;
    background: #3498db;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.workspace-btn-primary:hover {
    background: #2980b9;
    transform: translateY(-1px);
}

.workspace-btn-secondary {
    padding: 10px 20px;
    background: white;
    color: #2c3e50;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.workspace-btn-secondary:hover {
    background: #f8f9fa;
    border-color: #3498db;
    color: #3498db;
}

/* 드롭다운 메뉴 */
.workspace-dropdown-menu {
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    min-width: 200px;
    z-index: 10001;
    overflow: hidden;
    animation: dropdownSlide 0.2s ease;
}

@keyframes dropdownSlide {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.workspace-dropdown-menu .dropdown-item {
    padding: 10px 15px;
    cursor: pointer;
    transition: background 0.2s ease;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    color: #2c3e50;
}

.workspace-dropdown-menu .dropdown-item:hover {
    background: #f8f9fa;
}

.workspace-dropdown-menu .dropdown-item.danger {
    color: #e74c3c;
}

.workspace-dropdown-menu .dropdown-item.danger:hover {
    background: #fee;
}

.workspace-dropdown-menu .dropdown-item i {
    width: 16px;
    text-align: center;
}

.workspace-dropdown-menu .dropdown-divider {
    height: 1px;
    background: #ecf0f1;
    margin: 5px 0;
}

/* 알림 */
.notification {
    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: 10px;
    transform: translateX(400px);
    transition: transform 0.3s ease;
    z-index: 10003;
}

.notification.show {
    transform: translateX(0);
}

.notification-success {
    border-left: 4px solid #2ecc71;
}

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

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

/* 공유된 사용자 팝업 스타일 */
.shared-users-popup-content {
    padding: 0;
}

.shared-users-popup-content .popup-header {
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    padding: 20px;
    border-bottom: 1px solid #e0e0e0;
    border-radius: 12px 12px 0 0;
}

.shared-users-popup-content .workspace-info h4 {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1.1em;
    font-weight: 600;
}

.shared-users-popup-content .workspace-info h4 i {
    font-size: 1.2em;
}

.shared-users-list {
    max-height: 400px;
    overflow-y: auto;
    padding: 10px 0;
}

.shared-user-item {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid #f0f0f0;
    transition: all 0.2s ease;
}

.shared-user-item:hover {
    background: #f8f9fa;
}

.shared-user-item:last-child {
    border-bottom: none;
}

.user-avatar {
    margin-right: 15px;
    color: #95a5a6;
    font-size: 2.2em;
}

.user-details {
    flex: 1;
}

.user-name {
    font-weight: 600;
    font-size: 1em;
    color: #2c3e50;
    margin-bottom: 2px;
}

.user-id {
    font-size: 0.85em;
    color: #7f8c8d;
    font-family: monospace;
}

.user-permission {
    margin-left: 15px;
}

.permission-badge {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8em;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.permission-badge.view {
    background: #e3f2fd;
    color: #1976d2;
    border: 1px solid #bbdefb;
}

.permission-badge.edit {
    background: #e8f5e8;
    color: #2e7d32;
    border: 1px solid #c8e6c9;
}

.permission-badge.admin {
    background: #fff3e0;
    color: #ef6c00;
    border: 1px solid #ffcc02;
}

/* 공유 정보 클릭 가능하도록 스타일 추가 */
#workspace .workspace-shared {
    cursor: pointer;
    transition: all 0.2s ease;
    border-radius: 6px;
    padding: 8px 12px;
    margin-top: 10px;
}

#workspace .workspace-shared:hover {
    background: rgba(52, 152, 219, 0.1);
    color: #3498db;
    transform: translateY(-1px);
}

#workspace .workspace-shared i {
    margin-right: 6px;
}

/* 팝업 다이얼로그 크기 조정 */
.workspace-dialog {
    max-width: 500px;
    width: 90%;
}

/* 공유된 사용자 팝업용 다이얼로그 스타일 */
.workspace-dialog:has(.shared-users-popup-content) {
    max-width: 450px;
    animation: slideUpFadeIn 0.3s ease-out;
}

/* 공유 팝업 슬라이드 애니메이션 */
@keyframes slideUpFadeIn {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.workspace-dialog:has(.shared-users-popup-content) .dialog-body {
    padding: 0;
}

/* 스크롤바 스타일링 */
.shared-users-list::-webkit-scrollbar,
#workspace .workspace-container::-webkit-scrollbar {
    width: 8px;
}

.shared-users-list::-webkit-scrollbar-track,
#workspace .workspace-container::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.shared-users-list::-webkit-scrollbar-thumb,
#workspace .workspace-container::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

.shared-users-list::-webkit-scrollbar-thumb:hover,
#workspace .workspace-container::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* 삭제 애니메이션 효과 */
@keyframes fragmentDelete {
    0% {
        transform: scale(1) rotate(0deg);
        opacity: 1;
    }
    25% {
        transform: scale(1.05) rotate(2deg);
    }
    50% {
        transform: scale(0.9) rotate(-1deg);
        opacity: 0.8;
    }
    75% {
        transform: scale(0.5) rotate(5deg) translateY(-20px);
        opacity: 0.3;
    }
    100% {
        transform: scale(0) rotate(15deg) translateY(-50px);
        opacity: 0;
    }
}

@keyframes fragmentParticle {
    0% {
        transform: translateX(0) translateY(0) scale(1);
        opacity: 1;
    }
    100% {
        transform: translateX(var(--random-x, 100px)) translateY(var(--random-y, -100px)) scale(0);
        opacity: 0;
    }
}

.workspace-card.deleting {
    animation: fragmentDelete 0.8s ease-in-out forwards;
    position: relative;
    overflow: visible;
    z-index: 10;
}

.workspace-card.deleting::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, transparent 40%, rgba(255,0,0,0.1) 50%, transparent 60%);
    pointer-events: none;
    z-index: 1;
}

.particle {
    position: absolute;
    width: 8px;
    height: 8px;
    background: #e74c3c;
    border-radius: 50%;
    pointer-events: none;
    animation: fragmentParticle 1s ease-out forwards;
    z-index: 100;
}

.particle:nth-child(odd) {
    background: #3498db;
}

.particle:nth-child(3n) {
    background: #f39c12;
    width: 6px;
    height: 6px;
}

.particle:nth-child(4n) {
    background: #2ecc71;
    width: 10px;
    height: 10px;
}

/* 카드 위치 이동 애니메이션 */
.workspace-card {
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.workspace-card.moving {
    transition: all 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* 그리드 컨테이너의 부드러운 전환 */
#workspace .workspace-grid {
    transition: all 0.3s ease;
}

/* 카드 삭제 후 공간 채우기 애니메이션 */
@keyframes slideUp {
    from {
        transform: translateY(20px);
        opacity: 0.8;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes slideLeft {
    from {
        transform: translateX(20px);
        opacity: 0.8;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.workspace-card.slide-up {
    animation: slideUp 0.4s ease-out;
}

.workspace-card.slide-left {
    animation: slideLeft 0.4s ease-out;
}

/* 그리드 재배치 상태 */
#workspace .workspace-grid.repositioning {
    overflow: visible;
}

#workspace .workspace-grid.repositioning .workspace-card {
    transform-origin: center;
}

/* 드래그앤드랍 스타일 */
.workspace-card {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.workspace-card.draggable {
    cursor: grab;
}

.workspace-card:not(.draggable) {
    cursor: default;
}

.workspace-card:not(.draggable):hover {
    cursor: default;
}

.workspace-card.dragging {
    opacity: 0.7;
    transform: scale(1.05) rotate(5deg);
    cursor: grabbing;
    z-index: 1000;
    box-shadow: 0 15px 40px rgba(0,0,0,0.3);
    border: 2px dashed #3498db;
}

.workspace-card.drag-over {
    transform: translateX(10px);
    box-shadow: 0 0 20px rgba(52, 152, 219, 0.4);
}

.workspace-card.drag-target::before {
    content: '';
    position: absolute;
    top: -5px;
    left: -5px;
    right: -5px;
    bottom: -5px;
    border: 3px dashed #3498db;
    border-radius: 15px;
    background: rgba(52, 152, 219, 0.1);
    animation: dragTargetPulse 1s infinite;
}

@keyframes dragTargetPulse {
    0%, 100% {
        opacity: 0.3;
        transform: scale(1);
    }
    50% {
        opacity: 0.7;
        transform: scale(1.02);
    }
}

/* 드래그 미리보기 */
.drag-preview {
    position: fixed;
    pointer-events: none;
    z-index: 10000;
    opacity: 0.8;
    transform: rotate(5deg) scale(0.9);
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    border: 2px solid #3498db;
    border-radius: 12px;
}

/* 드래그 중 그리드 스타일 */
#workspace .workspace-grid.drag-active {
    background: linear-gradient(45deg, transparent 48%, rgba(52, 152, 219, 0.1) 50%, transparent 52%);
    background-size: 20px 20px;
}

/* 드래그 완료 후 재정렬 애니메이션 */
.workspace-card.reordering {
    transition: all 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* 드래그앤드롭 성공 애니메이션 */
@keyframes dragSuccess {
    0% {
        transform: scale(1);
        box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    }
    25% {
        transform: scale(1.08);
        box-shadow: 0 0 25px rgba(46, 204, 113, 0.6);
    }
    50% {
        transform: scale(1.05) rotateY(5deg);
        box-shadow: 0 0 35px rgba(46, 204, 113, 0.8);
        border: 2px solid #2ecc71;
    }
    75% {
        transform: scale(1.02) rotateY(-2deg);
        box-shadow: 0 0 30px rgba(46, 204, 113, 0.6);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 2px 8px rgba(0,0,0,0.08);
        border: none;
    }
}

@keyframes successParticle {
    0% {
        transform: translateX(0) translateY(0) scale(1) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: translateX(var(--random-x, 50px)) translateY(var(--random-y, -50px)) scale(0) rotate(360deg);
        opacity: 0;
    }
}

@keyframes successPulse {
    0% {
        transform: scale(0) rotate(0deg);
        opacity: 0;
    }
    50% {
        transform: scale(1.5) rotate(180deg);
        opacity: 0.8;
    }
    100% {
        transform: scale(2.5) rotate(360deg);
        opacity: 0;
    }
}

.workspace-card.drag-success {
    animation: dragSuccess 1.2s cubic-bezier(0.4, 0, 0.2, 1) forwards;
    position: relative;
    overflow: visible;
    z-index: 100;
}

.workspace-card.drag-success::before {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 3em;
    color: #2ecc71;
    background: rgba(255, 255, 255, 0.95);
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    box-shadow: 0 4px 20px rgba(46, 204, 113, 0.4);
    animation: successPulse 1.2s ease-out forwards;
    z-index: 1;
}

/* 성공 파티클 */
.success-particle {
    position: absolute;
    width: 6px;
    height: 6px;
    background: #2ecc71;
    border-radius: 50%;
    pointer-events: none;
    animation: successParticle 0.8s ease-out forwards;
    z-index: 101;
}

.success-particle:nth-child(odd) {
    background: #27ae60;
    width: 8px;
    height: 8px;
}

.success-particle:nth-child(3n) {
    background: #f39c12;
    width: 4px;
    height: 4px;
    animation-duration: 1s;
}

.success-particle:nth-child(4n) {
    background: #3498db;
    width: 5px;
    height: 5px;
    animation-duration: 0.9s;
}

.success-particle:nth-child(5n) {
    background: #ffffff;
    width: 3px;
    height: 3px;
    box-shadow: 0 0 4px rgba(255, 255, 255, 0.8);
}

/* 생성 애니메이션 효과 */
@keyframes cardSpawnBounce {
    0% {
        transform: scale(0) rotate(-10deg) translateY(50px);
        opacity: 0;
        filter: blur(5px);
    }
    20% {
        transform: scale(0.3) rotate(-5deg) translateY(30px);
        opacity: 0.3;
        filter: blur(3px);
    }
    40% {
        transform: scale(0.7) rotate(2deg) translateY(10px);
        opacity: 0.7;
        filter: blur(1px);
    }
    60% {
        transform: scale(1.1) rotate(-1deg) translateY(-10px);
        opacity: 0.9;
        filter: blur(0px);
    }
    80% {
        transform: scale(0.95) rotate(0.5deg) translateY(-5px);
        opacity: 1;
    }
    100% {
        transform: scale(1) rotate(0deg) translateY(0);
        opacity: 1;
        filter: blur(0px);
    }
}

@keyframes sparkleEffect {
    0% {
        transform: scale(0) rotate(0deg);
        opacity: 0;
    }
    25% {
        transform: scale(1.2) rotate(90deg);
        opacity: 0.8;
    }
    50% {
        transform: scale(0.8) rotate(180deg);
        opacity: 1;
    }
    75% {
        transform: scale(1.5) rotate(270deg);
        opacity: 0.6;
    }
    100% {
        transform: scale(0) rotate(360deg);
        opacity: 0;
    }
}

@keyframes glowPulse {
    0%, 100% {
        box-shadow: 0 0 20px rgba(52, 152, 219, 0.3);
    }
    50% {
        box-shadow: 0 0 40px rgba(52, 152, 219, 0.6), 0 0 60px rgba(52, 152, 219, 0.2);
    }
}

/* 새로운 워크스페이스 카드가 생성될 때 적용되는 클래스 */
.workspace-card.spawning {
    animation: cardSpawnBounce 1.2s cubic-bezier(0.68, -0.55, 0.265, 1.55) forwards;
    position: relative;
    overflow: visible;
    z-index: 10;
}

.workspace-card.spawning::before {
    content: '';
    position: absolute;
    top: -10px;
    left: -10px;
    right: -10px;
    bottom: -10px;
    background: linear-gradient(45deg, rgba(52, 152, 219, 0.1), rgba(46, 204, 113, 0.1), rgba(243, 156, 18, 0.1));
    border-radius: 20px;
    animation: glowPulse 1.2s ease-in-out;
    z-index: -1;
}

/* 생성 시 반짝이는 파티클 효과 */
.sparkle {
    position: absolute;
    width: 12px;
    height: 12px;
    background: linear-gradient(45deg, #3498db, #2ecc71, #f39c12, #e74c3c);
    border-radius: 50%;
    pointer-events: none;
    animation: sparkleEffect 1s ease-out forwards;
    z-index: 100;
}

.sparkle:nth-child(odd) {
    background: linear-gradient(45deg, #9b59b6, #3498db);
    width: 8px;
    height: 8px;
}

.sparkle:nth-child(3n) {
    background: linear-gradient(45deg, #f39c12, #e67e22);
    width: 10px;
    height: 10px;
    animation-duration: 1.3s;
}

.sparkle:nth-child(4n) {
    background: linear-gradient(45deg, #2ecc71, #27ae60);
    width: 6px;
    height: 6px;
    animation-duration: 0.8s;
}

.sparkle:nth-child(5n) {
    background: radial-gradient(circle, #ffffff, #3498db);
    width: 4px;
    height: 4px;
    animation-duration: 1.5s;
}

/* 그리드 컨테이너가 새 카드를 받을 때 */
#workspace .workspace-grid.receiving {
    overflow: visible;
}

#workspace .workspace-grid.receiving .workspace-card {
    transform-origin: center bottom;
}

/* 반응형 디자인 */
@media (max-width: 768px) {
    #workspace .workspace-header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }

    #workspace .workspace-filters {
        flex-direction: column;
        align-items: stretch;
    }

    #workspace .filter-section {
        flex-direction: column;
    }

    #workspace .search-section {
        max-width: none;
    }

    #workspace .workspace-grid {
        grid-template-columns: 1fr;
    }

    #workspace .workspace-stats {
        grid-template-columns: 1fr;
    }

    .workspace-dialog {
        width: 95%;
    }

    .shared-user-item {
        padding: 12px 15px;
    }

    .user-avatar {
        font-size: 1.8em;
        margin-right: 12px;
    }

    .permission-badge {
        padding: 3px 8px;
        font-size: 0.75em;
    }
}

/* 새로운 워크스페이스 상세 정보 스타일 */
.workspace-details-new {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
    max-width: 800px;
    width: 100%;
    animation: slideUpFadeIn 0.4s ease-out;
}

.detail-header-new {
    padding: 30px;
    color: white;
    position: relative;
    overflow: hidden;
}

.detail-header-new::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 200px;
    height: 200px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    transform: translate(50%, -50%);
}

.detail-header-new .header-icon {
    display: inline-block;
    background: rgba(255, 255, 255, 0.2);
    padding: 15px;
    border-radius: 50%;
    font-size: 24px;
    margin-bottom: 15px;
    backdrop-filter: blur(10px);
}

.detail-header-new .header-content h3 {
    margin: 0 0 8px 0;
    font-size: 28px;
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.detail-header-new .header-content p {
    margin: 0;
    font-size: 16px;
    opacity: 0.9;
    line-height: 1.5;
}

.detail-header-new .header-stats {
    display: flex;
    gap: 25px;
    margin-top: 20px;
}

.detail-header-new .stat-item {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.2);
    padding: 10px 15px;
    border-radius: 20px;
    backdrop-filter: blur(10px);
}

.detail-header-new .stat-item i {
    font-size: 18px;
}

.detail-header-new .stat-item span {
    font-weight: 600;
    font-size: 16px;
}

.detail-body-new {
    padding: 40px 30px;
    background: linear-gradient(145deg, #f8f9fa, #e9ecef);
}

.detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
}

.detail-card {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.detail-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.12);
}

.detail-card .card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 20px 24px 16px 24px;
    border-bottom: 1px solid #f1f3f4;
    background: linear-gradient(135deg, #fafafa, #f5f5f5);
}

.detail-card .card-header i {
    font-size: 20px;
}

.detail-card .card-header h4 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: #2c3e50;
}

.detail-card .card-content {
    padding: 20px 24px 24px 24px;
}

.detail-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid #f8f9fa;
}

.detail-row:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.detail-label {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #6c757d;
    font-size: 14px;
    font-weight: 500;
    min-width: 110px;
}

.detail-label i {
    font-size: 14px;
    opacity: 0.7;
}

.detail-value {
    font-size: 14px;
    font-weight: 600;
    color: #2c3e50;
    text-align: right;
    flex: 1;
}

.detail-value.highlight {
    color: #27ae60;
    background: linear-gradient(135deg, #e8f5e8, #d4edda);
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 15px;
}

.tag-badge {
    display: inline-block;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
    margin-right: 6px;
    margin-bottom: 4px;
}

.user-badge {
    display: inline-block;
    background: linear-gradient(135deg, #4facfe, #00f2fe);
    color: white;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
    margin-right: 6px;
    margin-bottom: 4px;
}

.more-users {
    display: inline-block;
    background: #e9ecef;
    color: #6c757d;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

.no-data {
    color: #adb5bd;
    font-style: italic;
    font-size: 13px;
}

.shared-users {
    text-align: right;
}

/* 반응형 디자인 */
@media (max-width: 768px) {
    .workspace-details-new {
        margin: 10px;
        max-width: calc(100vw - 20px);
    }
    
    .detail-header-new {
        padding: 20px;
    }
    
    .detail-body-new {
        padding: 20px;
    }
    
    .detail-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .detail-header-new .header-content h3 {
        font-size: 22px;
    }
    
    .detail-header-new .header-stats {
        gap: 15px;
        flex-wrap: wrap;
    }
    
    .detail-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .detail-label {
        min-width: auto;
    }
    
    .detail-value {
        text-align: left;
        width: 100%;
    }
    
    .shared-users {
        text-align: left;
    }
}

/* ===== 권한 기반 스타일 ===== */

/* 읽기 전용 워크스페이스 스타일 */
#workspace .workspace-card.read-only,
#workspace .workspace-row.read-only {
    opacity: 0.85;
    border-left: 4px solid #95a5a6;
}

#workspace .workspace-card.read-only:hover {
    transform: none;
    box-shadow: 0 2px 8px rgba(149, 165, 166, 0.3);
}

/* 회색 텍스트 - 원래 색상 유지 */
/* #workspace .text-muted,
#workspace .workspace-card.read-only .workspace-name,
#workspace .workspace-card.read-only .workspace-description,
#workspace .workspace-card.read-only p.workspace-description,
#workspace .workspace-row.read-only .workspace-name,
#workspace .workspace-row.read-only .workspace-description-small,
#workspace .workspace-card.read-only h3.workspace-name,
#workspace .workspace-row.read-only td .workspace-name,
#workspace .workspace-row.read-only td .workspace-description-small {
    color: #7f8c8d !important;
    opacity: 0.8;
} */

/* 권한 배지 */
#workspace .permission-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.75em;
    padding: 2px 6px;
    border-radius: 3px;
    font-weight: 500;
}

#workspace .permission-badge.view-only {
    background: #ecf0f1;
    color: #7f8c8d;
}

/* 권한 텍스트 */
#workspace .permission-text {
    color: #95a5a6 !important;
    font-size: 0.8em;
    font-style: italic;
}

/* 비활성화된 버튼 스타일 - 즐겨찾기 버튼은 항상 활성화 */
#workspace .action-btn.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background-color: #ecf0f1 !important;
    color: #95a5a6 !important;
}

#workspace .action-btn.disabled:hover {
    background-color: #ecf0f1 !important;
    transform: none;
}

/* 드롭다운 메뉴 disabled 항목 - 권한 없는 항목 회색 처리 */
#workspace .workspace-dropdown-menu .dropdown-item.disabled {
    opacity: 0.7 !important;
    cursor: not-allowed !important;
    background-color: transparent !important;
    color: #95a5a6 !important;
}

#workspace .workspace-dropdown-menu .dropdown-item.disabled:hover {
    background-color: rgba(149, 165, 166, 0.1) !important;
    color: #95a5a6 !important;
}

#workspace .workspace-dropdown-menu .dropdown-item.disabled i {
    color: #95a5a6 !important;
}

#workspace .workspace-dropdown-menu .dropdown-item.disabled .permission-hint {
    color: #e74c3c !important;
}

/* 읽기 전용 워크스페이스의 드롭다운 메뉴에서 권한 없는 항목만 회색 처리 */
#workspace .workspace-dropdown-menu.read-only-dropdown .dropdown-item.disabled,
#workspace .workspace-dropdown-menu[data-workspace-permission="view"] .dropdown-item.disabled {
    color: #95a5a6 !important;
}

#workspace .workspace-dropdown-menu.read-only-dropdown .dropdown-item.disabled:hover,
#workspace .workspace-dropdown-menu[data-workspace-permission="view"] .dropdown-item.disabled:hover {
    color: #95a5a6 !important;
    background-color: rgba(149, 165, 166, 0.1) !important;
}

#workspace .workspace-dropdown-menu.read-only-dropdown .dropdown-item.disabled i,
#workspace .workspace-dropdown-menu[data-workspace-permission="view"] .dropdown-item.disabled i {
    color: #95a5a6 !important;
}

/* 삭제 항목은 권한이 없어도 빨간색 유지 (단, disabled 상태에서는 회색) */
#workspace .workspace-dropdown-menu .dropdown-item.danger.disabled {
    color: #95a5a6 !important;
}

#workspace .workspace-dropdown-menu .dropdown-item.danger.disabled i {
    color: #95a5a6 !important;
}

#workspace .workspace-dropdown-menu .dropdown-item.danger.disabled .permission-hint {
    color: #e74c3c !important;
}

/* 권한 힌트 텍스트 */
#workspace .permission-hint {
    font-size: 0.75em;
    color: #e74c3c;
    font-style: italic;
    margin-left: 8px;
    font-weight: 500;
}

/* 모든 disabled 드롭다운 항목에 강제 회색 적용 - 최강 우선순위 */
html body #workspace .workspace-dropdown-menu .dropdown-item.disabled,
html body #workspace .workspace-dropdown-menu .dropdown-item.disabled *,
html body #workspace .workspace-dropdown-menu .dropdown-item.disabled i,
html body #workspace .workspace-dropdown-menu .dropdown-item.disabled span:not(.permission-hint) {
    color: #95a5a6 !important;
    opacity: 0.7 !important;
}

html body #workspace .workspace-dropdown-menu .dropdown-item.disabled .permission-hint {
    color: #e74c3c !important;
    opacity: 1 !important;
}

/* 위의 스타일이 적용되지 않는 경우를 위한 대안 */
.workspace-dropdown-menu .dropdown-item.disabled[style*="color"] {
    color: #95a5a6 !important;
}

.workspace-dropdown-menu .dropdown-item.disabled .fas,
.workspace-dropdown-menu .dropdown-item.disabled .fa {
    color: #95a5a6 !important;
}

/* 읽기 전용 워크스페이스 카드 헤더 스타일 조정 - 원래 색상 유지 */
/* #workspace .workspace-card.read-only .workspace-card-header {
    background: linear-gradient(135deg, rgba(149, 165, 166, 0.8), rgba(127, 140, 141, 0.8)) !important;
} */

/* 리스트 뷰에서 읽기 전용 행 스타일 - 원래 색상 유지 */
/* #workspace .workspace-row.read-only td {
    color: #7f8c8d;
}

#workspace .workspace-row.read-only .workspace-name {
    font-weight: normal;
} */

/* 워크스페이스 권한 표시기 스타일 */
.workspace-permission-indicator {
    background: rgba(149, 165, 166, 0.9);
    color: white;
    font-size: 0.7em;
    padding: 2px 8px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    gap: 3px;
    margin-bottom: 4px;
    font-weight: 500;
    position: absolute;
    top: 4px;
    left: 8px;
    z-index: 10;
}

.workspace-permission-indicator i {
    font-size: 0.9em;
}

/* 리스트 뷰용 작은 권한 표시기 */
.workspace-permission-indicator-small {
    background: rgba(149, 165, 166, 0.9);
    color: white;
    font-size: 0.65em;
    padding: 1px 6px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    gap: 2px;
    margin-bottom: 2px;
    font-weight: 500;
}

.workspace-permission-indicator-small i {
    font-size: 0.8em;
}

/* ===== 카테고리 스타일 ===== */
.category-section {
    margin-bottom: 10px;
}

.category-header {
    background: #f8f9fa;
    padding: 8px 12px;
    border-radius: 6px;
    cursor: default;
    display: flex;
    align-items: center;
    gap: 8px;
    border-left: 4px solid #007bff;
    user-select: none;
    font-weight: 500;
}

.category-icon {
    font-size: 14px;
}

.category-name {
    flex: 1;
    font-weight: 500;
    color: #495057;
}

.category-count {
    font-size: 0.85em;
    color: #6c757d;
    background: #dee2e6;
    padding: 2px 6px;
    border-radius: 10px;
    min-width: 20px;
    text-align: center;
}


.category-favorites {
    margin-left: 16px;
    margin-top: 8px;
    border-left: 2px solid #e9ecef;
    padding-left: 12px;
}

.category-favorites .favorite-item {
    margin-bottom: 8px;
}