/* Master Dashboard - dark body #2e2c2c */
.master-dashboard {
  min-height: 100vh;
  background: #2e2c2c;
  background-attachment: fixed;
  padding: 0 0 var(--spacing-2xl, 3rem);
  font-family: var(--font-family, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif);
  display: flex;
  flex-direction: column;
  color: rgba(255, 255, 255, 0.9);
}

/* ----- Sliding sidebar overlay ----- */
.master-dashboard-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  z-index: 100;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.master-dashboard-overlay--open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

/* ----- Sliding sidebar – dark theme to match body ----- */
.master-dashboard-sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: min(320px, 88vw);
  max-width: 320px;
  height: 100vh;
  background: linear-gradient(180deg, #3a3838 0%, #363434 40%, #323030 100%);
  border-right: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 4px 0 32px rgba(0, 0, 0, 0.4);
  z-index: 101;
  display: flex;
  flex-direction: column;
  transform: translateX(-100%);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
}

.master-dashboard-sidebar--open {
  transform: translateX(0);
}

.master-dashboard-sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  flex-shrink: 0;
  background: rgba(0, 0, 0, 0.15);
}

.master-dashboard-sidebar-title {
  font-size: 0.8125rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.95);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.master-dashboard-sidebar-close {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fca5a5;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 12px;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.master-dashboard-sidebar-close:hover {
  background: rgba(242, 27, 35, 0.25);
  border-color: rgba(242, 27, 35, 0.5);
  color: #f87171;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.master-dashboard-sidebar-close svg {
  width: 20px;
  height: 20px;
}

.master-dashboard-sidebar-user {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  flex-shrink: 0;
  background: rgba(0, 0, 0, 0.1);
}

.master-dashboard-sidebar-user-label {
  display: block;
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: rgba(255, 255, 255, 0.55);
  margin-bottom: 0.25rem;
}

.master-dashboard-sidebar-user-name {
  font-size: 0.875rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.9);
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.master-dashboard-sidebar-nav {
  flex: 1;
  overflow-y: auto;
  padding: 1rem 1.25rem;
}

.master-dashboard-sidebar-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.master-dashboard-sidebar-list li {
  margin-bottom: 0.5rem;
}

.master-dashboard-sidebar-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  color: #f87171;
}

.master-dashboard-sidebar-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  font-size: 0.9375rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.85);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
  text-align: left;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
}

.master-dashboard-sidebar-item--active {
  background: rgba(242, 27, 35, 0.2);
  border-color: rgba(242, 27, 35, 0.5);
  color: #f87171;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.master-dashboard-sidebar-item--active .master-dashboard-sidebar-icon {
  color: #f87171;
}

.master-dashboard-sidebar-item--available:hover {
  background: rgba(242, 27, 35, 0.15);
  border-color: rgba(242, 27, 35, 0.4);
  color: #f87171;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}

.master-dashboard-sidebar-item--available:hover .master-dashboard-sidebar-icon {
  color: #f87171;
}

/* Disabled / coming-soon items in the sidebar */
.master-dashboard-sidebar-item--disabled {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.45);
  cursor: default;
}

.master-dashboard-sidebar-item--disabled .master-dashboard-sidebar-icon {
  color: rgba(255, 255, 255, 0.45);
}

/* Project icon (including image) in sidebar – match sidebar icon size */
.master-dashboard-sidebar-item .master-project-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.master-dashboard-sidebar-item .master-project-icon--img {
  width: 20px;
  height: 20px;
  object-fit: contain;
}

.master-dashboard-sidebar-footer {
  padding: 1rem 1.25rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  flex-shrink: 0;
  background: rgba(0, 0, 0, 0.15);
}

