#root {
    margin: 0 auto;
    text-align: center;
    width: 100%;
    min-height: 100%;
    height: max-content;
}

/* LIGHT THEME (default) */
:root {
    min-height: 100%;
    height: max-content;
    /* Updated Typography */
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    line-height: 1.5;
    font-weight: 400;
    font-synthesis: none;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    --standard-radius: 12px;
    --small-radius: 8px;
    --big-radius: 24px;

    --bg: #ffebf0;
    --text: #000000;
    --panel: #ef9fb3;
    --overlay: rgba(0, 0, 0, 0.2);
    --outline: #818181;
    --outline-droppable: #0a5ab4;
    --input-field: #f5b2c1;
    --dialog-bg: #f08fa7;
    --cancel-button: #a3a3a3;
    --delete-color: #e74c3c;
    --loading-overlay: rgba(0, 0, 0, 0.8);
    --loading-text: #FFFFFF;
    --pale-color: #f9d7e1;

    /* Subtle shadows for depth */
    --shadow: 0 4px 12px rgba(0, 0, 0, 0.08);

    background-color: var(--bg);

    @media (max-width: 768px) {
        line-height: 1;
        --standard-radius: 10px;
        --small-radius: 6px;
        --big-radius: 12px;
    }
}

/* DARK THEME */
[data-theme="dark"] {
    --bg: rgb(22, 24, 28);
    --text: #ffffff;
    --panel: #306844;
    --overlay: rgba(14, 14, 14, 0.5);
    --outline: #818181;
    --input-field: #2c4c3b;
    --dialog-bg: #182c25;
    --cancel-button: #455b55;

    --shadow: 0 4px 20px rgba(0, 0, 0, 0.4);

    background-color: var(--bg);
    color: var(--text);
}


html, body {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    display: flex;
    place-items: center;
    min-width: 320px;
    min-height: 100vh;
}

.divider {
    height: 1px !important;
    background-color: var(--panel);
    margin: 10px 0;
    width: 100%;
}

.file-upload,
input {
    background-color: var(--input-field);
    color: var(--text);
    border: 2px solid transparent; /* Keeps layout stable */
    border-radius: var(--standard-radius);
    padding: 12px 16px;
    font-size: 1rem;
    font-family: inherit;
    width: 100%;
    box-sizing: border-box;
    transition: all 0.2s ease-in-out;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.05);
}

.file-upload:focus,
input:focus {
    outline: none;
    background-color: var(--bg); /* Shifts slightly for contrast */
    border-color: var(--panel); /* Uses your accent color */
    box-shadow: 0 0 0 4px var(--panel); /* Soft glow using --panel */
}

.file-upload > span,
input::placeholder {
    color: var(--text);
    opacity: 0.5;
}

.file-upload {
    text-align: start;
    cursor: pointer;
    height: 51px;
    display: flex;
    align-items: center;

    & > .visible {
        opacity: 1;
    }
}

.loginView {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: var(--bg);
    color: var(--text);
    width: 100%;
}

header {
    font-size: 3em;
    font-weight: 800; /* Bolder modern weight */
    letter-spacing: -0.02em;
    margin-bottom: 20px;
}

button, select {
    font-size: 1em;
    font-weight: 600;
    font-family: inherit;
    padding: 10px 16px;
    /* Modernized Rounding */
    border-radius: var(--standard-radius);
    border: none;
    cursor: pointer;
    background: var(--panel);
    color: var(--text);

    display: flex;
    justify-content: center;
    align-items: center;

    /* Modern Interaction Style */
    box-shadow: var(--shadow);
    transition: transform 0.1s, active, filter 0.2s ease, box-shadow 0.2s ease;
}

button:disabled {
    cursor: not-allowed;
}

select {
    border-right: 10px solid transparent
}

select:hover, input:hover {
    filter: brightness(1.1);
}

button:hover {
    filter: brightness(1.2);
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
}

button:active {
    transform: translateY(0);
}

h1 {
    font-size: 3.2em;
    line-height: 1.1;
    letter-spacing: -0.03em;
}

/* Focused elements use a cleaner ring */
button:focus-visible {
    outline: 3px solid var(--panel);
    outline-offset: 2px;
}

