/*
#	Project: Supfile System - A powerful file management system 
#   * Large file support, multi-file/multi-task processing
#   * Concurrent uploads, drag-and-drop functionality
#   * Easy to deploy and highly functional.
#
#	This is NOT a freeware, use is subject to license terms.
#
#	Website: https://supixsoft.com
#
#	Author: Along ( supixsoft@outlook.com)
#
#	$Id$
#
#	Copyright (C) 2008-2083 SupixSoft Team. All Rights Reserved.
*/

/* ============================================
   自定义弹窗框架样式（支持主题切换）
   ============================================ */

/* 弹窗遮罩层 */
.supfile-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    backdrop-filter: blur(2px);
}

.supfile-modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* 弹窗容器 */
.supfile-modal {
    background: var(--bg-primary);
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    min-width: 320px;
    max-width: 90%;
    max-height: 90vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transform: scale(0.9) translateY(20px);
    transition: transform 0.3s ease;
    border: 1px solid var(--border-color);
}

.supfile-modal-overlay.active .supfile-modal {
    transform: scale(1) translateY(0);
}

/* 弹窗头部 */
.supfile-modal-header {
    padding: 10px 18px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: linear-gradient(135deg, var(--gradient-start) 0%, var(--gradient-end) 100%);
    color: var(--text-white);
}

.supfile-modal-title {
    font-size: 1em;
    font-weight: 600;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.supfile-modal-close {
    background: #dc3545;
    border: none;
    color: var(--text-white);
    width: 28px;
    height: 28px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.2em;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    line-height: 1;
    padding: 0;
    font-weight: bold;
}

.supfile-modal-close:hover {
    background: #c82333;
    transform: rotate(90deg);
    box-shadow: 0 2px 8px rgba(220, 53, 69, 0.4);
}

/* 弹窗内容区域 */
.supfile-modal-body {
    padding: 24px;
    flex: 1;
    overflow-y: auto;
    color: var(--text-primary);
}

.supfile-modal-message {
    font-size: 0.9em;
    line-height: 1.6;
    margin: 0;
    word-wrap: break-word;
}

/* 弹窗输入框 */
.supfile-modal-input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--border-color);
    border-radius: 6px;
    font-size: 0.9em;
    background: var(--bg-primary);
    color: var(--text-primary);
    transition: all 0.3s ease;
    margin-top: 12px;
    box-sizing: border-box;
}

.supfile-modal-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.1);
}

/* 弹窗底部按钮区域 */
.supfile-modal-footer {
    padding: 16px 24px;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    background: var(--bg-secondary);
}

