* { box-sizing: border-box; }
body { margin: 0; font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; background: #f3f5f9; color: #1f2937; }
h1, h2, h3 { margin: 0 0 .5rem; }
code { background: #eef1f6; padding: 2px 6px; border-radius: 4px; font-size: .85rem; word-break: break-all; }
.muted { color: #6b7280; }

.center-page { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 1rem; }
.container { max-width: 1200px; margin: 0 auto; padding: 1.5rem 1rem; }
.card { background: #fff; border-radius: 10px; box-shadow: 0 1px 3px rgba(0,0,0,.08); padding: 1.25rem; }

.topbar { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: .75rem 1.25rem; background: #1e3a8a; color: #fff; }
.topbar nav { display: flex; flex-wrap: wrap; gap: .5rem; }
.topbar .nav-link { background: transparent; color: #fff; }
.topbar .nav-link:hover { background: rgba(255, 255, 255, .15); }
.topbar .nav-link.active { background: #fff; color: #1e3a8a; }

.btn { display: inline-block; border: 0; border-radius: 6px; padding: .55rem 1.1rem; background: #2563eb; color: #fff; font-size: .95rem; text-decoration: none; cursor: pointer; }
.btn:hover { background: #1d4ed8; }
.btn:disabled { opacity: .6; cursor: default; }
.btn-light { background: #e5e7eb; color: #1f2937; }
.btn-light:hover { background: #d1d5db; }

.login { width: 100%; max-width: 360px; display: flex; flex-direction: column; gap: .8rem; }
.login label { display: flex; flex-direction: column; gap: .3rem; font-size: .9rem; }
input, select { padding: .55rem .7rem; border: 1px solid #d1d5db; border-radius: 6px; font-size: .95rem; }
.alert { background: #fef2f2; color: #b91c1c; border-radius: 6px; padding: .6rem .8rem; margin-bottom: 1rem; }
.login .alert { margin: 0; }

.result { max-width: 440px; text-align: center; }
.result-icon { font-size: 3rem; line-height: 1; margin-bottom: .5rem; }
.result-complete .result-icon { color: #16a34a; }
.result-terminate .result-icon { color: #dc2626; }

.info { margin-bottom: 1rem; line-height: 1.8; }
.filters { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 1rem; }
.stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: .75rem; margin-bottom: 1rem; }
.stat { display: flex; flex-direction: column; gap: .3rem; }
.stat strong { font-size: 1.5rem; }

.table-wrap { overflow-x: auto; background: #fff; border-radius: 10px; box-shadow: 0 1px 3px rgba(0,0,0,.08); }
table { width: 100%; border-collapse: collapse; font-size: .88rem; }
th, td { padding: .6rem .7rem; text-align: left; border-bottom: 1px solid #eef0f4; white-space: nowrap; }
th { background: #f9fafb; }
.badge { padding: 2px 8px; border-radius: 999px; font-size: .78rem; text-transform: capitalize; }
.badge-started { background: #fef3c7; color: #92400e; }
.badge-complete { background: #dcfce7; color: #166534; }
.badge-terminate { background: #fee2e2; color: #991b1b; }
.spinner { display: inline-block; width: 1rem; height: 1rem; border: 2px solid #d1d5db; border-top-color: #2563eb; border-radius: 50%; vertical-align: -3px; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
#surveyStatus { margin-bottom: .75rem; }

.pager { display: flex; flex-wrap: wrap; gap: .3rem; margin-top: 1rem; }
