/* ===== 全局样式 ===== */
:root {
  --primary: #1a56db;
  --primary-light: #3b82f6;
  --primary-dark: #1e40af;
  --primary-bg: #eff6ff;
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-300: #d1d5db;
  --gray-400: #9ca3af;
  --gray-500: #6b7280;
  --gray-600: #4b5563;
  --gray-700: #374151;
  --gray-800: #1f2937;
  --gray-900: #111827;
  --sidebar-width: 64px;
  --sidebar-expanded: 200px;
  --header-height: 56px;
  --radius: 8px;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
  --shadow: 0 1px 3px rgba(0,0,0,0.1), 0 1px 2px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 6px rgba(0,0,0,0.07), 0 2px 4px rgba(0,0,0,0.06);
  --shadow-lg: 0 10px 15px rgba(0,0,0,0.1), 0 4px 6px rgba(0,0,0,0.05);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
  font-size: 14px;
  color: var(--gray-800);
  background: var(--gray-50);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

button { cursor: pointer; font-family: inherit; }
input, textarea, select { font-family: inherit; font-size: 14px; }

/* ===== 登录页 ===== */
.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #1e3a8a 0%, #1a56db 50%, #3b82f6 100%);
  position: relative;
  overflow: hidden;
}

.login-page::before {
  content: '';
  position: absolute;
  width: 600px; height: 600px;
  background: rgba(255,255,255,0.05);
  border-radius: 50%;
  top: -200px; right: -100px;
}

.login-page::after {
  content: '';
  position: absolute;
  width: 400px; height: 400px;
  background: rgba(255,255,255,0.03);
  border-radius: 50%;
  bottom: -100px; left: -100px;
}

.login-card {
  background: #fff;
  border-radius: 16px;
  padding: 48px 40px;
  width: 420px;
  max-width: 90vw;
  box-shadow: 0 25px 50px rgba(0,0,0,0.25);
  position: relative;
  z-index: 1;
  text-align: center;
}

.login-logo {
  width: 64px; height: 64px;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  font-size: 32px;
}

.login-title {
  font-size: 24px;
  font-weight: 700;
  color: var(--gray-900);
  margin-bottom: 8px;
}

.login-subtitle {
  font-size: 14px;
  color: var(--gray-500);
  margin-bottom: 32px;
}

.login-btn {
  width: 100%;
  padding: 14px 24px;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: var(--radius);
  font-size: 16px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: all 0.2s;
}

.login-btn:hover {
  background: var(--primary-dark);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.login-btn:active { transform: translateY(0); }

.login-btn svg { width: 22px; height: 22px; }

.login-tip {
  margin-top: 20px;
  font-size: 12px;
  color: var(--gray-400);
}

.login-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding: 20px 0;
}