.master-dashboard-sidebar-logout {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  font-size: 0.9375rem;
  font-weight: 600;
  color: #fff;
  background: linear-gradient(180deg, #f21b23 0%, #d91820 100%);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 12px;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, transform 0.1s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.master-dashboard-sidebar-logout:hover:not(:disabled) {
  background: linear-gradient(180deg, #d91820 0%, #c2151d 100%);
  box-shadow: 0 4px 12px rgba(242, 27, 35, 0.4);
}

.master-dashboard-sidebar-logout:active:not(:disabled) {
  transform: scale(0.99);
}

.master-dashboard-sidebar-logout:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.master-dashboard-sidebar-logout svg {
  width: 18px;
  height: 18px;
}

/* ----- Top bar (navbar) - professional redesign ----- */
.master-dashboard-topbar {
  --navbar-height: 76px;
  --navbar-bg: #910404e0;
  --navbar-border: rgba(255, 255, 255, 0.12);
  --navbar-shadow: 0 1px 0 rgba(255, 255, 255, 0.08) inset,
    0 4px 24px rgba(0, 0, 0, 0.15),
    0 1px 2px rgba(0, 0, 0, 0.08);
  background: var(--navbar-bg);
  backdrop-filter: blur(24px) saturate(1.2);
  -webkit-backdrop-filter: blur(24px) saturate(1.2);
  border-bottom: 1px solid var(--navbar-border);
  box-shadow: var(--navbar-shadow);
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--navbar-height);
}

/* .master-dashboard-topbar-inner {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 1.5rem;
  min-height: var(--navbar-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
} */

.master-dashboard-topbar-inner {
  max-width: 100%;
  /* margin: 0 auto; */
  padding: 0 2.5rem;
  height: var(--navbar-height);
  min-height: var(--navbar-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

/* Left column: adjusted width to fit menu and theme toggle buttons */
.master-dashboard-topbar-left {
  width: auto;
  min-width: auto;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Hamburger – pill style with hover lift */
.master-dashboard-menu-btn {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.95);
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 12px;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, transform 0.15s ease;
  flex-shrink: 0;
}

.master-dashboard-menu-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.35);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.master-dashboard-menu-btn:active {
  transform: scale(0.98);
}

.master-dashboard-menu-btn:focus-visible {
  outline: 2px solid #f21b23;
  outline-offset: 2px;
}

.master-dashboard-menu-btn svg {
  width: 22px;
  height: 22px;
}

/* Brand – logo + text, centered in navbar */
.master-dashboard-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.875rem;
  flex: 0 0 auto;
  padding-left: 0.25rem;
  padding-right: 0.25rem;
}

/* Country / Site / Work area filters in top bar */
.master-dashboard-topbar-filters {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  flex: 1;
  min-width: 0;
  padding: 0 0.75rem;
}

.master-dashboard-filter-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.85);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.master-dashboard-filter-select {
  min-width: 120px;
  max-width: 180px;
  height: 36px;
  padding: 0 0.5rem 0 0.75rem;
  font-size: 0.8125rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.95);
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 8px;
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='rgba(255,255,255,0.9)' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.5rem center;
  padding-right: 1.75rem;
  transition: background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.master-dashboard-filter-select:hover:not(:disabled) {
  background-color: rgba(255, 255, 255, 0.22);
  border-color: rgba(255, 255, 255, 0.35);
}

.master-dashboard-filter-select:focus {
  outline: none;
  border-color: #f87171;
  box-shadow: 0 0 0 2px rgba(248, 113, 113, 0.35);
}

.master-dashboard-filter-select:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.master-dashboard-filter-select option {
  background: #2e2c2c;
  color: rgba(255, 255, 255, 0.95);
}

.master-dashboard-logo {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 2px 0 rgba(0, 0, 0, 0.06) inset,
    0 4px 12px rgba(0, 0, 0, 0.2),
    0 1px 2px rgba(0, 0, 0, 0.06);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #910404;
  flex-shrink: 0;
  transition: box-shadow 0.2s ease, transform 0.15s ease;
}

.master-dashboard-brand:hover .master-dashboard-logo {
  box-shadow: 0 2px 0 rgba(0, 0, 0, 0.06) inset,
    0 6px 16px rgba(0, 0, 0, 0.25),
    0 1px 2px rgba(0, 0, 0, 0.06);
}

.master-dashboard-logo svg {
  width: 20px;
  height: 20px;
  filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.1));
}

.master-dashboard-brand-text {
  font-size: 1.125rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.98);
  letter-spacing: -0.03em;
  line-height: 1.2;
}

