:root { color-scheme: light; --ink:#18202a; --muted:#647080; --line:#d8dde3; --surface:#fff; --bg:#f3f5f7; --brand:#176b51; --danger:#b42318; }
* { box-sizing:border-box; }
body { margin:0; background:var(--bg); color:var(--ink); font-family:"Yu Gothic UI","Meiryo",sans-serif; font-size:15px; }
button,input,textarea { font:inherit; }
.site-header { background:#fff; border-bottom:1px solid var(--line); }
.header-inner { min-height:64px; max-width:1400px; margin:auto; padding:10px 24px; display:flex; align-items:center; justify-content:space-between; gap:20px; }
.brand { color:var(--ink); text-decoration:none; font-size:18px; font-weight:700; }
.main-nav { margin-left:auto; display:flex; align-items:center; gap:18px; }
.main-nav a { color:#174d77; text-decoration:none; font-weight:700; }
.main-nav span { color:var(--muted); }
.page { max-width:1400px; margin:0 auto; padding:32px 24px 60px; }
.panel { background:var(--surface); border:1px solid var(--line); border-radius:6px; padding:28px; }
.narrow { max-width:480px; margin:45px auto; }
.form-panel { max-width:760px; margin:auto; }
.clinic-identity { margin:-28px -28px 28px; padding:18px 28px; background:#e7f2ed; border-bottom:1px solid #bdd7cc; display:flex; align-items:center; justify-content:space-between; gap:20px; }
.clinic-identity-label { color:#48645a; font-size:13px; }
.clinic-identity strong { color:#10543f; font-size:20px; overflow-wrap:anywhere; }
h1 { margin:0 0 24px; font-size:25px; letter-spacing:0; }
h2 { margin:0 0 16px; font-size:18px; letter-spacing:0; }
.form-grid { display:grid; gap:20px; }
.two-columns { display:grid; grid-template-columns:1fr 1fr; gap:16px; }
label { display:grid; gap:8px; font-weight:600; }
input,textarea { width:100%; padding:11px 12px; border:1px solid #aeb7c2; border-radius:4px; background:#fff; color:var(--ink); }
input:focus,textarea:focus { outline:3px solid #b7ded0; border-color:var(--brand); }
input[type=file] { padding:14px; }
.help { color:var(--muted); font-size:13px; font-weight:400; }
.button { display:inline-flex; min-height:40px; align-items:center; justify-content:center; border:1px solid transparent; border-radius:4px; padding:8px 16px; cursor:pointer; text-decoration:none; font-weight:700; }
.primary { background:var(--brand); color:#fff; }
.secondary { background:#fff; color:var(--ink); border-color:var(--line); }
.danger { background:#fff; color:var(--danger); border-color:#e5a6a1; }
.sub-link,.file-link { display:block; margin-top:18px; color:#075fbd; overflow-wrap:anywhere; }
.file-link + .file-link { margin-top:8px; }
.notice { max-width:760px; margin:0 auto 18px; padding:12px 15px; border-radius:4px; }
.notice.error { background:#fee4e2; color:#8a1c13; }
.notice.success { background:#dff3e9; color:#145c43; }
.password-notice { max-width:760px; margin:0 0 20px; padding:18px; border:2px solid #176b51; border-radius:6px; background:#eef8f4; }
.password-notice strong,.password-notice code { display:block; }
.password-notice code { margin:12px 0; padding:12px; border:1px solid #9bc7b7; background:#fff; color:#10251e; font-size:20px; overflow-wrap:anywhere; }
.password-notice p { margin:0; color:#48645a; }
[hidden] { display:none !important; }
.upload-mode { display:flex; flex-wrap:wrap; gap:16px; border:0; padding:0; margin:0; min-width:0; }
.upload-mode legend { margin-bottom:8px; }
.upload-mode label { display:flex; flex-direction:row; align-items:center; gap:6px; }
.upload-mode input { width:16px; height:16px; margin:0; }
#selection-summary, #selection-error { overflow-wrap:anywhere; min-width:0; margin:0; }
#selection-error { color:#a32a20; }
#folder-picker input, #files-picker input { width:100%; min-width:0; max-width:100%; }
.file-link { overflow-wrap:anywhere; }
.complete { text-align:center; }
.complete .button { margin-top:12px; }
.admin-heading { display:flex; justify-content:space-between; align-items:end; margin-bottom:18px; }
.admin-heading h1 { margin-bottom:6px; }
.admin-heading p { margin:0; color:var(--muted); }
.filter-bar { margin-bottom:18px; display:grid; grid-template-columns:minmax(260px,1fr) 150px auto auto; gap:10px; }
.filter-bar select { padding:10px; border:1px solid #aeb7c2; border-radius:4px; background:#fff; }
.table-wrap { overflow:auto; background:#fff; border:1px solid var(--line); border-radius:6px; }
table { width:100%; border-collapse:collapse; min-width:1050px; }
th,td { padding:13px 14px; border-bottom:1px solid var(--line); text-align:left; vertical-align:top; }
th { background:#eef1f3; font-size:13px; }
.nowrap { white-space:nowrap; }
.prewrap { white-space:pre-wrap; min-width:180px; }
.status-cell { min-width:160px; }
.status { display:block; margin-bottom:5px; color:var(--muted); font-size:13px; }
.status.ok { color:#176b51; font-weight:700; }
.status.pending,.sync-error { color:#b54708; }
.sync-error { display:block; max-width:260px; overflow-wrap:anywhere; }
.status-cell + td + td form + form { margin-top:8px; }
.deleted-row,.deleted-row td { background:#e4e6e8; color:#68717b; }
.deleted-row a { color:#68717b; }
.deleted-badge { display:inline-block; padding:4px 8px; border:1px solid #89919a; border-radius:4px; background:#d2d5d8; color:#343a40; font-weight:700; }
.deleted-detail { display:block; margin-top:6px; color:#68717b; font-size:12px; }
.restore-form { margin-top:10px; }
.status-summary { display:grid; grid-template-columns:repeat(3,minmax(150px,1fr)); gap:14px; margin-bottom:20px; }
.status-summary div { background:#fff; border:1px solid var(--line); border-radius:6px; padding:18px; display:flex; justify-content:space-between; align-items:center; }
.status-summary span { color:var(--muted); }
.status-summary strong { font-size:24px; }
.warning-text { color:#b54708; }
.system-table { min-width:800px; }
.path-cell { overflow-wrap:anywhere; }
.system-settings { margin-top:20px; }
.account-create { margin-bottom:20px; }
.account-form { display:grid; grid-template-columns:2fr 1.3fr 1.5fr auto; align-items:end; gap:14px; }
.admin-account-form { grid-template-columns:1fr 1.5fr auto; }
.account-table table { min-width:1100px; }
.inline-form { display:flex; gap:8px; min-width:280px; }
.inline-form input { min-width:170px; }
.section-heading { margin-top:32px; }
.agent { max-width:320px; overflow-wrap:anywhere; font-size:12px; }
.empty { text-align:center; color:var(--muted); }
@media (max-width:800px) { .page{padding:20px 14px 40px}.panel{padding:20px}.clinic-identity{margin:-20px -20px 24px;padding:16px 20px;align-items:flex-start;flex-direction:column;gap:4px}.two-columns,.account-form,.filter-bar,.status-summary{grid-template-columns:1fr}.header-inner{padding:10px 14px;flex-wrap:wrap}.brand{font-size:16px}.main-nav{order:3;width:100%;overflow:auto} }