.spinner {
  width: 40px; height: 40px;
  border: 3px solid var(--gray-200);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ===== 主应用布局 ===== */
.app-layout {
  display: flex;
  min-height: 100vh;
}

/* 侧边栏 */
.sidebar {
  width: var(--sidebar-width);
  background: var(--gray-900);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0; bottom: 0;
  z-index: 100;
  transition: width 0.2s;
}

.sidebar:hover { width: var(--sidebar-expanded); }

.sidebar-logo {
  height: var(--header-height);
  display: flex;
  align-items: center;
  padding: 0 16px;
  color: #fff;
  font-weight: 700;
  font-size: 16px;
  gap: 12px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

.sidebar-logo-icon {
  width: 32px; height: 32px;
  background: var(--primary);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}

.sidebar-logo-text {
  white-space: nowrap;
  opacity: 0;
  transition: opacity 0.2s;
}

.sidebar:hover .sidebar-logo-text { opacity: 1; }

.sidebar-nav {
  flex: 1;
  padding: 12px 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: var(--radius);
  color: var(--gray-400);
  text-decoration: none;
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
}

.nav-item:hover {
  background: rgba(255,255,255,0.08);
  color: #fff;
}

.nav-item.active {
  background: var(--primary);
  color: #fff;
}

.nav-item svg {
  width: 22px; height: 22px;
  flex-shrink: 0;
}

.nav-item-text {
  opacity: 0;
  transition: opacity 0.2s;
  font-size: 14px;
}

.sidebar:hover .nav-item-text { opacity: 1; }

.sidebar-footer {
  padding: 12px 8px;
  border-top: 1px solid rgba(255,255,255,0.1);
}

/* 主内容区 */
.main-content {
  flex: 1;
  margin-left: var(--sidebar-width);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* 顶部工具栏 */
.app-header {
  height: var(--header-height);
  background: #fff;
  border-bottom: 1px solid var(--gray-200);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  position: sticky;
  top: 0;
  z-index: 50;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.header-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--gray-900);
}

.header-center {
  display: flex;
  align-items: center;
  gap: 8px;
}

.timeline-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--gray-900);
  min-width: 180px;
  text-align: center;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* 缩放切换按钮组 */
.zoom-group {
  display: flex;
  background: var(--gray-100);
  border-radius: 6px;
  padding: 2px;
}

.zoom-btn {
  padding: 6px 14px;
  border: none;
  background: transparent;
  border-radius: 4px;
  font-size: 13px;
  color: var(--gray-600);
  font-weight: 500;
  transition: all 0.15s;
}

.zoom-btn.active {
  background: #fff;
  color: var(--primary);
  box-shadow: var(--shadow-sm);
}

.zoom-btn:hover:not(.active) { color: var(--gray-800); }

/* 通用按钮 */
.btn {
  padding: 8px 16px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  border: 1px solid transparent;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.15s;
}

.btn-primary {
  background: var(--primary);
  color: #fff;
}

.btn-primary:hover { background: var(--primary-dark); }

.btn-outline {
  background: #fff;
  border-color: var(--gray-300);
  color: var(--gray-700);
}

.btn-outline:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.btn-sm { padding: 5px 10px; font-size: 12px; }

.btn-icon {
  width: 36px; height: 36px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  border: 1px solid var(--gray-300);
  background: #fff;
  color: var(--gray-600);
}

.btn-icon:hover {
  border-color: var(--primary);
  color: var(--primary);
}

/* 用户头像 */
.user-menu {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 8px;
  border-radius: 6px;
  cursor: pointer;
  position: relative;
}

.user-menu:hover { background: var(--gray-100); }

.user-avatar {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 600;
}

.user-name {
  font-size: 13px;
  color: var(--gray-700);
  max-width: 100px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-dropdown {
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 4px;
  background: #fff;
  border-radius: 8px;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--gray-200);
  min-width: 180px;
  padding: 6px;
  display: none;
  z-index: 200;
}

.user-dropdown.show { display: block; }

.dropdown-item {
  padding: 8px 12px;
  border-radius: 4px;
  font-size: 13px;
  color: var(--gray-700);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
}

.dropdown-item:hover { background: var(--gray-100); }

.dropdown-item.danger { color: var(--danger); }

.dropdown-divider {
  height: 1px;
  background: var(--gray-200);
  margin: 4px 0;
}

/* 角色标签 */
.role-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 600;
}

.role-badge.super-admin { background: #fef3c7; color: #92400e; }
.role-badge.dept-head { background: #dbeafe; color: #1e40af; }
.role-badge.staff { background: var(--gray-100); color: var(--gray-600); }

/* ===== 时间线视图 ===== */
.timeline-container {
  flex: 1;
  overflow: auto;
  background: #fff;
  position: relative;
}

.timeline-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: #fff;
  border-bottom: 2px solid var(--gray-200);
}

.timeline-grid {
  display: grid;
  position: relative;
}

/* 月视图 */
.timeline-month .timeline-grid {
  grid-template-columns: repeat(7, 1fr);
  min-width: 980px;
}

.timeline-month .timeline-header-cell {
  padding: 10px 8px;
  text-align: center;
  font-size: 13px;
  font-weight: 600;
  color: var(--gray-600);
  border-right: 1px solid var(--gray-100);
}

.timeline-month .timeline-header-cell.weekend { color: var(--danger); }

.timeline-month .timeline-cell {
  min-height: 140px;
  border-right: 1px solid var(--gray-100);
  border-bottom: 1px solid var(--gray-100);
  padding: 6px;
  position: relative;
  cursor: pointer;
  transition: background 0.15s;
}

.timeline-month .timeline-cell:hover { background: var(--primary-bg); }

.timeline-month .timeline-cell.other-month { background: var(--gray-50); opacity: 0.5; }

.timeline-month .timeline-cell.today {
  background: var(--primary-bg);
}

.timeline-month .timeline-cell.today::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--primary);
}

.cell-date {
  font-size: 13px;
  font-weight: 600;
  color: var(--gray-700);
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.cell-date.today-num {
  background: var(--primary);
  color: #fff;
  width: 26px; height: 26px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
}

.cell-date.weekend { color: var(--danger); }

/* 日志卡片 */
.diary-card {
  background: #fff;
  border-radius: 4px;
  padding: 6px 8px;
  margin-bottom: 4px;
  font-size: 11px;
  border-left: 3px solid var(--primary);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: all 0.15s;
  overflow: hidden;
}

.diary-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateX(2px);
}

