/* 1. Use a more-intuitive box-sizing model */
*, *::before, *::after {
  box-sizing: border-box;
}
/* 2. Remove default margin */
*:not(dialog) {
  margin: 0;
}
/* 3. Enable keyword animations */
@media (prefers-reduced-motion: no-preference) {
  html {
    interpolate-size: allow-keywords;
  }
}
body {
  /* 4. Increase line-height */
  line-height: 1.5;
  /* 5. Improve text rendering */
  -webkit-font-smoothing: antialiased;
}
/* 6. Improve media defaults */
img, picture, video, canvas, svg {
  display: block;
  max-width: 100%;
}
/* 7. Inherit fonts for form controls */
input, button, textarea, select {
  font: inherit;
}
/* 8. Avoid text overflows */
p, h1, h2, h3, h4, h5, h6 {
  overflow-wrap: break-word;
}
/* 9. Improve line wrapping */
p {
  text-wrap: pretty;
}
h1, h2, h3, h4, h5, h6 {
  text-wrap: balance;
}

a {
    text-decoration: none;
}

ul {
    list-style-type: none;
}

.dashboard {
    display: grid;
    grid-template-columns: auto 1fr;
    grid-template-rows: auto 1fr;
    height: 100vh;
}

.side-bar {
    display: grid;
    grid-template-rows: 1fr 2fr 4fr;
    grid-row: 1 / 3;
    padding: 20px;
    background-color: #0f1b2d;
    color: #f7f4ef;
}

.logo-area {
    display: grid;
    grid-template-columns:  minmax(10px, 100px) minmax(10px, 100px);
    gap: 2px;
    justify-items: center;
    align-items: center;
}

.app-name {
    justify-self: start;
    font-family: 'DM Serif Display', serif;
    font-size: 1.5rem;
    justify-content: left;
}

.primary-nav > ul {
    display: grid;
    grid-template-rows: repeat(6, 1fr);
    justify-items: start;
    padding: 0;
    align-items: center;
    gap: 10px;
}

.primary-nav > ul > li > a.active {
    color: #B85C38;
}

.primary-nav > ul > li > a {
    display: grid;
    grid-template-columns:  minmax(10px, 15px) minmax(10px, 80px);
    color: #f7f4ef;
    justify-items: start;
    align-items: center;
    gap: 10px;
    font-family: 'DM Sans', sans-serif;
    font-size: 1rem;
}

.secondary-nav > ul {
    display: grid;
    grid-template-rows: repeat(3, 1fr);
    padding: 0;
}

.secondary-nav > ul > li > a {
    display: grid;
    grid-template-columns:  minmax(10px, 15px) minmax(10px, 80px);
    font-family: 'DM Sans', sans-serif;
    font-size: 1rem;
    gap: 10px;
    justify-items: start;
    align-items: center;
    color: #f7f4ef;
}

.top-bar {
    padding: 20px;
    gap: 10px;
    display: grid;
    grid-template-columns: minmax(20px, 2fr) minmax(10px, 1fr);
    grid-template-rows: 1fr 1fr;
    background-color: #e8e0d4;
    font-family: 'DM Sans', sans-serif;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    z-index: 1;
}

.search-bar {
    display: grid;
    grid-template-columns: 20px minmax(10px, 8fr);
    font-size: 1rem;
    color: #0f1b2d;
    align-items: center;
    gap: 15px;
}

.search-bar > i{
    justify-self: end;
}

input[type="search"] {
    border-radius: 20px;
    border: 0;
    background-color: #f7f4ef;
    height: 30px;
}

.nav-utilities {
    justify-self: end;
    display: grid;
    grid-template-columns: auto auto auto;
    align-items: center;
    gap: 15px;
}

.nav-utilities > a {
    font-size: 0.875rem;
    font-weight: 500;
    color: #0f1b2d;
}

.nav-utilities > a > img {
    width: clamp(20px, 5vw, 50px);
    height: clamp(20px, 5vw, 50px);
    object-fit: cover;
    border-radius: 50%;
}

.ti-bell-ringing {
    font-size: 1.25rem;
}

.user-greeting {
    display: grid;
    grid-template-columns: 1fr 4fr;
    grid-template-rows: 1fr 1fr;
    align-items: center;
}

.greeting {
    font-size: 0.875rem;
    color: #8a7e70;
}

.user-name {
    font-size: 1.125rem;
    font-weight: 500;
    color: #0F1B2D;
}

.user-greeting img {
    grid-row: 1 / 3;
    width: clamp(50px, 5vw, 70px);
    height: clamp(50px, 5vw, 70px);
    object-fit: cover;
    border-radius: 50%;
    justify-self: right;
    margin-right: 20px;
}

