/* variable colours */
:root {
    --primary: #007bff;
    --secondary: #6c757d;
    --success: #28a745;
    --info: #17a2b8;
    --warning: #ffc107;
    --danger: #dc3545;
    --light: #f8f9fa;
    --dark: #343a40;
    --rounded-corner: 15px;
    --accent-bg: #f8f9fa;
    --accent: #dc3545;
    --bg: #f8f9fa;
    --text: #343a40;
    --surface: #f2f2f2;
    --surface2: #d8d8d8;
}

body {
    display: grid;
    grid-template-columns: 280px max(65rem, 80%) 1fr;
    overflow: auto;
    font-size: 1rem;
    height: 100vh;
}

.project-new-page {
    grid-column: 1 / 3;
    grid-row: 2;
    width: 100%;
    padding-bottom: 40px;
}

.map-container {
    grid-column: 2;
    position: relative;
    display: grid;
    grid-template-rows: 100px 70vh 1fr;

}

.grid-container {
    /*grid-column: 2;*/
    left: 20px;
    grid-row: 2;
    position: relative;
    display: grid;
    grid-template-columns: repeat(10, 1fr);
    grid-template-rows: repeat(5, 1fr);
    /*aspect-ratio: 2/1;*/
    margin: 0 auto;
    /*height: 75vh;*/
    width: 100%;
    /*width: auto;*/
}

/* FAQ page styling */
.faq-container {
    margin: 20px 0;
}

.faq-item {
    background-color: var(--light);
    border: 1px solid #ddd;
    border-radius: var(--rounded-corner);
    margin-bottom: 15px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: box-shadow 0.3s ease;
    width: 100%;
}

.faq-item:hover {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.faq-question {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    cursor: pointer;
    background-color: var(--light);
    border: none;
    font-weight: 500;
    color: var(--dark);
    list-style: none;
    transition: background-color 0.3s ease;
}

.faq-question:hover {
    background-color: var(--accent-bg);
}

.faq-question::-webkit-details-marker {
    display: none;
}

.faq-question::before {
    content: '▶';
    display: inline-block;
    margin-right: 12px;
    font-size: 0.8em;
    color: var(--danger);
    transition: transform 0.3s ease;
}

details[open] .faq-question::before {
    transform: rotate(90deg);
}

.faq-ref {
    font-weight: bold;
    color: var(--danger);
    margin-right: 15px;
    min-width: 30px;
    text-align: center;
}

.faq-question-text {
    flex: 1;
}

.faq-answer {
    padding: 15px 20px 20px 77px;
    color: var(--text);
    line-height: 1.6;
    background-color: var(--light);
    border-top: 1px solid #e9ecef;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.container h1 {
    color: var(--dark);
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 3px solid var(--danger);
}

.container h2 {
    color: var(--dark);
    margin-top: 40px;
    margin-bottom: 20px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--secondary);
}

@media screen and (max-width: 768px) {
    .faq-item {
        font-size: 0.9rem;
    }

    .faq-question {
        padding: 12px 15px;
    }

    .faq-answer {
        padding: 12px 15px 15px 60px;
    }

    .faq-ref {
        margin-right: 10px;
        min-width: 25px;
    }
}

.top-spacing {
    grid-row: 1;
    height: 100px;
}

.world-map {
    position: relative;
    z-index: 0;
    grid-column: 1/-1;
    grid-row: 1/-1;
    width: 100%;
    height: 100%;
}


@media screen and (max-width: 1200px) {
    body {
        font-size: 0.8rem;
    }

    .summary-text-float {
        width: 120px;
    }
}

@media screen and (max-height: 800px) {
    body {
        font-size: 0.8rem;
    }
}

.city-dot {
    width: 500px;
}

.coordinates {
    text-align: center;
}

/* Control Panel Container */
.control-panel {
    position: fixed;
    left: 10px;
    top: 70px;
    width: 280px;
    max-height: calc(100vh - 80px);
    z-index: 900;
    display: flex;
    flex-direction: column;
}

