316 lines
9.4 KiB
CSS
316 lines
9.4 KiB
CSS
/* MadBase Studio — Admin CSS */
|
|
/* No @apply directives — plain CSS only for CDN-free compatibility */
|
|
|
|
:root {
|
|
--primary: #0ea5e9;
|
|
--primary-dark: #0284c7;
|
|
--primary-light: #e0f2fe;
|
|
--sidebar-bg: linear-gradient(180deg, #0f172a 0%, #1e293b 100%);
|
|
}
|
|
|
|
/* ── Base ── */
|
|
body {
|
|
-webkit-font-smoothing: antialiased;
|
|
-moz-osx-font-smoothing: grayscale;
|
|
font-family: 'Inter', system-ui, -apple-system, sans-serif;
|
|
margin: 0;
|
|
background: #f8fafc;
|
|
color: #1e293b;
|
|
}
|
|
|
|
/* ── Buttons ── */
|
|
.btn-primary {
|
|
background: #0284c7;
|
|
color: #fff;
|
|
padding: 0.5rem 1rem;
|
|
border-radius: 0.5rem;
|
|
font-weight: 600;
|
|
font-size: 0.875rem;
|
|
border: none;
|
|
cursor: pointer;
|
|
transition: all 0.2s;
|
|
box-shadow: 0 1px 3px rgba(2, 132, 199, 0.15);
|
|
}
|
|
.btn-primary:hover { background: #0369a1; }
|
|
.btn-primary:active { transform: scale(0.97); }
|
|
.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; }
|
|
|
|
.btn-secondary {
|
|
background: #fff;
|
|
border: 1px solid #e2e8f0;
|
|
color: #475569;
|
|
padding: 0.5rem 1rem;
|
|
border-radius: 0.5rem;
|
|
font-weight: 600;
|
|
font-size: 0.875rem;
|
|
cursor: pointer;
|
|
transition: all 0.2s;
|
|
}
|
|
.btn-secondary:hover { background: #f8fafc; }
|
|
.btn-secondary:active { transform: scale(0.97); }
|
|
|
|
.btn-danger {
|
|
background: #fff;
|
|
border: 1px solid #fecaca;
|
|
color: #dc2626;
|
|
padding: 0.375rem 0.75rem;
|
|
border-radius: 0.5rem;
|
|
font-weight: 500;
|
|
font-size: 0.75rem;
|
|
cursor: pointer;
|
|
transition: all 0.2s;
|
|
}
|
|
.btn-danger:hover { background: #fef2f2; border-color: #f87171; }
|
|
|
|
.btn-icon {
|
|
background: none;
|
|
border: none;
|
|
cursor: pointer;
|
|
padding: 0.375rem;
|
|
border-radius: 0.375rem;
|
|
transition: all 0.15s;
|
|
display: inline-flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
}
|
|
.btn-icon:hover { background: #f1f5f9; }
|
|
.btn-icon.danger { color: #ef4444; }
|
|
.btn-icon.danger:hover { background: #fef2f2; }
|
|
|
|
/* ── Login Screen ── */
|
|
.login-screen {
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
min-height: 100vh;
|
|
background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #0f172a 100%);
|
|
}
|
|
.login-card {
|
|
background: #fff;
|
|
border-radius: 1rem;
|
|
padding: 2.5rem;
|
|
width: 100%;
|
|
max-width: 400px;
|
|
box-shadow: 0 25px 50px -12px rgba(0,0,0,0.25);
|
|
}
|
|
.login-card h1 { margin: 0 0 0.25rem; font-size: 1.5rem; font-weight: 700; color: #0f172a; }
|
|
.login-card p { margin: 0 0 1.5rem; color: #64748b; font-size: 0.875rem; }
|
|
.login-input {
|
|
width: 100%;
|
|
padding: 0.75rem 1rem;
|
|
border: 1px solid #e2e8f0;
|
|
border-radius: 0.5rem;
|
|
font-size: 0.875rem;
|
|
outline: none;
|
|
transition: all 0.2s;
|
|
box-sizing: border-box;
|
|
}
|
|
.login-input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(14,165,233,0.15); }
|
|
.login-btn {
|
|
width: 100%;
|
|
padding: 0.75rem;
|
|
margin-top: 1rem;
|
|
background: var(--primary);
|
|
color: #fff;
|
|
border: none;
|
|
border-radius: 0.5rem;
|
|
font-size: 0.875rem;
|
|
font-weight: 600;
|
|
cursor: pointer;
|
|
transition: all 0.2s;
|
|
}
|
|
.login-btn:hover { background: var(--primary-dark); }
|
|
.login-btn:disabled { opacity: 0.6; cursor: not-allowed; }
|
|
.login-error {
|
|
margin-top: 0.75rem;
|
|
padding: 0.5rem 0.75rem;
|
|
background: #fef2f2;
|
|
color: #dc2626;
|
|
border-radius: 0.375rem;
|
|
font-size: 0.813rem;
|
|
border: 1px solid #fecaca;
|
|
}
|
|
|
|
/* ── Error Toast ── */
|
|
.error-toast {
|
|
position: fixed;
|
|
top: 1rem;
|
|
right: 1rem;
|
|
z-index: 9999;
|
|
background: #dc2626;
|
|
color: #fff;
|
|
padding: 0.75rem 1.25rem;
|
|
border-radius: 0.5rem;
|
|
font-size: 0.875rem;
|
|
font-weight: 500;
|
|
box-shadow: 0 10px 15px -3px rgba(0,0,0,0.1);
|
|
animation: toast-in 0.3s ease-out;
|
|
max-width: 400px;
|
|
}
|
|
@keyframes toast-in {
|
|
from { transform: translateY(-1rem); opacity: 0; }
|
|
to { transform: translateY(0); opacity: 1; }
|
|
}
|
|
|
|
/* ── Layout ── */
|
|
.app-layout { display: flex; flex-direction: column; height: 100vh; overflow: hidden; }
|
|
.app-header {
|
|
background: #fff;
|
|
border-bottom: 1px solid #e2e8f0;
|
|
height: 3.5rem;
|
|
padding: 0 1rem;
|
|
display: flex;
|
|
justify-content: space-between;
|
|
align-items: center;
|
|
z-index: 10;
|
|
box-shadow: 0 1px 2px rgba(0,0,0,0.05);
|
|
}
|
|
.app-body { display: flex; flex: 1; overflow: hidden; }
|
|
|
|
/* Sidebar */
|
|
.app-sidebar {
|
|
width: 16rem;
|
|
background: var(--sidebar-bg);
|
|
color: #94a3b8;
|
|
display: flex;
|
|
flex-direction: column;
|
|
flex-shrink: 0;
|
|
}
|
|
.sidebar-link {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 0.75rem;
|
|
padding: 0.625rem 0.75rem;
|
|
border-radius: 0.5rem;
|
|
transition: all 0.2s;
|
|
text-decoration: none;
|
|
color: inherit;
|
|
font-size: 0.875rem;
|
|
font-weight: 500;
|
|
cursor: pointer;
|
|
border: none;
|
|
background: none;
|
|
width: 100%;
|
|
text-align: left;
|
|
}
|
|
.sidebar-link:hover { background: rgba(255,255,255,0.05); color: #fff; }
|
|
.sidebar-link.active { background: var(--primary); color: #fff; box-shadow: 0 4px 6px -1px rgba(14,165,233,0.3); }
|
|
.sidebar-link svg { width: 1.25rem; height: 1.25rem; opacity: 0.75; }
|
|
|
|
/* Main content */
|
|
.app-main {
|
|
flex: 1;
|
|
overflow-y: auto;
|
|
padding: 1.5rem 2rem;
|
|
background: rgba(248,250,252,0.5);
|
|
scroll-behavior: smooth;
|
|
}
|
|
|
|
/* ── Cards & Tables ── */
|
|
.card {
|
|
background: #fff;
|
|
border-radius: 0.75rem;
|
|
border: 1px solid #e2e8f0;
|
|
box-shadow: 0 1px 2px rgba(0,0,0,0.05);
|
|
overflow: hidden;
|
|
}
|
|
.card-header {
|
|
padding: 1rem 1.25rem;
|
|
border-bottom: 1px solid #f1f5f9;
|
|
display: flex;
|
|
justify-content: space-between;
|
|
align-items: center;
|
|
background: rgba(248,250,252,0.5);
|
|
}
|
|
.card-header h2, .card-header h3 { margin: 0; font-size: 0.875rem; font-weight: 700; color: #1e293b; }
|
|
.card-body { padding: 1rem 1.25rem; }
|
|
|
|
.data-table { width: 100%; border-collapse: collapse; font-size: 0.875rem; text-align: left; }
|
|
.data-table thead { background: #f8fafc; }
|
|
.data-table th { padding: 0.75rem 1.25rem; font-size: 0.688rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: #64748b; border-bottom: 1px solid #e2e8f0; }
|
|
.data-table td { padding: 0.75rem 1.25rem; border-bottom: 1px solid #f1f5f9; color: #334155; }
|
|
.data-table tbody tr:hover { background: #f8fafc; }
|
|
.data-table .mono { font-family: 'JetBrains Mono', 'Fira Code', monospace; font-size: 0.75rem; color: #64748b; }
|
|
|
|
/* ── Stat Cards ── */
|
|
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1.5rem; }
|
|
.stat-card {
|
|
background: #fff;
|
|
padding: 1.25rem;
|
|
border-radius: 0.75rem;
|
|
border: 1px solid #e2e8f0;
|
|
box-shadow: 0 1px 2px rgba(0,0,0,0.05);
|
|
display: flex;
|
|
justify-content: space-between;
|
|
align-items: flex-start;
|
|
}
|
|
.stat-label { font-size: 0.688rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: #64748b; margin-bottom: 0.25rem; }
|
|
.stat-value { font-size: 1.875rem; font-weight: 700; color: #0f172a; }
|
|
.stat-icon { padding: 0.5rem; border-radius: 0.5rem; }
|
|
|
|
/* ── Status Badge ── */
|
|
.badge {
|
|
display: inline-flex;
|
|
align-items: center;
|
|
padding: 0.125rem 0.5rem;
|
|
border-radius: 0.25rem;
|
|
font-size: 0.75rem;
|
|
font-weight: 500;
|
|
}
|
|
.badge-green { background: #dcfce7; color: #166534; }
|
|
.badge-yellow { background: #fef9c3; color: #854d0e; }
|
|
.badge-red { background: #fee2e2; color: #991b1b; }
|
|
|
|
/* ── Code / Terminal ── */
|
|
.terminal-bg {
|
|
background: #0f172a;
|
|
border-radius: 0.5rem;
|
|
padding: 1rem;
|
|
font-family: 'JetBrains Mono', monospace;
|
|
font-size: 0.75rem;
|
|
color: #94a3b8;
|
|
overflow: auto;
|
|
line-height: 1.6;
|
|
}
|
|
.terminal-bg pre { margin: 0; white-space: pre-wrap; word-break: break-all; }
|
|
|
|
/* ── Search Input ── */
|
|
.search-input {
|
|
width: 100%;
|
|
padding: 0.5rem 0.75rem 0.5rem 2rem;
|
|
border: 1px solid #e2e8f0;
|
|
border-radius: 0.5rem;
|
|
font-size: 0.875rem;
|
|
outline: none;
|
|
transition: all 0.2s;
|
|
box-sizing: border-box;
|
|
background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' viewBox='0 0 24 24' stroke='%2394a3b8' stroke-width='2'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z'/%3E%3C/svg%3E") no-repeat 0.5rem center;
|
|
}
|
|
.search-input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(14,165,233,0.1); }
|
|
|
|
/* ── Scrollbar ── */
|
|
::-webkit-scrollbar { width: 6px; height: 6px; }
|
|
::-webkit-scrollbar-track { background: transparent; }
|
|
::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 3px; }
|
|
::-webkit-scrollbar-thumb:hover { background: #94a3b8; }
|
|
|
|
/* ── Transitions ── */
|
|
.fade-in { animation: fadeIn 0.2s ease-out; }
|
|
@keyframes fadeIn {
|
|
from { opacity: 0; transform: translateY(4px); }
|
|
to { opacity: 1; transform: translateY(0); }
|
|
}
|
|
|
|
/* ── Realtime Console ── */
|
|
.rt-stat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; margin-bottom: 1rem; }
|
|
.rt-stat { text-align: center; padding: 1rem; background: #f8fafc; border-radius: 0.5rem; border: 1px solid #e2e8f0; }
|
|
.rt-stat .value { font-size: 1.5rem; font-weight: 700; color: #0f172a; }
|
|
.rt-stat .label { font-size: 0.688rem; text-transform: uppercase; color: #64748b; font-weight: 600; margin-top: 0.25rem; }
|
|
|
|
/* ── Responsive ── */
|
|
@media (max-width: 1024px) {
|
|
.app-sidebar { width: 12rem; }
|
|
.app-main { padding: 1rem; }
|
|
.stat-grid { grid-template-columns: repeat(2, 1fr); }
|
|
}
|