﻿* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; display: flex; min-height: 100vh; background: #f0f2f5; color: #333; }
.sidebar { width: 220px; background: #1a1a2e; color: #fff; padding: 20px 0; position: fixed; height: 100vh; overflow-y: auto; z-index: 100; transition: transform .3s; }
.sidebar .logo { font-size: 18px; font-weight: 700; padding: 0 20px 20px; border-bottom: 1px solid #333; }
.sidebar ul { list-style: none; padding: 10px 0; }
.sidebar li a { display: block; padding: 10px 20px; color: #aaa; text-decoration: none; transition: .2s; }
.sidebar li a:hover, .sidebar li a.active { background: #16213e; color: #fff; border-left: 3px solid #0f3460; }
.sidebar .user-info { position: absolute; bottom: 20px; left: 0; right: 0; padding: 10px 20px; font-size: 12px; color: #888; border-top: 1px solid #333; }
.menu-toggle { display: none; position: fixed; top: 10px; left: 10px; z-index: 200; background: #1a1a2e; color: #fff; border: none; border-radius: 4px; padding: 8px 12px; font-size: 18px; cursor: pointer; }
.content { margin-left: 220px; padding: 24px; flex: 1; min-width: 0; }
h1 { font-size: 22px; margin-bottom: 20px; }
h2 { font-size: 18px; margin: 16px 0 10px; }
.card { background: #fff; border-radius: 8px; padding: 20px; margin-bottom: 16px; box-shadow: 0 1px 3px rgba(0,0,0,.1); overflow-x: auto; }
.card-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; flex-wrap: wrap; gap: 8px; }
.card-header h3 { font-size: 16px; }
table { width: 100%; border-collapse: collapse; font-size: 13px; min-width: 500px; }
th, td { padding: 8px 10px; text-align: left; border-bottom: 1px solid #eee; white-space: nowrap; }
th { background: #f8f9fa; font-weight: 600; position: sticky; top: 0; }
tr:hover { background: #f5f5f5; }
.badge { display: inline-block; padding: 2px 8px; border-radius: 10px; font-size: 11px; font-weight: 600; }
.badge-green { background: #d4edda; color: #155724; }
.badge-red { background: #f8d7da; color: #721c24; }
.badge-yellow { background: #fff3cd; color: #856404; }
.badge-blue { background: #d1ecf1; color: #0c5460; }
.badge-gray { background: #e9ecef; color: #495057; }
.btn { padding: 6px 14px; border: none; border-radius: 4px; cursor: pointer; font-size: 13px; transition: .2s; }
.btn-primary { background: #0f3460; color: #fff; }
.btn-primary:hover { background: #1a4a7a; }
.btn-danger { background: #dc3545; color: #fff; }
.btn-danger:hover { background: #c82333; }
.btn-success { background: #28a745; color: #fff; }
.btn-success:hover { background: #218838; }
.btn-sm { padding: 4px 10px; font-size: 12px; }
.form-group { margin-bottom: 12px; }
.form-group label { display: block; margin-bottom: 4px; font-size: 13px; font-weight: 600; }
.form-group input, .form-group select, .form-group textarea { width: 100%; padding: 8px 10px; border: 1px solid #ddd; border-radius: 4px; font-size: 13px; }
.form-group input:focus, .form-group select:focus { outline: none; border-color: #0f3460; }
.form-row { display: flex; gap: 12px; flex-wrap: wrap; }
.form-row .form-group { flex: 1; min-width: 120px; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 16px; margin-bottom: 20px; }
.stat-card { background: #fff; border-radius: 8px; padding: 16px; box-shadow: 0 1px 3px rgba(0,0,0,.1); }
.stat-card .label { font-size: 12px; color: #888; }
.stat-card .value { font-size: 24px; font-weight: 700; margin-top: 4px; }
.stat-card .value.green { color: #28a745; }
.stat-card .value.red { color: #dc3545; }
.stat-card .value.blue { color: #0f3460; }
.toast { position: fixed; top: 20px; right: 20px; padding: 12px 20px; border-radius: 6px; color: #fff; font-size: 13px; z-index: 9999; animation: fadeIn .3s; max-width: 90vw; }
.toast-success { background: #28a745; }
.toast-error { background: #dc3545; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: translateY(0); } }
.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,.5); z-index: 1000; display: flex; align-items: center; justify-content: center; padding: 16px; }
.modal { background: #fff; border-radius: 8px; padding: 24px; width: 100%; max-width: 600px; max-height: 80vh; overflow-y: auto; }
.modal h2 { margin-top: 0; }
.modal-actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 16px; flex-wrap: wrap; }
.loading { text-align: center; padding: 40px; color: #888; }
.empty { text-align: center; padding: 40px; color: #aaa; }
.tag { display: inline-block; padding: 2px 6px; background: #e9ecef; border-radius: 3px; font-size: 11px; margin: 1px; }
.spin { display: inline-block; animation: spin 1s linear infinite; }
@keyframes spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
@media (max-width: 768px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: translateX(0); }
  .menu-toggle { display: block; }
  .content { margin-left: 0; padding: 12px; padding-top: 50px; }
  h1 { font-size: 18px; margin-bottom: 12px; }
  .card { padding: 12px; margin-bottom: 10px; }
  .card-header { flex-direction: column; align-items: flex-start; }
  .card-header div { width: 100%; display: flex; flex-wrap: wrap; gap: 6px; }
  .card-header .btn { flex: 1; min-width: 0; text-align: center; }
  .form-row { flex-direction: column; gap: 0; }
  .form-row .form-group { min-width: 0; }
  table { font-size: 11px; min-width: 400px; }
  th, td { padding: 5px 6px; }
  .grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .stat-card { padding: 10px; }
  .stat-card .value { font-size: 18px; }
  .modal { padding: 16px; max-width: 95vw; }
  .modal-actions { flex-direction: column; }
  .modal-actions .btn { width: 100%; }
  .btn { padding: 10px 14px; font-size: 14px; }
  .btn-sm { padding: 6px 10px; font-size: 12px; }
}
@keyframes loadingBar { 0%{background-position:200% 0} 100%{background-position:-200% 0} }
.acct-cb-label { display: inline-block; margin: 2px 6px 2px 0; cursor: pointer; user-select: none; }
.acct-cb-label input { margin-right: 3px; vertical-align: middle; }
