@import url('/reference/portal.css');
header {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  max-width:1100px;
  margin:auto;
  padding:24px 20px 20px;
  border-bottom:1px solid var(--border);
}
header a {color:var(--text);font-size:16px;font-weight:600;text-decoration:none}
header span {font-size:12px;color:var(--muted)}
main {max-width:1100px;margin:24px auto 56px;padding:0 20px}
h1 {font-size:24px;font-weight:600;letter-spacing:-.025em;margin:0 0 8px}
h2 {font-size:18px;font-weight:600;margin:0 0 20px}
p {color:var(--muted)}
#mode:empty,#number:empty {display:none}
#mode:not(:empty) {padding:12px 16px;border:1px solid var(--amber-border);border-radius:8px;color:var(--amber-text);background:var(--amber-bg);font-size:13px}
#login,#dashboard,section section,#home {
  margin:20px 0;
  padding:24px;
  background:var(--surface);
  border:1px solid var(--border);
  border-radius:var(--radius);
}
#login {max-width:440px}
#login button {width:100%}
label {display:block;font-size:13px;font-weight:500;color:var(--text)}
input,textarea {
  display:block;
  width:100%;
  margin:8px 0 20px;
  padding:11px 12px;
  border:1px solid var(--border-strong);
  border-radius:8px;
  background:var(--bg);
  color:var(--text);
  font:inherit;
  font-size:14px;
}
textarea {resize:vertical;min-height:120px;font-family:var(--mono)}
input::placeholder,textarea::placeholder {color:var(--dim)}
input[type=file] {background:var(--surface-2);font-size:13px}
input::file-selector-button {padding:7px 10px;margin-right:12px;border:1px solid var(--border-strong);border-radius:6px;background:var(--surface-hover);color:var(--text);cursor:pointer}
button {
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  min-height:40px;
  padding:9px 16px;
  border:1px solid var(--accent-border);
  border-radius:8px;
  background:var(--accent);
  color:#071b13;
  font:inherit;
  font-size:13px;
  font-weight:600;
  cursor:pointer;
}
button:hover {background:var(--accent-hover);color:white}
button:disabled {opacity:.5;cursor:default}
button:focus-visible,input:focus-visible,textarea:focus-visible,a:focus-visible {outline:2px solid var(--accent);outline-offset:3px}
.actions,nav {display:flex;gap:10px;flex-wrap:wrap;margin:20px 0}
#logout,#refresh,#cancel {background:var(--surface-2);border-color:var(--border-strong);color:var(--text)}
#notice:not(:empty),#status {padding:14px 16px;border:1px solid var(--accent-border);border-radius:8px;color:var(--text);background:var(--accent-bg);margin:16px 0;font-size:13px;overflow-wrap:anywhere}
#stock-count {font-size:12px;margin:20px 0 12px}
.table {overflow-x:auto;border:1px solid var(--border);border-radius:10px}
table {border-collapse:collapse;width:100%;min-width:660px;table-layout:fixed;font-size:13px}
th {padding:12px 16px;background:var(--surface-2);color:var(--muted);font-size:12px;font-weight:500;text-align:left}
td {padding:16px;vertical-align:top;border-top:1px solid var(--border);overflow-wrap:anywhere}
th:nth-child(1){width:19%}th:nth-child(2){width:37%}th:nth-child(3){width:17%}th:nth-child(4){width:27%}
td:first-child {font-family:var(--mono);font-size:12px;color:var(--accent-text)}
td:last-child>a,td:last-child>button {display:flex;width:100%;margin-bottom:8px;padding:8px 10px;min-height:36px;border:1px solid var(--border-strong);border-radius:7px;background:var(--surface-2);color:var(--text);text-align:center;justify-content:center;text-decoration:none;font-size:12px;line-height:1.4;white-space:normal}
td:last-child>a:hover,td:last-child>button:hover {background:var(--surface-hover);border-color:var(--accent-border);color:var(--accent-text)}
td:last-child>:last-child {margin-bottom:0}
footer {margin-top:32px;padding-top:20px;border-top:1px solid var(--border);color:var(--dim);font-size:12px}
.check {display:flex;gap:10px;align-items:flex-start;font-weight:400}
.check input {width:auto;margin:5px 0}
details {padding:14px 0;border-bottom:1px solid var(--border)}
summary {cursor:pointer;color:var(--text)}
[hidden] {display:none!important}
@media(max-width:600px) {
  header {padding:20px 16px;align-items:flex-start;flex-direction:column;gap:4px}
  main {padding:0 16px;margin-top:20px}
  #login,#dashboard,section section,#home {padding:16px}
  h1 {font-size:22px}
  .actions button {flex:1 1 180px}
  #import>button {width:100%}
}
