:root {
  color-scheme: dark;

  --bg: #17191d;
  --surface: #1e2127;
  --surface-hover: #252932;

  --border: #30343d;
  --border-hover: #424854;

  --text: #e8e9ec;
  --text-soft: #b1b5bd;
  --text-muted: #7f858f;

  --accent: #9aa7d8;
  --accent-hover: #aab5df;
  --accent-soft: rgba(154, 167, 216, 0.12);

  --max-width: 1380px;
}

[data-theme="light"] {
  color-scheme: light;

  --bg: #f3f1ed;
  --surface: #faf9f6;
  --surface-hover: #f0eee9;

  --border: #ddd9d1;
  --border-hover: #c9c4ba;

  --text: #292b2f;
  --text-soft: #686c73;
  --text-muted: #92959a;

  --accent: #66739e;
  --accent-hover: #59658d;
  --accent-soft: rgba(102, 115, 158, 0.1);
}

/* =================================
   Reset
   ================================= */

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;

  background: var(--bg);
  color: var(--text);

  font-family:
    Inter,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;

  font-size: 14px;
  line-height: 1.5;

  transition:
    background 0.2s ease,
    color 0.2s ease;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
textarea,
select {
  font: inherit;
}

/* =================================
   Container
   ================================= */

.dashboard-container {
  width: min(calc(100% - 48px), var(--max-width));

  margin: 0 auto;
}

/* =================================
   Header
   ================================= */

.dashboard-header {
  position: sticky;
  top: 0;
  z-index: 100;

  background: rgba(23, 25, 29, 0.92);

  border-bottom: 1px solid var(--border);

  backdrop-filter: blur(14px);
}

[data-theme="light"] .dashboard-header {
  background: rgba(243, 241, 237, 0.92);
}

.header-inner {
  min-height: 54px;

  display: flex;
  align-items: center;

  gap: 34px;
}

.logo {
  color: var(--text);

  font-size: 18px;
  font-weight: 800;

  letter-spacing: -0.05em;
}

.dashboard-nav {
  display: flex;
  align-items: center;

  gap: 24px;

  flex: 1;
}

.dashboard-nav a {
  color: var(--text-soft);

  font-size: 12px;
  font-weight: 500;

  transition: color 0.15s ease;
}

.dashboard-nav a:hover {
  color: var(--text);
}

/* =================================
   Theme Toggle
   ================================= */

.theme-toggle {
  width: 32px;
  height: 32px;

  display: grid;
  place-items: center;

  padding: 0;

  background: var(--surface);

  border: 1px solid var(--border);
  border-radius: 8px;

  color: var(--text-soft);

  cursor: pointer;

  transition:
    background 0.15s ease,
    border-color 0.15s ease,
    color 0.15s ease;
}

.theme-toggle:hover {
  background: var(--surface-hover);
  border-color: var(--border-hover);
  color: var(--text);
}

/* =================================
   Dashboard
   ================================= */

.dashboard {
  padding: 24px 0 40px;
}

/* =================================
   Top Area
   ================================= */

.dashboard-top {
  display: flex;
  align-items: center;
  justify-content: space-between;

  gap: 30px;

  margin-bottom: 22px;
}

.dashboard-top h1 {
  margin: 0 0 2px;

  font-size: 23px;
  line-height: 1.2;

  letter-spacing: -0.035em;
}

.dashboard-top p {
  margin: 0;

  color: var(--text-soft);

  font-size: 12px;
}

/* =================================
   Search
   ================================= */

.dashboard-search {
  width: 400px;
  height: 36px;

  display: flex;
  align-items: center;

  gap: 8px;

  padding: 0 10px;

  background: var(--surface);

  border: 1px solid var(--border);
  border-radius: 8px;

  transition:
    border-color 0.15s ease,
    background 0.15s ease;
}

.dashboard-search:focus-within {
  border-color: var(--accent);
}

.dashboard-search > span {
  color: var(--text-muted);

  font-size: 17px;
}

.dashboard-search input {
  flex: 1;

  min-width: 0;

  border: 0;
  outline: 0;

  background: transparent;

  color: var(--text);

  font-size: 12px;
}

.dashboard-search input::placeholder {
  color: var(--text-muted);
}

.dashboard-search kbd {
  padding: 2px 5px;

  background: var(--surface-hover);

  border: 1px solid var(--border);
  border-radius: 4px;

  color: var(--text-muted);

  font-size: 9px;
}

/* =================================
   Sections
   ================================= */

.dashboard-section {
  margin-bottom: 22px;
}

.section-heading {
  display: flex;
  align-items: center;

  gap: 8px;

  margin-bottom: 8px;
}

.section-heading h2 {
  margin: 0;

  font-size: 13px;
  line-height: 1.3;

  font-weight: 650;
}

.section-heading span {
  color: var(--text-muted);

  font-size: 10px;
}

/* =================================
   Available Tool
   ================================= */

.tool-grid {
  display: grid;

  grid-template-columns: repeat(4, minmax(0, 1fr));

  gap: 8px;
}

.dashboard-tool {
    min-height: 0;

    display: flex;
    align-items: center;
    gap: 11px;

    padding: 9px 11px;

    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;

    transition:
        background 0.15s ease,
        border-color 0.15s ease,
        transform 0.15s ease,
        box-shadow 0.15s ease;
}

.dashboard-tool:hover {
  background: var(--surface-hover);

  border-color: var(--border-hover);

  transform: translateY(-1px);
}

.tool-icon {
  width: 34px;
  height: 34px;

  flex: 0 0 34px;

  display: grid;
  place-items: center;

  background: var(--accent-soft);

  border-radius: 8px;

  color: var(--accent);

  font-size: 12px;
  font-weight: 800;
}

