:root {
  color-scheme: light;
  --bg: #f6f7f9;
  --panel: #ffffff;
  --text: #1f2933;
  --muted: #697586;
  --line: #d9dee7;
  --accent: #0f766e;
  --accent-dark: #115e59;
  --soft: #eef6f5;
  --warning: #9a5b13;
  --shadow: 0 18px 50px rgba(31, 41, 51, 0.08);
  --shadow-hover: 0 22px 58px rgba(15, 118, 110, 0.14);
  --blue: #1d9be8;
  --purple: #6d51e8;
  --orange: #ff6a14;
  --pink: #d81758;
  --teal: #23848a;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    linear-gradient(135deg, rgba(15, 118, 110, 0.08), transparent 34%),
    linear-gradient(315deg, rgba(42, 91, 132, 0.08), transparent 38%),
    var(--bg);
  color: var(--text);
  font-family:
    "Microsoft YaHei",
    "PingFang SC",
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
}

/* Do not show the legacy static home markup before JavaScript finishes rebuilding it. */
body.app-loading {
  opacity: 0;
}

body {
  transition: opacity 0.12s ease;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) minmax(220px, 320px) auto;
  gap: 28px;
  align-items: center;
  min-height: 86px;
  border-bottom: 1px solid rgba(217, 222, 231, 0.72);
  background: rgba(255, 255, 255, 0.92);
  padding: 0 max(24px, calc((100vw - 1600px) / 2));
  backdrop-filter: blur(16px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  border: 0;
  background: transparent;
  color: #171d25;
  cursor: pointer;
  font-size: 28px;
  font-weight: 900;
}

.brand span span {
  color: var(--blue);
}

.brand-mark {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(135deg, #4468ec, #24b6ed);
  color: #ffffff;
  font-size: 22px;
}

.top-nav {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: center;
}

.nav-item {
  position: relative;
}

.top-nav button,
.recent-tools button,
.tool-grid button {
  border: 1px solid transparent;
  background: transparent;
  cursor: pointer;
}

.top-nav button {
  min-height: 44px;
  border-radius: 999px;
  color: #3b4553;
  padding: 0 16px;
  font-size: 17px;
  font-weight: 800;
}

.top-nav button:hover {
  background: #eef7ff;
  color: var(--blue);
}

.nav-menu {
  position: absolute;
  top: calc(100% + 10px);
  left: 50%;
  z-index: 30;
  display: grid;
  width: max-content;
  min-width: 190px;
  max-width: 260px;
  gap: 4px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #ffffff;
  padding: 8px;
  box-shadow: 0 24px 64px rgba(31, 41, 51, 0.16);
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 8px);
  transition:
    opacity 160ms ease,
    transform 160ms ease;
}

.nav-menu::before {
  position: absolute;
  top: -11px;
  left: 0;
  width: 100%;
  height: 12px;
  content: "";
}

.nav-item:hover .nav-menu,
.nav-item:focus-within .nav-menu {
  opacity: 1;
  pointer-events: auto;
  transform: translate(-50%, 0);
}

.nav-menu button {
  display: block;
  width: 100%;
  min-height: 42px;
  border-radius: 10px;
  color: #3b4553;
  padding: 0 12px;
  text-align: left;
  font-size: 15px;
  font-weight: 700;
  white-space: nowrap;
}

.nav-menu button:hover {
  background: #eef7ff;
  color: var(--blue);
}

.header-search,
.hero-search {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr);
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #f6f8fb;
  padding: 0 12px;
}

.header-search {
  min-height: 50px;
}

.auth-bar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  min-width: max-content;
}

.auth-button,
.auth-user,
.auth-switch,
.auth-close {
  border: 1px solid var(--line);
  background: #ffffff;
  color: #344052;
  cursor: pointer;
  font: inherit;
}

.auth-button,
.auth-user {
  min-height: 42px;
  border-radius: 999px;
  padding: 0 16px;
  font-weight: 800;
}

.auth-button:hover,
.auth-user:hover {
  border-color: rgba(29, 155, 232, 0.45);
  background: #eef7ff;
  color: var(--blue);
}

.auth-button.primary {
  border-color: transparent;
  background: var(--blue);
  color: #ffffff;
}

.auth-user {
  max-width: 160px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.auth-modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  background: rgba(15, 23, 42, 0.36);
  padding: 24px;
  backdrop-filter: blur(8px);
}

.auth-modal[hidden] {
  display: none;
}

.auth-dialog {
  position: relative;
  width: min(440px, 100%);
  border: 1px solid rgba(217, 222, 231, 0.9);
  border-radius: 18px;
  background: #ffffff;
  padding: 28px;
  box-shadow: 0 24px 80px rgba(15, 23, 42, 0.22);
  animation: page-in 180ms ease both;
}

.auth-dialog h2 {
  margin: 0 0 8px;
  font-size: 28px;
}

.auth-dialog p {
  margin: 0 0 18px;
  color: var(--muted);
}

.auth-close {
  position: absolute;
  top: 14px;
  right: 14px;
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border-radius: 50%;
  font-size: 24px;
  line-height: 1;
}

.auth-submit {
  width: 100%;
  margin-top: 8px;
}

.auth-switch {
  width: 100%;
  margin-top: 14px;
  border: 0;
  background: transparent;
  color: var(--blue);
  font-weight: 800;
}

.auth-message {
  min-height: 22px;
  margin: 10px 0 0 !important;
  color: var(--warning) !important;
}

.auth-message.ok {
  color: var(--accent) !important;
}

.header-search input,
.hero-search input {
  border: 0;
  background: transparent;
  box-shadow: none;
}

.header-search input:focus,
.hero-search input:focus {
  box-shadow: none;
  transform: none;
}

button,
input,
select,
textarea {
  font: inherit;
}

[hidden] {
  display: none !important;
}

.shell {
  width: min(1600px, calc(100% - 48px));
  margin: 0 auto;
  padding: 32px 0;
  animation: page-in 420ms ease both;
}

.home-view {
  display: grid;
  gap: 28px;
}

.recent-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  color: #1c222b;
  font-size: 18px;
}

.recent-tools button {
  min-height: 40px;
  border-color: rgba(29, 155, 232, 0.45);
  border-radius: 12px;
  background: rgba(29, 155, 232, 0.08);
  color: #197bb9;
  padding: 0 14px;
  font-weight: 800;
}

