/* ========== 应用管理样式 ========== */

.appinfo-container {
    padding: 24px;
}

.appinfo-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding: 16px 20px;
    background: #f8f9fa;
    border-radius: 12px;
}

.appinfo-toolbar-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.appinfo-toolbar h3 {
    font-size: 16px;
    color: #202124;
    margin: 0;
}

.appinfo-count {
    background: rgba(91, 127, 255, 0.1);
    color: var(--business-color, #5B7FFF);
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 500;
}

.appinfo-list {
    background: white;
    border-radius: 12px;
    border: 1px solid #e8eaed;
}

.appinfo-item {
    display: flex;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid #f1f3f4;
    transition: background 0.15s;
}

.appinfo-item:hover {
    background: #f8f9fa;
}

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

.appinfo-item-cover {
    width: 80px;
    height: 60px;
    border-radius: 6px;
    overflow: hidden;
    background: #f1f3f4;
    flex-shrink: 0;
    margin-right: 16px;
    cursor: pointer;
}

.appinfo-item-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.appinfo-item-cover-empty {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #9aa0a6;
    font-size: 11px;
}

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

.appinfo-item-name {
    font-size: 15px;
    font-weight: 600;
    color: #202124;
    margin-bottom: 4px;
}

.appinfo-item-meta {
    font-size: 12px;
    color: #9aa0a6;
}

.appinfo-item-actions {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

.appinfo-empty {
    text-align: center;
    padding: 60px 20px;
    color: #9aa0a6;
}

/* 编辑弹窗样式 */
.appinfo-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 3000;
    justify-content: center;
    align-items: center;
}

.appinfo-modal.active {
    display: flex;
}

.appinfo-modal-content {
    background: white;
    border-radius: 16px;
    width: 90%;
    max-width: 600px;
    max-height: 85vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 24px 48px rgba(0, 0, 0, 0.2);
}

.appinfo-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid #e8eaed;
}

.appinfo-modal-title {
    font-size: 18px;
    font-weight: 600;
    color: #202124;
}

.appinfo-modal-close {
    width: 36px;
    height: 36px;
    border: none;
    background: #f1f3f4;
    border-radius: 50%;
    font-size: 20px;
    cursor: pointer;
    color: #5f6368;
    display: flex;
    align-items: center;
    justify-content: center;
}

.appinfo-modal-close:hover {
    background: #e8eaed;
}

.appinfo-modal-body {
    padding: 24px;
    overflow-y: auto;
    flex: 1;
}

.appinfo-modal-section {
    margin-bottom: 24px;
}

.appinfo-modal-section:last-child {
    margin-bottom: 0;
}

.appinfo-modal-label {
    font-size: 13px;
    font-weight: 600;
    color: #5f6368;
    margin-bottom: 8px;
    display: block;
}

.appinfo-modal-input {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid #dadce0;
    border-radius: 8px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s;
    box-sizing: border-box;
}

