/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background-color: #f5f5f5;
    color: #333;
    line-height: 1.5;
}

.container {
    max-width: 100%;
    padding: 0;
    margin: 0 auto;
    min-height: 100vh;
}

h1 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    color: #1890ff;
    text-align: center;
}

h3 {
    font-size: 1.1rem;
    margin: 0;
    color: #333;
}

/* 页面切换 */
.page {
    display: none;
    padding: 1rem;
}

.page.active {
    display: block;
}

/* 卡片样式 */
.card {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    padding: 2rem;
    max-width: 400px;
    margin: 2rem auto;
}

/* 表单样式 */
.form-group {
    margin-bottom: 1.5rem;
}

.form-row {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

@media (min-width: 768px) {
    .form-row {
        flex-direction: row;
    }
    
    .form-row .form-group {
        flex: 1;
    }
}

label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #555;
}

input[type="text"],
input[type="password"],
input[type="date"] {
    width: 100%;
    padding: 0.8rem 1rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
    outline: none;
    transition: border-color 0.3s;
}

input[type="text"]:focus,
input[type="password"]:focus,
input[type="date"]:focus {
    border-color: #1890ff;
    box-shadow: 0 0 0 2px rgba(24, 144, 255, 0.2);
}

/* 原始日期范围样式(横向) */
.date-range {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.date-range input {
    flex: 1;
}

/* 移动端日期范围样式(纵向) */
.date-range-mobile {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.date-range-mobile .date-item {
    width: 100%;
}

.date-range-mobile .date-item label {
    font-size: 0.9rem;
    margin-bottom: 0.3rem;
    color: #666;
}

/* 按钮样式 */
.btn {
    display: inline-block;
    padding: 0.8rem 1.5rem;
    background-color: #f5f5f5;
    color: #333;
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s;
    outline: none;
}

.btn:hover {
    background-color: #e6e6e6;
}

.btn.primary {
    background-color: #1890ff;
    color: #fff;
    width: 100%;
}

.btn.primary:hover {
    background-color: #40a9ff;
}

.btn.small {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
}

.form-actions {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.form-actions .btn {
    flex: 1;
}

/* 头部布局 */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.header h1 {
    margin-bottom: 0;
    font-size: 1.3rem;
    text-align: left;
}

/* 搜索表单 */
.search-form {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    padding: 0;
    margin-bottom: 1.5rem;
    overflow: hidden;
}

/* 搜索表单头部 */
.search-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid #f0f0f0;
    cursor: pointer;
    user-select: none;
}

.search-header .toggle-icon {
    font-size: 0.8rem;
    color: #999;
    transition: transform 0.3s ease;
}

.search-header.collapsed .toggle-icon {
    transform: rotate(-90deg);
}

/* 搜索表单内容 */
.search-content {
    padding: 1.5rem;
    max-height: 500px;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
}

.search-content.collapsed {
    max-height: 0;
    padding-top: 0;
    padding-bottom: 0;
}

/* 结果表格 */
.record-results {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    padding: 1.5rem;
    overflow-x: auto;
    position: relative;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th, td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid #eee;
}

th {
    background-color: #fafafa;
    font-weight: 600;
    color: #555;
}

tbody tr:hover {
    background-color: #f5f7fa;
}

/* 卡片式记录列表 */
.record-cards {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.record-card {
    background-color: #fff;
    border: 1px solid #eee;
    border-radius: 8px;
    padding: 1rem;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}

.record-card-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}

.record-card-title {
    font-weight: 600;
    color: #333;
}

.employee-id {
    color: #888;
    font-size: 0.9rem;
}

.record-card-time {
    font-size: 1.1rem;
    margin: 0.5rem 0;
    color: #1890ff;
}

.record-card-remark {
    font-size: 0.9rem;
    color: #666;
    padding-top: 0.5rem;
    border-top: 1px dashed #eee;
}

/* 无数据状态 */
.no-data {
    display: none;
    text-align: center;
    padding: 2rem;
    color: #999;
}

/* 加载状态 */
.loading {
    display: none;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255, 255, 255, 0.8);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 10;
}

.spinner {
    border: 3px solid #f3f3f3;
    border-top: 3px solid #1890ff;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    animation: spin 1s linear infinite;
    margin-bottom: 0.5rem;
}

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

/* 分页 */
.pagination {
    display: flex;
    justify-content: center;
    margin-top: 1.5rem;
    gap: 0.5rem;
}

.pagination button {
    padding: 0.5rem 1rem;
    background-color: #f5f5f5;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.pagination button.active {
    background-color: #1890ff;
    color: white;
}

/* 错误消息 */
.error-message {
    color: #ff4d4f;
    margin-bottom: 1rem;
    font-size: 0.9rem;
    min-height: 1.2rem;
} 