.diary-card-project {
  font-weight: 600;
  color: var(--gray-800);
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.diary-card-content {
  color: var(--gray-500);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.diary-card-more {
  font-size: 10px;
  color: var(--gray-400);
  text-align: center;
  padding: 2px 0;
}

/* 周视图 */
.timeline-week .timeline-grid {
  grid-template-columns: repeat(7, 1fr);
  min-width: 980px;
}

.timeline-week .timeline-cell {
  min-height: 500px;
  border-right: 1px solid var(--gray-100);
  padding: 8px;
  position: relative;
}

/* 日视图 */
.timeline-day .timeline-grid {
  grid-template-columns: 60px 1fr;
  min-width: 600px;
}

.timeline-day .timeline-hour-row {
  display: contents;
}

.timeline-day .hour-label {
  padding: 8px;
  text-align: right;
  font-size: 11px;
  color: var(--gray-400);
  border-bottom: 1px solid var(--gray-100);
  border-right: 1px solid var(--gray-200);
}

.timeline-day .hour-cell {
  border-bottom: 1px solid var(--gray-100);
  min-height: 60px;
  padding: 4px 8px;
  position: relative;
}

/* 年视图 */
.timeline-year .year-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  padding: 24px;
}

.year-month-card {
  background: var(--gray-50);
  border-radius: 8px;
  padding: 12px;
  border: 1px solid var(--gray-200);
}

.year-month-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--gray-700);
  margin-bottom: 8px;
  text-align: center;
}

.year-mini-calendar {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
}

.year-mini-day {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  border-radius: 2px;
  color: var(--gray-500);
}

.year-mini-day.has-diary {
  background: var(--primary);
  color: #fff;
  font-weight: 600;
}

.year-mini-day.today {
  border: 2px solid var(--danger);
}

/* 时间线底部缩放控制 */
.timeline-footer {
  position: sticky;
  bottom: 0;
  background: #fff;
  border-top: 1px solid var(--gray-200);
  padding: 8px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 10;
}

.timeline-nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.timeline-info {
  font-size: 12px;
  color: var(--gray-500);
}

/* ===== 列表视图 ===== */
.list-view {
  padding: 24px;
}

.list-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  gap: 12px;
  flex-wrap: wrap;
}

.list-filters {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.filter-item {
  display: flex;
  align-items: center;
  gap: 6px;
}

.filter-item label {
  font-size: 13px;
  color: var(--gray-600);
}

.filter-item input, .filter-item select {
  padding: 6px 10px;
  border: 1px solid var(--gray-300);
  border-radius: 4px;
  font-size: 13px;
}

.data-table {
  width: 100%;
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--gray-200);
}

.data-table th {
  background: var(--gray-50);
  padding: 12px 16px;
  text-align: left;
  font-size: 13px;
  font-weight: 600;
  color: var(--gray-600);
  border-bottom: 1px solid var(--gray-200);
}

.data-table td {
  padding: 12px 16px;
  font-size: 13px;
  color: var(--gray-700);
  border-bottom: 1px solid var(--gray-100);
}

.data-table tr:hover td { background: var(--primary-bg); }

.data-table .action-btn {
  color: var(--primary);
  cursor: pointer;
  margin-right: 12px;
  font-size: 13px;
}

.data-table .action-btn.delete { color: var(--danger); }

/* ===== 模态框 ===== */
.modal-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.2s;
}

.modal-overlay.show {
  opacity: 1;
  visibility: visible;
}

.modal {
  background: #fff;
  border-radius: 12px;
  width: 90vw;
  max-width: 800px;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-lg);
  transform: scale(0.95);
  transition: transform 0.2s;
}

.modal-overlay.show .modal { transform: scale(1); }

.modal-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--gray-200);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--gray-900);
}

.modal-close {
  width: 32px; height: 32px;
  border: none;
  background: transparent;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gray-400);
  font-size: 20px;
  cursor: pointer;
}

.modal-close:hover { background: var(--gray-100); color: var(--gray-600); }

.modal-body {
  flex: 1;
  overflow-y: auto;
  padding: 24px;
}

.modal-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--gray-200);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
}

/* ===== 表单 ===== */
.form-group {
  margin-bottom: 20px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.form-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--gray-700);
  margin-bottom: 6px;
}

.form-label .required { color: var(--danger); margin-left: 2px; }

.form-input, .form-select, .form-textarea {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid var(--gray-300);
  border-radius: 6px;
  font-size: 14px;
  color: var(--gray-800);
  transition: border-color 0.15s, box-shadow 0.15s;
}

.form-input:focus, .form-select:focus, .form-textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(26,86,219,0.1);
}

.form-textarea {
  min-height: 80px;
  resize: vertical;
}

.form-section-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--gray-800);
  margin: 24px 0 16px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--primary-bg);
}

.form-section-title:first-child { margin-top: 0; }

