@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
}

body {
  background-color: #f1f5f9;
  color: #1e293b;
  height: 100vh;
  overflow: hidden;
}

.layout {
  display: flex;
  height: 100vh;
  width: 100%;
  overflow: hidden;
}

/* Sidebar styles */
.sidebar {
  width: 250px;
  background-color: #f7f7f7;
  border-right: 1px solid #e2e8f0;
  display: flex;
  flex-direction: column;
  transition: width 0.3s ease;
}

.sidebar-header {
  height: 64px;
  padding: 0 1rem;
  border-bottom: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.user-info {
  padding: 1rem;
  border-bottom: 1px solid #e2e8f0;
}

.user-container {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.user-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: #f1f5f9;
  display: flex;
  align-items: center;
  justify-content: center;
}

.user-name {
  font-weight: 500;
}

.user-role {
  font-size: 0.75rem;
  color: #64748b;
}

.user-code {
  font-size: 0.75rem;
  color: #64748b;
}

.Last-login {
  font-size: 0.55rem;
  color: #64748b;
  position: absolute;
  left: 9%;
}

.sidebar-items {
  padding: 0.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  overflow-y: auto;
  flex: 1;
}

.sidebar-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  /* ensures badge is on right */
  padding: 0.75rem;
  border-radius: 0.375rem;
  cursor: pointer;
  transition: background-color 0.2s;
}

.sidebar-item:hover {
  background-color: #f1f5f9;
}

.sidebar-item.active {
  background-color: #334155;
  color: white;
}

/* Default: show labels & badges */
.sidebar-label,
.badge {
  display: inline-block;
}

/* When .collapsed is on .sidebar, hide them */
.sidebar.collapsed .sidebar-label,
.sidebar.collapsed .badge,
.sidebar.collapsed .user-info {
  display: none !important;
}

/* Also reduce sidebar width when collapsed */
.sidebar.collapsed {
  width: 64px !important;
}

/* Wrap icon & label together */
.item-left {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.sidebar-label {
  font-weight: 500;
}

.badge {
  background-color: #334155;
  color: #fff;
  padding: 0.2rem 0.6rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 600;
}

/* Main content styles */
.main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.header {
  height: 64px;
  border-bottom: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.5rem;
  background-color: white;
}

.dashboard {
  flex: 1;
  display: flex;
  overflow: hidden;
}

.content-area {
  flex: 1;
  padding: 1.5rem;
  overflow-y: auto;
}

.welcome-text {
  display: flex;
  align-items: center;
  margin-bottom: 1.5rem;
  animation: fadeIn 0.3s ease-out;
}

.welcome-name {
  margin-left: 0.5rem;
  color: #64748b;
}

/* Card grid layout */
.grid-cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-bottom: 1.5rem;
  animation: scaleIn 0.3s ease-out;
  cursor: pointer;
}

/* Stat card styles */
.stat-card {
  background-color: white;
  border-radius: 0.5rem;
  padding: 1rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  border: 1px solid #e2e8f0;
  transition: box-shadow 0.3s ease;
}

.stat-card:hover {
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.stat-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.stat-info h3 {
  font-size: 0.75rem;
  color: #64748b;
  margin-bottom: 0.25rem;
}

.stat-info p {
  font-size: 1.25rem;
  font-weight: 600;
}

.stat-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background-color: #f1f5f9;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Metric card styles */
.metric-card {
  background-color: #f1f5f9;
  border-radius: 0.5rem;
  border: #d9d9d9 0.1px solid;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  cursor: pointer;
  transition: transform 0.2s;
}

.metric-card:hover {
  transform: translateY(-2px);
}

.metric-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.metric-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background-color: white;
  display: flex;
  align-items: center;
  justify-content: center;
}

.metric-value {
  font-size: 1.25rem;
  font-weight: 600;
}

.metric-title {
  font-size: 0.875rem;
  color: #1e293b;
}

.metric-subtitle {
  font-size: 0.75rem;
  color: #64748b;
  display: block;
}

