/* Filament 自定义样式优化 */

/* 系统字体栈（含中文），不依赖境外 CDN */
:root {
    --font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

/* 1. 侧边栏宽度优化 */
.fi-sidebar {
    width: 16rem !important; /* 从默认的20rem缩小到16rem */
}

/* 2. 减小侧边栏导航组之间的间距 */
.fi-sidebar-nav-groups {
    gap: 0 !important;
}

.fi-sidebar-group {
    margin-bottom: 0 !important;
    padding-bottom: 0 !important;
    margin-top: 0 !important;
}

.fi-sidebar-group + .fi-sidebar-group {
    margin-top: 0 !important; /* 完全移除父级菜单间距 */
}

.fi-sidebar-group-label {
    padding-top: 0.5rem !important;
    padding-bottom: 0.5rem !important;
    margin-bottom: 0 !important;
    font-weight: 400 !important;
    color: #000000 !important; /* 统一黑色 */
}

.fi-sidebar-group-items {
    margin-top: 0 !important;
    gap: 0 !important;
    padding-top: 0 !important;
}

.fi-sidebar-item {
    margin: 0 !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
}

.fi-sidebar-item-button {
    padding-top: 0.5rem !important;
    padding-bottom: 0.5rem !important;
}

/* 3. 侧边栏文字颜色统一为黑色 */
.fi-sidebar-item-label,
.fi-sidebar-item-button,
.fi-sidebar-group-label {
    color: #000000 !important;
}

.fi-sidebar-item-button:hover .fi-sidebar-item-label {
    color: #000000 !important;
}

/* 2. 移除文字加粗 */
.fi-header-heading,
.fi-section-header-heading,
.fi-ta-text-item,
.fi-ta-header-cell,
.fi-sidebar-item-label,
.fi-sidebar-item-button,
.fi-topbar-item-label,
body,
* {
    font-weight: 400 !important;
}

/* 保持必要的加粗 */
.fi-breadcrumbs-item,
.fi-breadcrumbs-item-label {
    font-weight: 400 !important;
}

.fi-section-header-heading {
    font-weight: 500 !important;
}

/* 3. 侧边栏项目间距优化 */
.fi-sidebar-nav-groups > * + * {
    margin-top: 0.125rem !important;
}

.fi-sidebar-nav {
    gap: 0.125rem !important;
}

/* 4. 表格样式优化 */
.fi-ta-cell,
.fi-ta-text {
    font-weight: 400 !important;
}

.fi-ta-header-cell,
.fi-ta-header-cell-label {
    font-weight: 400 !important;
}

/* 5. 整体字体权重 */
html,
body,
input,
button,
select,
textarea {
    font-weight: 400 !important;
}

/* 6. 表格内容和表头居中对齐 - 增强版 */
/* 表头居中 */
.fi-ta-header-cell,
.fi-ta-header-cell-label,
.fi-ta-header-cell-content {
    text-align: center !important;
    justify-content: center !important;
}

/* 表格单元格居中 */
.fi-ta-cell,
.fi-ta-cell-content {
    text-align: center !important;
    justify-content: center !important;
}

/* 文本内容居中 */
.fi-ta-text,
.fi-ta-text-item,
.fi-ta-text-item-label {
    text-align: center !important;
    justify-content: center !important;
    display: block !important;
}

/* 所有列内容居中 */
.fi-ta-col {
    text-align: center !important;
}

.fi-ta-col > div {
    justify-content: center !important;
    text-align: center !important;
}

/* badge居中 */
.fi-badge {
    margin: 0 auto !important;
    display: inline-flex !important;
}

/* 操作列居中 */
.fi-ta-actions {
    justify-content: center !important;
}

/* 强制所有td和th居中 */
.fi-ta table td,
.fi-ta table th {
    text-align: center !important;
}

/* 日期、价格等数字列居中 */
.fi-ta-text-item-wrapper {
    justify-content: center !important;
    text-align: center !important;
}

/* ================================================
   登录页美化样式
   ================================================ */

/* 登录页整体背景 - 深色渐变 */
.fi-simple-layout {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 40%, #0f3460 100%) !important;
    position: relative;
    overflow: hidden;
}

/* 背景装饰圆圈 */
.fi-simple-layout::before {
    content: '';
    position: absolute;
    top: -200px;
    right: -200px;
    width: 600px;
    height: 600px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(245, 158, 11, 0.15) 0%, transparent 70%);
    pointer-events: none;
}

