/* 自定义Admin样式 - 与主站配色保持一致 */
:root {
    --primary-color: #206be7;
    --primary-dark: #182848;
    --secondary-color: #6e8efb;
    --accent-color: #a17fe0;
    --gradient-start: #206be7;
    --gradient-end: #a17fe0;
    --text-color: #333;
    --text-light: #6c757d;
    --border-color: #e9ecef;
    --bg-light: #f8f9fa;
    --white: #ffffff;
}

/* 顶部导航栏 */
#header {
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end)) !important;
    color: white !important;
}

#header h1, #header h1 a:link, #header h1 a:visited {
    color: white !important;
}

#header a:link, #header a:visited {
    color: rgba(255, 255, 255, 0.9) !important;
}

#header a:hover {
    color: white !important;
}

/* 用户工具栏 */
#user-tools {
    color: white !important;
}

#user-tools a {
    color: rgba(255, 255, 255, 0.9) !important;
}

#user-tools a:hover {
    color: white !important;
}

/* 面包屑导航 */
.breadcrumbs {
    background: var(--bg-light) !important;
    border-bottom: 1px solid var(--border-color) !important;
}

.breadcrumbs a {
    color: var(--primary-color) !important;
}

.breadcrumbs a:hover {
    color: var(--primary-dark) !important;
}

/* 左侧导航栏 - 修复app名称颜色 */
#nav-sidebar {
}

/* App标签样式 - 改为白色 */
.app-label {
    background: transparent !important;
    color: white !important;
    font-weight: 600 !important;
    padding: 8px 16px !important;
    margin: 0 !important;
    border: none !important;
}

.app-label a {
    color: white !important;
    text-decoration: none !important;
}

.app-label:hover {
    background: rgba(255, 255, 255, 0.1) !important;
}

/* 模型链接样式 */
.model-link {
    color: rgba(255, 255, 255, 0.9) !important;
    padding: 6px 24px !important;
}

.model-link:hover {
    color: white !important;
    background: rgba(255, 255, 255, 0.1) !important;
}

/* 主要按钮 */
.button, input[type=submit], input[type=button], .submit-row input, a.button {
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end)) !important;
    border: none !important;
    color: white !important;
    border-radius: 4px !important;
    padding: 8px 16px !important;
    transition: all 0.3s ease !important;
}

.button:hover, input[type=submit]:hover, input[type=button]:hover, .submit-row input:hover, a.button:hover {
    background: linear-gradient(135deg, var(--primary-dark), var(--accent-color)) !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 4px 8px rgba(75, 108, 183, 0.3) !important;
}

/* 默认按钮 */
.default {
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end)) !important;
    border: none !important;
}

.default:hover {
    background: linear-gradient(135deg, var(--primary-dark), var(--accent-color)) !important;
}

/* 链接颜色 */
a:link, a:visited {
    color: var(--primary-color) ;
}

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

/* 表格标题 */
.module h2, .module caption, .inline-group h2 {
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end)) !important;
    color: white !important;
}

/* 表格行悬停效果 */
.results tbody tr:hover {
    background-color: rgba(75, 108, 183, 0.1) !important;
}

/* 选中的行 */
.results tbody tr.selected {
    background-color: rgba(75, 108, 183, 0.2) !important;
}

/* 表单字段焦点 */
input:focus, textarea:focus, select:focus {
    border-color: var(--primary-color) !important;
    box-shadow: 0 0 0 2px rgba(75, 108, 183, 0.2) !important;
}

/* 侧边栏 */
.module {
    border: 1px solid var(--border-color) !important;
    border-radius: 6px !important;
    overflow: hidden !important;
}

/* 错误信息 */
.errornote {
    background: #dc3545 !important;
    border: 1px solid #dc3545 !important;
    border-radius: 4px !important;
}

/* 成功信息 */
.success {
    background: #28a745 !important;
    border: 1px solid #28a745 !important;
    border-radius: 4px !important;
}

/* 警告信息 */
.warning {
    background: #ffc107 !important;
    border: 1px solid #ffc107 !important;
    border-radius: 4px !important;
    color: #333 !important;
}

/* 信息提示 */
.info {
    background: var(--primary-color) !important;
    border: 1px solid var(--primary-color) !important;
    border-radius: 4px !important;
}

/* 分页器 */
.paginator a:link, .paginator a:visited {
    background: var(--bg-light) !important;
    border: 1px solid var(--border-color) !important;
    color: var(--primary-color) !important;
    border-radius: 4px !important;
}

.paginator a:hover {
    background: var(--primary-color) !important;
    color: white !important;
}

.paginator .this-page {
    background: var(--primary-color) !important;
    color: white !important;
    border-radius: 4px !important;
}

/* 搜索框 */
#searchbar {
    border: 1px solid var(--border-color) !important;
    border-radius: 4px !important;
}

#searchbar:focus {
    border-color: var(--primary-color) !important;
    box-shadow: 0 0 0 2px rgba(75, 108, 183, 0.2) !important;
}

/* 过滤器 */
#changelist-filter h2 {
    background: var(--primary-color) !important;
    color: white !important;
}

#changelist-filter h3 {
    color: var(--primary-color) !important;
}

#changelist-filter a:link, #changelist-filter a:visited {
    color: var(--text-color) !important;
}

