Files
LocalNav/static/style.css
T

477 lines
7.7 KiB
CSS

:root {
--bg: #0f1419;
--panel: #1a2332;
--border: #2d3a4d;
--text: #e8eef5;
--muted: #8b9cb3;
--accent: #3d8bfd;
--accent-dim: #2563c7;
--danger: #e05252;
--success: #3ecf8e;
}
* {
box-sizing: border-box;
}
body {
margin: 0;
font-family: "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
background: var(--bg);
color: var(--text);
min-height: 100vh;
}
a {
color: var(--accent);
text-decoration: none;
}
a:hover {
text-decoration: underline;
}
.topbar {
display: flex;
align-items: center;
justify-content: space-between;
padding: 0.65rem 1.25rem;
background: var(--panel);
border-bottom: 1px solid var(--border);
flex-shrink: 0;
}
.topbar h1 {
margin: 0;
font-size: 1.05rem;
font-weight: 600;
letter-spacing: 0.02em;
}
.topbar nav {
display: flex;
gap: 1rem;
align-items: center;
font-size: 0.9rem;
}
.topbar .user {
color: var(--muted);
font-size: 0.85rem;
}
.app-shell {
display: flex;
flex-direction: column;
min-height: 100vh;
}
.layout-main {
display: flex;
flex: 1;
min-height: 0;
}
.sidebar {
width: 280px;
min-width: 240px;
max-width: 40vw;
background: var(--panel);
border-right: 1px solid var(--border);
overflow-y: auto;
padding: 0.75rem 0;
flex-shrink: 0;
}
.sidebar-section {
margin-bottom: 1rem;
}
.sidebar-section h2 {
margin: 0 0 0.35rem;
padding: 0 1rem;
font-size: 0.72rem;
text-transform: uppercase;
letter-spacing: 0.08em;
color: var(--muted);
font-weight: 600;
}
.nav-link {
display: block;
padding: 0.45rem 1rem;
color: var(--text);
cursor: pointer;
border-left: 3px solid transparent;
font-size: 0.9rem;
text-decoration: none;
}
.nav-link:hover {
background: rgba(61, 139, 253, 0.08);
text-decoration: none;
}
.nav-link.active {
background: rgba(61, 139, 253, 0.15);
border-left-color: var(--accent);
text-decoration: none;
}
.content-column {
flex: 1;
display: flex;
flex-direction: column;
min-width: 0;
min-height: 0;
}
.service-dashboard {
flex: 1;
overflow-y: auto;
padding: 1.25rem 1.5rem 2rem;
background: linear-gradient(165deg, #0c1016 0%, var(--bg) 42%, #0a0d12 100%);
}
.service-dashboard[hidden] {
display: none !important;
}
.dash-section {
margin-bottom: 1.75rem;
}
.dash-section:last-child {
margin-bottom: 0;
}
.dash-section-title {
margin: 0 0 0.85rem;
font-size: 0.72rem;
font-weight: 600;
text-transform: uppercase;
letter-spacing: 0.1em;
color: var(--muted);
}
.service-card-grid {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(232px, 1fr));
gap: 1rem;
}
.service-card {
display: flex;
flex-direction: column;
align-items: flex-start;
gap: 0.4rem;
margin: 0;
padding: 1.05rem 1.15rem;
border: 1px solid var(--border);
border-radius: 12px;
background: linear-gradient(145deg, rgba(26, 35, 50, 0.95), rgba(18, 24, 34, 0.98));
color: var(--text);
font: inherit;
text-align: left;
cursor: pointer;
transition:
border-color 0.18s ease,
box-shadow 0.18s ease,
transform 0.18s ease;
}
.service-card:hover {
border-color: rgba(61, 139, 253, 0.5);
box-shadow:
0 0 0 1px rgba(61, 139, 253, 0.12),
0 12px 28px rgba(0, 0, 0, 0.35);
transform: translateY(-2px);
}
.service-card:active {
transform: translateY(0);
}
.service-card-title {
font-size: 1rem;
font-weight: 600;
letter-spacing: 0.02em;
}
.service-card-group {
font-size: 0.78rem;
color: var(--muted);
}
.dash-empty {
padding: 2rem 1rem;
text-align: center;
max-width: 28rem;
margin: 0 auto;
}
.frame-stack {
flex: 1;
display: flex;
flex-direction: column;
min-height: 0;
min-width: 0;
}
.frame-stack[hidden] {
display: none !important;
}
.frame-toolbar {
flex-shrink: 0;
display: flex;
align-items: center;
justify-content: space-between;
gap: 0.75rem;
padding: 0.5rem 0.9rem;
background: #0e141c;
border-bottom: 1px solid var(--border);
}
.frame-toolbar-left {
display: flex;
align-items: center;
gap: 0.65rem;
min-width: 0;
}
.btn-frame-back {
flex-shrink: 0;
padding: 0.32rem 0.55rem;
border-radius: 6px;
border: 1px solid var(--border);
background: rgba(255, 255, 255, 0.04);
color: var(--muted);
font: inherit;
font-size: 0.8rem;
cursor: pointer;
transition:
color 0.15s ease,
border-color 0.15s ease,
background 0.15s ease;
}
.btn-frame-back:hover {
color: var(--text);
border-color: var(--muted);
background: rgba(61, 139, 253, 0.1);
}
.frame-title {
font-size: 0.92rem;
font-weight: 600;
color: var(--text);
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.btn-toolbar-refresh {
flex-shrink: 0;
padding: 0.38rem 0.85rem;
font-size: 0.82rem;
}
.frame-wrap {
position: relative;
flex: 1;
min-width: 0;
min-height: 0;
background: #0a0e12;
}
.frame-wrap iframe {
position: absolute;
inset: 0;
width: 100%;
height: 100%;
border: none;
background: #0a0e12;
}
/* 登录页 */
.login-page {
min-height: 100vh;
display: flex;
align-items: center;
justify-content: center;
padding: 1.5rem;
}
.login-card {
width: 100%;
max-width: 380px;
background: var(--panel);
border: 1px solid var(--border);
border-radius: 10px;
padding: 1.75rem 1.5rem;
}
.login-card h1 {
margin: 0 0 1.25rem;
font-size: 1.25rem;
text-align: center;
}
.form-row {
margin-bottom: 1rem;
}
.form-row label {
display: block;
margin-bottom: 0.35rem;
font-size: 0.85rem;
color: var(--muted);
}
.form-row input,
.form-row select {
width: 100%;
padding: 0.55rem 0.65rem;
border-radius: 6px;
border: 1px solid var(--border);
background: var(--bg);
color: var(--text);
font-size: 0.95rem;
}
.btn {
display: inline-block;
padding: 0.5rem 1rem;
border-radius: 6px;
border: none;
font-size: 0.9rem;
cursor: pointer;
font-family: inherit;
text-align: center;
text-decoration: none;
}
.btn-primary {
background: var(--accent);
color: #fff;
width: 100%;
}
.btn-primary:hover {
background: var(--accent-dim);
}
.btn-secondary {
background: transparent;
color: var(--muted);
border: 1px solid var(--border);
}
.btn-secondary:hover {
color: var(--text);
border-color: var(--muted);
}
.btn-danger {
background: rgba(224, 82, 82, 0.2);
color: var(--danger);
border: 1px solid var(--danger);
font-size: 0.8rem;
padding: 0.25rem 0.5rem;
}
.flash-wrap {
max-width: 960px;
margin: 0 auto 1rem;
padding: 0 1rem;
}
.flash {
padding: 0.5rem 0.75rem;
border-radius: 6px;
margin-bottom: 0.35rem;
font-size: 0.88rem;
}
.flash.error {
background: rgba(224, 82, 82, 0.15);
color: #f0a8a8;
}
.flash.success {
background: rgba(62, 207, 142, 0.12);
color: var(--success);
}
.flash.info {
background: rgba(61, 139, 253, 0.12);
color: #9ec5ff;
}
/* 后台表格 */
.page-wrap {
max-width: 960px;
margin: 0 auto;
padding: 1.25rem 1rem 2rem;
}
.page-wrap h1 {
margin: 0 0 1rem;
font-size: 1.35rem;
}
.toolbar {
display: flex;
flex-wrap: wrap;
gap: 0.75rem;
align-items: center;
margin-bottom: 1rem;
}
.table-wrap {
overflow-x: auto;
border: 1px solid var(--border);
border-radius: 8px;
}
table.data {
width: 100%;
border-collapse: collapse;
font-size: 0.9rem;
}
table.data th,
table.data td {
padding: 0.55rem 0.75rem;
text-align: left;
border-bottom: 1px solid var(--border);
}
table.data th {
background: var(--panel);
color: var(--muted);
font-weight: 600;
font-size: 0.78rem;
text-transform: uppercase;
letter-spacing: 0.04em;
}
table.data tr:last-child td {
border-bottom: none;
}
table.data tr:hover td {
background: rgba(255, 255, 255, 0.02);
}
.inline-form {
display: inline;
}
.hint {
font-size: 0.82rem;
color: var(--muted);
margin-top: 0.35rem;
}
.errors {
color: var(--danger);
font-size: 0.8rem;
margin-top: 0.25rem;
}