* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: "Microsoft YaHei", "PingFang SC", sans-serif; background: #f5f5f5; color: #333; }

.navbar {
    background: #1a73e8; color: white; padding: 0 20px;
    display: flex; align-items: center; height: 50px; position: sticky; top: 0; z-index: 100;
}
.nav-brand { font-size: 18px; font-weight: bold; margin-right: 30px; }
.nav-links { display: flex; gap: 5px; flex: 1; }
.nav-link { color: white; text-decoration: none; padding: 8px 12px; border-radius: 4px; font-size: 14px; }
.nav-link:hover { background: rgba(255,255,255,0.15); }
.nav-logout { margin-left: auto; }
.nav-user { font-size: 14px; margin-left: 15px; opacity: 0.85; }

.container { max-width: 1400px; margin: 0 auto; padding: 20px; }

/* Login */
.login-body { display: flex; align-items: center; justify-content: center; min-height: 100vh; background: #e8f0fe; }
.login-card { background: white; padding: 40px; border-radius: 8px; box-shadow: 0 2px 10px rgba(0,0,0,0.1); width: 360px; }
.login-title { text-align: center; margin-bottom: 30px; color: #1a73e8; font-size: 20px; }
.login-error { background: #fce4e4; color: #c62828; padding: 10px; border-radius: 4px; margin-bottom: 15px; text-align: center; }

/* Forms */
.form-group { margin-bottom: 15px; }
.form-group label { display: block; margin-bottom: 5px; font-size: 14px; color: #555; }
.form-group input {
    width: 100%; padding: 10px 12px; border: 1px solid #ddd; border-radius: 4px; font-size: 16px;
}
.form-group input:focus { border-color: #1a73e8; outline: none; }

.btn {
    padding: 10px 20px; border: none; border-radius: 4px; cursor: pointer;
    font-size: 15px; transition: background 0.2s;
}
.btn-primary { background: #1a73e8; color: white; }
.btn-primary:hover { background: #1557b0; }
.btn-block { width: 100%; }
.btn-export { background: #34a853; color: white; padding: 8px 16px; font-size: 14px; }
.btn-export:hover { background: #2d9249; }

/* Page header */
.page-header { margin-bottom: 20px; }
.page-header h2 { margin-bottom: 10px; }
.date-selector { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.date-selector select { padding: 6px 10px; border: 1px solid #ddd; border-radius: 4px; font-size: 14px; }

/* Day grid */
.day-grid { display: flex; flex-wrap: wrap; gap: 4px; }
.day-btn {
    width: 36px; height: 36px; border: 1px solid #ddd; border-radius: 4px;
    background: white; cursor: pointer; font-size: 13px;
}
.day-btn:hover { background: #e8f0fe; }
.day-btn.active { background: #1a73e8; color: white; border-color: #1a73e8; }
.day-btn.filled { background: #e8f5e9; border-color: #34a853; }

/* Tabs */
.tab-container { display: flex; gap: 0; margin-bottom: 20px; border-bottom: 2px solid #ddd; }
.tab-btn {
    padding: 10px 25px; border: none; background: none; cursor: pointer;
    font-size: 15px; color: #666; border-bottom: 2px solid transparent; margin-bottom: -2px;
}
.tab-btn.active { color: #1a73e8; border-bottom-color: #1a73e8; font-weight: bold; }
.tab-content { display: none; }
.tab-content.active { display: block; }

/* Section */
.section-title { font-size: 16px; font-weight: bold; margin: 20px 0 10px; color: #1a73e8; padding-left: 10px; border-left: 3px solid #1a73e8; }

/* Input grid */
.input-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; margin-bottom: 15px; }
.input-item label { display: block; font-size: 13px; color: #555; margin-bottom: 3px; }
.input-item input { width: 100%; padding: 8px; border: 1px solid #ddd; border-radius: 4px; font-size: 15px; }

/* Treatment table */
.treatment-table { width: 100%; border-collapse: collapse; background: white; border-radius: 4px; overflow: hidden; }
.treatment-table th, .treatment-table td { padding: 8px 10px; border: 1px solid #e0e0e0; text-align: center; font-size: 13px; }
.treatment-table th { background: #f5f5f5; font-weight: bold; }
.treatment-table input { width: 60px; padding: 5px; text-align: center; border: 1px solid #ddd; border-radius: 3px; }
.total-row { font-weight: bold; background: #f5f5f5; }

/* Rate display */
.rate-display { margin: 15px 0; font-size: 14px; display: flex; gap: 30px; }
.rate-display strong { color: #1a73e8; }

/* Form actions */
.form-actions { margin: 20px 0; display: flex; align-items: center; gap: 15px; }
.status-msg { color: #34a853; font-size: 14px; }

/* Data table */
.data-table { width: 100%; border-collapse: collapse; background: white; font-size: 13px; }
.data-table th, .data-table td { padding: 6px 8px; border: 1px solid #e0e0e0; text-align: center; }
.data-table th { background: #f5f5f5; font-weight: bold; position: sticky; top: 0; }
.total-col { font-weight: bold; background: #f5f5f5; }
.total-row { background: #f5f5f5; }
.total-row td { font-weight: bold; border-top: 2px solid #999; }

/* Table wrapper for horizontal scroll */
.table-wrapper { overflow-x: auto; border-radius: 4px; margin-bottom: 20px; }

/* Indicators table */
.indicators-table .indicator-header td { border-top: 2px solid #ccc; }
.rate-row td:last-child { font-weight: bold; color: #1a73e8; }
.desc-col { text-align: left; font-size: 12px; color: #666; }
.value-col { font-weight: bold; }

/* Summary */
.summary-section { margin: 20px 0; padding: 15px; background: white; border-radius: 4px; }
.summary-section p { margin: 5px 0; font-size: 14px; }

/* Schedule - inline editable fields */
.inline-edit {
    border: 1px solid transparent; background: transparent;
    font-size: 13px; padding: 4px 2px; font-family: inherit;
    border-radius: 3px; text-align: center; color: #333;
}
.inline-edit:hover { border-color: #ccc; background: white; }
.inline-edit:focus { border-color: #1a73e8; outline: none; background: white; }

/* Schedule - shift select */
.shift-select {
    width: 56px; padding: 3px 2px; font-size: 12px; font-weight: 600;
    border: 1px solid #bbb; border-radius: 3px; background: white;
    text-align: center; cursor: pointer; color: #333;
}
.edit-display {
    display: block; width: 54px; padding: 1px 2px; font-size: 11px;
    border: 1px solid #ddd; border-radius: 3px; text-align: center;
    margin-top: 2px; font-family: inherit; background: white;
}
.edit-display:focus { border-color: #1a73e8; outline: none; }

/* Mobile */
@media (max-width: 768px) {
    .navbar { flex-wrap: wrap; height: auto; padding: 10px; }
    .nav-links { order: 3; width: 100%; flex-wrap: wrap; margin-top: 10px; }
    .container { padding: 10px; }
    .input-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
    .tab-btn { padding: 8px 15px; font-size: 14px; }
}
