/* 现代化UI样式 - 蓝绿色主题 */

/* 渐变背景 */
:root {
    --gradient-primary: linear-gradient(135deg, #0ea5e9 0%, #0284c7 100%);
    --gradient-success: linear-gradient(135deg, #10b981 0%, #059669 100%);
    --gradient-danger: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    --gradient-warning: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    --gradient-info: linear-gradient(135deg, #0ea5e9 0%, #06b6d4 100%);
    
    --shadow-card: 0 10px 40px rgba(0,0,0,0.1);
    --shadow-button: 0 4px 15px rgba(14, 165, 233, 0.4);
    --radius-lg: 20px;
    --radius-md: 12px;
    --radius-sm: 8px;
}

/* 页面背景 */
body {
    background: linear-gradient(180deg, #f8fafc 0%, #e0f2fe 100%);
    min-height: 100vh;
}

/* 主卡片 */
.main-card {
    background: var(--gradient-primary);
    border-radius: var(--radius-lg);
    padding: 24px;
    margin: 16px;
    color: white;
    box-shadow: var(--shadow-card);
    position: relative;
    overflow: hidden;
}

.main-card::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    pointer-events: none;
}

/* 卡片头部 */
.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-avatar {
    width: 44px;
    height: 44px;
    background: rgba(255,255,255,0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.user-name {
    font-size: 18px;
    font-weight: 600;
}

.user-role {
    font-size: 12px;
    opacity: 0.8;
}

.btn-logout {
    background: rgba(255,255,255,0.2);
    border: none;
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-logout:hover {
    background: rgba(255,255,255,0.3);
}

/* 统计网格 */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
    margin-bottom: 20px;
}

.stat-item {
    background: rgba(255,255,255,0.2);
    border-radius: var(--radius-md);
    padding: 18px 16px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.3);
    transition: all 0.3s;
}

.stat-item:hover {
    background: rgba(255,255,255,0.25);
    transform: translateY(-2px);
}

.stat-icon {
    font-size: 24px;
    margin-bottom: 10px;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.1));
}

.stat-label {
    font-size: 13px;
    opacity: 0.95;
    margin-bottom: 6px;
    font-weight: 500;
}

.stat-value {
    font-size: 24px;
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* 余额显示 */
.balance-display {
    background: rgba(255,255,255,0.1);
    border-radius: var(--radius-md);
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 16px;
}

.balance-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 16px;
}

.balance-amount {
    font-size: 32px;
    font-weight: 700;
}

.balance-negative {
    color: #ffeb3b;
}

/* 待审核提示 */
.pending-alert {
    background: rgba(255,193,7,0.2);
    border-radius: var(--radius-sm);
    padding: 12px 16px;
    margin-top: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
}

/* 操作按钮区 */
.action-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    padding: 16px;
}

.action-card {
    background: white;
    border-radius: var(--radius-md);
    padding: 16px 12px;
    text-align: center;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
    cursor: pointer;
    transition: all 0.3s;
    border: none;
}

.action-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(0,0,0,0.12);
}

.action-card:active {
    transform: scale(0.98);
}

.action-icon {
    width: 44px;
    height: 44px;
    margin: 0 auto 8px;
    background: var(--gradient-primary);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
}

.action-card.expense .action-icon {
    background: var(--gradient-danger);
}

.action-card.income .action-icon {
    background: var(--gradient-success);
}

.action-card.transfer .action-icon {
    background: var(--gradient-info);
}

.action-text {
    font-size: 13px;
    font-weight: 600;
    color: #333;
}