.actions {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.actions > button {
    font-size: 0.875rem;
    font-weight: 500;
    color: #F7F4EF;
    background-color: #B85C38;
    border: 0;
    border-radius: 20px;

}

.content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    grid-template-rows: 1fr 1fr;
    background-color: #f7f4ef;
    padding: 20px;
    gap: 20px;
}

.plant-grid {
    grid-row: 1 / 3;
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto repeat(3, 1fr);
    gap: 20px;
    font-family: 'DM Sans', sans-serif;
}

.plant-grid > h2 {
    grid-column: 1 / 3;
    font-size: 1.25rem;
    font-weight: 500;
    color: #0F1B2D;
}

.card {
    display: grid;
    grid-template-rows: repeat(4, auto);
    background-color: #e8e0d4;
    padding: 30px;
    gap: 15px;
    border-radius: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.card > h3 {
    font-size: 1rem;
    font-weight: 500;
    color: #0F1B2D;
    align-self: end;
}

.card > p {
    font-size: 0.75rem;
    color: #8a7e70;
}

.card > .status {
    font-size: 0.625rem;
    font-weight: 500;
    letter-spacing: 0.08em;
    background-color: #e8f5ee;
    color: #3B6D11;
    border-radius: 4px;
    padding: 2px 8px;
    width: fit-content;
    align-self: center;
}

.card.healthy { border-top: 3px solid #7A9E87; }
.card.water { border-top: 3px solid #B85C38; }
.card.attention { border-top: 3px solid #E24B4A; }
.card.new { border-top: 3px solid #0F1B2D; }

.blue {
    color: #378ADD;
}

.status.water,
.tag.water { 
    color: #B85C38; background-color: #FFF0EB; 
}

.water {
    color: #B85C38;
}

.status.urgent { 
    color: #A32D2D; background-color: #FCEBEB; 
}

.status.new { 
    color: #0F1B2D; background-color: #E8E0D4; 
}

.new {
    color: #8a7e70;
}


.status.attention,
.tag.attention{ 
    color: #A32D2D; 
    background-color: #FCEBEB; 
}

.attention {
    color: #A32D2D; 
}

.card-footer {
    align-self: end;
}

.card-footer > ul{
    display: grid;
    padding: 0;
    grid-template-columns: auto auto auto;
}

.card-footer li {
    font-size: 0.75rem;
    color: #5a5048;
    justify-self: end;
}

.ti-sun{
    color: #ef9f27;
}

.healthy {
    color: #7A9E87;
}

.care-alerts {
    display: grid;
    grid-template-rows: auto 4fr;
    gap: 20px;
    font-family: 'DM Sans', sans-serif;
}

.care-alerts > h2 {
    font-size: 1.25rem;
    font-weight: 500;
    color: #0F1B2D;
}

.alert-items {
    display: grid;
    grid-template-rows: auto auto auto;
    gap: 10px;
    background-color: #e8e0d4;
    padding: 30px;
    border-radius: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.alert-item {
    display: grid;
    grid-template-columns: 4fr 1fr;
    grid-template-rows: 1fr 1fr;
    gap: 10px;
    border-bottom: 0.5px solid #D0C8BC;
    padding-bottom: 10px;
}

.alert-item:last-child {
    border-bottom: none;
}

.alert-item > h3 {
    align-self: end;
    font-size: 0.875rem;
    font-weight: 500;
    color: #0F1B2D;
}

.alert-item > p {
    font-size: 0.75rem;
    color: #8a7e70;
}

.tag {
    grid-row: 1 / 3;
    grid-column: 2 / 3;
    align-self: center;
    font-size: 0.625rem;
    font-weight: 500;
    letter-spacing: 0.08em;
    color: #A32D2D;
    background-color: #FCEBEB;
    border-radius: 4px;
    padding: 2px 8px;
    width: fit-content;
}

.tag.repot{
    background-color: #e8f5ee;
    color: #3B6D11;
}

.community-section {
    display: grid;
    grid-template-rows: auto 1fr;
    font-family: 'DM Sans', sans-serif;
    gap: 20px;
}

.community-section > h2 {
    font-size: 1.25rem;
    font-weight: 500;
    color: #0F1B2D;
}

.community-items {
    display: grid;
    grid-template-rows: auto auto auto auto;
    background-color: #e8e0d4;
    padding: 30px;
    border-radius: 20px;
    gap: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.community-item {
    display: grid;
    grid-template-columns: 1fr 3fr;
    grid-template-rows: auto auto;
    align-items: center;
    gap: 15px;
}

.community-item > h3 {
    font-size: 0.875rem;
    font-weight: 500;
    color: #0F1B2D;
    align-self: end;
}

.community-item > p {
    font-size: 0.75rem;
    color: #8a7e70;
}

.community-item > img {
    grid-row: 1 / 3;
    width: 40px;
    min-width: 40px;
    height: 40px;
    object-fit: cover;
    border-radius: 50%;
    align-self: center;
    justify-self: right;
}