/* Right-side actions – same width as left so brand stays centered */
.master-dashboard-topbar-actions {
  width: 286px;
  min-width: 256px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.75rem;
}

.master-dashboard-user-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  padding: 0.25rem 0.75rem 0.25rem 0.25rem;
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 9999px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
  transition: background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.master-dashboard-user-pill:hover {
  background: rgba(255, 255, 255, 0.28);
  border-color: rgba(255, 255, 255, 0.4);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.master-dashboard-user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.95);
  color: #910404;
  font-size: 0.6875rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.master-dashboard-user-name {
  font-size: 0.8125rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.95);
  max-width: 160px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (max-width: 640px) {
  .master-dashboard-user-name {
    display: none;
  }
  .master-dashboard-user-pill {
    padding: 0.25rem;
  }
}

.master-dashboard-logout-btn {
  height: 40px;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  font-size: 0.8125rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.95);
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 20px;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.master-dashboard-logout-btn:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.28);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.4);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.master-dashboard-logout-btn:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.9);
  outline-offset: 2px;
}

.master-dashboard-logout-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.master-dashboard-logout-btn svg {
  width: 17px;
  height: 17px;
  opacity: 0.9;
}

/* ----- Hero / Welcome ----- */

.master-dashboard-hero {
  padding: var(--spacing-2xl, 3rem) var(--spacing-xl, 2rem);
  text-align: center;
  background: transparent;
}

.master-dashboard-hero-inner {
  max-width: 680px;
  margin: 0 auto;
}

/* Small context badge so users know where they are */
.master-dashboard-hero-badge {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #fca5a5;
  background: rgba(242, 27, 35, 0.25);
  border: 1px solid rgba(242, 27, 35, 0.4);
  border-radius: 9999px;
  padding: 0.35rem 0.85rem;
  margin: 0 0 var(--spacing-md, 1rem) 0;
}

.master-dashboard-title {
  font-size: clamp(1.5rem, 4vw, 2rem);
  font-weight: 700;
  color: rgba(255, 255, 255, 0.98);
  margin: 0 0 var(--spacing-sm, 0.75rem) 0;
  letter-spacing: -0.02em;
  line-height: 1.3;
}

.master-dashboard-title-highlight {
  color: #f87171;
  font-weight: 800;
}

.master-dashboard-subtitle {
  font-size: 1rem;
  color: rgba(255, 255, 255, 0.75);
  margin: 0 0 var(--spacing-lg, 1.5rem) 0;
  line-height: 1.55;
}

.master-dashboard-subtitle strong {
  color: rgba(255, 255, 255, 0.9);
  font-weight: 600;
}

.master-dashboard-stats {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: var(--spacing-lg, 1.5rem);
}

.master-dashboard-stat {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.85);
  padding: 0.5rem 1rem;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 9999px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.master-dashboard-stat svg {
  width: 18px;
  height: 18px;
  color: #f87171;
  flex-shrink: 0;
}

.master-dashboard-stat--available {
  color: #fca5a5;
  background: rgba(242, 27, 35, 0.2);
  border-color: rgba(242, 27, 35, 0.4);
}

.master-dashboard-stat--available svg {
  color: #f87171;
}

/* Quick tip so users discover menu and navigation */
.master-dashboard-hero-tip {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  text-align: left;
  margin-top: 0;
  padding: 0 1.75rem 0 1.25rem;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  max-width: 420px;
  margin-left: auto;
  margin-right: auto;
  position: relative;
  overflow: hidden;
  max-height: 0;
  opacity: 0;
  transform: translateY(-4px);
  pointer-events: none;
  transition:
    max-height 0.25s ease,
    margin-top 0.25s ease,
    padding-top 0.25s ease,
    padding-bottom 0.25s ease,
    opacity 0.25s ease,
    transform 0.25s ease;
}

