.content {
    flex: 1;
}

button:focus,
select:focus,
input:focus {
    outline: none;
    box-shadow: none;
    border-color: inherit;
}

button,
select,
input[type='text'] {
    padding: 8px 10px;
    font-size: 1em;
    border: 1px solid #ccc;
    border-radius: 4px;
    min-width: 70px;
    max-width: 100%;
}

input[type='text'] {
    margin-bottom: 10px;
}

#userActions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 15px;
}

#switchEnvironmentBtn,
#switchEnvironmentBtnMobile {
    background-color: lightgrey;
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: var(--radius);
    font-weight: 600;
    font-size: 1em;
    transition: background-color 0.3s ease;
    display: none;
}

#debtsChart,
#activitiesChart,
#birthdayChart {
    max-width: 100%;
    max-height: 350px;
}

#debt {
    font-size: 1.17em;
    font-weight: bold;
    margin: 20px 0;
}

.mobile-divider {
    display: none;
}

@media (max-width: 1024px) {
    .fixed-header {
        padding-top: 20px;
    }

    h1 {
        margin-bottom: 8px;
        margin-top: -10px;
    }

    .tabs {
        display: flex;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;

        background: #fff;
        border-top: 1px solid #ddd;

        justify-content: space-around;
        padding: 6px 4px;
        z-index: 1000;
    }

    .tabs button {
        flex: 1;
        font-size: 0.85em;
        padding: 10px 6px;
        border: none;
        background: none;
        white-space: nowrap;
    }

    /* Make room for footer so content isn’t hidden */
    .content {
        padding-bottom: 50px;
    }

    #userActions {
        flex-direction: column;
        align-items: stretch;
    }

    button,
    select,
    input[type='text'] {
        width: 100%;
        margin-bottom: 8px;
        min-width: 50px;
    }

    table {
        font-size: 0.9em;
        /* overflow-x: auto; */
    }

    #dashboardSection img {
        width: 300px;
        height: auto;
        margin: 0 auto;
    }

    .content {
        margin-top: 0;
    }

    #switchEnvironmentBtn {
        display: none !important;
    }

    #monthlyPayment {
        width: 80px;
        margin-bottom: -10px;
    }
}

@media (max-width: 1024px) {
    #debtsChart,
    #activitiesChart,
    #birthdayChart {
        max-height: 400px !important;
        height: 400px !important;
    }
}

input[type="text"][readonly] {
    background-color: #f2f2f2;
    color: #666;
    border: 1px solid #ccc;
    cursor: not-allowed;
}

.field-label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-weight: 500;
    white-space: nowrap;
}

.info-icon {
    position: relative;
    display: inline-block;
    cursor: pointer;
    font-size: 14px;
    user-select: none;
}

.info-tooltip {
    position: absolute;
    bottom: 140%;
    left: 50%;
    transform: translateX(-50%);
    background: #333;
    color: #fff;
    padding: 8px 10px;
    border-radius: 6px;
    font-size: 12px;
    width: 220px;        /* default width */
    max-width: 90vw;     /* never exceed 90% of viewport width on mobile */
    white-space: normal; /* allow wrapping */
    text-align: left;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease;
    z-index: 1000;
    pointer-events: none;
}

/* Desktop: show tooltip on hover */
@media (hover: hover) {
    .info-icon:hover .info-tooltip {
        opacity: 1;
        visibility: visible;
    }
}

/* Mobile / click: show tooltip when .open is added */
.info-icon.open .info-tooltip {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

@media (max-width: 1024px) {
    .info-tooltip {
        width: auto;
        max-width: 90vw;
    }
}

/* Default: hide mobile-only elements */
.mobile-only {
    display: none;
}

@media (max-width: 1024px) {
    .mobile-only {
        display: block;
    }
}

@media (max-width: 1024px) {
    .tabs button.active {
        color: #007bff;
        font-weight: 600;
        border-top: 2px solid #007bff;
    }
}

@media (max-width: 1024px) {
    #logOutBtn {
        display: none;
    }
}

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

.tab-icon {
    font-size: 1.2em;
}

.tab-text {
    font-size: 1em;
}

.tabs-container {
    margin: 0;
    padding: 0;
    border-color: #eef5fb;
}

.tabs {
    margin: 0;
    padding: 0;
    background-color: #eef5fb;
}

@media (max-width: 1024px) {
    .tabs button {
        flex-direction: column;
        justify-content: center;
        gap: 4px;
        padding: 8px 4px;
        margin-bottom: 0px;
    }

    .tab-icon {
        font-size: 1.4em;
        line-height: 1;
    }

    .tab-text {
        font-size: 0.6rem;
        line-height: 1;
        text-align: center;
        white-space: nowrap;
    }
}

.debt-list {
    width: 100%;     
    max-width: 100%; 
    padding: 0 0px;  
    box-sizing: border-box;
}

.pillory-list {
    width: 100%;      
    max-width: 100%;   
    padding: 0 0px;   
    box-sizing: border-box;
}

.debt-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #eee;
    font-size: 14px;
    width: 100%;
}

.debt-left {
    display: flex;
    flex-direction: column;
}

.debt-date {
    font-size: 12px;
    color: #777;
}

.debt-description {
    font-weight: 500;
}

.debt-right {
    text-align: right;
    min-width: 120px;
}

.debt-right div:last-child {
    opacity: 0.8;
}

.switch {
  position: relative;
  display: inline-block;
  width: 50px;
  height: 24px;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0; left: 0;
  right: 0; bottom: 0;
  background-color: #ccc;
  transition: 0.4s;
  border-radius: 24px;
}

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

input:checked + .slider:before {
  transform: translateX(26px);
}
