/* Reset and Base Styles */
:root {
  --primary-color: #0156ce;
  --primary-hover: #014bb5;
  --primary-active: #01419b;
  --text-primary: #172b4d;
  --text-secondary: #6b7a90;
  --border-color: #dfe1e6;
  --bg-hover: #f4f5f7;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Roboto', sans-serif;
  background-color: #f1f2f4;
  color: var(--text-primary);
  font-size: 14px;
  line-height: 22px;
}

/* Main Container */
.main-container {
  background-color: #f1f2f4;
  border: none;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  position: relative;
  width: 100%;
  min-height: 100vh;
  height: auto;
  box-shadow: 0px 4px 4px 0px rgba(0, 0, 0, 0.15);
}

/* Main Content Area */
.main-content {
  width: 1200px;
  margin: 15px auto 0;
  max-width: 100%;
  align-self: center;
  flex: 1;
  position: relative;
  left: 120px;
}

/* Navigation Bar */
.navbar {
  height: 54px;
  position: relative;
  flex-shrink: 0;
  width: 100%;
  background: #ffffff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  z-index: 100;
  max-width: 1440px;
  align-self: center;
}

.navbar-content {
  position: absolute;
  background-color: #ffffff;
  display: flex;
  inset: 0;
  align-items: center;
  justify-content: space-between;
  padding-left: 24px;
  padding-right: 24px;
  padding-top: 0;
  padding-bottom: 0;
  min-height: 48px;
}

.navbar-left {
  background: transparent;
  display: flex;
  gap: 32px;
  align-items: center;
  position: relative;
  flex-shrink: 0;
}

.nav-links {
  display: flex;
  gap: 24px;
  align-items: center;
}

.navbar-right {
  display: flex;
  gap: 16px;
  align-items: center;
  position: relative;
  flex-shrink: 0;
}

.top-command-search {
  position: relative;
  width: 280px;
  max-width: 32vw;
}

.top-command-input {
  width: 100%;
  height: 32px;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  padding: 0 32px 0 12px;
  font-size: 13px;
  background-color: #f5f5f5;
  color: var(--text-primary);
  cursor: pointer;
  box-shadow: none;
  transition: all 0.2s ease;
}

.top-command-input:focus {
  outline: none;
  background: #ffffff;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 2px rgba(1, 86, 206, 0.1);
}

/* Logo */
.logo {
  display: grid;
  grid-template-columns: max-content;
  grid-template-rows: max-content;
  justify-items: start;
  line-height: 0;
  position: relative;
  flex-shrink: 0;
}

.logo-bg {
  grid-column: 1;
  margin-left: 0;
  margin-top: 0;
  border-radius: 10px;
  grid-row: 1;
  width: 0;
  height: 0;
  display: none;
}

.logo-image {
  grid-column: 1;
  margin-left: 0;
  margin-top: 0;
  position: relative;
  grid-row: 1;
  width: 90px;
  height: 25px;
}

.logo-image img {
  position: absolute;
  inset: 0;
  max-width: none;
  object-position: 50% 50%;
  object-fit: cover;
  pointer-events: none;
  width: 100%;
  height: 100%;
}

/* Navigation Links */
.nav-link {
  font-family: 'Roboto', sans-serif;
  font-weight: 400;
  line-height: 22px;
  position: relative;
  flex-shrink: 0;
  font-size: 14px;
  color: var(--text-primary);
  text-decoration: none;
  font-variation-settings: 'wdth' 100;
  white-space: nowrap;
  transition: color 0.2s ease;
}

.nav-link:hover {
  color: var(--primary-color);
}

.dropdown-icon {
  font-size: 16px;
  margin-left: 4px;
  color: var(--text-secondary);
  transition: transform 0.2s ease;
  display: inline-flex;
  align-items: center;
  vertical-align: middle;
}

.nav-link-dropdown {
  position: relative;
  display: flex;
  align-items: center;
}

.nav-link-dropdown.is-open .dropdown-icon {
  transform: rotate(180deg);
}

/* Unified dropdown menu styles */
.nav-dropdown-menu,
.user-dropdown-menu {
  position: absolute;
  top: 100%;
  margin-top: 8px;
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  min-width: 180px;
  padding: 8px 0;
  display: none;
  opacity: 0;
  transition: opacity 0.2s ease;
  z-index: 1000;
}

.nav-dropdown-menu {
  left: 0;
}

.user-dropdown-menu {
  right: 0;
}

.nav-dropdown-menu ul,
.user-dropdown-menu ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-dropdown-menu li,
.user-dropdown-menu li {
  margin: 0;
}

