a {
  color: inherit;
  text-decoration: none;
}

a:hover {
  color: var(--jaeda-black);
}

button,
input,
select,
textarea {
  font-family: inherit;
  font-size: 100%;
  color: inherit;
}


button {
  border: none;
  background: none;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

ul,
ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

:root {
  --jaeda-black: #111827;
  --jaeda-white: #ffffff;
  --jaeda-red: #ef4444;
  --jaeda-gray: #6b7280;
  --jaeda-muted: #94a3b8;
  --jaeda-bg: #f9fafb;
  --border-light: #e5e7eb;
  --radius-card: 16px;
  /* Typography scale */
  --font-size-xs: 0.75rem;
  --font-size-sm: 0.875rem;
  --font-size-base: 1rem;
  --font-size-md: 1rem;
  --font-size-lg: 1.125rem;
  --font-size-xl: 1.25rem;
  --font-size-2xl: 1.5rem;

  --color-gray-50: #f9fafb;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--jaeda-black);
  padding-top: 64px;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  margin: 0;
  font-weight: 600;
  color: var(--jaeda-black);
}

.header {
  position: fixed;
  top: 0;
  left: 280px;
  right: 0;
  height: 64px;
  padding: 0 24px;
  background-color: var(--jaeda-white);
  border-bottom: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  z-index: 70;
}

.header-left,
.header-center,
.header-right {
  display: flex;
  align-items: center;
}

.header-left {
  height: 100%;
  align-items: stretch;
}

.header-right {
  margin-left: auto;
  height: 100%;
  gap: 20px;
}

.header-center {
  flex: 1;
  justify-content: center;
}

.sidebar-toggle {
  display: none;
  cursor: pointer;
  height: 100%;
  padding: 0 12px;
  background: transparent;
}

.sidebar-toggle-bar {
  width: 16px;
  height: 2px;
  border-radius: 999px;
  background-color: var(--jaeda-black);
  position: relative;
}

.sidebar-toggle-bar::before,
.sidebar-toggle-bar::after {
  content: "";
  position: absolute;
  left: 0;
  width: 16px;
  height: 2px;
  border-radius: 999px;
  background-color: var(--jaeda-black);
}

.sidebar-toggle-bar::before {
  top: -5px;
}

.sidebar-toggle-bar::after {
  top: 5px;
}

.sidebar-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.4);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0.2s ease;
  z-index: 50;
}

.logo {
  font-family: "Roboto Condensed", system-ui, sans-serif;
  font-weight: 700;
  letter-spacing: 0.09em;
  font-size: 28px;
  color: var(--jaeda-black);
  text-transform: uppercase;
  text-decoration: none;
  display: inline-block;
}

.logo:link,
.logo:visited,
.logo:hover,
.logo:active {
  color: var(--jaeda-black);
  text-decoration: none;
}

.logo-header {
  font-size: 22px;
}

.logo .mark {
  position: relative;
  padding-bottom: 2px;
}

.logo .mark::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 40%;
  height: 2px;
  background-color: var(--jaeda-red);
}

.logo-sidebar {
  padding: 32px 0;
}

.auth-area {
  display: flex;
  align-items: center;
  gap: 15px;
  font-size: 13px;
}

.app-shell {
  display: flex;
  min-height: calc(100vh - 64px);
}

.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: 280px;
  background-color: var(--jaeda-white);
  border-right: 1px solid var(--border-light);
  z-index: 60;
}

.sidebar-inner {
  height: 100%;
  display: flex;
  flex-direction: column;
  padding: 0 20px;
}

.sidebar-title {
  font-size: 12px;
  color: var(--jaeda-muted);
  text-transform: uppercase;
  padding-bottom: 16px;
}

.tool-list {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 15px;
  overflow-y: auto;
  padding-right: 4px;
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.tool-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 14px;
  text-decoration: none;
  color: var(--jaeda-gray);
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
  width: 100%;
  background: transparent;
  border: none;
  cursor: pointer;
  text-align: left;
}

.tool-item:hover {
  background-color: #f3f4f6;
  color: var(--jaeda-black);
}

.tool-item.active {
  background-color: #fef2f2;
  color: var(--jaeda-black);
  font-weight: 600;
}

.tool-group {
  margin-bottom: 4px;
}

.tool-item-icon .icon-svg {
  width: 20px;
  height: 20px;
  display: block;
}

.tool-item-icon {
  width: 20px;
  height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  color: var(--jaeda-muted);
  font-style: normal;
}

.tool-item-label {
  flex: 1;
}

.tool-item:hover .tool-item-icon,
.tool-item.active .tool-item-icon {
  color: var(--jaeda-black);
}

.tool-sublist {
  margin-top: 8px;
  padding-left: 28px;
  line-height: 28px;
  display: none;
  flex-direction: column;
  gap: 4px;
}

