* { box-sizing: border-box; }
body { margin: 0; font-family: system-ui, -apple-system, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif; background: #f4f6f9; color: #1f2937; }

.topbar { background: #1e3a8a; color: #fff; box-shadow: 0 2px 8px rgba(0,0,0,.15); }
.topbar .nav { display: flex; align-items: center; gap: 18px; max-width: 1100px; margin: 0 auto; padding: 0 16px; height: 56px; }
.brand { font-size: 18px; font-weight: 700; color: #fff; text-decoration: none; }
.topbar nav { display: flex; gap: 4px; flex: 1; flex-wrap: wrap; }
.topbar nav a { color: #dbeafe; text-decoration: none; padding: 6px 12px; border-radius: 6px; font-size: 14px; }
.topbar nav a:hover { background: rgba(255,255,255,.15); color: #fff; }
.user-info { display: flex; align-items: center; gap: 10px; font-size: 14px; color: #e0e7ff; white-space: nowrap; }
.user-info a { color: #fff; }

.wrap { max-width: 1100px; margin: 0 auto; padding: 20px 16px; }
.footer { text-align: center; color: #94a3b8; font-size: 13px; padding: 24px 0; }

.card { background: #fff; border-radius: 10px; padding: 20px; margin-bottom: 18px; box-shadow: 0 1px 3px rgba(0,0,0,.08); }
.card h2 { margin: 0 0 14px; font-size: 18px; border-left: 4px solid #1e3a8a; padding-left: 10px; }
.card h3 { margin: 0 0 10px; font-size: 15px; color: #334155; }

.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; margin-bottom: 18px; }
.stat { background: #fff; border-radius: 10px; padding: 18px; text-align: center; box-shadow: 0 1px 3px rgba(0,0,0,.08); color: #64748b; font-size: 14px; }
.stat-num { font-size: 30px; font-weight: 700; color: #1e3a8a; }

table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { padding: 9px 10px; border-bottom: 1px solid #e5e7eb; text-align: left; vertical-align: middle; }
th { background: #f8fafc; color: #475569; white-space: nowrap; }
.table-scroll { overflow-x: auto; }

.badge { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 12px; white-space: nowrap; }
.badge-pending   { background: #fef3c7; color: #92400e; }
.badge-waiting   { background: #dbeafe; color: #1e40af; }
.badge-departed  { background: #e0e7ff; color: #3730a3; }
.badge-aboard    { background: #cffafe; color: #155e75; }
.badge-returned  { background: #fce7f3; color: #9d174d; }
.badge-completed { background: #dcfce7; color: #166534; }
.badge-cancelled { background: #f3f4f6; color: #6b7280; }

.alert { padding: 10px 14px; border-radius: 8px; margin-bottom: 14px; font-size: 14px; }
.alert-success { background: #dcfce7; color: #166534; border: 1px solid #86efac; }
.alert-error   { background: #fee2e2; color: #991b1b; border: 1px solid #fca5a5; }
.alert-info    { background: #dbeafe; color: #1e40af; border: 1px solid #93c5fd; }

.btn { display: inline-block; border: none; cursor: pointer; border-radius: 6px; padding: 8px 16px; font-size: 14px; background: #1e3a8a; color: #fff; text-decoration: none; }
.btn:hover { background: #2563eb; color: #fff; }
.btn-sm { padding: 4px 10px; font-size: 12px; }
.btn-block { width: 100%; }
.btn-danger { background: #dc2626; }
.btn-danger:hover { background: #b91c1c; }
.btn-success { background: #16a34a; }
.btn-success:hover { background: #15803d; }
.btn-ghost { background: #fff; color: #1e3a8a; border: 1px solid #cbd5e1; }
.btn-ghost:hover { background: #eff6ff; }

label { display: block; font-size: 13px; color: #475569; margin-bottom: 4px; font-weight: 600; }
input[type=text], input[type=password], input[type=number], input[type=datetime-local], input[type=file], select, textarea { width: 100%; padding: 8px 10px; border: 1px solid #cbd5e1; border-radius: 6px; font-size: 14px; background: #fff; }
textarea { resize: vertical; }
.form-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; }
.field { margin-bottom: 14px; }

.tabs { display: flex; gap: 8px; margin-bottom: 16px; }
.tabs a { padding: 8px 18px; border-radius: 6px; background: #e2e8f0; color: #334155; text-decoration: none; font-size: 14px; }
.tabs a.active { background: #1e3a8a; color: #fff; }

.auth-card { max-width: 520px; margin: 20px auto; }
.muted { color: #6b7280; font-size: 13px; }
.photo { max-width: 220px; border-radius: 8px; border: 1px solid #e5e7eb; display: block; margin-top: 6px; }

.timeline { list-style: none; padding: 0; margin: 0; }
.timeline li { padding: 10px 0 10px 14px; border-left: 2px solid #cbd5e1; position:relative; font-size: 14px; }
.timeline li::before { content: ''; position: absolute; left: -5px; top: 16px; width: 8px; height: 8px; border-radius: 50%; background: #1e3a8a; }

dl.kv { display: grid; grid-template-columns: 130px 1fr; gap: 6px 12px; margin: 0; font-size: 14px; }
dl.kv dt { color: #6b7280; }
dl.kv dd { margin: 0; }

.inline-actions { display: inline-flex; gap: 6px; align-items: center; }
.inline-actions input[type=text] { width: 140px; padding: 4px 8px; font-size: 13px; }
.actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 8px; }
.empty { color: #94a3b8; text-align: center; padding: 18px 0; }
