- index.html: add snackbar.js (was missing, showSnackbar not available) - style.css: sidebar.collapsed 56→72px (match Nubes DS 4.5rem) - style.css: .sidebar.collapsed ~ .view margin-left: 72px
247 lines
7.0 KiB
CSS
247 lines
7.0 KiB
CSS
/* === Nubes Design — Autotest === */
|
|
|
|
:root {
|
|
--brand-primary: #2563eb;
|
|
--brand-primary-dark: #1d4ed8;
|
|
--brand-gray: #d1d5db;
|
|
--brand-grey-light: #f3f4f6;
|
|
--background: #ffffff;
|
|
--foreground: #1a1a1a;
|
|
--muted: #6b7280;
|
|
--destructive: #ef4444;
|
|
--green: #22c55e;
|
|
--radius: 12px;
|
|
--radius-sm: 6px;
|
|
}
|
|
|
|
* {
|
|
box-sizing: border-box;
|
|
margin: 0;
|
|
padding: 0;
|
|
}
|
|
|
|
body {
|
|
font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
|
|
font-size: 14px;
|
|
color: var(--foreground);
|
|
background: #f8f9fa;
|
|
line-height: 1.5;
|
|
}
|
|
|
|
/* === Layout === */
|
|
.content {
|
|
padding: 32px 16px;
|
|
}
|
|
|
|
/* === Card === */
|
|
.card {
|
|
background: var(--background);
|
|
border: 1px solid var(--brand-gray);
|
|
border-radius: var(--radius);
|
|
box-shadow: 0 1px 2px rgba(0, 0, 0, .05);
|
|
overflow: hidden;
|
|
}
|
|
|
|
.card-header {
|
|
background: var(--brand-grey-light);
|
|
padding: 12px 14px;
|
|
font-weight: 600;
|
|
font-size: 14px;
|
|
display: flex;
|
|
align-items: center;
|
|
border-bottom: 1px solid var(--brand-gray);
|
|
}
|
|
|
|
.card-body {
|
|
padding: 12px 14px;
|
|
}
|
|
|
|
/* === Table === */
|
|
table {
|
|
width: 100%;
|
|
border-collapse: collapse;
|
|
}
|
|
|
|
th {
|
|
background: var(--brand-grey-light);
|
|
font-size: 11px;
|
|
font-weight: 600;
|
|
text-transform: uppercase;
|
|
color: var(--muted);
|
|
padding: 6px 10px;
|
|
text-align: left;
|
|
border-bottom: 1px solid var(--brand-gray);
|
|
}
|
|
|
|
td {
|
|
padding: 8px 10px;
|
|
border-bottom: 1px solid var(--brand-gray);
|
|
font-size: 14px;
|
|
}
|
|
|
|
tr:last-child td {
|
|
border-bottom: none;
|
|
}
|
|
|
|
tr:hover td {
|
|
background: rgba(243, 244, 246, 0.5);
|
|
}
|
|
|
|
/* === Badge === */
|
|
.badge {
|
|
display: inline-flex;
|
|
align-items: center;
|
|
gap: 4px;
|
|
border-radius: 9999px;
|
|
padding: 2px 10px;
|
|
font-size: 12px;
|
|
font-weight: 500;
|
|
white-space: nowrap;
|
|
}
|
|
|
|
.badge-success {
|
|
background: #dcfce7;
|
|
color: #166534;
|
|
}
|
|
|
|
/* === Empty state === */
|
|
.empty {
|
|
text-align: center;
|
|
padding: 32px 16px;
|
|
color: var(--muted);
|
|
}
|
|
|
|
.empty p {
|
|
margin-top: 8px;
|
|
}
|
|
|
|
/* === Button === */
|
|
.btn {
|
|
display: inline-flex;
|
|
align-items: center;
|
|
gap: 6px;
|
|
height: 32px;
|
|
padding: 0 14px;
|
|
border-radius: var(--radius-sm);
|
|
border: 1px solid var(--brand-gray);
|
|
background: var(--background);
|
|
font-size: 14px;
|
|
color: var(--foreground);
|
|
cursor: pointer;
|
|
transition: background .15s;
|
|
}
|
|
|
|
.btn:hover {
|
|
background: var(--brand-grey-light);
|
|
}
|
|
|
|
.btn-primary {
|
|
background: var(--brand-primary);
|
|
color: #fff;
|
|
border-color: var(--brand-primary);
|
|
}
|
|
|
|
.btn-primary:hover {
|
|
background: var(--brand-primary-dark);
|
|
}
|
|
|
|
.btn-danger {
|
|
background: var(--destructive);
|
|
color: #fff;
|
|
border-color: var(--destructive);
|
|
}
|
|
|
|
/* === Phase 0: Redesign Foundation === */
|
|
|
|
/* ── Sidebar ── */
|
|
.sidebar {
|
|
position: fixed; top: 0; left: 0; bottom: 0;
|
|
width: 192px; background: var(--background);
|
|
border-right: 1px solid var(--brand-gray);
|
|
display: flex; flex-direction: column; z-index: 100;
|
|
transition: width .2s;
|
|
}
|
|
.sidebar.collapsed { width: 72px; }
|
|
.sidebar-top {
|
|
height: 80px; border-top: 4px solid var(--brand-primary);
|
|
display: flex; align-items: center; padding: 0 16px;
|
|
}
|
|
.sidebar-nav { flex: 1; overflow-y: auto; padding: 8px 0; }
|
|
.sidebar-item {
|
|
display: flex; align-items: center; gap: 12px;
|
|
padding: 10px 16px; font-size: 14px; color: var(--foreground);
|
|
cursor: pointer; transition: background .15s;
|
|
border: none; background: none; width: 100%; text-align: left;
|
|
}
|
|
.sidebar-item:hover { background: var(--brand-grey-light); }
|
|
.sidebar-item.active { background: #dbeafe; font-weight: 600; }
|
|
.sidebar-item svg { width: 20px; height: 20px; flex-shrink: 0; }
|
|
.sidebar-bottom { padding: 8px 0; border-top: 1px solid var(--brand-gray); }
|
|
|
|
/* ── Views ── */
|
|
.view { margin-left: 192px; padding: 16px 20px; min-height: 100vh; }
|
|
.sidebar.collapsed ~ .view { margin-left: 72px; }
|
|
.view.hidden { display: none; }
|
|
.view-header { font-size: 20px; font-weight: 700; margin-bottom: 16px; }
|
|
|
|
/* ── Tabs ── */
|
|
.tabs { display: flex; gap: 0; border-bottom: 2px solid var(--brand-gray); margin-bottom: 12px; }
|
|
.tab {
|
|
padding: 8px 16px; font-size: 14px; color: var(--muted);
|
|
cursor: pointer; border: none; background: none;
|
|
border-bottom: 2px solid transparent; margin-bottom: -2px;
|
|
transition: color .15s, border-color .15s;
|
|
}
|
|
.tab:hover { color: var(--foreground); }
|
|
.tab.active { color: var(--brand-primary); border-bottom-color: var(--brand-primary); font-weight: 600; }
|
|
|
|
/* ── Toolbar ── */
|
|
.toolbar { display: flex; gap: 6px; flex-wrap: wrap; padding: 8px 0; border-top: 1px solid var(--brand-gray); border-bottom: 1px solid var(--brand-gray); margin: 8px 0; }
|
|
|
|
/* ── Field (label on top) ── */
|
|
.field { margin-bottom: 10px; }
|
|
.field label { display: block; font-size: 13px; font-weight: 500; margin-bottom: 4px; color: var(--foreground); }
|
|
.field label.required::after { content: " *"; color: var(--destructive); }
|
|
.field input, .field select, .field textarea {
|
|
width: 100%; padding: 8px 10px; font-size: 14px;
|
|
border: 1px solid var(--brand-gray); border-radius: var(--radius-sm);
|
|
background: var(--background);
|
|
}
|
|
.field input:focus, .field select:focus {
|
|
outline: none; border-color: var(--brand-primary);
|
|
box-shadow: 0 0 0 2px rgba(37,99,235,.15);
|
|
}
|
|
|
|
/* ── Skeleton ── */
|
|
.skeleton {
|
|
background: linear-gradient(90deg, #e5e7eb 25%, #f3f4f6 50%, #e5e7eb 75%);
|
|
background-size: 200% 100%; animation: skeleton-shimmer 1.5s infinite;
|
|
border-radius: 4px;
|
|
}
|
|
@keyframes skeleton-shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }
|
|
.skeleton-line { height: 14px; margin-bottom: 8px; }
|
|
.skeleton-line:last-child { width: 60%; }
|
|
|
|
/* ── Snackbar ── */
|
|
.snackbar-container { position: fixed; bottom: 16px; right: 16px; z-index: 10001; display: flex; flex-direction: column; gap: 8px; }
|
|
.snackbar {
|
|
padding: 10px 16px; border-radius: var(--radius-sm); font-size: 13px;
|
|
color: #fff; box-shadow: 0 2px 8px rgba(0,0,0,.2);
|
|
animation: snackbar-in .3s ease; max-width: 360px;
|
|
}
|
|
.snackbar.info { background: var(--brand-primary); }
|
|
.snackbar.success { background: var(--green); }
|
|
.snackbar.error { background: var(--destructive); }
|
|
@keyframes snackbar-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
|
|
|
|
/* ── Combobox ── */
|
|
.combobox { position: relative; }
|
|
.combobox-input { width: 100%; padding: 6px 10px; font-size: 13px; border: 1px solid var(--brand-gray); border-radius: var(--radius-sm); }
|
|
.combobox-input:focus { outline: none; border-color: var(--brand-primary); }
|
|
.combobox-list { position: absolute; top: 100%; left: 0; right: 0; max-height: 200px; overflow-y: auto; background: var(--background); border: 1px solid var(--brand-gray); border-radius: 0 0 var(--radius-sm) var(--radius-sm); z-index: 10; }
|
|
.combobox-item { padding: 6px 10px; font-size: 13px; cursor: pointer; }
|
|
.combobox-item:hover { background: var(--brand-grey-light); }
|
|
|
|
/* ── Body for sidebar ── */
|
|
body.has-sidebar { padding-left: 0; }
|