* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background: #f8f9fa;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    padding: 80px 1.5rem 2rem;
    margin: 0;
}
.navbar {
    height: 80px !important;
}
.container-main {
    max-width: 1100px;
    width: 100%;
    background: #ffffff;
    border-radius: 2rem;
    padding: 2rem;
    box-shadow: 0 5px 15px 2px rgba(0, 0, 0, 0.1), 0 1px 2px rgba(0, 0, 0, 0.05);
	margin-top: 20px;
}

.header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid #e9edf4;
}

h1 {
    font-size: 2rem;
    font-weight: 700;
    margin: 0 0 0.5rem 0;
    background: linear-gradient(135deg, #667eea, #764ba2);
    -webkit-background-clip: text;
    background-clip: text;
    color: #333;
    text-align: center;
}



.tool-intro {
    margin-bottom: 1.5rem;
    padding: 0.8rem 1.2rem;
    background: #f0f7ff;
    border-radius: 10px;
    border-left: 4px solid #0D6EFD;
}

.tool-intro p {
    margin: 0;
    color: #475569;
    font-size: 0.95rem;
}

.tool-intro strong {
    color: #0b1a33;
}

.main-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.card-panel {
    background: #f8f9fa;
    border-radius: 1.5rem;
    padding: 1.5rem;
    border: 1px solid #e9edf4;
    display: flex;
    flex-direction: column;
}

.panel-title {
    font-weight: 600;
    color: #0b1a33;
    font-size: 1.05rem;
    margin-bottom: 1rem;
    border-bottom: 2px solid #0D6EFD;
    padding-bottom: 0.4rem;
}

.panel-title i {
    color: #0D6EFD;
    margin-right: 6px;
}

.card-body {
    flex: 1;
}

.form-group {
    margin-bottom: 0.8rem;
}

.form-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 500;
    color: #475569;
    margin-bottom: 0.2rem;
}

.form-control {
    width: 100%;
    padding: 0.5rem 0.8rem;
    border: 1px solid #dce2ec;
    border-radius: 0.5rem;
    font-size: 0.9rem;
    outline: none;
    background: #ffffff;
    color: #0b1a33;
    transition: 0.15s;
}

.form-control:focus {
    border-color: #0D6EFD;
    box-shadow: 0 0 0 3px rgba(13, 110, 253, 0.1);
}

.form-control[type="number"] {
    width: 100%;
}

.checkbox-group {
    display: flex;
    align-items: center;
    margin-bottom: 0.5rem;
	
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: #475569;
    cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
    width: 17px;
    height: 17px;
    accent-color: #0D6EFD;
    cursor: pointer;
}

.radio-group {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 0.8rem;
}

.radio-label {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.85rem;
    color: #475569;
    cursor: pointer;
}

.radio-label input[type="radio"] {
    accent-color: #0D6EFD;
    width: 16px;
    height: 16px;
    cursor: pointer;
}

.btn-primary {
    width: 100%;
    padding: 0.6rem;
    background: #0D6EFD;
    color: white;
    border: none;
    border-radius: 0.6rem;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: 0.15s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-primary:hover {
    background: #0b5ed7;
    transform: scale(1.01);
}

.btn-primary:active {
    transform: scale(0.97);
}

/* ===== 结果区域 ===== */
.result-area {
    margin-top: 1rem;
    padding: 1rem;
    background: #ffffff;
    border-radius: 0.8rem;
    border: 1px solid #e2e8f0;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

.result-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.8rem 0;
    border-bottom: 1px solid #f1f4f9;
}

.result-item:last-child {
    border-bottom: none;
}

.result-item.highlight {
    background: #fef3c7;
    border-radius: 0.4rem;
    padding: 0.3rem 0.6rem;
    margin-top: 0.2rem;
}

.result-item.result-large {
    padding: 0.5rem 0;
    border-bottom: 2px solid #0D6EFD;
}

.result-label {
    font-size: 0.85rem;
    color: #64748b;
}

.result-value {
    font-size: 1.2rem;
    font-weight: 600;
    color: #0b1a33;
}

.result-large .result-value {
    font-size: 1.3rem;
    color: #0D6EFD;
}

/* ===== 自定义日期选择器 ===== */
.date-picker-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.date-display {
    cursor: pointer;
    background: #ffffff ;
    padding-right: 40px;
    user-select: none;
    transition: all 0.2s;
}

.date-display:hover {
    border-color: #0D6EFD;
}

.date-display.has-value {
    color: #0b1a33;
	background: #ffffff ;
    font-weight: 500;
}

.date-picker-wrapper::after {
    content: '\f073';
    font-family: 'Font Awesome 6 Free';
    font-weight: 400;
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    pointer-events: none;
    font-size: 1rem;
    z-index: 1;
}

.date-picker-wrapper.has-value::after {
    color: #0D6EFD;
}

.date-clear-btn {
    position: absolute;
    right: 38px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    color: #94a3b8;
    cursor: pointer;
    font-size: 0.8rem;
    padding: 2px 4px;
    border-radius: 50%;
    transition: 0.15s;
    z-index: 3;
}

.date-clear-btn:hover {
    color: #ef4444;
    background: #fef2f2;
}

/* ===== 日期下拉弹窗 ===== */
.date-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    margin-top: 6px;
    background: #ffffff;
    border-radius: 0.8rem;
    padding: 1rem 1rem 0.8rem 1rem;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15), 0 0 0 1px rgba(0, 0, 0, 0.04);
    z-index: 9999;
    width: 100%;
    min-width: 280px;
    animation: dropdownIn 0.2s ease;
}

