:root {
  --color-bg: #fafbff;
  --color-text: #1b1b1e;
  --color-table-bg: #fff;
  --color-table-alt: #f4f6fc;
  --color-footer: #888;
  --color-header-shadow: 0 2px 8px rgba(0,0,0,0.05);
  --color-footer-shadow: 0 -2px 8px rgba(0,0,0,0.05);
  --color-border: #e0e0e0;
  --color-link: #1b1b1e;
  --color-link-hover: #1b1b1e;
  --color-tooltip-bg: #fff;
  --color-tooltip-arrow: #fff;
  --color-badge-red-bg: #f9d6d5;
  --color-badge-red-text: #b23b3b;
  --color-badge-amber-bg: #fff3c4;
  --color-badge-amber-text: #b28a00;
  --color-badge-green-bg: #d2f5d6;
  --color-badge-green-text: #2d7a3e;
  --font-main: Arial, sans-serif;
  --font-size-base: 16px;
  --font-size-table: 14px;
  --font-size-footer: 0.9rem;
  --font-size-badge: 1em;
  --font-size-tooltip: 14px;
  --radius: 8px;
  --radius-badge: 10px;
  --shadow: 0 2px 8px rgba(0,0,0,0.05);
  --shadow-tooltip: 0 2px 8px rgba(0,0,0,0.15);
  --padding-table: 12px 16px;
  --padding-header: 20px 16px;
  --padding-tooltip: 12px 13px;
  --padding-badge: 6px 18px;
  --gap-key: 24px;
  --profile-pic-size: 48px;
  --profile-dropdown-bg: #fff;
  --profile-dropdown-border: 1px solid #e0e0e0;
  --profile-dropdown-radius: 8px;
  --profile-dropdown-shadow: 0 2px 8px rgba(0,0,0,0.08);
  --profile-dropdown-min-width: 110px;
  --profile-name-color: #1b1b1e;
}

/* === Layout & Page === */
html, body, * {
    box-sizing: border-box;
    font-family: 'Nunito', sans-serif;
    font-optical-sizing: auto;
}
body {
  font-family: var(--font-main);
  background: var(--color-bg);
  color: var(--color-text);
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
/* Header styling */
.header {
    background: #202022;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.5rem 1rem;
    margin-bottom: 1rem;
}
.header-container {
    max-width: 1500px;
    margin: 0 auto;
    width: 100%;
}
.header-nav {
  display: flex;
  gap: 1.5rem;
  align-items: center;
}
.header-nav li {
  list-style: none;
}
.header-nav a {
  color: #fff;
  text-decoration: none;
}
.header-nav a:hover {
  text-decoration: underline;
}
.app-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}
.app-logo svg {
    width: 160px;
}
.app-logo__image {
  width: 100%;
  height: auto;
}
.company-logo {
    border-radius: 8px;
}
.company-name {
    /* font-size: 1.35rem; */
    font-weight: 600;
    color: #fff;
    letter-spacing: 0.01em;
}
/* .app-logo, .header-nav, .pipeline-toggle, .filters-section {
    flex: 0 0 50%;
}
@media (max-width: 1300px) {
} */

pre {
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
  padding: 1.5rem;
  margin: 0;
  overflow-x: auto;
  font-family: monospace;
}
.main {
    padding-left: 1rem;
    padding-right: 1rem;
}
.section {
  max-width: 1500px;
  margin: 0 auto 1rem;
  padding: 1rem;
  width: 100%;
}
.space-between {
    display: flex;
    justify-content: space-between;
}
.dashboard-content {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    box-shadow: var(--shadow);
    overflow: clip;
    padding: 0;
    margin: 0 auto;
}
.feed-content {
  margin: 1rem 0 0;
}
h1 {
  text-align: center;
}
.page-footer {
  width: 100%;
  text-align: center;
  padding: 0 0 2rem;
  color: var(--color-text);
  font-size: var(--font-size-footer);
}