.nav-dropdown-item,
.user-dropdown-item {
  display: block;
  padding: 8px 16px;
  font-size: 14px;
  color: var(--text-primary);
  text-decoration: none;
  transition: color 0.2s ease;
  white-space: nowrap;
}

.nav-dropdown-item:hover,
.user-dropdown-item:hover {
  color: var(--primary-color);
  text-decoration: none;
}

.user-dropdown-item.active {
  color: var(--primary-color);
  font-weight: 500;
}

/* Grid layout for Information dropdown */
.nav-dropdown-grid {
  display: flex;
  min-width: 600px;
  padding: 16px 0;
}

.nav-dropdown-section {
  flex: 1;
  padding: 0 16px;
}

.nav-dropdown-section:first-child {
  border-right: 1px solid var(--border-color);
}

.nav-dropdown-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 8px;
  padding: 0 16px;
}

.nav-dropdown-section ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-dropdown-section .nav-dropdown-item {
  padding: 6px 16px;
  font-size: 13px;
  white-space: normal;
}

/* User Info */
.user-dropdown {
  position: relative;
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.user-info {
  display: flex;
  align-items: center;
  position: relative;
  flex-shrink: 0;
  font-size: 14px;
  color: var(--text-primary);
  gap: 8px;
  cursor: pointer;
  padding: 8px 12px;
  border-radius: 4px;
  transition: background-color 0.2s ease;
}

.user-info:hover {
  background-color: var(--bg-hover);
}

.user-dropdown.is-open .user-info {
  background-color: var(--bg-hover);
}

.user-email {
  font-family: 'Roboto', sans-serif;
  font-weight: 400;
  line-height: 22px;
  position: relative;
  flex-shrink: 0;
  font-size: 13px;
  color: var(--text-primary);
  font-variation-settings: 'wdth' 100;
}

.dropdown-arrow {
  position: relative;
  flex-shrink: 0;
  width: 12px;
  height: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.dropdown-arrow .material-symbols-rounded {
  font-size: 16px;
  color: var(--text-secondary);
  transition: transform 0.2s ease;
  display: inline-block;
}

.user-dropdown.is-open .dropdown-arrow .material-symbols-rounded,
.nav-link-dropdown.is-open .dropdown-icon {
  transform: rotate(180deg);
}

.submit-btn {
  background-color: var(--primary-color);
  color: #ffffff;
  border: none;
  border-radius: 4px;
  padding: 8px 20px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.2s ease;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.submit-btn:hover {
  background-color: var(--primary-hover);
  color: #ffffff;
  text-decoration: none;
}

.submit-btn:active {
  background-color: var(--primary-active);
}

/* Error Page Styles */
.error-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  min-height: calc(100vh - 100px);
  padding: 60px 20px 40px;
  text-align: center;
}

.error-image {
  width: 280px;
  height: auto;
  margin-bottom: 32px;
  opacity: 0.9;
}

.error-code {
  font-size: 60px;
  font-weight: 600;
  color: var(--primary-color);
  margin: 0 0 16px 0;
  line-height: 1;
}

.error-description {
  font-size: 24px;
  font-weight: 500;
  color: var(--text-primary);
  margin: 0 0 12px 0;
}

.error-message {
  font-size: 14px;
  color: var(--text-secondary);
  max-width: 500px;
  margin: 0 auto 32px;
  line-height: 1.6;
}

.error-actions {
  display: flex;
  gap: 24px;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
}

.error-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  padding: 12px 24px;
  font-size: 16px;
  font-weight: 400;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
  min-width: 140px;
  font-family: 'Roboto', sans-serif;
}

.error-btn-primary {
  background-color: var(--primary-color);
  color: #ffffff;
  border: none;
}

.error-btn-primary:hover {
  background-color: var(--primary-hover);
  color: #ffffff;
  text-decoration: none;
}

.error-btn-primary:active {
  background-color: var(--primary-active);
}

.error-btn-secondary {
  background-color: #ffffff;
  color: #333333;
  border: 1.5px solid #cccccc;
}

.error-btn-secondary:hover {
  background-color: #f8f8f8;
  /* border-color: #999999; */
  color: #333333;
  text-decoration: none;
}

.error-btn-secondary:active {
  background-color: #eeeeee;
}

.error-btn-tertiary {
  background-color: transparent;
  color: var(--text-secondary);
  border: none;
  padding: 0;
  min-width: auto;
  font-size: 14px;
}

.error-btn-tertiary:hover {
  background-color: transparent;
  color: var(--text-secondary);
  text-decoration: underline;
}

.error-btn-tertiary:active {
  background-color: transparent;
  color: var(--text-secondary);
}