/* 附件上传 */
.upload-area {
  border: 2px dashed var(--gray-300);
  border-radius: 8px;
  padding: 24px;
  text-align: center;
  cursor: pointer;
  transition: all 0.15s;
}

.upload-area:hover {
  border-color: var(--primary);
  background: var(--primary-bg);
}

.upload-area-icon {
  font-size: 32px;
  margin-bottom: 8px;
}

.upload-area-text {
  font-size: 13px;
  color: var(--gray-500);
}

.upload-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.upload-preview-item {
  width: 80px; height: 80px;
  border-radius: 6px;
  overflow: hidden;
  position: relative;
  border: 1px solid var(--gray-200);
}

.upload-preview-item img {
  width: 100%; height: 100%;
  object-fit: cover;
}

.upload-preview-remove {
  position: absolute;
  top: 2px; right: 2px;
  width: 20px; height: 20px;
  background: rgba(0,0,0,0.5);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  cursor: pointer;
}

/* ===== 日志详情 ===== */
.detail-header {
  margin-bottom: 24px;
}

.detail-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--gray-900);
  margin-bottom: 8px;
}

.detail-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 13px;
  color: var(--gray-500);
  flex-wrap: wrap;
}

.detail-meta-item {
  display: flex;
  align-items: center;
  gap: 4px;
}

.detail-section {
  margin-bottom: 20px;
}

.detail-section-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--gray-700);
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.detail-section-title::before {
  content: '';
  width: 3px; height: 14px;
  background: var(--primary);
  border-radius: 2px;
}

.detail-section-content {
  font-size: 14px;
  color: var(--gray-700);
  line-height: 1.7;
  background: var(--gray-50);
  padding: 12px 16px;
  border-radius: 6px;
  white-space: pre-wrap;
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 20px;
}

.detail-info-item {
  background: var(--gray-50);
  padding: 12px;
  border-radius: 6px;
}

.detail-info-label {
  font-size: 12px;
  color: var(--gray-500);
  margin-bottom: 4px;
}

.detail-info-value {
  font-size: 14px;
  font-weight: 600;
  color: var(--gray-800);
}

.detail-photos {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 12px;
}

.detail-photo-item {
  border-radius: 8px;
  overflow: hidden;
  aspect-ratio: 4/3;
  cursor: pointer;
}

.detail-photo-item img {
  width: 100%; height: 100%;
  object-fit: cover;
}

/* ===== 空状态 ===== */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--gray-400);
}

.empty-state-icon {
  font-size: 48px;
  margin-bottom: 16px;
}

.empty-state-text {
  font-size: 14px;
  margin-bottom: 16px;
}

/* ===== Toast 提示 ===== */
.toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.toast {
  padding: 12px 20px;
  border-radius: 8px;
  font-size: 14px;
  color: #fff;
  box-shadow: var(--shadow-lg);
  animation: slideIn 0.3s ease;
  max-width: 360px;
}

.toast.success { background: var(--success); }
.toast.error { background: var(--danger); }
.toast.info { background: var(--primary); }

@keyframes slideIn {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

/* ===== 响应式 ===== */
@media (max-width: 768px) {
  .sidebar {
    width: 100%;
    height: auto;
    position: fixed;
    top: auto;
    bottom: 0;
    flex-direction: row;
    z-index: 100;
  }

  .sidebar:hover { width: 100%; }

  .sidebar-logo, .sidebar-footer { display: none; }

  .sidebar-nav {
    flex-direction: row;
    padding: 8px;
    justify-content: space-around;
  }

  .nav-item {
    flex-direction: column;
    padding: 6px 12px;
    gap: 4px;
  }

  .nav-item-text {
    opacity: 1;
    font-size: 10px;
  }

  .main-content {
    margin-left: 0;
    margin-bottom: 60px;
  }

  .app-header {
    padding: 0 12px;
    flex-wrap: wrap;
    height: auto;
    min-height: var(--header-height);
    padding: 8px 12px;
  }

  .header-center { order: 3; width: 100%; justify-content: center; margin-top: 8px; }

  .timeline-title { font-size: 16px; min-width: auto; }

  .user-name { display: none; }

  .form-row { grid-template-columns: 1fr; }

  .detail-grid { grid-template-columns: 1fr; }

  .modal { max-width: 95vw; max-height: 90vh; }

  .modal-body { padding: 16px; }

  .timeline-month .timeline-cell { min-height: 100px; padding: 4px; }

  .diary-card { font-size: 10px; padding: 4px 6px; }
}

@media (max-width: 480px) {
  .zoom-btn { padding: 6px 8px; font-size: 12px; }
  .timeline-month .timeline-grid { min-width: 700px; }
}