.hero {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 18px;
  overflow: hidden;
  border-radius: 24px;
  background: linear-gradient(180deg, #ffffff 0%, #f7fbff 100%);
  padding: 64px 24px 48px;
  text-align: center;
}

.hero::before,
.hero::after {
  position: absolute;
  width: 16px;
  height: 16px;
  border-radius: 4px;
  content: "";
  opacity: 0.7;
  transform: rotate(18deg);
}

.hero::before {
  top: 42px;
  left: 110px;
  background: #ffb44a;
}

.hero::after {
  right: 160px;
  bottom: 74px;
  background: #df3b95;
}

.hero > p:first-child {
  color: var(--blue);
  font-weight: 900;
}

.hero h1 {
  max-width: 1050px;
  font-size: clamp(42px, 7vw, 86px);
  font-weight: 950;
}

.hero h1 span {
  display: inline-block;
  background: var(--pink);
  color: #ffffff;
  padding: 0 18px 8px;
}

.hero > p:not(:first-child) {
  max-width: 740px;
  color: #697586;
  font-size: 21px;
}

.hero-search {
  width: min(620px, 100%);
  min-height: 64px;
  margin-top: 10px;
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 20px 45px rgba(31, 41, 51, 0.08);
}

.category-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.category-card {
  position: relative;
  display: grid;
  min-height: 190px;
  overflow: hidden;
  border: 0;
  border-radius: 14px;
  color: #ffffff;
  cursor: pointer;
  padding: 24px;
  text-align: left;
  box-shadow: 0 22px 52px rgba(31, 41, 51, 0.12);
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.category-card:hover {
  box-shadow: 0 28px 66px rgba(31, 41, 51, 0.18);
  transform: translateY(-4px);
}

.card-convert {
  background: linear-gradient(135deg, var(--purple), #7c5cf2);
}

.card-translate {
  background: linear-gradient(135deg, #226bd1, #2798e8);
}

.card-pdf {
  background: linear-gradient(135deg, #704fe7, #8c6df4);
}

.card-image {
  background: linear-gradient(135deg, var(--orange), #ff8a2b);
}

.card-video {
  background: linear-gradient(135deg, var(--pink), #e12f68);
}

.card-file {
  background: linear-gradient(135deg, var(--teal), #29979e);
}

.card-ai {
  background: linear-gradient(135deg, #111827, #2563eb 48%, #db2777);
}

.card-logistics {
  background: linear-gradient(135deg, #0f172a, #0ea5e9 46%, #22c55e);
}

.card-icon {
  display: grid;
  width: 58px;
  height: 58px;
  place-items: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.24);
  font-weight: 900;
}

.card-count {
  position: absolute;
  top: 28px;
  right: 22px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.22);
  padding: 8px 12px;
  font-weight: 800;
}

.category-card strong {
  align-self: end;
  font-size: 26px;
}

.category-card small {
  font-size: 15px;
  opacity: 0.88;
}

.tool-directory {
  display: grid;
  gap: 22px;
}

.tool-group {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #ffffff;
  padding: 22px;
  box-shadow: var(--shadow);
}

.tool-group h2 {
  margin-bottom: 14px;
}

.tool-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.tool-grid button {
  min-height: 62px;
  border-color: var(--line);
  border-radius: 12px;
  background: #f8fbff;
  color: #263241;
  padding: 0 16px;
  text-align: left;
  font-weight: 800;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.tool-grid button:hover {
  border-color: rgba(29, 155, 232, 0.5);
  background: #eef7ff;
  color: #146da8;
  transform: translateY(-2px);
}

.tool-grid button.search-hit {
  border-color: #1a73e8;
  background: #e8f1ff;
  color: #145fc2;
  animation: search-hit 1100ms ease both;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.1;
  letter-spacing: 0;
}

.topbar p,
.panel-head p {
  margin-top: 8px;
  color: var(--muted);
}

.ghost-button,
.swap-button {
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--text);
  cursor: pointer;
  transition:
    border-color 160ms ease,
    background 160ms ease,
    color 160ms ease,
    transform 160ms ease,
    box-shadow 160ms ease;
}

.ghost-button {
  min-height: 42px;
  padding: 0 16px;
  border-radius: 8px;
  white-space: nowrap;
}

.ghost-button:hover,
.swap-button:hover {
  border-color: var(--accent);
  background: var(--soft);
  color: var(--accent-dark);
  box-shadow: var(--shadow-hover);
  transform: translateY(-1px);
}

.ghost-button:active,
.swap-button:active,
.category:active {
  transform: translateY(1px) scale(0.99);
}

.workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.workspace .panel {
  width: min(1480px, 100%);
  margin: 0 auto;
}

.placeholder-panel {
  display: grid;
  justify-items: center;
  gap: 12px;
  padding: 64px 20px;
  text-align: center;
}

.placeholder-icon {
  display: grid;
  width: 86px;
  height: 86px;
  place-items: center;
  border-radius: 24px;
  background: #eef7ff;
  color: var(--blue);
  font-size: 42px;
}

.placeholder-panel h3 {
  margin: 0;
  font-size: 30px;
}

.placeholder-panel p {
  max-width: 560px;
  color: var(--muted);
}

.sidebar,
.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.sidebar {
  display: grid;
  gap: 6px;
  padding: 10px;
}

.category {
  position: relative;
  min-height: 42px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  text-align: left;
  cursor: pointer;
  padding: 0 12px;
  overflow: hidden;
  transition:
    background 160ms ease,
    color 160ms ease,
    transform 160ms ease;
}

.category::before {
  position: absolute;
  inset: 10px auto 10px 0;
  width: 3px;
  border-radius: 999px;
  background: var(--accent);
  content: "";
  opacity: 0;
  transform: translateX(-4px);
  transition:
    opacity 160ms ease,
    transform 160ms ease;
}

.category:hover {
  background: #f0f3f7;
  color: var(--text);
  transform: translateX(2px);
}

.category.active {
  background: var(--soft);
  color: var(--accent-dark);
  font-weight: 700;
}

.category.active::before {
  opacity: 1;
  transform: translateX(0);
}

.panel {
  padding: 22px;
  transition:
    opacity 180ms ease,
    transform 180ms ease;
}

.panel.is-switching {
  opacity: 0.55;
  transform: translateY(4px);
}

.panel-head {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}

h2 {
  font-size: 24px;
  letter-spacing: 0;
}

.status {
  align-self: start;
  max-width: 260px;
  border-radius: 999px;
  background: #f3f5f8;
  color: var(--muted);
  padding: 7px 10px;
  font-size: 13px;
  text-align: center;
  transition:
    background 180ms ease,
    color 180ms ease,
    transform 180ms ease;
}

.status.ok {
  animation: status-pop 240ms ease both;
}

.status.ok {
  background: var(--soft);
  color: var(--accent-dark);
}

.status.warn {
  background: #fff6e5;
  color: var(--warning);
}

.converter {
  display: grid;
  gap: 18px;
  padding-top: 22px;
}

.precision-row {
  display: flex;
  justify-content: flex-end;
  padding-top: 16px;
}

.currency-toolbar {
  display: flex;
  justify-content: flex-end;
  padding-top: 12px;
}

.compact-field {
  width: min(180px, 100%);
}

.currency-board {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  padding-top: 22px;
}

.currency-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(150px, 190px);
  align-items: center;
  gap: 12px;
  min-height: 78px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  padding: 12px;
  transition:
    border-color 180ms ease,
    box-shadow 180ms ease,
    transform 180ms ease,
    background 180ms ease;
}

.currency-row:hover {
  border-color: rgba(15, 118, 110, 0.42);
  box-shadow: 0 14px 34px rgba(31, 41, 51, 0.08);
  transform: translateY(-2px);
}

.currency-row:focus-within,
.currency-row.active {
  border-color: var(--accent);
  background: linear-gradient(180deg, #ffffff, #f7fbfa);
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.12);
}

.currency-row.value-updated {
  animation: value-flash 420ms ease both;
}

.currency-meta {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.currency-meta strong {
  color: var(--text);
  font-size: 18px;
  line-height: 1.1;
}

.currency-meta span,
.currency-meta small {
  overflow: hidden;
  color: var(--muted);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.currency-meta span {
  font-size: 14px;
}

.currency-meta small {
  font-size: 12px;
}

.currency-input {
  text-align: right;
}

.field {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 14px;
}

input,
select,
textarea {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  color: var(--text);
  padding: 0 12px;
  outline: none;
  transition:
    border-color 160ms ease,
    box-shadow 160ms ease,
    background 160ms ease,
    transform 160ms ease;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.14);
  transform: translateY(-1px);
}

textarea {
  min-height: 220px;
  padding: 12px;
  line-height: 1.6;
  resize: vertical;
}

.translator {
  display: grid;
  gap: 14px;
  padding-top: 22px;
}

.translate-toolbar {
  display: flex;
  justify-content: flex-end;
}

.translate-channel {
  display: inline-grid;
  grid-template-columns: auto minmax(160px, 220px);
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 14px;
}

.translate-channel select {
  min-height: 40px;
  border-radius: 999px;
  background: #f7f9fc;
}

.translate-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 48px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
}

.translate-card {
  display: grid;
  min-height: 360px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #ffffff;
  box-shadow: 0 18px 46px rgba(31, 41, 51, 0.07);
}

.output-card {
  background: #f3f7fc;
}

.language-bar {
  display: flex;
  align-items: center;
  min-height: 58px;
  border-bottom: 1px solid var(--line);
  padding: 0 16px;
}

.language-bar select {
  min-height: 40px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #1a73e8;
  font-weight: 700;
  box-shadow: none;
}

.language-bar select:focus {
  box-shadow: inset 0 -2px 0 #1a73e8;
  transform: none;
}

.translate-card textarea {
  min-height: 240px;
  border: 0;
  border-radius: 0;
  background: transparent;
  font-size: 18px;
  line-height: 1.65;
  resize: vertical;
}

.translate-card textarea:focus {
  box-shadow: none;
  transform: none;
}

.translate-card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 58px;
  border-top: 1px solid var(--line);
  padding: 10px 16px;
}

.translate-swap {
  margin-top: 72px;
  border-radius: 50%;
  color: #1a73e8;
}

.translate-controls {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 48px minmax(0, 1fr);
  gap: 12px;
  align-items: end;
}

.translate-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.text-field {
  min-width: 0;
}

.text-field:first-child {
  grid-column: 1 / -1;
}

.translate-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.download-panel {
  display: grid;
  gap: 16px;
  padding-top: 22px;
}

.file-tool-panel {
  display: grid;
  gap: 16px;
  padding-top: 22px;
}

.file-tool-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(130px, auto) minmax(130px, auto);
  gap: 12px;
  align-items: end;
}

.tool-log {
  min-height: 52px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfd;
  color: var(--muted);
  padding: 14px;
  line-height: 1.6;
}

.tool-log.ok {
  border-color: rgba(15, 118, 110, 0.26);
  background: #f0fdfa;
  color: var(--accent-dark);
}

.tool-log.warn {
  border-color: rgba(180, 83, 9, 0.32);
  background: #fffaf0;
  color: var(--warning);
}

.download-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 120px 140px;
  gap: 12px;
  align-items: end;
}

.download-help {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
}

.compact-textarea {
  min-height: 110px;
  font-size: 14px;
  line-height: 1.5;
}

.download-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid rgba(26, 115, 232, 0.18);
  border-radius: 8px;
  background: #f5f9ff;
  padding: 12px;
}

.download-actions span {
  color: var(--text);
  font-weight: 700;
}

.image-results {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.image-result-card {
  display: grid;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  padding: 12px;
  transition:
    border-color 160ms ease,
    box-shadow 160ms ease,
    transform 160ms ease;
}

.image-result-card:hover {
  border-color: rgba(26, 115, 232, 0.32);
  box-shadow: 0 14px 34px rgba(31, 41, 51, 0.08);
  transform: translateY(-2px);
}

.image-result-card img {
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 8px;
  background: #f4f7fb;
  object-fit: contain;
}

.image-result-meta {
  display: grid;
  gap: 4px;
}

.image-result-meta strong {
  color: var(--text);
}

.image-result-meta span {
  color: var(--muted);
  font-size: 13px;
}

.image-result-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.image-result-actions a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  text-decoration: none;
}

.ai-image-panel {
  display: grid;
  gap: 18px;
}

.ai-image-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.95fr);
  gap: 18px;
}

.ai-prompt-card,
.ai-preview-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(180deg, #ffffff, #f8fbff);
  padding: 16px;
}

.ai-prompt-card {
  display: grid;
  gap: 14px;
}

.ai-prompt-input {
  min-height: 220px;
  resize: vertical;
  line-height: 1.7;
}

.ai-image-options {
  display: grid;
  grid-template-columns: 160px 140px 140px;
  gap: 12px;
  align-items: end;
}

.ai-preview-card {
  display: grid;
  gap: 12px;
  align-content: start;
}

.ai-image-preview {
  display: grid;
  place-items: center;
  min-height: 360px;
  border: 1px dashed rgba(26, 115, 232, 0.28);
  border-radius: 8px;
  background:
    radial-gradient(circle at 20% 20%, rgba(37, 99, 235, 0.12), transparent 32%),
    radial-gradient(circle at 80% 70%, rgba(219, 39, 119, 0.12), transparent 30%),
    #f8fbff;
  color: var(--muted);
  overflow: hidden;
}

.ai-image-preview img {
  display: block;
  width: 100%;
  max-height: 620px;
  object-fit: contain;
}

.ai-image-actions {
  display: flex;
  justify-content: flex-end;
}

.ai-image-actions a {
  min-width: 140px;
  text-align: center;
  text-decoration: none;
}

.logistics-panel {
  display: grid;
  gap: 18px;
}

.logistics-shell {
  display: grid;
  grid-template-columns: minmax(260px, 0.38fr) minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.shipment-list-card,
.shipment-detail-card,
.tracking-detail-card,
.tracking-widget-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.92);
  padding: 16px;
}

.shipment-list-card {
  display: grid;
  gap: 14px;
  position: sticky;
  top: 102px;
}

.shipment-list-head,
.shipment-actions,
.tracking-widget-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.shipment-list {
  display: grid;
  gap: 10px;
  max-height: 640px;
  overflow: auto;
}

.shipment-list-item {
  display: grid;
  gap: 6px;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  padding: 12px;
  text-align: left;
  cursor: pointer;
}

.shipment-list-item:hover,
.shipment-list-item.active {
  border-color: rgba(26, 115, 232, 0.45);
  box-shadow: 0 12px 28px rgba(31, 41, 51, 0.08);
}

.shipment-list-item strong {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: var(--text);
  overflow-wrap: anywhere;
}

.shipment-list-name {
  font-weight: 800;
}

.shipment-list-number {
  font-weight: 400;
  overflow-wrap: anywhere;
}

.shipment-list-item strong em {
  flex: 0 0 auto;
  border-radius: 999px;
  background: #eef6ff;
  color: #1558b0;
  padding: 4px 8px;
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
}

.shipment-list-item span,
.shipment-list-item small,
.shipment-time,
.tracking-widget-head span {
  color: var(--muted);
  font-size: 13px;
}

.shipment-detail-card {
  display: grid;
  gap: 18px;
}

.shipment-form {
  display: grid;
  gap: 14px;
}

.shipment-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

#trackingCount {
  margin-left: 8px;
  color: #0f766e;
  font-size: 13px;
}

.tracking-detail-card,
.tracking-widget-card {
  display: grid;
  gap: 12px;
  background: linear-gradient(180deg, #ffffff, #f8fbff);
}

.tracking-detail-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.tracking-detail-head > div {
  display: grid;
  gap: 4px;
}

.tracking-detail-head strong {
  color: var(--text);
  font-size: 18px;
}

.tracking-detail-head span {
  color: var(--muted);
  font-size: 13px;
}

.tracking-detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.tracking-action-menu {
  position: relative;
  display: flex;
  justify-content: flex-end;
}

.tracking-action-toggle {
  min-width: 98px;
}

.tracking-action-toggle.active {
  border-color: rgba(26, 115, 232, 0.4);
  background: #eef6ff;
  color: #1558b0;
}

.tracking-action-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 20;
  display: grid;
  gap: 6px;
  min-width: 180px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.16);
  padding: 8px;
  backdrop-filter: blur(16px);
}