.dashboard-tool h3 {
  margin: 0 0 1px;

  font-size: 12px;
  font-weight: 650;
}

.dashboard-tool p {
  margin: 0;

  color: var(--text-soft);

  font-size: 10px;
}

/* =================================
   Compact Tools
   ================================= */

.compact-grid {
  display: grid;

  grid-template-columns: repeat(4, minmax(0, 1fr));

  gap: 7px;
}

.compact-tool {
  min-height: 58px;

  display: flex;
  flex-direction: column;

  justify-content: center;

  gap: 1px;

  padding: 9px 11px;

  background: var(--surface);

  border: 1px solid var(--border);
  border-radius: 7px;

  transition:
    background 0.15s ease,
    border-color 0.15s ease;
}

.compact-tool:hover {
  background: var(--surface-hover);

  border-color: var(--border-hover);
}

.compact-tool strong {
  font-size: 11px;
  font-weight: 650;
}

.compact-tool span {
  color: var(--text-soft);

  font-size: 10px;
}

/* =================================
   Coming Soon Page
   ================================= */

.coming-soon-page {
  min-height: 55vh;

  display: flex;
  flex-direction: column;

  align-items: center;
  justify-content: center;

  text-align: center;
}

.coming-soon-icon {
  width: 52px;
  height: 52px;

  display: grid;
  place-items: center;

  margin-bottom: 16px;

  background: var(--accent-soft);

  border-radius: 13px;

  color: var(--accent);

  font-size: 21px;
}

.coming-soon-page h1 {
  margin: 0 0 5px;

  font-size: 24px;

  letter-spacing: -0.03em;
}

.coming-soon-page p {
  margin: 0 0 18px;

  color: var(--text-soft);

  font-size: 12px;
}

.coming-soon-button {
  display: inline-flex;
  align-items: center;

  padding: 7px 13px;

  background: var(--accent);

  border-radius: 7px;

  color: #ffffff;

  font-size: 11px;
  font-weight: 600;

  transition:
    background 0.15s ease,
    transform 0.15s ease;
}

.coming-soon-button:hover {
  background: var(--accent-hover);

  transform: translateY(-1px);
}

/* =================================
   No Results
   ================================= */

.no-results {
  padding: 30px 0;

  color: var(--text-muted);

  text-align: center;

  font-size: 12px;
}

/* =================================
   Footer
   ================================= */

.dashboard-footer {
  border-top: 1px solid var(--border);

  padding: 15px 0;

  color: var(--text-muted);

  font-size: 10px;
}

.dashboard-footer .dashboard-container {
  display: flex;
  justify-content: space-between;
}

/* =================================
   Tablet
   ================================= */

@media (max-width: 1000px) {
  .tool-grid,
  .compact-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* =================================
   Mobile
   ================================= */

@media (max-width: 750px) {
  .dashboard-container {
    width: min(calc(100% - 28px), var(--max-width));
  }

  .dashboard-nav {
    display: none;
  }

  .dashboard-top {
    display: block;
  }

  .dashboard-search {
    width: 100%;
    margin-top: 13px;
  }

  .tool-grid,
  .compact-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* =================================
   Small Mobile
   ================================= */

@media (max-width: 480px) {
  .dashboard-container {
    width: calc(100% - 20px);
  }

  .dashboard {
    padding-top: 18px;
  }

  .tool-grid,
  .compact-grid {
    grid-template-columns: 1fr;
  }

  .dashboard-footer .dashboard-container {
    flex-direction: column;

    gap: 3px;
  }
}

/* =================================
   Homepage SEO HTML compatibility
   ================================= */

.tool-section {
  margin-bottom: 22px;
}

.tool-card {
  min-height: 72px;
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 11px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;

  box-shadow:
    0 1px 2px rgba(0, 0, 0, 0.12),
    0 4px 12px rgba(0, 0, 0, 0.08);

  transition:
    background 0.15s ease,
    border-color 0.15s ease,
    transform 0.15s ease,
    box-shadow 0.15s ease;
}

.tool-card:hover {
  background: var(--surface-hover);
  border-color: var(--border-hover);
  transform: translateY(-1px);

  box-shadow:
    0 2px 4px rgba(0, 0, 0, 0.14),
    0 7px 18px rgba(0, 0, 0, 0.11);
}

.tool-card-content {
  min-width: 0;
}

.tool-card h3 {
  margin: 0 0 1px;
  font-size: 12px;
  font-weight: 650;
}

.tool-card p {
  margin: 0;
  color: var(--text-soft);
  font-size: 10px;
}

.tool-card-icon {
  width: 34px;
  height: 34px;
  flex: 0 0 34px;

  display: grid;
  place-items: center;

  background: var(--accent-soft);
  border-radius: 8px;

  color: var(--accent);
  font-size: 12px;
  font-weight: 800;
}

/* Homepage tool cards */
.tool-card {
    min-height: 72px;
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 11px;

    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;

    box-shadow:
        0 1px 2px rgba(0, 0, 0, 0.12),
        0 4px 12px rgba(0, 0, 0, 0.08);

    transition:
        background 0.15s ease,
        border-color 0.15s ease,
        transform 0.15s ease,
        box-shadow 0.15s ease;
}

.tool-card:hover {
    background: var(--surface-hover);
    border-color: var(--border-hover);
    transform: translateY(-1px);

    box-shadow:
        0 2px 4px rgba(0, 0, 0, 0.14),
        0 7px 18px rgba(0, 0, 0, 0.11);
}

.tool-card:active {
    transform: translateY(0);
    box-shadow:
        0 1px 2px rgba(0, 0, 0, 0.12);
}

[hidden] {
  display: none !important;
}