:root {
  --icon-color: #000;
  --heading-color: #000;
  --sidebar-bg: #060606;
  --sidebar-font: #fff;
  --button-bg: #060606;
  --font-color: #000;
  --border-color: #00230c;
}

html,
body {
  height: 100%;
  min-height: 100%;
  margin: 0;
  padding: 0;
  color: var(--font-color);
  font-family: 'Space Grotesk', sans-serif;
  background: #e5eaf3;
}

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

h3 {
  text-decoration: underline;
}

.container {
  display: grid;
  grid-template-columns: 250px 1fr;
  min-height: 100vh;
  width: 100vw;
  box-sizing: border-box;
}

.sidebar {
  background: var(--sidebar-bg);
  color: var(--sidebar-font);
  display: flex;
  flex-direction: column;
  min-width: 220px;
  height: 100vh;
  min-height: 100vh;
  position: relative;
  z-index: 10;
}

.sidebar-header {
  display: flex;
  align-items: center;
  font-size: 1.5rem;
  font-weight: bold;
  margin-bottom: 32px;
  padding: 32px 0 0 32px;
  height: 80px;
}

.logo {
  font-size: 2rem;
  margin-right: 12px;
}

.dashboard-title {
  font-size: 1.3rem;
  color: #fff;
}

.sidebar nav {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: calc(100vh - 80px);
}

.sidebar nav ul {
  list-style: none;
  padding: 0;
  margin: 0 0 32px 0;
}

.sidebar nav ul li {
  padding: 12px 32px;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  cursor: pointer;
  border-radius: 8px 0 0 8px;
  transition: background 0.2s;
  color: var(--sidebar-font);
}

.sidebar nav ul li:hover {
  background: #011f35;
}

.icon,
.sidebar svg,
.sidebar .svg-icon {
  margin-right: 16px;
  font-size: 1.2rem;
  color: #fff !important;
  fill: #fff !important;
}

.sidebar-bottom {
  margin-top: 32px;
}

.sidebar-toggle {
  display: none;
}

main {
  display: flex;
  flex-direction: column;
  min-width: 0;
  background: transparent;
  flex: 1;
}

.main-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #fff;
  padding: 18px 32px;
  border-bottom: 2px solid var(--border-color);
  gap: 32px;
  color: var(--font-color);
}

.search-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  max-width: 600px;
}

.search-icon,
.svg-icon {
  font-size: 1.3rem;
  color: var(--icon-color);
  margin-right: 8px;
  display: flex;
  align-items: center;
  width: 20px;
  height: 20px;
  fill: var(--icon-color);
  transition: color 0.2s, fill 0.2s;
}

.search {
  width: 100%;
  padding: 10px 16px;
  border-radius: 20px;
  border: none;
  background: #e5eaf3;
  font-size: 1rem;
  flex: 1;
  max-width: 600px;
  color: var(--font-color);
}

.header-right {
  display: flex;
  align-items: center;
  gap: 18px;
  color: var(--font-color);
}

.avatar,
.avatar-large {
  border-radius: 50%;
  border: 2px solid var(--border-color);
  background: #014919;
}

.avatar {
  width: 40px;
  height: 40px;
}
.avatar-large {
  width: 70px;
  height: 70px;
}

.user-name {
  font-weight: bold;
  color: var(--font-color);
}

.user-greeting {
  display: flex;
  align-items: center;
  background: #fff;
  padding: 24px 32px;
  border-bottom: 2px solid var(--border-color);
  gap: 24px;
  color: var(--font-color);
}

.hello {
  font-size: 1rem;
  color: var(--font-color);
}

.user-handle {
  color: var(--heading-color);
  font-size: 1.3rem;
  margin-top: 4px;
}

.header-buttons {
  margin-left: auto;
  display: flex;
  gap: 18px;
}

.header-buttons button {
  background: var(--button-bg);
  color: #fff;
  border: none;
  border-radius: 20px;
  padding: 10px 28px;
  font-size: 1rem;
  cursor: pointer;
  font-weight: 500;
  transition: background 0.2s;
  border: 2px solid var(--border-color);
}

.header-buttons button:hover {
  background: #011f35;
}

.dashboard-content {
  display: grid;
  grid-template-columns: 2.5fr 1fr;
  gap: 32px;
  padding: 32px;
  min-height: 0;
  box-sizing: border-box;
  background: transparent;
  margin: 0;
  border-radius: 0;
  box-shadow: none;
  flex: 1 1 auto;
  color: var(--font-color);
  align-items: stretch;
}

