@import url('https://fonts.googleapis.com/css2?family=Prompt:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap');

.prompt-thin {
  font-family: "Prompt", sans-serif;
  font-weight: 100;
  font-style: normal;
}

.prompt-extralight {
  font-family: "Prompt", sans-serif;
  font-weight: 200;
  font-style: normal;
}

.prompt-light {
  font-family: "Prompt", sans-serif;
  font-weight: 300;
  font-style: normal;
}

.prompt-regular {
  font-family: "Prompt", sans-serif;
  font-weight: 400;
  font-style: normal;
}

.prompt-medium {
  font-family: "Prompt", sans-serif;
  font-weight: 500;
  font-style: normal;
}

.prompt-semibold {
  font-family: "Prompt", sans-serif;
  font-weight: 600;
  font-style: normal;
}

.prompt-bold {
  font-family: "Prompt", sans-serif;
  font-weight: 700;
  font-style: normal;
}

.prompt-extrabold {
  font-family: "Prompt", sans-serif;
  font-weight: 800;
  font-style: normal;
}

.prompt-black {
  font-family: "Prompt", sans-serif;
  font-weight: 900;
  font-style: normal;
}

.prompt-thin-italic {
  font-family: "Prompt", sans-serif;
  font-weight: 100;
  font-style: italic;
}

.prompt-extralight-italic {
  font-family: "Prompt", sans-serif;
  font-weight: 200;
  font-style: italic;
}

.prompt-light-italic {
  font-family: "Prompt", sans-serif;
  font-weight: 300;
  font-style: italic;
}

.prompt-regular-italic {
  font-family: "Prompt", sans-serif;
  font-weight: 400;
  font-style: italic;
}

.prompt-medium-italic {
  font-family: "Prompt", sans-serif;
  font-weight: 500;
  font-style: italic;
}

.prompt-semibold-italic {
  font-family: "Prompt", sans-serif;
  font-weight: 600;
  font-style: italic;
}

.prompt-bold-italic {
  font-family: "Prompt", sans-serif;
  font-weight: 700;
  font-style: italic;
}

.prompt-extrabold-italic {
  font-family: "Prompt", sans-serif;
  font-weight: 800;
  font-style: italic;
}

.prompt-black-italic {
  font-family: "Prompt", sans-serif;
  font-weight: 900;
  font-style: italic;
}


body {
    margin: 0;
    font-family: "Prompt";
}

.page {
    display: grid;
    grid-template-columns: 220px minmax(0, 1fr);
    min-height: 100vh;
}

.sidebar {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 24px;
} 

.sidebar a {
    color: inherit;
    text-decoration: none;
}

.content {
    padding: 24px;
}

.modal {
    position: fixed;
    inset: 0;
    display: grid;
    place-items: center;
    z-index: 20;
}

.hidden {
    display: none;
}

.modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
}

.modal-panel {
    position: relative;
    z-index: 1;
    width: min(92vw, 520px);
    background: #fff;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
}

.modal-panel form {
    display: grid;
    gap: 16px;
}

.modal-panel label {
    display: grid;
    gap: 8px;
}

.modal-panel input,
.modal-panel textarea {
    width: 100%;
    box-sizing: border-box;
}

.modal-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

.link-button {
    background: none;
    border: none;
    padding: 0;
    font: inherit;
    color: #0066cc;
    cursor: pointer;
}

.link-button:hover {
    text-decoration: underline;
}

dialog#editUserPopup,
dialog#editProjectPopup {
    width: min(92vw, 520px);
    border: none;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
}

dialog#editUserPopup::backdrop,
dialog#editProjectPopup::backdrop {
    background: rgba(0, 0, 0, 0.5);
}

dialog#editUserPopup form,
dialog#editProjectPopup form {
    display: grid;
    gap: 16px;
}

dialog#editUserPopup label,
dialog#editProjectPopup label {
    display: grid;
    gap: 8px;
}

dialog#editUserPopup input,
dialog#editProjectPopup input {
    width: 100%;
    box-sizing: border-box;
}