.dialogOverlay {
    background: var(--overlay);
    backdrop-filter: blur(4px); /* Modern blur effect */
    color: var(--text);
    position: fixed;
    inset: 0;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 20px;
    z-index: 100;
    overflow: auto;
    scrollbar-color: var(--panel) var(--bg);
    scrollbar-width: thin;
}

.dialog {
    background: var(--dialog-bg);
    color: var(--text);
    padding: 20px;
    /* Increased Rounding */
    border-radius: var(--big-radius);
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-width: 300px;
    width: fit-content;
    margin: auto;
    position: relative;
}

.closeIcon {
    width: 20px;
    aspect-ratio: 1;
    position: absolute;
    right: 20px;
    cursor: pointer;
    z-index: 10000;
}

.DatabaseListing {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 100%;
}

.DatabaseAndOptions {
    justify-content: center;
    width: 100%;

    display: grid;
    grid-template-columns: 12fr 1fr 1fr 1fr 1fr;
    gap: 8px;
}

.qrDialog {
    display: flex;
    align-items: center;
    max-width: 340px;
    z-index: 900;
    gap: 0;
    max-height: 80%;

    & .qrCode {
        padding: 10px;
        border-radius: var(--standard-radius);
        background-color: white;
        margin-top: 15px;
        margin-bottom: 15px
    }
}

#error {
    font-size: .8rem;
    color: var(--outline);
}

#qrVideo {
    width: 100%;
    height: 100%;
    border-radius: var(--standard-radius);
}

.databaseSelection {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 24px;
    width: 100%;
}

.settingsContainer {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 24px;
    height: 100%;
}

.settingsBackground {
    border-radius: var(--big-radius);
    padding: 10px 20px;
    box-shadow: var(--shadow);
}

.dbSettingsContainer {
    display: flex;
    flex-direction: column;
    justify-content: center;
    width: 100%;
    gap: 12px;
}

.checkboxRow {
    display: flex;
    flex-direction: row;
    justify-content: flex-start;
    gap: 12px;
    white-space: nowrap;
}

.numberInput {
    display: grid;
    grid-template-columns: 8fr 1fr 1fr;
    align-items: center;
    gap: 8px;
    width: 300px;
    height: 2.5rem;
}

.number-control {
    width: 50px;
    font-size: 1.5em;
    padding: 0;
    padding-bottom: 3px;
    box-shadow: none;
}

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

.timeout-setting, .connection-settings {
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: flex-start;
}

.connection-settings {
    min-width: 300px;
    width: fit-content;
    max-width: 100%;
}

.server-list {
    display: flex;
    flex-direction: column;
    gap: 12px !important;
    padding: 12px !important;
    border: 2px solid var(--panel);
    border-radius: var(--standard-radius);
    width: 100%;
    max-width: 300px;
    max-height: 200px;
    box-sizing: border-box;
}

.current-server {
    box-sizing: border-box;
    font-weight: 700;
    text-decoration: underline;
    width: 100%;
    border: 2px solid var(--panel);
    border-radius: var(--standard-radius);
    height: 2.5rem;
    align-content: center;
    display: block;
    padding: 0 12px;
    white-space: nowrap;
    text-overflow: ellipsis !important;
    overflow: hidden;
}

.server-item {
    box-sizing: border-box;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 2.5rem;
    gap: 12px;
}

.flexContainer {
    display: flex;
    flex-direction: column;
    max-width: 1280px;
    margin: 0 auto;
    padding: 2rem;
    text-align: center;
    justify-content: center;
    align-items: center;
}

.confirm-cancel-buttons, .item-creation-buttons {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 3em;
    margin-top: 2em;
}

.item-creation-buttons {
    margin-top: 0;
}

.confirm-cancel-buttons button:nth-child(2) {
    background-color: var(--cancel-button);
}

.logo {
    margin: 2em;
    width: 15vmin;
    filter: drop-shadow(0 0 1.5em var(--panel));
    transition: filter 0.3s ease;
}

.logo.header {
    margin: 0.1rem 0.1rem 0.1rem 0;
    height: 100%;
    width: auto;
}

.password-manager-header {
    height: 5vh;
    display: flex;
    align-items: center;
    gap: 2rem;
    padding: 0 2vh;
}

