/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: #f5f7fa;
    color: #333;
    line-height: 1.6;
    font-size: 14px;
}

/* 登录页面样式 */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.login-box {
    background: white;
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 450px;
}

.login-box h1 {
    text-align: center;
    color: #667eea;
    margin-bottom: 10px;
    font-size: 24px;
}

.login-box h2 {
    text-align: center;
    margin-bottom: 30px;
    font-size: 18px;
    color: #666;
}

.error {
    background-color: #f8d7da;
    color: #721c24;
    padding: 10px;
    border-radius: 5px;
    margin-bottom: 20px;
    text-align: center;
}

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

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    color: #555;
}

.form-group input {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 16px;
}

.code-group {
    display: flex;
    gap: 10px;
}

.code-group input {
    flex: 1;
}

.btn-code {
    background-color: #6c757d;
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.3s;
}

.btn-code:hover {
    background-color: #5a6268;
}

.btn-code:disabled {
    background-color: #ccc;
    cursor: not-allowed;
}

.btn-login {
    width: 100%;
    background-color: #667eea;
    color: white;
    border: none;
    padding: 15px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 18px;
    font-weight: bold;
    transition: background-color 0.3s;
}

.btn-login:hover {
    background-color: #5a67d8;
}

/* 记住密码样式 */
.remember-me {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 8px;
    margin-bottom: 20px;
}

.remember-me input[type="checkbox"] {
    width: auto;
    margin: 0;
    accent-color: #667eea;
    cursor: pointer;
}

.remember-me label {
    margin: 0;
    font-weight: normal;
    color: #666;
    cursor: pointer;
    user-select: none;
}

.remember-me label:hover {
    color: #667eea;
}

/* 仪表盘样式 */
.dashboard {
    display: flex;
    min-height: 100vh;
}

