/* ADDIC personal storage. Local system fonts; no third-party assets or requests. */
:root {
  color-scheme: light;
  --background: #f5f6f8;
  --surface: #ffffff;
  --field: #f2f4f6;
  --hover: #f7f9fc;
  --text: #191f28;
  --secondary: #596574;
  --muted: #6b7684;
  --line: #e9edf2;
  --border: #dce2e9;
  --blue: #3182f6;
  --action: #1769e8;
  --action-hover: #125ccd;
  --blue-text: #1b64da;
  --blue-fill: #eaf3ff;
  --error: #cf3547;
  --error-fill: #fff0f1;
  --green: #137b52;
  --green-fill: #e7f6ef;
  --focus: #8bbcff;
  --shadow: 0 2px 8px #1f344a06;
  --selection-shadow: 0 1px 4px #182b4310;
  --backdrop: #101b2c66;
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --background: #111216;
  --surface: #1c1d22;
  --field: #27292f;
  --hover: #252830;
  --text: #f2f4f6;
  --secondary: #b5bdc9;
  --muted: #a1aab8;
  --line: #30333a;
  --border: #414650;
  --blue: #5b9dff;
  --action: #1769e8;
  --action-hover: #2878ef;
  --blue-text: #8bbbff;
  --blue-fill: #20324c;
  --error: #ff8995;
  --error-fill: #42252c;
  --green: #69d7a4;
  --green-fill: #203c31;
  --focus: #74acff;
  --shadow: none;
  --selection-shadow: 0 1px 4px #00000030;
  --backdrop: #05070cb3;
}
* { box-sizing: border-box; }
html { min-width: 320px; scroll-padding-top: 100px; }
body {
  margin: 0;
  background: var(--background);
  color: var(--text);
  font-family: Pretendard, -apple-system, BlinkMacSystemFont, system-ui, Roboto, "Apple SD Gothic Neo", "Noto Sans KR", "Malgun Gothic", sans-serif;
  font-size: 16px;
  line-height: 1.55;
  letter-spacing: -.02em;
  -webkit-font-smoothing: antialiased;
  overflow-wrap: break-word;
}
button, input { font: inherit; letter-spacing: inherit; }
button, a, input, summary { -webkit-tap-highlight-color: transparent; }
button { border: 0; cursor: pointer; }
button, a { touch-action: manipulation; }
button { color: var(--text); background: transparent; }
button:disabled { cursor: default; opacity: .5; }
button, input, summary { transition: background-color .16s, border-color .16s, color .16s; }
button:focus-visible, a:focus-visible, summary:focus-visible { outline: 3px solid var(--focus); outline-offset: 4px; }
a { text-decoration: none; color: inherit; }
h1, h2, p { margin: 0; }
h1, h2 { word-break: keep-all; }
h1 { font-size: 32px; line-height: 1.35; letter-spacing: -.04em; font-weight: 750; }
h2 { font-size: 20px; line-height: 1.45; font-weight: 700; letter-spacing: -.025em; }
svg { display: block; }
.icon { width: 22px; height: 22px; flex: 0 0 auto; }
[hidden] { display: none !important; }
.app-header { background: var(--surface); border-bottom: 1px solid var(--line); }
.header-inner { height: 80px; max-width: 1152px; margin: 0 auto; padding: 0 36px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.identity { display: flex; align-items: center; gap: 11px; flex-shrink: 0; }
.identity-symbol { width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center; background: var(--action); color: #fff; font-size: 25px; font-weight: 800; letter-spacing: -.08em; padding-right: 2px; }
.identity-name { display: flex; align-items: baseline; gap: 10px; }
.identity-name strong { font-size: 20px; line-height: 1.2; font-weight: 800; letter-spacing: -.035em; }
.identity-name>span { color: var(--secondary); font-size: 14px; font-weight: 500; }
.header-controls { display: flex; align-items: center; gap: 18px; }
.appearance { display: flex; gap: 2px; align-items: center; padding: 4px; border-radius: 13px; background: var(--field); }
.appearance button { display: flex; align-items: center; justify-content: center; gap: 6px; min-height: 36px; padding: 0 10px; border-radius: 9px; color: var(--muted); font-size: 13px; font-weight: 600; }
.appearance .icon { width: 16px; height: 16px; }
.appearance button[aria-pressed="true"] { color: var(--blue-text); background: var(--surface); box-shadow: var(--selection-shadow); }
.appearance button:hover { color: var(--text); }
.logout-button { display: flex; align-items: center; justify-content: center; gap: 7px; min-height: 44px; padding: 0 4px; color: var(--secondary); font-size: 14px; font-weight: 600; }
.logout-button .icon { width: 19px; height: 19px; }
.logout-button:hover { color: var(--blue-text); }
.primary, .secondary { display: inline-flex; align-items: center; justify-content: center; gap: 9px; min-height: 52px; padding: 0 22px; border-radius: 13px; font-size: 16px; font-weight: 650; }
.primary { background: var(--action); color: #fff; }
.primary:not(:disabled):hover { background: var(--action-hover); }
.primary:not(:disabled):active { background: #1056bc; }
.secondary { background: var(--field); color: var(--secondary); }
.secondary:not(:disabled):hover { background: var(--line); color: var(--text); }
.primary .icon, .secondary .icon { width: 19px; height: 19px; }
.login-page { background: var(--surface); }
.login-page .app-header { border-bottom-color: transparent; }
.login-main { display: grid; place-items: center; min-height: calc(100svh - 80px); padding: 48px 24px 100px; }
.login-card { width: 100%; max-width: 400px; }
.login-icon { width: 64px; height: 64px; display: grid; place-items: center; margin-bottom: 27px; border-radius: 21px; color: var(--blue-text); background: var(--blue-fill); }
.login-icon .icon { width: 29px; height: 29px; stroke-width: 1.9; }
.login-card h1 { font-size: 34px; }
.login-intro { margin-top: 10px; color: var(--secondary); font-size: 16px; }
#login-form { margin-top: 38px; }
.field+.field { margin-top: 24px; }
label { display: block; color: var(--secondary); font-size: 14px; font-weight: 600; margin-bottom: 10px; }
input { display: block; width: 100%; min-width: 0; height: 58px; padding: 0 17px; border: 2px solid transparent; border-radius: 13px; background: var(--field); color: var(--text); outline: none; font-size: 17px; font-weight: 500; }
input::placeholder { color: var(--muted); font-size: 16px; font-weight: 400; }
input:focus { background: var(--surface); border-color: var(--blue); }
input:disabled { opacity: .6; }
input:-webkit-autofill { -webkit-text-fill-color: var(--text); caret-color: var(--text); box-shadow: 0 0 0 1000px var(--field) inset; }
.password-field { position: relative; }
.password-field input { padding-right: 66px; }
.password-field button { position: absolute; right: 6px; top: 7px; min-height: 44px; min-width: 52px; padding: 0 10px; border-radius: 9px; color: var(--secondary); font-size: 14px; font-weight: 550; }
.password-field button:hover { color: var(--blue-text); }
.form-message { color: var(--error); font-size: 14px; line-height: 1.6; min-height: 24px; margin: 13px 0 15px; overflow-wrap: anywhere; }
.login-submit { width: 100%; min-height: 56px; font-size: 17px; font-weight: 700; }
.login-note { display: flex; align-items: flex-start; justify-content: center; gap: 7px; margin-top: 25px; color: var(--muted); font-size: 13px; line-height: 1.55; word-break: keep-all; }
.login-note .icon { width: 15px; height: 18px; margin-top: 1px; }
.dashboard { max-width: 1152px; margin: 0 auto; padding: 40px 36px 56px; }
.page-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 32px; }
.account-label { display: flex; align-items: center; gap: 8px; color: var(--secondary); font-size: 14px; font-weight: 550; }
.account-avatar { width: 29px; height: 29px; border-radius: 50%; display: grid; place-items: center; color: var(--blue-text); background: var(--blue-fill); font-size: 14px; font-weight: 700; }
.section-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 19px; }
.section-heading h2 { display: flex; align-items: center; gap: 8px; }
.section-heading h2>.icon { color: var(--secondary); width: 21px; height: 21px; }
.service-note { color: var(--muted); font-size: 13px; text-align: right; }
.app-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 16px; }
.app-card { position: relative; display: flex; flex-direction: column; align-items: flex-start; width: 100%; min-width: 0; padding: 25px 26px; border-radius: 22px; text-align: left; background: var(--surface); box-shadow: var(--shadow); }
.app-card:hover { background: var(--hover); }
.app-card:active { background: var(--blue-fill); }
.app-icon { display: grid; place-items: center; width: 62px; height: 62px; border-radius: 19px; color: var(--blue); background: var(--blue-fill); margin-bottom: 19px; }
.app-icon svg { width: 45px; height: 45px; }
.card-text { display: flex; flex-direction: column; min-width: 0; gap: 5px; }
.card-text strong { font-size: 22px; font-weight: 700; line-height: 1.4; }
.card-text>span { color: var(--secondary); font-size: 14px; font-weight: 450; word-break: keep-all; }
.card-arrow { position: absolute; top: 27px; right: 24px; color: var(--muted); }
.card-arrow .icon { width: 19px; height: 19px; }
.navigation-message, .account-message { font-size: 14px; margin-top: 12px; }
.navigation-message { color: var(--secondary); }
.navigation-message[data-state="success"] { color: var(--green); }
.navigation-message[data-state="error"], .account-message { color: var(--error); }
.navigation-message:empty, .account-message:empty { margin: 0; }
.management-grid { display: grid; grid-template-columns: 1fr 1fr; align-items: start; gap: 20px; margin-top: 28px; }
.panel { min-width: 0; background: var(--surface); padding: 26px; border-radius: 22px; box-shadow: var(--shadow); }
.panel .section-heading { min-height: 34px; margin-bottom: 21px; }
.badge { display: inline-flex; align-items: center; padding: 5px 9px; border-radius: 7px; background: var(--field); color: var(--secondary); font-size: 12px; font-weight: 600; word-break: keep-all; text-align: center; }
.badge[data-state="ready"], .badge[data-state="safe"] { color: var(--green); background: var(--green-fill); }
.badge[data-state="working"] { color: var(--blue-text); background: var(--blue-fill); }
.badge[data-state="unknown"], .badge[data-state="failed"] { color: var(--error); background: var(--error-fill); }
.state-message { color: var(--secondary); font-size: 15px; line-height: 1.6; min-height: 48px; word-break: keep-all; }
.timestamp { color: var(--muted); font-size: 12px; line-height: 1.5; }
#queried-at { margin-top: 10px; }
.actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 23px; }
.actions .primary, .actions .secondary { padding: 0 14px; font-size: 15px; }
.stop-button { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; min-height: 51px; margin-top: 2px; padding: 0 4px; font-size: 15px; font-weight: 600; color: var(--secondary); border-bottom: 1px solid var(--line); border-radius: 0; }
.stop-button:hover:not(:disabled) { color: var(--blue-text); }
.stop-button .icon { width: 18px; height: 18px; }
.storage-hint { margin-top: 15px; color: var(--muted); font-size: 13px; line-height: 1.65; }
.details { display: flex; flex-wrap: wrap; gap: 4px 10px; margin-top: 16px; color: var(--muted); font-size: 12px; }
.details code { max-width: 100%; font-size: 11px; overflow-wrap: anywhere; }
.text-button { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; padding: 0 0 0 10px; color: var(--blue-text); font-size: 14px; font-weight: 650; }
.text-button:hover { color: var(--text); }
.text-button .icon { width: 17px; height: 17px; }
.sensor-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; }
.sensor { min-width: 0; background: var(--field); border-radius: 14px; padding: 15px 17px; }
.sensor>span { display: block; color: var(--secondary); font-size: 13px; font-weight: 550; }
.sensor strong { display: block; font-size: 25px; font-weight: 700; line-height: 1.35; letter-spacing: -.04em; margin: 4px 0; overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
.sensor small { display: block; font-size: 11px; color: var(--muted); line-height: 1.5; overflow-wrap: anywhere; }
#sensor-at { margin-top: 18px; }
.resource-note { margin-top: 6px; color: var(--muted); font-size: 12px; line-height: 1.6; word-break: keep-all; }
.usage { margin-top: 24px; color: var(--secondary); border-top: 1px solid var(--border); }
.usage summary { display: flex; align-items: center; gap: 9px; min-height: 64px; list-style: none; cursor: pointer; font-size: 14px; font-weight: 550; }
.usage summary::-webkit-details-marker { display: none; }
.usage summary>.icon { width: 18px; height: 18px; }
.usage summary>.icon:last-child { margin-left: auto; width: 16px; height: 16px; transform: rotate(90deg); }
.usage[open] summary>.icon:last-child { transform: rotate(-90deg); }
.usage-body { padding: 0 0 8px 27px; font-size: 14px; line-height: 1.75; }
.usage-body ol { margin: 0; padding-left: 20px; }
.usage-body li { padding: 0 0 13px 5px; }
.usage-body strong { color: var(--text); margin-right: 7px; font-weight: 650; }
.stop-dialog { width: min(420px,calc(100% - 40px)); max-height: calc(100dvh - 40px); margin: auto; padding: 32px; border: 0; border-radius: 26px; color: var(--text); background: var(--surface); box-shadow: 0 20px 80px #00000030; overflow: auto; }
.stop-dialog::backdrop { background: var(--backdrop); }
.dialog-lock { display: grid; place-items: center; width: 50px; height: 50px; margin-bottom: 23px; border-radius: 16px; color: var(--blue-text); background: var(--blue-fill); }
.dialog-lock .icon { width: 25px; height: 25px; }
.stop-dialog h2 { font-size: 25px; font-weight: 700; }
.stop-description { margin: 10px 0 27px; color: var(--secondary); font-size: 15px; line-height: 1.6; }
.dialog-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.dialog-actions button { min-height: 52px; }
@media (max-width: 900px) {
  .header-inner { padding: 0 28px; }
  .identity-name { display: block; }
  .identity-name>span { display: block; margin-top: 3px; font-size: 12px; }
  .dashboard { padding: 32px 28px 48px; }
  .app-card { padding: 23px 21px; }
  .card-text>span { font-size: 13px; }
  .panel { padding: 23px; }
  .management-grid { gap: 16px; }
  .panel h2 { font-size: 18px; }
  .panel h2>.icon { display: none; }
  .badge { font-size: 11px; }
}
@media (max-width: 680px) {
  .header-inner { height: 76px; padding: 0 20px; gap: 8px; }
  .identity { gap: 9px; }
  .identity-symbol { width: 32px; height: 32px; border-radius: 10px; font-size: 23px; }
  .identity-name strong { font-size: 18px; }
  .identity-name>span { font-size: 11px; }
  .header-controls { gap: 8px; }
  .appearance { padding: 3px; border-radius: 12px; gap: 0; }
  .appearance button { padding: 0 9px; min-height: 40px; border-radius: 9px; font-size: 12px; }
  .appearance .icon { display: none; }
  .logout-button { min-width: 44px; padding: 0 0 0 4px; gap: 5px; font-size: 12px; white-space: nowrap; }
  .logout-button .icon { width: 17px; height: 17px; }
  .dashboard { padding: 27px 20px 32px; }
  .page-heading { margin-bottom: 27px; }
  h1 { font-size: 29px; }
  .account-label { font-size: 13px; gap: 6px; }
  .account-avatar { width: 25px; height: 25px; font-size: 12px; }
  .section-heading { margin-bottom: 13px; }
  h2 { font-size: 18px; }
  .service-note { font-size: 12px; }
  .app-grid { grid-template-columns: 1fr; gap: 0; border-radius: 21px; background: var(--surface); padding: 0 20px; box-shadow: var(--shadow); }
  .app-card { flex-direction: row; align-items: center; gap: 17px; padding: 22px 0; border-radius: 0; box-shadow: none; background: transparent; }
  .app-card+.app-card { border-top: 1px solid var(--line); }
  .app-card:hover { background: transparent; }
  .app-card:active { background: var(--hover); }
  .app-icon { width: 50px; height: 50px; flex: 0 0 auto; border-radius: 16px; margin: 0; }
  .app-icon svg { width: 38px; height: 38px; }
  .card-text { gap: 3px; }
  .card-text strong { font-size: 19px; }
  .card-text>span { font-size: 13px; }
  .card-arrow { position: static; margin-left: auto; }
  .card-arrow .icon { width: 17px; height: 17px; }
  .management-grid { grid-template-columns: 1fr; gap: 18px; margin-top: 22px; }
  .panel { padding: 22px; border-radius: 21px; }
  .panel h2 { font-size: 19px; }
  .panel h2>.icon { display: block; }
  .panel .section-heading { margin-bottom: 17px; }
  .badge { font-size: 11px; max-width: 130px; }
  .state-message { min-height: 0; font-size: 14px; }
  .actions { margin-top: 21px; }
  .actions .primary, .actions .secondary { min-height: 51px; font-size: 15px; }
  .storage-hint { font-size: 12px; }
  .sensor strong { font-size: 25px; }
  .sensor { padding: 14px 15px; }
  .sensor small { font-size: 11px; }
  .usage { margin-top: 20px; }
  .usage summary { font-size: 13px; }
  .usage-body { padding-left: 0; font-size: 13px; }
  .login-main { min-height: calc(100svh - 76px); padding: 49px 27px 64px; place-items: start center; }
  .login-icon { width: 56px; height: 56px; border-radius: 18px; margin-bottom: 25px; }
  .login-icon .icon { width: 27px; height: 27px; }
  .login-card h1 { font-size: 31px; }
  .login-intro { font-size: 15px; }
  #login-form { margin-top: 32px; }
  .field+.field { margin-top: 23px; }
  .login-note { font-size: 12px; margin-top: 23px; }
  .stop-dialog { padding: 28px; border-radius: 24px; }
  .stop-dialog h2 { font-size: 24px; }
  .stop-description { font-size: 14px; }
}
@media (max-width: 360px) {
  .header-inner { padding: 0 15px; }
  .identity-symbol { display: none; }
  .dashboard { padding: 25px 16px 32px; }
  .app-grid { padding: 0 17px; }
  .app-card { gap: 13px; }
  .panel { padding: 19px; }
  .card-text>span { font-size: 12px; }
  .login-main { padding: 35px 23px 50px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
}