.tracking-action-dropdown button {
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--text);
  padding: 11px 12px;
  text-align: left;
  cursor: pointer;
}

.tracking-action-dropdown button:hover:not(:disabled) {
  background: #eef6ff;
  color: #1558b0;
}

.tracking-action-dropdown button:disabled {
  color: #94a3b8;
  cursor: not-allowed;
}

.tracking-status-badge {
  display: inline-flex;
  width: fit-content;
  border-radius: 999px;
  background: #eef6ff;
  color: #1558b0 !important;
  padding: 5px 10px;
  font-weight: 700;
}

.tracking-status-badge[data-status="已签收"] {
  background: #e9f8ef;
  color: #15803d !important;
}

.tracking-status-badge[data-status="已接收"] {
  background: #ecfdf5;
  color: #047857 !important;
}

.tracking-status-badge[data-status="在途中"],
.tracking-status-badge[data-status="派送中"] {
  background: #eff6ff;
  color: #1d4ed8 !important;
}

.tracking-status-badge[data-status="异常"] {
  background: #fff1f2;
  color: #be123c !important;
}

.tracking-status-badge[data-status="待揽收"] {
  background: #fff7ed;
  color: #c2410c !important;
}

.shipment-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.shipment-summary span {
  border: 1px solid rgba(26, 115, 232, 0.16);
  border-radius: 999px;
  background: #f8fbff;
  color: var(--muted);
  padding: 7px 10px;
  font-size: 13px;
}

.amazon-status-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  border: 1px solid rgba(26, 115, 232, 0.18);
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(238, 246, 255, 0.92), rgba(255, 255, 255, 0.94));
  padding: 14px;
}

.amazon-status-panel > div:first-child {
  display: grid;
  gap: 4px;
}

.amazon-status-panel strong {
  color: var(--text);
  font-size: 15px;
}

.amazon-status-panel span {
  color: var(--muted);
  font-size: 13px;
}

.amazon-status-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: flex-end;
}

.amazon-status-actions select {
  min-width: 150px;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #ffffff;
  color: var(--text);
  padding: 0 12px;
  font: inherit;
}

.amazon-track-paste {
  grid-column: 1 / -1;
}

.amazon-track-paste textarea {
  min-height: 118px;
}

.tracking-number-tabs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 10px;
}

.tracking-number-tabs button {
  border: 1px solid rgba(26, 115, 232, 0.22);
  border-radius: 8px;
  background: #f5f9ff;
  color: #1558b0;
  padding: 12px;
  text-align: left;
  overflow-wrap: anywhere;
  cursor: pointer;
}

.tracking-number-tabs button.active,
.tracking-number-tabs button:hover {
  border-color: #1a73e8;
  background: #1a73e8;
  color: #ffffff;
}

.tracking-section-title,
.tracking-widget-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.compact-action {
  min-height: 36px;
  padding: 8px 13px;
}

.tracking-widget {
  min-height: 320px;
  overflow: hidden;
}

.tracking-widget-card.is-collapsed {
  padding-bottom: 14px;
}

.tracking-widget-card.is-collapsed .tracking-widget-body {
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  pointer-events: none;
}

.tracking-widget-body {
  max-height: 520px;
  opacity: 1;
  overflow: hidden;
  transition: max-height 0.24s ease, opacity 0.18s ease;
}

.tracking-snapshot {
  min-height: 140px;
}

.tracking-snapshot.is-collapsed {
  min-height: 0;
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  pointer-events: none;
}

.tracking-snapshot-lines {
  display: grid;
  gap: 8px;
  max-height: 420px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  padding: 14px;
  color: var(--text);
  font-size: 14px;
  line-height: 1.6;
  white-space: pre-wrap;
}

.tracking-snapshot-lines div {
  border-bottom: 1px solid rgba(214, 225, 238, 0.7);
  padding-bottom: 8px;
}

.tracking-snapshot-lines div:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.empty-state {
  grid-column: 1 / -1;
  display: grid;
  gap: 6px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  background: #fbfcfd;
  padding: 22px;
  color: var(--muted);
}

.empty-state strong {
  color: var(--text);
}

.empty-state.warn {
  border-color: rgba(180, 83, 9, 0.32);
  background: #fffaf0;
}

.text-count {
  margin-right: auto;
  color: var(--muted);
  font-size: 13px;
}

.primary-action {
  border-color: #1a73e8;
  background: #1a73e8;
  color: #ffffff;
}

.primary-action:hover {
  background: #1558b0;
  color: #ffffff;
}

.unit-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 48px minmax(0, 1fr);
  gap: 12px;
  align-items: end;
}

.swap-button {
  width: 48px;
  height: 48px;
  border-radius: 8px;
  font-size: 22px;
  line-height: 1;
}

.swap-button:hover {
  transform: rotate(180deg);
}

.result-box {
  display: grid;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfd;
  padding: 16px;
  transition:
    border-color 180ms ease,
    box-shadow 180ms ease,
    background 180ms ease;
}

.result-box.result-updated {
  animation: result-pulse 360ms ease both;
}

textarea.result-updated {
  animation: textarea-flash 360ms ease both;
}

.result-box span {
  color: var(--muted);
  font-size: 14px;
}

output {
  min-height: 38px;
  overflow-wrap: anywhere;
  font-size: clamp(26px, 4vw, 38px);
  font-weight: 800;
  letter-spacing: 0;
}

.quick {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 18px;
}

.quick-item {
  min-height: 84px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: #ffffff;
  transition:
    border-color 160ms ease,
    box-shadow 160ms ease,
    transform 160ms ease;
}

.quick-item:hover {
  border-color: rgba(15, 118, 110, 0.38);
  box-shadow: 0 14px 30px rgba(31, 41, 51, 0.08);
  transform: translateY(-2px);
}

.quick-item strong {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}

.quick-item span {
  display: block;
  overflow-wrap: anywhere;
  font-size: 17px;
  font-weight: 700;
}

.history-panel {
  display: grid;
  gap: 12px;
  margin-top: 22px;
  border-top: 1px solid var(--line);
  padding-top: 18px;
}

.history-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.history-head h3 {
  color: var(--text);
  font-size: 18px;
  letter-spacing: 0;
}

.history-head .ghost-button {
  min-height: 36px;
  padding: 0 12px;
}

.history-list {
  display: grid;
  gap: 10px;
}

.history-empty {
  border: 1px dashed var(--line);
  border-radius: 8px;
  background: #fbfcfd;
  color: var(--muted);
  padding: 14px;
}

.history-item {
  display: grid;
  gap: 5px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  padding: 12px;
}

.history-item strong {
  color: var(--text);
  overflow-wrap: anywhere;
}

.history-item span {
  color: var(--muted);
  font-size: 13px;
  overflow-wrap: anywhere;
}

@media (max-width: 760px) {
  .site-header {
    position: static;
    grid-template-columns: 1fr;
    gap: 12px;
    padding: 16px;
  }

  .top-nav {
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  .auth-bar {
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  .nav-menu {
    left: 0;
    transform: translate(0, 8px);
  }

  .nav-item:hover .nav-menu,
  .nav-item:focus-within .nav-menu {
    transform: translate(0, 0);
  }

  .shell {
    width: min(100% - 20px, 1120px);
    padding: 18px 0;
  }

  .topbar,
  .panel-head {
    align-items: stretch;
    flex-direction: column;
  }

  .workspace {
    grid-template-columns: 1fr;
  }

  .category-cards,
  .tool-grid {
    grid-template-columns: 1fr;
  }

  .hero {
    padding: 44px 16px 34px;
  }

  .sidebar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .category {
    text-align: center;
  }

  .panel {
    padding: 16px;
  }

  .precision-row {
    justify-content: stretch;
  }

  .currency-toolbar {
    justify-content: stretch;
  }

  .compact-field {
    width: 100%;
  }

  .unit-row,
  .quick,
  .currency-board,
  .download-form,
  .file-tool-grid,
  .image-results,
  .ai-image-layout,
  .ai-image-options,
  .logistics-shell,
  .shipment-form-grid,
  .translate-controls,
  .translate-grid,
  .translate-shell {
    grid-template-columns: 1fr;
  }

  .ai-image-preview {
    min-height: 260px;
  }

  .shipment-list-card {
    position: static;
  }

  .shipment-list {
    max-height: none;
  }

  .shipment-list-head,
  .shipment-actions,
  .tracking-detail-head,
  .tracking-widget-head {
    align-items: stretch;
    flex-direction: column;
  }

  .tracking-detail-actions {
    justify-content: stretch;
  }

  .tracking-detail-actions button {
    width: 100%;
  }

  .tracking-action-menu {
    justify-content: stretch;
  }

  .tracking-action-toggle {
    width: 100%;
  }

  .tracking-action-dropdown {
    left: 0;
    right: 0;
    min-width: 0;
  }

  .tracking-section-title,
  .tracking-widget-head,
  .amazon-status-panel,
  .amazon-status-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .amazon-status-panel {
    grid-template-columns: 1fr;
  }

  .amazon-status-actions select,
  .amazon-status-actions button {
    width: 100%;
  }

  .translate-toolbar {
    justify-content: stretch;
  }

  .translate-channel {
    grid-template-columns: 1fr;
    width: 100%;
  }

  .translate-swap {
    width: 48px;
    margin: 0 auto;
  }

  .currency-row {
    grid-template-columns: 1fr;
  }

  .currency-input {
    text-align: left;
  }

  .swap-button {
    width: 100%;
  }

  .translate-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .text-count {
    margin-right: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 1ms !important;
    scroll-behavior: auto !important;
    transition-duration: 1ms !important;
  }
}

@keyframes page-in {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes status-pop {
  0% {
    transform: scale(0.98);
  }

  70% {
    transform: scale(1.03);
  }

  100% {
    transform: scale(1);
  }
}

@keyframes value-flash {
  0% {
    background: #ffffff;
  }

  40% {
    background: #e9f7f4;
  }

  100% {
    background: #ffffff;
  }
}

@keyframes result-pulse {
  0% {
    border-color: var(--line);
    box-shadow: none;
    transform: scale(1);
  }

  45% {
    border-color: var(--accent);
    box-shadow: 0 12px 34px rgba(15, 118, 110, 0.16);
    transform: scale(1.01);
  }

  100% {
    border-color: var(--line);
    box-shadow: none;
    transform: scale(1);
  }
}

@keyframes textarea-flash {
  0% {
    border-color: var(--line);
    background: #ffffff;
  }

  45% {
    border-color: var(--accent);
    background: #f1faf8;
  }

  100% {
    border-color: var(--line);
    background: #ffffff;
  }
}

@keyframes search-hit {
  0%,
  100% {
    box-shadow: none;
    transform: scale(1);
  }

  35% {
    box-shadow: 0 0 0 6px rgba(26, 115, 232, 0.16);
    transform: scale(1.03);
  }
}


.admin-modal {
  position: fixed;
  inset: 0;
  z-index: 85;
  display: grid;
  place-items: center;
  background: rgba(15, 23, 42, 0.42);
  padding: 24px;
  backdrop-filter: blur(8px);
}

.admin-modal[hidden] {
  display: none;
}

.admin-dialog {
  position: relative;
  width: min(1120px, 100%);
  max-height: min(88vh, 920px);
  overflow: auto;
  border: 1px solid rgba(217, 222, 231, 0.9);
  border-radius: 18px;
  background: #ffffff;
  padding: 28px;
  box-shadow: 0 24px 80px rgba(15, 23, 42, 0.22);
  animation: page-in 180ms ease both;
}

.admin-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

.admin-head h2 {
  margin: 0 0 8px;
  font-size: 28px;
}

.admin-head p {
  margin: 0;
  color: var(--muted);
}

.admin-create {
  display: grid;
  grid-template-columns: minmax(150px, 1fr) minmax(150px, 1fr) minmax(150px, 1fr) minmax(150px, 1fr) auto;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #f8fbff;
}

.admin-create input,
.admin-user-card input,
.admin-user-card select {
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #ffffff;
  padding: 0 12px;
  color: var(--text);
  font: inherit;
}

.admin-layout {
  display: grid;
  grid-template-columns: minmax(300px, 380px) minmax(0, 1fr);
  gap: 16px;
  margin-top: 16px;
}

.admin-list-panel,
.admin-detail-panel {
  min-height: 420px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fbfdff;
  padding: 14px;
}

.admin-search {
  display: grid;
  gap: 8px;
  margin-bottom: 12px;
  color: #344052;
  font-weight: 900;
}

.admin-search input {
  min-height: 42px;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #ffffff;
  padding: 0 14px;
  color: var(--text);
  font: inherit;
}

.admin-toolbar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.admin-toolbar label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #344052;
  font-weight: 900;
}

.admin-user-list {
  display: grid;
  gap: 8px;
}

.admin-row {
  display: grid;
  grid-template-columns: 34px 1fr;
  align-items: stretch;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #ffffff;
  overflow: hidden;
}

.admin-row.active {
  border-color: #1a73e8;
  box-shadow: 0 0 0 3px rgba(26, 115, 232, 0.12);
}

.admin-row-check {
  display: grid;
  place-items: center;
  border-right: 1px solid var(--line);
}

.admin-row-main {
  display: grid;
  gap: 3px;
  border: 0;
  background: transparent;
  padding: 10px 12px;
  text-align: left;
  color: var(--text);
  cursor: pointer;
  font: inherit;
}

.admin-row-main span,
.admin-row-main small {
  color: var(--muted);
  font-weight: 700;
}

.admin-user-card {
  display: grid;
  gap: 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #ffffff;
  padding: 16px;
}

.admin-user-top {
  display: grid;
  grid-template-columns: minmax(160px, 1fr) minmax(140px, 180px) minmax(140px, 180px) minmax(120px, 160px) auto;
  gap: 10px;
  align-items: center;
}

.admin-username {
  display: grid;
  gap: 4px;
  font-weight: 900;
}

.admin-username small {
  color: var(--muted);
  font-weight: 600;
}

.admin-active-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #344052;
  font-weight: 800;
}

.admin-permissions {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 8px;
}

.admin-permissions label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  border: 1px solid #e3e8f0;
  border-radius: 10px;
  background: #fbfdff;
  padding: 0 10px;
  color: #344052;
  font-weight: 700;
}

