servercontrol/assets/styles/app.css

405 lines
12 KiB
CSS

/* ── Layout ────────────────────────────────────────────────── */
.app-wrapper {
display: flex;
min-height: 100vh;
}
.main-column {
flex: 1;
display: flex;
flex-direction: column;
min-height: 100vh;
overflow-x: hidden;
}
/* ── Sidebar ───────────────────────────────────────────────── */
.sidebar {
width: 220px;
flex-shrink: 0;
min-height: 100vh;
padding: 1rem;
display: flex;
flex-direction: column;
}
.sidebar .brand {
font-size: 1.05rem;
font-weight: 700;
text-decoration: none;
display: block;
margin-bottom: 1.25rem;
padding: .3rem .6rem;
border-radius: 6px;
letter-spacing: -.01em;
}
.sidebar .nav-link {
border-radius: 6px;
padding: .45rem .75rem;
font-size: .88rem;
transition: background .12s, color .12s;
}
.sidebar-section-label {
font-size: .63rem;
font-weight: 700;
letter-spacing: .1em;
text-transform: uppercase;
padding: .3rem .75rem .1rem;
display: block;
}
/* ── Sidebar footer ────────────────────────────────────────── */
.sidebar-footer {
padding-top: .75rem;
border-top: 1px solid transparent;
}
.sidebar-user {
display: flex;
align-items: center;
gap: .5rem;
padding: .3rem .5rem;
margin-bottom: .4rem;
border-radius: 6px;
}
.user-avatar {
width: 26px;
height: 26px;
border-radius: 50%;
background: #5865f2;
color: #fff;
font-size: .65rem;
font-weight: 700;
display: flex;
align-items: center;
justify-content: center;
flex-shrink: 0;
}
.user-name {
font-size: .82rem;
font-weight: 500;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.sidebar-controls {
display: flex;
align-items: center;
gap: .4rem;
padding: .2rem .5rem;
}
/* ── Theme switch (iOS style) ──────────────────────────────── */
.theme-switch-wrap {
display: flex;
align-items: center;
gap: .35rem;
font-size: .72rem;
}
.theme-switch {
position: relative;
display: inline-block;
cursor: pointer;
margin: 0;
}
#theme-checkbox {
opacity: 0;
position: absolute;
z-index: -1;
width: 0;
height: 0;
}
.theme-track {
display: inline-block;
width: 38px;
height: 22px;
border-radius: 22px;
background: #9da3ae;
position: relative;
transition: background .22s ease-in-out;
vertical-align: middle;
}
.theme-track::after {
content: '';
position: absolute;
top: 3px;
left: 3px;
width: 16px;
height: 16px;
border-radius: 50%;
background: #fff;
box-shadow: 0 1px 4px rgba(0,0,0,.35);
transition: left .22s ease-in-out, transform .22s ease-in-out;
}
#theme-checkbox:checked + .theme-track {
background: #5865f2;
}
#theme-checkbox:checked + .theme-track::after {
left: calc(100% - 3px);
transform: translateX(-100%);
}
.theme-icon-sun { color: #f0a30c; }
.theme-icon-moon { color: #9da3ae; }
/* ── Logout button ─────────────────────────────────────────── */
.btn-logout {
width: 28px;
height: 28px;
display: flex;
align-items: center;
justify-content: center;
border-radius: 6px;
text-decoration: none;
font-size: .85rem;
transition: background .12s, color .12s;
flex-shrink: 0;
}
/* ── Dark mode ─────────────────────────────────────────────── */
[data-bs-theme="dark"] body {
background-color: #313338;
color: #dbdee1;
}
[data-bs-theme="dark"] .sidebar {
background: #2b2d31;
border-right: 1px solid #1e1f22;
}
[data-bs-theme="dark"] .sidebar .brand { color: #fff; }
[data-bs-theme="dark"] .sidebar .nav-link { color: #b5bac1; }
[data-bs-theme="dark"] .sidebar .nav-link:hover { color: #dde0e4; background: rgba(255,255,255,.05); }
[data-bs-theme="dark"] .sidebar .nav-link.active {
color: #fff;
background: rgba(88,101,242,.18);
box-shadow: inset 3px 0 0 #5865f2;
}
[data-bs-theme="dark"] .sidebar-section-label { color: #72767d; }
[data-bs-theme="dark"] .sidebar-footer { border-top-color: #1e1f22; }
[data-bs-theme="dark"] .sidebar-user { color: #dbdee1; }
[data-bs-theme="dark"] .user-name { color: #dbdee1; }
[data-bs-theme="dark"] .btn-logout { color: #72767d; }
[data-bs-theme="dark"] .btn-logout:hover { background: rgba(242,63,67,.12); color: #f23f43; }
[data-bs-theme="dark"] .card {
background: #2b2d31 !important;
border: 1px solid #1e1f22 !important;
box-shadow: 0 2px 8px rgba(0,0,0,.4);
}
[data-bs-theme="dark"] .card-header {
background: rgba(0,0,0,.22) !important;
border-bottom: 1px solid #1e1f22 !important;
color: #e0e2e5;
}
[data-bs-theme="dark"] .card-footer {
background: rgba(0,0,0,.14) !important;
border-top-color: #1e1f22 !important;
}
[data-bs-theme="dark"] .table { color: #dbdee1; border-color: #3a3d44; }
[data-bs-theme="dark"] .table th { color: #9ea3ab; }
[data-bs-theme="dark"] .table-light,
[data-bs-theme="dark"] .table-light th,
[data-bs-theme="dark"] .table-light td { color: #212529 !important; }
[data-bs-theme="dark"] .form-control,
[data-bs-theme="dark"] .form-select {
background-color: #1e1f22;
border-color: #3a3d44;
color: #dbdee1;
}
[data-bs-theme="dark"] .form-control:focus,
[data-bs-theme="dark"] .form-select:focus {
border-color: #5865f2;
box-shadow: 0 0 0 3px rgba(88,101,242,.2);
background-color: #1e1f22;
color: #dbdee1;
}
[data-bs-theme="dark"] .input-group-text {
background-color: #1e1f22;
border-color: #3a3d44;
color: #72767d;
}
[data-bs-theme="dark"] .modal-content {
background: #2b2d31;
border-color: #1e1f22;
}
[data-bs-theme="dark"] .modal-header,
[data-bs-theme="dark"] .modal-footer { border-color: #3a3d44; }
/* ── Light mode ────────────────────────────────────────────── */
[data-bs-theme="light"] body {
background-color: #f2f3f5;
color: #2e3338;
}
[data-bs-theme="light"] .sidebar {
background: #f2f3f5;
border-right: 1px solid #e3e5e8;
}
[data-bs-theme="light"] .sidebar .brand { color: #1a1c1e; }
[data-bs-theme="light"] .sidebar .nav-link { color: #4e5058; }
[data-bs-theme="light"] .sidebar .nav-link:hover { color: #1a1c1e; background: rgba(0,0,0,.05); }
[data-bs-theme="light"] .sidebar .nav-link.active {
color: #5865f2;
background: rgba(88,101,242,.1);
box-shadow: inset 3px 0 0 #5865f2;
}
[data-bs-theme="light"] .sidebar-section-label { color: #747f8d; }
[data-bs-theme="light"] .sidebar-footer { border-top-color: #e3e5e8; }
[data-bs-theme="light"] .sidebar-user { color: #2e3338; }
[data-bs-theme="light"] .user-name { color: #2e3338; }
[data-bs-theme="light"] .btn-logout { color: #9da3ae; }
[data-bs-theme="light"] .btn-logout:hover { background: rgba(242,63,67,.08); color: #f23f43; }
[data-bs-theme="light"] .card {
background: #fff !important;
border: 1px solid #e3e5e8 !important;
box-shadow: 0 1px 4px rgba(0,0,0,.06);
}
[data-bs-theme="light"] .card-header {
background: #f7f8f9 !important;
border-bottom: 1px solid #e3e5e8 !important;
color: #1a1c1e;
}
[data-bs-theme="light"] .card-footer {
background: #f7f8f9 !important;
border-top-color: #e3e5e8 !important;
}
[data-bs-theme="light"] .form-control:focus,
[data-bs-theme="light"] .form-select:focus {
border-color: #5865f2;
box-shadow: 0 0 0 3px rgba(88,101,242,.15);
}
[data-bs-theme="light"] .text-white-50 { color: rgba(0,0,0,.45) !important; }
/* ── Status ────────────────────────────────────────────────── */
.status-online { color: #23a55a; }
.status-offline { color: #f23f43; }
.status-unknown { color: #80848e; }
/* ── Tables ────────────────────────────────────────────────── */
thead th { border-bottom: 2px solid var(--bs-border-color); font-size: .82rem; letter-spacing: .02em; }
/* ── Terminal ──────────────────────────────────────────────── */
.terminal-titlebar {
background: #161b22;
padding: 7px 14px;
border-radius: 8px 8px 0 0;
display: flex;
align-items: center;
user-select: none;
border-bottom: 1px solid #21262d;
}
.terminal-host {
color: #58a6ff;
font-size: .78rem;
font-family: 'Courier New', monospace;
}
.terminal-body {
padding: 12px 14px;
height: 380px;
overflow-y: auto;
color: #c9d1d9;
background: #0d1117;
font-size: .82rem;
line-height: 1.65;
}
.terminal-body::-webkit-scrollbar { width: 5px; }
.terminal-body::-webkit-scrollbar-thumb { background: #30363d; border-radius: 3px; }
.term-line { white-space: pre-wrap; word-break: break-all; }
.term-prompt { color: #79c0ff; }
.term-success { color: #56d364; }
.term-error { color: #ff7b72; }
.term-info { color: #8b949e; font-style: italic; }
.term-warn { color: #e3b341; }
.terminal-input-row {
display: flex;
align-items: center;
background: #0d1117;
border-top: 1px solid #21262d;
padding: 8px 14px;
border-radius: 0 0 8px 8px;
}
.terminal-ps1 {
color: #79c0ff;
font-family: 'Courier New', monospace;
font-size: .82rem;
white-space: nowrap;
margin-right: 6px;
}
.terminal-cmd {
flex: 1;
background: transparent;
border: none;
outline: none;
color: #c9d1d9;
font-family: 'Courier New', Courier, monospace;
font-size: .82rem;
caret-color: #79c0ff;
}
.terminal-cmd::placeholder { color: #3d444d; }
#terminal-card { display: flex; flex-direction: column; }
#terminal-card .card-body { display: flex; flex-direction: column; background: #0d1117 !important; padding: 0 !important; }
/* ── Service cards ─────────────────────────────────────────── */
.service-card { border: 1px solid var(--bs-border-color) !important; box-shadow: 0 1px 3px rgba(0,0,0,.1) !important; }
.service-card .card-footer { background: transparent !important; border-top: 1px solid var(--bs-border-color) !important; }
/* ── Forms ─────────────────────────────────────────────────── */
.form-section-title {
font-size: .7rem;
font-weight: 700;
letter-spacing: .1em;
text-transform: uppercase;
color: #80848e;
margin-bottom: .75rem;
padding-bottom: .4rem;
border-bottom: 1px solid rgba(128,132,142,.2);
}
.field-icon { color: #80848e; }
.input-group-text { background: transparent; }
.role-badge { font-size: .75rem; padding: .3em .6em; }
/* ── Server picker ─────────────────────────────────────────── */
.server-search-wrap { position: relative; }
.server-search-wrap .bi-search {
position: absolute; left: 10px; top: 50%; transform: translateY(-50%);
color: #80848e; pointer-events: none;
}
#server-search { padding-left: 2rem; }
#server-list { max-height: 340px; overflow-y: auto; }
#server-list::-webkit-scrollbar { width: 5px; }
#server-list::-webkit-scrollbar-thumb { background: rgba(128,132,142,.3); border-radius: 3px; }
.server-item { transition: background .12s; }
.server-item.hidden { display: none !important; }
.grant-form {
display: none;
background: rgba(var(--bs-primary-rgb), .05);
border-top: 1px solid rgba(var(--bs-primary-rgb), .15);
padding: .75rem 1rem;
gap: .5rem;
}
.server-item.open .grant-form { display: flex; flex-wrap: wrap; align-items: flex-end; }
.grant-form .form-label { font-size: .78rem; font-weight: 600; margin-bottom: .2rem; }
.grant-form .form-control { font-size: .82rem; }