/* 弹窗按钮 */
.supfile-modal-btn {
    padding: 8px 16px;
    border: none;
    border-radius: 6px;
    font-size: 0.85em;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 80px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.supfile-modal-btn-primary {
    background: linear-gradient(135deg, var(--gradient-start) 0%, var(--gradient-end) 100%);
    color: var(--text-white);
}

.supfile-modal-btn-primary:hover {
    opacity: 0.9;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px var(--shadow-color);
}

.supfile-modal-btn-secondary {
    background: var(--bg-primary);
    color: var(--text-primary);
    border: 2px solid var(--border-color);
}

.supfile-modal-btn-secondary:hover {
    background: var(--bg-secondary);
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.supfile-modal-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* 弹窗图标 */
.supfile-modal-icon {
    font-size: 1.2em;
    margin-right: 8px;
}

.supfile-modal-icon-success {
    color: var(--success-color);
}

.supfile-modal-icon-error {
    color: var(--danger-color);
}

.supfile-modal-icon-warning {
    color: var(--warning-color);
}

.supfile-modal-icon-info {
    color: var(--info-color);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .supfile-modal {
        min-width: 280px;
        max-width: 95%;
        margin: 20px;
    }
    
    .supfile-modal-header {
        padding: 16px 20px;
    }
    
    .supfile-modal-body {
        padding: 20px;
    }
    
    .supfile-modal-footer {
        padding: 12px 20px;
        flex-direction: column-reverse;
    }
    
    .supfile-modal-btn {
        width: 100%;
    }
}

/* 消息提示样式（轻量 Toast，用于 msg） */
.supfile-msg {
    position: fixed;
    top: max(72px, 14vh);
    left: 50%;
    right: auto;
    transform: translate(-50%, -10px);
    background: var(--bg-primary, #ffffff);
    color: var(--text-primary, #1e293b);
    padding: 12px 18px;
    border-radius: 10px;
    box-shadow: 0 4px 18px rgba(15, 23, 42, 0.12);
    z-index: 10050;
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 180px;
    max-width: min(420px, calc(100vw - 40px));
    opacity: 0;
    visibility: hidden;
    cursor: pointer;
    transition: opacity 0.25s ease, visibility 0.25s ease, transform 0.25s ease;
    border: 1px solid var(--border-color, #e2e8f0);
}

.supfile-msg.active {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, 0);
}

.supfile-msg .supfile-modal-icon {
    font-size: 1.15rem;
    margin-right: 0;
    flex-shrink: 0;
}

.supfile-msg-text {
    flex: 1;
    font-size: 0.875rem;
    line-height: 1.45;
    word-break: break-word;
}

.supfile-msg .supfile-modal-icon-info {
    color: var(--info-color, #2563eb);
}

.supfile-msg .supfile-modal-icon-success {
    color: var(--success-color, #16a34a);
}

.supfile-msg .supfile-modal-icon-error {
    color: var(--danger-color, #dc2626);
}

.supfile-msg .supfile-modal-icon-warning {
    color: var(--warning-color, #f59e0b);
}

[data-theme="dark"] .supfile-msg {
    background: #1e293b;
    color: #cbd5e1;
    border-color: #334155;
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.35);
}

[data-theme="dark"] .supfile-msg .supfile-modal-icon-info {
    color: #818cf8;
}

[data-theme="dark"] .supfile-msg .supfile-modal-icon-success {
    color: #4ade80;
}

[data-theme="dark"] .supfile-msg .supfile-modal-icon-error {
    color: #f87171;
}

[data-theme="dark"] .supfile-msg .supfile-modal-icon-warning {
    color: #fbbf24;
}

@media (max-width: 768px) {
    .supfile-msg {
        top: max(64px, 12vh);
        left: 50%;
        right: auto;
        max-width: calc(100vw - 32px);
        transform: translate(-50%, -10px);
    }

    .supfile-msg.active {
        transform: translate(-50%, 0);
    }
}

/* ============================================
   分享文件弹窗样式
   ============================================ */

/* 分享弹窗容器 */
.share-dialog-container {
    padding: 20px;
    font-size: 0.9em;
}

/* 分享弹窗字段 */
.share-dialog-field {
    margin-bottom: 12px;
}

/* 分享弹窗标签 */
.share-dialog-label {
    display: block;
    margin-bottom: 4px;
    font-weight: 600;
    font-size: 0.9em;
    color: var(--text-secondary);
}

/* 资源名称显示区域 */
.share-dialog-resource-name {
    padding: 8px;
    background: var(--bg-secondary, #f5f5f5);
    border-radius: 4px;
    font-size: 0.9em;
    color: var(--text-primary);
}

/* 分享弹窗复选框 */
.share-dialog-checkbox {
    margin-right: 5px;
}

/* 分享设置区域 */
.share-dialog-settings {
    margin-bottom: 12px;
}

.share-dialog-settings-item {
    margin-bottom: 8px;
}

/* 分享弹窗输入框 */
.share-dialog-input {
    width: 100%;
    padding: 8px;
    border: 1px solid var(--border-color, #ddd);
    border-radius: 4px;
    font-size: 0.9em;
    box-sizing: border-box;
    background: var(--bg-primary, #fff);
    color: var(--text-primary);
}

.share-dialog-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(var(--primary-rgb), 0.1);
}

/* 分享结果区域 */
.share-dialog-result {
    display: none;
    margin-top: 12px;
    padding: 12px;
    background: var(--bg-secondary, #f5f5f5);
    border-radius: 4px;
    border: 1px solid var(--border-color, #e0e0e0);
}

.share-dialog-result.show {
    display: block;
}

.share-dialog-result-label {
    margin-bottom: 8px;
    font-weight: 600;
    font-size: 0.9em;
    color: var(--text-secondary);
}

/* 分享链接显示区域 */
.share-dialog-url {
    padding: 8px;
    background: var(--bg-primary, #ffffff);
    border-radius: 4px;
    font-family: monospace;
    word-break: break-all;
    margin-bottom: 8px;
    font-size: 0.85em;
    color: var(--text-primary);
    border: 1px solid var(--border-color, #e0e0e0);
}

/* 分享弹窗按钮 */
.share-dialog-btn {
    background: var(--primary-color);
    color: var(--text-white);
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9em;
    transition: all 0.3s ease;
}

.share-dialog-btn:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px var(--shadow-color);
}

/* 创建分享按钮 */
.share-dialog-btn-create {
    background: linear-gradient(135deg, var(--gradient-start) 0%, var(--gradient-end) 100%);
    color: var(--text-white);
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    width: 100%;
    margin-top: 12px;
    font-size: 0.9em;
    transition: all 0.3s ease;
}

.share-dialog-btn-create:hover {
    opacity: 0.9;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px var(--shadow-color);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .share-dialog-container {
        padding: 16px;
    }
    
    .share-dialog-input {
        padding: 6px;
    }
    
    .share-dialog-btn {
        padding: 6px 12px;
    }
    
    .share-dialog-btn-create {
        padding: 8px 16px;
    }
}

/* ============================================
   Tips 提示框样式
   ============================================ */

.supfile-tips {
    position: fixed;
    z-index: 10002;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease;
    pointer-events: none;
}

.supfile-tips.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.supfile-tips-content {
    background: var(--bg-primary, #ffffff);
    color: var(--text-primary, #333);
    padding: 12px 16px;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    border: 1px solid var(--border-color, #e0e0e0);
    font-size: 0.9em;
    line-height: 1.6;
    max-width: 100%;
    word-wrap: break-word;
    white-space: pre-line;
}

/* Tips 箭头 */
.supfile-tips-arrow {
    position: absolute;
    width: 0;
    height: 0;
    border-style: solid;
}

/* 底部箭头（tips 在上方） */
.supfile-tips-bottom .supfile-tips-arrow {
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    border-width: 8px 8px 0 8px;
    border-color: var(--bg-primary, #ffffff) transparent transparent transparent;
}

/* 顶部箭头（tips 在下方） */
.supfile-tips-top .supfile-tips-arrow {
    top: -8px;
    left: 50%;
    transform: translateX(-50%);
    border-width: 0 8px 8px 8px;
    border-color: transparent transparent var(--bg-primary, #ffffff) transparent;
}

/* 左侧箭头（tips 在右侧） */
.supfile-tips-left .supfile-tips-arrow {
    left: -8px;
    top: 50%;
    transform: translateY(-50%);
    border-width: 8px 8px 8px 0;
    border-color: transparent var(--bg-primary, #ffffff) transparent transparent;
}

/* 右侧箭头（tips 在左侧） */
.supfile-tips-right .supfile-tips-arrow {
    right: -8px;
    top: 50%;
    transform: translateY(-50%);
    border-width: 8px 0 8px 8px;
    border-color: transparent transparent transparent var(--bg-primary, #ffffff);
}

/* 箭头边框（用于显示边框效果） */
.supfile-tips-bottom .supfile-tips-arrow::before {
    content: '';
    position: absolute;
    bottom: 1px;
    left: 50%;
    transform: translateX(-50%);
    border-width: 8px 8px 0 8px;
    border-color: var(--border-color, #e0e0e0) transparent transparent transparent;
    border-style: solid;
}

.supfile-tips-top .supfile-tips-arrow::before {
    content: '';
    position: absolute;
    top: 1px;
    left: 50%;
    transform: translateX(-50%);
    border-width: 0 8px 8px 8px;
    border-color: transparent transparent var(--border-color, #e0e0e0) transparent;
    border-style: solid;
}

.supfile-tips-left .supfile-tips-arrow::before {
    content: '';
    position: absolute;
    left: 1px;
    top: 50%;
    transform: translateY(-50%);
    border-width: 8px 8px 8px 0;
    border-color: transparent var(--border-color, #e0e0e0) transparent transparent;
    border-style: solid;
}

.supfile-tips-right .supfile-tips-arrow::before {
    content: '';
    position: absolute;
    right: 1px;
    top: 50%;
    transform: translateY(-50%);
    border-width: 8px 0 8px 8px;
    border-color: transparent transparent transparent var(--border-color, #e0e0e0);
    border-style: solid;
}

/* 暗色主题 */
[data-theme="dark"] .supfile-tips-content {
    background: var(--bg-primary, #2a2a2a);
    color: var(--text-primary, #e0e0e0);
    border-color: var(--border-color, #404040);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

[data-theme="dark"] .supfile-tips-bottom .supfile-tips-arrow {
    border-color: var(--bg-primary, #2a2a2a) transparent transparent transparent;
}

[data-theme="dark"] .supfile-tips-top .supfile-tips-arrow {
    border-color: transparent transparent var(--bg-primary, #2a2a2a) transparent;
}

[data-theme="dark"] .supfile-tips-left .supfile-tips-arrow {
    border-color: transparent var(--bg-primary, #2a2a2a) transparent transparent;
}

[data-theme="dark"] .supfile-tips-right .supfile-tips-arrow {
    border-color: transparent transparent transparent var(--bg-primary, #2a2a2a);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .supfile-tips-content {
        font-size: 0.85em;
        padding: 10px 14px;
        max-width: 280px;
    }
}

/* ============================================
   弹窗内表单样式优化
   ============================================ */

/* 弹窗内表单字体大小调整 */
.supfile-modal .form-floating,
.supfile-modal .form-control,
.supfile-modal .form-label,
.supfile-modal .form-check-label,
.supfile-modal .form-check-input,
.supfile-modal .alert,
.supfile-modal .btn {
    font-size: 0.875rem; /* 14px，比默认的 16px 小 */
}

/* 弹窗内输入框 placeholder 颜色 */
.supfile-modal .form-control::placeholder {
    color: #999 !important;
    opacity: 1;
}

.supfile-modal .form-control::-webkit-input-placeholder {
    color: #999 !important;
    opacity: 1;
}

.supfile-modal .form-control::-moz-placeholder {
    color: #999 !important;
    opacity: 1;
}

.supfile-modal .form-control:-ms-input-placeholder {
    color: #999 !important;
    opacity: 1;
}

/* 弹窗内标签字体大小 */
.supfile-modal .form-floating > label {
    font-size: 0.875rem;
}

/* 弹窗内复选框和标签 */
.supfile-modal .form-check-label {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

/* 弹窗内链接字体大小 */
.supfile-modal a {
    font-size: 0.875rem;
}

/* 弹窗内按钮字体大小 */
.supfile-modal-btn {
    font-size: 0.875rem;
}

/* 弹窗内标题字体大小 */
.supfile-modal-title {
    font-size: 1rem;
}

/* 弹窗内警告框字体大小 */
.supfile-modal .alert {
    font-size: 0.875rem;
    padding: 0.75rem 1rem;
}

/* 用户表单弹窗（与 /user/projects 项目弹窗同款，前台详情页亦可复用） */
:root:not([data-theme="dark"]) .user-project-modal {
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 20px 48px rgba(15, 23, 42, 0.12), 0 4px 12px rgba(15, 23, 42, 0.06);
}

:root:not([data-theme="dark"]) .user-project-modal__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.15rem 1.35rem 1rem;
    border-bottom: 1px solid #eef0f3;
    background: linear-gradient(180deg, #fafbfc 0%, #ffffff 100%);
}

:root:not([data-theme="dark"]) .user-project-modal__title-wrap {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    min-width: 0;
}

:root:not([data-theme="dark"]) .user-project-modal__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    flex-shrink: 0;
    border-radius: 10px;
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
    color: #2563eb;
    font-size: 1.15rem;
}

:root:not([data-theme="dark"]) .user-project-modal .modal-title {
    margin: 0;
    font-size: 1.0625rem;
    font-weight: 700;
    color: #111827;
    letter-spacing: -0.01em;
}

:root:not([data-theme="dark"]) .user-form-modal.user-project-modal .modal-header {
    border-bottom: 1px solid #eef0f3;
    padding-bottom: 1rem;
}

:root:not([data-theme="dark"]) .user-form-modal.user-project-modal .modal-footer {
    border-top: 1px solid #eef0f3;
    padding-top: 0.9rem;
}

:root:not([data-theme="dark"]) .user-form-modal.user-project-modal .modal-body {
    padding-top: 1.25rem;
}

:root:not([data-theme="dark"]) .user-project-modal__body {
    padding: 1.25rem 1.35rem 1.1rem;
    background: #fff;
}

:root:not([data-theme="dark"]) .user-project-modal__label {
    margin-bottom: 0.4rem;
    font-size: 0.8125rem;
    font-weight: 600;
    color: #374151;
}

:root:not([data-theme="dark"]) .user-form-modal.user-project-modal .form-control,
:root:not([data-theme="dark"]) .user-form-modal.user-project-modal .form-select {
    min-height: 40px;
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
    color: #111827;
    background: #fff;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.03);
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

:root:not([data-theme="dark"]) .user-form-modal.user-project-modal textarea.form-control {
    min-height: 96px;
    resize: vertical;
}

:root:not([data-theme="dark"]) .user-form-modal.user-project-modal .form-control::placeholder {
    color: #9ca3af;
}

:root:not([data-theme="dark"]) .user-form-modal.user-project-modal .form-control:focus,
:root:not([data-theme="dark"]) .user-form-modal.user-project-modal .form-select:focus {
    border-color: #2563eb;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

:root:not([data-theme="dark"]) .user-project-modal__footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.65rem;
    padding: 0.9rem 1.35rem 1.15rem;
    border-top: 1px solid #eef0f3;
    background: #f9fafb;
}

:root:not([data-theme="dark"]) .user-project-modal__footer .btn-outline-secondary {
    min-height: 38px;
    padding: 0.45rem 1rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: #4b5563;
    background: #fff;
    border-color: #d1d5db;
    border-radius: 8px;
}

:root:not([data-theme="dark"]) .user-project-modal__footer .btn-outline-secondary:hover {
    color: #111827;
    background: #fff;
    border-color: #9ca3af;
}

:root:not([data-theme="dark"]) .user-project-modal__save {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    min-height: 38px;
    padding: 0.45rem 1.1rem;
    font-size: 0.875rem;
    font-weight: 600;
    border: none;
    border-radius: 8px;
    color: #fff;
    background: var(--docs-primary, #0d6efd);
    box-shadow: 0 2px 8px rgba(var(--docs-primary-rgb, 13, 110, 253), 0.28);
}

:root:not([data-theme="dark"]) .user-project-modal__save:hover,
:root:not([data-theme="dark"]) .user-project-modal__save:focus {
    color: #fff;
    background: var(--docs-primary-hover, #0b5ed7);
    box-shadow: 0 4px 12px rgba(var(--docs-primary-rgb, 13, 110, 253), 0.32);
}

[data-theme="dark"] .user-project-modal {
    background: var(--docs-bg-body, #1f2937);
    border: 1px solid var(--docs-border-primary, #374151);
    color: var(--docs-text-primary, #f3f4f6);
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 20px 48px rgba(0, 0, 0, 0.45), 0 4px 12px rgba(0, 0, 0, 0.25);
}

[data-theme="dark"] .user-project-modal__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.15rem 1.35rem 1rem;
    border-bottom: 1px solid var(--docs-border-primary, #374151);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.03) 0%, transparent 100%);
}

[data-theme="dark"] .user-project-modal__title-wrap {
    display: flex;
    align-items: center;
    gap: 0.65rem;
}

[data-theme="dark"] .user-project-modal__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: rgba(37, 99, 235, 0.18);
    color: #93c5fd;
    font-size: 1.15rem;
}

[data-theme="dark"] .user-project-modal .modal-title {
    margin: 0;
    font-size: 1.0625rem;
    font-weight: 700;
    color: var(--docs-text-primary, #f3f4f6);
}

[data-theme="dark"] .user-project-modal__body {
    padding: 1.25rem 1.35rem 1.1rem;
    background: var(--docs-bg-body, #1f2937);
    color: var(--docs-text-primary, #f3f4f6);
}

[data-theme="dark"] .user-project-modal__label {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--docs-text-secondary, #9ca3af);
}

[data-theme="dark"] .user-form-modal.user-project-modal .form-control,
[data-theme="dark"] .user-form-modal.user-project-modal .form-select {
    min-height: 40px;
    background: var(--docs-bg-secondary, #111827);
    border-color: var(--docs-border-secondary, #4b5563);
    color: var(--docs-text-primary, #f3f4f6);
}

[data-theme="dark"] .user-form-modal.user-project-modal .form-control:focus,
[data-theme="dark"] .user-form-modal.user-project-modal .form-select:focus {
    background: var(--docs-bg-secondary, #111827);
    border-color: var(--docs-primary, #3b82f6);
    box-shadow: 0 0 0 0.2rem rgba(37, 99, 235, 0.2);
}

[data-theme="dark"] .user-form-modal.user-project-modal textarea.form-control {
    min-height: 96px;
    resize: vertical;
}

[data-theme="dark"] .user-project-modal__footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.65rem;
    padding: 0.9rem 1.35rem 1.15rem;
    border-top: 1px solid var(--docs-border-primary, #374151);
    background: rgba(255, 255, 255, 0.02);
}

[data-theme="dark"] .user-project-modal__save {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    min-height: 38px;
    padding: 0.45rem 1.1rem;
    font-size: 0.875rem;
    font-weight: 600;
    border: none;
    border-radius: 8px;
    color: #fff;
    background: var(--docs-primary, #6366f1);
    box-shadow: 0 2px 8px rgba(var(--docs-primary-rgb, 99, 102, 241), 0.35);
}

[data-theme="dark"] .user-project-modal__save:hover,
[data-theme="dark"] .user-project-modal__save:focus {
    color: #fff;
    background: var(--docs-primary-hover, #818cf8);
    box-shadow: 0 4px 12px rgba(var(--docs-primary-rgb, 99, 102, 241), 0.4);
}

[data-theme="dark"] .user-project-modal .btn-close,
[data-theme="dark"] .sd-bootstrap-modal .btn-close {
    filter: invert(1) grayscale(100%) brightness(200%);
    opacity: 0.85;
}

[data-theme="dark"] .user-project-modal .btn-close:hover,
[data-theme="dark"] .sd-bootstrap-modal .btn-close:hover {
    opacity: 1;
}