/* Fixed header section (breadcrumb) */
.control-panel-fixed {
    flex-shrink: 0;
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Scrollable content section */
.control-panel-scrollable {
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 20px;
    flex: 1;
    min-height: 0;
}

/* Control Panel Sections */
.control-section {
    background-color: var(--surface);
    border: 1px solid var(--secondary);
    border-radius: 10px;
    padding: 15px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.control-section-header {
    font-weight: 600;
    font-size: 1.1rem;
    margin-bottom: 10px;
    color: var(--dark);
    border-bottom: 2px solid var(--accent);
    padding-bottom: 5px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.control-section-content {
    font-size: 0.9rem;
}

.control-section-content th {
    background-color: var(--surface);
    border-top: 0px dotted var(--secondary);
    border-bottom: 0px dotted var(--secondary);
    border-left: 0px dotted var(--secondary);
    border-right: 1px solid var(--secondary);
    border-radius: 5px;
}

.control-section-content td:last-child,.control-section-content th:last-child {
  border-right: none;
}

.control-section-content tr:first-child th, .control-section-content tr:last-child th {
  border-top: 1px solid var(--secondary);
  border-bottom: 1px solid var(--secondary);
}

.exchange-rate {
    font-size: 0.9rem;
    min-width: 50px;
}

/* Breadcrumb Section */
.control-breadcrumb {
    position: relative;
    left: 0;
}

.control-breadcrumb h1 {
    font-size: 1.3rem;
    margin: 0 0 10px 0;
}

/* Validation Errors Section */
.control-errors {
    background-color: #fee;
    border-color: var(--danger);
}

.control-errors h2 {
    font-size: 1rem;
    margin: 0 0 10px 0;
    color: var(--danger);
}

.control-errors ul {
    margin: 0;
    padding-left: 20px;
}

/* Team Configuration Section */
.control-team table {
    width: 100%;
    border-collapse: collapse;
}

.control-team th,
.control-team td {
    padding: 5px;
    text-align: center;
}

/* Exchange Rates Section */
.control-exchange-rates p {
    margin: 5px 0;
    padding: 5px 0;
    border-bottom: 1px solid #ddd;
}

.control-exchange-rates p:last-child {
    border-bottom: none;
}

/* Summary Section */
.control-summary {
    position: relative;
}

.control-summary .summary-text-float {
    position: absolute;
    left: 0;
    top: 25px;
    background-color: var(--light);
    border: 1px solid grey;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    width: 190px;
    font-family: Arial, sans-serif;
    padding: 10px;
    display: none;
}

.summary-info-button {
    position: absolute;
    right: 0;
    margin-left: 3px;
    color: lightcoral;
    top: 0.5px;
    font-size: 13px;
}

.control-summary p {
    margin: 5px 0;
    padding: 5px 0;
    border-bottom: 1px solid #ddd;
}

.control-summary p:last-child {
    border-bottom: none;
}

/* Actions Section */
.control-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.control-actions .btn {
    width: 100%;
    text-align: center;
    padding: 10px;
    background-color: var(--primary);
    color: white;
    text-decoration: none;
    border-radius: 5px;
    border: none;
    cursor: pointer;
    font-size: 0.9rem;
}

.control-actions .btn:hover {
    background-color: #0056b3;
}

.currency-selector label {
    white-space: nowrap;
}

.currency-select-wrapper {
    display: flex;
    flex-direction: row;
    gap: 15px;
    align-items: center;
}

.currency-select-wrapper select {
    margin-bottom: 0px ;
}

.control-actions select {
    width: 100%;
    padding: 8px;
    border: 1px solid var(--secondary);
    border-radius: 5px;
    font-size: 0.9rem;
}

.control-actions label {
    font-weight: 500;
    margin-bottom: 5px;
    display: block;
}

.financial-year-selector {
    margin-top: 10px;
}

.financial-year-controls {
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.financial-year-select {
    margin-top: 0.5rem;
}

.year-step{

}

/* Legacy team-pane for backward compatibility */
.team-pane {
    /* Removed absolute positioning - now in control panel */
}

.grade-table {
}

.collapsible-wrapper {
    position: relative;
}

.edit-area {
    display: flex;
    align-items: center;
    flex-direction: column;
}

.office-line {
    stroke: lightcoral;
    stroke-width: 2;
}

.user-office-line {
    stroke: lightcoral;
    stroke-width: 2;
}

.office-circle {
    position: relative;
    z-index: 10;
}

.office-container {
    position: relative;
}

.office-rect {
    position: relative;
    border: 1px solid var(--secondary);
    border-radius: 5px;
    background-color: var(--surface);
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    width: 95%;
    height: 95%;
}

.office-rect > div {
    border-bottom: 1px solid grey;
    flex: none;
    /* Prevent flex-grow and flex-shrink */
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
}

.office-rect > div:last-child {
    border-bottom: none;
}

.office-rect > div:first-child {
    height: auto;
    /* Ensure the first child (office-name) is not constrained by parent */
}

.office-name {
    font-weight: bold;
    background-color: lightcoral;
    border-top-left-radius: 3px;
    border-top-right-radius: 3px;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    width: 100%;
    box-sizing: border-box;
    padding: 3px 0 3px 0;
}

.office-weight {
    z-index: 10;
}

.user-office-container {
    position: relative;
}

.user-office-rect {
    position: relative;
    border: 1px solid var(--secondary);
    border-radius: 5px;
    background-color: var(--surface);
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    width: 95%;
    height: 95%;
}

.user-office-rect > div {
    border-bottom: 1px solid grey;
    flex: none;
    /* Prevent flex-grow and flex-shrink */
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
}

.user-office-rect > div:last-child {
    border-bottom: none;
}

.user-office-rect > div:first-child {
    height: auto;
    /* Ensure the first child (office-name) is not constrained by parent */
}

.user-office-name {
    font-weight: bold;
    background-color: lightcoral;
    border-top-left-radius: 3px;
    border-top-right-radius: 3px;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    width: 100%;
    box-sizing: border-box;
    padding: 3px 0 3px 0;
}

.user-office-weight {
    z-index: 10;
}

input[type="number"], input[type="text"] {
    text-align: center;
    margin-bottom: 0px;
    background-color: var(--light) !important;
    border: 1px dashed var(--secondary) !important;
    margin-bottom: 0px !important;
}

/* Remove spinner arrows — Chrome, Edge, Safari */
input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* Remove spinner arrows — Firefox */
input[type="number"] {
    -moz-appearance: textfield;
}


button {
    margin-bottom: 0px !important;
}

.weight-input {
    width: 3vw;
    height: 2.5vh;
}

/* Hide number input spinners/arrows */
.weight-input::-webkit-outer-spin-button,
.weight-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.weight-input[type=number] {
    -moz-appearance: textfield;
}

.grades-costs-float {
    position: absolute;
    background-color: white;
    border: 2px solid lightcoral;
    padding: 15px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    width: 250px;
    border-radius: 10px;
    font-family: Arial, sans-serif;
}

.grades-costs-float h5 {
    margin-top: 0;
    margin-bottom: 10px;
    font-size: 1.2em;
}

.grades-costs-float div {
    font-size: 0.9em;
    line-height: 1.5;
    margin-bottom: 5px;
}

.info-button {
    background: none;
    border: none;
    cursor: pointer;
    position: absolute;
    top: 0;
    margin-top: 3px;
    padding: 2px 5px;
}

.total-costs {
    text-align: center;
}

.total-costs-container {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    box-sizing: border-box;
}

.costs-and-weight-row {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 5px 0;
}

.total-costs > div {
    border-bottom: 1px solid grey;
    padding: 5px 0;
    text-align: center;
}

.total-costs > div:last-child {
    border-bottom: none;
}

.summary-text-float {
    position: absolute;
    left: 110%;
    background-color: var(--light);
    border: 1px solid grey;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    width: 190px;
    font-family: Arial, sans-serif;
    padding: 3px;
}

.container {
    padding-top: 60px;
    grid-column: 2;
    display: flex;
    /*justify-content: space-between;*/
    flex-direction: column;
    justify-content: flex-start;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
}

.fields-area {
    flex: 1;
    padding: 20px;
}

.city-dot {
    flex: 2;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    left: 100px;
    position: relative;
}


@media (min-width: 768px) {
    .container {
        flex-direction: column;
    }
}

/* Initial state for the inflation office tile collapsible content */
.inflation-collapsible-content {
    position: absolute;
    top: 0;
    left: 0;
    z-index: 2;
    max-height: 0;
    background-color: transparent;
    overflow: hidden;
    border-radius: 0;
    padding: 0;
    transition: max-height 0.3s ease-out;
    transition: background-color 0.3s ease-out;
}

/* Expanded state for the inflation office tile collapsible content */
.inflation-collapsible-content.expanded {
    max-height: 200px;
    max-width: 100px;
    /* Adjust based on the content's height */
    background-color: var(--light);
    border-radius: var(--rounded-corner);
    padding: 10px;
    border: 1px solid var(--dark);
}

.inflation-input {
    width: 100%;
    padding: 8px;
    border: 1px dashed var(--secondary);
    border-radius: 5px;
    margin-bottom: 10px;
}

.inflation-reset-button{

}


/* Initial state for the collapsible content */
.collapsible-content {
    position: absolute;
    top: 0;
    left: 0;
    z-index: 2;
    max-height: 0;
    background-color: transparent;
    overflow: hidden;
    border-radius: 0;
    padding: 0;
    transition: max-height 0.3s ease-out;
    transition: background-color 0.3s ease-out;
}

.collapsible-content label {
    display: block;
    font-weight: 500;
    margin-bottom: 5px;
    width: auto;
    text-align: left;
    white-space: nowrap;
}

.collapsible-content input[type="text"] {
    width: 100%;
    padding: 8px;
    border: 1px dashed var(--secondary);
    border-radius: 5px;
    margin-bottom: 10px;
}

.collapsible-content button {
    width: 100%;
    padding: 10px;
    background-color: var(--primary);
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

.collapsible-content button:hover {
    background-color: #0056b3;
}

.collapsible-content > div:last-child {
    margin-top: 10px;
}

#saveMetaDataButton {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
    border-radius: 999px;
    font-weight: 700;
    box-shadow: 0 10px 22px rgba(220, 53, 69, 0.2);
    transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

#saveMetaDataButton:hover {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
    transform: translateY(-1px);
    box-shadow: 0 14px 26px rgba(220, 53, 69, 0.24);
    filter: brightness(1.02);
}

/* Expanded state for the collapsible content */
.collapsible-content.expanded {
    max-height: 500px;
    /* Adjust based on the content's height */
    background-color: var(--light);
    border-radius: var(--rounded-corner);
    padding: 20px;
    border: 1px solid var(--dark);
}

.project-navigation {
    position: fixed;
    align-content: end;
    bottom: 20px;
    right: 20px;
}

.button-appearance {
    padding: 10px;
    background: var(--accent);
    border: 1px solid var(--accent);
    color: white;
    border-radius: 4px;
}
.button-appearance,
.button-appearance:visited,
.button-appearance:hover,
.button-appearance:active {
    color: white;
    text-decoration: none;
}


.update-button {
    /* position: fixed; */
    align-content: end;
    padding-top: 20px;
    right: 10px;
    z-index: 3;
}

.breadcrumb {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
    left: 0;
}

.projects-title-wrapper {
    display: flex;
    align-items: center;
}

.projects-title {
    position: relative;
}

button.new-project-button {
    margin-left: 30px;
    background-color: var(--accent);
    border-radius: 25px;
    width: 50px;
    height: 50px;
    color: white;
    cursor: pointer;
    display: flex;
    /* Changed to flex to center content */
    align-items: center;
    /* Center vertically */
    justify-content: center;
    /* Center horizontally */
}

i.large {
    font-size: 2rem;
    vertical-align: middle;
}

.btn {
    padding: 15px 20px;
    background-color: var(--accent);
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1.2rem;
}

.btn-tertiary {
    padding: 5px 10px;
    background-color: var(--secondary) !important;
    font-size: 0.9rem !important;
}

.btn-icon {
  width: 35px !important;
  height: 35px !important;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.btn-icon img {
  filter: invert(1);
  width: 18px;
  height: 18px;
}

.control-section-header .btn-tertiary {
    padding: 3px 8px;
    font-size: 0.85rem;
    margin-left: auto;
}

.btn:hover {
    background-color: var(--accent);
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    /* Responsive columns */
    /* grid-template-rows: repeat(3, 1fr); */
    grid-template-rows: auto;
    gap: 20px;
}

.card {
    border-radius: var(--rounded-corner);
    padding: 20px;
    border-width: 1px;
    outline: 2px solid grey;
    background-color: var(--secondary);
}

.team-button {
    background-color: transparent;
    border-width: 0;
    /*border-radius: 25px;*/
    /*width: 50px;*/
    /*height: 50px;*/
}

.team-button i {
    color: red;
}

team-button:hover {
    /*background-color: var(--primary);*/
}

button.team-button:disabled {
    background-color: #ccc;
    /* Change to any color you prefer */
    opacity: 0.2;
    /* Adjust opacity if you want a faded look */
}

.footer {
    text-align: center;
    margin-top: 20px;
    padding: 10px;
    bottom: 0;
    position: fixed;
    width: 100%;
}

.create-project {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    width: auto;
    right: 60px;
    height: 70vh;
    padding: 0;
    margin: 0;
}

.create-project .new-project-content {
    grid-column: 2;
    justify-self: center;
    position: relative;
    padding: 10px;
    padding-top: 30px;
    width: 300px;
    height: auto;
    max-height: none;
    overflow: visible;
    transition: none;
}

input[type="text"] {
    width: 100%;
}

label {
    font-weight: 500;
    margin-bottom: 5px;
    display: block;
    padding-right: 10px;
    text-align: right;
    width: 100px;
}

.form-fields {
    display: flex;
    padding: 20px
}

.update-button-container {
    grid-column: span 2;
    display: flex;
    justify-content: center;
}

.project-form-page-header {
    max-width: 760px;
    margin: 0 auto 8px;
}

.project-form-page-eyebrow {
    margin: 0 0 8px;
    color: var(--danger);
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.project-form-page-subtitle {
    margin: -8px 0 0;
    max-width: 720px;
    color: #5b6570;
    line-height: 1.6;
    font-size: 1rem;
}

#newProjectContent.project-form-card {
    width: min(100%, 560px);
    padding: 28px;
    border: 1px solid rgba(108, 117, 125, 0.25);
    border-radius: 20px;
    background: linear-gradient(180deg, #ffffff 0%, #f7f9fc 100%);
    box-shadow: 0 18px 40px rgba(52, 58, 64, 0.08);
}

#newProjectContent .project-form-header {
    margin-bottom: 24px;
}

#newProjectContent .project-form-eyebrow {
    margin: 0 0 8px;
    color: var(--danger);
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

#newProjectContent h2 {
    margin: 0;
    padding-bottom: 0;
    border-bottom: none;
    font-size: 1.6rem;
}

#newProjectContent .project-form-subtitle {
    margin: 10px 0 0;
    color: #5b6570;
    line-height: 1.5;
}

#newProjectContent .project-form-errors {
    margin-bottom: 22px;
    padding: 16px 18px;
    border: 1px solid rgba(220, 53, 69, 0.25);
    border-radius: 14px;
    background-color: #fff5f5;
    color: #8b1e2d;
}

#newProjectContent .project-form-errors h3 {
    margin: 0 0 8px;
    font-size: 1rem;
}

#newProjectContent .project-form-errors ul {
    margin: 0;
    padding-left: 20px;
}

