/**
 * 数据账户管理样式
 */

/* 引入独立配色系统 */
@import url('./settings-colors.css');

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

.data-section-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-heading);
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--bg-border);
}

/* 本地数据源按钮组 */
.data-source-group {
    display: flex;
    gap: 10px;
    margin-bottom: 12px;
}

/* 自定义链接配置区域 */
.custom-link-config {
    margin-bottom: 16px;
    padding: 12px;
    background: var(--bg-secondary);
    border: 1px solid var(--bg-border);
    border-radius: var(--border-radius);
}

.custom-link-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 10px;
}

.custom-link-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.custom-link-label {
    font-size: 11px;
    color: var(--text-secondary);
    font-weight: 500;
}

.custom-link-input {
    width: 100%;
    padding: 6px 10px;
    font-size: 12px;
    color: var(--text-color);
    background: var(--bg-primary);
    border: 1px solid var(--bg-border);
    border-radius: var(--border-radius);
    outline: none;
    transition: all var(--transition-fast);
    box-sizing: border-box;
}

.custom-link-input:focus {
    border-color: var(--link-color);
    box-shadow: 0 0 0 2px rgba(64, 158, 255, 0.1);
}

.custom-link-input::placeholder {
    color: var(--text-tertiary);
    font-size: 11px;
}

.custom-link-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.custom-link-apply-btn,
.custom-link-template-btn {
    padding: 6px 14px;
    font-size: 12px;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: all var(--transition-fast);
    border: none;
    font-weight: 500;
    text-align: center;
}

.custom-link-apply-btn {
    background: var(--bg-primary);
    color: var(--text-color);
    border: 2px solid var(--bg-border);
}

.custom-link-apply-btn:hover {
    border-color: var(--link-color);
    background: var(--hover-bg);
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
}

.custom-link-apply-btn.active {
    background: var(--link-color);
    color: var(--active-text-color);
    border-color: var(--link-color);
    font-weight: 600;
}

.custom-link-template-btn {
    background: var(--bg-primary);
    color: var(--text-color);
    border: 1px solid var(--bg-border);
}

.custom-link-template-btn:hover {
    border-color: var(--link-color);
    color: var(--link-color);
    background: var(--hover-bg);
}

.custom-link-apply-btn:active,
.custom-link-template-btn:active {
    transform: scale(0.98);
}

.data-source-group {
    display: flex;
    gap: 10px;
    margin-bottom: 12px;
}

.data-source-btn {
    flex: 1;
    padding: 10px 14px;
    font-size: 13px;
    color: var(--text-color);
    background: var(--bg-primary);
    border: 2px solid var(--bg-border);
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.data-source-btn:hover {
    border-color: var(--link-color);
    background: var(--hover-bg);
}

.data-source-btn.active {
    border-color: var(--link-color);
    background: var(--link-color);
    color: var(--active-text-color);
    font-weight: 600;
}

/* 账户状态模块 */
.account-status-module {
    padding: 12px;
    background: var(--bg-secondary);
    border: 1px solid var(--bg-border);
    border-radius: var(--border-radius);
    margin-bottom: 12px;
}

/* 账户状态容器 - 横向布局 */
.account-status-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

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

.account-display-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-heading);
}

.account-display-status {
    font-size: 11px;
    color: var(--text-secondary);
}

/* 退出登录按钮 */
.logout-btn {
    padding: 6px 12px;
    font-size: 12px;
    color: var(--text-secondary);
    background: var(--bg-primary);
    border: 1px solid var(--bg-border);
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: all var(--transition-fast);
    white-space: nowrap;
}

.logout-btn:hover {
    color: var(--error-color);
    border-color: var(--error-color);
    background: var(--hover-bg);
}

.logout-btn:active {
    transform: scale(0.98);
}

.account-notice {
    font-size: 13px;
    color: var(--text-secondary);
    text-align: center;
}

/* 数据列表模块 */
.data-list-module {
    /* 容器样式 */
}

