449 lines
18 KiB
CSS
449 lines
18 KiB
CSS
/* ─────────────────────────────────────────────────────────────────────────────
|
|
Enterprise Digital Platform — Portal CSS
|
|
Dark-mode enterprise dashboard
|
|
───────────────────────────────────────────────────────────────────────────── */
|
|
|
|
:root {
|
|
--bg-base: #0d1117;
|
|
--bg-surface: #161b22;
|
|
--bg-card: #1c2128;
|
|
--bg-card-hover: #21262d;
|
|
--border: #30363d;
|
|
--border-subtle: #21262d;
|
|
--text-primary: #e6edf3;
|
|
--text-secondary:#8b949e;
|
|
--text-muted: #6e7681;
|
|
--accent-blue: #388bfd;
|
|
--accent-green: #3fb950;
|
|
--accent-amber: #d29922;
|
|
--accent-red: #f85149;
|
|
--radius: 10px;
|
|
--radius-sm: 6px;
|
|
--shadow: 0 4px 24px rgba(0,0,0,0.4);
|
|
--font: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
|
|
}
|
|
|
|
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
|
|
|
|
html, body {
|
|
height: 100%;
|
|
background: var(--bg-base);
|
|
color: var(--text-primary);
|
|
font-family: var(--font);
|
|
font-size: 15px;
|
|
line-height: 1.6;
|
|
}
|
|
|
|
a { color: var(--accent-blue); text-decoration: none; }
|
|
a:hover { text-decoration: underline; }
|
|
code { font-family: 'SFMono-Regular', Consolas, monospace; font-size: 0.85em; }
|
|
|
|
/* ── Top Bar ────────────────────────────────────────────────────────────────── */
|
|
.topbar {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 1.5rem;
|
|
padding: 0 1.5rem;
|
|
height: 56px;
|
|
background: var(--bg-surface);
|
|
border-bottom: 1px solid var(--border);
|
|
position: sticky;
|
|
top: 0;
|
|
z-index: 100;
|
|
}
|
|
|
|
.topbar-brand {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 0.5rem;
|
|
font-weight: 700;
|
|
font-size: 1rem;
|
|
color: var(--text-primary);
|
|
flex-shrink: 0;
|
|
}
|
|
|
|
.brand-icon { font-size: 1.4rem; color: var(--accent-blue); }
|
|
|
|
.topbar-nav {
|
|
display: flex;
|
|
gap: 0.25rem;
|
|
flex: 1;
|
|
}
|
|
|
|
.nav-link {
|
|
padding: 0.35rem 0.75rem;
|
|
border-radius: var(--radius-sm);
|
|
color: var(--text-secondary);
|
|
font-size: 0.9rem;
|
|
transition: color 0.15s, background 0.15s;
|
|
}
|
|
.nav-link:hover { color: var(--text-primary); background: var(--bg-card); text-decoration: none; }
|
|
.nav-link.active { color: var(--text-primary); background: var(--bg-card); }
|
|
|
|
.topbar-user {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 0.5rem;
|
|
flex-shrink: 0;
|
|
}
|
|
|
|
.user-badge {
|
|
width: 30px;
|
|
height: 30px;
|
|
border-radius: 50%;
|
|
background: var(--accent-blue);
|
|
color: #fff;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
font-size: 0.8rem;
|
|
font-weight: 700;
|
|
}
|
|
|
|
.user-name { font-size: 0.9rem; color: var(--text-secondary); }
|
|
.role-tag {
|
|
font-size: 0.7rem;
|
|
padding: 2px 6px;
|
|
border-radius: 20px;
|
|
background: rgba(56,139,253,0.2);
|
|
color: var(--accent-blue);
|
|
font-weight: 600;
|
|
text-transform: uppercase;
|
|
letter-spacing: 0.04em;
|
|
}
|
|
|
|
.btn-logout {
|
|
color: var(--text-muted);
|
|
font-size: 1.1rem;
|
|
padding: 4px 8px;
|
|
border-radius: var(--radius-sm);
|
|
transition: color 0.15s, background 0.15s;
|
|
}
|
|
.btn-logout:hover { color: var(--accent-red); background: rgba(248,81,73,0.1); text-decoration: none; }
|
|
|
|
/* ── Flash Messages ─────────────────────────────────────────────────────────── */
|
|
.flash-container { padding: 0.75rem 1.5rem 0; }
|
|
.flash {
|
|
padding: 0.75rem 1rem;
|
|
border-radius: var(--radius-sm);
|
|
margin-bottom: 0.5rem;
|
|
font-size: 0.9rem;
|
|
border-left: 3px solid;
|
|
}
|
|
.flash-success { background: rgba(63,185,80,0.1); border-color: var(--accent-green); color: #7ee787; }
|
|
.flash-danger { background: rgba(248,81,73,0.1); border-color: var(--accent-red); color: #ff7b72; }
|
|
.flash-info { background: rgba(56,139,253,0.1); border-color: var(--accent-blue); color: #79c0ff; }
|
|
.flash-warning { background: rgba(210,153,34,0.1); border-color: var(--accent-amber); color: #e3b341; }
|
|
|
|
/* ── Page Content ────────────────────────────────────────────────────────────── */
|
|
.page-content { padding: 2rem 1.5rem; max-width: 1280px; margin: 0 auto; }
|
|
|
|
/* ── Login Page ─────────────────────────────────────────────────────────────── */
|
|
.login-wrapper {
|
|
min-height: 100vh;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
padding: 2rem;
|
|
background:
|
|
radial-gradient(ellipse at 20% 20%, rgba(56,139,253,0.08) 0%, transparent 60%),
|
|
radial-gradient(ellipse at 80% 80%, rgba(63,185,80,0.06) 0%, transparent 60%),
|
|
var(--bg-base);
|
|
}
|
|
|
|
.login-card {
|
|
width: 100%;
|
|
max-width: 400px;
|
|
background: var(--bg-surface);
|
|
border: 1px solid var(--border);
|
|
border-radius: var(--radius);
|
|
padding: 2.5rem;
|
|
box-shadow: var(--shadow);
|
|
}
|
|
|
|
.login-logo { text-align: center; margin-bottom: 2rem; }
|
|
.brand-icon-lg { font-size: 2.5rem; }
|
|
.login-title { font-size: 1.4rem; font-weight: 700; margin-top: 0.5rem; }
|
|
.login-subtitle { color: var(--text-secondary); font-size: 0.9rem; }
|
|
|
|
/* ── Forms ───────────────────────────────────────────────────────────────────── */
|
|
.form-group { margin-bottom: 1.25rem; }
|
|
.form-label { display: block; font-size: 0.875rem; font-weight: 600; margin-bottom: 0.4rem; color: var(--text-secondary); }
|
|
.form-input, .form-select {
|
|
width: 100%;
|
|
padding: 0.6rem 0.85rem;
|
|
background: var(--bg-card);
|
|
border: 1px solid var(--border);
|
|
border-radius: var(--radius-sm);
|
|
color: var(--text-primary);
|
|
font-size: 0.9rem;
|
|
transition: border-color 0.15s;
|
|
outline: none;
|
|
}
|
|
.form-input:focus, .form-select:focus { border-color: var(--accent-blue); box-shadow: 0 0 0 3px rgba(56,139,253,0.15); }
|
|
.form-select option { background: var(--bg-card); }
|
|
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
|
|
.form-group--grow { flex: 1; }
|
|
.form-group--action { min-width: 140px; }
|
|
.form-actions { display: flex; gap: 0.75rem; margin-top: 1.5rem; }
|
|
.form-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.5rem; margin-bottom: 1.5rem; }
|
|
.form-inline-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 1rem 1.25rem; margin-bottom: 1.5rem; }
|
|
|
|
/* Toggle switch */
|
|
.toggle,
|
|
.module-toggle { display: flex; align-items: center; gap: 0.75rem; cursor: pointer; user-select: none; }
|
|
.toggle input,
|
|
.module-toggle-input { display: none; }
|
|
.toggle-slider {
|
|
width: 38px; height: 22px; border-radius: 11px;
|
|
background: var(--border); transition: background 0.2s; flex-shrink: 0; position: relative;
|
|
}
|
|
.toggle-slider::after {
|
|
content: '';
|
|
width: 16px; height: 16px;
|
|
border-radius: 50%; background: #fff;
|
|
position: absolute; top: 3px; left: 3px;
|
|
transition: transform 0.2s;
|
|
}
|
|
.toggle input:checked + .toggle-slider,
|
|
.module-toggle-input:checked + .toggle-slider { background: var(--accent, var(--accent-blue)); }
|
|
.toggle input:checked + .toggle-slider::after,
|
|
.module-toggle-input:checked + .toggle-slider::after { transform: translateX(16px); }
|
|
.toggle-label { font-size: 0.9rem; color: var(--text-secondary); }
|
|
|
|
/* ── Buttons ─────────────────────────────────────────────────────────────────── */
|
|
.btn {
|
|
display: inline-flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
padding: 0.55rem 1.1rem;
|
|
border-radius: var(--radius-sm);
|
|
font-size: 0.9rem;
|
|
font-weight: 600;
|
|
border: none;
|
|
cursor: pointer;
|
|
text-decoration: none;
|
|
transition: opacity 0.15s, filter 0.15s;
|
|
}
|
|
.btn:hover { filter: brightness(1.15); text-decoration: none; }
|
|
.btn:active { filter: brightness(0.9); }
|
|
.btn-primary { background: var(--accent-blue); color: #fff; }
|
|
.btn-secondary { background: var(--bg-card); color: var(--text-primary); border: 1px solid var(--border); }
|
|
.btn-danger { background: rgba(248,81,73,0.15); color: var(--accent-red); border: 1px solid rgba(248,81,73,0.3); }
|
|
.btn-full { width: 100%; }
|
|
.btn-sm { padding: 0.3rem 0.7rem; font-size: 0.82rem; }
|
|
|
|
/* App launch button */
|
|
.btn-app {
|
|
padding: 0.55rem 1.25rem;
|
|
border-radius: var(--radius-sm);
|
|
font-size: 0.9rem;
|
|
font-weight: 700;
|
|
background: color-mix(in srgb, var(--accent) 20%, transparent);
|
|
color: var(--accent);
|
|
border: 1px solid color-mix(in srgb, var(--accent) 40%, transparent);
|
|
cursor: pointer;
|
|
transition: background 0.15s, border-color 0.15s;
|
|
}
|
|
.btn-app:hover { background: color-mix(in srgb, var(--accent) 30%, transparent); text-decoration: none; }
|
|
.btn-app--disabled {
|
|
background: rgba(110,118,129,0.1);
|
|
color: var(--text-muted);
|
|
border: 1px solid var(--border-subtle);
|
|
cursor: not-allowed;
|
|
}
|
|
|
|
/* ── Dashboard App Grid ───────────────────────────────────────────────────────── */
|
|
.dashboard-wrapper { max-width: 1100px; }
|
|
.dashboard-header { margin-bottom: 2rem; }
|
|
.section-title { font-size: 1.5rem; font-weight: 700; margin-bottom: 0.25rem; }
|
|
.section-subtitle { color: var(--text-secondary); font-size: 0.9rem; }
|
|
.section-hint { color: var(--text-secondary); font-size: 0.875rem; margin-bottom: 1.25rem; }
|
|
|
|
.app-grid {
|
|
display: grid;
|
|
grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
|
|
gap: 1.25rem;
|
|
}
|
|
|
|
.app-card {
|
|
background: var(--bg-card);
|
|
border: 1px solid var(--border);
|
|
border-top: 3px solid var(--accent);
|
|
border-radius: var(--radius);
|
|
padding: 1.5rem;
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 1rem;
|
|
transition: transform 0.15s, box-shadow 0.15s;
|
|
}
|
|
.app-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
|
|
.app-card--locked { opacity: 0.55; }
|
|
.app-card--locked:hover { transform: none; box-shadow: none; }
|
|
|
|
.app-card-header { display: flex; align-items: center; justify-content: space-between; }
|
|
.app-icon { font-size: 2rem; }
|
|
|
|
.app-status { display: flex; align-items: center; gap: 0.4rem; }
|
|
.status-dot { width: 8px; height: 8px; border-radius: 50%; }
|
|
.status-dot--active { background: var(--accent-green); box-shadow: 0 0 6px var(--accent-green); }
|
|
.status-dot--inactive { background: var(--text-muted); }
|
|
.status-label { font-size: 0.8rem; color: var(--text-secondary); }
|
|
|
|
.app-name { font-size: 1.1rem; font-weight: 700; }
|
|
.app-desc { font-size: 0.875rem; color: var(--text-secondary); line-height: 1.5; }
|
|
.app-card-body { flex: 1; }
|
|
.app-card-footer { padding-top: 0.5rem; border-top: 1px solid var(--border-subtle); }
|
|
|
|
/* ── Settings ────────────────────────────────────────────────────────────────── */
|
|
.settings-wrapper { max-width: 1200px; }
|
|
.settings-header { margin-bottom: 1.5rem; display: flex; flex-direction: column; gap: 0.75rem; }
|
|
|
|
.settings-tabs { display: flex; gap: 0.25rem; border-bottom: 1px solid var(--border); padding-bottom: 0; }
|
|
.tab-link {
|
|
padding: 0.5rem 1rem;
|
|
border-bottom: 2px solid transparent;
|
|
color: var(--text-secondary);
|
|
font-size: 0.9rem;
|
|
font-weight: 500;
|
|
transition: color 0.15s, border-color 0.15s;
|
|
margin-bottom: -1px;
|
|
}
|
|
.tab-link:hover { color: var(--text-primary); text-decoration: none; }
|
|
.tab-link.active { color: var(--accent-blue); border-bottom-color: var(--accent-blue); }
|
|
|
|
.settings-section { margin-top: 1.5rem; }
|
|
.section-toolbar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1rem; }
|
|
.section-toolbar h3 { font-size: 1rem; font-weight: 600; }
|
|
|
|
/* ── Table ───────────────────────────────────────────────────────────────────── */
|
|
.table-wrapper { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); }
|
|
.data-table { width: 100%; border-collapse: collapse; font-size: 0.875rem; }
|
|
.data-table th {
|
|
background: var(--bg-surface);
|
|
color: var(--text-secondary);
|
|
font-weight: 600;
|
|
font-size: 0.8rem;
|
|
text-transform: uppercase;
|
|
letter-spacing: 0.04em;
|
|
padding: 0.65rem 1rem;
|
|
text-align: left;
|
|
border-bottom: 1px solid var(--border);
|
|
}
|
|
.data-table td {
|
|
padding: 0.75rem 1rem;
|
|
border-bottom: 1px solid var(--border-subtle);
|
|
vertical-align: middle;
|
|
}
|
|
.data-table tr:last-child td { border-bottom: none; }
|
|
.data-table tr:hover td { background: var(--bg-card-hover); }
|
|
.row-inactive td { opacity: 0.5; }
|
|
.app-col { text-align: center; }
|
|
.center { text-align: center; }
|
|
.text-muted { color: var(--text-secondary); }
|
|
.empty-row { text-align: center; color: var(--text-muted); padding: 2rem; }
|
|
.key-cell { background: var(--bg-surface); padding: 2px 8px; border-radius: 4px; font-size: 0.8rem; }
|
|
|
|
/* ── Per-app role select ─────────────────────────────────────────────────────── */
|
|
.app-role-select {
|
|
appearance: none;
|
|
background: var(--bg-surface);
|
|
border: 1px solid var(--border);
|
|
border-radius: var(--radius-sm);
|
|
color: var(--text-secondary);
|
|
font-size: 0.78rem;
|
|
padding: 0.2rem 0.55rem;
|
|
cursor: pointer;
|
|
outline: none;
|
|
transition: border-color 0.15s, color 0.15s;
|
|
min-width: 90px;
|
|
}
|
|
.app-role-select:focus { border-color: var(--app-color, var(--accent-blue)); }
|
|
.app-role-select option { background: var(--bg-card); }
|
|
/* Colour the cell when a real role is selected */
|
|
.app-role-select:not([value="none"]) { border-color: var(--app-color, var(--accent-blue)); }
|
|
/* highlight the select based on selected option via JS */
|
|
.app-role-select.has-access { color: var(--app-color, var(--accent-blue)); border-color: var(--app-color, var(--accent-blue)); }
|
|
|
|
/* ── Badges ──────────────────────────────────────────────────────────────────── */
|
|
.badge {
|
|
display: inline-block;
|
|
padding: 2px 8px;
|
|
border-radius: 20px;
|
|
font-size: 0.72rem;
|
|
font-weight: 700;
|
|
text-transform: uppercase;
|
|
letter-spacing: 0.04em;
|
|
}
|
|
.badge-admin { background: rgba(56,139,253,0.2); color: var(--accent-blue); }
|
|
.badge-user { background: rgba(110,118,129,0.2); color: var(--text-secondary); }
|
|
.badge-active { background: rgba(63,185,80,0.2); color: var(--accent-green); }
|
|
.badge-inactive { background: rgba(110,118,129,0.2); color: var(--text-muted); }
|
|
|
|
/* ── App role grid (new user form) ───────────────────────────────────────────── */
|
|
.app-role-grid {
|
|
display: grid;
|
|
grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
|
|
gap: 1rem;
|
|
}
|
|
.app-role-card {
|
|
background: var(--bg-surface);
|
|
border: 1px solid var(--border);
|
|
border-top: 3px solid var(--app-color, var(--accent-blue));
|
|
border-radius: var(--radius-sm);
|
|
padding: 1rem;
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 0.5rem;
|
|
}
|
|
.app-role-card-header {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 0.5rem;
|
|
}
|
|
.app-role-desc {
|
|
font-size: 0.78rem;
|
|
color: var(--text-secondary);
|
|
margin: 0;
|
|
flex: 1;
|
|
}
|
|
.app-role-new-select {
|
|
appearance: none;
|
|
background: var(--bg-card);
|
|
border: 1px solid var(--border);
|
|
border-radius: var(--radius-sm);
|
|
color: var(--text-secondary);
|
|
font-size: 0.82rem;
|
|
padding: 0.3rem 0.55rem;
|
|
cursor: pointer;
|
|
width: 100%;
|
|
}
|
|
|
|
/* ── App checkbox grid (new user form, legacy) ──────────────────────────────── */
|
|
.app-checkbox-grid { display: flex; gap: 0.75rem; flex-wrap: wrap; }
|
|
.app-checkbox-item {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 0.5rem;
|
|
padding: 0.6rem 1rem;
|
|
border: 1px solid var(--border);
|
|
border-radius: var(--radius-sm);
|
|
cursor: pointer;
|
|
transition: border-color 0.15s, background 0.15s;
|
|
}
|
|
.app-checkbox-item:hover { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 8%, transparent); }
|
|
.app-checkbox-item input { accent-color: var(--accent); cursor: pointer; }
|
|
.app-checkbox-icon { font-size: 1.1rem; }
|
|
.app-checkbox-name { font-size: 0.875rem; font-weight: 500; }
|
|
|
|
/* ── Error page ──────────────────────────────────────────────────────────────── */
|
|
.error-wrapper { min-height: 60vh; display: flex; align-items: center; justify-content: center; }
|
|
.error-card { text-align: center; max-width: 400px; }
|
|
.error-icon { font-size: 3rem; margin-bottom: 1rem; }
|
|
.error-card h2 { font-size: 1.4rem; margin-bottom: 0.5rem; }
|
|
.error-card p { color: var(--text-secondary); margin-bottom: 1.5rem; }
|
|
|
|
/* ── Access checkbox (inline form) ───────────────────────────────────────────── */
|
|
.inline-form { display: inline; }
|
|
.access-checkbox { cursor: pointer; accent-color: var(--accent-blue); width: 16px; height: 16px; }
|