:root {
  --primary-color: #134282;
  --secondary-color: #256397;
  --gradient: linear-gradient(var(--secondary-color) 0%, var(--primary-color) 100%);
}

body {
  margin: 0;
  color: #333;
  font-family: "Segoe UI", Arial, sans-serif;
}

body.auth {
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  background: #e6ebf5;
}

body.app {
  background: #e6ebf5;
  padding-top: 95px;
}

a {
  color: #333;
  text-decoration: none;
}

a:hover {
  color: var(--primary-color);
}

.login-container {
  background: white;
  padding: 10px;
  border-radius: 20px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  width: 100%;
  max-width: 300px;
}

.login-header {
  text-align: center;
  margin-bottom: 0;
}

.logo-container {
  background: var(--gradient);
  padding: 16px 10px;
  border-radius: 12px;
  color: white;
  font-weight: 600;
  letter-spacing: 0.3px;
}

.login-header h2 {
  color: #333;
  font-size: 1.3rem;
  margin: 12px 0;
}

.auth-form {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 15px;
  padding-bottom: 8px;
}

.auth-form label {
  width: 90%;
  color: #5a5a5a;
  font-size: 13px;
  font-weight: 500;
}

.auth-form input {
  font-size: 16px;
  width: 100%;
  margin-top: 4px;
  padding: 8px;
  border: 1px solid #ddd;
  border-radius: 8px;
  box-sizing: border-box;
}

.auth-form input:focus {
  outline: none;
  border-color: #80bdff;
  box-shadow: 0 0 2px rgba(0, 123, 255, 0.5);
}

.button {
  padding: 10px 20px;
  font-size: 14px;
  border-radius: 20px;
  cursor: pointer;
  background: var(--gradient);
  color: #fff;
  border: none;
}

.button:hover {
  filter: brightness(90%);
}

.button-group {
  width: 90%;
  display: flex;
  justify-content: center;
}

.button-group .button {
  width: 100%;
}

.error-message,
.notice {
  margin: 0 12px 8px;
  text-align: center;
  font-size: 14px;
}

.error-message {
  color: #dc3545;
}

.notice {
  color: #2e7d32;
}

.auth-links {
  text-align: center;
  margin: 0 0 12px;
  font-size: 14px;
}

.topbar {
  position: fixed;
  top: 15px;
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 40px);
  height: 55px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  box-sizing: border-box;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.4);
  background: linear-gradient(
    135deg,
    color-mix(in srgb, var(--primary-color), transparent 15%),
    color-mix(in srgb, var(--secondary-color), transparent 15%)
  );
  box-shadow: 0 8px 32px rgba(31, 38, 135, 0.15);
  color: white;
  z-index: 1000;
}

.brand-link {
  color: white;
  font-weight: 600;
}

.brand-link:hover {
  color: white;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 14px;
}

.topbar .button {
  background: white;
  color: var(--primary-color);
  padding: 6px 14px;
}

.container {
  margin: 10px 50px 40px;
}

.projects-header {
  background: var(--gradient);
  padding: 20px 40px;
  border-radius: 20px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
  color: white;
  margin-bottom: 20px;
}

.projects-header h1 {
  color: white;
  font-size: 1.7em;
  margin: 0;
}

.projects-header p {
  margin: 6px 0 0;
  opacity: 0.9;
}

.tree-panel {
  background: white;
  border-radius: 12px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  max-height: calc(100vh - 220px);
  overflow: auto;
  padding: 8px 0 16px;
}

.tree-panel details > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  cursor: pointer;
  list-style: none;
  padding: 8px 16px;
}

.tree-panel details > summary::-webkit-details-marker {
  display: none;
}

.tree-panel details > summary::after {
  content: "▸";
  color: #8aa0b8;
  font-size: 12px;
}

.tree-panel details[open] > summary::after {
  content: "▾";
}

.tree-project {
  border-bottom: 1px solid #e6ebf5;
}

.tree-project > summary .tree-title {
  font-weight: 600;
  font-size: 16px;
}

.tree-visit {
  margin-left: 28px;
}

.tree-poi {
  margin-left: 28px;
}

.tree-visit > summary .tree-title,
.tree-poi > summary .tree-title {
  font-weight: 500;
  font-size: 14px;
  color: #333;
}

.tree-photo {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: 56px;
  padding: 4px 16px 8px;
  color: #444;
  font-size: 14px;
}

.tree-photo img {
  width: 72px;
  height: 54px;
  object-fit: cover;
  border-radius: 6px;
  background: #eef2f7;
}

.empty {
  text-align: center;
  color: #666;
  padding: 28px 10px;
}

.drive-message {
  background: white;
  border-radius: 12px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  padding: 28px;
  color: #666;
}

@media (max-width: 700px) {
  .container {
    margin: 10px 16px 32px;
  }

}
