* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: 'Segoe UI', system-ui, sans-serif; background: #f5f7fa; color: #1a1a2e; }
.admin-header { background: #0d1f13; color: #fff; padding: 16px 32px; display: flex; align-items: center; justify-content: space-between; position: relative; }
.admin-header h1 { font-size: 20px; font-weight: 700; }
.admin-header h1 span { color: #f9a826; }
.menu-toggle { display: none; background: none; border: none; color: #fff; font-size: 24px; cursor: pointer; padding: 4px 8px; border-radius: 4px; }
.menu-toggle:hover { background: rgba(255,255,255,0.1); }
.admin-header nav { display: flex; gap: 16px; align-items: center; }
.admin-header nav a { color: rgba(255,255,255,0.8); text-decoration: none; font-size: 14px; padding: 6px 12px; border-radius: 6px; transition: background 0.2s; white-space: nowrap; }
.admin-header nav a:hover, .admin-header nav a.active { background: rgba(255,255,255,0.1); color: #fff; }
.admin-header .logout { color: #ef5350; cursor: pointer; font-size: 14px; padding: 6px 12px; border-radius: 6px; transition: background 0.2s; white-space: nowrap; }
.admin-header .logout:hover { background: rgba(255,255,255,0.1); }
.admin-main { max-width: 1100px; margin: 0 auto; padding: 32px 24px; }
.page-title { font-size: 28px; font-weight: 700; margin-bottom: 24px; }
.card { background: #fff; border-radius: 12px; border: 1px solid #e0e0e0; padding: 24px; margin-bottom: 24px; }
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; margin-bottom: 32px; }
.stat-card { background: #fff; border-radius: 12px; border: 1px solid #e0e0e0; padding: 24px; text-align: center; }
.stat-card .num { font-size: 36px; font-weight: 800; color: #0d1f13; }
.stat-card .label { font-size: 14px; color: #666; margin-top: 4px; }
.btn { display: inline-flex; align-items: center; gap: 6px; padding: 10px 20px; border-radius: 8px; border: none; font-size: 14px; font-weight: 600; cursor: pointer; text-decoration: none; transition: all 0.2s; }
.btn-primary { background: #0d1f13; color: #fff; }
.btn-primary:hover { background: #1a3a24; }
.btn-secondary { background: #e0e0e0; color: #333; }
.btn-secondary:hover { background: #ccc; }
.btn-danger { background: #ffebee; color: #c62828; }
.btn-danger:hover { background: #ffcdd2; }
.btn-sm { padding: 6px 12px; font-size: 12px; }
.btn + .btn { margin-left: 8px; }
.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-size: 13px; font-weight: 600; color: #333; margin-bottom: 4px; }
.form-group input, .form-group textarea, .form-group select { width: 100%; padding: 10px 12px; border: 1px solid #ccc; border-radius: 8px; font-size: 14px; font-family: inherit; }
.form-group textarea { min-height: 100px; resize: vertical; }
.form-group textarea.large { min-height: 250px; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; min-width: 600px; }
th, td { text-align: left; padding: 12px; border-bottom: 1px solid #e0e0e0; font-size: 14px; }
th { font-weight: 600; color: #666; font-size: 12px; text-transform: uppercase; }
td.actions { white-space: nowrap; }
.empty-state { text-align: center; padding: 60px 20px; color: #999; }
.empty-state p { font-size: 16px; margin-bottom: 16px; }
.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 8px; margin: 12px 0; }
.photo-grid .photo-item { position: relative; border-radius: 8px; overflow: hidden; aspect-ratio: 1; background: #f0f0f0; }
.photo-grid .photo-item img { width: 100%; height: 100%; object-fit: cover; }
.photo-grid .photo-item .remove-photo { position: absolute; top: 4px; right: 4px; background: rgba(0,0,0,0.6); color: #fff; border: none; border-radius: 50%; width: 24px; height: 24px; cursor: pointer; font-size: 14px; display: flex; align-items: center; justify-content: center; }
.photo-grid .photo-item .photo-caption { position: absolute; bottom: 0; left: 0; right: 0; background: rgba(0,0,0,0.5); padding: 4px; }
.photo-grid .photo-item .photo-caption input { width: 100%; border: none; background: transparent; color: #fff; font-size: 11px; padding: 2px 4px; }
.login-page { display: flex; align-items: center; justify-content: center; min-height: 100vh; background: #0d1f13; }
.login-box { background: #fff; border-radius: 16px; padding: 40px; width: 380px; max-width: 90vw; }
.login-box h1 { font-size: 24px; margin-bottom: 4px; }
.login-box p { color: #666; margin-bottom: 24px; font-size: 14px; }
.login-box .error { color: #c62828; background: #ffebee; padding: 8px 12px; border-radius: 6px; font-size: 13px; margin-bottom: 16px; display: none; }
.login-box .btn { width: 100%; justify-content: center; padding: 12px; font-size: 16px; }
.login-logo { text-align: center; margin-bottom: 24px; }
.login-logo img { height: 48px; }

@media (max-width: 768px) {
  .admin-header { padding: 12px 16px; }
  .menu-toggle { display: block; }
  .admin-header nav { display: none; position: absolute; top: 100%; left: 0; right: 0; background: #0d1f13; flex-direction: column; padding: 12px 16px; gap: 4px; z-index: 100; border-top: 1px solid rgba(255,255,255,0.1); }
  .admin-header nav.open { display: flex; }
  .admin-header nav a, .admin-header .logout { width: 100%; padding: 10px 12px; }
  .admin-main { padding: 16px; }
  .stats-grid { grid-template-columns: 1fr; }
  .page-title { font-size: 22px; }
  .card { padding: 16px; }
  .table-wrap { overflow-x: auto; }
  .form-group input, .form-group textarea, .form-group select { font-size: 16px; }
}

@media (max-width: 480px) {
  .admin-header h1 { font-size: 16px; }
  .admin-main { padding: 12px; }
  .stats-grid { gap: 10px; }
  .stat-card { padding: 16px; }
  .stat-card .num { font-size: 28px; }
  .btn { width: 100%; justify-content: center; }
  .btn + .btn { margin-left: 0; margin-top: 8px; }
  .card { padding: 12px; border-radius: 8px; }
  .page-title { font-size: 20px; margin-bottom: 16px; }
  .photo-grid { grid-template-columns: repeat(auto-fill, minmax(80px, 1fr)); }
}

#editor-container { min-height: 350px; }
#editor-container .ql-editor { min-height: 350px; font-size: 15px; line-height: 1.8; }
.ql-toolbar { border-radius: 8px 8px 0 0; background: #fafafa; }
.ql-container { border-radius: 0 0 8px 8px; font-family: 'Segoe UI', system-ui, sans-serif; }

@media (max-width: 768px) {
  #editor-container { min-height: 250px; }
  #editor-container .ql-editor { min-height: 250px; }
}
