/* ========================================
   远辰智联OA管理系统 - 现代化方形设计
   主色调：深蓝 + 橙色点缀
   ======================================== */

/* 全局重置与基础样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Microsoft YaHei', sans-serif;
    background: linear-gradient(135deg, #f5f7fa 0%, #e4e8ec 100%);
    min-height: 100vh;
    color: #2c3e50;
    line-height: 1.6;
}

/* 容器 */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

/* ========================================
   登录页面样式
   ======================================== */
.login-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #1a2a3a 0%, #2c3e50 50%, #34495e 100%);
    position: relative;
    overflow: hidden;
}

.login-wrapper::before {
    content: '';
    position: absolute;
    width: 600px;
    height: 600px;
    background: rgba(52, 152, 219, 0.1);
    top: -200px;
    right: -200px;
    clip-path: polygon(25% 0%, 100% 0%, 75% 100%, 0% 100%);
}

.login-wrapper::after {
    content: '';
    position: absolute;
    width: 400px;
    height: 400px;
    background: rgba(230, 126, 34, 0.08);
    bottom: -100px;
    left: -100px;
    clip-path: polygon(0% 0%, 100% 0%, 80% 100%, 0% 80%);
}

.login-container {
    background: rgba(255, 255, 255, 0.98);
    width: 480px;
    padding: 50px 40px;
    position: relative;
    z-index: 10;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.3);
    clip-path: polygon(0 0, 100% 0, 95% 100%, 5% 100%);
}

.login-header {
    text-align: center;
    margin-bottom: 35px;
}

.login-header h1 {
    font-size: 26px;
    font-weight: 700;
    color: #1a2a3a;
    letter-spacing: 3px;
    margin-bottom: 8px;
}

.login-header p {
    color: #7f8c8d;
    font-size: 14px;
}

.login-tabs {
    display: flex;
    gap: 15px;
    margin-bottom: 30px;
}

.tab-btn {
    flex: 1;
    padding: 12px 24px;
    border: none;
    background: #ecf0f1;
    color: #7f8c8d;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    clip-path: polygon(5% 0, 95% 0, 100% 100%, 0 100%);
}

.tab-btn.active,
.tab-btn:hover {
    background: #1a2a3a;
    color: #fff;
}

.form-group {
    margin-bottom: 22px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #34495e;
    font-size: 14px;
}

.form-control {
    width: 100%;
    padding: 14px 18px;
    border: 2px solid #e0e6ed;
    background: #f8f9fa;
    font-size: 15px;
    transition: all 0.3s ease;
    outline: none;
    clip-path: polygon(10px 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%, 0 10px);
}

.form-control:focus {
    border-color: #1a2a3a;
    background: #fff;
    box-shadow: 0 0 0 4px rgba(26, 42, 58, 0.08);
}

.btn-primary {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, #1a2a3a 0%, #2c3e50 100%);
    color: #fff;
    border: none;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    letter-spacing: 2px;
    clip-path: polygon(15px 0, 100% 0, 100% calc(100% - 15px), calc(100% - 15px) 100%, 0 100%, 0 15px);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(26, 42, 58, 0.3);
}

/* ========================================
   后台布局
   ======================================== */