/* 侧边栏样式 */
.sidebar {
    width: 250px;
    background: linear-gradient(135deg, #2d3748 0%, #4a5568 100%);
    color: white;
    box-shadow: 2px 0 15px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 100vh;
    position: sticky;
    top: 0;
}

.sidebar-header {
    padding: 24px 20px;
    text-align: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-header h3 {
    margin: 0;
    font-size: 20px;
    font-weight: 700;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.sidebar-header h3 i {
    font-size: 22px;
    color: #667eea;
}

/* 导航菜单样式 */
.sidebar-menu {
    list-style: none;
    padding: 20px 0;
    margin: 0;
    flex: 1;
    overflow-y: auto;
}

/* 搜索栏样式 */
.search-container {
    padding: 20px;
    /*background-color: #f8fafc;*/
  
}

.search-bar {
    display: flex;
    gap: 10px;
    max-width: 600px;
    margin: 0 auto;
}

.search-bar input[type="text"] {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.3s ease;
    background-color: white;
}

.search-bar input[type="text"]:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.search-bar input[type="text"]::placeholder {
    color: #94a3b8;
}

.search-bar .btn-primary {
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.sidebar-menu li {
    margin-bottom: 4px;
}

.sidebar-menu li a {
    display: block;
    padding: 14px 20px;
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-left: 4px solid transparent;
    position: relative;
    overflow: hidden;
}

.sidebar-menu li a::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 0;
    height: 100%;
    background-color: rgba(102, 126, 234, 0.1);
    transition: width 0.3s ease;
}

.sidebar-menu li a:hover {
    background-color: rgba(74, 85, 104, 0.8);
    color: #ffffff;
    border-left-color: #667eea;
    padding-left: 24px;
}

.sidebar-menu li a:hover::before {
    width: 100%;
}

.sidebar-menu li a.active {
    background-color: #667eea;
    color: #ffffff;
    border-left-color: #ffffff;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.sidebar-menu li a i {
    margin-right: 12px;
    width: 20px;
    text-align: center;
    font-size: 16px;
    transition: transform 0.3s ease;
}

.sidebar-menu li a:hover i {
    transform: scale(1.1);
}

/* 侧边栏底部 */
.sidebar-footer {
    padding: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.btn-logout {
    display: block;
    width: 100%;
    background-color: rgba(239, 68, 68, 0.2);
    color: #fca5a5;
    border: none;
    padding: 14px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    text-align: center;
    font-size: 14px;
    font-weight: 500;
}

.btn-logout i {
    margin-right: 8px;
    transition: transform 0.3s ease;
}

.btn-logout:hover {
    background-color: rgba(239, 68, 68, 0.4);
    color: #ef4444;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

.btn-logout:hover i {
    transform: translateX(4px);
}

/* 滚动条样式 */
.sidebar-menu::-webkit-scrollbar {
    width: 6px;
}

.sidebar-menu::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
}

.sidebar-menu::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 3px;
}

.sidebar-menu::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.5);
}

/* 主内容区域 */
.main-content {
    flex: 1;
    padding: 24px;
    overflow-x: hidden;
    background: linear-gradient(135deg, #f7fafc 0%, #edf2f7 100%);
}

/* 头部导航 */
.header {
    background: white;
    padding: 20px 24px;
    border-radius: 16px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    margin-bottom: 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-left: 4px solid #667eea;
}

.header-left h2 {
    margin: 0;
    color: #2d3748;
    font-size: 24px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 12px;
}

.header-left h2 i {
    color: #667eea;
    font-size: 28px;
}

.header-right .user-info {
    display: flex;
    align-items: center;
    gap: 16px;
}

.header-right .user-info span {
    font-size: 16px;
    font-weight: 600;
    color: #4a5568;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: flex;
    align-items: center;
    gap: 8px;
}

.header-right .user-info span i {
    color: #667eea;
    font-size: 18px;
    -webkit-text-fill-color: #667eea;
}

/* 卡片样式 */
.card {
    background-color: white;
    padding: 28px;
    border-radius: 16px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    margin-bottom: 28px;
    transition: all 0.3s ease;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.card:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    transform: translateY(-2px);
}

/* 卡片样式 */
.card {
    background-color: white;
    padding: 24px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    margin-bottom: 24px;
    transition: box-shadow 0.3s ease;
}

.card:hover {
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 2px solid #f0f4f8;
}

.card-header h3 {
    margin-bottom: 0;
    color: #2d3748;
    font-size: 20px;
    font-weight: 600;
}

.card-header h3 i {
    margin-right: 8px;
    color: #667eea;
}

/* 统计卡片样式 */
.stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
    margin-bottom: 32px;
}

.stat-card {
    background: linear-gradient(135deg, #ffffff 0%, #f7fafc 100%);
    padding: 32px 24px;
    border-radius: 20px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
    text-align: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(0, 0, 0, 0.05);
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.1);
}

.stat-card:hover::before {
    transform: scaleX(1);
}

.stat-card .stat-icon {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 32px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.stat-card:hover .stat-icon {
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
}

.stat-card .stat-icon.prescriptions {
    background: linear-gradient(135deg, #e6fffa 0%, #b2f5ea 100%);
    color: #007a7e;
}

.stat-card .stat-icon.total-amount {
    background: linear-gradient(135deg, #e6f7ff 0%, #bae7ff 100%);
    color: #1890ff;
}

.stat-card .stat-icon.average-amount {
    background: linear-gradient(135deg, #fff7e6 0%, #ffe58f 100%);
    color: #fa8c16;
}

.stat-card .stat-label {
    font-size: 14px;
    color: #6b7280;
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 500;
}

.stat-card .stat-value {
    font-size: 32px;
    font-weight: 800;
    color: #2d3748;
    margin: 0;
    line-height: 1.2;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* 表格样式 */
.table-container {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

table th,
table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

table th {
    background-color: #f7fafc;
    font-weight: bold;
    color: #4a5568;
}

table tr:hover {
    background-color: #f7fafc;
}

/* 按钮样式 */
.btn {
    padding: 8px 15px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.3s;
    text-decoration: none;
    display: inline-block;
}

.btn-primary {
    background-color: #667eea;
    color: white;
}

.btn-primary:hover {
    background-color: #5a67d8;
}

.btn-secondary {
    background-color: #48bb78;
    color: white;
}

.btn-secondary:hover {
    background-color: #38a169;
}

.btn-danger {
    background-color: #e53e3e;
    color: white;
}

.btn-danger:hover {
    background-color: #c53030;
}

.btn-warning {
    background-color: #ed8936;
    color: white;
}

.btn-warning:hover {
    background-color: #dd6b20;
}

/* 页面内容 */
.page-content {
    max-width: 1200px;
    margin: 0 auto;
}

/* 表单样式 */
.form-container {
    max-width: 100%;
    margin: 0 auto;
}

.prescription-form {
    width: 100%;
}

.form-section {
    background-color: #f8fafc;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 24px;
    border: 1px solid #e2e8f0;
}

.form-section h4 {
    margin-bottom: 16px;
    color: #2d3748;
    font-size: 16px;
    font-weight: 600;
    display: flex;
    align-items: center;
}

.form-section h4 i {
    margin-right: 8px;
    color: #667eea;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.section-header h4 {
    margin-bottom: 0;
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #4a5568;
    font-size: 14px;
    display: flex;
    align-items: center;
}

.form-group label i {
    margin-right: 6px;
    color: #667eea;
    font-size: 12px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 14px;
    color: #2d3748;
    background-color: #ffffff;
    transition: all 0.3s ease;
    outline: none;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

.form-row {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}

.form-row .form-group {
    flex: 1;
    margin-bottom: 0;
}

/* 处方项目样式 */
#prescription-items {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.prescription-item {
    background-color: #ffffff;
    border-radius: 8px;
    padding: 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    border: 1px solid #e2e8f0;
    overflow: hidden;
    transition: all 0.3s ease;
}

.prescription-item:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
    transform: translateY(-1px);
}

.item-header {
    background-color: #f7fafc;
    padding: 16px 20px;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.item-header h5 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: #2d3748;
}

.item-content {
    padding: 20px;
}

/* 按钮样式 */
.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    outline: none;
}

.btn i {
    font-size: 14px;
}

.btn-primary {
    background-color: #667eea;
    color: white;
}

.btn-primary:hover {
    background-color: #5a67d8;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.btn-secondary {
    background-color: #48bb78;
    color: white;
}

.btn-secondary:hover {
    background-color: #38a169;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(72, 187, 120, 0.3);
}

.btn-danger {
    background-color: #e53e3e;
    color: white;
}

.btn-danger:hover:not(:disabled) {
    background-color: #c53030;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(229, 62, 62, 0.3);
}

.btn-warning {
    background-color: #ed8936;
    color: white;
}

.btn-warning:hover {
    background-color: #dd6b20;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(237, 137, 54, 0.3);
}

.btn-danger.disabled,
.btn-danger:disabled {
    background-color: #e2e8f0;
    color: #a0aec0;
    cursor: not-allowed;
    opacity: 0.6;
}

/* 表单操作按钮 */
.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 32px;
    padding-top: 20px;
    border-top: 2px solid #f0f4f8;
}

/* 表单错误样式 */
.form-group input.error,
.form-group select.error,
.form-group textarea.error {
    border-color: #e53e3e;
    box-shadow: 0 0 0 3px rgba(229, 62, 62, 0.1);
}

.form-group input.focused,
.form-group select.focused,
.form-group textarea.focused {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* 状态标签 */
.status {
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: bold;
}

.status-draft {
    background-color: #e2e8f0;
    color: #4a5568;
}

.status-pending {
    background-color: #fed7d7;
    color: #c53030;
}

.status-approved {
    background-color: #c6f6d5;
    color: #22543d;
}

.status-outbound {
    background-color: #bee3f8;
    color: #2b6cb0;
}

.status-settled {
    background-color: #faf089;
    color: #744210;
}

/* 支付方式统计 */
.payment-methods {
    margin-bottom: 32px;
    padding: 24px;
    background: linear-gradient(135deg, #ffffff 0%, #f7fafc 100%);
    border-radius: 16px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.payment-methods h4 {
    margin-bottom: 20px;
    color: #2d3748;
    font-size: 18px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.payment-methods h4::before {
    content: '';
    display: inline-block;
    width: 4px;
    height: 24px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 2px;
}

/* Billing页面特定样式 */

/* 统计卡片样式 */
.stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.stat-item {
    background: linear-gradient(135deg, #ffffff 0%, #f7fafc 100%);
    padding: 24px;
    border-radius: 16px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.stat-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.stat-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.stat-item h4 {
    color: #4a5568;
    font-size: 16px;
    font-weight: 500;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.stat-item h4::before {
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    font-size: 18px;
    color: #667eea;
}

.stat-item:nth-child(1) h4::before {
    content: '\f017'; /* 时钟图标 */
}

.stat-item:nth-child(2) h4::before {
    content: '\f201'; /* 处方图标 */
}

.stat-item:nth-child(3) h4::before {
    content: '\f3d1'; /* 美元图标 */
}

.stat-number {
    font-size: 36px;
    font-weight: 700;
    color: #2d3748;
    line-height: 1;
    margin-bottom: 8px;
}

/* 为不同的统计项添加不同的主题色 */
.stat-item:nth-child(1) {
    border-left: 4px solid #3182ce;
}

.stat-item:nth-child(2) {
    border-left: 4px solid #38a169;
}

.stat-item:nth-child(3) {
    border-left: 4px solid #d69e2e;
}

.stat-item:nth-child(1) .stat-number {
    color: #3182ce;
}

.stat-item:nth-child(2) .stat-number {
    color: #38a169;
}

.stat-item:nth-child(3) .stat-number {
    color: #d69e2e;
}

/* 医生仪表盘统计卡片样式 */
.stats-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
    margin: 24px 0;
}

.stat-card {
    background: linear-gradient(135deg, #ffffff 0%, #f7fafc 100%);
    padding: 28px;
    border-radius: 20px;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(0, 0, 0, 0.05);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    gap: 20px;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.12);
}

.stat-card:hover::before {
    transform: scaleX(1);
}

.stat-card .stat-icon {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    flex-shrink: 0;
}

.stat-card:hover .stat-icon {
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
}

.stat-card .stat-icon.pending {
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
    color: #dc2626;
}

.stat-card .stat-icon.today {
    background: linear-gradient(135deg, #dcfce7 0%, #bbf7d0 100%);
    color: #16a34a;
}

.stat-card .stat-icon.month {
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
    color: #2563eb;
}

.stat-card .stat-icon.patients {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    color: #d97706;
}

.stat-card .stat-content {
    flex: 1;
    min-width: 0;
}

.stat-card .stat-title {
    font-size: 14px;
    color: #6b7280;
    margin: 0 0 8px 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 500;
}

.stat-card .stat-number {
    font-size: 36px;
    font-weight: 800;
    color: #2d3748;
    margin: 0 0 8px 0;
    line-height: 1.2;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-card .stat-change {
    display: flex;
    align-items: center;
    font-size: 13px;
    font-weight: 500;
    color: #6b7280;
    margin: 0;
}

.stat-card .stat-change.positive {
    color: #16a34a;
}

.stat-card .stat-change.negative {
    color: #dc2626;
}

.stat-card .change-arrow {
    margin-right: 4px;
    font-size: 16px;
}

.stat-card .change-arrow.up {
    color: #16a34a;
}

.stat-card .change-arrow.down {
    color: #dc2626;
}

/* 多条件搜索表单 */
.advanced-search {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 24px;
    padding: 20px;
    background: white;
    border-radius: 16px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.advanced-search .form-group {
    margin-bottom: 0;
}

/* 报表明细 */
.table-container {
    overflow-x: auto;
    background: linear-gradient(135deg, #ffffff 0%, #f7fafc 100%);
    border-radius: 16px;
    padding: 16px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.billing-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(102, 126, 234, 0.1);
}

.billing-table th {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    font-weight: 600;
    padding: 20px 24px;
    text-align: left;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: none;
    position: sticky;
    top: 0;
    z-index: 10;
    transition: all 0.3s ease;
}

.billing-table th:hover {
    background: linear-gradient(135deg, #5a67d8 0%, #6b46c1 100%);
}

.billing-table td {
    padding: 20px 24px;
    border-bottom: 1px solid #f0f4f8;
    font-size: 15px;
    color: #2d3748;
    transition: all 0.2s ease;
    vertical-align: middle;
}

.billing-table tbody tr {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-left: 4px solid transparent;
}

.billing-table tbody tr:last-child td {
    border-bottom: none;
}

.billing-table tbody tr:hover {
    background-color: #f7fafc;
    transform: translateX(6px);
    border-left-color: #667eea;
    box-shadow: -4px 0 16px rgba(102, 126, 234, 0.15);
}

/* 金额列样式 */
.billing-table .amount {
    text-align: right;
    font-weight: 700;
    color: #667eea;
    font-size: 18px;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
    padding: 8px 16px;
    border-radius: 8px;
    margin: -8px -16px;
    display: inline-block;
    min-width: 100px;
}

/* 总计行样式 */
.billing-table tbody tr:last-child {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    font-weight: 800;
    font-size: 16px;
    color: #2d3748;
    border-left-color: #f59e0b;
}

.billing-table tbody tr:last-child td {
    padding: 24px;
    border-top: 2px solid #667eea;
}

.billing-table tbody tr:last-child .amount {
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    color: white;
    font-size: 22px;
    padding: 12px 20px;
    min-width: 120px;
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
}

/* 日期列样式 */
.billing-table .date,
.billing-table .date-time {
    color: #6b7280;
    font-family: 'Courier New', monospace;
}

/* 账单编号和处方编号样式 */
.billing-table td:first-child,
.billing-table td:nth-child(2) {
    font-weight: 600;
    color: #4a5568;
}

/* 操作按钮样式 */
.btn-info.btn-sm {
    padding: 6px 12px;
    font-size: 12px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.btn-info.btn-sm:hover {
    background: linear-gradient(135deg, #5a67d8 0%, #6b46c1 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

/* 处方基本信息卡片 */
.billing-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
    margin-bottom: 32px;
    padding: 20px;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    border-radius: 20px;
    box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.05);
}

.billing-card {
    background: linear-gradient(135deg, #ffffff 0%, #f7fafc 100%);
    padding: 28px;
    border-radius: 18px;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(102, 126, 234, 0.1);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.billing-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.billing-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.12);
    border-color: rgba(102, 126, 234, 0.3);
}

.billing-card h4 {
    margin-bottom: 12px;
    font-size: 14px;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.billing-card h4::before {
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    font-size: 16px;
    color: #667eea;
}

/* 根据不同信息类型添加不同图标 */
.billing-card:nth-child(1) h4::before { content: '\f15b'; } /* 处方编号图标 */
.billing-card:nth-child(2) h4::before { content: '\f007'; } /* 患者姓名图标 */
.billing-card:nth-child(3) h4::before { content: '\f0f0'; } /* 医生姓名图标 */
.billing-card:nth-child(4) h4::before { content: '\f073'; } /* 出库日期图标 */
.billing-card:nth-child(5) h4::before { content: '\f024'; } /* 备注图标 */

.billing-card p {
    margin: 0;
    font-size: 22px;
    font-weight: 700;
    color: #2d3748;
    line-height: 1.4;
}

.billing-card p.amount {
    color: #667eea;
    font-size: 28px;
}

/* 为不同卡片添加不同主题色 */
.billing-card:nth-child(1)::before { background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); }
.billing-card:nth-child(2)::before { background: linear-gradient(135deg, #38a169 0%, #2f855a 100%); }
.billing-card:nth-child(3)::before { background: linear-gradient(135deg, #d69e2e 0%, #b7791f 100%); }
.billing-card:nth-child(4)::before { background: linear-gradient(135deg, #e53e3e 0%, #c53030 100%); }
.billing-card:nth-child(5)::before { background: linear-gradient(135deg, #805ad5 0%, #6b46c1 100%); }

/* 支付方式标签 */
.payment-method {
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.payment-method:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.payment-method.cash {
    background: linear-gradient(135deg, #c6f6d5 0%, #9ae6b4 100%);
    color: #22543d;
}

.payment-method.alipay {
    background: linear-gradient(135deg, #bee3f8 0%, #90cdf4 100%);
    color: #2b6cb0;
}

.payment-method.wechat {
    background: linear-gradient(135deg, #f6e05e 0%, #faf089 100%);
    color: #744210;
}

.payment-method.credit_card {
    background: linear-gradient(135deg, #fed7d7 0%, #feb2b2 100%);
    color: #c53030;
}

.payment-method.insurance {
    background: linear-gradient(135deg, #e9d8fd 0%, #d6bcfa 100%);
    color: #553c9a;
}

/* 响应式设计 */
@media (max-width: 1024px) {
    .form-row {
        flex-direction: column;
    }
    
    .advanced-search {
        grid-template-columns: 1fr;
    }
    
    .billing-info {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    }
    
    .stat-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: 16px;
    }
    
    .stat-card {
        padding: 20px;
    }
    
    .stat-card .stat-icon {
        width: 60px;
        height: 60px;
        font-size: 28px;
    }
    
    .stat-card .stat-value {
        font-size: 24px;
    }
}

@media (max-width: 768px) {
    .dashboard {
        flex-direction: column;
    }
    
    .sidebar {
        width: 100%;
        height: auto;
        position: relative;
        box-shadow: 0 2px 15px rgba(0, 0, 0, 0.2);
    }
    
    .sidebar-menu {
        display: flex;
        overflow-x: auto;
        padding: 0 10px;
        flex-wrap: nowrap;
    }
    
    .sidebar-menu li {
        margin-bottom: 0;
        margin-right: 8px;
    }
    
    .sidebar-menu li a {
        white-space: nowrap;
        padding: 12px 16px;
        border-radius: 8px;
        border-left: none;
    }
    
    .sidebar-menu li a.active {
        border-left: none;
    }
    
    .main-content {
        padding: 15px;
    }
    
    .card {
        padding: 16px;
    }
    
    .form-section {
        padding: 16px;
    }
    
    .item-content {
        padding: 16px;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
        justify-content: center;
    }
    
    .code-group {
        flex-direction: column;
    }
    
    .stat-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .payment-methods {
        padding: 16px;
    }
    
    .billing-table th,
    .billing-table td {
        padding: 12px 10px;
        font-size: 12px;
    }
    
    .table-container {
        padding: 8px;
    }
}

@media (max-width: 480px) {
    .sidebar-header h2 {
        font-size: 18px;
    }
    
    .card-header h3 {
        font-size: 18px;
    }
    
    .form-group label {
        font-size: 13px;
    }
    
    .form-group input,
    .form-group select,
    .form-group textarea {
        padding: 10px 14px;
        font-size: 13px;
    }
}