Files
project-manager/web/src/style.css
T

958 lines
16 KiB
CSS
Raw Normal View History

/* Placeholder styling only — just enough to be legible. */
:root {
--bg: #f7f7f8;
--surface: #ffffff;
--border: #e2e2e5;
--text: #1c1c1f;
--muted: #6b6b73;
--accent: #4f46e5;
--accent-text: #ffffff;
--warn-bg: #fff4e5;
--warn-border: #f0c48a;
--error: #b3261e;
/* Kanban inbox column: a touch lighter than a status column (var(--bg)). */
--inbox-bg: #fcfcfd;
color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
:root {
--bg: #16161a;
--surface: #1f1f24;
--border: #33333a;
--text: #ececf1;
--muted: #9a9aa6;
--warn-bg: #2e2415;
--warn-border: #6b5220;
--error: #f2b8b5;
--inbox-bg: #202027;
}
}
* {
box-sizing: border-box;
}
/* No browser focus ring on form controls -- the border colour change is
highlight enough (components with more elaborate focus styles, e.g.
.card-row__text, override this with their own higher-specificity rule). */
input:focus,
textarea:focus,
select:focus {
outline: none;
border-color: var(--accent);
}
body {
margin: 0;
font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
background: var(--bg);
color: var(--text);
line-height: 1.5;
}
.app__bar {
display: flex;
align-items: center;
justify-content: space-between;
gap: 1rem;
padding: 0.75rem 1.25rem;
background: var(--surface);
border-bottom: 1px solid var(--border);
}
.app__brand {
font-weight: 600;
}
.app__account {
display: flex;
align-items: center;
gap: 0.75rem;
font-size: 0.9rem;
}
.app__email {
color: var(--muted);
text-decoration: none;
}
.app__body {
display: flex;
align-items: flex-start;
2026-09-04 15:41:27 +01:00
gap: 1.5rem;
padding: 1.5rem 1.25rem;
}
.app__main {
flex: 1;
min-width: 0;
max-width: 32rem;
2026-09-04 15:41:27 +01:00
margin: 0 auto;
}
/* Full-bleed layout for views that need the room (e.g. the project board). */
.app__main--wide {
max-width: none;
2026-09-04 15:41:27 +01:00
margin: 0;
}
/* --- left sidebar (signed-in app pages) ------------------------------ */
.sidebar {
flex: 0 0 15rem;
2026-09-04 15:41:27 +01:00
align-self: flex-start;
position: sticky;
2026-09-04 15:41:27 +01:00
/* Matches .app__body's top padding, so the gap holds once it starts sticking. */
top: 1.5rem;
/* Fill the screen height: viewport minus the header (~3.0625rem, .app__bar's
padding + line height + border) and a matching 1.5rem gap top and bottom.
Not just a cap -- short content leaves room at the bottom of the panel,
long content scrolls internally. Re-tune if .app__bar's height changes. */
height: calc(100vh - 6.0625rem);
overflow-y: auto;
padding: 1rem 0.75rem 1.5rem;
2026-09-04 15:41:27 +01:00
border: 1px solid var(--border);
border-radius: 12px;
background: var(--surface);
}
.sidebar__nav {
display: flex;
flex-direction: column;
gap: 0.1rem;
}
.sidebar__link {
display: flex;
align-items: center;
gap: 0.6rem;
padding: 0.45rem 0.6rem;
border-radius: 7px;
color: var(--text);
text-decoration: none;
font-size: 0.9rem;
}
.sidebar__link:hover {
background: var(--bg);
}
.sidebar__link--active,
.sidebar__link--active:hover {
background: var(--accent);
color: var(--accent-text);
}
.sidebar__icon {
flex: none;
width: 1rem;
height: 1rem;
fill: currentColor;
}
.sidebar__link-text {
min-width: 0;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.sidebar__divider {
border: none;
border-top: 1px solid var(--border);
margin: 0.75rem 0;
}
.sidebar__heading {
margin: 0 0 0.35rem;
padding: 0 0.6rem;
font-size: 0.72rem;
font-weight: 600;
text-transform: uppercase;
letter-spacing: 0.05em;
color: var(--muted);
}
.sidebar__select {
display: flex;
align-items: center;
gap: 0.6rem;
padding: 0.2rem 0.6rem;
}
.sidebar__select select {
flex: 1;
min-width: 0;
font: inherit;
font-size: 0.9rem;
padding: 0.35rem 0.4rem;
border: 1px solid var(--border);
border-radius: 6px;
background: var(--bg);
color: var(--text);
}
.sidebar__inbox-cards {
max-height: 40vh;
overflow-y: auto;
padding: 0 0.1rem; /* room for the ghost card's outline while dragging */
}
.sidebar__note {
padding: 0 0.6rem;
font-size: 0.85rem;
}
.card {
background: var(--surface);
border: 1px solid var(--border);
border-radius: 12px;
padding: 1.75rem;
}
h1 {
margin: 0 0 0.75rem;
font-size: 1.4rem;
}
.muted {
color: var(--muted);
font-size: 0.95rem;
}
.notice {
margin: 1rem 0;
padding: 0.75rem 1rem;
background: var(--warn-bg);
border: 1px solid var(--warn-border);
border-radius: 8px;
font-size: 0.9rem;
}
.divider {
display: flex;
align-items: center;
gap: 0.75rem;
margin: 1.25rem 0;
color: var(--muted);
font-size: 0.85rem;
}
.divider::before,
.divider::after {
content: '';
flex: 1;
height: 1px;
background: var(--border);
}
/* --- top-of-page "add a passkey" notice, dismissible for a week -------- */
.passkey-notice {
display: flex;
align-items: center;
justify-content: center;
gap: 1rem;
padding: 0.6rem 1.25rem;
background: var(--warn-bg);
border-bottom: 1px solid var(--warn-border);
font-size: 0.9rem;
text-align: center;
}
.passkey-notice p {
margin: 0;
}
.passkey-notice__dismiss {
flex: none;
border: none;
background: none;
color: var(--muted);
cursor: pointer;
font-size: 0.9rem;
padding: 0.2rem 0.4rem;
border-radius: 6px;
}
.passkey-notice__dismiss:hover {
background: var(--bg);
color: var(--text);
}
/* --- passkey list (profile) -------------------------------------------- */
.passkeys {
list-style: none;
margin: 1rem 0;
padding: 0;
display: grid;
gap: 0.5rem;
}
.passkeys__item {
display: flex;
align-items: center;
justify-content: space-between;
gap: 0.75rem;
padding: 0.6rem 0.75rem;
border: 1px solid var(--border);
border-radius: 8px;
background: var(--bg);
}
.passkeys__info {
display: flex;
flex-direction: column;
gap: 0.15rem;
min-width: 0;
}
.passkeys__label {
font-weight: 600;
}
.passkeys__meta {
font-size: 0.8rem;
}
.passkeys__remove {
flex: none;
border: none;
background: none;
color: var(--muted);
cursor: pointer;
font-size: 0.85rem;
padding: 0.3rem 0.5rem;
border-radius: 6px;
}
.passkeys__remove:hover {
color: var(--error);
background: var(--surface);
}
/* --- dashboard: grid of projects --------------------------------------- */
.dashboard__grid {
margin-top: 1rem;
display: grid;
grid-template-columns: repeat(auto-fill, minmax(13rem, 1fr));
gap: 1rem;
align-items: stretch;
}
.project-card {
display: flex;
flex-direction: column;
justify-content: flex-start;
gap: 0.4rem;
padding: 1rem;
background: var(--surface);
border: 1px solid var(--border);
border-radius: 10px;
color: inherit;
text-decoration: none;
}
.project-card:hover {
border-color: var(--accent);
}
.project-card__title {
font-weight: 600;
font-size: 1.05rem;
word-break: break-word;
}
.project-card__meta {
font-size: 0.85rem;
}
.project-card--new {
background: transparent;
border-style: dashed;
gap: 0.75rem;
}
.project-card--new label {
display: grid;
gap: 0.3rem;
font-size: 0.9rem;
}
.project-card__name-input {
display: block;
width: 100%;
box-sizing: border-box;
padding: 0.55rem 0.7rem;
border: 1px solid var(--border);
border-radius: 8px;
background: var(--bg);
color: var(--text);
font: inherit;
font-size: 1rem;
/* Grown in JS to fit its content -- no manual resize handle, no scrollbar. */
resize: none;
overflow: hidden;
}
/* --- project detail: cards ------------------------------------------ */
.cards {
list-style: none;
margin: 1rem 0 0;
padding: 0;
display: grid;
gap: 0.4rem;
}
.card-row {
display: flex;
align-items: center;
gap: 0.5rem;
border: 1px solid var(--border);
border-radius: 8px;
padding: 0.4rem 0.55rem;
background: var(--surface);
}
.card-row__status {
flex: none;
padding: 0.15rem 0.55rem;
border-radius: 999px;
font-size: 0.75rem;
font-weight: 600;
white-space: nowrap;
border: 1px solid var(--border);
background: var(--bg);
color: var(--muted);
}
.card-row__status--none {
font-weight: 400;
font-style: italic;
}
.card-row__text {
flex: 1;
min-width: 0;
border: 1px solid transparent;
border-radius: 6px;
background: transparent;
color: var(--text);
font-size: 1rem;
padding: 0.3rem 0.4rem;
}
.card-row__text:hover {
border-color: var(--border);
}
.card-row__text:focus {
outline: none;
border-color: var(--accent);
background: var(--bg);
}
.card-row__delete {
flex: none;
border: none;
background: none;
color: var(--muted);
cursor: pointer;
font-size: 1rem;
padding: 0.2rem 0.4rem;
border-radius: 6px;
}
.card-row__delete:hover {
color: var(--error);
background: var(--bg);
}
/* --- project detail: header, inline title, manage menu ----------------- */
.project-head {
display: flex;
align-items: flex-start;
gap: 0.5rem;
}
.project-head__title {
flex: 1;
min-width: 0;
margin: 0 0 0.5rem;
}
.project-head__title input {
width: 100%;
font: inherit;
font-size: 1.4rem;
font-weight: 600;
color: var(--text);
background: transparent;
border: 1px solid transparent;
border-radius: 6px;
padding: 0.25rem 0.4rem;
}
.project-head__title input:hover {
border-color: var(--border);
}
.project-head__title input:focus {
color: var(--text);
background: var(--bg);
}
.project-head__back {
display: inline-flex;
align-items: center;
flex: none;
text-decoration: none;
}
.menu {
position: relative;
flex: none;
}
.menu__toggle {
border: 1px solid var(--border);
background: var(--bg);
color: var(--text);
border-radius: 8px;
padding: 0.35rem 0.7rem;
font: inherit;
font-size: 0.9rem;
cursor: pointer;
}
.menu__toggle:hover {
border-color: var(--muted);
}
.menu__backdrop {
position: fixed;
inset: 0;
z-index: 10;
}
.menu__list {
position: absolute;
right: 0;
top: calc(100% + 4px);
z-index: 20;
min-width: 10rem;
margin: 0;
padding: 0.25rem;
list-style: none;
background: var(--surface);
border: 1px solid var(--border);
border-radius: 8px;
box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
}
.menu__item {
display: block;
width: 100%;
text-align: left;
text-decoration: none;
border: none;
background: none;
color: var(--text);
font: inherit;
padding: 0.45rem 0.6rem;
border-radius: 6px;
cursor: pointer;
}
.menu__item:hover {
background: var(--bg);
}
.menu__item--danger {
color: var(--error);
}
/* --- tabs -------------------------------------------------------------- */
.tabs {
display: flex;
gap: 0.25rem;
border-bottom: 1px solid var(--border);
margin: 1.25rem 0 1rem;
}
.tabs__tab {
border: none;
background: none;
font: inherit;
color: var(--muted);
cursor: pointer;
padding: 0.5rem 0.9rem;
border-bottom: 2px solid transparent;
margin-bottom: -1px;
}
.tabs__tab:hover {
color: var(--text);
}
.tabs__tab--active {
color: var(--text);
font-weight: 600;
border-bottom-color: var(--accent);
}
.tabs__panel--narrow {
max-width: 42rem;
}
/* --- project configuration: status list ------------------------------- */
.config-section {
max-width: 32rem;
margin-top: 1.5rem;
}
.config-section h2 {
margin: 0 0 0.25rem;
font-size: 1.1rem;
}
.status-list {
list-style: none;
margin: 1rem 0 0;
padding: 0;
display: grid;
gap: 0.4rem;
}
.status-row {
display: flex;
align-items: center;
gap: 0.5rem;
border: 1px solid var(--border);
border-radius: 8px;
padding: 0.5rem 0.6rem;
background: var(--surface);
cursor: grab;
}
.status-row--ghost {
opacity: 0.5;
}
.status-row__name {
flex: 1;
min-width: 0;
word-break: break-word;
}
.status-row__delete {
flex: none;
border: none;
background: none;
color: var(--muted);
cursor: pointer;
font-size: 1rem;
padding: 0.2rem 0.4rem;
border-radius: 6px;
}
.status-row__delete:hover:not(:disabled) {
color: var(--error);
}
.status-row__delete:disabled {
opacity: 0.4;
cursor: not-allowed;
}
.status-list__new {
display: flex;
gap: 0.4rem;
margin-top: 0.75rem;
}
.status-list__new input {
flex: 1;
min-width: 0;
font: inherit;
font-size: 0.9rem;
padding: 0.4rem 0.5rem;
border: 1px solid var(--border);
border-radius: 6px;
background: var(--bg);
color: var(--text);
}
.status-list__new button[type='submit'] {
flex: none;
padding: 0.4rem 0.7rem;
font-size: 0.9rem;
border-radius: 6px;
}
.modal__field {
display: grid;
gap: 0.3rem;
font-size: 0.9rem;
margin-top: 0.75rem;
}
.modal__field select {
padding: 0.5rem 0.6rem;
border: 1px solid var(--border);
border-radius: 8px;
background: var(--bg);
color: var(--text);
font: inherit;
}
/* --- kanban board ---------------------------------------------------- */
.kanban {
display: flex;
gap: 1rem;
align-items: flex-start;
overflow-x: auto;
padding-bottom: 0.5rem;
}
.kanban__col {
flex: 0 0 16rem;
background: var(--bg);
border: 1px solid var(--border);
border-radius: 10px;
padding: 0.75rem;
}
.kanban__col--inbox {
background: var(--inbox-bg);
}
.kanban__head {
display: flex;
align-items: center;
justify-content: space-between;
margin-bottom: 0.6rem;
font-size: 0.85rem;
font-weight: 600;
}
.kanban__count {
color: var(--muted);
font-weight: 400;
}
.kanban__cards {
display: flex;
flex-direction: column;
gap: 0.5rem;
min-height: 3rem;
}
/* Empty column/inbox: a subtle drop target, styled like the dashboard's
"Create a project" tile (dashed border, transparent). :empty tracks the
real DOM child count, so this naturally steps aside for Sortable's own
ghost placeholder while something is dragged over it. */
.kanban__cards:empty {
border: 1px dashed var(--border);
border-radius: 8px;
}
.kanban__cards:empty::before {
content: '⬇ Drop cards here';
flex: 1;
display: flex;
align-items: center;
justify-content: center;
text-align: center;
color: var(--muted);
font-size: 0.8rem;
}
.kanban-card {
background: var(--surface);
border: 1px solid var(--border);
border-radius: 8px;
padding: 0.55rem 0.65rem;
font-size: 0.9rem;
cursor: grab;
}
.kanban-card--ghost {
opacity: 0.5;
}
.kanban__new {
display: flex;
gap: 0.4rem;
margin-top: 0.6rem;
}
.kanban__new input {
flex: 1;
min-width: 0;
font: inherit;
font-size: 0.9rem;
padding: 0.4rem 0.5rem;
border: 1px solid var(--border);
border-radius: 6px;
background: var(--surface);
color: var(--text);
}
.kanban__new button[type="submit"] {
flex: none;
padding: 0.4rem 0.7rem;
font-size: 0.9rem;
border-radius: 6px;
}
/* --- confirmation modal --------------------------------------------------- */
.modal {
position: fixed;
inset: 0;
z-index: 100;
display: flex;
align-items: center;
justify-content: center;
padding: 1rem;
}
.modal__backdrop {
position: absolute;
inset: 0;
background: rgba(0, 0, 0, 0.45);
}
.modal__dialog {
position: relative;
z-index: 1;
width: 100%;
max-width: 24rem;
background: var(--surface);
border: 1px solid var(--border);
border-radius: 12px;
padding: 1.5rem;
}
.modal__dialog h2 {
margin: 0 0 0.5rem;
font-size: 1.15rem;
}
.modal__actions {
display: flex;
justify-content: flex-end;
gap: 0.6rem;
margin-top: 1.25rem;
}
.btn-secondary,
.btn-danger {
border: 1px solid var(--border);
border-radius: 8px;
padding: 0.5rem 0.9rem;
font: inherit;
font-size: 0.95rem;
cursor: pointer;
}
.btn-secondary {
background: var(--bg);
color: var(--text);
}
.btn-danger {
background: #b3261e;
border-color: #b3261e;
color: #fff;
}
.btn-secondary:disabled,
.btn-danger:disabled {
opacity: 0.6;
cursor: default;
}
.form {
display: grid;
gap: 1rem;
margin: 1.25rem 0;
}
.form--new-card {
margin-top: 1.5rem;
padding-top: 1.25rem;
border-top: 1px solid var(--border);
}
.form label {
display: grid;
gap: 0.3rem;
font-size: 0.9rem;
}
.form input {
padding: 0.55rem 0.7rem;
border: 1px solid var(--border);
border-radius: 8px;
background: var(--bg);
color: var(--text);
font-size: 1rem;
}
button[type="submit"],
.btn-primary {
padding: 0.6rem 1rem;
border: none;
border-radius: 8px;
background: var(--accent);
color: var(--accent-text);
font-size: 1rem;
cursor: pointer;
}
.btn-primary {
display: block;
width: 100%;
text-align: center;
}
button[type="submit"]:disabled,
.btn-primary:disabled {
opacity: 0.6;
cursor: progress;
}
.link {
border: none;
background: none;
color: var(--accent);
cursor: pointer;
font: inherit;
padding: 0;
}
a {
color: var(--accent);
}
.hint {
color: var(--muted);
}
.field-error,
.form-error {
color: var(--error);
font-size: 0.85rem;
}