.admin-permissions input:disabled + span {
  color: var(--muted);
}

.admin-password-row {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) auto;
  gap: 10px;
}

@media (max-width: 760px) {
  .admin-dialog {
    padding: 18px;
  }

  .admin-head,
  .admin-user-top {
    grid-template-columns: 1fr;
    display: grid;
  }

  .admin-create,
  .admin-password-row {
    grid-template-columns: 1fr;
  }
}


.permission-locked {
  opacity: 0.48;
  cursor: not-allowed !important;
  filter: grayscale(0.25);
}

.permission-locked:hover {
  background: transparent !important;
  color: inherit !important;
}


.card-schedule {
  background: linear-gradient(135deg, #0ea5e9, #14b8a6);
}

.schedule-panel {
  display: grid;
  gap: 18px;
}

.schedule-panel[hidden] {
  display: none;
}

.schedule-toolbar {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.schedule-form {
  display: grid;
  grid-template-columns: minmax(180px, 1.4fr) minmax(170px, 1fr) minmax(170px, 1fr) minmax(120px, 0.7fr) minmax(120px, 0.7fr);
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #f8fbff;
}

.schedule-form input,
.schedule-form select,
.schedule-form textarea {
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #ffffff;
  padding: 0 12px;
  color: var(--text);
  font: inherit;
}

.schedule-form textarea {
  grid-column: 1 / -1;
  min-height: 88px;
  padding: 12px;
  resize: vertical;
}

.schedule-list {
  display: grid;
  gap: 12px;
}

.schedule-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #ffffff;
  padding: 16px;
}

.schedule-item.is-high {
  border-color: rgba(216, 23, 88, 0.42);
  background: #fff7fa;
}

.schedule-item.is-done {
  opacity: 0.62;
}

.schedule-item strong {
  display: block;
  margin-bottom: 6px;
  font-size: 18px;
}

.schedule-item span,
.schedule-item p {
  margin: 0;
  color: var(--muted);
}

.schedule-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.ghost-button.danger {
  border-color: #ffd2d2;
  color: #b42318;
}

.account-modal {
  position: fixed;
  inset: 0;
  z-index: 82;
  display: grid;
  place-items: center;
  background: rgba(15, 23, 42, 0.36);
  padding: 24px;
  backdrop-filter: blur(8px);
}

.account-modal[hidden] {
  display: none;
}

.account-dialog {
  position: relative;
  width: min(480px, 100%);
  border: 1px solid rgba(217, 222, 231, 0.9);
  border-radius: 18px;
  background: #ffffff;
  padding: 28px;
  box-shadow: 0 24px 80px rgba(15, 23, 42, 0.22);
}

.account-dialog h2 {
  margin: 0 0 18px;
}

.account-info {
  display: grid;
  gap: 10px;
}

.account-info div {
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr);
  gap: 10px;
  border-bottom: 1px solid #edf1f7;
  padding: 10px 0;
}

.account-info span {
  color: var(--muted);
}

.admin-mode .shell,
.admin-mode .top-nav,
.admin-mode .header-search,
.admin-mode #adminButton,
.admin-mode #openLogin,
.admin-mode #openRegister,
.admin-mode #accountButton {
  display: none !important;
}

.admin-mode .site-header {
  grid-template-columns: auto 1fr;
}

.admin-mode .admin-modal {
  position: static;
  display: block;
  min-height: calc(100vh - 86px);
  background: transparent;
  padding: 28px max(24px, calc((100vw - 1600px) / 2));
  backdrop-filter: none;
}

.admin-mode .admin-dialog {
  width: 100%;
  max-height: none;
  box-shadow: var(--shadow);
}

.admin-mode #closeAdmin {
  display: none;
}

@media (max-width: 760px) {
  .schedule-form,
  .schedule-item,
  .account-info div {
    grid-template-columns: 1fr;
  }

  .schedule-actions {
    justify-content: stretch;
  }
}


.admin-user-top.detail {
  grid-template-columns: 1fr minmax(170px, 220px) minmax(140px, 180px) minmax(120px, 150px) auto;
}

.admin-detail-actions,
.admin-permission-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.auth-button.compact {
  min-height: 30px;
  padding: 0 10px;
  font-size: 13px;
}

@media (max-width: 980px) {
  .admin-layout {
    grid-template-columns: 1fr;
  }

  .admin-create,
  .admin-user-top.detail {
    grid-template-columns: 1fr;
  }
}


.admin-toast {
  position: fixed;
  top: 22px;
  right: 26px;
  z-index: 130;
  min-width: 160px;
  border: 1px solid rgba(20, 184, 166, 0.32);
  border-radius: 12px;
  background: #ecfdf5;
  color: #047857;
  padding: 12px 16px;
  font-weight: 900;
  box-shadow: 0 18px 46px rgba(15, 23, 42, 0.18);
  opacity: 0;
  pointer-events: none;
  transform: translateY(-8px);
  transition: opacity 160ms ease, transform 160ms ease;
}

.admin-toast.show {
  opacity: 1;
  transform: translateY(0);
}

.admin-toast.warn {
  border-color: rgba(245, 158, 11, 0.36);
  background: #fffbeb;
  color: #b45309;
}

.admin-user-card.save-flash {
  animation: admin-save-flash 900ms ease both;
}

@keyframes admin-save-flash {
  0% {
    box-shadow: 0 0 0 0 rgba(20, 184, 166, 0.3);
    border-color: rgba(20, 184, 166, 0.55);
  }

  45% {
    box-shadow: 0 0 0 6px rgba(20, 184, 166, 0.12);
    border-color: rgba(20, 184, 166, 0.7);
  }

  100% {
    box-shadow: none;
    border-color: var(--line);
  }
}