/* Right sidebar styles */
.right-sidebar {
  width: 300px;
  border-left: 1px solid #e2e8f0;
  background-color: white;
  padding: 1.5rem;
  overflow-y: auto;
  animation: slideIn 0.4s ease-out;
}

/* Calendar styles */
.calendar-box {
  background-color: white;
  border-radius: 0.5rem;
  padding: 1rem;
  margin-bottom: 1rem;
  border: 1px solid #e2e8f0;
}

.calendar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
}

.calendar-title {
  font-size: 0.875rem;
  font-weight: 500;
}

.calendar-date {
  font-size: 0.75rem;
  color: #64748b;
}

.calendar-nav {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.calendar-nav-btn {
  background: none;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  padding: 0.25rem;
  transition: background-color 0.2s;
}

.calendar-nav-btn:hover {
  background-color: #f1f5f9;
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
  text-align: center;
}

.weekday {
  font-size: 0.75rem;
  color: #64748b;
  padding: 0.25rem 0;
}

.calendar-day {
  display: flex;
  justify-content: center;
  align-items: center;
}

.day-number {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  border-radius: 50%;
  cursor: pointer;
  transition: background-color 0.2s;
}

.day-number:hover {
  background-color: #f1f5f9;
}

.day-number.active {
  background-color: #334155;
  color: white;
}

/* Quick Links styles */
.quick-links {
  background-color: white;
  border-radius: 0.5rem;
  padding: 1rem;
  border: 1px solid #e2e8f0;
  margin-bottom: 1rem;
}

.links-header {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  margin-bottom: 0.75rem;
}

.links-title {
  font-size: 0.875rem;
  font-weight: 500;
}

.links-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.5rem;
}

.quick-link {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.5rem;
  border-radius: 0.375rem;
  background-color: #f8fafc;
  border: 1px solid #e2e8f0;
  font-size: 0.75rem;
  font-weight: 500;
  text-decoration: none;
  color: #1e293b;
  transition: box-shadow 0.2s;
}

.quick-link:hover {
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.notes-section {
  background-color: white;
  border-radius: 0.5rem;
  padding: 1rem;
  border: 1px solid #e2e8f0;
  margin-bottom: 1rem;
}

.notes-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.notes-header svg {
  width: 20px;
  height: 20px;
  color: #334155;
}

.notes-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: #1e293b;
}

.notes-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.note-item {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  font-size: 0.875rem;
  color: #1e293b;
  padding: 0.75rem;
  background-color: #f8fafc;
  border-radius: 0.375rem;
  border: 1px solid #e2e8f0;
}

.note-item span {
  font-weight: 500;
  color: #334155;
  min-width: 60px;
  /* Fixed width for time */
}

.note-item p {
  margin: 0;
  flex: 1;
  color: #475569;
}


.external-links {
  background-color: white;
  border-radius: 0.5rem;
  padding: 1rem;
  border: 1px solid #e2e8f0;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.external-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.external-title {
  font-size: 0.875rem;
  font-weight: 500;
  color: #1e293b;
}

.external-icon {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #e2e8f0;
  border-radius: 0.25rem;
  cursor: pointer;
  transition: background-color 0.2s;
}

.external-icon:hover {
  background-color: #f1f5f9;
}

/* Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes slideIn {
  from {
    transform: translateX(-10px);
    opacity: 0;
  }

  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes scaleIn {
  from {
    transform: scale(0.95);
    opacity: 0;
  }

  to {
    transform: scale(1);
    opacity: 1;
  }
}

/* Responsive styles */
@media (max-width: 1200px) {
  .grid-cards {
    grid-template-columns: repeat(2, 1fr);
  }

  .right-sidebar {
    display: none;
  }
}

@media (max-width: 768px) {
  .sidebar {
    width: 64px;
  }
  .sidebar-label,
  .user-info,
  .badge {
    display: none;
  }
}

/* Custom scrollbar */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background-color: #e2e8f0;
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background-color: #94a3b8;
}