.squareButton, .settingsButton, .copyButton, .eyeButton, .passwordGenButton {
    height: 2.5rem;
    aspect-ratio: 1;
    padding: 0.5rem;
}

.entryViewFooterButtons {
    display: flex;
    gap: 1vh;
    justify-content: space-evenly;
    width: 100%;
    margin: 1.5rem;
}

.rectangle-button {
    width: 10rem;
    height: 3rem;
    gap: 0.5rem;
}

.delete {
    background-color: var(--delete-color);
}

.cancel {
    background-color: var(--cancel-button);
}

.passwordGenButton {
    margin-left: 2vh;
    padding: 0.6rem;
    box-shadow: none;

    display: flex;
    align-items: center;
    justify-content: center;

    font-size: 18px;
    line-height: 1;
    cursor: pointer;
}

.copyButton, .eyeButton {
    margin-left: 15px;
    box-shadow: none;
    grid-column-start: 20 !important;
    grid-column: span 1;
}

.qrButton,
.eyeButton {
    padding: 0.5rem;
    background-color: transparent;
    color: var(--panel);
    border: 1px solid var(--panel);
    grid-column-start: 19 !important;
}

.qrButton,
.eyeButton.selected {
    color: var(--text);
    background-color: var(--panel);
}

.settingsButton {
    margin-left: auto;
    position: absolute;
    right: 2vh;
    top: 1.5vh
}

.dragged {
    opacity: 0.5;
    cursor: grabbing;
}

.over {
    border: 2px dashed var(--outline-droppable) !important;
    background-color: var(--bg) !important;
}

.item-title {
    margin-left: 10px;
    display: inline-block;
    max-width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    vertical-align: middle;
}

.listViewTitleHeader, .listViewEntry {
    flex-direction: row;
    background-color: var(--panel);
    display: flex;
    border-radius: var(--standard-radius);
    margin: 0.6vh 1vh;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    white-space: nowrap;
    overflow: hidden;
    align-items: center;
    padding-left: 10px;
    height: 2.5rem;

    transition: border-color 0.2s ease, transform 0.1s ease;
    box-sizing: border-box;
    border: 2px solid transparent;
}

.listViewEntry {
    background-color: var(--dialog-bg);
    font-weight: 500;
}

.listViewTitleHeader:hover {
    filter: brightness(1.1);
}

.btnWrapper {
    width: fit-content;
    display: flex;
    justify-content: end;
    justify-self: end;
    margin-left: auto;
}

.listViewTitleHeader button, .listViewEntry button {
    height: 2rem;
    aspect-ratio: 1;
    margin: 5px;
    padding: 0.2rem;
    border-radius: var(--small-radius);
    justify-content: center;
}

.listViewTitleHeader button {
    background-color: var(--dialog-bg);
}

.listViewEntry button {
    background-color: var(--panel);
}

.listViewTitleHeader.button.active {
    filter: brightness(1.2);
}

.listViewEntry.button:hover {
    filter: brightness(1.3);
}

.listViewTitleHeader input {
    height: 100%;
    width: auto;
    flex-grow: 1;
    padding: 0 8px;
    margin: 0;
    font-size: inherit;
    text-transform: inherit;
}

.listViewTitleHeader input:focus {
    /* Removes outline */
    box-shadow: inset 0 0 0 2px var(--panel);
}

.listViewEntry span {
    text-align: start;
    white-space: nowrap;
}

.listViewEntry:hover {
    filter: brightness(1.05);
    border-color: var(--panel);
}

.listViewEntry.selected {
    border: 2px solid var(--panel);
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.1);
    align-items: center;
    white-space: nowrap;
}

.listViewEntryWrapper {
    flex-direction: row;
    position: relative;
    --number-children: 0;

    &::before {
        content: '';
        width: 2px;
        border-radius: 1px;
        height: 100%;
        position: absolute;
        left: 0;
        background-color: darkslategrey;
    }
}

.passwordView {
    display: flex;
    flex-direction: row;
    width: 100%;
    height: 100%;
}

