Files
nodewarden/webapp/src/styles.css
T

1377 lines
20 KiB
CSS

:root {
--bg: #f3f5f8;
--panel: #ffffff;
--line: #d7dde6;
--text: #0f172a;
--muted: #667085;
--primary: #2563eb;
--primary-hover: #1d4ed8;
--danger: #e11d48;
--danger-hover: #be123c;
--radius: 12px;
}
* {
box-sizing: border-box;
}
html,
body,
#root {
margin: 0;
padding: 0;
width: 100%;
height: 100%;
color: var(--text);
background: var(--bg);
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}
.loading-screen {
height: 100%;
display: grid;
place-items: center;
color: var(--muted);
font-size: 18px;
}
.auth-page {
min-height: 100%;
display: grid;
place-items: center;
padding: 24px;
background: #e9edf3;
}
.public-send-page {
min-height: 80vh;
align-items: center;
justify-items: center;
}
.auth-card {
width: 100%;
background: #f5f7fb;
border: 1px solid #d5dce7;
border-radius: 16px;
box-shadow: 0 14px 32px rgba(15, 23, 42, 0.08);
padding: 28px;
}
.auth-card h1 {
margin: 0 0 4px 0;
text-align: center;
}
.standalone-shell {
width: min(640px, 100%);
display: grid;
gap: 12px;
}
.standalone-brand {
display: inline-flex;
align-items: center;
gap: 10px;
margin-bottom: 12px;
}
.standalone-brand-outside {
justify-content: center;
width: 100%;
margin-bottom: 2px;
}
.standalone-brand-logo {
width: 56px;
height: 56px;
object-fit: contain;
flex-shrink: 0;
}
.standalone-brand-title {
font-size: 42px;
font-weight: 800;
line-height: 1;
color: #1e293b;
}
.standalone-title {
margin: 0 0 4px 0;
text-align: left;
font-size: 30px;
line-height: 1.15;
}
.standalone-muted {
text-align: left;
}
.jwt-warning-head {
display: flex;
align-items: center;
justify-content: center;
gap: 10px;
margin-bottom: 10px;
color: #b45309;
text-align: center;
}
.jwt-warning-box {
border: 1px solid #f1d8a5;
border-radius: 12px;
background: #fffaf0;
padding: 12px 14px;
}
.jwt-warning-label {
font-size: 13px;
font-weight: 700;
color: #92400e;
margin-bottom: 6px;
}
.jwt-warning-list {
margin: 0;
padding-left: 18px;
color: #334155;
line-height: 1.55;
}
.jwt-generator {
margin-top: 14px;
}
.jwt-generator-actions {
margin-top: 10px;
display: flex;
align-items: center;
gap: 10px;
flex-wrap: wrap;
}
.jwt-copy-hint {
color: #15803d;
font-size: 13px;
font-weight: 700;
}
.standalone-footer {
width: 100%;
text-align: center;
font-size: 13px;
color: #64748b;
}
.standalone-footer a {
color: #1d4ed8;
font-weight: 700;
text-decoration: none;
}
.standalone-footer a:hover {
text-decoration: underline;
}
.muted {
margin: 0 0 16px 0;
text-align: center;
color: var(--muted);
}
.field {
display: block;
margin-bottom: 14px;
}
.field > span {
display: block;
margin-bottom: 8px;
font-size: 14px;
font-weight: 600;
}
.input {
width: 100%;
height: 48px;
border: 1px solid #3f5b9e;
border-radius: 10px;
padding: 10px 12px;
font-size: 16px;
outline: none;
background: #fff;
}
select.input {
appearance: none;
-webkit-appearance: none;
-moz-appearance: none;
padding-right: 42px;
background-image:
linear-gradient(45deg, transparent 50%, #365fa8 50%),
linear-gradient(135deg, #365fa8 50%, transparent 50%);
background-position:
calc(100% - 18px) calc(50% - 3px),
calc(100% - 12px) calc(50% - 3px);
background-size: 6px 6px, 6px 6px;
background-repeat: no-repeat;
}
input[type='file'].input {
height: auto;
min-height: 48px;
padding: 8px 10px;
font-size: 14px;
line-height: 1.4;
}
input[type='file'].input::file-selector-button {
height: 32px;
border: 1px solid #3f5b9e;
border-radius: 999px;
padding: 0 12px;
background: #eef4ff;
color: #1f4ea0;
font-weight: 700;
cursor: pointer;
margin-right: 10px;
}
input[type='file'].input::file-selector-button:hover {
background: #dfeaff;
border-color: #2f5fd8;
}
.textarea {
min-height: 110px;
height: auto;
resize: vertical;
}
.input:focus {
border-color: #2f5fd8;
}
.input-readonly {
background: #eef2f7;
color: #475569;
}
.input:disabled {
background: #e2e8f0;
border-color: #cbd5e1;
color: #94a3b8;
cursor: not-allowed;
}
.password-wrap {
position: relative;
}
.password-wrap .input {
padding-right: 44px;
}
.password-toggle {
position: absolute;
right: 8px;
top: 50%;
transform: translateY(-50%);
border: none;
background: transparent;
color: #275ac2;
cursor: pointer;
display: grid;
place-items: center;
}
.eye-btn {
position: absolute;
right: 10px;
bottom: 9px;
width: 30px;
height: 30px;
border: none;
background: transparent;
cursor: pointer;
display: grid;
place-items: center;
color: #334155;
}
.btn {
height: 42px;
border: 1px solid transparent;
border-radius: 999px;
padding: 0 16px;
font-size: 15px;
font-weight: 700;
cursor: pointer;
display: inline-flex;
align-items: center;
justify-content: center;
gap: 6px;
}
.btn-icon {
flex-shrink: 0;
}
.btn.full {
width: 100%;
height: 50px;
font-size: 22px;
}
.btn.small {
height: 34px;
font-size: 14px;
}
.btn-primary {
background: var(--primary);
border-color: var(--primary);
color: #fff;
}
.btn-primary:hover {
background: var(--primary-hover);
border-color: var(--primary-hover);
}
.btn-secondary {
background: #fff;
border-color: var(--primary);
color: var(--primary);
}
.btn-secondary:hover {
background: #eff5ff;
}
.btn-danger {
background: #fff;
border-color: var(--danger);
color: var(--danger);
}
.btn-danger:hover {
background: #fff1f2;
}
.btn:disabled {
background: #e2e8f0;
border-color: #cbd5e1;
color: #94a3b8;
cursor: not-allowed;
}
.or {
text-align: center;
margin: 10px 0;
color: #334155;
}
.app-page {
min-height: 100%;
padding: 20px;
background: #e9edf3;
}
.app-shell {
height: calc(100vh - 40px);
max-width: 1600px;
margin: 0 auto;
background: #f5f7fb;
border: 1px solid #d5dce7;
border-radius: 18px;
box-shadow: 0 18px 40px rgba(15, 23, 42, 0.08);
display: flex;
flex-direction: column;
overflow: hidden;
}
.topbar {
height: 58px;
background: #f8fafc;
border-bottom: 1px solid #d9e0ea;
color: #0f172a;
display: flex;
align-items: center;
justify-content: space-between;
padding: 0 14px;
}
.brand {
display: inline-flex;
align-items: center;
font-size: 34px;
font-weight: 800;
color: #1e293b;
}
.brand-logo {
width: 57px;
height: 57px;
object-fit: contain;
}
.topbar-actions {
display: flex;
align-items: center;
gap: 8px;
}
.topbar-actions .btn {
height: 34px;
border-radius: 10px;
padding: 0 12px;
font-size: 13px;
font-weight: 600;
}
.user-chip {
display: inline-flex;
align-items: center;
gap: 6px;
height: 34px;
border-radius: 999px;
padding: 0 12px;
border: 1px solid #d5deea;
background: #fff;
color: #334155;
font-size: 14px;
font-weight: 600;
}
.app-main {
flex: 1;
min-height: 0;
display: grid;
grid-template-columns: 200px 1fr;
}
.app-side {
border-right: 1px solid #d9e0ea;
background: #eef3f9;
padding: 12px 10px;
display: flex;
flex-direction: column;
gap: 6px;
}
.side-link {
display: flex;
align-items: center;
gap: 8px;
padding: 9px 10px;
border-radius: 9px;
color: #0f172a;
text-decoration: none;
border: 1px solid transparent;
font-weight: 600;
font-size: 14px;
}
.side-link:hover {
background: #e4ecf8;
}
.side-link.active {
background: #d7e6fb;
border-color: #bcd3f6;
color: #0f3f95;
}
.side-spacer {
flex: 1;
}
.side-add-btn,
.side-lock-btn {
width: 100%;
}
.side-add-btn {
justify-content: flex-start;
margin-top: 8px;
}
.side-add-btn.btn-primary {
background: #1e4f95;
border-color: #1e4f95;
}
.side-add-btn.btn-primary:hover {
background: #1b4888;
border-color: #1b4888;
}
.content {
min-height: 0;
padding: 8px;
overflow: auto;
}
.vault-grid {
display: grid;
grid-template-columns: 240px minmax(420px, 46%) minmax(575px, 1fr);
gap: 12px;
height: 100%;
min-height: 0;
padding: 2px;
}
.sidebar,
.list-panel,
.card {
background: #fff;
border: 1px solid #d8dee8;
border-radius: 12px;
box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05);
}
.sidebar {
padding: 0;
overflow: auto;
border: none;
box-shadow: none;
background: transparent;
}
.sidebar-block {
border: 1px solid #e1e6ef;
border-radius: 10px;
padding: 10px;
margin-bottom: 8px;
background: #fff;
}
.sidebar-title {
font-size: 13px;
font-weight: 700;
color: #344054;
margin-bottom: 8px;
}
.sidebar-title-row {
display: flex;
align-items: center;
justify-content: space-between;
padding-bottom: 8px;
}
.sidebar-title-row .sidebar-title {
margin-bottom: 0;
}
.folder-add-btn {
border: none;
background: transparent;
color: #334155;
display: inline-flex;
align-items: center;
justify-content: center;
cursor: pointer;
padding: 0;
line-height: 1;
}
.folder-add-btn:hover {
color: #1d4ed8;
}
.search-input {
width: 100%;
height: 40px;
border: 1px solid #c9d4e4;
border-radius: 10px;
padding: 0 12px;
background: #fff;
}
.tree-btn {
width: 100%;
min-width: 0;
border: none;
background: transparent;
text-align: left;
border-radius: 8px;
padding: 8px 10px;
margin-bottom: 4px;
cursor: pointer;
display: flex;
align-items: center;
gap: 8px;
}
.tree-btn.active {
background: #eef4ff;
color: #175ddc;
font-weight: 700;
}
.tree-icon {
flex-shrink: 0;
}
.tree-label {
min-width: 0;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.list-col {
display: flex;
flex-direction: column;
min-width: 0;
min-height: 0;
max-width: 540px;
}
.toolbar {
margin: 0 0 8px 0;
}
.toolbar.actions {
justify-content: flex-end;
}
.toolbar .btn.small {
height: 30px;
border-radius: 9px;
font-size: 12px;
}
.list-head {
display: flex;
align-items: center;
gap: 10px;
margin-bottom: 8px;
}
.list-head .search-input {
height: 38px;
}
.list-head .btn {
white-space: nowrap;
}
.list-panel {
overflow: auto;
min-height: 0;
padding: 8px;
}
.list-item {
width: 100%;
background: #fff;
border: 1px solid #e1e6ef;
border-radius: 10px;
padding: 10px 12px;
display: flex;
align-items: flex-start;
gap: 10px;
margin-bottom: 8px;
}
.list-item:hover {
background: #f8fbff;
border-color: #cdd9ea;
}
.list-item.active {
background: linear-gradient(180deg, #e6f0ff, #d9e9ff);
border-color: #9dbbec;
box-shadow: inset 0 0 0 1px rgba(52, 93, 171, 0.08);
}
.row-check {
width: 16px;
height: 16px;
}
.row-main {
flex: 1;
min-width: 0;
border: none;
background: transparent;
padding: 0;
display: flex;
align-items: flex-start;
gap: 10px;
text-align: left;
cursor: pointer;
}
.list-icon-wrap {
width: 24px;
height: 24px;
display: grid;
place-items: center;
flex-shrink: 0;
margin-top: 1px;
}
.list-icon {
width: 24px;
height: 24px;
border-radius: 6px;
}
.list-icon-fallback {
display: grid;
place-items: center;
color: #64748b;
}
.list-icon-fallback svg {
width: 24px;
height: 24px;
}
.list-text {
flex: 1;
min-width: 0;
overflow: hidden;
}
.list-title {
display: block;
color: #175ddc;
font-size: 15px;
font-weight: 700;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.list-sub {
display: block;
color: #5f6f85;
margin-top: 2px;
font-size: 13px;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.detail-col {
overflow: auto;
min-height: 0;
}
.card {
padding: 12px 14px;
margin-bottom: 8px;
}
.card h4 {
margin-top: 0;
margin-bottom: 12px;
}
.detail-title {
margin: 0;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.detail-sub {
color: #667085;
margin-top: 8px;
}
.kv-line {
display: flex;
justify-content: space-between;
align-items: center;
gap: 10px;
border-bottom: 1px solid #ecf0f5;
padding: 10px 0;
}
.kv-line:last-child {
border-bottom: none;
}
.kv-line > span {
color: #64748b;
}
.kv-row {
display: grid;
grid-template-columns: minmax(0px, 80px) minmax(0, 1fr) auto;
align-items: center;
gap: 10px;
border-bottom: 1px solid #ecf0f5;
padding: 10px 0;
}
.kv-row:last-child {
border-bottom: none;
}
.kv-label {
color: #64748b;
min-width: 0;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.kv-main {
display: flex;
align-items: center;
gap: 10px;
justify-content: flex-start;
min-width: 0;
}
.kv-main > strong {
min-width: 0;
}
.totp-inline {
display: inline-flex;
align-items: center;
gap: 10px;
min-width: 0;
}
.totp-timer {
width: 30px;
height: 30px;
position: relative;
display: inline-grid;
place-items: center;
flex-shrink: 0;
}
.totp-ring {
width: 30px;
height: 30px;
transform: rotate(-90deg);
}
.totp-ring-track,
.totp-ring-progress {
fill: none;
stroke-width: 3;
}
.totp-ring-track {
stroke: #d9e2ef;
}
.totp-ring-progress {
stroke: #2563eb;
stroke-linecap: round;
transition: stroke-dashoffset 260ms linear, stroke 200ms ease;
}
.totp-timer-value {
position: absolute;
inset: 0;
display: grid;
place-items: center;
font-size: 11px;
font-weight: 700;
color: #0f172a;
}
.value-ellipsis {
display: block;
max-width: 100%;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.kv-actions {
display: flex;
align-items: center;
justify-content: flex-end;
gap: 8px;
flex-wrap: wrap;
flex-shrink: 0;
}
.custom-field-row {
grid-template-columns: minmax(110px, 220px) minmax(0, 1fr) auto;
}
.boolean-main {
min-width: 0;
gap: 8px;
}
.boolean-text {
min-width: 0;
}
.notes {
white-space: pre-wrap;
overflow-wrap: anywhere;
word-break: break-word;
color: #334155;
min-height: 48px;
}
.empty {
color: #667085;
display: grid;
place-items: center;
min-height: 120px;
}
.stack {
display: grid;
gap: 12px;
}
.field-grid {
display: grid;
grid-template-columns: repeat(2, minmax(0, 1fr));
gap: 10px;
}
.field-span-2 {
grid-column: 1 / -1;
}
.totp-grid {
display: grid;
grid-template-columns: 220px 1fr;
gap: 14px;
margin-bottom: 14px;
}
.totp-qr {
border: 1px solid var(--line);
border-radius: 10px;
background: #fff;
display: grid;
place-items: center;
min-height: 220px;
padding: 8px;
}
.totp-qr svg {
width: 180px;
height: 180px;
}
.totp-qr img {
width: 180px;
height: 180px;
}
.section-head {
display: flex;
align-items: center;
justify-content: space-between;
margin-bottom: 10px;
}
.actions {
display: flex;
gap: 8px;
flex-wrap: wrap;
}
.muted-inline {
color: var(--muted);
align-self: center;
font-size: 14px;
}
.create-menu-wrap {
position: relative;
}
.create-menu {
position: absolute;
left: 0;
top: calc(100% + 6px);
width: 220px;
background: #fff;
border: 1px solid var(--line);
border-radius: 12px;
box-shadow: 0 12px 28px rgba(15, 23, 42, 0.18);
overflow: hidden;
z-index: 20;
}
.create-menu-item {
width: 100%;
border: none;
background: #fff;
text-align: left;
padding: 11px 12px;
cursor: pointer;
font-weight: 600;
display: flex;
align-items: center;
gap: 8px;
}
.create-menu-item:hover {
background: #f1f5f9;
}
.uri-row {
display: grid;
grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto;
gap: 8px;
margin-bottom: 8px;
}
.website-row {
display: grid;
grid-template-columns: minmax(0, 1fr) auto;
gap: 8px;
margin-bottom: 8px;
}
.website-row .btn {
justify-self: start;
width: auto;
}
.cf-check {
margin-bottom: 0;
}
.cf-check.view {
margin: 0;
}
.cf-check input[type='checkbox'] {
width: 22px;
height: 22px;
}
.field-type-pill {
align-self: center;
height: 34px;
line-height: 34px;
border-radius: 999px;
background: #eef4ff;
color: #175ddc;
font-size: 12px;
font-weight: 700;
padding: 0 10px;
}
.star-on {
background: #eef4ff;
}
.detail-actions {
display: flex;
justify-content: space-between;
align-items: center;
margin: 12px 0;
}
.detail-delete-btn {
margin-left: auto;
}
.send-options {
display: grid;
gap: 8px;
color: #3a4a64;
}
.send-options label {
display: inline-flex;
align-items: center;
gap: 8px;
}
.local-error {
margin-top: 10px;
color: #b42318;
font-weight: 600;
}
.status-ok {
margin: 2px 0 10px 0;
color: #0f766e;
font-weight: 700;
}
.kv-line strong {
overflow-wrap: anywhere;
}
.check-line {
display: flex;
align-items: center;
gap: 8px;
margin-bottom: 12px;
color: #334155;
}
.table {
width: 100%;
border-collapse: collapse;
}
.table th,
.table td {
text-align: left;
border-bottom: 1px solid var(--line);
padding: 10px 8px;
font-size: 14px;
}
.table th {
color: #667085;
}
.input.small {
width: 120px;
}
.invite-toolbar {
display: flex;
justify-content: space-between;
align-items: center;
gap: 10px;
flex-wrap: wrap;
margin-bottom: 10px;
}
.invite-create-group {
align-items: flex-end;
}
.invite-hours-field {
margin: 0;
}
.invite-hours-field > span {
margin-bottom: 6px;
color: #5f6f85;
font-size: 12px;
font-weight: 600;
}
.trusted-cell {
display: inline-flex;
align-items: center;
gap: 6px;
}
.dialog-mask {
position: fixed;
inset: 0;
background: rgba(15, 23, 42, 0.5);
display: grid;
place-items: center;
z-index: 1200;
padding: 20px;
}
.dialog-card {
width: min(460px, 100%);
background: #fff;
border-radius: 20px;
border: 1px solid var(--line);
box-shadow: 0 20px 50px rgba(15, 23, 42, 0.2);
padding: 20px;
text-align: center;
}
.dialog-card .field {
text-align: left;
}
.dialog-icon {
font-size: 34px;
color: #f59e0b;
}
.dialog-title {
margin: 6px 0;
font-size: 30px;
}
.dialog-message {
color: #475467;
margin-bottom: 10px;
}
.dialog-btn {
width: 100%;
height: 50px;
font-size: 20px;
margin-top: 8px;
}
.dialog-extra {
margin-top: 8px;
}
.dialog-divider {
height: 1px;
background: var(--line);
margin: 8px 0 10px;
}
.settings-twofactor-grid {
display: grid;
grid-template-columns: repeat(2, minmax(0, 1fr));
gap: 12px;
}
.settings-subcard {
border: 1px solid var(--line);
border-radius: 12px;
padding: 12px;
background: #fff;
}
.settings-subcard h3 {
margin-top: 0;
margin-bottom: 10px;
}
.toast-stack {
position: fixed;
top: 16px;
right: 16px;
z-index: 1400;
width: min(420px, calc(100vw - 20px));
list-style: none;
margin: 0;
padding: 0;
display: grid;
gap: 10px;
}
.toast-item {
position: relative;
border-radius: 10px;
border: 1px solid #bbdfc6;
background: #dff4e5;
color: #0f5132;
padding: 12px 14px;
box-shadow: 0 10px 24px rgba(15, 23, 42, 0.12);
overflow: hidden;
display: flex;
justify-content: space-between;
align-items: center;
}
.toast-item.error {
border-color: #f2b8c1;
background: #fde7eb;
color: #9f1239;
}
.toast-text {
font-weight: 700;
padding-right: 10px;
}
.toast-close {
border: none;
background: transparent;
cursor: pointer;
font-size: 20px;
color: inherit;
}
.toast-progress {
position: absolute;
left: 0;
bottom: 0;
width: 100%;
height: 3px;
background: rgba(15, 23, 42, 0.2);
animation: toast-life 4.5s linear forwards;
}
@keyframes toast-life {
from {
transform: scaleX(1);
transform-origin: left center;
}
to {
transform: scaleX(0);
transform-origin: left center;
}
}
@media (max-width: 1180px) {
.app-page {
padding: 8px;
}
.app-shell {
height: calc(100vh - 16px);
border-radius: 12px;
}
.app-main {
grid-template-columns: 1fr;
}
.app-side {
border-right: none;
border-bottom: 1px solid #d9e0ea;
display: grid;
grid-template-columns: repeat(2, minmax(0, 1fr));
gap: 8px;
}
.side-spacer {
display: none;
}
.side-add-btn,
.side-lock-btn {
grid-column: span 1;
}
.vault-grid {
grid-template-columns: 1fr;
height: auto;
}
.sidebar {
max-height: 280px;
}
.totp-grid,
.field-grid {
grid-template-columns: 1fr;
}
.uri-row {
grid-template-columns: 1fr;
}
.settings-twofactor-grid {
grid-template-columns: 1fr;
}
.standalone-title {
font-size: 24px;
}
.standalone-brand-title {
font-size: 32px;
}
.standalone-footer {
font-size: 12px;
line-height: 1.4;
}
}