.fi-simple-layout::after {
    content: '';
    position: absolute;
    bottom: -200px;
    left: -200px;
    width: 500px;
    height: 500px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(245, 158, 11, 0.1) 0%, transparent 70%);
    pointer-events: none;
}

/* 登录卡片美化 */
.fi-simple-main {
    background: rgba(255, 255, 255, 0.97) !important;
    border-radius: 20px !important;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(255, 255, 255, 0.1) !important;
    border: none !important;
    padding: 3rem 3.5rem !important;
    backdrop-filter: blur(10px);
    max-width: 440px !important;
}

/* LOGO 区域 */
.fi-simple-main .fi-logo {
    margin-bottom: 0.5rem !important;
}

/* 标题文字 */
.fi-simple-main .fi-heading {
    color: #1a1a2e !important;
    font-size: 1.75rem !important;
    font-weight: 700 !important;
    letter-spacing: -0.02em;
    text-align: center;
    margin-bottom: 0.25rem !important;
}

/* 副标题 */
.fi-simple-main .fi-sub-heading {
    color: #6b7280 !important;
    font-size: 0.9rem !important;
    text-align: center;
    margin-bottom: 1.5rem !important;
}

/* 输入框美化 */
.fi-simple-main .fi-input {
    border-radius: 10px !important;
    border: 1.5px solid #e5e7eb !important;
    padding: 0.7rem 1rem !important;
    font-size: 0.95rem !important;
    transition: border-color 0.2s ease, box-shadow 0.2s ease !important;
    color: #1a1a2e !important;
    background: #f9fafb !important;
    height: auto !important;
}

.fi-simple-main .fi-input:focus {
    border-color: #f59e0b !important;
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.15) !important;
    background: #ffffff !important;
    outline: none !important;
}

/* 输入框标签 */
.fi-simple-main .fi-fo-field-wrp-label label {
    color: #374151 !important;
    font-weight: 500 !important;
    font-size: 0.875rem !important;
}

/* 登录按钮 */
.fi-simple-main .fi-btn-primary,
.fi-simple-main button[type="submit"] {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%) !important;
    border: none !important;
    border-radius: 10px !important;
    padding: 0.8rem 1.5rem !important;
    font-size: 1rem !important;
    font-weight: 600 !important;
    color: #ffffff !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    box-shadow: 0 4px 15px rgba(245, 158, 11, 0.35) !important;
    width: 100% !important;
    letter-spacing: 0.02em;
}

.fi-simple-main .fi-btn-primary:hover,
.fi-simple-main button[type="submit"]:hover {
    background: linear-gradient(135deg, #d97706 0%, #b45309 100%) !important;
    box-shadow: 0 6px 20px rgba(245, 158, 11, 0.45) !important;
    transform: translateY(-1px) !important;
}

.fi-simple-main .fi-btn-primary:active,
.fi-simple-main button[type="submit"]:active {
    transform: translateY(0) !important;
    box-shadow: 0 2px 8px rgba(245, 158, 11, 0.3) !important;
}

/* Remember me 复选框区域 */
.fi-simple-main .fi-checkbox-input {
    accent-color: #f59e0b !important;
    border-color: #f59e0b !important;
}

/* 表单间距 */
.fi-simple-main .fi-fo-field-wrp {
    margin-bottom: 1.1rem !important;
}

/* 页脚版权 */
.fi-simple-layout .fi-footer {
    color: rgba(255, 255, 255, 0.4) !important;
    font-size: 0.78rem !important;
    padding: 1.5rem !important;
}

/* 错误提示 */
.fi-simple-main .fi-fo-field-wrp-error-message {
    color: #ef4444 !important;
    font-size: 0.8rem !important;
}

/* 密码显示/隐藏按钮 */
.fi-simple-main .fi-input-wrp-suffix button {
    color: #9ca3af !important;
}

.fi-simple-main .fi-input-wrp-suffix button:hover {
    color: #f59e0b !important;
}