.passwordViewList {
    border: 2px solid var(--panel);
    border-right: 0;
    border-radius: var(--big-radius) 0 0 var(--big-radius);
    display: flex;
    flex-direction: column;
    width: 30%;
}
.passwordViewEntry {
    border: 2px solid var(--panel);
    border-right: 0;
    border-radius: var(--big-radius) 0 0 var(--big-radius);
    display: flex;
    flex-direction: column;
    width: 70%;
    position: relative;
}

.organizeListView {
    border: 2px solid var(--panel);
    border-right: 0;
    border-radius: var(--big-radius) 0 0 var(--big-radius);
    display: flex;
    flex-direction: column;
    border-left: 0;
    border-right: 0;
}

.entryViewContainer {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.entryViewEntry {
    font-size: 1em;
    padding: 0 50px 0 50px;
    width: 100%;
    height: 90%;
    display: flex;
    flex-direction: column;
    text-align: left;
    box-sizing: border-box;

    word-break: break-all;
    white-space: normal;
    align-items: center;
}


.entryViewEntry span:nth-child(3n+1) {
    font-weight: 700;
    color: var(--text);
    opacity: 0.7; /* Distinguishes label from value */
}

.entryViewListing {
    display: flex;
    flex-direction: column;
    height: max-content;
    gap: 2vh;
    scrollbar-width: none !important;
}

.entryViewAttribute {
    display: grid;
    grid-template-columns: repeat(20, 1fr);
    align-items: center; /* Better than 'start' for row alignment */
    gap: 8px;
    width: 100%;
}

.attribute-value, .title-value {
    box-sizing: border-box;
    border: 1px solid var(--panel);
    border-radius: var(--standard-radius);
    padding: 0 12px;
    min-height: 2.5rem;
    height: 2.5rem;
    align-items: center;
    grid-column-start: 2;
    grid-column-end: 20;
    overflow: hidden;
    display: block;
    white-space: nowrap;
    text-overflow: ellipsis;
    align-content: center;
}

.attribute-value.editing {
    grid-column-end: 21;
}

.title-value {
    box-sizing: border-box;
    font-size: 1.5em;
    font-weight: 550;
    height: 7%;
    min-height: fit-content;
    max-width: 80%;
    margin-top: 3%;
    border: none;
}


.closeButton {
    float: left;
    position: fixed;
    top: 1%;
    left: 0.5%;
}

/* The snackbar */
.floatingToast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    background-color: var(--panel);
    color: var(--text);
    padding: 12px 24px;
    /* Pill Shape */
    border-radius: var(--big-radius);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
    z-index: 200;
    font-size: 1.2rem;
    font-weight: 600;
}

.loadingOverlay {
    background: var(--loading-overlay);
    backdrop-filter: blur(8px);
    color: var(--loading-text);
    position: fixed;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 101;
}

.loadingSpinner {
    width: 80px;
    aspect-ratio: 1;
    fill: var(--panel);
    animation: 2s linear infinite spinner-rotation;
    z-index: 102;
}

.loadingText {
    width: 88.7px;
    text-align: start;
    z-index: 102;
    font-weight: 600;
    letter-spacing: 0.05em;

    &::after {
        content: "";
        overflow: hidden;
        display: inline-block;
        vertical-align: bottom;
        animation: steps(3, end) 1500ms infinite ellipsis;
    }
}

@keyframes ellipsis {
    0% {
        content: "";
    }
    25% {
        content: ".";
    }
    50% {
        content: "..";
    }
    75% {
        content: "...";
    }
}

