@import 'reset.css';
@import 'variables.css';
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700;800&display=swap');

* {
  appearance: none;
  box-sizing: border-box;
  text-decoration: none;
}

body {
  height: 100vh;
  width: 100vw;
  font-family: 'Poppins', sans-serif;
  font-size: 0.88rem;
  background-color: var(--color-background);
  color: var(--color-dark);
  overflow-x: hidden;
  user-select: none;
}

a {
  color: var(--color-dark);
}

img {
  display: block;
  width: 100%;
}

h1 {
  font-size: 1.8rem;
  font-weight: 800;
}

h2 {
  font-size: 1.4rem;
  font-weight: 600;
}

h3 {
  font-size: 0.87rem;
  font-weight: 500;
}

h4 {
  font-size: 0.8rem;
  font-weight: 400;
}

h5 {
  font-size: 0.77rem;
  font-weight: 300;
}

small {
  font-size: 0.75rem;
}

.profile-photo {
  border-radius: 50%;
  height: 2.8rem;
  width: 2.8rem;
  overflow: hidden;
}

.text-muted {
  color: var(--color-info-dark);
}

p {
  color: var(--color-dark-variant);
}

b {
  color: var(--color-dark);
  font-weight: 700;
}

.primary {
  color: var(--color-primary);
}

.danger {
  color: var(--color-danger);
}

.success {
  color: var(--color-success);
}

.warning {
  color: var(--color-warning);
}

.container {
  display: grid;
  margin: 0 auto;
  width: 96%;
  gap: 1.8rem;
  grid-template-columns: 14rem auto 23rem;
}

/* ========== SIDEBAR ========== */
aside {
  height: 100vh;
}

aside .top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 1.4rem;
}

