/**
 * 家庭照护智能工具 v4.2.0 - 品牌主题样式
 * 
 * 使用 CSS 变量实现动态主题
 */

:root {
    --brand-primary: #1890ff;
    --brand-secondary: #52c41a;
    --brand-background: #f0f2f5;
    --brand-text: #333333;
    --brand-primary-light: rgba(24, 144, 255, 0.1);
    --brand-primary-dark: #096dd9;
    --brand-border: #d9d9d9;
    --brand-shadow: rgba(0, 0, 0, 0.1);
}

.header {
    background-color: var(--brand-primary);
}

.nav-link.active {
    color: var(--brand-primary);
    border-bottom: 2px solid var(--brand-primary);
}

.btn-primary {
    background-color: var(--brand-primary);
    border-color: var(--brand-primary);
    color: white;
}

.btn-primary:hover {
    background-color: var(--brand-primary-dark);
    border-color: var(--brand-primary-dark);
}

.btn-secondary {
    background-color: var(--brand-secondary);
    border-color: var(--brand-secondary);
    color: white;
}

a {
    color: var(--brand-primary);
}

a:hover {
    color: var(--brand-primary-dark);
}

.brand-settings {
    padding: 20px;
    max-width: 800px;
    margin: 0 auto;
}

.brand-section {
    background: white;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px var(--brand-shadow);
}

.brand-section h4 {
    margin: 0 0 15px 0;
    color: var(--brand-text);
    font-size: 16px;
    border-bottom: 1px solid var(--brand-border);
    padding-bottom: 10px;
}

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

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    color: var(--brand-text);
}

.form-group input[type="text"],
.form-group input[type="number"] {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid var(--brand-border);
    border-radius: 4px;
    font-size: 14px;
}

.form-group input[type="text"]:focus {
    border-color: var(--brand-primary);
    outline: none;
    box-shadow: 0 0 0 2px var(--brand-primary-light);
}

.form-group small {
    display: block;
    margin-top: 5px;
    color: #999;
    font-size: 12px;
}

.logo-preview {
    width: 200px;
    height: 60px;
    border: 1px dashed var(--brand-border);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 10px;
    background: var(--brand-background);
}

.logo-preview img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.color-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

.color-input {
    display: flex;
    gap: 10px;
    align-items: center;
}

.color-input input[type="color"] {
    width: 40px;
    height: 40px;
    border: 1px solid var(--brand-border);
    border-radius: 4px;
    cursor: pointer;
    padding: 2px;
}

.color-input input[type="text"] {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid var(--brand-border);
    border-radius: 4px;
    font-size: 14px;
}

.brand-preview-box {
    border: 1px solid var(--brand-border);
    border-radius: 8px;
    overflow: hidden;
}

.preview-header {
    padding: 15px 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    color: white;
}

.preview-logo {
    height: 30px;
    width: auto;
}

.preview-company-name {
    font-size: 18px;
    font-weight: 600;
}

.preview-content {
    padding: 20px;
    background: var(--brand-background);
    display: flex;
    gap: 10px;
}

.preview-btn,
.preview-btn-secondary {
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    color: white;
    cursor: pointer;
    font-size: 14px;
}

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

.brand-actions .btn {
    padding: 10px 24px;
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
    border: none;
}

.brand-actions .btn-primary {
    background-color: var(--brand-primary);
    color: white;
}

.brand-actions .btn-secondary {
    background-color: white;
    border: 1px solid var(--brand-border);
    color: var(--brand-text);
}

@media (max-width: 600px) {
    .color-grid {
        grid-template-columns: 1fr;
    }
}
