.tics-dashboard {
  --ink: #183b32;
  --navy: #102d27;
  --muted: #789186;
  --accent: #128a62;
  --line: #e0ebe5;
  --paper: #f6faf7;
  min-height: 100vh;
  background: var(--paper) !important;
  color: var(--ink) !important;
  font-family: Inter, "DM Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}
.tics-dashboard *, .tics-dashboard *::before, .tics-dashboard *::after { box-sizing: border-box; }
.tics-dashboard [hidden] { display: none !important; }
.tics-dashboard a { text-decoration: none; }
.tics-dashboard button, .tics-dashboard input { font: inherit; }
.tics-dashboard button { cursor: pointer; }
.tics-dashboard :focus-visible { outline: 3px solid #8edab5; outline-offset: 2px; }
.tics-dashboard h1, .tics-dashboard h2, .tics-dashboard h3, .tics-dashboard p { margin-top: 0; }
.tics-dashboard .app-shell { display: flex; min-height: 100vh; }
.tics-dashboard .app-sidebar {
  position: fixed; inset: 0 auto 0 0; z-index: 40; width: 256px;
  display: flex; flex-direction: column; padding: 32px 16px 18px;
  border-right: 1px solid var(--line); background: #fff; color: var(--ink); box-shadow: 8px 0 28px #102d2705;
}
.tics-dashboard .app-brand { display: inline-flex; align-items: center; gap: 11px; margin: 0 13px 53px; color: var(--ink); font-size: 25px; font-weight: 850; letter-spacing: -1.5px; line-height: 1; }
.tics-dashboard .app-brand-mark { display: grid; place-items: center; width: 39px; height: 39px; border-radius: 11px; background: var(--accent); color: #fff; font-size: 17px; box-shadow: 0 8px 20px #128a623d; }
.tics-dashboard .app-brand-dot { color: var(--accent); }
.tics-dashboard .app-brand small { display: block; margin-top: 5px; color: #8ba397; font-size: 9px; font-weight: 800; letter-spacing: 2px; }
.tics-dashboard .sidebar-section-label { padding: 0 14px; margin-bottom: 13px; color: #97a99e; font-size: 10px; font-weight: 850; letter-spacing: 1.4px; }
.tics-dashboard .sidebar-nav { display: grid; gap: 4px; }
.tics-dashboard .sidebar-link { display: flex; align-items: center; gap: 12px; padding: 13px 14px; border-radius: 10px; color: #587365; font-size: 13px; font-weight: 700; transition: background .2s, color .2s; }
.tics-dashboard .sidebar-link i { width: 17px; text-align: center; font-size: 15px; }
.tics-dashboard .sidebar-link:hover { background: #f1f8f3; color: var(--accent); }
.tics-dashboard .sidebar-link.is-active { background: #e6f5ed; color: #0e704f; }
.tics-dashboard .sidebar-bottom { margin-top: auto; }
.tics-dashboard .sidebar-profile { display: flex; align-items: center; gap: 10px; margin-top: 20px; padding: 16px 5px 3px; border-top: 1px solid var(--line); }
.tics-dashboard .profile-avatar, .tics-dashboard .site-avatar { display: grid; place-items: center; flex: none; width: 38px; height: 38px; border-radius: 10px; background: #e6f5ed; color: var(--accent); font-size: 15px; font-weight: 850; }
.tics-dashboard .profile-avatar { background: #e6f5ed; color: var(--accent); }
.tics-dashboard .profile-copy { min-width: 0; }
.tics-dashboard .profile-copy strong, .tics-dashboard .profile-copy small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tics-dashboard .profile-copy strong { font-size: 12px; }
.tics-dashboard .profile-copy small { margin-top: 3px; color: #809b8c; font-size: 11px; }
.tics-dashboard .app-workspace { width: calc(100% - 256px); min-width: 0; margin-left: 256px; }
.tics-dashboard .app-topbar { height: 74px; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 0 clamp(24px, 3.4vw, 52px); background: #fff; border-bottom: 1px solid var(--line); }
.tics-dashboard .topbar-left, .tics-dashboard .topbar-actions { display: flex; align-items: center; gap: 22px; }
.tics-dashboard .topbar-breadcrumb { color: #96a99f; font-size: 12px; font-weight: 600; }
.tics-dashboard .topbar-breadcrumb a { color: inherit; }
.tics-dashboard .topbar-breadcrumb a:hover, .tics-dashboard .topbar-breadcrumb a:focus-visible { color: var(--accent); text-decoration: underline; }
.tics-dashboard .topbar-breadcrumb i { margin: 0 9px; color: #b6c8bd; font-size: 9px; }
.tics-dashboard .topbar-breadcrumb strong { color: #315a48; font-weight: 800; }
.tics-dashboard .topbar-status { display: flex; align-items: center; gap: 7px; color: #638079; font-size: 11px; font-weight: 700; }
.tics-dashboard .topbar-status > span { width: 7px; height: 7px; border-radius: 50%; background: #2eb98f; box-shadow: 0 0 0 3px #dcf7ec; }
.tics-dashboard .topbar-logout, .tics-dashboard .secondary-action { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 40px; padding: 0 13px; border: 1px solid #dceae1; border-radius: 9px; background: #fff; color: #597a69; font-size: 11px; font-weight: 800; transition: border .2s, color .2s, transform .2s; }
.tics-dashboard .topbar-logout:hover, .tics-dashboard .secondary-action:hover { border-color: #9dd4b3; color: var(--accent); }
.tics-dashboard .menu-toggle { display: none; border: 0; background: transparent; color: var(--ink); font-size: 17px; }
.tics-dashboard .app-main { max-width: 1550px; margin: auto; padding: 42px clamp(24px, 3.4vw, 52px) 90px; }
.tics-dashboard .eyebrow { display: block; color: #438f66; font-size: 10px; font-weight: 850; letter-spacing: 1.8px; }
.tics-dashboard .page-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 30px; }
.tics-dashboard .page-heading h1 { margin: 11px 0 7px; font-size: clamp(30px, 2.8vw, 40px); line-height: 1.15; letter-spacing: -1.6px; font-weight: 800; }
.tics-dashboard .page-heading p { margin: 0; color: var(--muted); font-size: 13px; }
.tics-dashboard .page-heading p i { margin-right: 5px; }
.tics-dashboard .site-domain-link { color: inherit; }
.tics-dashboard .site-domain-link:hover { color: var(--accent); text-decoration: underline; }
.tics-dashboard .primary-action { display: inline-flex; align-items: center; justify-content: center; gap: 9px; min-height: 42px; padding: 0 16px; border: 1px solid var(--accent); border-radius: 9px; background: var(--accent); color: #fff; font-size: 12px; font-weight: 800; white-space: nowrap; transition: background .2s, transform .2s; }
.tics-dashboard .primary-action:hover { background: #0e704f; transform: translateY(-1px); }
.tics-dashboard .heading-count { padding: 8px 11px; border-radius: 8px; background: #e5f5eb; color: #197b58; font-size: 11px; font-weight: 800; white-space: nowrap; }
.tics-dashboard .panel, .tics-dashboard .metric-card, .tics-dashboard .period-toolbar { border: 1px solid var(--line); border-radius: 15px; background: #fff; box-shadow: 0 12px 35px #173f2b08; }
.tics-dashboard .panel { padding: 24px; }
.tics-dashboard .panel-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 15px; }
.tics-dashboard .panel-heading h2, .tics-dashboard .section-heading h2, .tics-dashboard .install-panel h2 { margin: 8px 0 4px; font-size: 19px; letter-spacing: -.6px; font-weight: 800; }
.tics-dashboard .panel-heading p { margin: 0; color: #9aafa2; font-size: 11px; }
.tics-dashboard .panel-icon, .tics-dashboard .metric-icon, .tics-dashboard .auth-card-icon, .tics-dashboard .period-icon { display: grid; place-items: center; flex: none; width: 38px; height: 38px; border-radius: 10px; font-size: 15px; }
.tics-dashboard .panel-icon, .tics-dashboard .metric-icon.green, .tics-dashboard .auth-card-icon, .tics-dashboard .period-icon { background: #e5f5eb; color: var(--accent); }
.tics-dashboard .metric-icon.teal { background: #e9f6f1; color: #42a384; }
.tics-dashboard .metric-icon.amber { background: #fff3df; color: #bf861f; }
.tics-dashboard .metric-icon.live { background: #e7f8ed; color: #159968; }
.tics-dashboard .period-toolbar { display: flex; align-items: center; gap: 20px; margin-bottom: 19px; padding: 14px 17px; }
.tics-dashboard .period-copy { display: flex; align-items: center; gap: 10px; min-width: 170px; margin-right: auto; }
.tics-dashboard .period-copy strong, .tics-dashboard .period-copy small { display: block; white-space: nowrap; }
.tics-dashboard .period-copy strong { color: #345e4a; font-size: 11px; font-weight: 800; }
.tics-dashboard .period-copy small { margin-top: 3px; color: #91aa9b; font-size: 10px; }
.tics-dashboard .period-icon { width: 35px; height: 35px; font-size: 13px; }
.tics-dashboard .preset-buttons { display: flex; gap: 5px; flex-wrap: wrap; }
.tics-dashboard .preset-buttons button { min-height: 35px; padding: 0 11px; border: 1px solid #e5ebf3; border-radius: 8px; background: #f8fafd; color: #70849a; font-size: 11px; font-weight: 800; white-space: nowrap; }
.tics-dashboard .preset-buttons button:hover, .tics-dashboard .preset-buttons button.is-active { border-color: #a5d7b6; background: #e5f5eb; color: var(--accent); }
.tics-dashboard .period-dates { display: flex; align-items: end; gap: 8px; }
.tics-dashboard .period-dates label { color: #8a9aad; font-size: 10px; font-weight: 750; }
.tics-dashboard .period-dates input { display: block; width: 128px; height: 35px; margin-top: 3px; padding: 0 9px; border: 1px solid #dfe8f1; border-radius: 7px; background: #fff; color: #405974; font-size: 11px; }
.tics-dashboard .period-dates input:focus, .tics-dashboard .form-stack input:focus, .tics-dashboard .search-field input:focus { border-color: #65bb8c; outline: none; box-shadow: 0 0 0 3px #128a621a; }
.tics-dashboard .compare-control { display: flex; align-items: center; gap: 6px; color: #71869b; font-size: 11px; font-weight: 700; white-space: nowrap; }
.tics-dashboard .compare-control input { accent-color: var(--accent); }
.tics-dashboard .inline-error, .tics-dashboard .notice-error { margin: 0 0 18px; padding: 13px 15px; border: 1px solid #f2ccd2; border-radius: 9px; background: #fff2f3; color: #ab3d50; font-size: 12px; font-weight: 700; }
.tics-dashboard .notice-error { display: flex; align-items: center; gap: 9px; }
.tics-dashboard .metrics-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 17px; margin-bottom: 20px; }
.tics-dashboard .site-metrics-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.tics-dashboard .metric-card { min-height: 183px; padding: 23px 25px; }
.tics-dashboard .live-metric-card { border-color: #ccebd8; }
.tics-dashboard .live-dot { display: inline-block; width: 7px; height: 7px; margin-right: 7px; border-radius: 50%; background: #1aa36b; box-shadow: 0 0 0 3px #e2f6e9; vertical-align: 1px; }
.tics-dashboard .live-metric-card.is-updating .live-dot { opacity: .45; }
.tics-dashboard .live-metric-card.is-refreshed { animation: live-refresh .9s ease-out; }
.tics-dashboard .live-metric-card.is-refreshed > strong { animation: live-count .55s ease-out; }
@keyframes live-refresh { 0% { border-color: #67c89b; box-shadow: 0 0 0 0 #9fe4bb75; } 65% { box-shadow: 0 0 0 7px #9fe4bb00; } 100% { border-color: #ccebd8; box-shadow: 0 0 0 0 #9fe4bb00; } }
@keyframes live-count { 0% { opacity: .55; transform: translateY(3px); } 100% { opacity: 1; transform: translateY(0); } }
@media (prefers-reduced-motion: reduce) { .tics-dashboard .live-metric-card.is-refreshed, .tics-dashboard .live-metric-card.is-refreshed > strong { animation: none; } }
.tics-dashboard .metric-card-top { display: flex; align-items: center; justify-content: space-between; color: #697f96; font-size: 12px; font-weight: 750; }
.tics-dashboard .metric-card > strong { display: block; margin: 20px 0 7px; color: #194734; font-size: 38px; letter-spacing: -1.8px; line-height: 1; font-weight: 800; }
.tics-dashboard .metric-card > small { color: #9bad9f; font-size: 11px; }
.tics-dashboard .metric-card > small.delta-up { color: #228866; }
.tics-dashboard .metric-card > small.delta-down { color: #ba5962; }
.tics-dashboard .is-loading .metric-card > strong { opacity: .58; }
.tics-dashboard .is-loading .live-metric-card > strong { opacity: 1; }
.tics-dashboard .overview-grid { display: grid; grid-template-columns: minmax(0, 1.75fr) minmax(310px, 1fr); gap: 20px; }
.tics-dashboard .chart-wrap { position: relative; height: 295px; margin-top: 25px; }
.tics-dashboard .chart-wrap canvas, .tics-dashboard .hours-chart-wrap canvas { width: 100% !important; height: 100% !important; }
.tics-dashboard .chart-empty { display: grid; place-items: center; min-height: 200px; margin: 0; color: #9aafa2; font-size: 12px; text-align: center; }
.tics-dashboard .subtle-link { margin-top: 10px; color: var(--accent); font-size: 11px; font-weight: 800; white-space: nowrap; }
.tics-dashboard .subtle-link i { margin-left: 3px; }
.tics-dashboard .site-performance-list { margin-top: 16px; }
.tics-dashboard .performance-row { display: flex; align-items: center; gap: 13px; padding: 14px 0; border-top: 1px solid #edf1f6; color: inherit; }
.tics-dashboard .performance-row:hover .site-row-copy strong { color: var(--accent); }
.tics-dashboard .performance-row .site-avatar { width: 34px; height: 34px; font-size: 13px; }
.tics-dashboard .site-row-copy { min-width: 0; flex: 1; }
.tics-dashboard .site-row-copy strong, .tics-dashboard .site-row-copy small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tics-dashboard .site-row-copy strong { color: #2b5743; font-size: 12px; font-weight: 800; }
.tics-dashboard .site-row-copy small { margin-top: 3px; color: #9aafa0; font-size: 11px; }
.tics-dashboard .performance-bar, .tics-dashboard .ranked-bar { display: block; overflow: hidden; height: 4px; border-radius: 4px; background: #eaf2eb; }
.tics-dashboard .performance-bar { margin-top: 8px; }
.tics-dashboard .performance-bar > span, .tics-dashboard .ranked-bar > span { display: block; height: 100%; border-radius: inherit; background: #68bd91; }
.tics-dashboard .performance-value { color: #33516e; font-size: 12px; font-weight: 800; }
.tics-dashboard .skeleton-row { height: 56px; border-top: 1px solid #edf1f6; background: linear-gradient(90deg, transparent, #f7f9fc, transparent); }
.tics-dashboard .empty-state { padding: 43px 20px; color: #71869b; text-align: center; }
.tics-dashboard .empty-icon { display: grid; place-items: center; width: 52px; height: 52px; margin: 0 auto 16px; border-radius: 14px; background: #e3f3e9; color: var(--accent); font-size: 21px; }
.tics-dashboard .empty-state strong { display: block; color: #2a435e; font-size: 14px; }
.tics-dashboard .empty-state p { max-width: 280px; margin: 7px auto 16px; font-size: 12px; line-height: 1.6; }
.tics-dashboard .sites-layout { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(290px, 1fr); align-items: start; gap: 25px; }
.tics-dashboard .section-heading { margin-bottom: 13px; }
.tics-dashboard .section-heading h2 { margin-top: 7px; }
.tics-dashboard .search-field { position: relative; display: block; margin-bottom: 16px; }
.tics-dashboard .search-field i { position: absolute; top: 50%; left: 14px; transform: translateY(-50%); color: #9aafa2; font-size: 13px; }
.tics-dashboard .search-field input { width: 100%; height: 44px; padding: 0 15px 0 41px; border: 1px solid #e0e8f1; border-radius: 9px; background: #fff; color: #2b5743; font-size: 12px; }
.tics-dashboard .site-list-row { display: flex; align-items: center; gap: 13px; padding: 16px 18px; margin-bottom: 10px; border: 1px solid var(--line); border-radius: 12px; background: #fff; color: inherit; box-shadow: 0 8px 26px #173f2b06; }
.tics-dashboard .site-list-row:hover { border-color: #a8d9bb; }
.tics-dashboard .site-list-row .site-avatar { width: 44px; height: 44px; }
.tics-dashboard .site-list-row .site-row-copy strong { font-size: 13px; }
.tics-dashboard .site-row-action { color: var(--accent); font-size: 11px; font-weight: 800; white-space: nowrap; }
.tics-dashboard .site-row-action i { margin-left: 4px; }
.tics-dashboard .search-empty { padding: 24px; border: 1px dashed #cad7e5; border-radius: 10px; color: #91a89a; font-size: 12px; text-align: center; }
.tics-dashboard .add-site-panel { padding: 29px; }
.tics-dashboard .add-site-panel .metric-icon { margin-bottom: 20px; }
.tics-dashboard .add-site-panel h2 { margin: 9px 0 7px; font-size: 22px; letter-spacing: -.8px; font-weight: 800; }
.tics-dashboard .add-site-panel > p { margin: 0 0 23px; color: #819b89; font-size: 12px; line-height: 1.65; }
.tics-dashboard .form-stack { display: grid; gap: 9px; }
.tics-dashboard .form-stack label { margin-top: 6px; color: #40566e; font-size: 11px; font-weight: 800; }
.tics-dashboard .form-stack input { width: 100%; height: 43px; padding: 0 12px; border: 1px solid #dce5ee; border-radius: 8px; background: #fff; color: #243e58; font-size: 12px; }
.tics-dashboard .form-stack input::placeholder { color: #aab8c6; }
.tics-dashboard .form-stack button { width: 100%; margin-top: 10px; }
.tics-dashboard .back-link { display: block; margin-bottom: 19px; color: #71947e; font-size: 11px; font-weight: 750; }
.tics-dashboard .back-link i { margin-right: 7px; }
.tics-dashboard .back-link:hover { color: var(--accent); }
.tics-dashboard .site-charts-grid { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(310px, 1fr); gap: 20px; margin-bottom: 20px; }
.tics-dashboard .site-breakdown-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; margin-bottom: 20px; }
.tics-dashboard .site-breakdown-grid .panel { min-width: 0; }
.tics-dashboard .ranked-list { margin-top: 15px; }
.tics-dashboard .ranked-row { padding: 10px 0; border-top: 1px solid #edf1f6; }
.tics-dashboard .ranked-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 7px; }
.tics-dashboard .ranked-head .ranked-name { overflow: hidden; color: #60778d; font-size: 11px; font-weight: 650; text-overflow: ellipsis; white-space: nowrap; }
.tics-dashboard .ranked-head strong { flex: none; color: #325d4b; font-size: 11px; font-weight: 800; }
.tics-dashboard .list-empty { margin: 12px 0 0; color: #9aafa2; font-size: 11px; }
.tics-dashboard .hours-chart-wrap { height: 195px; margin-top: 20px; }
.tics-dashboard .hours-chart-wrap .chart-empty { min-height: 150px; }
.tics-dashboard .activity-granularity { display: inline-flex; flex: none; gap: 4px; padding: 3px; border: 1px solid #e0ebe5; border-radius: 9px; background: #f6faf7; }
.tics-dashboard .activity-granularity button { min-height: 30px; padding: 0 10px; border: 0; border-radius: 6px; background: transparent; color: #718b7d; font-size: 11px; font-weight: 800; }
.tics-dashboard .activity-granularity button:hover, .tics-dashboard .activity-granularity button[aria-pressed="true"] { background: #e5f5eb; color: var(--accent); }
.tics-dashboard .install-panel { display: flex; align-items: center; justify-content: space-between; gap: 30px; padding: 27px; }
.tics-dashboard .install-panel h2 { margin: 8px 0 5px; }
.tics-dashboard .install-panel p { margin: 0; color: #8798a9; font-size: 11px; line-height: 1.5; }
.tics-dashboard .site-page .install-panel { margin-top: 20px; }
.tics-dashboard .delete-site-panel { display: flex; align-items: center; justify-content: space-between; gap: 30px; margin-top: 20px; padding: 27px; border-color: #f1d4d4; }
.tics-dashboard .delete-site-panel h2 { margin: 8px 0 5px; }
.tics-dashboard .delete-site-panel p { margin: 0; color: #8d7373; font-size: 11px; line-height: 1.5; }
.tics-dashboard .delete-site-button { display: inline-flex; align-items: center; justify-content: center; gap: 9px; min-height: 40px; padding: 0 15px; border: 1px solid #dfb5b5; border-radius: 8px; background: #fff7f7; color: #a33737; font-size: 12px; font-weight: 750; white-space: nowrap; }
.tics-dashboard .delete-site-button:hover { background: #fbe9e9; }
.tics-dashboard .snippet-actions { display: flex; align-items: center; gap: 9px; min-width: 0; width: min(100%, 450px); }
.tics-dashboard .snippet-code { flex: 1; min-width: 0; overflow-x: auto; padding: 11px 12px; border: 1px solid #e5ebf3; border-radius: 8px; background: #f7f9fc; color: #496e58; font-size: 10px; white-space: nowrap; }
.tics-dashboard .snippet-actions button { flex: none; }
.tics-dashboard .auth-shell { display: grid; place-items: center; min-height: 100vh; padding: 34px; }
.tics-dashboard .auth-layout { display: grid; grid-template-columns: minmax(0, 1fr) 420px; align-items: center; gap: clamp(35px, 8vw, 110px); width: min(1100px, 100%); }
.tics-dashboard .auth-intro .app-brand { margin: 0 0 70px; color: #1c4434; }
.tics-dashboard .auth-intro .app-brand small { color: #7da38f; }
.tics-dashboard .auth-intro h1 { max-width: 560px; margin: 15px 0 17px; font-size: clamp(42px, 4.5vw, 60px); line-height: 1.08; letter-spacing: -3px; font-weight: 850; }
.tics-dashboard .auth-intro > p { max-width: 490px; margin: 0 0 34px; color: #758d7e; font-size: 15px; line-height: 1.75; }
.tics-dashboard .auth-feature { display: flex; align-items: center; gap: 12px; padding: 14px 0; border-top: 1px solid #dfece3; color: #456c55; font-size: 12px; font-weight: 750; }
.tics-dashboard .auth-feature i { display: grid; place-items: center; width: 29px; height: 29px; border-radius: 8px; background: #e6f5ed; color: var(--accent); font-size: 12px; }
.tics-dashboard .auth-card { padding: 36px; border: 1px solid var(--line); border-radius: 18px; background: #fff; box-shadow: 0 25px 65px #18385612; }
.tics-dashboard .auth-card-icon { width: 43px; height: 43px; margin-bottom: 23px; }
.tics-dashboard .auth-card h2 { margin: 10px 0 6px; font-size: 28px; letter-spacing: -1px; font-weight: 800; }
.tics-dashboard .auth-card > p { margin: 0 0 24px; color: #889bab; font-size: 12px; }
.tics-dashboard .auth-card .primary-action { justify-content: space-between; height: 47px; margin-top: 10px; }
.tics-dashboard .auth-card .auth-switch { margin: 22px 0 0; color: #8194a6; font-size: 12px; text-align: center; }
.tics-dashboard .auth-switch a { color: var(--accent); font-weight: 800; }
.tics-dashboard .overlay-backdrop { position: fixed; inset: 0; z-index: 30; border: 0; background: #071c1599; }
@media (max-width: 1280px) {
  .tics-dashboard .site-breakdown-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tics-dashboard .period-toolbar { flex-wrap: wrap; }
}
@media (max-width: 1050px) {
  .tics-dashboard .overview-grid, .tics-dashboard .site-charts-grid, .tics-dashboard .sites-layout { grid-template-columns: 1fr; }
  .tics-dashboard .site-metrics-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tics-dashboard .install-panel { align-items: flex-start; flex-direction: column; }
  .tics-dashboard .delete-site-panel { align-items: flex-start; flex-direction: column; }
  .tics-dashboard .snippet-actions { width: 100%; }
}
@media (max-width: 800px) {
  .tics-dashboard .app-sidebar { transform: translateX(-100%); transition: transform .22s; }
  .tics-dashboard .app-sidebar.is-open { transform: translateX(0); }
  .tics-dashboard .app-workspace { width: 100%; margin-left: 0; }
  .tics-dashboard .menu-toggle { display: inline-grid; place-items: center; }
  .tics-dashboard .app-main { padding: 28px 20px 60px; }
  .tics-dashboard .app-topbar { padding: 0 20px; }
  .tics-dashboard .auth-layout { grid-template-columns: 1fr; gap: 28px; max-width: 550px; }
  .tics-dashboard .auth-intro .app-brand { margin-bottom: 30px; }
  .tics-dashboard .auth-intro h1 { font-size: 42px; }
  .tics-dashboard .auth-feature { display: none; }
}
@media (max-width: 600px) {
  .tics-dashboard .page-heading { align-items: flex-start; flex-direction: column; margin-bottom: 22px; }
  .tics-dashboard .page-heading h1 { font-size: 29px; }
  .tics-dashboard .metrics-grid, .tics-dashboard .site-metrics-grid, .tics-dashboard .site-breakdown-grid { grid-template-columns: 1fr; }
  .tics-dashboard .metric-card { min-height: 142px; }
  .tics-dashboard .metric-card > strong { margin-top: 12px; font-size: 32px; }
  .tics-dashboard .topbar-status, .tics-dashboard .topbar-logout span { display: none; }
  .tics-dashboard .topbar-breadcrumb { font-size: 11px; }
  .tics-dashboard .period-toolbar { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .tics-dashboard .preset-buttons { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .tics-dashboard .site-period-toolbar .preset-buttons { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .tics-dashboard .period-dates { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tics-dashboard .period-dates label { display: grid; grid-template-columns: minmax(0, 1fr); text-align: center; }
  /* Stretch the date field in its grid cell to avoid iOS Safari's padded input width bug. */
  .tics-dashboard .period-dates input {
    display: inline-flex; align-items: center; justify-self: stretch;
    width: auto; min-width: 0; height: 44px; padding: 0;
    font-size: 16px; line-height: 1.25; text-align: center;
  }
  .tics-dashboard .period-dates input::-webkit-datetime-edit { padding: 0; }
  .tics-dashboard .period-dates input::-webkit-date-and-time-value { width: 100%; min-width: 0; margin: 0; text-align: center; white-space: nowrap; }
  .tics-dashboard .hours-panel .panel-heading { flex-wrap: wrap; }
  .tics-dashboard .activity-granularity { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); width: 100%; }
  .tics-dashboard .preset-buttons button, .tics-dashboard .activity-granularity button { min-height: 44px; padding-inline: 4px; text-align: center; }
  .tics-dashboard .site-row-action { font-size: 0; }
  .tics-dashboard .site-row-action i { font-size: 12px; }
  .tics-dashboard .snippet-actions { flex-direction: column; align-items: stretch; }
  .tics-dashboard .auth-shell { padding: 22px; }
  .tics-dashboard .auth-intro h1 { font-size: 36px; letter-spacing: -2px; }
  .tics-dashboard .auth-intro > p { font-size: 13px; }
  .tics-dashboard .auth-card { padding: 25px; }
}
@media (max-width: 420px) {
  .tics-dashboard .site-period-toolbar .preset-buttons { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tics-dashboard .period-dates { grid-template-columns: minmax(0, 1fr); }
}

.tics-dashboard .site-heading-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.tics-dashboard .demo-edit-panel { margin-block: 22px; padding: 24px; }
.tics-dashboard .demo-edit-panel h2 { margin: 0 0 14px; font-size: 1.125rem; font-weight: 800; }
.tics-dashboard .demo-edit-panel .form-stack { max-width: 370px; }