@keyframes spinner-rotation {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

.passwordGen {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-content: start;
    grid-row-gap: 1.5%;
}

.OrganizedListView {
    display: grid;
    grid-template-columns: repeat(10, 1fr);
    grid-template-rows: repeat(2, 2.5rem);
    gap: 1vh;
    padding: 1.5vh 1.5vh;
    justify-items: center;
}

.FilteredListView__header {
    width: calc(100% - 12px);
    display: flex;
    justify-content: space-between;
    margin: 8px 0px 8px 12px;
    color: var(--outline);
}

.entryDateViewEntry {
    color: var(--pale-color);
    font-size: 1em;
    width: 100%;
    height: 10%;
    display: grid;
    grid-template-columns: 1fr 1fr;
    flex-direction: column;
    background-color: var(--dialog-bg);
    text-align: left;
    gap: 10px 20px;
    align-items: center;
    justify-items: center;
    border-radius: 0 0 0 var(--big-radius);
    align-self: flex-end;
}

.dialogButtonContainer {
    display: flex;
    flex-direction: row;
    overflow-x: scroll;
}

.urlWrapper {
    display: flex;
}

.qrButton {
    aspect-ratio: 1;
    padding: 0.5rem;
    margin-left: 1rem;
    height: 49px;
    box-shadow: none;
}

.dialogButtonContainer button {
    margin: 10px;
    white-space: normal;
    width: 150px;
    text-align: center;
}

.settings-layout {
    display: flex;
    flex-direction: row;
    overflow: hidden;
    width: 98%;
    height: 95%;
}

@media (min-width: 950px) {
    .settings-layout {
        min-width: 780px;
    }

    .connection-settings {
        min-width: 400px;
    }
}

.settings-sidebar {
    background: var(--dialog-bg);
    padding: 20px;
    display: flex;
    flex-direction: column;
    border-right: 1px solid var(--panel);
}

.settings-sidebar button {
    text-align: left;
    padding: 10px;
    cursor: pointer;
    margin-bottom: 5px;
}


.settings-content {
    background: var(--dialog-bg);
    flex: 1;
    overflow-y: auto;
    justify-items: center;
    justify-content: center;
    align-items: center;
    align-content: center;
    width: 100%;
}

.action-menu-wrapper {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    position: relative;
    height: 100%;
}

.action-items {
    display: flex;
    align-items: center;
    gap: 1vh;
    overflow: hidden;

    max-width: 0;
    opacity: 0;
    transform: translateX(20px);
    padding: 1vh 1vh 1vh 3vh;

    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.action-items.open {
    max-width: 100%;
    opacity: 1;
    transform: translateX(0);
}

@keyframes flashAnimationFolder {
    0% {
        background-color: var(--outline-droppable);
        box-shadow: var(--outline-droppable);
    }
    100% {
        background-color: var(--panel);
        box-shadow: none;
    }
}

@keyframes flashAnimationEntry {
    0% {
        background-color: var(--outline-droppable);
        box-shadow: var(--outline-droppable);
    }
    100% {
        background-color: var(--dialog-bg);
        box-shadow: none;
    }
}

.highlighted.folder {
    animation: flashAnimationFolder 1s ease-out forwards;
}

.highlighted.entry {
    animation: flashAnimationEntry 1s ease-out forwards;
}

/* History Dialog Specifics */
.historyDialog {
    max-height: 85vh;
    width: 500px;
    max-width: 95vw;
}

.scrollableContainer {
    display: flex;
    flex-direction: column;
    padding: 1vh 0.5vh;
    scrollbar-color: var(--panel) var(--bg);
    scrollbar-width: thin;
    flex: 1;
    overflow-y: scroll;
    overflow-x: hidden !important;
    max-width: 100%;
}

/* Timeline Structure */
.timeline-item {
    display: flex;
    gap: 16px;
    padding-bottom: 24px;
}

.timeline-marker {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex-shrink: 0;
}

.marker-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    background: var(--input-field);
    border: 2px solid var(--panel);
    z-index: 2;
}

.marker-line {
    width: 2px;
    flex-grow: 1;
    background: var(--panel);
    opacity: 0.3;
    margin-top: 4px;
}

.timeline-item:last-child .marker-line {
    display: none;
}

/* Content Card */
.timeline-content {
    flex-grow: 1;
    background: var(--bg);
    border-radius: var(--standard-radius);
    padding: 14px;
    border: 1px solid rgba(0, 0, 0, 0.05);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    text-align: left;
}

.timeline-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.timeline-label {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 2px 8px;
    border-radius: var(--small-radius);
}

.timeline-date {
    font-size: 0.75rem;
    opacity: 0.6;
}

/* State Colors */
.status-new .timeline-label {
    background: var(--loading-text);
    color: #166534;
}

.status-update .timeline-label {
    background: var(--loading-text);
    color: var(--outline-droppable);
}

.status-deleted .timeline-content {
    opacity: 0.7;
    filter: grayscale(0.5);
}

.status-deleted .timeline-label {
    background: var(--loading-text);
    color: var(--delete-color);
}

.item-name {
    margin: 0 0 8px 0;
    font-size: 1.1rem;
    color: var(--text);
}

/* Change Comparison Visuals */
.change-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    background: rgba(0, 0, 0, 0.03);
    padding: 8px;
    border-radius: var(--standard-radius);
}