.projects {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.projects h2 {
  margin-bottom: 18px;
  font-size: 1.2rem;
}

.project-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  flex: 1 1 auto;
  height: 100%;
}

.project-card {
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  display: flex;
  min-height: 100px;
  position: relative;
  overflow: hidden;
  font-size: 0.95rem;
  margin: 0;
  color: var(--font-color);
  border: 2px solid var(--border-color);
}

.card-border {
  width: 6px;
  background: #334138;
  border-radius: 10px 0 0 10px;
}

.card-content {
  padding: 10px 10px 12px 10px;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.card-content h3 {
  margin: 0 0 4px 0;
  font-size: 1rem;
}

.card-content p {
  margin: 0 0 8px 0;
  color: var(--font-color);
  font-size: 0.93rem;
}

.card-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
  margin-bottom: 0;
  min-height: 24px;
  font-size: 0.93rem;
}

.card-actions span {
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border-radius: 50%;
  padding: 0;
  transition: background 0.2s;
  cursor: pointer;
  min-width: 24px;
  min-height: 24px;
}

.card-actions span:hover {
  background: #011f35;
}

.rightbar {
  display: flex;
  flex-direction: column;
  gap: 75px;
  color: var(--font-color);
  height: 100%;
  justify-content: flex-start;
  align-self: stretch;
  margin-top: 40px;
}

.announcements,
.trending {
  position: relative;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  padding: 28px 10px 12px 10px;
  display: flex;
  flex-direction: column;
  border: 2px solid var(--border-color);
  margin-bottom: 0;
}

.announcements {
  font-size: 0.88rem;
  gap: 18px;
  color: var(--font-color);
}

.trending {
  font-size: 0.95rem;
  gap: 18px;
  color: var(--font-color);
}

.announcements h3,
.trending h3 {
  position: absolute;
  top: 0;
  left: 16px;
  background: #e5eaf3;
  padding: 0 8px;
  font-size: 1rem;
  text-decoration: underline;
  margin: 0;
  transform: translateY(-100%);
  color: var(--heading-color);
  z-index: 1;
  border-radius: 6px 6px 0 0;
}

.announcement {
  border-bottom: 1px solid #e5eaf3;
  padding-bottom: 4px;
}

.announcement:last-child {
  border-bottom: none;
}

.announcement strong {
  display: block;
  font-size: 0.98rem;
  margin-bottom: 1px;
  color: var(--heading-color);
}

.announcement p {
  margin: 0;
  color: var(--font-color);
  font-size: 0.75rem;
}

.trending ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.trending li {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.95rem;
}

