spt-launcher/src/renderer/styles.css

651 lines
12 KiB
CSS

/* CSS Variables & Theme */
:root {
/* Colors */
--bg-app: #09090b; /* Zinc 950 */
--bg-card: rgba(24, 24, 27, 0.6); /* Zinc 900, glass */
--bg-card-hover: rgba(39, 39, 42, 0.7);
--bg-input: rgba(9, 9, 11, 0.5);
--border-color: rgba(255, 255, 255, 0.08);
--border-focus: rgba(99, 102, 241, 0.5); /* Indigo 500 */
--primary: #6366f1; /* Indigo 500 */
--primary-hover: #4f46e5; /* Indigo 600 */
--primary-text: #ffffff;
--text-main: #f4f4f5; /* Zinc 100 */
--text-muted: #a1a1aa; /* Zinc 400 */
--status-ok: #10b981; /* Emerald 500 */
--status-warn: #f59e0b; /* Amber 500 */
--status-error: #ef4444; /* Red 500 */
/* Spacing & Radius */
--radius-sm: 6px;
--radius-md: 12px;
--radius-lg: 16px;
--shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
--shadow-md:
0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
--shadow-lg:
0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
--shadow-glow: 0 0 15px rgba(99, 102, 241, 0.15);
}
/* Global Reset */
* {
box-sizing: border-box;
outline: none;
}
body {
margin: 0;
font-family:
"Inter",
-apple-system,
BlinkMacSystemFont,
"Segoe UI",
Roboto,
sans-serif;
background-color: var(--bg-app);
background-image:
radial-gradient(
circle at 10% 20%,
rgba(99, 102, 241, 0.15) 0%,
transparent 20%
),
radial-gradient(
circle at 90% 80%,
rgba(16, 185, 129, 0.05) 0%,
transparent 20%
);
color: var(--text-main);
height: 100vh;
overflow: auto;
user-select: none;
-webkit-font-smoothing: antialiased;
}
/* Layout */
.app {
display: flex;
flex-direction: column;
height: 100vh;
padding: 16px; /* Reduced padding */
max-width: 100%;
margin: 0 auto;
}
/* Header */
.app-header {
margin-bottom: 12px; /* Reduced margin */
display: flex;
align-items: center;
gap: 12px;
}
.app-header h1 {
font-size: 1.1rem;
font-weight: 600;
color: var(--text-main);
margin: 0;
opacity: 0.9;
letter-spacing: -0.01em;
}
/* Typography */
h2 {
font-size: 1.25rem;
font-weight: 600;
margin: 0 0 16px 0;
color: var(--text-main);
letter-spacing: -0.02em;
}
.label {
font-size: 0.75rem;
font-weight: 500;
text-transform: uppercase;
letter-spacing: 0.05em;
color: var(--text-muted);
}
.value {
color: var(--text-main);
font-weight: 500;
}
.helper {
font-size: 0.8125rem;
color: var(--text-muted);
}
/* Components */
.card {
background: var(--bg-card);
backdrop-filter: blur(12px);
-webkit-backdrop-filter: blur(12px);
border: 1px solid var(--border-color);
border-radius: var(--radius-lg);
padding: 16px; /* Reduced padding */
box-shadow: var(--shadow-md);
transition:
transform 0.2s,
background-color 0.2s;
}
.hero {
max-width: 420px;
width: 100%;
margin: auto;
text-align: center;
animation: fadeIn 0.4s ease-out;
}
/* Inputs */
input[type="text"],
input[type="password"] {
width: 100%;
padding: 10px 12px; /* Compact padding */
background: var(--bg-input);
border: 1px solid var(--border-color);
border-radius: var(--radius-md);
color: var(--text-main);
font-size: 0.875rem; /* Smaller font */
transition: all 0.2s;
}
input:focus {
border-color: var(--border-focus);
box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.2);
}
input::placeholder {
color: rgba(255, 255, 255, 0.2);
}
/* Buttons */
button {
display: inline-flex;
align-items: center;
justify-content: center;
gap: 8px;
padding: 8px 16px; /* Compact padding */
font-size: 0.875rem;
font-weight: 500;
border-radius: var(--radius-md);
border: none;
cursor: pointer;
background: var(--primary);
color: var(--primary-text);
box-shadow: var(--shadow-sm);
transition: all 0.2s;
}
button:hover:not(:disabled) {
background: var(--primary-hover);
transform: translateY(-1px);
box-shadow: var(--shadow-glow);
}
button:active:not(:disabled) {
transform: translateY(0);
}
button:disabled {
opacity: 0.5;
cursor: not-allowed;
background: #3f3f46; /* Zinc 700 */
}
button.ghost {
background: transparent;
color: var(--text-muted);
box-shadow: none;
border: 1px solid transparent;
}
button.ghost:hover:not(:disabled) {
background: rgba(255, 255, 255, 0.05);
color: var(--text-main);
border-color: var(--border-color);
}
/* Form Layout */
.login-form {
display: flex;
flex-direction: column;
gap: 12px;
margin: 24px 0;
}
.login-form button {
margin-top: 8px;
width: 100%;
height: 44px;
}
.link-row {
display: flex;
justify-content: center;
gap: 16px;
margin-top: 16px;
}
.link-row button {
font-size: 0.875rem;
padding: 4px 8px;
height: auto;
}
/* Status Indicators */
.status {
display: inline-flex;
align-items: center;
padding: 4px 10px;
border-radius: 999px;
font-size: 0.75rem;
font-weight: 600;
text-transform: uppercase;
letter-spacing: 0.02em;
}
.status.ok {
background: rgba(16, 185, 129, 0.15);
color: var(--status-ok);
border: 1px solid rgba(16, 185, 129, 0.2);
}
.status.idle {
background: rgba(113, 113, 122, 0.15); /* Zinc 500 */
color: #a1a1aa;
border: 1px solid rgba(113, 113, 122, 0.2);
}
.status.blocked {
background: rgba(239, 68, 68, 0.15);
color: var(--status-error);
border: 1px solid rgba(239, 68, 68, 0.2);
}
/* LEDs */
.tool-led {
display: flex;
align-items: center;
gap: 8px;
}
.led {
width: 6px;
height: 6px;
border-radius: 50%;
background: #3f3f46;
box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.1);
}
.led.ok {
background: var(--status-ok);
box-shadow: 0 0 8px rgba(16, 185, 129, 0.6);
}
.led.blocked {
background: var(--status-error);
box-shadow: 0 0 8px rgba(239, 68, 68, 0.6);
}
.led.idle {
background: var(--status-warn);
box-shadow: 0 0 8px rgba(245, 158, 11, 0.6);
}
/* Main Dashboard Layout */
.main-layout {
display: grid;
grid-template-rows: auto 1fr auto;
gap: 12px; /* Reduced gap */
height: 100%;
overflow: hidden; /* Prevent body scroll, handle inside if needed */
}
.top-bar {
/* Compact Top Bar */
padding: 12px 16px;
display: flex;
justify-content: space-between;
align-items: center;
}
.profile-summary {
display: flex;
flex-direction: column;
gap: 4px;
}
.profile-title {
display: flex;
align-items: baseline;
gap: 12px;
}
.profile-name {
font-size: 1.5rem;
font-weight: 700;
color: var(--text-main);
background: linear-gradient(to right, #fff, #a1a1aa);
background-clip: text;
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
}
.profile-meta {
display: flex;
gap: 16px;
font-size: 0.8125rem;
color: var(--text-muted);
}
.profile-actions {
display: flex;
gap: 8px;
}
.profile-actions button {
padding: 6px 12px;
font-size: 0.8125rem;
border-radius: var(--radius-sm);
}
/* Main Runner Grid */
/* Main Runner Card (Replaces Grid) */
.spt-runner-card {
background: var(--bg-card);
backdrop-filter: blur(12px);
-webkit-backdrop-filter: blur(12px);
border: 1px solid var(--border-color);
border-radius: var(--radius-lg);
padding: 12px;
display: flex;
flex-direction: column;
gap: 12px;
overflow: hidden;
}
.section-head {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 4px;
}
/* Config Rows in 2-Column Grid */
.spt-rows-container {
display: grid;
grid-template-columns: 1fr 1fr;
gap: 12px;
flex-shrink: 0; /* Prevent shrinking if notices grow */
}
.spt-row {
display: flex;
flex-direction: column;
gap: 4px;
padding: 8px 12px;
background: rgba(255, 255, 255, 0.03);
border: 1px solid var(--border-color);
border-radius: var(--radius-md);
}
.row-header {
display: flex;
justify-content: space-between;
align-items: center;
}
.row-header .label {
font-size: 0.75rem;
font-weight: 600;
color: var(--text-muted);
text-transform: uppercase;
letter-spacing: 0.05em;
}
.row-body {
display: flex;
flex-direction: column;
}
.value {
font-size: 0.9375rem;
color: var(--text-main);
font-weight: 500;
word-break: break-all; /* Allow path to wrap if needed */
display: -webkit-box;
-webkit-line-clamp: 2; /* Max 2 lines */
line-clamp: 2;
-webkit-box-orient: vertical;
overflow: hidden;
}
.sub-helper {
font-size: 0.75rem;
color: var(--text-muted);
margin-top: 2px;
}
.row-controls {
display: flex;
gap: 8px;
margin-top: 4px;
align-items: center;
justify-content: flex-end;
}
.version-select {
flex: 1;
background: var(--bg-input);
color: var(--text-main);
border: 1px solid var(--border-color);
border-radius: var(--radius-sm);
padding: 4px 8px;
font-size: 0.8125rem;
}
/* Giant Launch Button */
/* Header Launch Button */
.launch-button-header {
height: 36px;
padding: 0 16px;
border: none;
border-radius: var(--radius-md);
background: linear-gradient(135deg, var(--primary), var(--primary-hover));
color: white;
display: flex;
align-items: center;
gap: 8px;
cursor: pointer;
box-shadow: var(--shadow-sm);
transition: all 0.2s;
flex-shrink: 0;
}
.launch-button-header:hover:not(:disabled) {
transform: translateY(-1px);
box-shadow: var(--shadow-glow);
}
.launch-button-header:disabled {
background: #27272a;
color: #52525b;
cursor: not-allowed;
box-shadow: none;
opacity: 0.7;
}
.launch-button-header .launch-icon {
font-size: 1.1rem;
margin: 0;
line-height: 1;
}
.launch-button-header .launch-info {
display: flex;
flex-direction: column;
align-items: flex-start;
line-height: 1;
}
.launch-button-header .launch-text {
font-size: 0.9rem;
font-weight: 600;
text-transform: uppercase;
}
/* Obsolete Giant Button styles below can be removed or kept if referred elsewhere,
but cleaned up here for clarity */
.launch-sub {
display: none;
}
.launch-sub {
font-size: 0.75rem;
opacity: 0.8;
font-weight: 400;
}
/* Notices */
.notices-area {
margin-top: auto; /* Push to bottom of config col */
display: flex;
flex-direction: column;
gap: 8px;
}
.notice {
padding: 10px;
border-radius: var(--radius-md);
font-size: 0.8125rem;
display: flex;
align-items: center;
gap: 8px;
}
.notice.warning {
background: rgba(245, 158, 11, 0.1);
color: #fbbf24;
border: 1px solid rgba(245, 158, 11, 0.2);
}
.notice.info {
background: rgba(59, 130, 246, 0.1);
color: #60a5fa;
border: 1px solid rgba(59, 130, 246, 0.2);
}
.notice.error {
background: rgba(239, 68, 68, 0.1);
color: #f87171;
border: 1px solid rgba(239, 68, 68, 0.2);
}
.spt-launch button:hover:not(:disabled) {
box-shadow: 0 6px 25px rgba(99, 102, 241, 0.6);
transform: translateY(-2px);
}
/* Footer */
.footer {
display: flex;
justify-content: flex-end;
gap: 20px;
padding-top: 12px;
border-top: 1px solid var(--border-color);
}
/* Modal */
.modal-overlay {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
background: rgba(0, 0, 0, 0.7);
backdrop-filter: blur(4px);
z-index: 100;
display: flex;
align-items: center;
justify-content: center;
animation: fadeIn 0.2s ease-out;
}
.modal {
width: 100%;
max-width: 500px;
background: #18181b; /* Zinc 900 */
border: 1px solid var(--border-color);
border-radius: var(--radius-lg);
padding: 24px;
box-shadow: var(--shadow-lg);
display: flex;
flex-direction: column;
gap: 20px;
animation: scaleIn 0.2s ease-out;
}
.modal-header {
display: flex;
justify-content: space-between;
align-items: center;
}
.modal-header h3 {
margin: 0;
font-size: 1.1rem;
}
.modal-row {
display: flex;
justify-content: space-between;
align-items: center;
padding: 12px 0;
border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}
/* Animations */
@keyframes fadeIn {
from {
opacity: 0;
}
to {
opacity: 1;
}
}
@keyframes scaleIn {
from {
opacity: 0;
transform: scale(0.95);
}
to {
opacity: 1;
transform: scale(1);
}
}
/* Notice & Alerts */
.notice {
background: rgba(99, 102, 241, 0.1);
border: 1px solid rgba(99, 102, 241, 0.2);
border-radius: var(--radius-md);
padding: 12px;
font-size: 0.875rem;
color: #e4e4e7;
}
.notice strong {
color: var(--primary-text);
display: block;
margin-bottom: 4px;
}