/* 内容区域 */
.content-section {
    padding: 0 16px 100px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.section-title {
    font-size: 18px;
    font-weight: 700;
    color: #333;
}

.section-link {
    color: #0ea5e9;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
}

/* 筛选标签 */
.filter-pills {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
    overflow-x: auto;
    padding-bottom: 8px;
}

.filter-pill {
    padding: 8px 20px;
    border-radius: 20px;
    border: none;
    background: white;
    color: #666;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
    white-space: nowrap;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.filter-pill.active {
    background: var(--gradient-primary);
    color: white;
    box-shadow: var(--shadow-button);
}

/* 记录列表 */
.record-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.record-card {
    background: white;
    border-radius: var(--radius-md);
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.05);
    transition: all 0.3s;
}

.record-card:hover {
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.record-card.pending {
    border-left: 4px solid #ff9800;
    background: #fffbf5;
}

.record-card.rejected {
    border-left: 4px solid #f44336;
    background: #fff5f5;
    opacity: 0.7;
}

.record-icon-wrap {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

.record-icon-wrap.expense {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a5a 100%);
}

.record-icon-wrap.income {
    background: linear-gradient(135deg, #51cf66 0%, #40c057 100%);
}

.record-icon-wrap.quota_in {
    background: linear-gradient(135deg, #339af0 0%, #228be6 100%);
}

.record-content {
    flex: 1;
    min-width: 0;
}

.record-title {
    font-size: 15px;
    font-weight: 600;
    color: #333;
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.record-meta {
    font-size: 12px;
    color: #999;
}

.record-amount {
    font-size: 18px;
    font-weight: 700;
    text-align: right;
}

.record-amount.expense {
    color: #f44336;
}

.record-amount.income {
    color: #4CAF50;
}

.record-amount.quota_in {
    color: #2196F3;
}

/* 状态标签 */
.status-tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 500;
}

.status-tag.pending {
    background: #fff3e0;
    color: #ff9800;
}

.status-tag.approved {
    background: #e8f5e9;
    color: #4CAF50;
}

.status-tag.rejected {
    background: #ffebee;
    color: #f44336;
}

/* 底部导航 */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    display: flex;
    justify-content: space-around;
    padding: 12px 0 20px;
    box-shadow: 0 -4px 20px rgba(0,0,0,0.08);
    border-radius: 24px 24px 0 0;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: #999;
    padding: 8px 20px;
    transition: all 0.3s;
}

.nav-item.active {
    color: #0ea5e9;
}

.nav-icon {
    font-size: 24px;
    margin-bottom: 4px;
}

.nav-label {
    font-size: 12px;
    font-weight: 500;
}

/* 弹窗样式 */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 1000;
    backdrop-filter: blur(4px);
}

.modal-overlay.show {
    display: flex;
    align-items: flex-end;
    justify-content: center;
}

.modal-sheet {
    background: white;
    border-radius: 24px 24px 0 0;
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        transform: translateY(100%);
    }
    to {
        transform: translateY(0);
    }
}

.modal-handle {
    width: 40px;
    height: 4px;
    background: #ddd;
    border-radius: 2px;
    margin: 12px auto;
}

.modal-header {
    padding: 16px 20px;
    border-bottom: 1px solid #f0f0f0;
}

.modal-title {
    font-size: 18px;
    font-weight: 700;
    text-align: center;
}

.modal-body {
    padding: 20px;
}

.modal-footer {
    padding: 16px 20px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

/* 表单样式 */
.form-field {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
}

.form-input {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid #f0f0f0;
    border-radius: var(--radius-md);
    font-size: 16px;
    transition: all 0.3s;
}

.form-input:focus {
    outline: none;
    border-color: #0ea5e9;
    box-shadow: 0 0 0 4px rgba(14, 165, 233, 0.1);
}

/* 按钮样式 */
.btn-modern {
    padding: 14px 24px;
    border: none;
    border-radius: var(--radius-md);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-modern.primary {
    background: var(--gradient-primary);
    color: white;
    box-shadow: var(--shadow-button);
}

.btn-modern.primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.5);
}

.btn-modern.secondary {
    background: #f5f5f5;
    color: #666;
}

.btn-modern.danger {
    background: var(--gradient-danger);
    color: white;
}

.btn-modern.success {
    background: var(--gradient-success);
    color: white;
}

/* 员工卡片 */
.employee-card-modern {
    background: white;
    border-radius: var(--radius-lg);
    padding: 20px;
    margin-bottom: 16px;
    box-shadow: var(--shadow-card);
}

.employee-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.employee-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.employee-avatar {
    width: 48px;
    height: 48px;
    background: var(--gradient-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 20px;
    font-weight: 600;
}

.employee-name {
    font-size: 16px;
    font-weight: 600;
}

.employee-badge {
    background: #ff9800;
    color: white;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

.employee-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 16px;
}

.employee-stat {
    text-align: center;
    padding: 12px;
    background: #f8f9ff;
    border-radius: var(--radius-sm);
}

.employee-stat-value {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 4px;
}

.employee-stat-label {
    font-size: 12px;
    color: #999;
}

.employee-stat.negative .employee-stat-value {
    color: #f44336;
}

.employee-stat.positive .employee-stat-value {
    color: #4CAF50;
}

/* 待审核卡片 */
.pending-card {
    background: white;
    border-radius: var(--radius-lg);
    padding: 20px;
    margin-bottom: 16px;
    box-shadow: var(--shadow-card);
    border-left: 4px solid #ff9800;
}

.pending-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
}

.pending-user {
    display: flex;
    align-items: center;
    gap: 8px;
}

.pending-avatar {
    width: 36px;
    height: 36px;
    background: var(--gradient-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 14px;
}

.pending-name {
    font-weight: 600;
}

.pending-type {
    font-size: 12px;
    color: #999;
}

.pending-amount {
    font-size: 20px;
    font-weight: 700;
}

.pending-amount.expense {
    color: #f44336;
}

.pending-amount.income {
    color: #4CAF50;
}

.pending-detail {
    font-size: 14px;
    color: #666;
    margin-bottom: 16px;
    padding: 12px;
    background: #f8f9ff;
    border-radius: var(--radius-sm);
}

.pending-actions {
    display: flex;
    gap: 8px;
}

.pending-actions .btn-modern {
    flex: 1;
    padding: 10px 8px;
    font-size: 13px;
}

/* 空状态 */
.empty-state-modern {
    text-align: center;
    padding: 60px 20px;
}

.empty-icon {
    font-size: 64px;
    margin-bottom: 16px;
}

.empty-text {
    font-size: 16px;
    color: #999;
}

/* 标签导航 */
.tab-nav-modern {
    display: flex;
    background: white;
    border-radius: var(--radius-lg);
    padding: 6px;
    margin: 16px;
    box-shadow: var(--shadow-card);
}

.tab-item {
    flex: 1;
    padding: 12px;
    text-align: center;
    border-radius: var(--radius-md);
    font-size: 14px;
    font-weight: 600;
    color: #666;
    cursor: pointer;
    transition: all 0.3s;
}

.tab-item.active {
    background: var(--gradient-primary);
    color: white;
    box-shadow: var(--shadow-button);
}

/* 上传区域 */
.upload-zone {
    border: 2px dashed #ddd;
    border-radius: var(--radius-md);
    padding: 32px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
}

.upload-zone:hover {
    border-color: #0ea5e9;
    background: rgba(14, 165, 233, 0.05);
}

.upload-icon {
    font-size: 48px;
    margin-bottom: 12px;
}

.upload-text {
    font-size: 14px;
    color: #999;
}

/* 图片预览 */
.image-preview-wrap {
    position: relative;
    border-radius: var(--radius-md);
    overflow: hidden;
}

.image-preview-wrap img {
    width: 100%;
    display: block;
}

.image-remove {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 32px;
    height: 32px;
    background: rgba(0,0,0,0.5);
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 18px;
    cursor: pointer;
}

/* 开关按钮样式 */
.switch-container {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 28px;
}

.switch-container input {
    opacity: 0;
    width: 0;
    height: 0;
}

.switch-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: 0.4s;
    border-radius: 28px;
}

.switch-slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: 0.4s;
    border-radius: 50%;
}

.switch-container input:checked + .switch-slider {
    background: var(--gradient-primary);
}

.switch-container input:checked + .switch-slider:before {
    transform: translateX(22px);
}

.switch-container input:focus + .switch-slider {
    box-shadow: 0 0 1px var(--gradient-primary);
}
