/* 重置样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'PingFang SC', 'Microsoft YaHei', 'Helvetica Neue', Arial, sans-serif;
}

/* 全局样式 - 活泼红色主题 */
body {
    background: linear-gradient(135deg, #ff6b6b 0%, #ff8e8e 50%, #ff6b6b 100%);
    min-height: 100vh;
    color: #333;
    line-height: 1.5;
    padding: 12px 0;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 12px;
}

/* 紧凑卡片设计 */
.card {
    background: rgba(255, 255, 255, 0.98);
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 16px;
    box-shadow: 0 6px 20px rgba(255, 107, 107, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.3);
    transition: all 0.3s ease;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 107, 107, 0.3);
}

/* 紧凑头部样式 */
header {
    text-align: center;
    margin-bottom: 20px;
    padding: 20px 15px;
}

.header-content {
    background: linear-gradient(135deg, #ff6b6b 0%, #ff8e8e 100%);
    color: white;
    padding: 20px;
    border-radius: 16px;
    box-shadow: 0 6px 20px rgba(255, 107, 107, 0.3);
}

h1 {
    font-size: 1.5rem;
    margin-bottom: 8px;
    font-weight: 700;
}

.subtitle {
    font-size: 0.9rem;
    opacity: 0.95;
    font-weight: 400;
}

/* 紧凑表单样式 */
.form-group {
    margin-bottom: 20px;
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #2c1810;
    font-size: 0.95rem;
}

input, select, textarea {
    width: 100%;
    padding: 14px;
    border: 2px solid #ffe0e0;
    border-radius: 12px;
    font-size: 16px;
    transition: all 0.3s ease;
    background: #fff;
}

input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: #ff6b6b;
    box-shadow: 0 0 0 3px rgba(255, 107, 107, 0.1);
}

textarea {
    min-height: 100px;
    resize: vertical;
    line-height: 1.5;
}

/* 紧凑按钮组 */
.btn-group {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 8px;
}

button, .btn {
    background: linear-gradient(135deg, #ff6b6b 0%, #ff8e8e 100%);
    color: white;
    border: none;
    padding: 14px 20px;
    border-radius: 12px;
    cursor: pointer;
    font-size: 15px;
    font-weight: 600;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex: 1;
    min-width: 0;
}

button:hover, .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 107, 107, 0.4);
}

