* { box-sizing: border-box; }
body {
    margin: 0;
    font-family: 'Sarabun', 'Segoe UI', Tahoma, sans-serif;
    background: #f4f6f9;
    color: #1f2937;
}
a { color: #1d4ed8; text-decoration: none; }
a:hover { text-decoration: underline; }

.topnav { background: #0f3d63; color: #fff; }
.topnav-inner {
    max-width: 1100px; margin: 0 auto; padding: 12px 20px;
    display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap;
}
.brand { color: #fff; font-weight: 700; font-size: 18px; }
.nav-links a { color: #dbeafe; margin-left: 18px; }
.nav-links a:hover { color: #fff; }
.nav-user { margin-left: 18px; color: #93c5fd; }

.container { max-width: 1100px; margin: 24px auto; padding: 0 20px 60px; }

.card {
    background: #fff; border-radius: 10px; padding: 20px 24px;
    box-shadow: 0 1px 3px rgba(0,0,0,.08); margin-bottom: 20px;
}

h1 { font-size: 22px; }
h2 { font-size: 18px; }

table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 10px 8px; border-bottom: 1px solid #e5e7eb; font-size: 14px; }
th { background: #f1f5f9; color: #334155; }
tr:hover td { background: #f8fafc; }

.code-badge {
    display: inline-block; background: #0f3d63; color: #fff; font-weight: 700;
    padding: 3px 10px; border-radius: 6px; font-family: monospace; letter-spacing: 1px;
}

.badge-gray, .badge-green, .badge-red, .badge-yellow {
    display: inline-block; padding: 3px 10px; border-radius: 12px; font-size: 12px; font-weight: 600;
}
.badge-gray { background: #e5e7eb; color: #374151; }
.badge-green { background: #dcfce7; color: #15803d; }
.badge-red { background: #fee2e2; color: #b91c1c; }
.badge-yellow { background: #fef9c3; color: #92400e; }

form.stacked label { display: block; font-weight: 600; margin: 14px 0 6px; font-size: 14px; }
form.stacked input[type=text], form.stacked input[type=number], form.stacked input[type=password],
form.stacked select, form.stacked textarea, form.stacked input[type=file] {
    width: 100%; padding: 9px 10px; border: 1px solid #cbd5e1; border-radius: 6px; font-size: 14px; font-family: inherit;
}
form.stacked textarea { min-height: 90px; resize: vertical; }
.hint { color: #64748b; font-size: 12px; margin-top: 4px; }

.btn {
    display: inline-block; background: #1d4ed8; color: #fff; border: none;
    padding: 9px 18px; border-radius: 6px; font-size: 14px; cursor: pointer; font-weight: 600;
}
.btn:hover { background: #1e40af; text-decoration: none; color:#fff; }
.btn.btn-green { background: #15803d; }
.btn.btn-green:hover { background: #166534; }
.btn.btn-red { background: #b91c1c; }
.btn.btn-red:hover { background: #991b1b; }
.btn.btn-gray { background: #64748b; }
.btn-row { margin-top: 18px; display: flex; gap: 10px; }

.flash { padding: 12px 16px; border-radius: 8px; margin-bottom: 16px; font-size: 14px; }
.flash.success { background: #dcfce7; color: #15803d; }
.flash.error { background: #fee2e2; color: #b91c1c; }

.stat-grid { display: flex; gap: 16px; flex-wrap: wrap; }
.stat-box { flex: 1; min-width: 160px; background: #fff; border-radius: 10px; padding: 16px 20px; box-shadow: 0 1px 3px rgba(0,0,0,.08); }
.stat-box .num { font-size: 24px; font-weight: 700; color: #0f3d63; }
.stat-box .label { font-size: 13px; color: #64748b; }

.login-wrap { max-width: 380px; margin: 90px auto; }
.login-wrap .card { text-align: center; }

.steps-list { list-style: none; padding: 0; margin: 0; }
.steps-list li { display: flex; justify-content: space-between; align-items: center; padding: 12px 0; border-bottom: 1px solid #e5e7eb; }
.step-order { display:inline-block; width:26px;height:26px;border-radius:50%;background:#0f3d63;color:#fff;text-align:center;line-height:26px;font-size:13px;margin-right:10px; }

.timeline { list-style: none; padding: 0; margin: 0; }
.timeline li { padding: 12px 16px; border-left: 3px solid #cbd5e1; margin-bottom: 8px; background: #f8fafc; border-radius: 0 6px 6px 0; }
.timeline li.done { border-left-color: #15803d; }
.timeline li.rejected { border-left-color: #b91c1c; }
