@import url('style.css');

:root {
  --bg: #f2e1d0;
  --surface: #fff8ec;
  --surface-warm: #f0d8c3;
  --surface-featured: #f1d4c1;
  --sidebar: #4a3b31;
  --text: #2e211b;
  --text-secondary: #684a39;
  --text-muted: #a8a39a;
  --accent: #a7431e;
  --primary: #8a5a4a;
  --border: #c48a6a;
  --progress-track: #f1d9c7;
  --green-dark: #3f5948;
  --green-light: #829777;

  /* --font-body: "Inter", sans-serif;
  --font-heading: "Plus Jakarta Sans", sans-serif;
  --font-mono: "JetBrains Mono", monospace; */

  --sidebar-width: 224px;
  --header-height: 56px;
  --radius: 12px;

  /* Collapsable Sidebar Function*/
  --sidebar-collapsed-width: 0px;
  --transition-speed: 0.3s;
}


* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  /* font: 30px/1.5 var(--font-body); */
  font-size: 30px;
}


button,
input {
  /* font: 'inherit'; */
  font-size: 20px;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
  font-size: 20px;
}

.navBarButton {
  /* background-color: #4a3b31; */
  border: none;
  width: 50px; 
  height:50px; 
  /* color:white; */
}

button {
  cursor: pointer;
}

a {
  color: var(--accent);
  text-decoration: none;
  font-size: 40px;
}

h1,
h2,
h3,
p {
  margin: 0;
}

h1,
h2,
h3 {
  font-family: pixelzone;
}

h2 {
  font-size: 10px;
  font-weight: 400;
  line-height: 1.3;
}

h3 {
  font-size: 50px;
  font-weight: 300;
  line-height: 1.4;
}

button:focus-visible,
a:focus-visible,
input:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

/* Page shell */

.dashboard {
  position: relative;
  min-height: 100vh;
}

.dashboard-main {
  margin-left: var(--sidebar-width);
  padding: 80px 24px 24px;
}

/* Sidebar Navigation */
/* CSS to give navigation bar collapse functionality */

.sidebar {
  /* Scroll function on the sidebar */
  overflow-x:scroll;
  white-space: nowrap;
  display:inline-block;

  position: fixed;
  inset: 0 auto 0 0;
  z-index: 30;
  display: flex;
  flex-direction: column;
  width: var(--sidebar-width);
  background: var(--sidebar);
  color: #f5e5d5;
  border-right: 1px solid var(--border);
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 68px;
  padding: 20px;
  font: 700 90px/1.5 var(--font-heading);
}

.sidebar-nav {
  flex: 1;
  padding: 0 12px 16px;
  font-size: 45px;
}

.sidebar-nav-group + .sidebar-nav-group {
  margin-top: 20px;
}

.sidebar-nav-label {
  margin-bottom: 8px;
  font-size: 50px;
  letter-spacing: 1px;
  text-transform: uppercase;
  opacity: 0.65;
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 6px;
  padding: 8px 10px;
  border-radius: 8px;
  color: inherit;
}

.sidebar-link[aria-current="page"],
.sidebar-link.is-active {
  background: #f7e7d8;
  color: var(--text);
}

.sidebar-footer {
  padding: 12px;
  border-top: 1px solid rgb(245 229 213 / 15%);
  font-size: 45px;
}
/* Collapse functionality */
.sidebar.collapsed {
  width: var(--sidebar-collapsed-width);
}
.dashboard-main.expanded {
  margin-left: var(--sidebar-collapsed-width);
}

/* Top navigation */

.topnav {
  position: absolute;
  inset: 0 0 auto var(--sidebar-width);
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: var(--header-height);
  padding: 0 24px;
  background: var(--surface);
}

.topnav h1 {
  font-size: 38px;
  font-weight: 700;
  line-height: 48px;
}

.topnav-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.search-input {
  width: 192px;
  height: 34px;
  padding: 6px 16px 6px 32px;
  background: #f7e7d8;
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 8px;
}

.search-input::placeholder {
  color: var(--text-secondary);
}

.icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  background: var(--surface);
  color: var(--text-secondary);
  border: 1px solid var(--border);
  border-radius: 8px;
}

.user-menu {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px;
  background: transparent;
  color: var(--text);
  border: 0;
  border-radius: 8px;
}

/* Shared surfaces and utilities */

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.section-header,
.row-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.section-header {
  margin-bottom: 16px;
}

.section-link {
  font-size: 23px;
  white-space: nowrap;
}

.text-secondary {
  color: var(--text-secondary);
  font-size: xx-large;
}

.text-accent {
  color: var(--accent);
}

/* .mono {
  font-family: var(--font-mono);
} */

.metadata {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  color: var(--text-secondary);
  font-size: 50px;
}

/* 4 card Summary metrics */

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.stat-card {
  min-height: 98px;
  padding: 26px;
}

.stat-label {
  font: 700 20px/16px var(--font-heading);
  letter-spacing: 1px;
}

.stat-value {
  margin-top: 4px;
  font: 400 28px/30px var(--font-heading);
}

.stat-description {
  margin-top: 4px;
  color: var(--text-secondary);
  font-size: 30px;
  font-weight: 700;
}

/* Employee experience */

.employee-card {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-top: 32px;
  padding: 16px 20px;
}

