/* SSL Admin — cùng ngôn ngữ thiết kế với bản demo */
* { box-sizing: border-box; }
body { margin: 0; background: #F4F6F9; color: #111827; font-family: Inter, "Segoe UI", system-ui, -apple-system, sans-serif; font-size: 14px; }
a { color: #1D4ED8; } a:hover { color: #1E3A8A; }
.mono { font-family: "JetBrains Mono", Consolas, "Courier New", monospace; }
.muted { color: #4B5563; }
.small { font-size: 12px; }
.hidden { display: none !important; }

/* Header */
.topbar { background: #0F172A; color: #fff; padding: 0 24px; display: flex; flex-wrap: wrap; align-items: center; gap: 24px; min-height: 60px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 16px; color: #fff; text-decoration: none; }
.brand svg { stroke: #93C5FD; }
.nav { display: flex; gap: 4px; flex: 1 1 auto; flex-wrap: wrap; }
.nav a { color: #CBD5E1; text-decoration: none; font-size: 14px; padding: 8px 14px; border-radius: 6px; }
.nav a.active { color: #fff; font-weight: 600; background: #1E293B; }
.who { font-size: 13px; color: #CBD5E1; }
.linkbtn { border: 0; background: none; padding: 0; font: inherit; color: #CBD5E1; font-size: 13px; text-decoration: underline; cursor: pointer; }
.linkbtn.blue { color: #1D4ED8; }

/* Layout */
.page { max-width: 1280px; margin: 0 auto; padding: 28px 24px 48px; display: flex; flex-direction: column; gap: 24px; }
.page h1 { margin: 0; font-size: 24px; }
.lead { margin: 6px 0 0; color: #4B5563; }
.cols { display: flex; flex-wrap: wrap; gap: 24px; align-items: flex-start; }
.col-main { flex: 1 1 520px; min-width: 0; }
.col-side { flex: 1 1 460px; min-width: 0; }
.card { background: #fff; border: 1px solid #E5E7EB; border-radius: 12px; padding: 24px; display: flex; flex-direction: column; gap: 18px; }
.card h2 { margin: 0; font-size: 16px; }
.row { display: flex; flex-wrap: wrap; gap: 16px; }
.row > * { flex: 1 1 200px; min-width: 0; }
.grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 640px) { .grid3 { grid-template-columns: 1fr; } }

/* Form */
.lb { font-size: 13px; font-weight: 600; color: #1F2937; display: block; margin-bottom: 6px; }
.ip { width: 100%; height: 42px; padding: 0 12px; border: 1px solid #CBD2DC; border-radius: 8px; font: inherit; font-size: 14px; color: #111827; background: #fff; }
.ip:focus { outline: 2px solid #93B4F5; border-color: #1D4ED8; }
.hint { font-size: 12px; color: #4B5563; margin-top: 5px; }
.hint.err { color: #B91C1C; }
.prefixed { display: flex; align-items: center; gap: 8px; }
.prefix { font-family: "JetBrains Mono", Consolas, monospace; color: #1D4ED8; font-weight: 600; white-space: nowrap; }
.seg { display: flex; border: 1px solid #CBD2DC; border-radius: 8px; overflow: hidden; }
.seg label { flex: 1; position: relative; }
.seg input { position: absolute; opacity: 0; inset: 0; }
.seg span { display: flex; align-items: center; justify-content: center; min-height: 40px; padding: 6px 10px; text-align: center; cursor: pointer; background: #fff; color: #1F2937; }
.seg input:checked + span { background: #1D4ED8; color: #fff; font-weight: 600; }
.seg input:focus-visible + span { outline: 2px solid #93B4F5; outline-offset: -3px; }
details.adv { border: 1px solid #E5E7EB; border-radius: 8px; padding: 12px 14px; }
details.adv summary { font-size: 13px; font-weight: 600; cursor: pointer; }
.check { display: flex; gap: 10px; align-items: center; font-size: 14px; }
.check input { width: 18px; height: 18px; accent-color: #1D4ED8; }

/* Buttons */
.btn { height: 44px; padding: 0 22px; border: 0; border-radius: 8px; font: inherit; font-size: 14px; font-weight: 600; background: #1D4ED8; color: #fff; cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; justify-content: center; }
.btn:hover { background: #1E40AF; color: #fff; }
.btn:disabled { background: #CBD5E1; color: #334155; cursor: not-allowed; }
.btn.full { width: 100%; }
.btn2 { height: 40px; padding: 0 14px; border: 1px solid #CBD2DC; border-radius: 8px; background: #fff; font: inherit; font-size: 13px; color: #1F2937; cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; }
.btn2:hover { background: #F8FAFC; color: #111827; }
.btn2.sm { height: 34px; padding: 0 10px; font-size: 12px; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; }

/* Boxes */
.box { border-radius: 8px; padding: 10px 14px; font-size: 13px; line-height: 1.5; }
.box.ok { background: #ECFDF5; border: 1px solid #A7F3D0; color: #065F46; }
.box.err { background: #FEF2F2; border: 1px solid #FCA5A5; color: #7F1D1D; }
.box.warn { background: #FFFBEB; border: 1px solid #FCD34D; color: #78350F; }
.box.info { background: #EFF6FF; border: 1px solid #BFDBFE; color: #1E3A8A; }
.box.plain { background: #F8FAFC; border: 1px solid #E5E7EB; color: #111827; }
.box.dashed { background: #F8FAFC; border: 1px dashed #CBD2DC; }
.flashes { display: flex; flex-direction: column; gap: 8px; }
.pathbox .path { font-family: "JetBrains Mono", Consolas, monospace; font-size: 13px; word-break: break-all; }
.empty { border: 1px dashed #CBD2DC; border-radius: 10px; padding: 48px 24px; text-align: center; color: #4B5563; line-height: 1.6; }
pre.pem { margin: 0; background: #0F172A; color: #E2E8F0; border-radius: 8px; padding: 16px; font-family: "JetBrains Mono", Consolas, monospace; font-size: 12px; line-height: 1.6; white-space: pre-wrap; word-break: break-all; max-height: 360px; overflow: auto; }

/* Tabs */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid #E5E7EB; }
.tabs button { height: 40px; padding: 0 14px; border: 0; background: none; font: inherit; font-size: 13px; cursor: pointer; margin-bottom: -1px; border-bottom: 2px solid transparent; color: #4B5563; }
.tabs button.on { border-bottom-color: #1D4ED8; color: #1D4ED8; font-weight: 600; }

/* Table */
.tablewrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th { text-align: left; font-size: 12px; font-weight: 600; color: #4B5563; padding: 10px 12px; border-bottom: 1px solid #E5E7EB; white-space: nowrap; }
td { font-size: 13px; color: #1F2937; padding: 12px; border-bottom: 1px solid #EEF0F3; white-space: nowrap; }
td.mono { font-size: 12px; }
.pill { font-size: 12px; font-weight: 600; padding: 3px 8px; border-radius: 999px; }
.pill.ok { background: #ECFDF5; color: #065F46; }
.pill.err { background: #FEF2F2; color: #991B1B; }
.pill.warn { background: #FFFBEB; color: #78350F; }
.inline { display: inline; }
.searchform { display: flex; gap: 8px; }
.searchform .ip { width: 260px; height: 38px; }
.headrow { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; }

/* Password strength */
.meter { display: flex; align-items: center; gap: 10px; margin-top: 8px; }
.meter .bar { flex: 1; height: 6px; background: #E5E7EB; border-radius: 3px; overflow: hidden; }
.meter .fill { height: 100%; width: 0; background: #DC2626; transition: width .2s; }
.meter .lbl { font-size: 12px; font-weight: 600; min-width: 80px; text-align: right; color: #4B5563; }
.rules { margin: 0; padding: 12px 14px; list-style: none; background: #F8FAFC; border: 1px solid #E5E7EB; border-radius: 8px; display: flex; flex-direction: column; gap: 6px; }
.rules li { font-size: 13px; color: #4B5563; }
.rules li::before { content: "•"; display: inline-block; width: 18px; font-weight: 700; }
.rules li.pass { color: #047857; }
.rules li.pass::before { content: "✓"; }

/* Auth pages */
.authwrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 32px 16px; }
.authcol { width: 100%; max-width: 420px; display: flex; flex-direction: column; gap: 20px; }
.authcol.wide { max-width: 640px; }
.authbrand { display: flex; align-items: center; justify-content: center; gap: 10px; font-weight: 700; font-size: 20px; }
.authbrand svg { stroke: #1D4ED8; }
.otpinput { font-family: "JetBrains Mono", Consolas, monospace; letter-spacing: 6px; font-size: 20px; text-align: center; height: 48px; }
.steps { margin: 0; padding: 0; list-style: none; display: flex; gap: 8px; }
.steps li { flex: 1; display: flex; align-items: center; gap: 8px; font-size: 13px; padding: 10px 12px; border-radius: 8px; background: #fff; border: 1px solid #E5E7EB; color: #4B5563; }
.steps li .dot { width: 22px; height: 22px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 12px; flex: none; background: #E5E7EB; color: #374151; }
.steps li.cur { border-color: #1D4ED8; color: #1D4ED8; font-weight: 600; }
.steps li.cur .dot { background: #1D4ED8; color: #fff; }
.steps li.done .dot { background: #059669; color: #fff; }
.qrrow { display: flex; flex-wrap: wrap; gap: 20px; align-items: center; }
.qr { border: 1px solid #E5E7EB; border-radius: 8px; padding: 8px; background: #fff; flex: none; line-height: 0; }
.secret { font-family: "JetBrains Mono", Consolas, monospace; font-size: 15px; background: #F8FAFC; border: 1px solid #E5E7EB; border-radius: 8px; padding: 10px 12px; letter-spacing: 1px; word-break: break-all; }
.codes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; background: #0F172A; border-radius: 8px; padding: 16px; margin: 0; list-style: none; }
.codes li { font-family: "JetBrains Mono", Consolas, monospace; font-size: 15px; color: #E2E8F0; text-align: center; padding: 4px; }
.foot { margin: 0; font-size: 12px; color: #4B5563; text-align: center; line-height: 1.6; }
.h1auth { margin: 0; font-size: 20px; }
.mt8 { margin-top: 8px; }
.mt16 { margin-top: 16px; }
.narrow { max-width: 240px; }
fieldset.bare { border: 0; padding: 0; margin: 0; min-width: 0; }
fieldset.bare legend { padding: 0; }
.narrowcol { flex: 1 1 400px; }
.widecol { flex: 2 1 600px; }
@media print { .topbar, .actions, .steps, .check, .btn { display: none !important; } .codes { background: #fff; } .codes li { color: #000; } }
