styles.css 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437
  1. :root {
  2. --primary: #0066cc;
  3. --primary-focus: #0071e3;
  4. --primary-on-dark: #2997ff;
  5. --canvas: #ffffff;
  6. --parchment: #f5f5f7;
  7. --tile-dark: #272729;
  8. --tile-dark-2: #2a2a2c;
  9. --ink: #1d1d1f;
  10. --muted: #7a7a7a;
  11. --hairline: #e0e0e0;
  12. }
  13. * { box-sizing: border-box; }
  14. body {
  15. margin: 0;
  16. font-family: "SF Pro Text", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  17. color: var(--ink);
  18. background: var(--canvas);
  19. }
  20. a { color: inherit; text-decoration: none; }
  21. button, input, select, textarea { font: inherit; }
  22. button:focus,
  23. input:focus,
  24. select:focus,
  25. textarea:focus,
  26. dialog:focus {
  27. outline: none;
  28. }
  29. .global-nav {
  30. position: sticky;
  31. top: 0;
  32. z-index: 10;
  33. height: 44px;
  34. display: flex;
  35. align-items: center;
  36. justify-content: space-between;
  37. padding: 0 24px;
  38. background: #000;
  39. color: #fff;
  40. font-size: 12px;
  41. letter-spacing: -0.12px;
  42. }
  43. .brand { font-weight: 600; }
  44. .nav-links { display: flex; gap: 8px; color: #ccc; }
  45. .nav-links a {
  46. padding: 7px 12px;
  47. border-radius: 9999px;
  48. transition: background 0.12s ease, color 0.12s ease, transform 0.12s ease;
  49. }
  50. .nav-links a:hover { color: #fff; }
  51. .nav-links a:active { transform: scale(0.95); }
  52. .nav-links a.active {
  53. color: #fff;
  54. background: rgba(255, 255, 255, 0.22);
  55. box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18);
  56. }
  57. .mqtt-status {
  58. display: inline-flex;
  59. align-items: center;
  60. gap: 6px;
  61. min-width: 112px;
  62. justify-content: flex-end;
  63. font-size: 12px;
  64. color: #ff453a;
  65. }
  66. .mqtt-status.connected { color: #30d158; }
  67. .mqtt-status.disconnected { color: #ff453a; }
  68. .mqtt-dot {
  69. width: 8px;
  70. height: 8px;
  71. border-radius: 9999px;
  72. background: currentColor;
  73. }
  74. .tile-light, .tile-parchment, .tile-dark {
  75. padding: 80px 24px;
  76. }
  77. .tile-light { background: var(--canvas); }
  78. .tile-parchment { background: var(--parchment); }
  79. .tile-dark { background: var(--tile-dark); color: #fff; }
  80. .compact { padding-top: 56px; padding-bottom: 56px; }
  81. .hero { text-align: center; }
  82. .hero h1 {
  83. margin: 8px auto 12px;
  84. max-width: 980px;
  85. font-family: "SF Pro Display", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  86. font-size: clamp(34px, 6vw, 56px);
  87. line-height: 1.07;
  88. letter-spacing: -0.28px;
  89. font-weight: 600;
  90. }
  91. .lead {
  92. max-width: 980px;
  93. margin: 0 auto;
  94. font-size: clamp(21px, 3vw, 28px);
  95. line-height: 1.25;
  96. letter-spacing: -0.2px;
  97. }
  98. .page-intro {
  99. padding-top: 40px;
  100. padding-bottom: 40px;
  101. }
  102. .page-intro h1 {
  103. font-size: clamp(28px, 4vw, 34px);
  104. line-height: 1.12;
  105. margin-bottom: 8px;
  106. }
  107. .page-intro .lead {
  108. font-size: 17px;
  109. line-height: 1.47;
  110. max-width: 720px;
  111. }
  112. .logs-intro {
  113. padding-top: 32px;
  114. padding-bottom: 24px;
  115. }
  116. .logs-section {
  117. padding-top: 24px;
  118. padding-bottom: 24px;
  119. }
  120. .eyebrow {
  121. margin: 0 0 8px;
  122. color: var(--muted);
  123. font-size: 14px;
  124. }
  125. .tile-dark .eyebrow, .tile-dark p { color: #ccc; }
  126. .hero-actions, .inline-actions, .inline-form {
  127. display: flex;
  128. justify-content: center;
  129. align-items: center;
  130. flex-wrap: wrap;
  131. gap: 12px;
  132. margin-top: 28px;
  133. }
  134. .compact-actions { margin-top: 20px; }
  135. .home-status {
  136. padding-bottom: 64px;
  137. }
  138. .status-note {
  139. margin: 36px auto 20px;
  140. color: var(--muted);
  141. font-size: 17px;
  142. line-height: 1.47;
  143. }
  144. .home-state-grid {
  145. margin-top: 0;
  146. text-align: left;
  147. }
  148. .button-primary, .button-secondary, .button-secondary-on-dark {
  149. min-height: 44px;
  150. border-radius: 9999px;
  151. padding: 11px 22px;
  152. border: 1px solid var(--primary);
  153. cursor: pointer;
  154. transition: transform 0.12s ease;
  155. }
  156. .button-primary {
  157. background: var(--primary);
  158. color: #fff;
  159. }
  160. .button-secondary {
  161. background: transparent;
  162. color: var(--primary);
  163. }
  164. .button-secondary-on-dark {
  165. background: transparent;
  166. color: var(--primary-on-dark);
  167. border-color: var(--primary-on-dark);
  168. }
  169. .button-primary:active, .button-secondary:active, .button-secondary-on-dark:active { transform: scale(0.95); }
  170. .button-primary:focus, .button-secondary:focus, .button-secondary-on-dark:focus { outline: none; }
  171. .button-primary:focus-visible, .button-secondary:focus-visible, .button-secondary-on-dark:focus-visible { outline: 2px solid var(--primary-focus); outline-offset: 2px; }
  172. .small { min-height: 36px; padding: 8px 15px; font-size: 14px; }
  173. .section-heading {
  174. max-width: 980px;
  175. margin: 0 auto 32px;
  176. text-align: center;
  177. }
  178. .section-heading h2 {
  179. margin: 0 0 8px;
  180. font-size: 40px;
  181. line-height: 1.1;
  182. letter-spacing: -0.28px;
  183. font-weight: 600;
  184. }
  185. .section-heading p { margin: 0; font-size: 17px; line-height: 1.47; }
  186. .dark-text { color: var(--ink); }
  187. .compact-heading { margin-bottom: 24px; }
  188. .compact-heading .button-primary { margin-top: 20px; }
  189. .state-grid, .card-grid, .plan-columns, .two-col {
  190. max-width: 1180px;
  191. margin: 0 auto;
  192. display: grid;
  193. grid-template-columns: repeat(3, minmax(0, 1fr));
  194. gap: 24px;
  195. }
  196. .plan-columns, .two-col { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  197. .state-card, .utility-card {
  198. border-radius: 18px;
  199. padding: 24px;
  200. border: 1px solid var(--hairline);
  201. background: #fff;
  202. color: var(--ink);
  203. }
  204. .state-card { background: var(--tile-dark-2); border-color: rgba(255,255,255,0.12); color: #fff; }
  205. .home-state-grid .state-card {
  206. background: #fff;
  207. color: var(--ink);
  208. border-color: var(--hairline);
  209. }
  210. .home-state-grid .state-card p,
  211. .home-state-grid .state-card .eyebrow {
  212. color: var(--muted);
  213. }
  214. .state-value {
  215. margin: 4px 0 8px;
  216. font-size: 40px;
  217. line-height: 1.1;
  218. letter-spacing: -0.28px;
  219. }
  220. .state-on { color: #30d158; }
  221. .state-off { color: #ff453a; }
  222. .utility-card h2, .utility-card h3 { margin-top: 0; }
  223. .schedule-status { font-weight: 600; }
  224. .schedule-status-enabled { color: #30d158; }
  225. .schedule-status-disabled { color: #ff453a; }
  226. .schedule-disabled .schedule-content {
  227. color: var(--muted);
  228. text-decoration: line-through;
  229. }
  230. .holiday-import-grid { align-items: stretch; }
  231. .holiday-card {
  232. display: grid;
  233. grid-template-rows: auto 360px auto;
  234. gap: 18px;
  235. }
  236. .holiday-card > .holiday-textarea,
  237. .holiday-card > .holiday-form {
  238. min-height: 0;
  239. }
  240. .holiday-card-header {
  241. display: grid;
  242. align-content: start;
  243. gap: 0;
  244. }
  245. .holiday-card-header h2 { margin: 0; }
  246. .holiday-card-header p { margin: 0; font-size: 14px; line-height: 1.47; }
  247. .holiday-form {
  248. display: contents;
  249. }
  250. .holiday-textarea {
  251. height: 360px;
  252. min-height: 360px;
  253. }
  254. .holiday-action { justify-self: center; }
  255. .wide { max-width: 1180px; margin-left: auto; margin-right: auto; }
  256. .muted { color: var(--muted); }
  257. .timeline { display: grid; gap: 14px; }
  258. .timeline-item {
  259. display: grid;
  260. gap: 4px;
  261. padding-bottom: 14px;
  262. border-bottom: 1px solid var(--hairline);
  263. }
  264. .timeline-item:last-child { border-bottom: 0; padding-bottom: 0; }
  265. .timeline-item span { color: var(--muted); }
  266. .table-wrap { overflow-x: auto; }
  267. .table-card-header {
  268. display: flex;
  269. align-items: center;
  270. justify-content: space-between;
  271. gap: 16px;
  272. margin-bottom: 16px;
  273. }
  274. .table-card-header h2 { margin: 0; }
  275. .log-table-card { overflow: hidden; }
  276. .table-scroll {
  277. position: relative;
  278. max-height: calc(100vh - 285px);
  279. overflow: auto;
  280. background: var(--canvas);
  281. }
  282. table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 14px; }
  283. th, td { padding: 12px 10px; border-bottom: 1px solid var(--hairline); text-align: left; vertical-align: top; }
  284. th {
  285. position: sticky;
  286. top: 0;
  287. z-index: 3;
  288. background: var(--canvas);
  289. box-shadow: inset 0 1px 0 var(--canvas), 0 1px 0 var(--hairline);
  290. font-weight: 600;
  291. }
  292. .form-grid {
  293. display: grid;
  294. grid-template-columns: repeat(2, minmax(0, 1fr));
  295. gap: 18px;
  296. align-items: start;
  297. }
  298. label { display: grid; grid-template-rows: auto 44px auto; gap: 8px; font-size: 14px; color: var(--muted); }
  299. .field-hint { font-size: 12px; color: var(--muted); }
  300. input, select, textarea {
  301. width: 100%;
  302. height: 44px;
  303. border: 1px solid rgba(0,0,0,0.08);
  304. border-radius: 18px;
  305. padding: 12px 16px;
  306. background: #fff;
  307. color: var(--ink);
  308. }
  309. textarea { height: auto; resize: vertical; line-height: 1.45; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; }
  310. .weekday-picker {
  311. grid-column: 1 / -1;
  312. display: flex;
  313. flex-wrap: wrap;
  314. gap: 12px 18px;
  315. }
  316. .weekday-picker[hidden] { display: none; }
  317. .weekday-picker label { display: flex; grid-template-rows: none; align-items: center; gap: 6px; }
  318. .weekday-picker input { width: auto; }
  319. .form-actions {
  320. grid-column: 1 / -1;
  321. display: flex;
  322. justify-content: center;
  323. margin-top: 4px;
  324. }
  325. .notice {
  326. position: fixed;
  327. top: 58px;
  328. left: 50%;
  329. z-index: 30;
  330. transform: translateX(-50%);
  331. width: min(520px, calc(100vw - 32px));
  332. margin: 0;
  333. padding: 12px 18px;
  334. border-radius: 18px;
  335. background: #e8f2ff;
  336. color: var(--ink);
  337. text-align: center;
  338. border: 1px solid rgba(0, 102, 204, 0.16);
  339. animation: message-pop 3.2s ease forwards;
  340. }
  341. .notice-error {
  342. background: #fff0f0;
  343. border-color: rgba(255, 69, 58, 0.18);
  344. }
  345. @keyframes message-pop {
  346. 0% { opacity: 0; transform: translate(-50%, -8px); }
  347. 12% { opacity: 1; transform: translate(-50%, 0); }
  348. 78% { opacity: 1; transform: translate(-50%, 0); }
  349. 100% { opacity: 0; transform: translate(-50%, -8px); visibility: hidden; }
  350. }
  351. code { word-break: break-all; }
  352. .topic-preview p { line-height: 1.6; }
  353. .topic-preview { margin-top: 24px; }
  354. .modal {
  355. width: min(760px, calc(100vw - 32px));
  356. border: 1px solid var(--hairline);
  357. border-radius: 18px;
  358. padding: 24px;
  359. color: var(--ink);
  360. background: rgba(245, 245, 247, 0.96);
  361. backdrop-filter: saturate(180%) blur(20px);
  362. }
  363. .modal::backdrop { background: rgba(0, 0, 0, 0.36); }
  364. .modal-header {
  365. display: flex;
  366. justify-content: space-between;
  367. align-items: flex-start;
  368. gap: 16px;
  369. margin-bottom: 24px;
  370. }
  371. .modal-header h2 {
  372. margin: 0;
  373. font-size: 34px;
  374. line-height: 1.12;
  375. letter-spacing: -0.28px;
  376. }
  377. .modal-close {
  378. width: 36px;
  379. height: 36px;
  380. border: 0;
  381. border-radius: 9999px;
  382. background: rgba(0, 0, 0, 0.06);
  383. color: var(--ink);
  384. cursor: pointer;
  385. font-size: 24px;
  386. line-height: 1;
  387. display: inline-flex;
  388. align-items: center;
  389. justify-content: center;
  390. transition: transform 0.12s ease, background 0.12s ease;
  391. }
  392. .modal-close:active { transform: scale(0.95); }
  393. .modal-close:hover { background: rgba(0, 0, 0, 0.1); }
  394. .modal-form {
  395. grid-template-columns: repeat(2, minmax(0, 1fr));
  396. gap: 20px 18px;
  397. }
  398. .modal-form label { min-width: 0; }
  399. .modal-actions {
  400. grid-column: 1 / -1;
  401. display: flex;
  402. justify-content: flex-end;
  403. gap: 12px;
  404. margin-top: 8px;
  405. }
  406. @media (max-width: 833px) {
  407. .global-nav { padding: 0 16px; }
  408. .nav-links { gap: 6px; }
  409. .state-grid, .card-grid, .plan-columns, .two-col, .form-grid { grid-template-columns: 1fr; }
  410. .tile-light, .tile-parchment, .tile-dark { padding: 48px 16px; }
  411. .section-heading h2 { font-size: 34px; }
  412. }
  413. @media (max-width: 520px) {
  414. .nav-links { font-size: 11px; gap: 2px; }
  415. .nav-links a { padding: 7px 8px; }
  416. .mqtt-status { min-width: auto; font-size: 11px; }
  417. .mqtt-status span:last-child { display: none; }
  418. .brand { display: none; }
  419. .hero-actions, .inline-actions { align-items: stretch; }
  420. .hero-actions form, .inline-actions form, .hero-actions button, .inline-actions button { width: 100%; }
  421. }