.tool-group.is-open .tool-sublist {
  display: flex;
}

.tool-subitem {
  font-size: 13px;
  color: var(--jaeda-gray);
  text-decoration: none;
  padding: 4px 0 4px 13px;
  border-radius: 8px;
}

.tool-subitem:hover {
  color: var(--jaeda-black);
  background-color: #f9fafb;
}

.tool-toggle-icon {
  margin-left: auto;
  font-size: 16px;
  color: var(--jaeda-muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.tool-caret {
  width: 14px;
  height: 14px;
  display: block;
}

.tool-caret-up {
  display: none;
}

.tool-group.is-open .tool-caret-down {
  display: none;
}

.tool-group.is-open .tool-caret-up {
  display: block;
}

.tool-separator {
  height: 1px;
  margin: 8px 6px;
  background-color: #e5e7eb;
}

main {
  margin-left: 280px;
  flex: 1;
  display: flex;
  background-color: var(--jaeda-bg);
  flex-direction: column;
  gap: 24px;
}

.container {
  width: 100%;
  max-width: 1314px;
  margin: 24px auto 0;
  padding: 0 24px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.footer {
  margin-left: 280px;
  padding: 12px 24px 20px;
  font-size: 11px;
  color: var(--jaeda-muted);
  text-align: center;
  background-color: var(--jaeda-bg);
}

.lang-dropdown {
  position: relative;
}

.lang-trigger {
  display: inline-flex;
  align-items: center;
  color: var(--jaeda-black);
  font-size: 13px;
  gap: 4px;
  cursor: pointer;
  vertical-align: middle;
}

.lang-trigger-icon {
  width: 16px;
  height: 16px;
}

.lang-trigger-caret {
  font-size: 11px;
  margin-left: 2px;
  display: inline-flex;
  align-items: center;
}

.lang-caret {
  width: 12px;
  height: 12px;
  display: block;
}

.lang-caret-up {
  display: none;
}

.lang-dropdown.is-open .lang-caret-down {
  display: none;
}

.lang-dropdown.is-open .lang-caret-up {
  display: block;
}

.lang-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 20px);
  min-width: 180px;
  max-height: 360px;
  overflow-y: auto;
  background-color: #fff;
  border: 1px solid var(--border-light);
  border-radius: 8px;
  padding: 4px 0;
  display: none;
  z-index: 60;
}

.lang-dropdown.is-open .lang-menu {
  display: block;
}

.lang-option {
  width: 100%;
  padding: 6px 12px;
  text-align: left;
  border: none;
  background: #fff;
  color: inherit;
  font-size: 13px;
  cursor: pointer;
}

@media (max-width: 1024px) {
  body {
    padding-top: 56px;
  }

  .header {
    left: 0;
    height: 56px;
    padding: 0 12px;
  }

  .logo-sidebar {
    display: none;
  }

  .sidebar-toggle {
    display: inline-flex;
    align-items: center;
  }

  .auth-area,
  .lang-dropdown {
    display: none;
  }

  .app-shell {
    flex-direction: column;
  }

  .sidebar {
    top: 56px;
    bottom: auto;
    height: calc(100vh - 56px);
    transform: translateX(-100%);
    transition: transform 0.2s ease;
  }

  body.is-sidebar-open .sidebar {
    transform: translateX(0);
  }

  body.is-sidebar-open .sidebar-backdrop {
    opacity: 1;
    visibility: visible;
  }

  .sidebar-inner {
    flex-direction: column;
    padding: 16px 16px 20px;
  }

  .tool-list {
    flex-direction: column;
    gap: 4px;
    overflow-y: auto;
    -ms-overflow-style: none;
    scrollbar-width: none;
  }

  .tool-list::-webkit-scrollbar {
    display: none;
  }

  .tool-item {
    white-space: nowrap;
    border-left: 0;
    border-bottom: 3px solid transparent;
  }

  .tool-item.active {
    border-left-color: transparent;
    border-bottom-color: var(--jaeda-red);
    box-shadow: none;
  }

  main {
    margin-left: 0;
    padding: 16px;
  }

  .container {
    margin-top: 16px;
    padding: 0;
  }

  .footer {
    margin-left: 0;
    padding: 10px 16px 16px;
    background-color: var(--jaeda-bg);
  }
}

@media (max-width: 640px) {
  .header-right {
    gap: 12px;
  }

  .container {
    margin-top: 12px;
    padding: 0;
  }
}

@media (min-width: 1025px) {
  .logo-header {
    display: none;
  }

  .sidebar-toggle {
    display: none;
  }
}

@media (min-width: 1280px) {
  .container {
    padding: 0 60px;
  }
}