/* 云端数据列表 */
.cloud-data-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.cloud-data-item {
    padding: 10px 12px;
    background: var(--bg-primary);
    border: 2px solid var(--bg-border);
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.cloud-data-item:hover {
    border-color: var(--link-color);
    background: var(--hover-bg);
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
}

.cloud-data-item.active {
    border-color: var(--link-color);
    background: var(--link-color);
    color: var(--active-text-color);
}

.cloud-data-item.active .data-label,
.cloud-data-item.active .data-value {
    color: var(--active-text-color);
}

/* 紧凑型数据行 */
.data-row-compact {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 12px;
    margin-bottom: 4px;
}

.data-row-compact:last-child {
    margin-bottom: 0;
}

.data-info-item {
    display: inline-flex;
    align-items: center;
    gap: 2px;
}

.data-label {
    color: var(--text-secondary);
    font-size: 11px;
}

.data-value {
    color: var(--text-color);
    font-weight: 500;
    font-size: 12px;
}

/* 精简域名选择器 */
.mini-domain-selector {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 6px 10px;
    margin-bottom: 12px;
    background: var(--bg-primary);
    border: 1px solid var(--bg-border);
    border-radius: var(--border-radius);
    font-size: 12px;
    color: var(--text-secondary);
}

.mini-domain-text {
    font-size: 11px;
    color: var(--text-secondary);
}

.mini-domain-text strong {
    color: var(--text-heading);
    font-weight: 600;
}

.mini-domain-btn {
    padding: 2px 8px;
    font-size: 10px;
    background: var(--bg-secondary);
    color: var(--text-color);
    border: 1px solid var(--bg-border);
    border-radius: 3px;
    cursor: pointer;
    transition: all var(--transition-fast);
    white-space: nowrap;
}

.mini-domain-btn:hover {
    border-color: var(--link-color);
    color: var(--link-color);
    background: var(--hover-bg);
}

.mini-domain-btn:active {
    transform: scale(0.95);
}

/* 登录表单 */
.login-form {
    padding: 16px;
    background: var(--bg-secondary);
    border: 1px solid var(--bg-border);
    border-radius: var(--border-radius);
}

.form-group {
    margin-bottom: 12px;
}

.form-group:last-of-type {
    margin-bottom: 16px;
}

.form-label {
    display: block;
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

.form-input {
    width: 100%;
    padding: 8px 12px;
    font-size: 13px;
    color: var(--text-color);
    background: var(--bg-primary);
    border: 1px solid var(--bg-border);
    border-radius: var(--border-radius);
    outline: none;
    transition: all var(--transition-fast);
    box-sizing: border-box;
}

.form-input:focus {
    border-color: var(--link-color);
    box-shadow: 0 0 0 2px rgba(64, 158, 255, 0.1);
}

.form-input::placeholder {
    color: var(--text-tertiary);
}

.login-btn {
    width: 100%;
    padding: 10px 14px;
    font-size: 13px;
    font-weight: 600;
    color: var(--active-text-color);
    background: var(--link-color);
    border: none;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.login-btn:hover {
    background: var(--link-hover);
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
}

.login-btn:active {
    transform: translateY(0);
}

/* 响应式 */
@media (max-width: 768px) {
    .data-source-group {
        flex-direction: column;
        gap: 8px;
    }
    
    .data-source-btn {
        width: 100%;
    }
    
    .custom-link-config {
        padding: 10px;
    }
    
    .custom-link-row {
        grid-template-columns: 1fr;
        gap: 8px;
    }
    
    .custom-link-input {
        font-size: 11px;
        padding: 6px 8px;
    }
    
    .custom-link-buttons {
        grid-template-columns: 1fr;
        gap: 6px;
    }
    
    .custom-link-apply-btn,
    .custom-link-template-btn {
        width: 100%;
    }
    
    .cloud-data-item {
        padding: 10px;
    }
    
    .data-row {
        font-size: 11px;
    }
    
    .data-label {
        min-width: 70px;
    }
    
    .login-form {
        padding: 12px;
    }
}