/* Home visual upgrade */
:root {
  --cursor-x: 50vw;
  --cursor-y: 40vh;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(circle at var(--cursor-x) var(--cursor-y), rgba(29, 155, 232, 0.18), transparent 24rem),
    radial-gradient(circle at 18% 18%, rgba(216, 23, 88, 0.16), transparent 22rem),
    radial-gradient(circle at 82% 18%, rgba(109, 81, 232, 0.15), transparent 25rem),
    linear-gradient(135deg, #eef9ff 0%, #f8fbff 46%, #f7f3ff 100%);
  content: "";
}

body::after {
  position: fixed;
  inset: 0;
  z-index: -1;
  opacity: 0.38;
  background-image:
    linear-gradient(rgba(29, 155, 232, 0.12) 1px, transparent 1px),
    linear-gradient(90deg, rgba(109, 81, 232, 0.10) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: linear-gradient(to bottom, #000, transparent 76%);
  content: "";
  pointer-events: none;
}

.mouse-halo {
  position: fixed;
  left: var(--cursor-x);
  top: var(--cursor-y);
  z-index: 120;
  width: 22px;
  height: 22px;
  border: 1px solid rgba(29, 155, 232, 0.45);
  border-radius: 50%;
  pointer-events: none;
  transform: translate(-50%, -50%);
  transition: width 120ms ease, height 120ms ease, border-color 120ms ease;
  mix-blend-mode: multiply;
}

.click-ripple {
  position: fixed;
  z-index: 119;
  width: 12px;
  height: 12px;
  border: 2px solid rgba(216, 23, 88, 0.48);
  border-radius: 50%;
  pointer-events: none;
  transform: translate(-50%, -50%);
  animation: click-ripple 680ms ease-out forwards;
}

.hero {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.72);
  background:
    linear-gradient(120deg, rgba(255,255,255,0.92), rgba(255,255,255,0.72)),
    radial-gradient(circle at 22% 18%, rgba(29, 155, 232, 0.18), transparent 26rem),
    radial-gradient(circle at 84% 74%, rgba(216, 23, 88, 0.15), transparent 24rem);
  box-shadow: 0 30px 90px rgba(31, 41, 51, 0.12);
}

.hero::before,
.hero::after {
  position: absolute;
  width: 120px;
  height: 120px;
  border-radius: 32px;
  content: "";
  pointer-events: none;
  transform: rotate(18deg);
  animation: float-shard 6s ease-in-out infinite;
}

.hero::before {
  left: 8%;
  top: 18%;
  background: linear-gradient(135deg, rgba(255, 191, 105, 0.8), rgba(255, 191, 105, 0));
}

.hero::after {
  right: 10%;
  bottom: 16%;
  background: linear-gradient(135deg, rgba(216, 23, 88, 0.7), rgba(29, 155, 232, 0));
  animation-delay: -2s;
}

.category-card {
  position: relative;
  overflow: hidden;
  transform: translateZ(0);
  transition: transform 180ms ease, box-shadow 180ms ease, filter 180ms ease;
}

.category-card::after {
  position: absolute;
  inset: -80% -30%;
  background: linear-gradient(115deg, transparent 35%, rgba(255,255,255,0.3), transparent 65%);
  content: "";
  transform: translateX(-70%) rotate(12deg);
  transition: transform 520ms ease;
}

.category-card:hover {
  transform: translateY(-8px) scale(1.015);
  filter: saturate(1.08);
}

.category-card:hover::after {
  transform: translateX(45%) rotate(12deg);
}

.card-featured {
  grid-column: span 2;
  min-height: 210px;
  background: linear-gradient(135deg, #101827, #1d9be8 52%, #d81758);
}

.card-featured .card-icon {
  background: rgba(255, 255, 255, 0.2);
}

.schedule-directory {
  border: 1px solid rgba(29, 155, 232, 0.22);
  border-radius: 18px;
  background: rgba(255,255,255,0.64);
  padding: 18px;
  box-shadow: 0 18px 60px rgba(29, 155, 232, 0.08);
}

.schedule-form {
  display: grid;
  gap: 14px;
}

.schedule-main-fields {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(210px, 280px);
  gap: 12px;
}

.schedule-options,
.schedule-submit-row,
.schedule-quick-times {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.schedule-quick-times button {
  min-height: 38px;
  border: 1px solid rgba(29, 155, 232, 0.28);
  border-radius: 999px;
  background: #eef7ff;
  color: #1175b7;
  padding: 0 14px;
  cursor: pointer;
  font-weight: 800;
}

.schedule-panel {
  background:
    linear-gradient(135deg, rgba(255,255,255,0.96), rgba(246,251,255,0.9)),
    radial-gradient(circle at 16% 16%, rgba(29,155,232,0.14), transparent 22rem);
}

.schedule-item {
  position: relative;
  overflow: hidden;
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.schedule-item:hover {
  transform: translateY(-3px);
  box-shadow: 0 16px 46px rgba(31, 41, 51, 0.12);
}

@keyframes click-ripple {
  to {
    width: 86px;
    height: 86px;
    opacity: 0;
  }
}

@keyframes float-shard {
  0%, 100% { transform: translateY(0) rotate(18deg); }
  50% { transform: translateY(-16px) rotate(30deg); }
}

@media (max-width: 760px) {
  .card-featured {
    grid-column: span 1;
  }

  .schedule-main-fields {
    grid-template-columns: 1fr;
  }
}


/* Home visual layer fix */
body {
  position: relative;
  overflow-x: hidden;
  background: #f8fbff;
  isolation: isolate;
}

body::before,
body::after {
  pointer-events: none;
}

body::before {
  z-index: -2;
}

body::after {
  z-index: -1;
}

.site-header,
.shell,
.auth-modal,
.admin-modal,
.account-modal {
  position: relative;
}

.shell {
  z-index: 1;
}

.site-header {
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 12px 42px rgba(31, 41, 51, 0.06);
}

.recent-tools {
  border: 1px solid rgba(29, 155, 232, 0.16);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.54);
  padding: 12px 14px;
  backdrop-filter: blur(14px);
}


/* Hero text replacement */
.hero {
  min-height: 430px;
  align-content: center;
  padding: 58px 24px 42px;
}

.hero h1,
.hero > p {
  display: none;
}

.hero-orbit {
  position: relative;
  width: min(520px, 86vw);
  height: 230px;
  margin: 0 auto 8px;
}

.orbit-ring {
  position: absolute;
  inset: 24px 54px;
  border: 1px solid rgba(29, 155, 232, 0.28);
  border-radius: 999px;
  transform: rotate(-8deg);
  box-shadow: inset 0 0 36px rgba(29, 155, 232, 0.08);
}

.ring-two {
  inset: 56px 28px;
  border-color: rgba(216, 23, 88, 0.22);
  transform: rotate(13deg);
}

.orbit-core {
  position: absolute;
  left: 50%;
  top: 50%;
  display: grid;
  width: 92px;
  height: 92px;
  place-items: center;
  border-radius: 28px;
  background: linear-gradient(135deg, #1d9be8, #6d51e8 58%, #d81758);
  color: #ffffff;
  font-size: 42px;
  font-weight: 950;
  transform: translate(-50%, -50%) rotate(-8deg);
  box-shadow: 0 26px 70px rgba(29, 155, 232, 0.28);
}

.orbit-chip {
  position: absolute;
  display: grid;
  min-width: 82px;
  min-height: 42px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.78);
  color: #1f2933;
  font-weight: 900;
  box-shadow: 0 18px 44px rgba(31, 41, 51, 0.12);
  backdrop-filter: blur(14px);
  animation: orbit-float 4.8s ease-in-out infinite;
}

.chip-schedule {
  left: 14%;
  top: 18%;
  color: #0f766e;
}

.chip-translate {
  right: 12%;
  top: 25%;
  color: #1d6ec8;
  animation-delay: -1.4s;
}

.chip-file {
  left: 58%;
  bottom: 10%;
  color: #b91c5c;
  animation-delay: -2.6s;
}

.hero-search {
  position: relative;
  z-index: 2;
}

@keyframes orbit-float {
  0%, 100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-12px);
  }
}

@media (max-width: 760px) {
  .hero {
    min-height: 360px;
  }

  .hero-orbit {
    height: 190px;
  }

  .orbit-core {
    width: 78px;
    height: 78px;
    font-size: 34px;
  }
}


/* Hero orbit clickable tools */
.hero-orbit {
  width: min(720px, 92vw);
  height: 290px;
}

.orbit-ring {
  inset: 38px 86px;
}

.ring-two {
  inset: 70px 48px;
}

.ring-three {
  inset: 18px 154px;
  border-color: rgba(15, 118, 110, 0.2);
  transform: rotate(34deg);
  animation: orbit-ring-breathe 7s ease-in-out infinite;
}

.orbit-chip,
.orbit-core {
  border: 0;
  cursor: pointer;
  font: inherit;
}

.orbit-chip {
  z-index: 2;
  min-width: 78px;
  color: #1f2933;
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}

.orbit-chip:hover,
.orbit-chip:focus-visible {
  outline: none;
  transform: translateY(-6px) scale(1.06);
  box-shadow: 0 24px 58px rgba(29, 155, 232, 0.2);
}

.orbit-core {
  z-index: 3;
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.orbit-core:hover,
.orbit-core:focus-visible {
  outline: none;
  transform: translate(-50%, -50%) rotate(-8deg) scale(1.08);
  box-shadow: 0 30px 84px rgba(216, 23, 88, 0.26);
}

.chip-schedule {
  left: 3%;
  top: 21%;
}

.chip-translate {
  right: 11%;
  top: 18%;
}

.chip-currency {
  left: 23%;
  bottom: 12%;
  color: #047857;
  animation-delay: -0.6s;
}

.chip-length {
  right: 23%;
  bottom: 12%;
  color: #6d51e8;
  animation-delay: -1.1s;
}

.chip-pdf {
  left: 43%;
  top: 2%;
  color: #d81758;
  animation-delay: -1.8s;
}

.chip-image {
  left: 4%;
  bottom: 38%;
  color: #ff6a14;
  animation-delay: -2.3s;
}

.chip-video {
  right: 3%;
  bottom: 39%;
  color: #1d6ec8;
  animation-delay: -2.9s;
}

.chip-download {
  left: 48%;
  bottom: 0;
  color: #23848a;
  animation-delay: -3.4s;
}

.chip-ai {
  right: 15%;
  bottom: 21%;
  color: #db2777;
  animation-delay: -3.8s;
}

.chip-logistics {
  left: 20%;
  top: 14%;
  color: #0f766e;
  animation-delay: -4.2s;
}

@keyframes orbit-ring-breathe {
  0%, 100% {
    transform: rotate(34deg) scale(1);
  }

  50% {
    transform: rotate(40deg) scale(1.04);
  }
}

@media (max-width: 760px) {
  .hero-orbit {
    height: 260px;
  }

  .orbit-chip {
    min-width: 64px;
    min-height: 36px;
    font-size: 14px;
  }

  .chip-image,
  .chip-video {
    bottom: 44%;
  }
}


/* Auth modal and account menu fix */
.auth-modal,
.account-modal {
  position: fixed !important;
  inset: 0 !important;
  z-index: 180 !important;
  display: grid;
  place-items: start center;
  padding: 92px 24px 24px;
  background: rgba(15, 23, 42, 0.38);
  backdrop-filter: blur(8px);
}

.auth-modal[hidden],
.account-modal[hidden] {
  display: none !important;
}

.auth-dialog,
.account-dialog {
  max-height: calc(100vh - 130px);
  overflow: auto;
}

.remember-field {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  color: #344052;
  font-weight: 800;
}

.account-menu-wrap {
  position: relative;
}

.avatar-button {
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  border: 1px solid rgba(29, 155, 232, 0.35);
  border-radius: 50%;
  background: linear-gradient(135deg, #1d9be8, #6d51e8);
  color: #ffffff;
  cursor: pointer;
  font-size: 18px;
  font-weight: 950;
  box-shadow: 0 12px 30px rgba(29, 155, 232, 0.2);
}

.account-menu {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  z-index: 190;
  display: grid;
  min-width: 150px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #ffffff;
  padding: 8px;
  box-shadow: 0 24px 64px rgba(31, 41, 51, 0.18);
}

.account-menu[hidden] {
  display: none !important;
}

.account-menu button,
.account-logout-row {
  min-height: 40px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: #344052;
  cursor: pointer;
  padding: 0 12px;
  text-align: left;
  font: inherit;
  font-weight: 800;
}

.account-menu button:hover,
.account-logout-row:hover {
  background: #eef7ff;
  color: var(--blue);
}

.account-logout-row {
  width: 100%;
  margin-top: 14px;
  border-top: 1px solid #edf1f7;
  border-radius: 0;
  color: #b42318;
}

.admin-mode .admin-modal {
  position: static !important;
  inset: auto !important;
  z-index: auto !important;
}

body.modal-open {
  overflow: hidden;
}


/* Schedule picker redesign */
.schedule-panel .precision-row {
  display: none !important;
}

.schedule-panel {
  padding-top: 18px;
}

.schedule-form {
  grid-template-columns: none !important;
  align-items: stretch;
  gap: 14px !important;
  padding: 16px !important;
}

.schedule-main-fields {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(260px, 360px);
  gap: 12px;
  align-items: start;
}

.schedule-date-field {
  position: relative;
  min-width: 0;
}

.schedule-date-button {
  width: 100%;
  min-height: 52px;
  border: 1px solid rgba(29, 155, 232, 0.28);
  border-radius: 14px;
  background: linear-gradient(135deg, #ffffff, #eef7ff);
  color: #1f2933;
  cursor: pointer;
  padding: 0 16px;
  text-align: left;
  font: inherit;
  font-weight: 900;
  box-shadow: 0 10px 28px rgba(29, 155, 232, 0.08);
}

.schedule-date-button::before {
  content: "提醒时间";
  display: block;
  margin-bottom: 2px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.schedule-picker {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  z-index: 60;
  width: min(360px, calc(100vw - 48px));
  border: 1px solid rgba(217, 222, 231, 0.96);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.96);
  padding: 14px;
  box-shadow: 0 24px 70px rgba(31, 41, 51, 0.18);
  backdrop-filter: blur(16px);
}

.schedule-picker[hidden] {
  display: none !important;
}

.schedule-picker-head,
.schedule-picker-actions,
.schedule-time-pick {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.schedule-picker-head {
  margin-bottom: 12px;
}

.schedule-picker-head button,
.schedule-picker-actions button {
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #ffffff;
  cursor: pointer;
  padding: 0 12px;
  font: inherit;
  font-weight: 900;
}

.schedule-weekdays,
.schedule-days {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
}

.schedule-weekdays {
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-align: center;
}

.schedule-days button {
  display: grid;
  aspect-ratio: 1;
  place-items: center;
  border: 1px solid transparent;
  border-radius: 12px;
  background: transparent;
  color: #344052;
  cursor: pointer;
  font: inherit;
  font-weight: 800;
}

.schedule-days button:hover {
  background: #eef7ff;
  color: var(--blue);
}

.schedule-days button.is-muted {
  color: #a7b1bf;
}

.schedule-days button.is-today {
  border-color: rgba(29, 155, 232, 0.45);
}

.schedule-days button.is-selected {
  background: var(--blue);
  color: #ffffff;
  box-shadow: 0 10px 24px rgba(29, 155, 232, 0.24);
}

.schedule-time-pick {
  justify-content: center;
  margin: 14px 0;
}

.schedule-time-pick select {
  width: 92px;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #ffffff;
  padding: 0 12px;
  font-weight: 900;
}

.schedule-options {
  align-items: center;
}

.schedule-options select {
  min-width: 170px;
}

.schedule-submit-row {
  justify-content: flex-start;
}

@media (max-width: 760px) {
  .schedule-main-fields {
    grid-template-columns: 1fr;
  }

  .schedule-picker {
    left: 0;
    right: auto;
  }
}


/* Mobile layout and orbit fix */
html,
body {
  width: 100%;
  max-width: 100%;
  overflow-x: clip;
}

.orbit-chip {
  min-width: 96px;
  min-height: 50px;
  padding: 0 18px;
  font-size: 18px;
}

.orbit-core {
  width: 108px;
  height: 108px;
  font-size: 48px;
}

@media (max-width: 760px) {
  html,
  body {
    overflow-x: hidden;
  }

  body::after {
    background-size: 64px 64px;
    opacity: 0.16;
  }

  .mouse-halo,
  .click-ripple {
    display: none !important;
  }

  .site-header {
    display: grid;
    grid-template-columns: 1fr auto;
    width: 100%;
    max-width: 100vw;
    min-height: auto;
    gap: 14px;
    padding: 18px 18px 20px;
    overflow: visible;
  }

  .brand {
    grid-column: 1 / -1;
    justify-self: start;
    font-size: 28px;
  }

  .top-nav {
    grid-column: 1 / -1;
    justify-content: flex-start;
    flex-wrap: wrap;
    gap: 8px 18px;
    max-width: 100%;
  }

  .top-nav button {
    min-height: 34px;
    padding: 0 6px;
    font-size: 17px;
  }

  .nav-menu {
    display: none !important;
  }

  .header-search {
    grid-column: 1 / -1;
    width: 100%;
    min-width: 0;
  }

  .auth-bar {
    grid-column: 1 / -1;
    justify-content: flex-start;
    min-width: 0;
  }

  .shell {
    width: 100%;
    max-width: 100vw;
    padding: 24px 12px;
  }

  .home-view,
  .workspace,
  .panel,
  .hero,
  .recent-tools,
  .category-cards,
  .tool-directory {
    max-width: 100%;
    min-width: 0;
  }

  .recent-tools {
    margin: 0;
  }

  .hero {
    min-height: 430px;
    padding: 36px 10px 28px;
  }

  .hero-orbit {
    width: 100%;
    max-width: 100%;
    height: 300px;
    transform: scale(0.96);
    transform-origin: center;
  }

  .orbit-ring {
    inset: 54px 36px;
  }

  .ring-two {
    inset: 82px 22px;
  }

  .ring-three {
    inset: 34px 86px;
  }

  .orbit-chip {
    min-width: 74px;
    min-height: 42px;
    padding: 0 14px;
    border-radius: 999px;
    font-size: 16px;
  }

  .orbit-core {
    width: 88px;
    height: 88px;
    font-size: 38px;
  }

  .chip-schedule {
    left: 5%;
    top: 20%;
  }

  .chip-logistics {
    left: 28%;
    top: 16%;
  }

  .chip-translate {
    right: 8%;
    top: 20%;
  }

  .chip-pdf {
    left: 44%;
    top: 7%;
  }

  .chip-image {
    left: 4%;
    bottom: 42%;
  }

  .chip-video {
    right: 4%;
    bottom: 42%;
  }

  .chip-currency {
    left: 24%;
    bottom: 16%;
  }

  .chip-length {
    right: 19%;
    bottom: 18%;
  }

  .chip-download {
    left: 43%;
    bottom: 6%;
  }

  .chip-ai {
    right: 8%;
    bottom: 23%;
  }

  .hero-search {
    width: calc(100% - 28px);
    min-height: 58px;
  }

  .category-cards {
    grid-template-columns: 1fr;
  }

  .account-menu-wrap {
    position: static;
  }

  .account-menu {
    position: fixed !important;
    top: 230px;
    left: 20px;
    right: auto;
    z-index: 320;
    min-width: 190px;
    border-color: rgba(217, 222, 231, 0.82);
    background: #ffffff;
    color: #1f2933;
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.24);
  }

  .account-menu button {
    color: #1f2933;
  }
}

/* 2026 dashboard refresh */
.site-header {
  border-bottom-color: rgba(148, 163, 184, 0.18);
  background: rgba(248, 250, 252, 0.78);
  box-shadow: 0 10px 40px rgba(15, 23, 42, 0.06);
}

.top-nav {
  gap: 6px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  padding: 6px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.top-nav button {
  min-height: 38px;
  border-radius: 999px;
  padding: 0 14px;
  font-size: 15px;
}

.nav-menu {
  min-width: 220px;
  border-color: rgba(148, 163, 184, 0.22);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.92);
  padding: 10px;
  backdrop-filter: blur(18px);
}

.nav-menu button {
  min-height: 38px;
  border-radius: 12px;
}

.hero {
  min-height: auto;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 28px;
  background:
    radial-gradient(circle at 18% 22%, rgba(29, 155, 232, 0.22), transparent 26rem),
    radial-gradient(circle at 82% 20%, rgba(216, 23, 88, 0.16), transparent 24rem),
    linear-gradient(135deg, rgba(15, 23, 42, 0.96), rgba(25, 39, 67, 0.94));
  padding: 26px;
  box-shadow: 0 30px 90px rgba(15, 23, 42, 0.18);
}

.hero::before,
.hero::after,
.command-orbit .orbit-ring,
.command-orbit .orbit-core,
.command-orbit .orbit-chip {
  display: none;
}

.command-orbit {
  display: grid;
  width: 100%;
  height: auto;
  margin: 0 0 18px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.command-tile {
  display: grid;
  min-height: 118px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.08);
  color: #f8fafc;
  cursor: pointer;
  padding: 18px;
  text-align: left;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
  transition: transform 160ms ease, background 160ms ease, border-color 160ms ease;
}

.command-tile:hover {
  border-color: rgba(125, 211, 252, 0.42);
  background: rgba(255, 255, 255, 0.14);
  transform: translateY(-3px);
}

.command-tile span {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.14);
  color: #bfdbfe;
  font-weight: 900;
}

.command-tile strong {
  align-self: end;
  font-size: 22px;
}

.command-tile small {
  color: rgba(226, 232, 240, 0.78);
  font-size: 13px;
}

.tile-logistics {
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.28), rgba(34, 197, 94, 0.18));
}

.tile-ai {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.28), rgba(216, 23, 88, 0.2));
}