button.secondary {
    background: linear-gradient(135deg, #ffa726 0%, #ffb74d 100%);
}

button.reject {
    background: linear-gradient(135deg, #ef5350 0%, #e57373 100%);
}

button.approve {
    background: linear-gradient(135deg, #66bb6a 0%, #81c784 100%);
    color: white;
}

/* 紧凑审批流程 */
.approval-process {
    display: flex;
    justify-content: space-between;
    margin: 25px 0;
    position: relative;
    padding: 0 15px;
}

.approval-process:before {
    content: '';
    position: absolute;
    top: 30px;
    left: 40px;
    right: 40px;
    height: 3px;
    background: linear-gradient(90deg, #ff6b6b, #ff8e8e, #ffa726);
    z-index: 1;
    border-radius: 2px;
}

.step {
    text-align: center;
    flex: 1;
    position: relative;
    z-index: 2;
}

.step-icon {
    width: 60px;
    height: 60px;
    background: #fff5f5;
    border-radius: 50%;
    margin: 0 auto 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: #ff6b6b;
    border: 2px solid #ffe0e0;
    transition: all 0.3s ease;
}

.step.active .step-icon {
    background: linear-gradient(135deg, #ff6b6b 0%, #ff8e8e 100%);
    color: white;
    border-color: #ff6b6b;
    transform: scale(1.1);
}

.step.completed .step-icon {
    background: linear-gradient(135deg, #66bb6a 0%, #81c784 100%);
    color: white;
    border-color: #66bb6a;
}

.step-label {
    font-weight: 600;
    color: #721c24;
    margin-bottom: 6px;
    font-size: 0.85rem;
}

.step-approver, .step-time {
    font-size: 0.75rem;
    color: #666;
    margin-bottom: 2px;
}

/* 紧凑请假条 */
.leave-note {
    background: linear-gradient(135deg, #fff5f5 0%, #ffeaea 100%);
    border: 2px solid #ff6b6b;
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 20px;
}

.leave-header {
    text-align: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #ff6b6b;
}

.leave-header h3 {
    color: #ff6b6b;
    font-size: 1.3rem;
    font-weight: 700;
}

.leave-body p {
    margin-bottom: 12px;
    padding: 8px 0;
    border-bottom: 1px solid #ffe0e0;
    display: flex;
    align-items: center;
    font-size: 0.9rem;
}

.leave-body strong {
    color: #721c24;
    min-width: 80px;
    display: inline-block;
    font-weight: 600;
    font-size: 0.9rem;
}

.leave-footer {
    display: flex;
    justify-content: space-between;
    margin-top: 20px;
    padding-top: 15px;
    border-top: 2px solid #ff6b6b;
    font-size: 0.9rem;
}

/* 紧凑表格 */
.requests-list {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
    font-size: 0.85rem;
}

.requests-list th {
    background: linear-gradient(135deg, #ff6b6b 0%, #ff8e8e 100%);
    color: white;
    padding: 12px 8px;
    text-align: left;
    font-weight: 600;
}

.requests-list td {
    padding: 12px 8px;
    border-bottom: 1px solid #ffe0e0;
    background: white;
}

/* 状态标签 */
.status {
    padding: 6px 12px;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 600;
    display: inline-block;
    text-align: center;
    min-width: 60px;
}

.status.pending {
    background: linear-gradient(135deg, #fff3cd, #ffeaa7);
    color: #856404;
}

.status.approved {
    background: linear-gradient(135deg, #d4edda, #c3e6cb);
    color: #155724;
}

.status.rejected {
    background: linear-gradient(135deg, #f8d7da, #f5c6cb);
    color: #721c24;
}

/* 移动端优先的响应式设计 */
@media (max-width: 768px) {
    body {
        padding: 8px 0;
        background: linear-gradient(135deg, #ff6b6b 0%, #ff8e8e 100%);
    }
    
    .container {
        padding: 0 8px;
    }
    
    .card {
        padding: 16px;
        margin-bottom: 12px;
        border-radius: 14px;
    }
    
    header {
        margin-bottom: 16px;
        padding: 15px 10px;
    }
    
    .header-content {
        padding: 16px;
    }
    
    h1 {
        font-size: 1.3rem;
    }
    
    .subtitle {
        font-size: 0.85rem;
    }
    
    .approval-process {
        flex-direction: column;
        gap: 20px;
        margin: 20px 0;
        padding: 0;
    }
    
    .approval-process:before {
        display: none;
    }
    
    .step {
        display: flex;
        align-items: center;
        text-align: left;
        gap: 15px;
        padding: 12px;
        background: rgba(255, 255, 255, 0.5);
        border-radius: 12px;
    }
    
    .step-icon {
        width: 50px;
        height: 50px;
        margin: 0;
        font-size: 18px;
        flex-shrink: 0;
    }
    
    .step-content {
        flex: 1;
    }
    
    .btn-group {
        flex-direction: column;
        gap: 10px;
    }
    
    button, .btn {
        padding: 14px;
        font-size: 15px;
    }
    
    .leave-note {
        padding: 16px;
    }
    
    .leave-body p {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }
    
    .leave-body strong {
        min-width: auto;
    }
    
    .leave-footer {
        flex-direction: column;
        gap: 15px;
    }
    
    /* 表格在移动端改为卡片式 */
    .requests-list {
        display: block;
    }
    
    .requests-list thead {
        display: none;
    }
    
    .requests-list tbody {
        display: flex;
        flex-direction: column;
        gap: 12px;
    }
    
    .requests-list tr {
        display: block;
        background: white;
        border-radius: 12px;
        padding: 16px;
        box-shadow: 0 4px 12px rgba(255, 107, 107, 0.1);
    }
    
    .requests-list td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 8px 0;
        border: none;
    }
    
    .requests-list td:before {
        content: attr(data-label);
        font-weight: 600;
        color: #ff6b6b;
        min-width: 80px;
    }
    
    .form-group {
        margin-bottom: 16px;
    }
    
    input, select, textarea {
        padding: 12px;
    }
}

/* 小屏幕手机优化 */
@media (max-width: 360px) {
    .container {
        padding: 0 6px;
    }
    
    .card {
        padding: 14px;
        margin-bottom: 10px;
    }
    
    h1 {
        font-size: 1.2rem;
    }
    
    button, .btn {
        padding: 12px;
        font-size: 14px;
    }
    
    .step {
        padding: 10px;
    }
    
    .step-icon {
        width: 45px;
        height: 45px;
        font-size: 16px;
    }
}

/* 加载动画 */
.loading {
    display: inline-block;
    width: 18px;
    height: 18px;
    border: 2px solid #ffe0e0;
    border-top: 2px solid #ff6b6b;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 底部样式 */
footer {
    text-align: center;
    margin-top: 30px;
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.85rem;
    padding: 0 10px;
}

/* 消息提示 */
.alert {
    padding: 14px;
    border-radius: 10px;
    margin-bottom: 16px;
    font-weight: 500;
    border-left: 4px solid;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.9rem;
}

.alert.success {
    background: linear-gradient(135deg, #d4edda, #c3e6cb);
    color: #155724;
    border-left-color: #28a745;
}

.alert.error {
    background: linear-gradient(135deg, #f8d7da, #f5c6cb);
    color: #721c24;
    border-left-color: #dc3545;
}

/* 审批码区域 */
.approval-code {
    background: linear-gradient(135deg, #fff5f5, #ffeaea);
    border: 2px solid #ffe0e0;
    padding: 20px;
    border-radius: 12px;
    margin: 20px 0;
    text-align: center;
}

.approval-code h3 {
    color: #ff6b6b;
    margin-bottom: 12px;
    font-weight: 700;
    font-size: 1.1rem;
}

/* 登录页面优化 */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #ff6b6b 0%, #ff8e8e 100%);
    padding: 20px;
}

.login-card {
    background: rgba(255, 255, 255, 0.98);
    padding: 30px 25px;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(255, 107, 107, 0.3);
    width: 100%;
    max-width: 380px;
    text-align: center;
}

.login-card h2 {
    color: #ff6b6b;
    margin-bottom: 8px;
    font-size: 1.4rem;
}

.login-card > p {
    color: #666;
    margin-bottom: 25px;
    font-size: 0.95rem;
}

/* 模态框优化 */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 107, 107, 0.9);
    z-index: 1000;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.modal-content {
    background: white;
    padding: 25px;
    border-radius: 16px;
    width: 100%;
    max-width: 400px;
    box-shadow: 0 15px 40px rgba(255, 107, 107, 0.4);
}

/* 活泼的色彩增强 */
.card:nth-child(odd) {
    border-top: 4px solid #ff6b6b;
}

.card:nth-child(even) {
    border-top: 4px solid #ffa726;
}

/* 动画效果 */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.card {
    animation: fadeInUp 0.5s ease;
}

/* 触摸友好的交互 */
@media (hover: none) {
    button:hover, .btn:hover {
        transform: none;
        box-shadow: none;
    }
    
    .card:hover {
        transform: none;
        box-shadow: 0 6px 20px rgba(255, 107, 107, 0.2);
    }
}