.master-dashboard-hero-tip--visible {
  margin-top: var(--spacing-xl, 2rem);
  padding-top: 0.875rem;
  padding-bottom: 0.875rem;
  max-height: 200px; /* enough to show content */
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.master-dashboard-hero-tip--hidden {
  margin-top: 0;
  padding-top: 0;
  padding-bottom: 0;
  max-height: 0;
  opacity: 0;
  transform: translateY(-4px);
  pointer-events: none;
}

.master-dashboard-hero-tip-close {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 16px;
  height: 16px;
  border-radius: 9999px;
  border: 1px solid rgba(248, 113, 113, 0.5);
  background: rgba(255, 255, 255, 0.12);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fca5a5;
  cursor: pointer;
  flex-shrink: 0;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
  transition:
    background 0.15s ease,
    color 0.15s ease,
    border-color 0.15s ease,
    box-shadow 0.15s ease,
    transform 0.05s ease-in-out;
}

.master-dashboard-hero-tip-close:hover {
  background: rgba(242, 27, 35, 0.25);
  border-color: rgba(248, 113, 113, 0.8);
  color: #f87171;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
}

.master-dashboard-hero-tip-close:active {
  transform: translateY(1px);
  box-shadow: 0 1px 3px rgba(248, 113, 113, 0.3);
}

.master-dashboard-hero-tip-icon {
  flex-shrink: 0;
  color: #f87171;
  margin-top: 0.1rem;
}

.master-dashboard-hero-tip-text {
  margin: 0;
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.8);
  line-height: 1.5;
}

.master-dashboard-hero-tip-text strong {
  color: rgba(255, 255, 255, 0.95);
  font-weight: 600;
}

/* ----- Section head ----- */
.master-dashboard-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--spacing-xl, 2rem);
  flex: 1;
}

.master-dashboard-section-head {
  margin-bottom: var(--spacing-xl, 2rem);
  padding-bottom: 0.5rem;
}

.master-dashboard-section-title {
  font-size: 1.375rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.98);
  margin: 0 0 var(--spacing-xs, 0.5rem) 0;
  letter-spacing: -0.02em;
}

.master-dashboard-section-desc {
  font-size: 0.9375rem;
  color: rgba(255, 255, 255, 0.75);
  margin: 0;
  line-height: 1.5;
  max-width: 560px;
}

/* ----- Projects grid ----- */
/* 4 columns x 2 rows layout */
.master-projects-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-template-rows: repeat(2, auto);
  gap: var(--spacing-lg, 1.5rem);
}

@media (max-width: 1024px) {
  .master-projects-grid {
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: repeat(4, auto);
  }
}

@media (max-width: 560px) {
  .master-projects-grid {
    grid-template-columns: 1fr;
    grid-template-rows: repeat(8, auto);
  }
}

.master-project-card {
  background: linear-gradient(145deg, #3a3838 0%, #363434 40%, #323030 100%);
  border-radius: var(--radius-lg, 1rem);
  padding: var(--spacing-xl, 2rem);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
  transition:
    transform var(--transition-normal, 0.3s ease),
    box-shadow var(--transition-normal, 0.3s ease),
    border-color var(--transition-fast, 0.2s ease),
    background var(--transition-fast, 0.2s ease);
  cursor: default;
  position: relative;
  overflow: hidden;
}

.master-project-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #f21b23, #d91820);
  opacity: 0;
  transition: opacity var(--transition-fast, 0.2s ease);
}

.master-project-card--available {
  cursor: pointer;
}

.master-project-card--draggable {
  cursor: grab;
}

.master-project-card--draggable:active {
  cursor: grabbing;
}

.master-project-card--available::before {
  opacity: 0;
}

.master-project-card--available:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.4);
  border-color: rgba(242, 27, 35, 0.6);
  background: linear-gradient(145deg, #403e3e 0%, #3a3838 40%, #363434 100%);
}

.master-project-card--available:hover::before {
  opacity: 1;
}

.master-project-card--available:focus {
  outline: none;
  outline-offset: 0;
}

.master-project-card--available:active {
  transform: translateY(-2px);
}

.master-project-card--disabled {
  opacity: 0.82;
}

.master-project-card--dragging {
  opacity: 0.6;
  cursor: grabbing;
}

.master-project-card--drag-over {
  outline: 2px solid rgba(242, 27, 35, 0.6);
  outline-offset: 3px;
}

.master-project-card--disabled .master-project-card-cta {
  display: none;
}

/* Staggered entrance animation */
.master-project-card--animate {
  animation: masterCardEnter 0.5s ease-out backwards;
}