.avatar {
  display: grid;
  flex-shrink: 0;
  place-items: center;
  width: 55px;
  height: 55px;
  border-radius: 50%;
  background: linear-gradient(135deg, #3f5948, #8a684a);
  color: white;
  font: 400 12px var(--font-heading);
}

.employee-content {
  flex: 1;
  min-width: 0;
}

.employee-identity {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 12px;
}

.employee-name {
  font: 700 18px/24px var(--font-heading);
}

.employee-role,
.employee-level {
  color: var(--accent);
}

.employee-level {
  font: 700 13px var(--font-mono);
}

.employee-progress-labels {
  margin-top: 4px;
  color: var(--accent);
  font: 700 12px/16px var(--font-mono);
}

/* Progress bars: set --progress on each element, e.g. 87% */

.progress {
  height: 6px;
  overflow: hidden;
  background: var(--progress-track);
  border-radius: 9999px;
}

.progress-fill {
  width: var(--progress, 0%);
  height: 100%;
  background: var(--primary);
  border-radius: inherit;
}

.progress--green .progress-fill {
  background: linear-gradient(
    90deg,
    var(--green-dark),
    var(--green-light)
  );
}

.employee-card .progress {
  margin-top: 6px;
}

/* Buttons and badges */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 34px;
  padding: 8px 16px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: transparent;
  color: var(--accent);
  font-size: 12px;
  line-height: 18px;
  text-align: center;
}

.button--primary {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff3e4;
}

.button--full {
  width: 100%;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border: 1px solid var(--border);
  border-radius: 9999px;
  color: var(--accent);
  white-space: nowrap;
}

.badge--xp {
  background: var(--surface-warm);
  /* font: 400 12px/16px var(--font-mono); */
  font: normal 70px pixelzone;
}

.badge--specialty {
  background: rgb(167 67 30 / 10%);
  border-color: rgb(167 67 30 / 25%);
  font: 400 10px/15px var(--font-heading);
  letter-spacing: 0.25px;
}

/* Current objective */

.objective-card {
  margin-top: 32px;
  padding: 20px;
  background: var(--surface-warm);
}

.objective-label {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--accent);
  font: 700 90px/1.3 var(--font-heading);
  letter-spacing: 1px;
}

.objective-label::before {
  content: "";
  flex-shrink: 0;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #d97745;
}

.objective-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 136px;
  gap: 16px;
  padding-top: 12px;
}

.objective-title {
  /* font: 400 90px/1.3 var(--font-heading); */
}

.objective-body .metadata {
  margin-top: 4px;
  font-size: 90px;
}

.objective-progress {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 12px;
}

.objective-progress .progress {
  flex: 1;
}

.objective-count {
  color: var(--accent);
  font: 400 34px var(--font-mono);
}

.objective-list {
  display: grid;
  gap: 40px;
  margin: 6px 0 0;
  padding: 0;
  list-style: none;
  font-size: 50px;
  line-height: 40px;
}

.objective-list li {
  display: flex;
  gap: 8px;
}

.objective-list .is-complete {
  color: var(--text-muted);
}

.objective-list .is-complete .objective-text {
  text-decoration: line-through;
}

.objective-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
}

.objective-actions .button {
  width: 100%;
  margin-top: 4px;
  font-size: 30px;
}

/* Quest of the week */

.weekly-section {
  margin-top: 32px;
}

.weekly-card {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  min-height: 295px;
  padding: 24px;
  background: var(--surface-featured);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: 0 14px 40px rgb(0 0 0 / 8%);
}

.weekly-card::before,
.weekly-card::after {
  content: "";
  position: absolute;
  z-index: -1;
  border-radius: 50%;
  pointer-events: none;
}

.weekly-card::before {
  top: -127px;
  right: -63px;
  width: 256px;
  height: 256px;
  background: rgb(138 90 74 / 5%);
}

.weekly-card::after {
  bottom: -88px;
  left: -47px;
  width: 192px;
  height: 192px;
  background: rgb(138 104 74 / 5%);
}

.weekly-label {
  color: var(--accent);
  font: 700 26px/1.3 var(--font-heading);
  letter-spacing: 1px;
}

.weekly-title {
  margin-top: 16px;
  font: 400 22px/1.3 var(--font-heading);
}

.weekly-description {
  margin-top: 12px;
  color: var(--text-secondary);
}

.weekly-rewards,
.weekly-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-top: 16px;
}

/* Continue quests and recent activity */

.lower-dashboard {
  margin-top: 112px;
}

.continue-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}

.continue-card {
  min-height: 140px;
  padding: 16px;
}

.continue-card .progress {
  margin-top: 12px;
}

.continue-card .button {
  min-height: 31px;
  margin-top: 12px;
  padding: 5px 12px;
}

.activity-section {
  margin-top: 32px;
}

.activity-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.activity-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}

.activity-item:last-child {
  border-bottom: 0;
}

.activity-icon {
  display: grid;
  flex-shrink: 0;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--green-dark);
  color: var(--surface);
}

.activity-content {
  flex: 1;
  min-width: 0;
}

.activity-detail {
  margin-top: 3px;
  color: var(--accent);
  font-size: 12px;
}

.activity-time {
  flex-shrink: 0;
  color: var(--text-secondary);
  font-size: 11px;
}