dialog#editProjectPopup label.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
}

dialog#editProjectPopup label.checkbox-label input {
    width: auto;
}

.group-selector {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    border: none;
    padding: 0;
    margin: 0;
}

.group-selector legend {
    padding: 0;
    margin-bottom: 8px;
    font-weight: 600;
}

.group-chip {
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    border: 1px solid #ddd;
    border-radius: 999px;
    cursor: pointer;
    font-size: 14px;
    user-select: none;
}

.group-chip input {
    display: none;
}

.group-chip:has(input:checked) {
    background: #0066cc;
    border-color: #0066cc;
    color: #fff;
}

.project-list {
    margin: 24px 0;
}

.project-list ul {
    list-style: none;
    padding: 0;
    margin: 16px 0 0;
    display: grid;
    gap: 12px;
}

.project-card {
    border: 1px solid #ddd;
    border-radius: 12px;
    padding: 16px;
    position: relative;
}

.user-card {
    padding: 16px;
    position: relative;
}

.user-card-main {
    display: flex;
    gap: 50px;
}

.item-list {
    margin: 24px 0;
}

.item-list ul {
    list-style: none;
    padding: 0;
    margin: 16px 0 0;
    display: grid;
    gap: 12px;
}

.item-card {
    border: 1px solid #ddd;
    border-radius: 12px;
    padding: 16px;
    position: relative;
}

.card-row {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: center;
}

.card-main {
    flex: 1 1 auto;
}

.card-controls {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
    text-align: right;
}

.card-controls p {
    margin: 0;
}

.menu-toggle {
    background: transparent;
    border: none;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    z-index: 10;
}

.card-dropdown {
    position: absolute;
    right: 0;
    top: 0;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 8px;
    display: none;
    box-shadow: 0 8px 24px rgba(0,0,0,0.08);
    z-index: 30;
    min-width: 120px;
}

.card-dropdown.open {
    display: block;
}

.card-dropdown .dropdown-item {
    display: block;
    width: 100%;
    padding: 6px 8px;
    background: transparent;
    border: none;
    text-align: left;
    cursor: pointer;
}

.card-dropdown .delete-form {
    margin: 0;
}

.card-dropdown .delete-button {
    color: #a33;
    background: transparent;
    border: none;
    padding: 6px 6px;
    cursor: pointer;
}

.messages {
    margin: 16px 0;
}

.message {
    margin: 0;
    color: #a33;
}

.profile {
    padding: 20px;
    position: fixed;
    bottom: 0;
    left: 0;
    z-index: 1000;
}

#loginButton,
#logoutButton {
    background-color: aqua;
    padding: 10px;
    border-radius: 5px;
}

#pfp {
    width: 96px;
    height: auto;
}

#journal-content {
    max-width: 45ch;
    overflow-wrap: break-word;
    word-wrap: break-word;
    white-space: pre-wrap;
}

.journal-media {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 16px;
}

.journal-image {
    width: 400px;
    height: 400px;
    object-fit: contain;
    border-radius: 5px;
}

.stl-viewer {
    width: 400px;
    height: 400px;
    border-radius: 5px;
    background-color: #f0f0f0;
    overflow: hidden;
    cursor: grab;
}

.stl-viewer canvas {
    display: block;
}

.users-table {
    width: 100%;
    border-collapse: collapse;
    margin: 24px 0;
}

.users-table thead {
    background-color: #f5f5f5;
    border-bottom: 2px solid #ddd;
}

.users-table th {
    padding: 12px;
    text-align: left;
    font-weight: 600;
    font-size: 14px;
}

.users-table tbody tr {
    border-bottom: 1px solid #eee;
}

.users-table tbody tr:hover {
    background-color: #f9f9f9;
}

.users-table td {
    padding: 12px;
    font-size: 14px;
}

.users-table img {
    display: block;
}

.users-table a {
    color: #0066cc;
    text-decoration: none;
}

.users-table a:hover {
    text-decoration: underline;
}