#newProjectContent .project-form-field {
    display: grid;
    grid-template-columns: minmax(150px, 190px) minmax(0, 1fr);
    gap: 18px;
    align-items: start;
    padding: 18px 0;
    border-top: 1px solid rgba(108, 117, 125, 0.18);
}

#newProjectContent .project-form-field:first-of-type {
    border-top: none;
    padding-top: 0;
}

#newProjectContent .project-form-label-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

#newProjectContent .project-form-field label {
    width: auto;
    margin-bottom: 0;
    padding-right: 0;
    text-align: left;
    color: var(--dark);
}

#newProjectContent .project-form-hint {
    margin: 0;
    color: #6c757d;
    font-size: 0.92rem;
    line-height: 1.45;
}

#newProjectContent .project-input {
    width: 100%;
    min-height: 46px;
    padding: 0.8rem 0.95rem;
    border: 1px solid rgba(108, 117, 125, 0.35);
    border-radius: 12px;
    background-color: #ffffff;
    box-sizing: border-box;
    font-size: 1rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

#newProjectContent .project-input:focus {
    outline: none;
    border-color: rgba(0, 123, 255, 0.7);
    box-shadow: 0 0 0 4px rgba(0, 123, 255, 0.12);
}

.project-new-page .update-button-container {
    margin-top: 4px;
}