@keyframes masterCardEnter {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.master-project-card--available.master-project-card--animate:hover {
  transform: translateY(-4px);
}

.master-project-card-icon-wrap {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-md, 0.75rem);
  background: linear-gradient(135deg, #f21b23 0%, #d91820 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--spacing-md, 1rem);
  transition: transform var(--transition-fast, 0.2s ease);
}

/* White background when showing the logo image */
.master-project-card-icon-wrap:has(.master-project-icon--img) {
  background: #ffffff;
}

.master-project-card--available:hover .master-project-card-icon-wrap {
  transform: scale(1.05);
}

.master-project-card--disabled .master-project-card-icon-wrap {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.15), rgba(255, 255, 255, 0.08));
}

.master-project-icon {
  width: 28px;
  height: 28px;
  color: #c6c6c6;
}

.master-project-icon--img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.master-project-card-icon-wrap .master-project-icon--img {
  width: 50px;
  height: 50px;
}

.master-project-card-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.98);
  margin: 0 0 var(--spacing-sm, 0.75rem) 0;
  letter-spacing: -0.02em;
}

.master-project-card-desc {
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.75);
  margin: 0 0 var(--spacing-md, 1rem) 0;
  line-height: 1.55;
  min-height: 2.6em;
}

.master-project-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--spacing-sm, 0.75rem);
}

.master-project-card-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.3rem 0.65rem;
  border-radius: 9999px;
}

.master-project-card-badge--available {
  background: rgba(242, 27, 35, 0.3);
  color: #fca5a5;
}

.master-project-card-badge--progress {
  background: rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.7);
}

.master-project-card-badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  animation: masterPulse 1.5s ease-in-out infinite;
}

@keyframes masterPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

.master-project-card-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.8125rem;
  font-weight: 600;
  color: #f87171;
  transition: gap var(--transition-fast, 0.2s ease);
}

.master-project-card--available:hover .master-project-card-cta {
  gap: 0.45rem;
}

.master-project-card-cta svg {
  width: 18px;
  height: 18px;
}

/* ----- Footer ----- */
.master-dashboard-footer {
  margin-top: auto;
  padding-top: var(--spacing-2xl, 3rem);
}

.master-dashboard-footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: var(--spacing-xl, 2rem) var(--spacing-xl, 2rem);
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  text-align: center;
}

.master-dashboard-footer-text {
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.65);
  margin: 0 0 var(--spacing-xs, 0.5rem) 0;
}

.master-dashboard-footer-copy {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.5);
  margin: 0;
}

/* ----- Logout modal (custom popup) ----- */
.master-logout-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.4);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 200;
}

.master-logout-modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: min(420px, 92vw);
  background: #ffffff;
  border-radius: 1rem;
  box-shadow:
    0 20px 45px rgba(15, 23, 42, 0.25),
    0 0 0 1px rgba(148, 163, 184, 0.2);
  padding: 1.5rem 1.75rem 1.25rem;
}

.master-logout-modal-title {
  margin: 0 0 0.5rem 0;
  font-size: 1.125rem;
  font-weight: 700;
  color: #1f2933;
}

.master-logout-modal-text {
  margin: 0 0 1.25rem 0;
  font-size: 0.9375rem;
  color: #4b5563;
  line-height: 1.6;
}

.master-logout-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
}

.master-logout-modal-btn {
  min-width: 100px;
  padding: 0.5rem 0.9rem;
  border-radius: 9999px;
  font-size: 0.875rem;
  font-weight: 600;
  border: 1px solid transparent;
  cursor: pointer;
  transition:
    background 0.15s ease,
    color 0.15s ease,
    border-color 0.15s ease,
    box-shadow 0.15s ease,
    transform 0.05s ease-in-out;
}

.master-logout-modal-btn--secondary {
  background: #ffffff;
  color: #4b5563;
  border-color: rgba(148, 163, 184, 0.5);
}

.master-logout-modal-btn--secondary:hover:not(:disabled) {
  background: #f9fafb;
  border-color: rgba(148, 163, 184, 0.9);
}