/* === Table Layout === */
table {
  width: 100%;
  border-collapse: collapse;
  background: var(--color-table-bg);
  box-shadow: var(--shadow);
}
th, td {
  padding: var(--padding-table);
  text-align: left;
}
thead tr {
  position: sticky;
  top: 0;
  background: var(--color-table-bg);
  z-index: 2;
  box-shadow: var(--color-header-shadow);
}
tr:hover td {
    background-color: #e5e9f7;
}
thead th {
  padding: 20px 16px; /* match footer cell padding */
}
thead {
  border-bottom: 1px solid var(--color-border);
}
tfoot tr {
  position: sticky;
  bottom: 0;
  background: var(--color-table-bg);
  z-index: 2;
  box-shadow: var(--color-footer-shadow);
}
tfoot td {
  padding: 20px 16px;
}
tfoot {
  border-top: 1px solid var(--color-border);
}
tfoot td {
  text-align: left;
}
tr:last-child td {
  border-bottom: none;
}
tr, td {
  border-bottom: none !important;
}

/* === Table Row Backgrounds === */
.client-bg-white td {
  background: var(--color-table-bg);
}
.client-bg-alt td {
  background: var(--color-table-alt);
}

/* === Sortable Headers === */
th[style*="cursor:pointer"] {
  user-select: none;
}
th span {
  font-size: 0.9em;
  margin-left: 4px;
}

/* === Likelihood Badge === */
.likelihood-badge {
  display: inline-block;
  min-width: 60px;
  padding: var(--padding-badge);
  border-radius: var(--radius-badge);
  font-weight: bold;
  font-size: var(--font-size-badge);
  text-align: center;
  background: #eee;
  color: #222;
  margin: 2px 0;
}
.badge-red {
  background: var(--color-badge-red-bg);
  color: var(--color-badge-red-text);
}
.badge-amber {
  background: var(--color-badge-amber-bg);
  color: var(--color-badge-amber-text);
}
.badge-green {
  background: var(--color-badge-green-bg);
  color: var(--color-badge-green-text);
}
#likelihood-key {
  font-style: italic;
  margin-top: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--gap-key);
}
#likelihood-key span {
  display: flex;
  align-items: center;
  gap: 8px;
}
#likelihood-key .likelihood-badge {
  min-width: 32px;
  padding: var(--padding-badge);
  font-size: 0.95em;
}

/* === Deal Title & Tooltip === */
.project-title-cell {
  position: relative;
  cursor: pointer;
}
.project-title-cell a {
  color: var(--color-link);
  text-decoration: none;
  font-weight: 500;
}
.project-title-cell a:hover {
  text-decoration: underline;
}
.project-title-cell .custom-tooltip {
  display: block;
  position: absolute;
  left: 100%;
  top: 50%;
  transform: translateY(-50%);
  background: var(--color-tooltip-bg);
  /* color: #fff; */
  padding: var(--padding-tooltip);
  border-radius: var(--radius);
  font-size: var(--font-size-tooltip);
  white-space: normal;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s;
  z-index: 10;
  margin-left: 12px;
  min-width: 220px;
  max-width: 320px;
  box-shadow: var(--shadow-tooltip);
  text-align: left;
}
.project-title-cell:hover .custom-tooltip {
  opacity: 1;
  pointer-events: auto;
}
.project-title-cell:hover .custom-tooltip::after {
  content: '';
  position: absolute;
  top: 50%;
  left: -14px;
  transform: translateY(-50%);
  border-width: 8px;
  border-style: solid;
  border-color: transparent var(--color-tooltip-arrow) transparent transparent;
}
.custom-tooltip p {
  margin: 0 0 6px 0;
  font-size: var(--font-size-tooltip);
}
.custom-tooltip p span {
    font-weight: 600;
}
.custom-tooltip p:last-child {
  margin-bottom: 0;
  font-size: 13px;
  font-style: italic;
  /* font-weight: 600; */
}