.hero-search {
  width: min(720px, 100%);
  min-height: 58px;
  margin: 0 auto;
  background: rgba(255, 255, 255, 0.92);
}

.category-cards {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.category-card,
.card-featured {
  grid-column: auto !important;
  min-height: 176px;
  border-radius: 22px;
}

.category-card strong {
  font-size: 24px;
}

.card-schedule {
  background: linear-gradient(135deg, #334155, #0ea5e9);
}

.tool-directory {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.ai-mode-tabs {
  display: inline-flex;
  width: fit-content;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #f8fbff;
  padding: 4px;
}

.ai-mode-tabs button {
  min-height: 36px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  padding: 0 16px;
  font-weight: 800;
}

.ai-mode-tabs button.active {
  background: #1a73e8;
  color: #ffffff;
}

.ai-reference-field input {
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #ffffff;
  padding: 10px;
}

@media (max-width: 900px) {
  .command-orbit,
  .category-cards,
  .tool-directory {
    grid-template-columns: 1fr;
  }

  .hero {
    padding: 18px;
  }

  .command-tile {
    min-height: 108px;
  }
}

/* Cyclemon-inspired home pass */
.recent-tools {
  display: none !important;
}

.hero {
  position: relative;
  overflow: hidden;
  border: 2px solid rgba(31, 41, 51, 0.08);
  border-radius: 34px;
  background:
    radial-gradient(circle at 10% 18%, rgba(255, 190, 92, 0.28) 0 5rem, transparent 5.2rem),
    radial-gradient(circle at 88% 72%, rgba(29, 155, 232, 0.18) 0 7rem, transparent 7.2rem),
    linear-gradient(135deg, #fffaf2, #f0fbff 48%, #fff4fb);
  padding: 34px 36px 28px;
  box-shadow: 0 24px 70px rgba(31, 41, 51, 0.08);
}

.common-tools-title {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 22px;
}

.common-tools-title strong {
  color: #1f2933;
  font-size: 28px;
  font-weight: 900;
  letter-spacing: 0;
}

.common-tools-title span {
  display: none;
}

.home-view .command-tile small,
.home-view .category-card small {
  display: none !important;
}

.hero::before,
.hero::after {
  position: absolute;
  display: block;
  pointer-events: none;
  content: "";
}

.hero::before {
  left: 8%;
  right: 8%;
  top: 52%;
  height: 2px;
  border-radius: 999px;
  background: repeating-linear-gradient(90deg, rgba(31, 41, 51, 0.12) 0 18px, transparent 18px 32px);
  transform: rotate(-2deg);
}

.hero::after {
  right: 5%;
  top: 16%;
  width: 104px;
  height: 104px;
  border: 10px solid rgba(255, 106, 20, 0.2);
  border-radius: 50%;
  background: radial-gradient(circle, transparent 0 28px, rgba(255,255,255,0.48) 29px);
}

.command-orbit {
  position: relative;
  z-index: 1;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 26px;
}

.command-tile {
  min-height: 154px;
  border: 2px solid rgba(31, 41, 51, 0.08);
  border-radius: 28px;
  background: #ffffff;
  color: #1f2933;
  padding: 20px;
  box-shadow: 0 16px 0 rgba(31, 41, 51, 0.04), 0 26px 54px rgba(31, 41, 51, 0.08);
  transform: rotate(var(--tilt, 0deg));
}

.command-tile::after {
  position: absolute;
  right: 18px;
  bottom: 14px;
  width: 54px;
  height: 54px;
  border: 7px solid rgba(31, 41, 51, 0.08);
  border-radius: 50%;
  content: "";
}

.command-tile:hover {
  border-color: rgba(31, 41, 51, 0.16);
  background: #ffffff;
  transform: translateY(-8px) rotate(var(--tilt, 0deg));
}

.command-tile span {
  width: 44px;
  height: 44px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.62);
  color: #1f2933;
}

.command-tile strong {
  font-size: 22px;
}

.command-tile small {
  color: rgba(31, 41, 51, 0.68);
  font-weight: 700;
}

.tile-logistics {
  --tilt: -2deg;
  background: linear-gradient(135deg, #b8f7e0, #9fd7ff);
}

.tile-convert {
  --tilt: 1.5deg;
  background: linear-gradient(135deg, #ffe19a, #ffb7a2);
}

.tile-translate {
  --tilt: -1deg;
  background: linear-gradient(135deg, #d7c8ff, #ffd2e5);
}

.tile-ai {
  --tilt: 2deg;
  background: linear-gradient(135deg, #a7c8ff, #f0a5d8);
}

.tile-schedule {
  --tilt: -1.5deg;
  background: linear-gradient(135deg, #d6f6ff, #c8f4b6);
}

.tile-download {
  --tilt: 1deg;
  background: linear-gradient(135deg, #c8f3ff, #d9d0ff);
}

.hero-search {
  position: relative;
  z-index: 1;
  border: 2px solid rgba(31, 41, 51, 0.1);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 16px 36px rgba(31, 41, 51, 0.08);
}

.category-card,
.card-featured {
  border: 2px solid rgba(255, 255, 255, 0.42);
  border-radius: 26px;
  box-shadow: 0 18px 0 rgba(31, 41, 51, 0.035), 0 26px 58px rgba(31, 41, 51, 0.09);
}

.category-card:hover {
  transform: translateY(-8px) rotate(-0.6deg);
}

@media (max-width: 1280px) {
  .command-orbit {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .hero {
    padding: 22px 16px;
  }

  .common-tools-title {
    display: block;
    margin-bottom: 16px;
  }

  .common-tools-title strong {
    display: block;
    font-size: 24px;
  }

  .common-tools-title span {
    display: none;
  }

  .command-orbit {
    grid-template-columns: 1fr;
  }

  .command-tile {
    min-height: 126px;
    transform: none;
  }

  .command-tile:hover {
    transform: translateY(-5px);
  }
}

/* Light glass home cards */
.home-view .command-tile,
.home-view .category-card,
.home-view .card-featured {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.72);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.44), rgba(255, 255, 255, 0.16)),
    var(--glass-tint, linear-gradient(135deg, rgba(189, 224, 255, 0.88), rgba(255, 199, 238, 0.84)));
  color: #1f2933;
  -webkit-backdrop-filter: blur(24px) saturate(1.45);
  backdrop-filter: blur(24px) saturate(1.45);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.84),
    inset 0 -22px 42px rgba(255, 255, 255, 0.1),
    0 18px 44px rgba(72, 91, 122, 0.16);
}

.home-view .command-tile::before,
.home-view .category-card::before,
.home-view .card-featured::before {
  position: absolute;
  inset: 1px;
  border-radius: inherit;
  background:
    radial-gradient(circle at 18% 12%, rgba(255, 255, 255, 0.52), transparent 30%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.24), transparent 42%);
  content: "";
  pointer-events: none;
}

.home-view .command-tile::after,
.home-view .category-card::after {
  border-color: rgba(255, 255, 255, 0.46);
  background: rgba(255, 255, 255, 0.18);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.7),
    0 10px 28px rgba(68, 92, 130, 0.08);
}

.home-view .command-tile:hover,
.home-view .category-card:hover {
  border-color: rgba(255, 255, 255, 0.92);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.52), rgba(255, 255, 255, 0.22)),
    var(--glass-tint, linear-gradient(135deg, rgba(189, 224, 255, 0.92), rgba(255, 199, 238, 0.88)));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.9),
    0 24px 54px rgba(72, 91, 122, 0.16);
}

.home-view .command-tile span,
.home-view .category-card .card-icon,
.home-view .card-featured .card-icon,
.home-view .card-count {
  border: 1px solid rgba(255, 255, 255, 0.58);
  background: rgba(255, 255, 255, 0.38);
  color: #1f2933;
  -webkit-backdrop-filter: blur(18px) saturate(1.35);
  backdrop-filter: blur(18px) saturate(1.35);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.78),
    0 10px 24px rgba(72, 91, 122, 0.1);
}

