:root {
    --primary-color: #007bff;
    --secondary-color: #6c757d;
    --dark-color: #333;
    --light-color: #fff;
    --gray-color: #666;
    --light-gray: #f8f9fa;
    --border-color: #ddd;
    --border-light: #e9ecef;
    --shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 5px 15px rgba(0, 0, 0, 0.1);
}

body.dark-mode {
    --primary-color: #4a90e2;
    --secondary-color: #7f8c8d;
    --dark-color: #ecf0f1;
    --light-color: #2c3e50;
    --gray-color: #bdc3c7;
    --light-gray: #34495e;
    --border-color: #4a5568;
    --border-light: #4a5568;
    --shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.annual-leave-section {
    padding: 40px 0;
}

.leave-header {
    text-align: center;
    margin-bottom: 40px;
}

.leave-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--dark-color);
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.leave-title i {
    margin-right: 15px;
    color: var(--primary-color);
}

.leave-subtitle {
    font-size: 1.2rem;
    color: var(--gray-color);
    margin-bottom: 20px;
}

.leave-badge {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
}

.badge-item {
    background-color: var(--light-gray);
    color: var(--dark-color);
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
}

.leave-main {
    background-color: var(--light-color);
    border-radius: 10px;
    box-shadow: var(--shadow);
    padding: 30px;
    margin-bottom: 40px;
}

/* 计算方式选择 */
.calculation-mode {
    margin-bottom: 30px;
}

.mode-tabs {
    display: flex;
    border-bottom: 2px solid var(--border-light);
    margin-bottom: 20px;
}

.mode-tab {
    padding: 12px 24px;
    background: none;
    border: none;
    font-size: 1rem;
    font-weight: 500;
    color: var(--gray-color);
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.mode-tab:hover {
    color: var(--primary-color);
}

.mode-tab.active {
    color: var(--primary-color);
    font-weight: 600;
}

.mode-tab.active:after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 2px;
    background-color: var(--primary-color);
}

.mode-content {
    display: none;
}

.mode-content.active {
    display: block;
}

.leave-inputs {
    margin-bottom: 30px;
}

.input-section {
    margin-bottom: 30px;
}

.section-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--dark-color);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
}

.section-title i {
    margin-right: 10px;
    color: var(--primary-color);
}

.input-group {
    margin-bottom: 20px;
}

.input-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--gray-color);
    display: flex;
    align-items: center;
}

.input-group label i {
    margin-right: 8px;
    color: var(--primary-color);
}

.form-control {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 1rem;
    background-color: var(--light-color);
    color: var(--dark-color);
    transition: border-color 0.3s ease;
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(74, 144, 226, 0.25);
    outline: none;
}

.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-primary {
    background-color: var(--primary-color);
    color: #fff;
}

.btn-primary:hover {
    background-color: #0069d9;
    transform: translateY(-2px);
}

.btn-secondary {
    background-color: var(--secondary-color);
    color: #fff;
}

.btn-secondary:hover {
    background-color: #5a6268;
    transform: translateY(-2px);
}

.action-buttons {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.presets-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.preset-card {
    background-color: var(--light-gray);
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.preset-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.preset-icon {
    font-size: 2rem;
    margin-bottom: 10px;
    color: var(--primary-color);
}

.preset-title {
    font-weight: 600;
    color: var(--dark-color);
    margin-bottom: 5px;
}

.preset-desc {
    font-size: 0.9rem;
    color: var(--gray-color);
}

.leave-results {
    margin-top: 30px;
}

.result-header {
    margin-bottom: 20px;
}

.result-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.result-card {
    background-color: var(--light-gray);
    border-radius: 8px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 20px;
}

.result-icon {
    width: 60px;
    height: 60px;
    background-color: var(--primary-color);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.result-content {
    flex: 1;
}

.result-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--dark-color);
    margin-bottom: 5px;
}

.result-value {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary-color);
}

.calculation-details {
    background-color: var(--light-gray);
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
}

.details-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--dark-color);
    margin-bottom: 15px;
    display: flex;
    align-items: center;
}

.details-title i {
    margin-right: 10px;
    color: var(--primary-color);
}

.details-content {
    color: var(--gray-color);
    line-height: 1.6;
}

.quick-actions {
    margin-bottom: 20px;
}

.action-buttons-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 10px;
}

.btn-sm {
    padding: 8px 16px;
    font-size: 0.9rem;
}

.btn-outline {
    background-color: transparent;
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
}

.btn-outline:hover {
    background-color: var(--primary-color);
    color: #fff;
}

.history-section {
    background-color: var(--light-gray);
    border-radius: 8px;
    padding: 20px;
}

