/* RNIDS Bulk Registrator — stylesheet */

:root {
    --bg: #f5f6f8;
    --panel: #ffffff;
    --text: #1a1f2e;
    --muted: #6b7280;
    --border: #e3e6eb;
    --accent: #2563eb;
    --accent-hover: #1d4ed8;
    --ok: #16a34a;
    --ok-bg: #dcfce7;
    --warn: #ca8a04;
    --warn-bg: #fef3c7;
    --err: #dc2626;
    --err-bg: #fee2e2;
    --info: #0891b2;
    --info-bg: #cffafe;
    --shadow: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
}

* { box-sizing: border-box; }

html, body {
    margin: 0; padding: 0;
    background: var(--bg);
    color: var(--text);
    font: 14px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

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

.muted { color: var(--muted); }
.small { font-size: 12px; }

code {
    background: #f1f3f5;
    padding: 1px 5px;
    border-radius: 3px;
    font-size: 12.5px;
    font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}

.mono { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: 13px; }

/* Topbar */
.topbar {
    background: #fff;
    border-bottom: 1px solid var(--border);
    padding: 14px 0;
    margin-bottom: 24px;
}
.topbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.topbar h1 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
}
.topbar nav {
    display: flex;
    gap: 16px;
    align-items: center;
}
.btn-link {
    color: var(--muted);
    font-size: 13px;
}

/* Cards */
.card {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 20px 22px;
    margin-bottom: 16px;
    box-shadow: var(--shadow);
}
.card h2 {
    margin: 0 0 16px;
    font-size: 15px;
    font-weight: 600;
    color: var(--text);
}

/* Grid */
.grid { display: grid; gap: 14px; }
.grid-2 { grid-template-columns: 1fr 1fr; }
.grid-3 { grid-template-columns: 1fr 1fr 1fr; }
@media (max-width: 720px) {
    .grid-2, .grid-3 { grid-template-columns: 1fr; }
}

/* Form */
label {
    display: block;
    font-size: 13px;
    color: var(--muted);
    font-weight: 500;
}
label > input, label > select, label > textarea {
    display: block;
    width: 100%;
    margin-top: 5px;
    padding: 9px 11px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 5px;
    font: inherit;
    color: var(--text);
    transition: border-color .15s, box-shadow .15s;
}
label > input:focus, label > select:focus, label > textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}
textarea { font-family: ui-monospace, monospace; font-size: 13px; resize: vertical; }

.hint {
    margin: 8px 0 0;
    font-size: 12px;
    color: var(--muted);
}

.checkbox {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 7px 0;
    cursor: pointer;
    color: var(--text);
}
.checkbox input { margin: 0; width: auto; }

/* Tags inside hint */
.ok-tag { color: var(--ok); margin-left: 6px; font-weight: 600; }
.err-tag { color: var(--err); margin-left: 6px; font-weight: 600; }

/* Buttons */
.btn {
    display: inline-block;
    padding: 9px 18px;
    border: none;
    border-radius: 5px;
    font: 500 14px/1 inherit;
    cursor: pointer;
    transition: background .15s, transform .05s;
}
.btn:active { transform: translateY(1px); }
.btn-primary {
    background: var(--accent);
    color: #fff;
}
.btn-primary:hover { background: var(--accent-hover); }
.btn-secondary {
    background: #fff;
    color: var(--text);
    border: 1px solid var(--border);
}
.btn-secondary:hover { background: #f1f3f5; }
.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-row {
    display: flex;
    gap: 10px;
    margin-top: 16px;
}

.actions .checkbox {
    margin-bottom: 4px;
}

/* Progress */
.progress {
    position: relative;
    height: 22px;
    background: #f1f3f5;
    border-radius: 11px;
    margin-bottom: 16px;
    overflow: hidden;
}
.progress-bar {
    position: absolute;
    inset: 0;
    width: 0;
    background: linear-gradient(90deg, var(--accent), #4c84f7);
    transition: width .25s ease;
}
.progress-text {
    position: relative;
    display: block;
    text-align: center;
    line-height: 22px;
    font-size: 12px;
    font-weight: 600;
    color: var(--text);
    z-index: 1;
    mix-blend-mode: difference;
    color: #fff;
}

/* Summary badges */
.summary {
    display: flex;
    gap: 10px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}
.badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}
.badge.ok    { background: var(--ok-bg);   color: var(--ok); }
.badge.warn  { background: var(--warn-bg); color: var(--warn); }
.badge.err   { background: var(--err-bg);  color: var(--err); }
.badge.info  { background: var(--info-bg); color: var(--info); }
.badge.muted { background: #f1f3f5;         color: var(--muted); }

/* Results table */
.results {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 12px;
    font-size: 13px;
}
.results th, .results td {
    padding: 8px 10px;
    text-align: left;
    border-bottom: 1px solid var(--border);
    vertical-align: top;
}
.results th {
    background: #f8f9fb;
    font-weight: 600;
    color: var(--muted);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}
.results td.msg {
    max-width: 380px;
    word-break: break-word;
}
.row-ok    { background: rgba(22, 163, 74, 0.04); }
.row-warn  { background: rgba(202, 138, 4, 0.04); }
.row-err   { background: rgba(220, 38, 38, 0.04); }
.row-info  { background: rgba(8, 145, 178, 0.04); }

.log-row td { font-size: 12px; color: var(--muted); background: #fafbfc; }
.log-err td { color: var(--err); }
.log-warn td { color: var(--warn); }
.log-ok td { color: var(--ok); }

/* Alerts */
.alert {
    padding: 10px 14px;
    border-radius: 5px;
    margin-bottom: 14px;
    font-size: 13px;
}
.alert-err { background: var(--err-bg); color: var(--err); }
.alert-ok  { background: var(--ok-bg);  color: var(--ok); }

/* Login */
.centered {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
}
.login-box {
    width: 100%;
    max-width: 380px;
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 30px;
    box-shadow: var(--shadow);
}
.login-box header { text-align: center; margin-bottom: 22px; }
.login-box header h1 { margin: 0 0 4px; font-size: 18px; }
.login-box header p { margin: 0; font-size: 13px; }
.login-box label { margin-bottom: 14px; color: var(--text); font-weight: 500; }
.login-box .btn { width: 100%; margin-top: 6px; }
.login-box footer { text-align: center; margin-top: 18px; }

/* Contact verify chips */
.info-tag { color: var(--info); margin-left: 6px; font-weight: 600; font-size: 12px; }
.btn-inline {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--accent);
    padding: 4px 10px;
    border-radius: 4px;
    font: 12px inherit;
    cursor: pointer;
    margin-right: 10px;
}
.btn-inline:hover { background: #f1f3f5; }
.btn-inline:disabled { opacity: 0.5; cursor: not-allowed; }

.contact-chip {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 3px;
    font-size: 12px;
    margin: 3px 4px 3px 0;
}
.contact-chip.ok  { background: var(--ok-bg);  color: var(--ok); }
.contact-chip.err { background: var(--err-bg); color: var(--err); }
