/**
 * layout.css - 布局相关样式
 */

/* ===================== 头部标题 ===================== */
.header {
    text-align: center;
    margin-bottom: 16px;
    padding: 16px 20px;
    background: var(--primary-gradient);
    border-radius: 16px;
    color: white;
    box-shadow: var(--card-shadow);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
}

.header-left {
    text-align: left;
}

.header h1 {
    margin: 0;
    font-size: 20px;
    font-weight: 700;
}

.header .sub-title {
    opacity: 0.85;
    font-size: 12px;
    margin-top: 2px;
}

.header .current-time {
    display: flex;
    align-items: center;
    gap: 12px;
    text-align: right;
}

.header .current-time .time-display {
    font-size: 28px;
    font-weight: 700;
    font-family: "SF Mono", "Monaco", "Inconsolata", monospace;
    letter-spacing: 2px;
}

.header .current-time .date-display {
    font-size: 12px;
    opacity: 0.85;
}

/* ===================== 统计总览面板 ===================== */
.stats-overview {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-bottom: 16px;
}

.stat-card {
    background: white;
    border-radius: 12px;
    padding: 12px 16px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    transition: transform 0.3s, box-shadow 0.3s;
    display: flex;
    align-items: center;
    gap: 12px;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.stat-card .stat-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}

.stat-card .stat-icon.blue { background: linear-gradient(135deg, #667eea20, #764ba220); }
.stat-card .stat-icon.green { background: linear-gradient(135deg, #4facfe20, #00f2fe20); }
.stat-card .stat-icon.orange { background: linear-gradient(135deg, #fa709a20, #fee14020); }
.stat-card .stat-icon.purple { background: linear-gradient(135deg, #a18cd120, #fbc2eb20); }

.stat-card .stat-info {
    flex: 1;
    min-width: 0;
}

.stat-card .stat-label {
    font-size: 11px;
    color: var(--text-secondary);
    margin-bottom: 2px;
}

.stat-card .stat-value {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
}

.stat-card .stat-value small {
    font-size: 12px;
    font-weight: 400;
    color: var(--text-secondary);
}

/* ===================== 主内容区 ===================== */
.main-content {
    background: white;
    border-radius: 16px;
    padding: 16px;
    box-shadow: var(--card-shadow);
    margin-bottom: 16px;
}

.section-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--border-color);
}

.section-title h3 {
    margin: 0;
    font-size: 14px;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 6px;
}

/* ===================== 工具栏 ===================== */
.toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 16px;
    align-items: center;
}

.toolbar select, .toolbar input[type="date"] {
    padding: 10px 14px;
    border: 2px solid var(--border-color);
    border-radius: 10px;
    font-size: 13px;
    background: white;
    cursor: pointer;
    transition: all 0.3s;
}

.toolbar select:focus, .toolbar input[type="date"]:focus {
    outline: none;
    border-color: var(--primary-color);
}

.toolbar-right {
    margin-left: auto;
    display: flex;
    gap: 8px;
}

.toolbar-group {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: nowrap;
    white-space: nowrap;
}

.toolbar-divider {
    width: 1px;
    height: 24px;
    background: var(--border-color);
    margin: 0 8px;
}

/* ===================== 标签页 ===================== */
.tabs {
    display: flex;
    gap: 6px;
    margin-bottom: 12px;
    background: #f1f5f9;
    padding: 4px;
    border-radius: 10px;
    overflow-x: auto;
}

.tab-btn {
    padding: 8px 16px;
    background: transparent;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 13px;
    transition: all 0.3s;
    white-space: nowrap;
}

.tab-btn:hover {
    color: var(--text-primary);
}

.tab-btn.active {
    background: white;
    color: var(--primary-color);
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

/* ===================== 底部操作栏 ===================== */
.footer-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 24px;
    padding-top: 24px;
    border-top: 2px solid var(--border-color);
}

/* ===================== 员工管理区 ===================== */
.employee-manager {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.employee-input-group {
    display: flex;
    gap: 8px;
}

.employee-input-group input {
    flex: 1;
    padding: 10px 14px;
    border: 2px solid var(--border-color);
    border-radius: 10px;
    font-size: 14px;
    transition: border-color 0.2s;
    background: var(--input-bg);
    color: var(--text-primary);
}

.employee-input-group input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.employee-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

/* ===================== 精简模式 ===================== */
body.compact-mode .stats-overview,
body.compact-mode .tabs,
body.compact-mode .tab-content,
body.compact-mode .employee-management,
body.compact-mode .footer-actions,
body.compact-mode .section-title .quick-actions {
    display: none !important;
}

body.compact-mode .header {
    padding: 12px 16px;
    margin-bottom: 12px;
}

body.compact-mode .main-content {
    padding: 12px;
}

body.compact-mode .section-title {
    margin-bottom: 8px;
    padding-bottom: 8px;
}

/* ===================== 全屏模式 ===================== */
body.fullscreen-mode {
    padding: 0;
}

body.fullscreen-mode .container {
    max-width: 100%;
    height: 100vh;
    display: flex;
    flex-direction: column;
}

body.fullscreen-mode .header,
body.fullscreen-mode .stats-overview,
body.fullscreen-mode .tabs,
body.fullscreen-mode .tab-content,
body.fullscreen-mode .employee-management,
body.fullscreen-mode .footer-actions {
    display: none !important;
}

body.fullscreen-mode .main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    margin: 0;
    border-radius: 0;
    padding: 20px;
}

body.fullscreen-mode .employee-cards {
    flex: 1;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    align-content: center;
}

body.fullscreen-mode .timer-card {
    padding: 40px;
}

body.fullscreen-mode .timer-card .employee-name {
    font-size: 28px;
}

body.fullscreen-mode .timer-card .timer-display {
    font-size: 72px;
}

body.fullscreen-mode .timer-card .btn {
    padding: 16px;
    font-size: 18px;
}

body.fullscreen-mode .fullscreen-exit-btn {
    display: block;
}

.fullscreen-exit-btn {
    display: none;
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 100;
    padding: 10px 20px;
    background: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
}

.fullscreen-exit-btn:hover {
    background: rgba(0, 0, 0, 0.7);
}
