Files
admin.derez.ai/styles.css
T
oliver 6fc9a29394 INIT
2026-06-06 05:52:48 -03:00

798 lines
18 KiB
CSS

/* ─── Reset & Base ──────────────────────────────────────────── */
*,
*::before,
*::after {
box-sizing: border-box;
margin: 0;
padding: 0;
}
:root {
--bg: #0f1117;
--bg-card: #1a1d27;
--bg-hover: #22263a;
--bg-input: #12151f;
--border: #2a2f45;
--accent: #4f8ef7;
--accent-dim: #2a4a8a;
--danger: #e05252;
--danger-dim: #5a1f1f;
--success: #3fc97e;
--warning: #f0a04b;
--text: #e4e8f5;
--text-muted: #7a82a0;
--sidebar-w: 230px;
--header-h: 54px;
--radius: 8px;
--shadow: 0 4px 24px rgba(0, 0, 0, 0.45);
}
html,
body {
height: 100%;
font-family: "Segoe UI", system-ui, sans-serif;
background: var(--bg);
color: var(--text);
font-size: 14px;
}
/* ─── Layout ────────────────────────────────────────────────── */
.layout {
display: flex;
height: 100vh;
overflow: hidden;
}
/* ─── Sidebar ───────────────────────────────────────────────── */
.sidebar {
width: var(--sidebar-w);
background: var(--bg-card);
border-right: 1px solid var(--border);
display: flex;
flex-direction: column;
flex-shrink: 0;
overflow-y: auto;
}
.sidebar-brand {
height: var(--header-h);
display: flex;
align-items: center;
gap: 10px;
padding: 0 18px;
border-bottom: 1px solid var(--border);
font-weight: 700;
font-size: 15px;
letter-spacing: 0.3px;
color: var(--accent);
flex-shrink: 0;
}
.sidebar-brand svg {
flex-shrink: 0;
}
.sidebar-section-label {
padding: 18px 18px 6px;
font-size: 11px;
text-transform: uppercase;
letter-spacing: 0.08em;
color: var(--text-muted);
font-weight: 600;
}
.nav-item {
display: flex;
align-items: center;
gap: 10px;
padding: 9px 18px;
cursor: pointer;
border-radius: 0;
color: var(--text-muted);
transition:
background 0.15s,
color 0.15s;
user-select: none;
border-left: 3px solid transparent;
}
.nav-item:hover {
background: var(--bg-hover);
color: var(--text);
}
.nav-item.active {
background: var(--bg-hover);
color: var(--accent);
border-left-color: var(--accent);
}
.nav-item svg {
flex-shrink: 0;
}
.sidebar-footer {
margin-top: auto;
padding: 14px 18px;
border-top: 1px solid var(--border);
}
.sidebar-footer .nav-item {
padding: 9px 0;
border-left: none;
}
/* ─── Main ──────────────────────────────────────────────────── */
.main {
flex: 1;
display: flex;
flex-direction: column;
overflow: hidden;
}
.topbar {
height: var(--header-h);
border-bottom: 1px solid var(--border);
display: flex;
align-items: center;
justify-content: space-between;
padding: 0 28px;
flex-shrink: 0;
gap: 14px;
}
.topbar-title {
font-size: 16px;
font-weight: 600;
}
.topbar-actions {
display: flex;
align-items: center;
gap: 10px;
}
.content {
flex: 1;
overflow-y: auto;
padding: 28px;
}
/* ─── Section visibility ────────────────────────────────────── */
.section {
display: none;
}
.section.active {
display: block;
}
/* ─── Cards ─────────────────────────────────────────────────── */
.card {
background: var(--bg-card);
border: 1px solid var(--border);
border-radius: var(--radius);
padding: 20px 24px;
margin-bottom: 20px;
}
.card-header {
display: flex;
align-items: center;
justify-content: space-between;
margin-bottom: 18px;
gap: 12px;
flex-wrap: wrap;
}
.card-title {
font-size: 15px;
font-weight: 600;
display: flex;
align-items: center;
gap: 8px;
}
/* ─── Buttons ───────────────────────────────────────────────── */
.btn {
display: inline-flex;
align-items: center;
gap: 6px;
padding: 7px 14px;
border-radius: 6px;
border: none;
cursor: pointer;
font-size: 13px;
font-weight: 500;
transition:
opacity 0.15s,
background 0.15s;
white-space: nowrap;
}
.btn:hover {
opacity: 0.85;
}
.btn:active {
opacity: 0.7;
}
.btn-primary {
background: var(--accent);
color: #fff;
}
.btn-danger {
background: var(--danger);
color: #fff;
}
.btn-ghost {
background: var(--bg-hover);
color: var(--text);
border: 1px solid var(--border);
}
.btn-success {
background: var(--success);
color: #000;
}
.btn-sm {
padding: 4px 10px;
font-size: 12px;
}
.btn:disabled {
opacity: 0.4;
cursor: not-allowed;
}
/* ─── Inputs ────────────────────────────────────────────────── */
.form-row {
display: flex;
gap: 12px;
flex-wrap: wrap;
align-items: flex-end;
}
.form-group {
display: flex;
flex-direction: column;
gap: 5px;
flex: 1;
min-width: 130px;
}
.form-group label {
font-size: 12px;
color: var(--text-muted);
font-weight: 500;
}
.form-group input,
.form-group select,
.form-group textarea {
background: var(--bg-input);
border: 1px solid var(--border);
border-radius: 6px;
color: var(--text);
padding: 8px 10px;
font-size: 13px;
outline: none;
transition: border-color 0.15s;
width: 100%;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
border-color: var(--accent);
}
.form-group select option {
background: var(--bg-card);
}
/* ─── Table ─────────────────────────────────────────────────── */
.table-wrap {
overflow-x: auto;
}
table {
width: 100%;
border-collapse: collapse;
}
thead tr {
border-bottom: 2px solid var(--border);
}
tbody tr {
border-bottom: 1px solid var(--border);
transition: background 0.1s;
}
tbody tr:hover {
background: var(--bg-hover);
}
th {
padding: 9px 12px;
text-align: left;
font-size: 11px;
text-transform: uppercase;
letter-spacing: 0.07em;
color: var(--text-muted);
white-space: nowrap;
}
td {
padding: 11px 12px;
vertical-align: middle;
}
td:last-child {
white-space: nowrap;
}
.badge {
display: inline-block;
padding: 2px 8px;
border-radius: 20px;
font-size: 11px;
font-weight: 600;
}
.badge-a {
background: #1a3a5c;
color: #5fb3f5;
}
.badge-aaaa {
background: #1a2f4c;
color: #8ac8f8;
}
.badge-cname {
background: #2a1f4a;
color: #a888f8;
}
.badge-mx {
background: #1f3a2a;
color: #5fd89a;
}
.badge-txt {
background: #3a2a1a;
color: #f0b060;
}
.badge-ns {
background: #3a1a2a;
color: #f080b0;
}
.badge-other {
background: #2a2a2a;
color: #9090a0;
}
.badge-eu {
background: #1a2f4c;
color: #8ac8f8;
}
.badge-us {
background: #1f3a2a;
color: #5fd89a;
}
.badge-region {
background: #2a2a2a;
color: #9090a0;
}
.status-dot {
display: inline-block;
width: 7px;
height: 7px;
border-radius: 50%;
margin-right: 5px;
}
.dot-enabled {
background: var(--success);
}
.dot-disabled {
background: var(--danger);
}
/* ─── Toast ─────────────────────────────────────────────────── */
#toast-container {
position: fixed;
bottom: 24px;
right: 24px;
display: flex;
flex-direction: column;
gap: 8px;
z-index: 9999;
}
.toast {
background: var(--bg-card);
border: 1px solid var(--border);
border-left: 4px solid var(--accent);
border-radius: var(--radius);
padding: 12px 18px;
min-width: 260px;
max-width: 380px;
box-shadow: var(--shadow);
animation: slideIn 0.2s ease;
font-size: 13px;
}
.toast.toast-error {
border-left-color: var(--danger);
}
.toast.toast-success {
border-left-color: var(--success);
}
.toast.toast-warning {
border-left-color: var(--warning);
}
@keyframes slideIn {
from {
transform: translateX(60px);
opacity: 0;
}
to {
transform: translateX(0);
opacity: 1;
}
}
/* ─── Modal ─────────────────────────────────────────────────── */
.modal-backdrop {
position: fixed;
inset: 0;
background: rgba(0, 0, 0, 0.6);
z-index: 1000;
display: flex;
align-items: center;
justify-content: center;
padding: 20px;
opacity: 0;
pointer-events: none;
transition: opacity 0.2s;
}
.modal-backdrop.open {
opacity: 1;
pointer-events: all;
}
.modal {
background: var(--bg-card);
border: 1px solid var(--border);
border-radius: 10px;
width: 100%;
max-width: 500px;
box-shadow: var(--shadow);
transform: translateY(20px);
transition: transform 0.2s;
}
.modal-backdrop.open .modal {
transform: translateY(0);
}
.modal-header {
padding: 18px 22px 16px;
border-bottom: 1px solid var(--border);
display: flex;
align-items: center;
justify-content: space-between;
}
.modal-title {
font-size: 15px;
font-weight: 600;
}
.modal-close {
background: none;
border: none;
cursor: pointer;
color: var(--text-muted);
font-size: 20px;
line-height: 1;
padding: 2px 6px;
border-radius: 4px;
}
.modal-close:hover {
background: var(--bg-hover);
color: var(--text);
}
.modal-body {
padding: 22px;
display: flex;
flex-direction: column;
gap: 14px;
}
.modal-footer {
padding: 14px 22px;
border-top: 1px solid var(--border);
display: flex;
justify-content: flex-end;
gap: 10px;
}
/* ─── Confirm dialog ────────────────────────────────────────── */
#confirm-backdrop .modal {
max-width: 380px;
}
/* ─── Login modal ───────────────────────────────────────────── */
#login-backdrop {
position: fixed;
inset: 0;
background: rgba(0, 0, 0, 0.75);
z-index: 2000;
display: flex;
align-items: center;
justify-content: center;
padding: 20px;
backdrop-filter: blur(4px);
}
#login-backdrop.hidden {
display: none;
}
#login-modal {
background: var(--bg-card);
border: 1px solid var(--border);
border-radius: 12px;
width: 100%;
max-width: 360px;
box-shadow: var(--shadow);
}
.login-logo {
text-align: center;
padding: 28px 22px 6px;
}
.login-logo svg {
color: var(--accent);
}
.login-logo h2 {
margin-top: 10px;
font-size: 17px;
font-weight: 700;
color: var(--accent);
}
.login-logo p {
margin-top: 4px;
font-size: 12px;
color: var(--text-muted);
}
#login-error {
margin: 0 22px;
padding: 8px 12px;
background: var(--danger-dim);
border: 1px solid var(--danger);
border-radius: 6px;
font-size: 12px;
color: var(--danger);
display: none;
}
/* ─── Settings ──────────────────────────────────────────────── */
.settings-grid {
display: grid;
grid-template-columns: 1fr 1fr;
gap: 16px;
}
@media (max-width: 600px) {
.settings-grid {
grid-template-columns: 1fr;
}
}
/* ─── Empty state ───────────────────────────────────────────── */
.empty-state {
text-align: center;
padding: 48px 20px;
color: var(--text-muted);
}
.empty-state svg {
margin-bottom: 14px;
opacity: 0.4;
}
.empty-state p {
font-size: 14px;
}
/* ─── Spinner ───────────────────────────────────────────────── */
.spinner {
width: 18px;
height: 18px;
border: 2px solid var(--border);
border-top-color: var(--accent);
border-radius: 50%;
animation: spin 0.6s linear infinite;
display: inline-block;
}
@keyframes spin {
to {
transform: rotate(360deg);
}
}
/* ─── Misc ──────────────────────────────────────────────────── */
.flex-gap {
display: flex;
align-items: center;
gap: 8px;
}
.mono {
font-family: "Cascadia Code", "Fira Code", monospace;
font-size: 12px;
}
.text-muted {
color: var(--text-muted);
}
hr.sep {
border: none;
border-top: 1px solid var(--border);
margin: 10px 0;
}
/* ─── Server notebook tabs ────────────────────────────────── */
.server-tabs {
display: flex;
gap: 2px;
padding: 0 2px;
border-bottom: 2px solid var(--border);
margin-bottom: 20px;
overflow-x: auto;
}
.server-tab {
padding: 8px 20px 10px;
cursor: pointer;
border: 1px solid transparent;
border-bottom: 2px solid transparent;
border-radius: 8px 8px 0 0;
color: var(--text-muted);
font-size: 13px;
font-weight: 500;
display: flex;
align-items: center;
gap: 8px;
white-space: nowrap;
position: relative;
bottom: -2px;
user-select: none;
transition:
background 0.12s,
color 0.12s,
border-color 0.12s;
}
.server-tab:hover {
background: var(--bg-hover);
color: var(--text);
border-color: var(--border);
border-bottom-color: var(--bg-hover);
}
.server-tab.active {
background: var(--bg);
border-color: var(--border);
border-bottom-color: var(--bg);
color: var(--text);
}
.server-tab-dot {
display: inline-block;
width: 8px;
height: 8px;
border-radius: 50%;
flex-shrink: 0;
}
/* ─── Dashboard grid ──────────────────────────────────────── */
.dash-grid {
display: grid;
grid-template-columns: repeat(3, 1fr);
gap: 16px;
margin-bottom: 16px;
}
@media (max-width: 900px) {
.dash-grid {
grid-template-columns: repeat(2, 1fr);
}
.dash-span-2 {
grid-column: span 1;
}
}
@media (max-width: 600px) {
.dash-grid {
grid-template-columns: 1fr;
}
}
.dash-span-2 {
grid-column: span 2;
}
.dash-span-3 {
grid-column: 1 / -1;
}
.dash-grid .card {
margin-bottom: 0;
}
/* ─── Progress bars ───────────────────────────────────────── */
.prog-wrap {
background: var(--bg-input);
border-radius: 4px;
height: 6px;
margin-top: 6px;
overflow: hidden;
}
.prog-bar {
height: 100%;
border-radius: 4px;
transition: width 0.4s ease;
min-width: 2px;
}
.prog-low {
background: var(--success);
}
.prog-mid {
background: var(--warning);
}
.prog-high {
background: var(--danger);
}
/* ─── Dashboard stat display ──────────────────────────────── */
.dash-stat {
font-size: 26px;
font-weight: 700;
line-height: 1.1;
}
.dash-stat-sub {
font-size: 12px;
color: var(--text-muted);
margin-bottom: 4px;
}
.dash-row {
display: flex;
gap: 16px;
flex-wrap: wrap;
font-size: 12px;
color: var(--text-muted);
margin-top: 10px;
}
.dash-kv {
display: flex;
justify-content: space-between;
align-items: center;
font-size: 13px;
padding: 3px 0;
}
.dash-kv + .dash-kv {
border-top: 1px solid var(--border);
}
/* ─── Status / risk badges (dashboard) ──────────────────────── */
.badge-green {
background: #1c3a26;
color: #5fd89a;
}
.badge-yellow {
background: #372900;
color: #f0b060;
}
.badge-red {
background: #3a1515;
color: #f07070;
}
.badge-low {
background: #1c3a26;
color: #5fd89a;
}
.badge-medium {
background: #372900;
color: #f0b060;
}
.badge-high {
background: #3a1515;
color: #f07070;
}
/* ─── Action advice items ─────────────────────────────────── */
.action-item {
display: flex;
align-items: flex-start;
gap: 10px;
padding: 10px 14px;
background: var(--danger-dim);
border: 1px solid var(--danger);
border-radius: 6px;
font-size: 13px;
line-height: 1.5;
}
.action-item + .action-item {
margin-top: 8px;
}
.action-item > svg {
flex-shrink: 0;
color: var(--danger);
margin-top: 2px;
}
.action-ok {
display: flex;
align-items: center;
gap: 8px;
font-size: 13px;
color: var(--success);
}
/* ─── Security check rows ────────────────────────────────── */
.sec-check {
display: flex;
align-items: center;
gap: 8px;
font-size: 13px;
padding: 3px 0;
}