.history-list {
    max-height: 300px;
    overflow-y: auto;
}

.no-history {
    text-align: center;
    color: var(--gray-color);
    padding: 20px 0;
}

.history-item {
    background-color: var(--light-color);
    border-radius: 6px;
    padding: 15px;
    margin-bottom: 10px;
    box-shadow: var(--shadow);
}

.history-item-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    border-bottom: 1px solid var(--border-light);
    padding-bottom: 10px;
}

.history-item-date {
    font-weight: 600;
    color: var(--dark-color);
}

.history-item-time {
    font-size: 0.8rem;
    color: var(--gray-color);
}

.history-item-content {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.history-item-years {
    color: var(--gray-color);
}

.history-item-days {
    color: var(--primary-color);
    font-weight: 600;
}

.leave-info {
    background-color: var(--light-gray);
    border-radius: 10px;
    padding: 30px;
    margin-bottom: 40px;
}

.info-section {
    margin-bottom: 20px;
}

.info-section:last-child {
    margin-bottom: 0;
}

.info-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--dark-color);
    margin-bottom: 15px;
    display: flex;
    align-items: center;
}

.info-title i {
    margin-right: 10px;
    color: var(--primary-color);
}

.info-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.info-list li {
    padding: 8px 0;
    color: var(--gray-color);
    position: relative;
    padding-left: 20px;
}

.info-list li:before {
    content: "•";
    position: absolute;
    left: 0;
    color: var(--primary-color);
    font-weight: bold;
}

.policy-list {
    background-color: var(--light-color);
    border-radius: 6px;
    padding: 15px;
}

.policy-item {
    padding: 10px 0;
    color: var(--gray-color);
    border-bottom: 1px solid var(--border-light);
}

.policy-item:last-child {
    border-bottom: none;
}

.policy-table {
    background-color: var(--light-color);
    border-radius: 6px;
    padding: 15px;
    overflow-x: auto;
}

.rate-table {
    width: 100%;
    border-collapse: collapse;
}

.rate-table th,
.rate-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid var(--border-light);
}

.rate-table th {
    background-color: var(--primary-color);
    color: #fff;
    font-weight: 600;
}

.rate-table tr:hover {
    background-color: var(--light-gray);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .action-buttons {
        flex-direction: column;
    }

    .btn {
        width: 100%;
    }

    .result-grid {
        grid-template-columns: 1fr;
    }

    .result-card {
        flex-direction: column;
        text-align: center;
    }

    .presets-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .mode-tabs {
        flex-direction: column;
    }

    .mode-tab {
        border-bottom: 1px solid var(--border-light);
        text-align: left;
    }

    .mode-tab.active:after {
        left: 0;
        right: auto;
        width: 4px;
        height: 100%;
        bottom: 0;
    }
}

/* FAQ样式 */
.faq-list {
    margin-top: 10px;
}

.faq-item {
    margin-bottom: 15px;
    border-bottom: 1px solid var(--border-light);
    padding-bottom: 15px;
}

.faq-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.faq-question {
    font-size: 16px;
    font-weight: 600;
    color: var(--dark-color);
    margin-bottom: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
}

.faq-question:hover {
    color: var(--primary-color);
}

.faq-question:before {
    content: 'Q: ';
    color: var(--primary-color);
    font-weight: bold;
    margin-right: 10px;
}

.faq-answer {
    font-size: 14px;
    color: var(--gray-color);
    line-height: 1.5;
    margin-left: 25px;
}

.faq-answer:before {
    content: 'A: ';
    color: #28a745;
    font-weight: bold;
    margin-right: 10px;
}

/* 案例说明样式 */
.case-list {
    margin-top: 10px;
}

.case-item {
    background-color: var(--light-color);
    border-radius: 6px;
    padding: 15px;
    margin-bottom: 10px;
    box-shadow: var(--shadow);
}

.case-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--dark-color);
    margin-bottom: 8px;
}

.case-description {
    font-size: 14px;
    color: var(--gray-color);
    line-height: 1.5;
}

/* 相关工具样式 */
.related-tools {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-top: 10px;
}

.tool-link {
    display: flex;
    align-items: center;
    padding: 10px 15px;
    background-color: var(--light-color);
    border-radius: 6px;
    color: var(--dark-color);
    text-decoration: none;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
}

.tool-link:hover {
    background-color: var(--primary-color);
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.tool-link i {
    margin-right: 8px;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .related-tools {
        flex-direction: column;
    }
    
    .tool-link {
        width: 100%;
        justify-content: center;
    }
    
    .faq-answer {
        margin-left: 0;
    }
}