/*Organizational Diagram*/
#canvas-wrap{
  position:relative;
  width: calc(100% - 320px);
  min-height:640px;
  background:#fefefe;
  border-radius:10px;
  box-shadow:var(--shadow);
  overflow:auto;
  border:1px solid rgba(11,22,40,0.03);
}

#connectors{
  position:absolute;
  inset:0;
  width:100%;
  height:100%;
  pointer-events:none;
}
#nodes {
  position: relative;
  width: 2000px;
  height: 1400px
}

/* Node card */
.node {
  position:absolute;
  min-width:160px;
  padding:10px;
  background-color:#fefefe;
  border-radius:10px;
  box-shadow:0 8px 20px rgba(20,30,60,0.08);
  border:1px solid rgba(15,23,42,0.04);
  cursor:grab;
  user-select:none;
  touch-action:none;
  transition:box-shadow 0.12s, transform 0.06s;
}
.node:active { cursor:grabbing; transform:scale(0.995); box-shadow:0 10px 24px rgba(12,32,80,0.12) }

.node .name { font-weight:600; font-size:14px; margin-bottom:4px }
.node .title { font-size:12px; color:var(--muted) }

.node .avatar {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background-color: #00b4ff;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 700;
  margin-right: 8px;
}
.node .tools{
  position:absolute;right:6px;top:6px;display:flex;gap:6px;font-size:12px;color:var(--muted)
}
.node .delete-btn{
  border:none;background:none;color:#ef4444;font-weight:bold;
  cursor:pointer;padding:2;font-size:14px;line-height:1;
  z-index: 1000;
}
.node .delete-btn:hover{color:#dc2626;transform:scale(1.2)}

/* legend / controls */
#legend{width:300px;padding:12px;background:#fff;border-radius:8px;box-shadow:var(--shadow);border:1px solid rgba(0,0,0,0.03);font-size:13px}
#legend button{margin-top:8px;padding:8px 10px;border-radius:6px;border:1px solid #e6eefc;background:#f7fbff;color:var(--accent);cursor:pointer}
#legend label{display:block;margin-top:8px}
#legend input{margin-left:6px;padding:6px;border-radius:6px;border:1px solid #e5e7eb}

.navbar {
  height: 60px !important;
  padding-left: 16px;
  padding-right: 16px;
  background-color: #ffffff;
  color: #000000;
  position: fixed;
  z-index: 2;
  border-bottom: 1px solid #e1e5e9;
}

.flex-grow-1 {
  flex-grow: 1;
}

#sidenave-toggle {
  border: 0;
  background-color: transparent;
  color: #000000;
  padding: 8px;
  border-radius: 4px;
  transition: background-color 0.3s ease;
}

#sidenave-toggle:hover {
  background-color: #00AEEF;
}

.container-fluid {
  padding-top: 60px;
}

#sidebar {
  position: fixed;
  overflow: auto;
}

.table-responsive {
  overflow-x: auto;
  white-space: nowrap;
}

.table-responsive table {
  min-width: 100%;
}

.table-responsive td,
.table-responsive th {
  white-space: nowrap;
}

/*Calendar*/
body {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial;
}

/* Calendar weekdays header row */
.calendar-weekdays .col {
  padding: 0.5rem 0;
  border-radius: .25rem;
  background: transparent;
}

/* Calendar grid: responsive */
.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 0.5rem;
}

/* Each day cell */
.calendar-day {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  padding: 4px;
  border: 1px solid #ddd;
  border-radius: 4px;
  background: #fff;
  min-height: 120px; /* ensure enough space for content */
  position: relative;
}

.calendar-day.empty {
  background: transparent;
  border: 1px dashed rgba(0,0,0,0.04);
  cursor: default;
}

.calendar-day:not(.empty):hover {
  background: #f8f9fa;
}

/* Date number (top-left) */
.date-number {
  font-weight: 700;
  font-size: 0.95rem;
  color: #212529;
}

/* Activity list */
.activity-list {
  list-style: none;
  padding: 0;
  margin: 2px 0 0 0;
  flex-grow: 1;
}

.activity-list li {
  display: flex;
  justify-content: space-between;
  font-size: 0.6rem;
  white-space: nowrap;
  overflow: hidden;
  line-height: 1.2;        /* compact line spacing */
}

.project-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
  margin-right: 4px;
}

.hours {
  flex-shrink: 0;
  margin-left: 4px;
}

.more-indicator {
  font-size: 0.6rem;
  color: #666;
  text-align: right;
  flex: 1;
}

.total-hours {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem; /* slightly bigger */
  font-weight: 600;
  margin-top: auto; /* push to bottom */
  border-top: 1px solid #eee;
  padding-top: 2px;
  font-weight: bold;
}


/* Highlight current date */
.current-date {
  border: 2px solid #0d6efd;
  background: #e7f1ff;
}

.dashboard-scrollable-card {
    max-height: 70vh;
    overflow-y: auto;
}

/* Hide weekdays in brackets on desktop */
.weekday-mobile {
  display: none;
}

/* --------- RESPONSIVENESS --------- */

/* Medium screens (tablets) */
@media (max-width: 992px) {
  .calendar-grid {
    grid-template-columns: repeat(4, 1fr); /* 4 columns */
  }
  .calendar-day {
    min-height: 100px;
  }
  .date-number {
    font-size: 0.9rem;
  }
}

/* Small screens (mobile) */
@media (max-width: 576px) {
  .calendar-grid {
    grid-template-columns: repeat(2, 1fr); /* 2 columns */
  }
  .calendar-day {
    min-height: 90px;
    padding: 0.4rem;
  }
  .date-number {
    font-size: 0.85rem;
  }
  .activity-list {
    font-size: 0.8rem;
    max-height: calc(90px - 1.6rem);
  }
}

@media (max-width: 768px) {
  .calendar-weekdays {
    display: none !important;
  }

  .weekday-mobile {
    display: inline;
  }
}

#home-link {
    text-decoration: none;
    color: inherit;
    display: flex;
    align-items: center;
}

/* Custom styling for tooltip icon */
.bi-info-circle {
  cursor: pointer;
  font-size: 0.8rem;
}