/* ===================================================
   电玩城管理系统 DMFZ - 自定义样式
   在 Bootstrap 5 基础上增强体验
   =================================================== */

:root {
    /* DMFZ 原有变量（引用动态主题颜色，动态变量由 base.html 注入） */
    --dmfz-primary: var(--primary-color, #6366f1);
    --dmfz-primary-dark: var(--secondary-color, #8b5cf6);
    --dmfz-sidebar-bg: var(--sidebar-bg, #1e293b);
    --dmfz-sidebar-hover: #334155;
    --dmfz-sidebar-active: var(--primary-color, #6366f1);
    --dmfz-body-bg: #f1f5f9;
    --dmfz-card-shadow: 0 1px 3px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
    --dmfz-card-shadow-hover: 0 10px 25px rgba(0, 0, 0, 0.08), 0 4px 6px rgba(0, 0, 0, 0.05);
    --dmfz-sidebar-width: 240px;
}

body {
    background-color: var(--dmfz-body-bg);
    font-family: var(--font-family, "Segoe UI", "Microsoft YaHei", -apple-system, sans-serif);
    color: #334155;
}

/* ============ 侧边栏 ============ */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: var(--dmfz-sidebar-width);
    /* 使用动态主题颜色 */
    background: linear-gradient(180deg, var(--sidebar-bg) 0%, rgba(0,0,0,0.4) 100%);
    color: #cbd5e1;
    z-index: 1050;
    transition: transform 0.3s ease, width 0.3s ease;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

/* 品牌 Logo 样式 */
.sidebar .brand .brand-logo {
    height: 36px;
    width: auto;
    max-width: 140px;
    object-fit: contain;
    border-radius: 4px;
}

.sidebar.collapsed {
    width: 64px;
}

.sidebar.collapsed .brand span:last-child,
.sidebar.collapsed .nav-section-title,
.sidebar.collapsed .menu-toggle span,
.sidebar.collapsed .sub-link span {
    display: none;
}

.sidebar.collapsed .brand {
    justify-content: center;
}

.sidebar.collapsed .menu-toggle,
.sidebar.collapsed .sub-link {
    justify-content: center;
}

.sidebar.collapsed .sub-menu {
    position: absolute;
    left: 100%;
    top: 0;
    width: 200px;
    /* 使用动态主题颜色 */
    background: var(--sidebar-bg);
    box-shadow: 4px 0 20px rgba(0,0,0,0.3);
    border-radius: 0 8px 8px 0;
    z-index: 1060;
}

.sidebar.collapsed .menu-group:hover .sub-menu.show {
    display: block !important;
}

.sidebar .brand {
    padding: 1.25rem 1.5rem;
    font-size: 1.25rem;
    font-weight: 700;
    color: #fff;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    gap: 0.6rem;
    flex-shrink: 0;
}

.sidebar .brand .brand-icon {
    width: 36px;
    height: 36px;
    /* 使用动态主题颜色 */
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.sidebar .nav-section-title {
    padding: 1rem 1.5rem 0.4rem;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #64748b;
    font-weight: 600;
    flex-shrink: 0;
}

/* ============ 一级菜单按钮 ============ */
.sidebar .menu-group {
    margin-bottom: 2px;
    position: relative;  /* 折叠状态下子菜单悬浮定位的参照 */
}

.sidebar .menu-toggle {
    width: 100%;
    padding: 0.65rem 1.5rem;
    background: none;
    border: none;
    color: #cbd5e1;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.92rem;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    text-align: left;
}

.sidebar .menu-toggle i {
    font-size: 1.1rem;
    width: 22px;
    text-align: center;
    flex-shrink: 0;
}

.sidebar .menu-toggle:hover {
    background-color: var(--dmfz-sidebar-hover);
    color: #fff;
    padding-left: 1.75rem;
}

.sidebar .menu-toggle.expanded {
    background: linear-gradient(90deg, var(--dmfz-sidebar-active), transparent);
    color: #fff;
    border-left: 3px solid #fff;
}

.sidebar .menu-toggle .bi-chevron-down {
    transition: transform 0.2s ease;
}

.sidebar .menu-toggle.expanded .bi-chevron-down {
    transform: rotate(180deg);
}

/* ============ 二级子菜单 ============ */
.sidebar .sub-menu {
    display: none;
    overflow: hidden;
    max-height: 0;
    transition: max-height 0.3s ease, opacity 0.3s ease;
    opacity: 0;
}

.sidebar .sub-menu.show {
    display: block;
    max-height: 500px;
    opacity: 1;
}

.sidebar .sub-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.55rem 1.5rem 0.55rem 3.5rem;
    color: #94a3b8;
    text-decoration: none;
    font-size: 0.85rem;
    transition: all 0.2s ease;
}

.sidebar .sub-link:hover {
    /* 使用动态主题颜色的半透明效果（带回退值） */
    background-color: rgba(99, 102, 241, 0.1);
    background-color: color-mix(in srgb, var(--primary-color) 10%, transparent);
    color: #fff;
    padding-left: 3.75rem;
}

.sidebar .sub-link.active {
    /* 使用动态主题颜色（带回退值） */
    background-color: rgba(99, 102, 241, 0.15);
    background-color: color-mix(in srgb, var(--primary-color) 15%, transparent);
    color: #fff;
    border-left: 2px solid var(--primary-color);
}

.sidebar .sub-link i {
    font-size: 0.9rem;
    width: 18px;
    text-align: center;
    flex-shrink: 0;
}

/* ============ 旧版导航链接（保留首页等） ============ */
.sidebar .nav-link {
    color: #cbd5e1;
    padding: 0.65rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    border-radius: 0;
    transition: all 0.2s ease;
    font-size: 0.92rem;
    position: relative;
    text-decoration: none;
}

.sidebar .nav-link i {
    font-size: 1.1rem;
    width: 22px;
    text-align: center;
}

.sidebar .nav-link:hover {
    background-color: var(--dmfz-sidebar-hover);
    color: #fff;
    padding-left: 1.75rem;
}

.sidebar .nav-link.active {
    background: linear-gradient(90deg, var(--dmfz-sidebar-active), transparent);
    color: #fff;
    border-left: 3px solid #fff;
}

/* ============ 主内容区 ============ */
.main-wrapper {
    margin-left: var(--dmfz-sidebar-width);
    min-height: 100vh;
    transition: margin-left 0.3s ease;
    display: flex;
    flex-direction: column;
}

.main-wrapper.sidebar-collapsed {
    margin-left: 64px;
}

.topbar {
    /* 使用动态主题颜色 */
    background: var(--topbar-bg);
    padding: 0.85rem 1.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
}

.topbar .page-title {
    font-size: 1.15rem;
    font-weight: 600;
    margin: 0;
    color: #1e293b;
}

.content-area {
    padding: 1.5rem;
    animation: fadeInUp 0.4s ease;
    flex: 1;
    overflow-y: auto;
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ============ 卡片 ============ */
.card {
    border: none;
    border-radius: 0.75rem;
    box-shadow: var(--dmfz-card-shadow);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
    box-shadow: var(--dmfz-card-shadow-hover);
}

.card-header {
    background: #fff;
    border-bottom: 1px solid #f1f5f9;
    font-weight: 600;
    padding: 0.9rem 1.25rem;
    border-radius: 0.75rem 0.75rem 0 0 !important;
}

/* ============ 数据统计卡片 ============ */
.stat-card {
    border-radius: 0.85rem;
    overflow: hidden;
    position: relative;
    color: #fff;
    border: none;
}

.stat-card .stat-body {
    padding: 1.25rem 1.5rem;
    position: relative;
    z-index: 2;
}

.stat-card .stat-icon {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 4rem;
    opacity: 0.18;
    z-index: 1;
}

.stat-card .stat-label {
    font-size: 0.82rem;
    opacity: 0.92;
    margin-bottom: 0.3rem;
}

.stat-card .stat-value {
    font-size: 1.85rem;
    font-weight: 700;
    line-height: 1.2;
}

.stat-card .stat-sub {
    font-size: 0.78rem;
    opacity: 0.85;
    margin-top: 0.3rem;
}

.bg-gradient-primary {
    /* 使用动态主题颜色 */
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
}
.bg-gradient-success { background: linear-gradient(135deg, #10b981, #34d399); }
.bg-gradient-info    { background: linear-gradient(135deg, #0ea5e9, #38bdf8); }
.bg-gradient-warning { background: linear-gradient(135deg, #f59e0b, #fbbf24); }
.bg-gradient-danger  { background: linear-gradient(135deg, #ef4444, #f87171); }
.bg-gradient-purple  { background: linear-gradient(135deg, #8b5cf6, #a78bfa); }

/* ============ 表格 ============ */
.table {
    margin-bottom: 0;
}

.table thead th {
    background: #f8fafc;
    border-bottom: 2px solid #e2e8f0;
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #64748b;
    font-weight: 600;
    padding: 0.75rem 1rem;
}

.table tbody td {
    padding: 0.7rem 1rem;
    vertical-align: middle;
    border-bottom: 1px solid #f1f5f9;
}

.table tbody tr {
    transition: background 0.15s ease;
}

.table-hover tbody tr:hover {
    background: #f8fafc;
}

/* ============ 徽章 ============ */
.badge {
    font-weight: 500;
    padding: 0.4em 0.7em;
    border-radius: 0.4rem;
}

/* ============ 按钮 ============ */
.btn {
    border-radius: 0.5rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

.btn:hover {
    transform: translateY(-1px);
}

.btn:active {
    transform: translateY(0);
}

/* ============ Bootstrap 组件主题颜色全面覆盖 ============ */

/* 按钮主题 */
.btn-primary {
    --bs-btn-bg: var(--primary-color) !important;
    --bs-btn-border-color: var(--primary-color) !important;
    --bs-btn-hover-bg: var(--secondary-color) !important;
    --bs-btn-hover-border-color: var(--secondary-color) !important;
    --bs-btn-active-bg: var(--secondary-color) !important;
    --bs-btn-active-border-color: var(--secondary-color) !important;
}

/* 文本颜色主题 */
.text-primary {
    color: var(--primary-color) !important;
}

/* 链接颜色 */
a {
    color: var(--primary-color);
}
a:hover {
    color: var(--secondary-color);
}

/* 表单焦点颜色 */
.form-control:focus, .form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem color-mix(in srgb, var(--primary-color) 25%, transparent);
}

/* 徽章主题色 */
.badge.bg-primary {
    background-color: var(--primary-color) !important;
}

/* 进度条主题 */
.progress-bar {
    background-color: var(--primary-color) !important;
}

/* 分页主题 */
.page-link {
    color: var(--primary-color);
}
.page-link:hover {
    color: var(--secondary-color);
    background-color: rgba(99, 102, 241, 0.1);
    background-color: color-mix(in srgb, var(--primary-color) 10%, transparent);
}
.page-item.active .page-link {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

/* 表格悬停颜色 */
.table-hover tbody tr:hover {
    background-color: rgba(99, 102, 241, 0.05);
    background-color: color-mix(in srgb, var(--primary-color) 5%, transparent);
}

/* 侧边栏活动项（重要） */
.sidebar .menu-toggle.expanded {
    background: linear-gradient(90deg, var(--primary-color), transparent);
    color: #fff;
}

/* 卡片头部主色调 */
.card-header {
    border-bottom-color: color-mix(in srgb, var(--primary-color) 30%, transparent);
}

/* 开关/复选框主色调 */
.form-check-input:checked {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}
.form-check-input[type="checkbox"]:indeterminate {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

/* ============ 表单 ============ */
.form-control, .form-select {
    border-radius: 0.5rem;
    border-color: #e2e8f0;
    padding: 0.5rem 0.85rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary-color);
    /* 使用动态主题颜色的半透明效果（带回退值） */
    box-shadow: 0 0 0 0.2rem rgba(99, 102, 241, 0.15);
    box-shadow: 0 0 0 0.2rem color-mix(in srgb, var(--primary-color) 15%, transparent);
}

.form-label {
    font-weight: 500;
    font-size: 0.88rem;
    color: #475569;
    margin-bottom: 0.35rem;
}

/* ============ 登录页 ============ */
.login-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    /* 使用动态主题颜色 */
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    position: relative;
    overflow: hidden;
    padding: 2rem 1rem;
}

.login-wrapper::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='60' height='60' viewBox='0 0 60 60'%3E%3Cpath fill='%23ffffff' fill-opacity='0.05' d='M30 0l30 30-30 30L0 30z'/%3E%3C/svg%3E");
}

.login-card {
    width: 100%;
    max-width: 480px;
    border-radius: 1rem;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.25);
    position: relative;
    z-index: 2;
    animation: scaleIn 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.login-card .card-body {
    padding: 2rem 2rem !important;
}

/* 登录页 Logo 区样式优化 */
.login-card .brand-icon {
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.login-card h3 {
    font-size: 1.4rem;
    letter-spacing: -0.02em;
}

/* 登录页标签页间距优化 */
.login-card .nav-tabs {
    margin-bottom: 1.5rem !important;
}

.login-card .nav-tabs .nav-link {
    padding: 0.6rem 1rem;
    font-weight: 500;
}

/* 登录页表单控件间距 */
.login-card .form-label {
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.login-card .input-group-text {
    font-size: 1rem;
}

/* 登录页底部链接区域 */
.login-card .card-body > .text-center.mt-4 {
    margin-top: 2rem !important;
    padding-top: 1.5rem;
    border-top: 1px solid #f1f5f9;
}

/* 注册页使用更大宽度 */
.register-card {
    max-width: 520px !important;
}

/* 响应式：小屏幕自适应 */
@media (max-width: 576px) {
    .login-card {
        max-width: 100%;
    }
    .login-card .card-body {
        padding: 1.5rem 1.25rem !important;
    }
    .register-card {
        max-width: 100% !important;
    }
}

@keyframes scaleIn {
    from { opacity: 0; transform: scale(0.9); }
    to { opacity: 1; transform: scale(1); }
}

/* ============ 排班日历 ============ */
.schedule-grid {
    display: grid;
    grid-template-columns: 120px repeat(7, 1fr);
    gap: 1px;
    background: #e2e8f0;
    border-radius: 0.5rem;
    overflow: hidden;
}

.schedule-grid .grid-cell {
    background: #fff;
    padding: 0.6rem;
    min-height: 80px;
    font-size: 0.82rem;
}

.schedule-grid .grid-head {
    background: #f8fafc;
    font-weight: 600;
    text-align: center;
    padding: 0.5rem;
}

.schedule-grid .grid-shift {
    background: #f8fafc;
    font-weight: 600;
    padding: 0.5rem 0.75rem;
}

.shift-chip {
    display: inline-block;
    padding: 0.2rem 0.55rem;
    border-radius: 0.4rem;
    font-size: 0.75rem;
    margin: 0.15rem 0.1rem;
    background: #eff6ff;
    color: #1d4ed8;
}

/* ============ 空状态 ============ */
.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: #94a3b8;
}

.empty-state i {
    font-size: 3.5rem;
    margin-bottom: 0.8rem;
    opacity: 0.5;
}

/* ============ 响应式断点 ============ */
/* 超小屏幕（手机） */
@media (max-width: 576px) {
    .content-area {
        padding: 0.75rem;
    }
    .topbar {
        padding: 0.6rem 1rem;
    }
    .topbar .page-title {
        font-size: 1rem;
    }
    .stat-card .stat-value {
        font-size: 1.4rem;
    }
}

/* 小屏幕（平板竖屏） */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
    }
    .sidebar.show {
        transform: translateX(0);
    }
    .main-wrapper {
        margin-left: 0;
    }
    .sidebar-toggle {
        display: inline-flex;
    }
    .sidebar-backdrop {
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.4);
        z-index: 1040;
        display: none;
    }
    .sidebar-backdrop.show {
        display: block;
    }
}

/* 中等屏幕（平板横屏/小桌面） */
@media (min-width: 769px) and (max-width: 992px) {
    .sidebar {
        width: 200px;
    }
    .main-wrapper {
        margin-left: 200px;
    }
    :root {
        --dmfz-sidebar-width: 200px;
    }
}

/* 大屏幕（标准桌面） */
@media (min-width: 993px) and (max-width: 1200px) {
    .sidebar {
        width: 220px;
    }
    .main-wrapper {
        margin-left: 220px;
    }
    :root {
        --dmfz-sidebar-width: 220px;
    }
}

/* 超大屏幕（宽屏显示器） */
@media (min-width: 1201px) {
    .sidebar {
        width: 240px;
    }
    .main-wrapper {
        margin-left: 240px;
    }
    :root {
        --dmfz-sidebar-width: 240px;
    }
}

/* ============ 通用工具 ============ */
.cursor-pointer { cursor: pointer; }
.text-money { font-variant-numeric: tabular-nums; }

/* 滚动条美化 */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: #f1f5f9; }
::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #94a3b8; }

/* 侧边栏滚动条 */
.sidebar::-webkit-scrollbar { width: 6px; }
.sidebar::-webkit-scrollbar-track { background: #0f172a; }
.sidebar::-webkit-scrollbar-thumb { background: #334155; }
.sidebar::-webkit-scrollbar-thumb:hover { background: #475569; }

/* ============ 排班日历（现代化美化） ============ */
.shift-calendar {
    display: flex;
    flex-direction: column;
    border-radius: 1rem;
    overflow: hidden;
    background: #fff;
}

/* 日历表头 - 周几标题行 */
.shift-calendar .calendar-header {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: #fff;
    font-weight: 600;
    font-size: 0.85rem;
    letter-spacing: 0.05em;
}

.shift-calendar .calendar-header .cal-day-label {
    padding: 0.75rem 0.5rem;
    text-align: center;
    border-right: 1px solid rgba(255, 255, 255, 0.15);
}

.shift-calendar .calendar-header .cal-day-label:last-child {
    border-right: none;
}

/* 周末标题特殊样式 */
.shift-calendar .calendar-header .cal-day-label.weekend-label {
    background: rgba(255, 255, 255, 0.1);
}

/* 日历主体 - 网格布局 */
.shift-calendar .calendar-body {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
    background: #e2e8f0;
}

/* 日期格子基础样式 */
.shift-calendar .cal-cell {
    position: relative;
    min-height: 130px;
    background: #fff;
    padding: 0.75rem;
    display: flex;
    flex-direction: column;
    transition: all 0.2s ease;
    overflow: hidden;
}

.shift-calendar .cal-cell:hover {
    background: #f8fafc;
    box-shadow: inset 0 0 0 2px var(--primary-color);
    z-index: 1;
}

/* 日期数字区 */
.shift-calendar .cal-cell .cal-date-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
    padding-bottom: 0.4rem;
    border-bottom: 1px dashed #e2e8f0;
}

.shift-calendar .cal-cell .cal-date-num {
    font-size: 1.15rem;
    font-weight: 700;
    color: #334155;
    line-height: 1;
}

.shift-calendar .cal-cell .cal-date-num.today {
    color: var(--primary-color);
    font-size: 1.25rem;
}

.shift-calendar .cal-cell .cal-badge {
    font-size: 0.65rem;
    padding: 0.15rem 0.45rem;
    border-radius: 999px;
    font-weight: 600;
    background: var(--primary-color);
    color: #fff;
}

/* 今日格子特殊样式 */
.shift-calendar .cal-cell.is-today {
    background: linear-gradient(135deg, color-mix(in srgb, var(--primary-color) 8%, #fff) 0%, #fff 100%);
    box-shadow: 0 0 0 2px var(--primary-color) inset;
}

.shift-calendar .cal-cell.is-today .cal-date-num {
    color: var(--primary-color);
}

/* 周末底色 */
.shift-calendar .cal-cell.is-weekend {
    background: #fef9c3;
}

.shift-calendar .cal-cell.is-weekend:hover {
    background: #fde68a;
}

/* 非本月日期 */
.shift-calendar .cal-cell.other-month {
    background: #f8fafc;
    opacity: 0.55;
}

.shift-calendar .cal-cell.other-month:hover {
    background: #f1f5f9;
    opacity: 0.7;
}

.shift-calendar .cal-cell.other-month .cal-date-num {
    color: #94a3b8;
}

/* 排班列表容器 */
.shift-calendar .cal-cell .cal-schedules {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    margin-bottom: 0.5rem;
}

/* 排班卡片样式 */
.shift-calendar .cal-cell .shift-item {
    background: #f8fafc;
    border-radius: 0.5rem;
    padding: 0.4rem 0.5rem;
    border-left: 3px solid;
    font-size: 0.78rem;
    transition: all 0.15s ease;
    position: relative;
}

.shift-calendar .cal-cell .shift-item:hover {
    background: #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transform: translateX(2px);
}

.shift-calendar .cal-cell .shift-item .shift-name {
    font-weight: 600;
    font-size: 0.72rem;
    display: inline-block;
    padding: 0.1rem 0.4rem;
    border-radius: 0.25rem;
    color: #fff;
    margin-right: 0.3rem;
}

.shift-calendar .cal-cell .shift-item .emp-name {
    font-weight: 500;
    color: #334155;
    display: block;
    margin-top: 0.15rem;
}

.shift-calendar .cal-cell .shift-item .shift-time {
    font-size: 0.68rem;
    color: #64748b;
    margin-top: 0.1rem;
    display: block;
}

/* 删除按钮 */
.shift-calendar .cal-cell .shift-item .shift-actions {
    position: absolute;
    right: 0.3rem;
    top: 50%;
    transform: translateY(-50%);
    opacity: 0;
    transition: opacity 0.15s ease;
}

.shift-calendar .cal-cell .shift-item:hover .shift-actions {
    opacity: 1;
}

.shift-calendar .cal-cell .shift-item .shift-actions button {
    background: none;
    border: none;
    color: #ef4444;
    padding: 0.2rem;
    font-size: 0.8rem;
    cursor: pointer;
    border-radius: 0.25rem;
}

.shift-calendar .cal-cell .shift-item .shift-actions button:hover {
    background: #fee2e2;
}

/* 添加按钮 - 悬浮圆形按钮 */
.shift-calendar .cal-cell .cal-add-btn {
    position: absolute;
    bottom: 0.5rem;
    right: 0.5rem;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--primary-color);
    color: #fff;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    cursor: pointer;
    opacity: 0;
    transform: scale(0.8);
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px color-mix(in srgb, var(--primary-color) 30%, transparent);
}

.shift-calendar .cal-cell:hover .cal-add-btn {
    opacity: 1;
    transform: scale(1);
}

.shift-calendar .cal-cell .cal-add-btn:hover {
    background: var(--secondary-color);
    transform: scale(1.1);
}

/* 无排班时的中央添加按钮 */
.shift-calendar .cal-cell .cal-empty-state {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.shift-calendar .cal-cell .cal-empty-state .cal-empty-btn {
    width: 100%;
    height: 100%;
    min-height: 60px;
    background: transparent;
    border: 2px dashed #cbd5e1;
    color: #94a3b8;
    border-radius: 0.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    font-size: 0.8rem;
    gap: 0.3rem;
}

.shift-calendar .cal-cell .cal-empty-state .cal-empty-btn:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    background: color-mix(in srgb, var(--primary-color) 5%, transparent);
}

/* 日程数量角标 */
.shift-calendar .cal-cell .cal-count-badge {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    background: var(--primary-color);
    color: #fff;
    font-size: 0.65rem;
    font-weight: 600;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 导航栏美化 */
.calendar-nav {
    background: #fff;
    border-radius: 1rem;
    box-shadow: var(--dmfz-card-shadow);
    padding: 0.5rem 1rem !important;
}

.calendar-nav .nav-btn {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.5rem 1rem;
    border-radius: 0.75rem;
    font-size: 0.9rem;
    transition: all 0.2s ease;
}

.calendar-nav .nav-btn:hover {
    background: color-mix(in srgb, var(--primary-color) 10%, transparent);
    color: var(--primary-color);
}

.calendar-nav .month-display {
    text-align: center;
}

.calendar-nav .month-display .month-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: #1e293b;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.calendar-nav .month-display .month-range {
    color: #64748b;
    font-size: 0.8rem;
}

.calendar-nav .today-btn {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: #fff;
    border: none;
}

.calendar-nav .today-btn:hover {
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px color-mix(in srgb, var(--primary-color) 30%, transparent);
}