.project-new-page .update-button input[type="submit"] {
    min-width: 220px;
    padding: 0.95rem 1.6rem;
    border: none;
    border-radius: 999px;
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
    color: #ffffff;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 14px 30px rgba(220, 53, 69, 0.22);
    transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.project-new-page .update-button input[type="submit"]:hover {
    transform: translateY(-1px);
    box-shadow: 0 18px 36px rgba(220, 53, 69, 0.24);
    filter: brightness(1.02);
}

.project-new-page .update-button input[type="submit"]:focus {
    outline: none;
    box-shadow: 0 0 0 4px rgba(220, 53, 69, 0.16), 0 18px 36px rgba(220, 53, 69, 0.24);
}

.project-form-footer {
    display: flex;
    justify-content: center;
    margin-top: 24px;
}

.project-form-back-link {
    color: var(--secondary);
    font-weight: 600;
    text-decoration: none;
}

.project-form-back-link:hover {
    color: var(--danger);
    text-decoration: underline;
}

#newUserOfficeContent.user-office-form-card {
    width: min(100%, 560px);
    padding: 28px;
    border: 1px solid rgba(108, 117, 125, 0.25);
    border-radius: 20px;
    background: linear-gradient(180deg, #ffffff 0%, #f7f9fc 100%);
    box-shadow: 0 18px 40px rgba(52, 58, 64, 0.08);
}

#newUserOfficeContent .user-office-form-header,
.user-office-edit-page .user-office-form-header {
    margin-bottom: 24px;
}

#newUserOfficeContent .user-office-form-eyebrow,
.user-office-edit-page .user-office-form-eyebrow {
    margin: 0 0 8px;
    color: var(--danger);
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

#newUserOfficeContent h2,
.user-office-edit-page h2 {
    margin: 0;
    padding-bottom: 0;
    border-bottom: none;
    font-size: 1.6rem;
}

#newUserOfficeContent .user-office-form-subtitle,
.user-office-edit-page .user-office-form-subtitle {
    margin: 10px 0 0;
    color: #5b6570;
    line-height: 1.5;
}

#newUserOfficeContent .user-office-form-errors,
.user-office-edit-page .user-office-form-errors {
    margin-bottom: 22px;
    padding: 16px 18px;
    border: 1px solid rgba(220, 53, 69, 0.25);
    border-radius: 14px;
    background-color: #fff5f5;
    color: #8b1e2d;
}

#newUserOfficeContent .user-office-form-errors h3,
.user-office-edit-page .user-office-form-errors h3 {
    margin: 0 0 8px;
    font-size: 1rem;
}

#newUserOfficeContent .user-office-form-errors ul,
.user-office-edit-page .user-office-form-errors ul {
    margin: 0;
    padding-left: 20px;
}

#newUserOfficeContent .user-office-form-field,
.user-office-edit-page .user-office-form-field {
    display: grid;
    grid-template-columns: minmax(150px, 190px) minmax(0, 1fr);
    gap: 18px;
    align-items: start;
    padding: 18px 0;
    border-top: 1px solid rgba(108, 117, 125, 0.18);
}

#newUserOfficeContent .user-office-form-field:first-of-type,
.user-office-edit-page .user-office-form-field:first-of-type {
    border-top: none;
    padding-top: 0;
}

#newUserOfficeContent .user-office-form-label-group,
.user-office-edit-page .user-office-form-label-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

#newUserOfficeContent .user-office-form-field label,
.user-office-edit-page .user-office-form-field label {
    width: auto;
    margin-bottom: 0;
    padding-right: 0;
    text-align: left;
    color: var(--dark);
}

#newUserOfficeContent .user-office-form-hint,
.user-office-edit-page .user-office-form-hint {
    margin: 0;
    color: #6c757d;
    font-size: 0.92rem;
    line-height: 1.45;
}

#newUserOfficeContent .user-office-input,
.user-office-edit-page .user-office-input {
    width: 100%;
    min-height: 46px;
    padding: 0.8rem 0.95rem;
    border: 1px solid rgba(108, 117, 125, 0.35);
    border-radius: 12px;
    background-color: #ffffff;
    box-sizing: border-box;
    font-size: 1rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

#newUserOfficeContent .user-office-input:focus,
.user-office-edit-page .user-office-input:focus {
    outline: none;
    border-color: rgba(0, 123, 255, 0.7);
    box-shadow: 0 0 0 4px rgba(0, 123, 255, 0.12);
}

#newUserOfficeContent .user-office-rate-input,
.user-office-edit-page .user-office-rate-input {
    position: relative;
    width: 100%;
    max-width: 220px;
}

#newUserOfficeContent .user-office-rate-field,
.user-office-edit-page .user-office-rate-field {
    padding-right: 3rem;
    text-align: right;
}

#newUserOfficeContent .user-office-rate-suffix,
.user-office-edit-page .user-office-rate-suffix {
    position: absolute;
    top: 50%;
    right: 16px;
    transform: translateY(-50%);
    color: #6c757d;
    font-weight: 700;
    pointer-events: none;
}

.user-office-edit-page {
    grid-column: 1 / 3;
    grid-row: 2;
    width: 100%;
    padding-bottom: 40px;
}

.user-office-edit-container {
    gap: 28px;
    padding-top: 36px;
}

.user-office-edit-header {
    max-width: 760px;
}

.user-office-edit-header h1 {
    margin: 0;
    font-size: clamp(2rem, 3vw, 2.7rem);
}

.user-office-edit-description {
    margin: 12px 0 0;
    color: #5b6570;
    line-height: 1.6;
    font-size: 1rem;
}

.user-office-edit-form {
    width: 100%;
}

.user-office-edit-errors {
    max-width: 860px;
}

.user-office-edit-layout {
    display: grid;
    grid-template-columns: minmax(320px, 420px) minmax(0, 1fr);
    gap: 24px;
    align-items: start;
}

.user-office-edit-panel {
    padding: 28px;
    border: 1px solid rgba(108, 117, 125, 0.22);
    border-radius: 20px;
    background: linear-gradient(180deg, #ffffff 0%, #f7f9fc 100%);
    box-shadow: 0 18px 40px rgba(52, 58, 64, 0.08);
}

.user-office-edit-section-header {
    margin-bottom: 24px;
}

.user-office-grade-section {
    min-width: 0;
}

.user-office-grade-groups {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
}

.user-office-grade-card {
    border: 1px solid rgba(108, 117, 125, 0.18);
    border-radius: 16px;
    background-color: #ffffff;
    overflow: hidden;
}

.user-office-grade-card-header {
    padding: 16px 18px;
    border-bottom: 1px solid rgba(108, 117, 125, 0.14);
    background: linear-gradient(180deg, #fcfdff 0%, #f2f6fb 100%);
}

.user-office-grade-card-header h3 {
    margin: 0;
    font-size: 1.05rem;
    color: var(--dark);
}

.user-office-grade-card-header p {
    margin: 6px 0 0;
    color: #6c757d;
    font-size: 0.9rem;
}

.user-office-grade-table-wrapper {
    padding: 14px 16px 18px;
}

.user-office-grade-table {
    width: 100%;
    border-collapse: collapse;
}

.user-office-grade-table th,
.user-office-grade-table td {
    padding: 10px 8px;
    border-bottom: 1px solid rgba(108, 117, 125, 0.14);
    text-align: left;
    vertical-align: middle;
}


.user-office-grade-table th {
    color: #5b6570;
    font-size: 0.84rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

.user-office-grade-label {
    width: 92px;
}

.user-office-grade-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    padding: 0.35rem 0.7rem;
    border-radius: 999px;
    background-color: rgba(220, 53, 69, 0.1);
    color: #a11d31;
    font-weight: 700;
}

.user-office-grade-input {
    min-width: 0;
}

.user-office-form-submit-row {
    display: flex;
    justify-content: flex-end;
    margin-top: 24px;
}

.user-office-submit-button {
    min-width: 220px;
    padding: 12px 18px;
    border-radius: 10px;
    font-weight: 700;
    cursor: pointer;
}

.user-office-edit-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-top: 4px;
}

.user-office-back-link {
    color: var(--dark);
    font-weight: 600;
    text-decoration: none;
}

.user-office-back-link:hover {
    text-decoration: underline;
}

.user-office-delete-button {
    background: #8b1e2d;
    border-color: #8b1e2d;
}

.user-office-delete-button:hover {
    background: #731826;
    border-color: #731826;
}

h1,
h2 {
    color: #333333;
}

.summary-location {
    /* Removed - now handled in control panel */
}

.exchange-location {
    /* Removed - now handled in control panel */
}

.info-panel {
    /* Legacy class - now using control-section */
    background-color: var(--light);
    border: 1px solid gray;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    z-index: 900;
    width: 190px;
    text-align: center;
    outline: none;
    font-size: 0.8rem;
    cursor: default;
}

.info-panel > p {
    border-bottom: 1px solid grey;
    margin: 5px 0;
}

.info-panel > p:last-child {
    border-bottom: none;
}

.collapse-button {
    width: 100%;
    height: 100%;
    background: none;
    border: none;
    margin: 0px;
    color: black;
    border-radius: 10px;
    padding: 5px;;
}

.active {
    border-bottom: 2px lightcoral solid;
    border-bottom-left-radius: 0%;
    border-bottom-right-radius: 0%;
}

.collapse-button:after {
    content: '\02795';
    font-size: 13px;
    color: white;
    float: right;
    margin-left: 5px;
}

.active:after {
    content: "\2796";
}


/*.summary-active {*/
/*    border-bottom: 2px lightcoral solid;*/
/*    border-bottom-left-radius: 0%;*/
/*    border-bottom-right-radius: 0%;*/
/*}*/

/*.summary-active:after {*/
/*    content: "\2796";*/
/*}*/


/* For Chrome, Edge, Safari */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background-color: rgba(200, 200, 200, 0.7); /* light gray with slight transparency */
    border-radius: 3px;
}

/* For Firefox */
* {
    scrollbar-width: thin;
    scrollbar-color: rgba(200, 200, 200, 0.7) transparent;
}

.cost-legend-container {
    grid-row: 3;
    display:grid;
    grid-template-columns: 1fr 60% 1fr;
    justify-items: center
    /*grid-column: 2;*/
    /*grid-row: 5;*/
}

.cost-legend {
    grid-column: 2;
    display: flex;
    justify-content: flex-end;
    gap: 40px;
    padding: 20px;
    border-radius: 4px;
    /*margin: 10px 30px;*/
    margin: 0 30px;
    /*grid-column: 2;*/
    width: 300px;
}

/* Mobile Styles */
@media screen and (max-width: 768px) {
    /* Hide desktop map and related elements on mobile */
    .grid-container {
        display: none !important;
    }

    .cost-legend {
        display: none !important;
    }

    .map-container {
        grid-column: 1;
        grid-row: 2;
        display: block;
        width: 100%;
    }

    .top-spacing {
        display: none;
    }

    .top-spacing.inflation-bar {
        display: flex !important;
        height: auto;
        margin-top: 0 !important;
        padding: 8px 0 12px !important;
    }

    .inflation-bar {
        align-items: stretch !important;
        justify-content: center !important;
        width: 100%;
    }

    #inflation-mode-indicator.inflation-year {
        display: block;
        width: 100%;
        max-width: 100%;
        margin: 0 auto !important;
        padding: 0.85rem 1rem;
        border: 1px solid rgba(220, 53, 69, 0.2);
        border-radius: 16px;
        background: linear-gradient(180deg, #fff8f8 0%, #ffffff 100%);
        color: var(--danger) !important;
        font-size: 1rem !important;
        font-weight: 700;
        line-height: 1.4;
        text-align: center;
        white-space: normal;
        box-shadow: 0 10px 24px rgba(52, 58, 64, 0.08);
        box-sizing: border-box;
    }

    /* Make body layout single column on mobile */
    body {
        grid-template-columns: 1fr;
        grid-template-rows: 100px auto 1fr;
        padding: 10px;
    }

    form:has(.control-panel) {
        grid-column: 1 !important;
        grid-row: 3;
    }

    /* Ensure forms without control panel also take full width */
    form:has(.create-project) {
        grid-column: 1 !important;
    }
    .container {
        padding-top: 10px;
    }

    /* Control panel takes full width on mobile */
    .control-panel {
        position: relative;
        left: 0;
        top: 0;
        width: 100%;
        max-height: none;
    }

    .form-fields {
        display: block;
    }

    .form-fields label {
        text-align: left;
        width: auto;
    }

    /* Hide mobile-only class on desktop, show on mobile */
    .mobile-only {
        display: block !important;
    }

    /* Collapsible header styling */
    .collapsible-header {
        cursor: pointer;
        display: flex;
        justify-content: space-between;
        align-items: center;
        user-select: none;
    }

    .collapse-indicator {
        font-size: 0.8rem;
        transition: transform 0.3s ease;
    }

    .collapsible-offices-content {
        max-height: 2000px;
        overflow: hidden;
        transition: max-height 0.3s ease;
    }

    .collapsible-offices-content.collapsed {
        max-height: 0;
    }

    /* Mobile Office List Styles */
    .mobile-office-list {
        display: flex;
        flex-direction: column;
        gap: 10px;
        margin-top: 10px;
        max-height: 50vh;
        overflow-y: auto;
        overflow-x: hidden;
    }

    .mobile-office-item {
        border: 1px solid #333;
        border-radius: 10px;
        overflow: hidden;
        background-color: #fff;
        flex-shrink: 0;
    }

    .mobile-office-header {
        padding: 10px 15px;
    }

    .mobile-office-name-row {
        display: flex;
        align-items: center;
        gap: 10px;
    }

    .mobile-office-name {
        font-weight: bold;
        font-size: 1rem;
        flex-grow: 1;
    }

    .mobile-office-content {
        padding: 15px;
        background-color: #f8f9fa;
    }

    .mobile-office-weight-row {
        display: flex;
        align-items: center;
        justify-content: space-between;
    }

    .mobile-office-label {
        font-weight: 500;
        font-size: 0.9rem;
    }

    .mobile-weight-input {
        width: 80px;
        text-align: center;
        padding: 8px;
        border: 1px dashed #6c757d;
        border-radius: 5px;
        font-size: 1rem;
    }

    .mobile-office-costs {
        display: flex;
        justify-content: space-around;
        padding-top: 10px;
    }

    .mobile-cost-item {
        font-weight: 500;
        font-size: 0.95rem;
    }

    /* New Project Form Mobile Styles */
    .create-project {
        display: flex;
        flex-direction: column;
        width: 100%;
        height: 500px;
        padding: 10px;
        margin: 0;
    }

    .create-project .new-project-content {
        width: 100%;
        padding: 20px;
        margin: 0;
        box-sizing: border-box;
    }

    #newUserOfficeContent.user-office-form-card {
        padding: 22px 18px;
        border-radius: 16px;
    }

    #newProjectContent.project-form-card {
        padding: 22px 18px;
        border-radius: 16px;
    }

    #newProjectContent .project-form-field {
        grid-template-columns: 1fr;
        gap: 10px;
        padding: 16px 0;
    }

    .project-form-page-header {
        margin-bottom: 0;
    }

    .project-new-page .update-button input[type="submit"] {
        width: 100%;
        min-width: 0;
    }

    .project-form-footer {
        padding: 0 20px 20px;
    }

    #newUserOfficeContent .user-office-form-field,
    .user-office-edit-page .user-office-form-field {
        grid-template-columns: 1fr;
        gap: 10px;
        padding: 16px 0;
    }

    #newUserOfficeContent .user-office-rate-input,
    .user-office-edit-page .user-office-rate-input {
        max-width: none;
    }

    .user-office-edit-page {
        grid-column: 1;
        grid-row: auto;
    }

    .user-office-edit-container {
        padding-top: 10px;
        gap: 20px;
    }

    .user-office-edit-layout {
        grid-template-columns: 1fr;
        gap: 18px;
    }

    .user-office-edit-panel {
        padding: 22px 18px;
        border-radius: 16px;
    }

    .user-office-grade-groups {
        grid-template-columns: 1fr;
    }

    .user-office-form-submit-row,
    .user-office-edit-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .user-office-submit-button,
    .user-office-delete-button {
        width: 100%;
        text-align: center;
    }

    .create-project .new-project-content input[type="text"] {
        box-sizing: border-box;
    }

    .update-button-container {
        width: 100%;
        padding: 10px;
        box-sizing: border-box;
    }

    .update-button-container .btn {
        width: 100%;
    }

    /* Adjust footer for mobile */
    .footer {
        /* position: relative; */
        width: 100%;
        padding: 20px 10px;
        margin-top: 20px;
    }
}

