:root {
  color-scheme: light;
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans JP", sans-serif;
  color: #182431;
  background: #f4f7fa;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  --ink: #182431;
  --muted: #7a8794;
  --line: #e8edf2;
  --green: #16866a;
  --navy: #101a24;
}
* { box-sizing: border-box; }
body { min-width: 320px; min-height: 100vh; margin: 0; }
button, input { font: inherit; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }
[hidden] { display: none !important; }

.brand { display: inline-flex; align-items: center; gap: 1px; color: #182431; font-size: 20px; font-weight: 800; letter-spacing: -1px; }
.brand span { color: #149276; }
.auth-screen { min-height: 100vh; display: grid; place-items: center; padding: 28px; background: radial-gradient(ellipse at 50% 0%, #eaf5f2 0, #f4f7fa 58%); }
.auth-card { width: min(100%, 420px); padding: 42px; border: 1px solid #e8edf0; border-radius: 18px; background: #fff; box-shadow: 0 18px 60px #20334212; }
.auth-mark { display: grid; place-items: center; width: 48px; height: 48px; margin-top: 38px; border-radius: 14px; color: #fff; background: linear-gradient(145deg, #20a182, #13765f); font-size: 22px; font-weight: 800; box-shadow: 0 8px 18px #16866a33; }
.eyebrow { margin: 0 0 8px; color: #82909c; font-size: 10px; font-weight: 750; letter-spacing: 1.4px; }
.auth-card .eyebrow { margin-top: 26px; }
.auth-card h1 { margin: 0 0 8px; font-size: 25px; letter-spacing: -.7px; }
.auth-intro { margin: 0 0 28px; color: var(--muted); font-size: 13px; line-height: 1.7; }
.auth-card form { display: grid; gap: 9px; }
label { color: #344352; font-size: 12px; font-weight: 650; }
.auth-card label { margin-top: 7px; }
input { width: 100%; height: 44px; padding: 0 13px; border: 1px solid #dfe6eb; border-radius: 8px; outline: 0; color: var(--ink); background: #fff; font-size: 13px; transition: border-color .15s, box-shadow .15s; }
input::placeholder { color: #a9b3bc; }
input:focus { border-color: #38a58b; box-shadow: 0 0 0 3px #16866a16; }
.field-help { margin-top: -4px; color: var(--muted); font-size: 11px; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 39px; padding: 0 15px; border: 1px solid transparent; border-radius: 8px; font-size: 12px; font-weight: 650; transition: background .15s, border-color .15s, transform .15s; }
.button:active:not(:disabled) { transform: translateY(1px); }
.button:disabled { cursor: wait; opacity: .6; }
.button-primary { color: #fff; background: #16866a; box-shadow: 0 3px 8px #16866a20; }
.button-primary:hover:not(:disabled) { background: #11765d; }
.auth-submit { width: 100%; height: 46px; margin-top: 12px; }
.auth-submit span { margin-left: auto; font-size: 16px; }
.button-secondary { color: #3c4b58; border-color: #e1e7ec; background: #fff; }
.button-secondary:hover:not(:disabled), .button-quiet:hover:not(:disabled) { border-color: #ccd7de; background: #f8fafb; }
.button-quiet { min-height: 34px; padding: 0 12px; color: #687684; border-color: #e4e9ed; background: #fff; font-size: 11px; }
.message { min-height: 18px; margin: 3px 0 0; color: #6d7a86; font-size: 11px; line-height: 1.5; }
.message.is-error, .is-error { color: #b34040; }
.auth-foot { margin-top: 26px; padding-top: 18px; border-top: 1px solid #edf0f2; color: #89949d; font-size: 10px; text-align: center; }
.lock-icon { margin-right: 6px; color: #16866a; font-size: 9px; }

.dashboard { min-height: 100vh; }
.sidebar { position: fixed; inset: 0 auto 0 0; z-index: 2; display: flex; flex-direction: column; width: 235px; padding: 25px 16px 18px; color: #dce6eb; background: var(--navy); }
.sidebar-brand { gap: 0; padding: 0 12px; color: #fff; font-size: 18px; }
.sidebar-brand:first-letter { color: #42c5a1; }
.brand-word { margin-left: 3px; color: #fff !important; font-size: 16px; letter-spacing: -.5px; }
.nav-label { margin: 44px 12px 12px; color: #73828e; font-size: 9px; font-weight: 700; letter-spacing: 1.2px; text-transform: uppercase; }
.nav-item { display: flex; align-items: center; gap: 12px; min-height: 42px; margin: 2px 0; padding: 0 12px; border-radius: 8px; color: #aebbc4; font-size: 12px; transition: background .15s, color .15s; }
.nav-item:hover { color: #fff; background: #ffffff0b; }
.nav-item.active { color: #fff; background: #ffffff12; box-shadow: inset 2px 0 #38c5a0; }
.nav-icon { width: 16px; color: #7f929f; font-size: 16px; text-align: center; }
.active .nav-icon { color: #51c9a6; }
.sidebar-bottom { margin-top: auto; }
.sidebar-status { display: flex; align-items: center; gap: 9px; margin: 0 8px 14px; padding: 13px 11px; border: 1px solid #ffffff12; border-radius: 9px; color: #c1cdd4; font-size: 10px; }
.status-dot { display: inline-block; width: 7px; height: 7px; flex: 0 0 7px; border-radius: 50%; background: #29b88a; box-shadow: 0 0 0 3px #29b88a20; }
.status-dot.offline { background: #d25a5a; box-shadow: 0 0 0 3px #d25a5a20; }
.sidebar-bottom .nav-item { font-size: 11px; }
.main-area { min-height: 100vh; margin-left: 235px; }
.topbar { position: sticky; top: 0; z-index: 1; display: flex; align-items: center; justify-content: space-between; height: 63px; padding: 0 34px; border-bottom: 1px solid #e8edf1; background: #ffffffed; backdrop-filter: blur(12px); }
.breadcrumb { color: #7b8792; font-size: 11px; }
.breadcrumb span { margin: 0 9px; color: #bdc5cb; }
.topbar-actions { display: flex; align-items: center; gap: 17px; }
.secure-label { display: flex; align-items: center; gap: 8px; color: #75838e; font-size: 10px; }
.secure-label .status-dot { width: 6px; height: 6px; flex-basis: 6px; box-shadow: none; }
.user-chip { display: flex; align-items: center; gap: 8px; color: #52616e; font-size: 11px; }
.avatar { display: grid; place-items: center; width: 27px; height: 27px; border-radius: 50%; color: #17785f; background: #e0f3ed; font-size: 11px; font-weight: 700; }
.content { width: min(100%, 1280px); margin: auto; padding: 35px 34px 22px; }
.welcome-row { display: flex; align-items: center; justify-content: space-between; margin-bottom: 23px; }
.welcome-row .eyebrow { margin-bottom: 7px; }
.welcome-row h1 { margin: 0; color: #1c2b38; font-size: 25px; letter-spacing: -.6px; }
.welcome-copy { margin: 7px 0 0; color: #85919b; font-size: 12px; }
.welcome-row .button span { font-size: 16px; }
.stats-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 15px; margin-bottom: 19px; }
.stat-card, .panel { border: 1px solid #e7edf1; border-radius: 11px; background: #fff; box-shadow: 0 2px 9px #25374605; }
.stat-card { min-height: 130px; padding: 17px 18px 14px; }
.stat-top { display: flex; align-items: center; justify-content: space-between; color: #6d7b87; font-size: 11px; }
.stat-icon { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 9px; font-size: 15px; }
.icon-blue { color: #4582d4; background: #edf4ff; }
.icon-purple { color: #8c6bd5; background: #f3efff; }
.icon-green { color: #239877; background: #e9f7f2; }
.stat-value { margin-top: 5px; color: #1d2c39; font-size: 27px; font-weight: 700; letter-spacing: -.8px; }
.stat-foot { margin-top: 2px; color: #97a1aa; font-size: 10px; }
.system-state { display: flex; align-items: center; gap: 9px; margin-top: 9px; color: #16866a; font-size: 15px; font-weight: 650; }
.system-state .status-dot { width: 8px; height: 8px; flex-basis: 8px; }
.system-card .stat-foot { margin-top: 7px; }
.panel { overflow: hidden; }
.services-panel { margin-bottom: 18px; }
.panel-heading { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 20px 21px 15px; }
.panel-heading .eyebrow { margin-bottom: 5px; }
.panel-heading h2 { margin: 0; color: #233341; font-size: 15px; letter-spacing: -.2px; }
.table-search { display: flex; align-items: center; gap: 8px; width: min(240px, 45%); height: 35px; padding: 0 10px; border: 1px solid #e5eaee; border-radius: 7px; color: #9aa5ad; font-size: 17px; font-weight: 400; }
.table-search:focus-within { border-color: #51b49b; box-shadow: 0 0 0 3px #16866a12; }
.table-search input { height: 32px; padding: 0; border: 0; box-shadow: none; font-size: 11px; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; text-align: left; }
thead { background: #f8fafb; }
th { height: 36px; padding: 0 16px; color: #84909a; font-size: 9px; font-weight: 650; white-space: nowrap; }
th:first-child, td:first-child { padding-left: 21px; }
td { height: 58px; padding: 8px 16px; border-top: 1px solid #eff2f4; color: #53616d; font-size: 11px; white-space: nowrap; }
.service-name-cell { display: flex; align-items: center; gap: 11px; }
.service-icon { display: grid; place-items: center; width: 31px; height: 31px; flex: 0 0 31px; border-radius: 9px; color: #20876c; background: #eaf6f1; font-size: 15px; }
.service-title { color: #263542; font-size: 11px; font-weight: 650; }
.service-id { display: block; margin-top: 3px; color: #99a3ab; font-size: 9px; }
.type-badge { display: inline-flex; align-items: center; gap: 6px; padding: 5px 8px; border-radius: 5px; color: #65727d; background: #f2f5f7; font-size: 9px; }
.type-badge.static { color: #6576a4; background: #f0f2fb; }
.status-badge { display: inline-flex; align-items: center; gap: 6px; color: #268468; font-size: 10px; }
.status-badge .status-dot { width: 6px; height: 6px; flex-basis: 6px; box-shadow: none; }
.service-open { color: #82909a; font-size: 17px; }
.service-open:hover { color: #16866a; }
.empty-table { padding: 30px; color: #89949d; font-size: 11px; text-align: center; }
.panel-footer { display: flex; justify-content: space-between; gap: 10px; padding: 12px 21px; border-top: 1px solid #eff2f4; color: #909ba4; font-size: 9px; }
.services-panel > .message { margin: 0 21px 8px; }
.lower-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(290px, .9fr); gap: 18px; align-items: stretch; }
.add-panel, .static-panel { padding-bottom: 17px; }
.compact-heading { padding-bottom: 8px; }
.heading-icon { display: grid; place-items: center; width: 31px; height: 31px; border-radius: 9px; color: #16866a; background: #eaf6f1; font-size: 19px; }
.static-icon { color: #6e7cb4; background: #f0f2fb; font-size: 15px; }
.panel-description { margin: 0 21px 17px; color: #85919a; font-size: 10px; line-height: 1.7; }
.service-form { padding: 0 21px; }
.form-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(130px, .72fr); gap: 12px; }
.field { display: grid; gap: 7px; margin-bottom: 13px; }
.field label { display: flex; align-items: center; gap: 7px; font-size: 10px; }
.field label span { color: #a0aab2; font-size: 9px; font-weight: 400; }
.field input { height: 38px; border-radius: 7px; font-size: 11px; }
.field small { margin-top: -3px; color: #9aa4ad; font-size: 9px; }
.port-input { display: flex; align-items: center; height: 38px; padding-left: 10px; border: 1px solid #dfe6eb; border-radius: 7px; color: #9ba5ad; font-size: 10px; }
.port-input:focus-within { border-color: #38a58b; box-shadow: 0 0 0 3px #16866a16; }
.port-input input { min-width: 0; height: 34px; padding: 0 7px; border: 0; box-shadow: none; }
.form-actions { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.form-actions .message { flex: 1; }
.form-actions .button { min-height: 36px; flex: 0 0 auto; font-size: 10px; }
.url-preview { display: flex; align-items: center; gap: 11px; margin: 13px 21px 0; padding: 10px 12px; border: 1px solid #e9eff2; border-radius: 8px; background: #fafcfc; }
.preview-icon { display: grid; place-items: center; width: 27px; height: 27px; border-radius: 7px; color: #17866a; background: #e8f5ef; }
.url-preview small { display: block; margin-bottom: 4px; color: #929da5; font-size: 8px; }
.url-preview code { color: #65727c; font-size: 9px; overflow-wrap: anywhere; }
.url-preview code b { color: #16866a; font-weight: 650; }
.steps { padding: 0 21px; }
.step { display: flex; align-items: center; gap: 10px; min-height: 31px; color: #586672; font-size: 10px; }
.step-number { display: grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; color: #27846b; background: #eaf6f1; font-size: 9px; font-weight: 700; }
.step code { padding: 2px 4px; border-radius: 4px; color: #65727c; background: #f1f4f6; font-size: 9px; }
.path-box { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 3px 0 5px 28px; padding: 8px 9px; border: 1px solid #e9edf0; border-radius: 6px; background: #fafcfc; }
.path-box code { color: #50606c; font-size: 9px; overflow-wrap: anywhere; }
.copy-button { width: 23px; height: 23px; flex: 0 0 23px; border: 0; border-radius: 5px; color: #7f8c96; background: transparent; }
.copy-button:hover { color: #16866a; background: #eaf6f1; }
.static-note { margin: 12px 21px 0; padding: 9px 10px; border-radius: 6px; color: #71808a; background: #f5f8fa; font-size: 9px; }
.static-note span { display: inline-grid; place-items: center; width: 13px; height: 13px; margin-right: 5px; border-radius: 50%; color: #fff; background: #9aa9b3; font-size: 9px; font-weight: 700; }
.dashboard-footer { display: flex; justify-content: space-between; margin-top: 20px; color: #a2abb2; font-size: 9px; }

@media (min-width: 1500px) { .content { padding-right: 46px; padding-left: 46px; } .stats-grid { gap: 18px; } }
@media (max-width: 1100px) {
  .sidebar { width: 205px; }
  .main-area { margin-left: 205px; }
  .content { padding-right: 23px; padding-left: 23px; }
  .topbar { padding-right: 23px; padding-left: 23px; }
  .stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lower-grid { grid-template-columns: 1fr; }
}
@media (max-width: 700px) {
  .sidebar { position: static; width: 100%; height: 58px; flex-direction: row; align-items: center; padding: 0 16px; }
  .sidebar-brand { padding: 0; }
  .nav-label, .sidebar > .nav-item, .sidebar-bottom { display: none; }
  .main-area { margin-left: 0; }
  .topbar { position: static; height: 54px; padding: 0 16px; }
  .breadcrumb { font-size: 10px; }
  .topbar-actions { gap: 9px; }
  .secure-label { display: none; }
  .user-chip { font-size: 10px; }
  .logout-button { min-height: 31px; padding: 0 9px; font-size: 10px; }
  .content { padding: 25px 15px 20px; }
  .welcome-row h1 { font-size: 22px; }
  .welcome-copy { max-width: 250px; font-size: 10px; }
  .stats-grid { gap: 9px; }
  .stat-card { min-height: 116px; padding: 13px; }
  .stat-top { font-size: 10px; }
  .stat-icon { width: 26px; height: 26px; }
  .stat-value { font-size: 24px; }
  .stat-foot { font-size: 9px; }
  .panel-heading { padding-right: 14px; padding-left: 14px; }
  .panel-heading h2 { font-size: 14px; }
  .table-search { width: min(170px, 48%); }
  .table-search input { font-size: 10px; }
  th { padding-right: 10px; padding-left: 10px; }
  th:first-child, td:first-child { padding-left: 14px; }
  td { padding-right: 10px; padding-left: 10px; font-size: 10px; }
  .panel-footer { padding-right: 14px; padding-left: 14px; font-size: 8px; }
  .form-row { grid-template-columns: minmax(0, 1fr) minmax(115px, .72fr); gap: 9px; }
  .service-form { padding-right: 14px; padding-left: 14px; }
  .panel-description { margin-right: 14px; margin-left: 14px; }
  .url-preview, .static-note { margin-right: 14px; margin-left: 14px; }
  .steps { padding: 0 14px; }
  .dashboard-footer { font-size: 8px; }
}
@media (max-width: 420px) {
  .auth-card { padding: 30px 23px; }
  .stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .welcome-row { align-items: flex-end; }
  .welcome-row .button { min-height: 34px; padding: 0 10px; font-size: 10px; }
  .form-row { grid-template-columns: 1fr; gap: 0; }
  .port-field { max-width: 180px; }
  .form-actions { align-items: flex-end; flex-direction: column; }
  .form-actions .button { align-self: stretch; }
  .panel-footer span:last-child { display: none; }
  .dashboard-footer span:last-child { display: none; }
}