.home-view .command-tile strong,
.home-view .category-card strong {
  position: relative;
  z-index: 1;
  color: #1f2933;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.46);
}

.home-view .tile-logistics,
.home-view .card-logistics {
  --glass-tint: linear-gradient(135deg, rgba(123, 241, 204, 0.86), rgba(116, 203, 255, 0.84));
}

.home-view .tile-convert,
.home-view .card-convert {
  --glass-tint: linear-gradient(135deg, rgba(255, 214, 116, 0.88), rgba(255, 159, 138, 0.82));
}

.home-view .tile-translate,
.home-view .card-translate {
  --glass-tint: linear-gradient(135deg, rgba(157, 199, 255, 0.86), rgba(229, 154, 255, 0.82));
}

.home-view .tile-ai,
.home-view .card-ai {
  --glass-tint: linear-gradient(135deg, rgba(146, 177, 255, 0.86), rgba(247, 139, 212, 0.82));
}

.home-view .tile-schedule,
.home-view .card-schedule {
  --glass-tint: linear-gradient(135deg, rgba(157, 244, 196, 0.86), rgba(142, 221, 255, 0.8));
}

.home-view .tile-tasks,
.home-view .card-tasks {
  --glass-tint: linear-gradient(135deg, rgba(157, 244, 196, 0.86), rgba(142, 221, 255, 0.8));
}

.home-view .tile-download,
.home-view .card-file {
  --glass-tint: linear-gradient(135deg, rgba(149, 219, 255, 0.86), rgba(189, 164, 255, 0.82));
}

/* Task list */
.tasks-panel {
  display: grid;
  grid-template-columns: minmax(220px, 280px) minmax(0, 1fr);
  min-height: 620px;
  overflow: hidden;
  border: 1px solid rgba(203, 213, 225, 0.9);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 24px 70px rgba(31, 41, 51, 0.08);
}

.tasks-panel[hidden] {
  display: none;
}

.tasks-nav {
  border-right: 1px solid rgba(203, 213, 225, 0.74);
  background: linear-gradient(180deg, rgba(248, 251, 255, 0.96), rgba(237, 246, 255, 0.82));
  padding: 18px;
}

.tasks-nav-head,
.tasks-list-head,
.tasks-main-head,
.task-compose-row,
.task-meta,
.task-actions,
.tasks-head-actions,
.tasks-reminder-guide,
.task-remind-control {
  display: flex;
  align-items: center;
}

.tasks-nav-head,
.tasks-main-head {
  justify-content: space-between;
  gap: 14px;
}

.tasks-nav-head strong {
  font-size: 22px;
}

.tasks-icon-button {
  width: 34px;
  height: 34px;
  border: 1px solid rgba(148, 163, 184, 0.42);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.78);
  color: #1f2933;
  cursor: pointer;
}

.tasks-filter {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  width: 100%;
  min-height: 42px;
  align-items: center;
  gap: 10px;
  border: 0;
  border-radius: 14px;
  background: transparent;
  color: #334155;
  cursor: pointer;
  margin-top: 8px;
  padding: 0 12px;
  text-align: left;
}

.tasks-filter span {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 8px;
  overflow: hidden;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tasks-filter i {
  width: 10px;
  height: 10px;
  flex: 0 0 auto;
  border-radius: 999px;
}

.tasks-filter em {
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.18);
  color: #64748b;
  font-style: normal;
  padding: 2px 8px;
}

.tasks-filter.active,
.tasks-filter:hover {
  background: rgba(47, 125, 246, 0.12);
  color: #1359c8;
}

.tasks-list-head {
  justify-content: space-between;
  margin: 22px 0 8px;
  color: #64748b;
  font-size: 13px;
  font-weight: 900;
}

.tasks-empty-mini {
  border: 1px dashed rgba(148, 163, 184, 0.42);
  border-radius: 14px;
  color: #94a3b8;
  padding: 12px;
}

.tasks-main {
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  gap: 16px;
  padding: 24px;
}

.tasks-main-head h3 {
  margin: 0 0 6px;
  font-size: 28px;
}

.tasks-main-head p {
  margin: 0;
  color: #64748b;
}

.tasks-head-actions {
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
}

.tasks-notice-state {
  border-radius: 999px;
  background: rgba(47, 125, 246, 0.1);
  color: #2563bb;
  font-size: 12px;
  font-weight: 800;
  padding: 7px 10px;
}

.tasks-reminder-guide {
  gap: 10px;
  border: 1px solid rgba(147, 197, 253, 0.62);
  border-radius: 14px;
  background: rgba(239, 246, 255, 0.78);
  color: #527090;
  font-size: 13px;
  line-height: 1.55;
  padding: 10px 12px;
}

.tasks-reminder-guide strong {
  color: #1d4f91;
  white-space: nowrap;
}

.task-compose {
  display: grid;
  gap: 10px;
  border: 1px solid rgba(203, 213, 225, 0.9);
  border-radius: 20px;
  background: rgba(248, 251, 255, 0.88);
  padding: 14px;
}

.task-compose input,
.task-compose select,
.task-compose textarea {
  min-height: 42px;
  border: 1px solid rgba(203, 213, 225, 0.9);
  border-radius: 12px;
  background: #ffffff;
  color: #1f2933;
  font: inherit;
  padding: 0 12px;
}

.task-compose textarea {
  min-height: 72px;
  padding: 10px 12px;
  resize: vertical;
}

.task-compose-row {
  flex-wrap: wrap;
  gap: 10px;
}

.task-remind-control {
  min-height: 42px;
  gap: 7px;
  border: 1px solid rgba(203, 213, 225, 0.9);
  border-radius: 12px;
  background: #ffffff;
  color: #475569;
  font-size: 14px;
  padding: 0 12px;
  white-space: nowrap;
}

.task-remind-control input {
  min-height: 0;
  margin: 0;
}

.tasks-items {
  display: grid;
  align-content: start;
  gap: 10px;
  overflow: auto;
  padding-right: 4px;
}

.task-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
  border: 1px solid rgba(203, 213, 225, 0.86);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.9);
  padding: 14px;
}

.task-row.priority-high {
  border-color: rgba(236, 72, 153, 0.38);
  background: linear-gradient(135deg, rgba(255, 241, 247, 0.94), rgba(255, 255, 255, 0.9));
}

.task-row.is-done {
  opacity: 0.62;
}

.task-row.is-done strong {
  text-decoration: line-through;
}