.change-row {
    display: flex;
    flex-direction: column;
    font-size: 0.85rem;
}

.attr-name {
    font-weight: 600;
    opacity: 0.7;
    font-size: 0.75rem;
}

.change-path {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.old-val {
    text-decoration: line-through;
    opacity: 0.5;
}

.arrow {
    color: var(--panel);
    font-weight: bold;
}

.new-val {
    color: var(--text);
    font-weight: 500;
}

.metadata-grid {
    display: flex;
    gap: 12px;
    font-size: 0.85rem;
    opacity: 0.8;
}

.url-text {
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.confirmDeleteWrapper, .addServerWrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    text-align: center;
}

.confirmDeleteWrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    text-align: center;
}

.password-container {
    display: flex;
    align-items: center;
}

.settings-tab {
    background: transparent;
    border: 2px solid var(--panel);
}

.settings-tab.active {
    background: var(--panel);
}

.about-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    justify-content: center;
}

.about-section {
    max-width: 400px;
}

/* TOGGLE SWITCH STYLES */
.switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 28px;
}

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

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--cancel-button);
    transition: .4s;
    border-radius: var(--standard-radius);
}

.slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
    border-radius: var(--small-radius);
}

input:checked + .slider {
    background-color: var(--panel);
}

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

    input:focus + .slider {
        box-shadow: 0 0 1px #1a3b3b;
    }
}

.sync-status-indicator {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 12px;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
}


/* 3D Spinning SVG */
.icon-container {
    perspective: 1000px;
    display: inline-block;
}

.spinning-svg {
    animation: spin-3d 6s infinite linear;
    transform-origin: center;
}

@keyframes spin-3d {
    from {
        transform: rotateY(0deg);
    }
    to {
        transform: rotateY(360deg);
    }
}

.settings-dialog {
    width: 80%;
    max-width: 1000px;
    height: 80%;
    display: flex;
    flex-direction: column;
}









/* Mobile Phones should render differently*/
@media (max-width: 768px) {
    .settings-layout {
        flex-direction: column-reverse;
        width: 100%;
    }

    .settingsContainer {
        width: 100%;
        align-items: stretch; /* forces children to fill the width */
        padding: 5px;
        box-sizing: border-box;
    }

    .settings-sidebar {
        border-right: none;
        border-top: 1px solid var(--panel);
    }


    /* Reset fixed widths that cause overflow */
    .numberInput, .connection-settings, .server-list, .current-server, input {
        width: 95% !important;
        max-width: 100%;
    }

    .passwordView {
        flex-direction: column-reverse;
    }

    .passwordViewList {
        width: 100%;
        border: none;
        max-height: 40%;
    }

    .passwordViewEntry {
        width: 100%;
        border: none;
        min-height: 50%;
        height: fit-content;
        overflow-y: scroll;
    }


    .entryViewAttribute {
        display: flex;
    }

    /* First child (Label) */
    .entryViewAttribute *:nth-child(1) {
        width: 30%;
    }

    /* Second child (Input/Value) */
    .entryViewAttribute *:nth-child(2) {
        width: 70%;
    }

    .entryViewAttribute button svg {
        width: 20px !important;
        height: 20px !important;
        flex-shrink: 0; /* Prevents the SVG itself from being squished */
        display: block;
    }

    .entryViewAttribute button {
        margin: 0 !important;
    }

    .entryViewEntry {
        height: 100%;
    }
    .entryDateViewEntry {
        display: none;
        height: 0;
    }

    .organizeListView {
        border-radius: 0;
        border: 1px solid var(--panel);
        border-right: none;
        border-left: none;
    }

    .dialog {
        min-width: 60%;
        padding: 10px;
        margin-top: auto;
        margin-left: 0;
        margin-right: 0;
    }
}