/* === Pipeline Toggle === */
.accordion {
    width: 100%;
    text-align: left;
    padding: 1rem;
    font-size: 1.1rem;
    font-weight: bold;
    background: var(--color-table-alt, #f4f6fc);
    border: 1px solid var(--color-border, #e0e0e0);
    border-bottom: none;
    border-radius: 6px 6px 0 0;
    cursor: pointer;
    margin-bottom: 0;
    transition: background 0.15s, border-radius 0.15s, border-bottom 0.15s;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5em;
  }
  .accordion[aria-expanded="true"] {
    background: var(--color-table-bg, #fff);
    border-bottom: none;
    border-radius: 6px 6px 0 0;
  }
  .accordion[aria-expanded="false"] {
    border-bottom: 1px solid var(--color-border, #e0e0e0);
    border-radius: 6px;
  }
  .accordion-arrow {
    font-size: 1.1em;
    margin-left: 0.5em;
    transition: transform 0.2s;
    display: inline-block;
  }
  .accordion-panel {
    display: block;
    transition: display 0.2s;
    border: 1px solid var(--color-border, #e0e0e0);
    border-top: none;
    border-radius: 0 0 6px 6px;
    margin-top: 0;
    background: var(--color-table-bg, #fff);
    padding-bottom: 1rem;
  }

  /* === Pipeline Toggle === */
  #profile-pic-btn {
    background: transparent;
    border: none;
    border-radius: 36px;
    box-shadow: var(--shadow);
    padding: 0;
    cursor: pointer;
    display: flex;
    align-items: center;
  }

#profile-dropdown {
    display: none;
    position: absolute;
    right: 0;
    top: 69px;
    background: var(--profile-dropdown-bg);
    border: var(--profile-dropdown-border);
    border-radius: var(--profile-dropdown-radius);
    box-shadow: var(--profile-dropdown-shadow);
    min-width: var(--profile-dropdown-min-width);
    z-index: 100;
  }
  #profile-dropdown a {
    display: block;
    padding: 10px 16px;
    color: var(--color-link);
    text-decoration: none;
  }
  #profile-dropdown a:hover {
    /* background: #f4f6fc; */
  }

.profile-dropdown::before {
  content: '';
  position: absolute;
  top: -10px;
  right: 34px;
  border-width: 0 9px 9px 9px;
  border-style: solid;
  border-color: transparent transparent var(--color-border) transparent;
  width: 0;
  height: 0;
  z-index: 100;
}

.profile-dropdown::after {
  content: '';
  position: absolute;
  top: -8px;
  right: 35px;
  border-width: 0 8px 8px 8px;
  border-style: solid;
  border-color: transparent transparent var(--profile-dropdown-bg) transparent;
  filter: drop-shadow(0 -2px 2px rgba(0,0,0,0.08));
  width: 0;
  height: 0;
  z-index: 101;
}

/* === Navigation & Profile === */
#profile-pic-li {
    display: none;
    position: relative;
}
#profile-pic {
    width: var(--profile-pic-size);
    height: var(--profile-pic-size);
    border-radius: 50%;
    object-fit: cover;
    vertical-align: middle;
}
#profile-name {
    margin-left: 10px;
    font-weight: 500;
    color: #fff;
}
#logout-link {
    /* Add any necessary styles for the logout link */
}

#google-signin-container {
    max-width: 500px;
    margin: 100px auto !important;
    border: 1px solid #e0e0e0;
    padding: 54px;
    border-radius: 8px;
    background: #fff;
    box-shadow: var(--shadow);
}