/* Hide mobile-only elements on desktop */
@media screen and (min-width: 769px) {
    .mobile-only {
        display: none !important;
    }
}

/* About page styling */
.about-section {
    margin: 30px 0;
    border-top: 0;
    border-bottom: 0;
}

.about-section h2 {
    color: var(--dark);
    margin-top: 40px;
    margin-bottom: 20px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--secondary);
}

.about-section h3 {
    color: var(--dark);
    margin-top: 25px;
    margin-bottom: 15px;
    font-size: 1.2rem;
}

.about-section p {
    line-height: 1.6;
    color: var(--text);
    margin-bottom: 15px;
}

.about-section ul.value-list {
    list-style: none;
    padding: 0;
    margin: 20px 0;
}

.about-section ul.value-list li {
    background-color: var(--light);
    border-left: 4px solid var(--danger);
    padding: 15px 20px;
    margin-bottom: 15px;
    border-radius: 4px;
    line-height: 1.6;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.about-section ul.value-list li strong {
    color: var(--danger);
    display: block;
    margin-bottom: 5px;
}

.usage-step {
    background-color: var(--light);
    border: 1px solid #ddd;
    border-radius: var(--rounded-corner);
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.screenshot-placeholder {
    background-color: #e9ecef;
    border: 2px dashed var(--secondary);
    border-radius: var(--rounded-corner);
    padding: 60px 20px;
    text-align: center;
    margin: 20px 0;
    color: var(--secondary);
    font-style: italic;
}

.screenshot-placeholder img {
    margin: 0;
    font-size: 1.1rem;
}

.team-credits {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin: 30px 0;
}

.team-role {
    background-color: var(--light);
    border: 1px solid #ddd;
    border-radius: var(--rounded-corner);
    padding: 20px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.team-member-avatar {
    width: 120px;
    height: 120px;
    margin: 0 auto 20px;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid var(--danger);
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--light);
}

.team-member-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.avatar-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--danger) 0%, #e85d6b 100%);
    color: white;
    font-size: 2.5rem;
    font-weight: bold;
    text-transform: uppercase;
}