.task-check {
  width: 24px;
  height: 24px;
  border: 2px solid #2f7df6;
  border-radius: 50%;
  background: #ffffff;
  color: #2f7df6;
  cursor: pointer;
  font-weight: 900;
  line-height: 18px;
}

.task-content strong {
  display: block;
  margin-bottom: 6px;
  font-size: 17px;
}

.task-meta {
  flex-wrap: wrap;
  gap: 6px;
}

.task-meta span {
  border-radius: 999px;
  background: #eef6ff;
  color: #64748b;
  padding: 3px 8px;
  font-size: 12px;
}

.task-content p {
  margin: 8px 0 0;
  color: #64748b;
}

.task-actions {
  gap: 8px;
}

.tasks-empty {
  border: 1px dashed rgba(148, 163, 184, 0.48);
  border-radius: 18px;
  color: #64748b;
  padding: 28px;
  text-align: center;
}

@media (max-width: 860px) {
  .tasks-panel {
    grid-template-columns: 1fr;
  }

  .tasks-nav {
    border-right: 0;
    border-bottom: 1px solid rgba(203, 213, 225, 0.74);
  }

  .task-row {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .task-actions {
    grid-column: 2;
  }

  .tasks-main-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .tasks-head-actions {
    justify-content: flex-start;
  }

  .tasks-reminder-guide {
    align-items: flex-start;
    flex-direction: column;
  }
}

/* Task list interaction layout */
.tasks-nav-head > div {
  display: flex;
  align-items: center;
  gap: 8px;
}

.tasks-add-button {
  min-height: 34px;
  border: 0;
  border-radius: 12px;
  background: linear-gradient(135deg, #1976ee, #4c78f4);
  box-shadow: 0 8px 16px rgba(37, 99, 235, 0.2);
  color: #fff;
  cursor: pointer;
  font: inherit;
  font-size: 13px;
  font-weight: 800;
  padding: 0 12px;
}

.tasks-add-button:hover,
.tasks-save-button:hover {
  filter: brightness(1.05);
  transform: translateY(-1px);
}

.tasks-main {
  grid-template-rows: auto auto minmax(0, 1fr);
}

.task-detail {
  min-height: 128px;
  border: 1px solid rgba(191, 219, 254, 0.84);
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(248, 252, 255, 0.92), rgba(238, 247, 255, 0.82));
  padding: 16px;
}

.task-detail-head,
.task-detail-actions,
.tasks-list-title,
.task-dashboard-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.tasks-nav-footer {
  display: grid;
  gap: 8px;
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid rgba(203, 213, 225, 0.72);
}

.tasks-nav-footer .ghost-button {
  width: 100%;
  min-height: 38px;
}

.tasks-nav-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 6px;
}

.tasks-quick-button {
  min-width: 42px;
  height: 34px;
  padding: 0 9px;
  border: 1px solid rgba(79, 110, 166, 0.2);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.68);
  color: #426184;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 160ms ease, background 160ms ease, border-color 160ms ease;
}

.tasks-quick-button:hover {
  transform: translateY(-1px);
  background: rgba(234, 244, 255, 0.92);
  border-color: rgba(47, 125, 246, 0.42);
}

.tasks-actions-menu {
  position: relative;
}

.tasks-actions-menu .tasks-icon-button {
  font-size: 18px;
  line-height: 1;
}

.tasks-actions-dropdown {
  position: absolute;
  z-index: 20;
  top: calc(100% + 8px);
  right: 0;
  display: grid;
  min-width: 142px;
  gap: 4px;
  padding: 6px;
  border: 1px solid rgba(191, 219, 254, 0.92);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 14px 32px rgba(45, 77, 126, 0.16);
  backdrop-filter: blur(14px);
}

.tasks-actions-dropdown button {
  min-height: 35px;
  padding: 0 10px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #385474;
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
  text-align: left;
}

.tasks-actions-dropdown button:hover {
  background: #edf6ff;
  color: #246dcc;
}

@media (max-width: 560px) {
  .tasks-nav-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .tasks-nav-actions {
    width: 100%;
    justify-content: flex-start;
  }

  .tasks-add-button {
    flex: 1 1 auto;
  }
}

/* Independent plan.torric.me surface. The underlying auth components remain shared. */
body.plan-page .top-nav > :not([data-tasks-nav]),
body.plan-page .header-search,
body.plan-page .home-view,
body.plan-page .sidebar,
body.plan-page .panel > :not(#tasksPanel) {
  display: none !important;
}

body.plan-page .brand {
  cursor: default;
  pointer-events: none;
}

body.plan-page .brand > span:last-child::before {
  content: "Plan";
  font-size: 0;
}

body.plan-page .brand > span:last-child {
  font-size: 0;
}

body.plan-page .brand > span:last-child::after {
  content: "Plan";
  color: #1e293b;
  font-size: 30px;
  font-weight: 800;
}

body.plan-page #toolWorkspace {
  display: block !important;
  max-width: 1440px;
  margin: 0 auto;
  padding: 28px 20px 48px;
}

body.plan-page .panel {
  width: 100%;
  max-width: none;
}

body.plan-page #tasksPanel {
  display: grid !important;
  margin: 0;
}

body.plan-page .top-nav {
  flex: 1;
  justify-content: center;
}

body.plan-page .top-nav [data-tasks-nav] .nav-menu {
  display: none;
}

@media (max-width: 760px) {
  body.plan-page .site-header {
    grid-template-columns: 1fr auto;
  }

  body.plan-page .top-nav {
    display: none;
  }

  body.plan-page #toolWorkspace {
    padding: 14px 12px 32px;
  }
}

.task-dashboard-head {
  margin-bottom: 16px;
}

.task-dashboard-head h4 {
  margin: 3px 0 0;
  color: #1e293b;
  font-size: 20px;
}

.task-dashboard-rate {
  border-radius: 999px;
  background: #e8f1ff;
  color: #2563bb;
  font-size: 12px;
  font-weight: 900;
  padding: 7px 10px;
}

.task-dashboard-stats {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}

.task-dashboard-stats div {
  display: grid;
  gap: 7px;
  min-height: 82px;
  border: 1px solid rgba(191, 219, 254, 0.82);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.76);
  padding: 12px;
}

.task-dashboard-stats span {
  color: #64748b;
  font-size: 12px;
}

.task-dashboard-stats strong {
  color: #1e3a5f;
  font-size: 25px;
  line-height: 1;
}

.task-dashboard-stats .is-alert strong {
  color: #e05858;
}

.task-dashboard-progress {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 15px;
}

.task-dashboard-progress span {
  display: block;
  flex: 1;
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: #e2ecf8;
}

.task-dashboard-progress i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #3286f7, #35c8a5);
}

.task-dashboard-progress small {
  color: #64748b;
  font-size: 12px;
  white-space: nowrap;
}

.task-detail-head h4 {
  margin: 3px 0 0;
  color: #1e293b;
  font-size: 20px;
}

.task-detail-kicker {
  color: #64748b;
  font-size: 12px;
  font-weight: 800;
}

.task-status {
  border-radius: 999px;
  background: #e8f1ff;
  color: #2563bb;
  font-size: 12px;
  font-weight: 900;
  padding: 6px 10px;
}

.task-status.done {
  background: #dcfce7;
  color: #167a43;
}

.task-detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 13px;
}

.task-detail-meta span {
  border: 1px solid rgba(191, 219, 254, 0.9);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  color: #536b87;
  font-size: 12px;
  padding: 5px 9px;
}

.task-detail-notes {
  margin: 14px 0;
  color: #475569;
  line-height: 1.6;
  white-space: pre-wrap;
}

.task-detail-actions {
  justify-content: flex-end;
  margin-top: 14px;
}

.tasks-list-section {
  min-height: 0;
}

.tasks-list-title {
  margin: 3px 0 10px;
}

.tasks-list-title strong {
  color: #334155;
  font-size: 14px;
}

.tasks-list-title span {
  color: #94a3b8;
  font-size: 13px;
}

.task-row {
  cursor: pointer;
}

.task-row:hover,
.task-row.is-selected {
  border-color: rgba(59, 130, 246, 0.64);
  box-shadow: 0 8px 20px rgba(59, 130, 246, 0.08);
}

.task-row-wrap {
  display: grid;
  gap: 8px;
}

.task-row-wrap.is-expanded .task-row {
  border-color: rgba(59, 130, 246, 0.64);
  border-bottom-left-radius: 10px;
  border-bottom-right-radius: 10px;
}

.task-row-wrap.is-expanded .task-row-arrow {
  transform: rotate(90deg);
}

.task-row-detail {
  margin: 0 8px;
  padding: 16px;
  border: 1px solid rgba(191, 219, 254, 0.88);
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(245, 250, 255, 0.95), rgba(238, 247, 255, 0.8));
  animation: taskDetailReveal 180ms ease-out;
}

@keyframes taskDetailReveal {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}

.task-row-arrow {
  color: #8da4be;
  font-size: 27px;
  line-height: 22px;
  transition: transform 180ms ease;
}

.task-modal[hidden] {
  display: none;
}

.task-modal {
  position: fixed;
  z-index: 10001;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
}

.task-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.38);
  backdrop-filter: blur(7px);
}

.task-modal-card {
  position: relative;
  z-index: 1;
  display: grid;
  width: min(620px, 100%);
  max-height: calc(100vh - 48px);
  gap: 13px;
  overflow: auto;
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 30px 80px rgba(15, 23, 42, 0.28);
  padding: 22px;
}

.task-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.task-modal-head h3 {
  margin: 0;
  color: #1e293b;
  font-size: 22px;
}

.task-modal-card label {
  display: grid;
  gap: 7px;
  color: #64748b;
  font-size: 13px;
  font-weight: 800;
}

.task-modal-card input,
.task-modal-card select,
.task-modal-card textarea {
  min-height: 44px;
  border: 1px solid #d5e0ef;
  border-radius: 12px;
  background: #fff;
  color: #1e293b;
  font: inherit;
  font-weight: 500;
  padding: 0 12px;
}

.task-modal-card textarea {
  min-height: 90px;
  padding: 11px 12px;
  resize: vertical;
}

.task-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.task-modal-card .task-remind-control {
  display: flex;
  align-items: center;
  width: fit-content;
  color: #475569;
  font-weight: 700;
}

.task-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 4px;
}

.task-notification-toast {
  position: fixed;
  z-index: 10020;
  right: 24px;
  bottom: 24px;
  max-width: min(380px, calc(100vw - 32px));
  border: 1px solid rgba(147, 197, 253, 0.7);
  border-radius: 14px;
  background: rgba(239, 246, 255, 0.96);
  box-shadow: 0 16px 38px rgba(30, 64, 175, 0.18);
  color: #1e4e8c;
  opacity: 0;
  padding: 12px 14px;
  pointer-events: none;
  transform: translateY(16px);
  transition: opacity 0.2s, transform 0.2s;
}

.task-notification-toast.show {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 860px) {
  .tasks-nav-head {
    align-items: center;
  }

  .tasks-main-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .tasks-head-actions {
    justify-content: flex-start;
  }
}

@media (max-width: 560px) {
  .task-dashboard-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .task-form-grid {
    grid-template-columns: 1fr;
  }

  .task-modal {
    align-items: end;
    padding: 0;
  }

  .task-modal-card {
    max-height: 92vh;
    border-radius: 22px 22px 0 0;
  }
}
