/* Global reset-ish */
*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #1f2933;
  background: #f5f7fa;
}

a {
  color: inherit;
  text-decoration: none;
}

.page {
  min-height: 100vh;
}

/* ---------- TOP BAR ---------- */

.top-bar {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 32px;
  background: #ffffff;
  border-bottom: 1px solid #e5e7eb;
}

.logo-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo-icon {
  width: 40px;
  height: 40px;
  border-radius: 999px;
  background: #008060;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 20px;
}

.logo-text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.logo-text span:first-child {
  font-weight: 600;
  font-size: 18px;
  color: #111827;
}
.logo-text span:last-child {
  font-size: 12px;
  color: #6b7280;
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
}

.top-lang,
.top-currency {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid #d1d5db;
  cursor: pointer;
  background: #ffffff;
  transition: all 0.15s ease-in-out;
}

.top-lang:hover,
.top-currency:hover {
  border-color: #008060;
  color: #008060;
}

.top-divider {
  width: 1px;
  height: 18px;
  background: #e5e7eb;
}

.top-signin {
  padding: 7px 18px;
  border-radius: 999px;
  background: #008060;
  color: #ffffff;
  font-weight: 500;
  font-size: 13px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.top-signin:hover {
  background: #006c4f;
}

/* ---------- HERO ---------- */

.hero {
  padding: 32px 32px 18px;
  background: #ffffff;
}

.hero-title {
  margin: 0 0 8px;
  font-size: 32px;
  font-weight: 700;
  color: #111827;
}

.hero-sub {
  margin: 0 0 18px;
  font-size: 15px;
  color: #6b7280;
}

.hero-sub span {
  font-weight: 600;
  color: #008060;
}

/* Search bar */

.search-bar {
  display: flex;
  gap: 10px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.search-input {
  flex: 1 1 260px;
}

.search-input input {
  width: 100%;
  padding: 11px 12px;
  border-radius: 999px;
  border: 1px solid #d1d5db;
  font-size: 14px;
  outline: none;
}

.search-input input:focus {
  border-color: #008060;
  box-shadow: 0 0 0 2px rgba(0,128,96,0.08);
}

.search-select select {
  padding: 11px 12px;
  border-radius: 999px;
  border: 1px solid #d1d5db;
  font-size: 13px;
  background: #ffffff;
  outline: none;
}

.search-btn button {
  padding: 11px 22px;
  border-radius: 999px;
  border: none;
  background: #008060;
  color: #ffffff;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
}

.search-btn button:hover {
  background: #006c4f;
}

/* Quick filters */

.quick-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.quick-filters span {
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid #e5e7eb;
  font-size: 12px;
  color: #4b5563;
  cursor: pointer;
  background: #ffffff;
}

.quick-filters span:hover {
  border-color: #008060;
  color: #008060;
}

/* Hero metrics */

.hero-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  font-size: 12px;
  color: #6b7280;
  margin-bottom: 12px;
}

.hero-metrics span {
  display: block;
  font-size: 18px;
  font-weight: 600;
  color: #008060;
  margin-bottom: 2px;
}

/* Tabs */

.tabs {
  display: inline-flex;
  gap: 8px;
  margin-top: 4px;
}

.tab {
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 12px;
  cursor: pointer;
  border: 1px solid transparent;
  color: #4b5563;
  background: #f3f4f6;
}

.tab.active {
  background: #008060;
  color: #ffffff;
}

/* ---------- LAYOUT ---------- */

.layout {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 20px;
  padding: 0 32px 32px;
}

/* Sidebar */

.sidebar {
  align-self: flex-start;
  background: #ffffff;
  border-radius: 20px;
  padding: 16px 16px 18px;
  box-shadow: 0 8px 18px rgba(15,23,42,0.06);
  font-size: 13px;
}

.sidebar-title {
  font-weight: 600;
  font-size: 15px;
  margin-bottom: 10px;
}

.sidebar-block {
  margin-bottom: 14px;
}

.sidebar-label {
  font-weight: 600;
  font-size: 12px;
  margin-bottom: 4px;
  color: #6b7280;
}

.sidebar ul {
  list-style: none;
  padding-left: 0;
  margin: 0;
}

.sidebar li {
  margin: 3px 0;
  cursor: default;
}

.sidebar li[onclick] {
  cursor: pointer;
  color: #008060;
}

.sidebar li[onclick]:hover {
  text-decoration: underline;
}

.info-tag {
  margin-top: 4px;
  font-size: 10px;
  color: #9ca3af;
}

/* Main content */

.content-section {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.section-header {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin: 12px 0 6px;
}

.section-title {
  font-weight: 600;
  font-size: 18px;
  color: #111827;
}

.section-sub {
  margin: 0;
  font-size: 12px;
  color: #6b7280;
}

.card-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* Cards */

.card {
  display: flex;
  gap: 12px;
  padding: 10px 12px;
  background: #ffffff;
  border-radius: 16px;
  box-shadow: 0 8px 18px rgba(15,23,42,0.06);
  align-items: stretch;
}

.card-thumb {
  width: 120px;
  height: 80px;
  border-radius: 12px;
  overflow: hidden;
  background: #f3f4f6;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  color: #9ca3af;
}

.card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.card > div:nth-child(2) {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.card-label {
  font-size: 10px;
  text-transform: uppercase;
  color: #9ca3af;
}

.card-main-title {
  font-size: 15px;
  font-weight: 600;
  color: #111827;
}

.card-meta {
  font-size: 11px;
  color: #6b7280;
}

.card-desc {
  font-size: 12px;
  color: #4b5563;
}

.card-actions {
  margin-top: 4px;
  display: flex;
  gap: 6px;
}

.btn-outline {
  padding: 5px 10px;
  border-radius: 999px;
  border: 1px solid #d1d5db;
  font-size: 11px;
  cursor: pointer;
  color: #111827;
  background: #ffffff;
}

.btn-outline:hover {
  border-color: #008060;
  color: #008060;
}

/* ---------- FOOTER ---------- */

.footer {
  padding: 14px 32px 24px;
  font-size: 11px;
  color: #9ca3af;
  text-align: left;
}

/* ---------- POPUPS (currency + language) ---------- */

.aa-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.55);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.aa-overlay.active {
  display: flex;
}

.aa-modal {
  background: #ffffff;
  border-radius: 16px;
  max-width: 720px;
  width: 90%;
  max-height: 80vh;
  padding: 24px 24px 16px;
  box-shadow: 0 18px 40px rgba(0,0,0,0.25);
  overflow-y: auto;
}

.aa-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.aa-modal-header h2 {
  margin: 0;
  font-size: 20px;
  font-weight: 600;
}

.aa-close {
  cursor: pointer;
  font-size: 22px;
  line-height: 1;
}

.aa-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 8px;
}

.aa-item {
  border-radius: 10px;
  border: 1px solid #e0e0e0;
  padding: 8px 10px;
  cursor: pointer;
  transition: 0.15s;
  font-size: 13px;
  background: #ffffff;
}

.aa-item span {
  display: block;
}

.aa-item small {
  font-size: 11px;
  color: #666;
}

.aa-item:hover {
  border-color: #008060;
  background: #f5fffb;
}

.aa-item.active {
  border-color: #008060;
  background: #e6fff6;
  font-weight: 600;
  color: #005844;
}

.aa-note {
  margin-top: 8px;
  font-size: 11px;
  color: #777;
  text-align: right;
}

/* ---------- RESPONSIVE ---------- */

@media (max-width: 900px) {
  .top-bar {
    padding: 10px 16px;
  }
  .hero {
    padding: 20px 16px 14px;
  }
  .layout {
    grid-template-columns: 1fr;
    padding: 0 16px 20px;
  }
  .sidebar {
    order: 2;
  }
  .content-section {
    order: 1;
  }
}