.appinfo-modal-input:focus {
    border-color: var(--business-color, #5B7FFF);
}

.appinfo-modal-covers {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 12px;
}

.appinfo-modal-cover-item {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #e8eaed;
}

.appinfo-modal-cover-img {
    width: 120px;
    height: 90px;
    object-fit: cover;
    cursor: pointer;
}

.appinfo-modal-cover-delete {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 24px;
    height: 24px;
    background: rgba(234, 67, 53, 0.9);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.appinfo-modal-cover-delete:hover {
    background: #ea4335;
}

.appinfo-modal-add-url {
    display: flex;
    gap: 8px;
    margin-top: 12px;
}

.appinfo-modal-add-url input {
    flex: 1;
    padding: 10px 12px;
    border: 1px solid #dadce0;
    border-radius: 6px;
    font-size: 13px;
    outline: none;
}

.appinfo-modal-add-url input:focus {
    border-color: var(--business-color, #5B7FFF);
}

.appinfo-modal-preview {
    margin-top: 12px;
    padding: 12px;
    background: #f8f9fa;
    border-radius: 8px;
    text-align: center;
}

.appinfo-modal-preview img {
    max-width: 200px;
    max-height: 150px;
    border-radius: 6px;
}

.appinfo-modal-no-cover {
    color: #9aa0a6;
    font-size: 13px;
    padding: 30px;
    text-align: center;
    background: #f8f9fa;
    border-radius: 8px;
}

/* URL文本列表样式 */
.appinfo-modal-url-list {
    margin-top: 12px;
    border: 1px solid #e8eaed;
    border-radius: 8px;
    overflow: hidden;
}

.appinfo-modal-url-item {
    display: flex;
    align-items: center;
    padding: 10px 12px;
    border-bottom: 1px solid #e8eaed;
    gap: 10px;
}

.appinfo-modal-url-item:last-child {
    border-bottom: none;
}

.appinfo-modal-url-text {
    flex: 1;
    font-size: 12px;
    color: #5f6368;
    word-break: break-all;
    font-family: monospace;
}

.appinfo-modal-url-actions {
    display: flex;
    gap: 6px;
    flex-shrink: 0;
}

.appinfo-modal-footer {
    padding: 16px 24px;
    border-top: 1px solid #e8eaed;
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

/* 图片预览弹窗 */
.image-preview-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    z-index: 4000;
    justify-content: center;
    align-items: center;
}

.image-preview-modal.active {
    display: flex;
}

.image-preview-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
}

.image-preview-content img {
    max-width: 100%;
    max-height: 85vh;
    border-radius: 8px;
}

.image-preview-close {
    position: absolute;
    top: -40px;
    right: 0;
    width: 36px;
    height: 36px;
    background: white;
    border: none;
    border-radius: 50%;
    font-size: 24px;
    cursor: pointer;
    color: #5f6368;
}

.image-preview-close:hover {
    background: #f1f3f4;
}

/* ========== 图片上传区域样式 ========== */
.upload-area {
    border: 2px dashed #dadce0;
    border-radius: 8px;
    padding: 24px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    margin-top: 12px;
}

.upload-area:hover {
    border-color: var(--business-color, #5B7FFF);
    background: rgba(91, 127, 255, 0.03);
}

.upload-area.dragging {
    border-color: var(--business-color, #5B7FFF);
    background: rgba(91, 127, 255, 0.08);
}

.upload-icon {
    margin-bottom: 8px;
}

.upload-icon svg {
    stroke: #9aa0a6;
}

.upload-area:hover .upload-icon svg {
    stroke: var(--business-color, #5B7FFF);
}

.upload-text {
    font-size: 14px;
    color: #5f6368;
}

.upload-hint {
    font-size: 12px;
    color: #9aa0a6;
    margin-top: 4px;
}

/* 上传进度条 */
.upload-progress {
    display: none;
    margin-top: 12px;
}

.upload-progress.active {
    display: block;
}

.progress-bar {
    height: 4px;
    background: #e8eaed;
    border-radius: 2px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: var(--business-color, #5B7FFF);
    width: 0%;
    transition: width 0.3s;
}

.progress-text {
    font-size: 12px;
    color: #5f6368;
    margin-top: 6px;
    text-align: center;
}

/* 分隔线 */
.upload-divider {
    display: flex;
    align-items: center;
    margin: 16px 0 12px;
    color: #9aa0a6;
    font-size: 12px;
}

.upload-divider::before,
.upload-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #e8eaed;
}

.upload-divider span {
    padding: 0 12px;
}

/* ========== Tab 筛选样式 ========== */
.appinfo-tabs {
    display: flex;
    gap: 0;
    margin-bottom: 20px;
    border-bottom: 1px solid #e8eaed;
}

.appinfo-tab {
    padding: 12px 20px;
    font-size: 14px;
    font-weight: 500;
    color: #5f6368;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    transition: all 0.2s;
    background: none;
    border-top: none;
    border-left: none;
    border-right: none;
}

.appinfo-tab:hover {
    color: #202124;
}

.appinfo-tab.active {
    color: var(--business-color, #5B7FFF);
    border-bottom-color: var(--business-color, #5B7FFF);
}

.appinfo-tab-count {
    background: #e8eaed;
    color: #5f6368;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 12px;
    margin-left: 6px;
}

.appinfo-tab.active .appinfo-tab-count {
    background: rgba(91, 127, 255, 0.1);
    color: var(--business-color, #5B7FFF);
}

/* ========== 我的应用标签 ========== */
.my-app-badge {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: white;
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 4px;
    font-weight: 500;
    margin-left: 8px;
}

/* ========== 类型选择器样式 ========== */
.appinfo-type-selector {
    display: flex;
    gap: 10px;
    margin-top: 8px;
}

.appinfo-type-option {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    border: 1px solid #e8eaed;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    background: white;
}

.appinfo-type-option:hover {
    border-color: #dadce0;
    background: #f8f9fa;
}

.appinfo-type-option.selected {
    border-color: var(--business-color, #5B7FFF);
    background: rgba(91, 127, 255, 0.05);
}

.appinfo-type-icon {
    display: flex;
    align-items: center;
}

.appinfo-type-icon svg {
    width: 18px;
    height: 18px;
    stroke: #9aa0a6;
}

.appinfo-type-option.selected .appinfo-type-icon svg {
    stroke: var(--business-color, #5B7FFF);
}

.appinfo-type-text {
    display: flex;
    flex-direction: column;
}

.appinfo-type-title {
    font-size: 13px;
    font-weight: 600;
    color: #202124;
    line-height: 1.2;
}

.appinfo-type-desc {
    font-size: 11px;
    color: #9aa0a6;
    line-height: 1.2;
}
