@import 'variables';

.admin-layout {
  display: flex;
  min-height: 100vh;
  background-color: $bg-light;

  &__content {
    flex: 1;
    margin-left: $sidebar-width;
    transition: margin-left $transition-speed;
    display: flex;
    flex-direction: column;

    &--sidebar-open {
      margin-left: $sidebar-width;
    }
  }

  &__main {
    flex: 1;
    padding: 20px;
  }
}

// Sidebar
.sidebar {
  position: fixed;
  left: 0;
  top: 0;
  height: 100vh;
  width: $sidebar-width;
  background-color: $bg-sidebar;
  color: white;
  transition: width $transition-speed;
  z-index: 1000;
  overflow-y: auto;

  &--closed {
    width: $sidebar-width-collapsed;

    .sidebar__subtitle,
    .sidebar__menu-link span {
      display: none;
    }
  }

  &__header {
    padding: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  }

  &__logo {
    h2 {
      margin: 0;
      font-size: 24px;
      font-weight: bold;
      color: white;
    }
  }

  &__subtitle {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.7);
    margin-top: 5px;
  }

  &__nav {
    padding: 10px 0;
  }

  &__menu {
    list-style: none;
    padding: 0;
    margin: 0;
  }

  &__menu-item {
    margin: 0;
  }

  &__menu-link {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: all $transition-speed;

    i {
      width: 20px;
      margin-right: 15px;
      text-align: center;
    }

    &:hover {
      background-color: rgba(255, 255, 255, 0.1);
      color: white;
    }

    &--active {
      background-color: $primary-color;
      color: white;
    }
  }
}

// Header
.admin-header {
  height: $header-height;
  background-color: white;
  border-bottom: 1px solid #dee2e6;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);

  &__left {
    display: flex;
    align-items: center;
  }

  &__menu-toggle {
    background: none;
    border: none;
    font-size: 20px;
    color: $secondary-color;
    cursor: pointer;
    padding: 10px;
    margin-right: 15px;

    &:hover {
      color: $primary-color;
    }
  }

  &__right {
    display: flex;
    align-items: center;
    color: $secondary-color;

    .dropdown-menu {
      background-color: white;
      border: 1px solid #dee2e6;
      box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);

      .dropdown-item-text {
        color: $secondary-color;
        padding: 10px 15px;

        small {
          color: #6c757d;
        }

        div {
          color: $secondary-color;
          font-weight: 500;
        }
      }

      .dropdown-item {
        color: $secondary-color;
        padding: 10px 15px;
        transition: background-color $transition-speed;

        &:hover {
          background-color: #f8f9fa;
          color: $primary-color;
        }

        i {
          color: inherit;
        }
      }
    }
  }

  &__user {
    display: flex;
    align-items: center;
    color: $secondary-color;

    i {
      font-size: 24px;
      margin-right: 10px;
    }

    &-button {
      color: $secondary-color !important;
      text-decoration: none;
      transition: color $transition-speed;

      &:hover {
        color: $primary-color !important;
        text-decoration: none;
      }

      i, span {
        color: inherit;
      }
    }
  }
}

// Page Header
.page-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;

  h1 {
    margin: 0;
    font-size: 28px;
    font-weight: 600;
  }
}

// Dashboard
.dashboard {
  &__header {
    margin-bottom: 30px;

    h1 {
      margin-bottom: 10px;
    }
  }

  &__stats {
    margin-bottom: 30px;
  }
}

.stat-card {
  background: white;
  border-radius: 8px;
  padding: 20px;
  display: flex;
  align-items: center;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  transition: transform $transition-speed;

  &:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
  }

  &__icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: white;
    margin-right: 20px;

    &--blue {
      background-color: #3498db;
    }

    &--green {
      background-color: #2ecc71;
    }

    &--orange {
      background-color: #f39c12;
    }

    &--purple {
      background-color: #9b59b6;
    }

    &--secondary {
      background-color: #6c757d;
    }
  }

  &__content {
    h3 {
      margin: 0;
      font-size: 32px;
      font-weight: bold;
    }

    p {
      margin: 5px 0 0 0;
      color: #6c757d;
    }
  }
}

