
/*
Copyright (c) 2022 by Abyei Dengdit (https://codepen.io/abyeidengdit/pen/poaVGXG)
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@import url("https://fonts.googleapis.com/css2?family=Lato:wght@300;400&display=swap");

*/

*,
::after,
::before {
  margin: 0;
  box-sizing: border-box;
}
/*
body {
  font-family: "Lato", sans-serif;
}
*/

:root {
  --bg-color: rgba(255, 255, 255, 0.92);
  --primary-color: rgba(37, 99, 235, 0.1);
  --border-radius: 12px;
  --color: #0f172a;
  --sidebar-border: rgba(15, 23, 42, 0.08);
  /* --box-shadow: #0b488a 5px 0px 50px 0px; */
}

.sidebar {
  height: 100vh;
  position: fixed;
  top: 0;
  left: 0;
  width: 185px;
  background: var(--bg-color);
  border-right: 1px solid var(--sidebar-border);
  box-shadow: 12px 0 28px rgba(5, 11, 26, 0.35);
  backdrop-filter: blur(12px);
  transition: left 0.5s ease;
  -webkit-transition: left 0.5s ease;
  -moz-transition: left 0.5s ease;
  -ms-transition: left 0.5s ease;
  -o-transition: left 0.5s ease;
  z-index: 1;
  touch-action: none;
  padding-left: 5px;
  padding-right: 8px;
  padding-top: 0.5rem;
 
  
  
}
.sidebar ul {
  list-style: none;
  margin-top: 1.5rem;
  padding: 0 0.35rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  overflow-y: auto;
  max-height: calc(100vh - 200px);
 
}

.sidebar ul li {
  margin-top: 0;
  padding: 0;
  width: 100%;
  display: flex;
  align-items: center;
  position: relative;
}

.sidebar ul li a {
  text-decoration: none;
  font-size: 0.98rem;
  font-weight: 500;
  color: rgba(51, 65, 85, 0.9);
  display: flex;
  align-items: center;
  gap: 0.6rem;
  width: 100%;
  padding: 0.6rem 0.7rem;
  border-radius: var(--border-radius);
}
.sidebar ul li.active {
  /* margin-left: -5px; */
  background: var(--primary-color);
  width: 100%;
  border-radius: var(--border-radius);
  transition: background 0.2s linear;
}
.sidebar ul li.active a {
  color: #0f172a;
}
.sidebar ul li a:hover {
  /* margin-left: -5px; */
  background: var(--primary-color);
  width: 100%;
  border-radius: var(--border-radius);
  transition: background 0.2s linear;
  color: #0f172a;
}
.sidebar ul li a svg {
  flex: 0 0 auto;
  opacity: 0.85;
}

.sidebar ul li.active a svg,
.sidebar ul li a:hover svg {
  opacity: 1;
}
.sidebar ul li.active::before {
  content: "";
  position: absolute;
  left: -4px;
  width: 3px;
  height: 60%;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(56, 189, 248, 0.9), rgba(129, 140, 248, 0.6));
}

.sidebar small {
  color: var(--sp-muted);
  font-size: 0.75rem;
}

.sidebar ul::-webkit-scrollbar {
  width: 6px;
}

.sidebar ul::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.35);
  border-radius: 999px;
}

html[data-theme="dark"] .sidebar {
  background: rgba(8, 16, 33, 0.92);
  border-right: 1px solid rgba(148, 163, 184, 0.18);
  box-shadow: 12px 0 28px rgba(5, 11, 26, 0.35);
}

html[data-theme="dark"] .sidebar ul li a {
  color: var(--sp-muted);
}

html[data-theme="dark"] .sidebar ul li.active {
  background: rgba(56, 189, 248, 0.2);
}

html[data-theme="dark"] .sidebar ul li.active a {
  color: var(--sp-text);
}
html[data-theme="dark"] .sidebar ul li a:hover {
  background: rgba(56, 189, 248, 0.2);
  color: var(--sp-text);
}

html[data-theme="dark"] .sidebar ul li.active::before {
  background: linear-gradient(180deg, rgba(56, 189, 248, 0.9), rgba(129, 140, 248, 0.6));
}

@media (min-width: 701px) {
  .sidebar {
    width: 185px;
  }
}

@media (max-width: 700px) {
  .sidebar {
    margin-top: 4rem;
    width: 50px;
    transform: scale(1.25);
    
  }
  .sidebar ul {
    max-height: calc(100vh - 180px);
  }
}