aside .logo {
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

aside .logo img {
  height: 2rem;
  width: 2rem;
}

aside .close {
  display: none;
}

aside .sidebar {
  display: flex;
  flex-direction: column;
  height: 86vh;
  position: relative;
  top: 3rem;
}

aside h3 {
  font-weight: 500;
}

aside .sidebar a {
  display: flex;
  align-items: center;
  color: var(--color-info-dark);
  gap: 1rem;
  height: 3.7rem;
  margin-left: 2rem;
  position: relative;
  transition: all 300ms ease;
}

aside .sidebar a span {
  font-size: 1.6rem;
  transition: all 300ms ease;
}

aside .sidebar a:last-child {
  position: absolute;
  bottom: 2rem;
  width: 100%;
}

aside .sidebar a.active {
  background-color: var(--color-light);
  color: var(--color-primary);
  margin-left: 0;
}

aside .sidebar a.active::before {
  content: '';
  background-color: var(--color-primary);
  height: 100%;
  width: 0.375rem;
}

aside .sidebar a.active span {
  color: var(--color-primary);
  margin-left: calc(1rem - 0.188rem);
}

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

aside .sidebar a:hover span {
  margin-left: 1rem;
}

aside .sidebar .message-count {
  background-color: var(--color-danger);
  border-radius: var(--border-radius-1);
  color: var(--color-white);
  font-size: 0.688rem;
  padding: 0.125rem 0.5rem;
}

/* ========== MAIN SECTION ========== */
main {
  margin-top: 1.4rem;
}

main .date {
  display: inline-block;
  background-color: var(--color-light);
  border-radius: var(--border-radius-1);
  margin-top: 1rem;
  padding: 0.5rem 1.6rem;
}

main .date input[type='date'] {
  background-color: transparent;
  border: none;
  color: var(--color-dark);
  font-weight: bold;
  outline: none;
  text-transform: uppercase;
}

main .insights {
  display: grid;
  gap: 1.6rem;
  grid-template-columns: repeat(3, 1fr);
}

main .insights > div {
  background-color: var(--color-white);
  border-radius: var(--card-border-radius);
  margin-top: 1rem;
  padding: var(--card-padding);
  box-shadow: var(--box-shadow);
  transition: all 300ms ease;
}

main .insights > div:hover {
  box-shadow: none;
}

main .insights > div span {
  background-color: var(--color-primary);
  padding: 0.5rem;
  border-radius: 50%;
  color: var(--color-white);
  font-size: 2rem;
}

main .insights > div.expenses span {
  background-color: var(--color-danger);
}

main .insights > div.income span {
  background-color: var(--color-success);
}

main .insights > div .middle {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

main .insights h3 {
  font-size: 1rem;
  margin: 1rem 0 0.6rem;
}

main .insights .progress {
  position: relative;
  border-radius: 50%;
  height: 5.75rem;
  width: 5.75rem;
}

main .insights svg {
  height: 7rem;
  width: 7rem;
}

main .insights svg circle {
  fill: none;
  stroke: var(--color-primary);
  stroke-width: 14;
  stroke-linecap: round;
  transform: translate(6px, 6px);
}

main .insights .sales svg circle {
  stroke-dashoffset: -30;
  stroke-dasharray: 200;
}

main .insights .expenses svg circle {
  stroke-dashoffset: 20;
  stroke-dasharray: 80;
}

main .insights .income svg circle {
  stroke-dashoffset: 35;
  stroke-dasharray: 110;
}

main .insights .progress .number {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

main .insights small {
  display: block;
  margin-top: 1.3rem;
}

/* ========== RECENT ORDERS ========== */
main .recent-orders {
  margin-top: 2rem;
}

main .recent-orders h2 {
  margin-bottom: 0.8rem;
}

main .recent-orders table {
  background-color: var(--color-white);
  border-radius: var(--card-border-radius);
  text-align: center;
  width: 100%;
  box-shadow: var(--box-shadow);
  transition: all 300ms ease;
}

main .recent-orders table:hover {
  box-shadow: none;
}

main table thead th {
  font-weight: 600;
  padding: var(--padding-1);
}

main table tbody td {
  border-bottom: 1px solid var(--color-light);
  color: var(--color-dark-variant);
  padding: 1rem;
}

main table tbody tr:last-child td {
  border: none;
  padding-bottom: 1.4rem;
}

main .recent-orders a {
  color: var(--color-primary);
  display: block;
  margin: 1rem auto;
  text-align: center;
}

/* ========== RIGHT SECTION ========== */
.right {
  margin-top: 1.4rem;
}

.right .top {
  display: flex;
  justify-content: end;
  gap: 2rem;
}

.right .top button {
  display: none;
}

.right .theme-toggler {
  background-color: var(--color-light);
  border-radius: var(--border-radius-1);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 1.6rem;
  width: 4.2rem;
}

.right .theme-toggler span {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  height: 100%;
  width: 50%;
}

.right .theme-toggler span.active {
  background-color: var(--color-primary);
  border-radius: var(--border-radius-1);
  color: white;
}

.right .top .profile {
  display: flex;
  gap: 2rem;
  text-align: right;
}

/* ========== RECENT UPDATES ========== */
.right .recent-updates {
  margin-top: 1rem;
}

.right .recent-updates h2 {
  margin-bottom: 0.8rem;
}

.right .recent-updates .updates {
  background-color: var(--color-white);
  border-radius: var(--card-border-radius);
  padding: var(--card-padding);
  box-shadow: var(--box-shadow);
  transition: all 300ms ease;
}

.right .recent-updates .updates:hover {
  box-shadow: none;
}

.right .recent-updates .updates .update {
  display: grid;
  gap: 1rem;
  grid-template-columns: 2.8rem auto;
  margin-bottom: 1rem;
}

/* ========== SALES ANALYTICS ========== */
.right .sales-analytics {
  margin-top: 2rem;
}

.right .sales-analytics h2 {
  margin-bottom: 0.8rem;
}

.right .sales-analytics .item {
  background-color: var(--color-white);
  border-radius: var(--border-radius-3);
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 0.7rem;
  padding: 1.4rem var(--card-padding);
  box-shadow: var(--box-shadow);
  transition: all 300ms ease;
}

.right .sales-analytics .item:hover {
  box-shadow: none;
}

.right .sales-analytics .item .right {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin: 0;
  width: 100%;
}

.right .sales-analytics .item .icon {
  background-color: var(--color-primary);
  border-radius: 50%;
  color: var(--color-white);
  display: flex;
  padding: 0.6rem;
}

.right .sales-analytics .item.offline .icon {
  background-color: var(--color-danger);
}

.right .sales-analytics .item.customers .icon {
  background-color: var(--color-success);
}

.right .sales-analytics .add-product {
  background-color: transparent;
  border: 2px dashed var(--color-primary);
  color: var(--color-primary);
  cursor: pointer;
  justify-content: center;
}

.right .sales-analytics .add-product:hover {
  background-color: var(--color-primary);
  color: #fff;
}

.right .sales-analytics .add-product div {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.right .sales-analytics .add-product div h3 {
  font-weight: 600;
}