.admin-layout {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 260px;
    background: linear-gradient(180deg, #1a2a3a 0%, #2c3e50 100%);
    color: #fff;
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    overflow-y: auto;
    z-index: 100;
    clip-path: polygon(0 0, 95% 0, 90% 100%, 0 100%);
}

.sidebar-header {
    padding: 28px 24px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.sidebar-header h2 {
    font-size: 17px;
    font-weight: 700;
    letter-spacing: 2px;
    line-height: 1.5;
}

.sidebar-header .subtitle {
    font-size: 11px;
    color: rgba(255,255,255,0.5);
    margin-top: 5px;
    letter-spacing: 1px;
}

.sidebar-menu {
    list-style: none;
    padding: 15px 0;
}

.menu-item {
    margin: 3px 15px;
}

.menu-link {
    display: flex;
    align-items: center;
    padding: 13px 18px;
    color: rgba(255,255,255,0.7);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    border-left: 3px solid transparent;
    clip-path: polygon(8px 0, 100% 0, 100% 100%, 0 100%, 0 8px);
}

.menu-link:hover,
.menu-link.active {
    background: rgba(255,255,255,0.1);
    color: #fff;
    border-left-color: #e67e22;
}

.menu-icon {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,0.05);
    margin-right: 12px;
    font-size: 14px;
    clip-path: polygon(4px 0, 100% 0, 96% 100%, 0 100%);
}

.main-content {
    flex: 1;
    margin-left: 260px;
    padding: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.top-bar {
    background: #fff;
    padding: 18px 35px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 15px rgba(0,0,0,0.06);
    position: sticky;
    top: 0;
    z-index: 50;
}

.top-bar h3 {
    font-size: 19px;
    color: #1a2a3a;
    font-weight: 700;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.user-avatar {
    width: 42px;
    height: 42px;
    background: linear-gradient(135deg, #1a2a3a, #e67e22);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 700;
    font-size: 15px;
    clip-path: polygon(8px 0, 100% 0, 92% 100%, 0 100%);
}

.logout-btn {
    padding: 9px 22px;
    background: #e74c3c;
    color: #fff;
    border: none;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.3s ease;
    text-decoration: none;
    clip-path: polygon(6px 0, 100% 0, 94% 100%, 0 100%);
}

.logout-btn:hover {
    background: #c0392b;
    transform: translateY(-1px);
}

.content-area {
    flex: 1;
    padding: 30px 35px;
}

/* ========================================
   卡片组件
   ======================================== */
.card {
    background: #fff;
    border-radius: 0;
    box-shadow: 0 4px 20px rgba(0,0,0,0.07);
    margin-bottom: 25px;
    overflow: hidden;
    clip-path: polygon(0 0, 98% 0, 100% 100%, 2% 100%);
}

.card-header {
    padding: 20px 28px;
    border-bottom: 2px solid #f0f2f5;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(135deg, #fafbfc 0%, #f5f7fa 100%);
}

.card-header h4 {
    font-size: 17px;
    font-weight: 700;
    color: #1a2a3a;
    letter-spacing: 1px;
}

.card-body {
    padding: 28px;
}

/* ========================================
   表格样式
   ======================================== */
.table-responsive {
    overflow-x: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table thead {
    background: linear-gradient(135deg, #1a2a3a 0%, #2c3e50 100%);
}

.data-table th {
    padding: 15px 18px;
    text-align: left;
    color: #fff;
    font-weight: 600;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.data-table td {
    padding: 14px 18px;
    border-bottom: 1px solid #eee;
    font-size: 14px;
    color: #555;
}

.data-table tbody tr:hover {
    background: #f8f9fa;
}

.data-table tbody tr.reimbursed {
    background: #ffeaea !important;
    color: #c0392b;
}

.data-table tbody tr.reimbursed td {
    color: #c0392b;
    font-weight: 600;
}

/* ========================================
   按钮组
   ======================================== */
.btn {
    padding: 10px 22px;
    border: none;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    clip-path: polygon(6px 0, 100% 0, 94% 100%, 0 100%);
}

.btn-success {
    background: #27ae60;
    color: #fff;
}

.btn-success:hover {
    background: #219a52;
    transform: translateY(-1px);
}

.btn-warning {
    background: #e67e22;
    color: #fff;
}

.btn-warning:hover {
    background: #d35400;
    transform: translateY(-1px);
}

.btn-danger {
    background: #e74c3c;
    color: #fff;
}

.btn-danger:hover {
    background: #c0392b;
    transform: translateY(-1px);
}

.btn-info {
    background: #2980b9;
    color: #fff;
}

.btn-info:hover {
    background: #21618c;
    transform: translateY(-1px);
}

.btn-sm {
    padding: 7px 15px;
    font-size: 12px;
}

.btn-group {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

/* ========================================
   表单增强
   ======================================== */
.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

.checkbox-group {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 8px;
}

.checkbox-group input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #1a2a3a;
}

select.form-control {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%232c3e50' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 15px center;
    padding-right: 40px;
}

textarea.form-control {
    resize: vertical;
    min-height: 100px;
}

/* ========================================
   统计卡片
   ======================================== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 22px;
    margin-bottom: 30px;
}

.stat-card {
    background: #fff;
    padding: 28px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.07);
    position: relative;
    overflow: hidden;
    clip-path: polygon(0 0, 97% 0, 100% 100%, 3% 100%);
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 80px;
    height: 80px;
    opacity: 0.08;
}

.stat-card:nth-child(1)::before { background: #1a2a3a; }
.stat-card:nth-child(2)::before { background: #e67e22; }
.stat-card:nth-child(3)::before { background: #27ae60; }
.stat-card:nth-child(4)::before { background: #2980b9; }

.stat-number {
    font-size: 36px;
    font-weight: 800;
    color: #1a2a3a;
    line-height: 1;
    margin-bottom: 8px;
}

.stat-label {
    font-size: 13px;
    color: #7f8c8d;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* ========================================
   底部版权
   ======================================== */
.site-footer {
    background: linear-gradient(135deg, #1a2a3a 0%, #2c3e50 100%);
    color: rgba(255,255,255,0.7);
    padding: 35px 35px 20px;
    margin-top: auto;
    clip-path: polygon(3% 0, 100% 0, 97% 100%, 0 100%);
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    margin-bottom: 20px;
}

.footer-brand h4 {
    color: #fff;
    font-size: 18px;
    font-weight: 700;
    letter-spacing: 2px;
    margin-bottom: 5px;
}

.footer-brand p {
    font-size: 12px;
    color: rgba(255,255,255,0.5);
}

.footer-links a {
    color: rgba(255,255,255,0.6);
    text-decoration: none;
    font-size: 13px;
    margin-left: 25px;
    transition: color 0.3s;
}

.footer-links a:hover {
    color: #e67e22;
}

.footer-copyright {
    text-align: center;
    font-size: 13px;
    line-height: 2;
}

.footer-copyright a {
    color: #e67e22;
    text-decoration: none;
}

.footer-copyright a:hover {
    text-decoration: underline;
}

/* ========================================
   成员端样式
   ======================================== */
.member-layout .sidebar {
    background: linear-gradient(180deg, #2c3e50 0%, #1a2a3a 100%);
}

.member-dashboard {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
    margin-bottom: 30px;
}

.quick-action {
    background: #fff;
    padding: 35px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.07);
    text-align: center;
    transition: all 0.3s ease;
    clip-path: polygon(0 0, 96% 0, 100% 100%, 4% 100%);
    text-decoration: none;
    color: inherit;
    display: block;
}

.quick-action:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0,0,0,0.12);
}

.action-icon {
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, #1a2a3a, #2c3e50);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 28px;
    color: #fff;
    clip-path: polygon(15% 0, 100% 0, 85% 100%, 0 100%);
}

.action-title {
    font-size: 18px;
    font-weight: 700;
    color: #1a2a3a;
    margin-bottom: 8px;
}

.action-desc {
    font-size: 13px;
    color: #7f8c8d;
}

/* ========================================
   状态标签
   ======================================== */
.status-badge {
    display: inline-block;
    padding: 5px 14px;
    font-size: 12px;
    font-weight: 700;
    border-radius: 0;
    clip-path: polygon(4px 0, 100% 0, 96% 100%, 0 100%);
}

.status-pending {
    background: #fef3cd;
    color: #856404;
}

.status-approved {
    background: #d4edda;
    color: #155724;
}

.status-rejected {
    background: #f8d7da;
    color: #721c24;
}

/* ========================================
   提示消息
   ======================================== */
.alert {
    padding: 15px 22px;
    margin-bottom: 20px;
    border-left: 4px solid;
    font-size: 14px;
    clip-path: polygon(8px 0, 100% 0, 100% 100%, 0 100%);
}

.alert-success {
    background: #d4edda;
    border-color: #27ae60;
    color: #155724;
}

.alert-error {
    background: #f8d7da;
    border-color: #e74c3c;
    color: #721c24;
}

.alert-warning {
    background: #fff3cd;
    border-color: #e67e22;
    color: #856404;
}

/* ========================================
   分页
   ======================================== */
.pagination {
    display: flex;
    gap: 5px;
    justify-content: center;
    margin-top: 25px;
}

.pagination a,
.pagination span {
    padding: 10px 16px;
    border: 2px solid #e0e6ed;
    color: #555;
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.3s;
    clip-path: polygon(5px 0, 100% 0, 95% 100%, 0 100%);
}

.pagination a:hover,
.pagination .active {
    background: #1a2a3a;
    color: #fff;
    border-color: #1a2a3a;
}

/* ========================================
   响应式
   ======================================== */
@media (max-width: 1024px) {
    .sidebar {
        width: 220px;
    }
    .main-content {
        margin-left: 220px;
    }
}

@media (max-width: 768px) {
    .login-container {
        width: 92%;
        padding: 35px 25px;
    }
    
    .sidebar {
        transform: translateX(-100%);
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-content {
        flex-direction: column;
        text-align: center;
    }
}

/* ========================================
   动画效果
   ======================================== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.card,
.stat-card,
.quick-action {
    animation: fadeInUp 0.5s ease forwards;
}

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-box {
    background: #fff;
    width: 90%;
    max-width: 650px;
    max-height: 85vh;
    overflow-y: auto;
    padding: 35px;
    box-shadow: 0 30px 80px rgba(0,0,0,0.3);
    clip-path: polygon(0 0, 99% 0, 97% 100%, 3% 100%);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f0f2f5;
}

.modal-header h3 {
    font-size: 20px;
    color: #1a2a3a;
    font-weight: 700;
}

.close-modal {
    background: none;
    border: none;
    font-size: 26px;
    cursor: pointer;
    color: #999;
    transition: color 0.3s;
}

.close-modal:hover {
    color: #e74c3c;
}