@keyframes dropdownIn {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: translateY(0); }
}

.date-dropdown.active {
    display: block;
}

.date-dropdown .picker-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.8rem;
}

.date-dropdown .picker-title {
    font-size: 1rem;
    font-weight: 600;
    color: #0b1a33;
}

.date-dropdown .picker-nav {
    background: transparent;
    border: none;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    color: #64748b;
    font-size: 0.85rem;
    transition: 0.15s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.date-dropdown .picker-nav:hover {
    background: #f1f4f9;
    color: #0D6EFD;
}

.date-dropdown .picker-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    text-align: center;
    font-size: 0.7rem;
    font-weight: 600;
    color: #94a3b8;
    margin-bottom: 0.4rem;
}

.date-dropdown .picker-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
}

.date-dropdown .picker-days .day-cell {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    border-radius: 50%;
    cursor: pointer;
    transition: 0.12s;
    color: #0b1a33;
    font-weight: 500;
    height: 36px;
}

.date-dropdown .picker-days .day-cell:hover:not(.other-month):not(.disabled) {
    background: #e8eeff;
    color: #0D6EFD;
}

.date-dropdown .picker-days .day-cell.other-month {
    color: #cbd5e1;
}

.date-dropdown .picker-days .day-cell.today {
    background: #f0f7ff;
    color: #0D6EFD;
    font-weight: 700;
    border: 2px solid #0D6EFD;
}

.date-dropdown .picker-days .day-cell.selected {
    background: #0D6EFD;
    color: #ffffff;
    font-weight: 700;
}

.date-dropdown .picker-days .day-cell.selected:hover {
    background: #0b5ed7;
}

.date-dropdown .picker-footer {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.6rem;
    justify-content: flex-end;
    border-top: 1px solid #e9edf4;
    padding-top: 0.6rem;
}

.date-dropdown .picker-today {
    padding: 0.2rem 1rem;
    background: transparent;
    border: 1px solid #dce2ec;
    border-radius: 0.4rem;
    font-size: 0.75rem;
    color: #475569;
    cursor: pointer;
    transition: 0.15s;
}

.date-dropdown .picker-today:hover {
    background: #f1f4f9;
    border-color: #0D6EFD;
    color: #0D6EFD;
}

.date-dropdown .picker-cancel {
    padding: 0.2rem 1rem;
    background: #0D6EFD;
    border: none;
    border-radius: 0.4rem;
    font-size: 0.75rem;
    color: white;
    cursor: pointer;
    transition: 0.15s;
}

.date-dropdown .picker-cancel:hover {
    background: #0b5ed7;
}


.d-flex { display: flex; }
.align-items-center { align-items: center; }
.w-100 { width: 100%; }
.me-auto { margin-right: auto; }
.me-2 { margin-right: 0.5rem; }
.ms-3 { margin-left: 1rem; }
.d-none { display: none; }
.d-lg-flex { display: flex; }
.gap-1 { gap: 0.25rem; }

@media (max-width: 992px) { .d-lg-flex { display: none; } }

@media (max-width: 768px) {
    .main-layout {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    .container-main {
        padding: 1rem;
    }
    .header h1 {
        font-size: 1.4rem;
    }
    .header .subtitle {
        display: none;
    }
    .card-panel {
        padding: 1rem;
    }
}

@media (max-width: 500px) {
    .radio-group {
        flex-direction: column;
        gap: 0.3rem;
    }
    .result-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.1rem;
		
    }
    .result-item.result-large {
        align-items: center;
    }
    .result-large .result-value {
        font-size: 1.1rem;
    }
    .date-dropdown {
        min-width: unset;
        padding: 0.8rem;
    }
    .date-dropdown .picker-days .day-cell {
        height: 32px;
        font-size: 0.75rem;
    }
}