#changelist-filter a:hover {
    color: var(--primary-color) !important;
}

#changelist-filter li.selected a {
    color: var(--primary-color) !important;
    font-weight: bold !important;
}

/* 日期层次结构 */
.date-hierarchy a:link, .date-hierarchy a:visited {
    color: var(--primary-color) !important;
}

.date-hierarchy a:hover {
    color: var(--primary-dark) !important;
}

/* 内联表单 */
.inline-group .tabular tr.has_original td {
    background: var(--bg-light) !important;
}

/* 字段集 */
fieldset.module {
    border: 1px solid var(--border-color) !important;
    border-radius: 6px !important;
}

fieldset h2 {
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end)) !important;
    color: white !important;
}

/* 帮助文本 */
.help {
    color: var(--text-light) !important;
}

/* 必填字段 */
.required label, label.required {
    color: var(--text-color) !important;
}

.required label:after, label.required:after {
    content: " *";
    color: #dc3545 !important;
}

/* 删除确认页面 */
.delete-confirmation input[type="submit"] {
    background: #dc3545 !important;
}

.delete-confirmation input[type="submit"]:hover {
    background: #c82333 !important;
}

/* 对象工具 */
.object-tools {
    margin-bottom: 20px !important;
}

.object-tools a:link, .object-tools a:visited {
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end)) !important;
    color: white !important;
    border-radius: 4px !important;
    padding: 8px 16px !important;
    text-decoration: none !important;
}

.object-tools a:hover {
    background: linear-gradient(135deg, var(--primary-dark), var(--accent-color)) !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 4px 8px rgba(75, 108, 183, 0.3) !important;
}

/* ===== 首页Dashboard样式优化 - 简洁化 ===== */

/* 仪表板模块 - 简化背景 */
.dashboard .module {
    background: var(--white) !important;
    border: 1px solid var(--border-color) !important;
    border-radius: 6px !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05) !important;
}

/* 仪表板模块标题 - 保持渐变 */
.dashboard .module h2 {
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end)) !important;
    color: white !important;
    margin: 0 !important;
    padding: 12px 16px !important;
    font-size: 14px !important;
    font-weight: 600 !important;
}

/* 仪表板表格 - 简化样式 */
.dashboard .module table {
    background: transparent !important;
    border: none !important;
}

.dashboard .module table th {
    background: var(--bg-light) !important;
    color: var(--text-color) !important;
    border-bottom: 1px solid var(--border-color) !important;
    padding: 8px 12px !important;
    font-size: 13px !important;
    font-weight: 500 !important;
}

.dashboard .module table td {
    background: transparent !important;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05) !important;
    padding: 8px 12px !important;
}

.dashboard .module table td a {
    color: var(--primary-color) !important;
    text-decoration: none !important;
}

.dashboard .module table td a:hover {
    color: var(--primary-dark) !important;
    text-decoration: underline !important;
}

/* Quick Blog 表单样式 */
.dashboard form {
    background: transparent !important;
    padding: 16px !important;
}

.dashboard form table {
    background: transparent !important;
}

.dashboard form table th {
    background: transparent !important;
    color: var(--text-color) !important;
    font-weight: 500 !important;
    padding: 8px 12px 8px 0 !important;
    border: none !important;
}

.dashboard form table td {
    background: transparent !important;
    border: none !important;
    padding: 4px 0 !important;
}

.dashboard form input[type="text"], 
.dashboard form textarea {
    border: 1px solid var(--border-color) !important;
    border-radius: 4px !important;
    padding: 8px 12px !important;
    width: 100% !important;
}

.dashboard form input[type="text"]:focus, 
.dashboard form textarea:focus {
    border-color: var(--primary-color) !important;
    box-shadow: 0 0 0 2px rgba(75, 108, 183, 0.2) !important;
    outline: none !important;
}

/* Recent Comments 和 Recent Actions 模块 */
.dashboard .module ul {
    background: transparent !important;
    padding: 0 !important;
    margin: 0 !important;
}

.dashboard .module li {
    background: transparent !important;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05) !important;
    padding: 8px 16px !important;
}

.dashboard .module li:last-child {
    border-bottom: none !important;
}

.dashboard .module li a {
    color: var(--primary-color) !important;
    text-decoration: none !important;
}

.dashboard .module li a:hover {
    color: var(--primary-dark) !important;
}

/* My Actions 部分 */
.dashboard .module .actionlist {
    background: transparent !important;
}

.dashboard .module .actionlist li {
    background: transparent !important;
    padding: 6px 16px !important;
}

/* 移除多余的背景色 */
.dashboard .module .form-row {
    background: transparent !important;
}

.dashboard .module .submit-row {
    background: transparent !important;
    padding: 12px 16px !important;
    border-top: 1px solid var(--border-color) !important;
}

/* 响应式调整 */
@media (max-width: 768px) {
    #header h1 {
        font-size: 1.2rem !important;
    }
    
    .button, input[type=submit], input[type=button] {
        padding: 6px 12px !important;
        font-size: 0.9rem !important;
    }
    
    .dashboard .module {
        margin-bottom: 16px !important;
    }
    
    .dashboard .module h2 {
        font-size: 13px !important;
        padding: 10px 12px !important;
    }
} 