.master-logout-modal-btn--primary {
  background: linear-gradient(135deg, #f21b23 0%, #d91820 100%);
  color: #ffffff;
  border-color: rgba(248, 113, 113, 0.6);
  box-shadow: 0 2px 8px rgba(248, 113, 113, 0.45);
}

.master-logout-modal-btn--primary:hover:not(:disabled) {
  background: linear-gradient(135deg, #d91820 0%, #c2151d 100%);
  box-shadow: 0 4px 14px rgba(248, 113, 113, 0.55);
}

.master-logout-modal-btn:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  box-shadow: none;
}

.master-logout-modal-btn:active:not(:disabled) {
  transform: translateY(1px);
}

/* ----- Mobile & tablet responsive ----- */
/* Hero tip: stack on small screens */
@media (max-width: 560px) {
  .master-dashboard-hero-tip {
    flex-direction: column;
    align-items: center;
    text-align: center;
    margin-top: var(--spacing-lg, 1.5rem);
    padding: 0.75rem 1rem;
    max-width: 100%;
  }

  .master-dashboard-hero-badge {
    font-size: 0.6875rem;
    padding: 0.3rem 0.7rem;
  }
}

@media (max-width: 1024px) {
  .master-dashboard-topbar-filters {
    gap: 0.35rem 0.75rem;
    padding: 0 0.5rem;
  }

  .master-dashboard-filter-label {
    font-size: 0.6875rem;
  }

  .master-dashboard-filter-select {
    min-width: 100px;
    max-width: 140px;
    height: 32px;
    font-size: 0.75rem;
  }
}

@media (max-width: 768px) {
  .master-dashboard {
    padding-bottom: var(--spacing-xl, 2rem);
    overflow-x: hidden;
  }

  .master-dashboard-topbar-inner {
    padding: 0 1rem;
    min-height: 56px;
    gap: 0.75rem;
    flex-wrap: wrap;
  }

  .master-dashboard-topbar-filters {
    order: 3;
    width: 100%;
    padding: 0.5rem 0 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin-top: -0.25rem;
  }

  .master-dashboard-topbar-left,
  .master-dashboard-topbar-actions {
    width: 160px;
    min-width: 160px;
  }

  .master-dashboard-menu-btn {
    width: 40px;
    height: 40px;
  }

  .master-dashboard-menu-btn svg {
    width: 20px;
    height: 20px;
  }

  .master-dashboard-brand-text {
    font-size: 1rem;
    max-width: 180px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .master-dashboard-logo {
    width: 36px;
    height: 36px;
  }

  .master-dashboard-logo svg {
    width: 18px;
    height: 18px;
  }

  .master-dashboard-footer-inner {
    padding: var(--spacing-lg, 1.5rem) var(--spacing-md, 1rem);
  }

  .master-dashboard-footer-text,
  .master-dashboard-footer-copy {
    font-size: 0.8125rem;
  }
}

@media (max-width: 480px) {
  .master-dashboard-topbar-inner {
    padding: 0 0.75rem;
    min-height: 52px;
    gap: 0.5rem;
  }

  .master-dashboard-topbar-left,
  .master-dashboard-topbar-actions {
    width: 90px;
    min-width: 90px;
  }

  .master-dashboard-menu-btn {
    width: 36px;
    height: 36px;
    border-radius: 10px;
  }

  .master-dashboard-brand {
    gap: 0.5rem;
  }

  .master-dashboard-brand-text {
    font-size: 0.9375rem;
    max-width: 140px;
  }

  .master-dashboard-logo {
    width: 32px;
    height: 32px;
  }

  .master-dashboard-user-pill {
    padding: 0.25rem;
  }

  .master-dashboard-user-name {
    display: none;
  }

  .master-dashboard-logout-btn span {
    display: none;
  }

  .master-dashboard-logout-btn {
    padding: 0.5rem;
    min-width: 40px;
  }

  .master-dashboard-sidebar {
    width: min(300px, 92vw);
    max-width: 300px;
  }

  .master-dashboard-footer-inner {
    padding: 1rem 0.75rem;
  }

  .master-dashboard-footer-text {
    font-size: 0.75rem;
  }

  .master-dashboard-footer-copy {
    font-size: 0.6875rem;
  }
}