/* Tooltip for footer totals (bottom chevron) */
.footer-tooltip-trigger {
  display: inline-block;
  position: relative;
  cursor: pointer;
  width: auto;
  text-align: center;
}
.custom-tooltip.custom-tooltip-bottom {
  display: none;
  position: absolute;
  left: 50%;
  bottom: 160%;
  transform: translateX(-50%);
  background: var(--profile-dropdown-bg);
  color: var(--color-text);
  padding: var(--padding-tooltip);
  border-radius: var(--profile-dropdown-radius);
  box-shadow: var(--profile-dropdown-shadow);
  font-size: var(--font-size-tooltip);
  z-index: 10;
  min-width: 220px;
  text-align: left;
  border: var(--profile-dropdown-border);
}
.custom-tooltip.custom-tooltip-bottom::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%) rotate(180deg);
  border-width: 6px;
  border-style: solid;
  border-color: transparent transparent #fff transparent;
  z-index: 2;
}
.custom-tooltip.custom-tooltip-bottom::before {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%) rotate(180deg);
  border-width: 7px;
  border-style: solid;
  border-color: transparent transparent #e0e0e0 transparent;
  z-index: 1;
  margin-top: 1px;
}
#dashboard-footer-project-value,
#dashboard-footer-likelihood-value {
  position: relative;
  /* text-align: center; */
}

tfoot tr:hover td {
  background-color: inherit !important;
}

.assignee-name {
  /* No animation or transition needed */
}

.close-date-circle {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin-right: 6px;
    vertical-align: middle;
}
.close-date-circle--red {
    background: #e56767;
}
.close-date-circle--grey {
    background: #77d48a;
}

/* Filters Row */
.filters {
    padding: 0.5rem 0;
}
.filters-row {
    /* margin: 1rem 0; */
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

/* Priority Toggle Switch */
.filters-section {
    display: inline-block;
}

.priority-toggle {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: 14px;
    color: #495057;
    user-select: none;
}

.priority-toggle input[type="checkbox"] {
    opacity: 0;
    width: 0;
    height: 0;
    position: absolute;
    left: -9999px;
    margin: 0;
    padding: 0;
    border: 0;
    outline: none;
}

.toggle-slider {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
    background-color: #ccc;
    border-radius: 12px;
    transition: 0.3s;
    margin-right: 8px;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    border-radius: 50%;
    transition: 0.3s;
}

.priority-toggle input:checked + .toggle-slider {
    background-color: #6962f2;
}

.priority-toggle input:checked + .toggle-slider:before {
    transform: translateX(20px);
}

.priority-toggle input:disabled + .toggle-slider {
    background-color: #e9ecef;
    cursor: not-allowed;
}

.priority-toggle input:disabled + .toggle-slider:before {
    background-color: #adb5bd;
}

.priority-toggle input:disabled ~ .toggle-label {
    color: #adb5bd;
    cursor: not-allowed;
}

.toggle-label {
    font-weight: 500;
}

.priority-toggle:hover .toggle-slider {
    background: #aaa;
    border-color: #aaa;
    box-shadow: none;
}

/* Pipeline toggle as radio buttons */
.pipeline-toggle {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}
.pipeline-toggle button {
    background: none;
    border: none;
    outline: none;
    box-shadow: none;
    padding: 0;
    margin: 0;
    font-size: 14px;
    color: #222;
    display: inline-flex;
    align-items: center;
    cursor: pointer;
    position: relative;
    transition: color 0.2s;
    gap: 0.5rem;
}
.pipeline-toggle button::before {
    content: '';
    display: inline-block;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 3px solid #ccc;
    background: #f7f8fa;
    box-sizing: border-box;
    transition: border-color 0.2s, background 0.2s;
}
.pipeline-toggle button.active::before {
    border-color: #6c63ff;
    background: radial-gradient(circle at center, #6c63ff 60%, #f7f8fa 61%);
}
.pipeline-toggle button.active {
    color: #222;
}
.pipeline-toggle button:not(.active):hover::before {
    border-color: #aaa;
}

.footer-tooltip-trigger .likelihood-badge {
    display: inline-block;
    min-width: 90px;
    text-align: center;
}