.trend-avatar {
  font-size: 1.2rem;
  background: #e5eaf3;
  border-radius: 50%;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.trend-avatar > img {
  border-radius: 50%;
  width: 28px;
  height: 28px;
}

.trend-desc {
  color: #888;
  margin-left: 4px;
  font-size: 0.93rem;
}

footer,
.footer {
  width: 100%;
  text-align: center;
  padding: 12px 0 8px 0;
  color: #333;
  font-size: 0.88rem;
  margin-bottom: 10px;
  border-radius: 0 0 10px 10px;
  align-self: stretch;
  font-family: 'Space Grotesk', sans-serif;
  grid-column: 1 / -1;
}

/* Responsive Styles */

@media (max-width: 1200px) {
  .container {
    grid-template-columns: 1fr;
    grid-template-rows: auto 1fr auto;
  }
  .dashboard-content {
    grid-template-columns: 1fr;
    gap: 24px;
    padding: 24px;
    margin: 24px;
  }
  .rightbar {
    flex-direction: row;
    gap: 24px;
    margin-top: 16px;
    height: auto;
    justify-content: flex-start;
    align-items: stretch;
  }
  .announcements,
  .trending {
    flex: 1 1 50%;
    min-width: 0;
    margin-bottom: 0;
    height: auto;
  }
  .project-grid {
    grid-template-columns: 1fr;
  }
  footer,
  .footer {
    margin-top: 0;
  }

  .sidebar {
    width: 100%;
    min-width: 0;
    height: 60px;
    min-height: 60px;
    flex-direction: column;
    padding: 0;
    position: relative;
    z-index: 20;
    transition: height 0.3s;
    overflow: visible;
  }
  .sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 0 16px;
    height: 60px;
    margin-bottom: 0;
    gap: 12px;
  }
  .dashboard-title {
    margin-right: auto;
    color: #fff;
  }
  .sidebar-toggle {
    display: flex;
    margin-left: -20px;
    margin-right: 20px;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    color: var(--sidebar-font);
    font-size: 2rem;
    padding: 16px;
    cursor: pointer;
  }
  .sidebar nav {
    display: none;
    position: absolute;
    top: 60px;
    left: 0;
    width: 100vw;
    background: var(--sidebar-bg);
    flex-direction: column;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
    height: auto;
    z-index: 100;
  }
  .sidebar.open {
    height: 100vh;
    min-height: 100vh;
  }
  .sidebar.open nav {
    display: flex;
  }
  .sidebar nav ul,
  .sidebar nav .sidebar-bottom {
    flex-direction: row;
    gap: 8px;
    margin: 0;
    padding: 0 8px;
  }
  .sidebar nav ul li,
  .sidebar nav .sidebar-bottom li {
    padding: 10px 8px;
    font-size: 1rem;
    border-radius: 8px;
    justify-content: center;
  }
  main {
    width: 100%;
  }
  .main-header {
    flex-direction: row;
    align-items: center;
    gap: 12px;
    padding: 10px 6px;
    flex-wrap: nowrap;
  }
  .search-wrap {
    max-width: 350px;
    flex: 1 1 60%;
  }
  .search {
    font-size: 0.95rem;
    padding: 8px 10px;
  }

  .header-right {
    gap: 6px;
    font-size: 0.93rem;
    margin-left: 0;
    margin-right: 4px;
    transform: translateX(-10px);
  }
  .avatar-large {
    width: 48px;
    height: 48px;
  }
  .user-name {
    font-size: 1rem;
  }
  .dashboard-content {
    padding: 4px;
    gap: 8px;
    margin: 0;
  }
  .rightbar {
    flex-direction: row;
    gap: 8px;
    margin-top: 16px;
    height: auto;
    justify-content: flex-start;
    align-items: stretch;
  }
  .announcements,
  .trending {
    flex: 1 1 50%;
    min-width: 0;
    margin-bottom: 0;
    height: auto;
    padding: 28px 8px 8px 8px;
  }
  .user-greeting {
    flex-direction: row;
    align-items: center;
    gap: 12px;
    padding: 12px 10px;
  }

  footer,
  .footer {
    margin-top: 0;
    padding: 12px 0 8px 0;
    font-size: 0.88rem;
    border-radius: 0 0 10px 10px;
    grid-column: 1 / -1;
  }
}

@media (max-width: 900px) {
  .header-buttons {
    margin-left: 0;
    width: 100%;
    justify-content: flex-start;
  }
  .dashboard-content {
    padding: 12px;
    gap: 16px;
    margin: 12px;
  }
  .rightbar {
    gap: 16px;
  }
}

@media (max-width: 500px) {
  .main-header,
  .user-greeting {
    padding: 8px;
  }
  .search {
    width: 100%;
    min-width: 0;
  }
  .dashboard-content {
    padding: 2px;
    margin: 0;
  }
  .project-card {
    min-height: 120px;
    border-left: none;
    border-right: none;
  }
  .announcements {
    padding: 10px 4px 8px 4px;
  }
  .avatar-large {
    width: 48px;
    height: 48px;
  }

  .header-buttons {
    gap: 6px;
    width: auto;
    flex-wrap: nowrap;
    margin-right: 10px;
  }
  .header-buttons button {
    padding: 6px 10px;
    font-size: 0.92rem;
    min-width: 0;
  }
  .rightbar {
    flex-direction: row;
    gap: 4px;
    border: none;
    border-radius: 0;
    overflow: visible;
    background: transparent;
    margin-top: 8px;
  }
  .announcements,
  .trending {
    flex: 1 1 50%;
    border: 2px solid var(--border-color);
    border-radius: 10px;
    margin-bottom: 0;
    padding: 10px 4px 8px 4px;
    box-shadow: none;
    background: #fff;
  }
  .announcements {
    margin-right: 2px;
  }
  .trending {
    margin-right: 15px;
    padding: 4px 0 4px 2px;
    font-size: 0.7rem;
  }

  .announcements h3,
  .trending h3 {
    left: 50%;
    transform: translate(-50%, -100%);
    text-align: center;
  }
  .trend-desc {
    font-size: 0.6rem;
  }
}