.team-role h3 {
    color: var(--danger);
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.team-role p {
    margin: 5px 0;
    color: var(--dark);
}

.project-inspiration {
    background-color: var(--accent-bg);
    border-left: 4px solid var(--danger);
    padding: 15px 20px;
    margin-top: 30px;
    border-radius: 4px;
    font-style: italic;
}

@media screen and (max-width: 768px) {
    .team-credits {
        grid-template-columns: 1fr;
    }

    .usage-step {
        padding: 15px;
    }

    .screenshot-placeholder {
        padding: 40px 15px;
    }
}

/* Overall Assessment with Average and Total */
.overall-costs-container {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
}

.cost-values {
    gap: 15px;
    font-size: 16px;
    font-weight: 500;
}

.cost-values span {
    display: block;
}


.duration-selector-and-switch-wrapper {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
}

.duration-selector-wrapper {
    width: 100%;
}

.duration-select {
    width: 100%;
    padding: 6px 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 14px;
    background-color: white;
    cursor: pointer;
}

.duration-select:hover {
    border-color: #999;
}

.duration-select:focus {
    outline: none;
    border-color: lightcoral;
    box-shadow: 0 0 0 2px rgba(240, 128, 128, 0.2);
}

.radio-button-group {
    display: flex;
    gap: 8px;
    align-items: center;
}

.radio-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: 14px;
    white-space: nowrap;
}

.radio-label input[type="radio"] {
    cursor: pointer;
    margin-right: 4px;
}

.radio-text {
    user-select: none;
}



.dashed-divider{
    border: none;
    border-top: 1px dashed #aaa;
    margin: 6px 0;
}
