Files
Comtropy_CargoRadar/apps/web/public/styles.css

595 lines
9.6 KiB
CSS

:root {
color-scheme: light;
--bg: #f5f7f9;
--surface: #ffffff;
--surface-muted: #eef2f5;
--border: #d9e0e7;
--text: #17212b;
--muted: #657487;
--blue: #1f6feb;
--green: #15803d;
--amber: #b45309;
--red: #b42318;
--shadow: 0 12px 30px rgba(25, 37, 52, 0.08);
}
* {
box-sizing: border-box;
}
html,
body {
width: 100%;
height: 100%;
margin: 0;
}
body {
background: var(--bg);
color: var(--text);
font-family:
"Segoe UI",
"Noto Sans KR",
system-ui,
-apple-system,
BlinkMacSystemFont,
sans-serif;
letter-spacing: 0;
}
button {
min-height: 36px;
border: 1px solid var(--border);
border-radius: 6px;
background: var(--surface);
color: var(--text);
font: inherit;
font-weight: 700;
cursor: pointer;
white-space: nowrap;
}
button:hover {
border-color: #9aa9b8;
background: #f9fbfc;
}
.app-shell {
display: grid;
grid-template-rows: 58px minmax(0, 1fr);
width: 100%;
height: 100%;
}
.topbar {
display: flex;
align-items: center;
justify-content: space-between;
gap: 16px;
padding: 0 18px;
border-bottom: 1px solid var(--border);
background: var(--surface);
box-shadow: 0 1px 0 rgba(23, 33, 43, 0.02);
}
.brand {
font-size: 18px;
}
.subtitle {
margin-left: 8px;
color: var(--muted);
font-size: 13px;
font-weight: 700;
}
.toolbar {
display: flex;
align-items: center;
gap: 8px;
}
.status-pill {
display: inline-flex;
align-items: center;
min-height: 30px;
padding: 0 10px;
border: 1px solid var(--border);
border-radius: 999px;
background: var(--surface-muted);
color: var(--muted);
font-size: 13px;
font-weight: 800;
}
.status-pill.is-online {
border-color: rgba(21, 128, 61, 0.25);
background: rgba(21, 128, 61, 0.08);
color: var(--green);
}
.status-pill.is-error {
border-color: rgba(180, 35, 24, 0.25);
background: rgba(180, 35, 24, 0.08);
color: var(--red);
}
.workspace {
display: grid;
grid-template-columns: minmax(320px, 380px) minmax(0, 1fr);
min-height: 0;
}
.sidebar {
display: grid;
grid-template-rows: auto auto minmax(0, 1fr);
gap: 12px;
min-height: 0;
padding: 14px;
border-right: 1px solid var(--border);
background: #fbfcfd;
}
.summary-grid {
display: grid;
grid-template-columns: repeat(3, minmax(0, 1fr));
gap: 8px;
}
.metric {
min-width: 0;
padding: 12px;
border: 1px solid var(--border);
border-radius: 8px;
background: var(--surface);
}
.metric-label {
display: block;
color: var(--muted);
font-size: 12px;
font-weight: 800;
}
.metric strong {
display: block;
margin-top: 4px;
font-size: 24px;
line-height: 1.1;
}
.view-tabs {
display: grid;
grid-template-columns: repeat(2, minmax(0, 1fr));
gap: 6px;
padding: 4px;
border: 1px solid var(--border);
border-radius: 8px;
background: var(--surface-muted);
}
.tab-button {
min-width: 0;
border-color: transparent;
background: transparent;
color: var(--muted);
}
.tab-button.is-active {
border-color: var(--border);
background: var(--surface);
color: var(--text);
box-shadow: 0 1px 4px rgba(25, 37, 52, 0.08);
}
.vehicle-panel {
min-height: 0;
border: 1px solid var(--border);
border-radius: 8px;
background: var(--surface);
box-shadow: var(--shadow);
overflow: hidden;
}
.vehicle-panel.is-hidden {
display: none;
}
.panel-heading {
display: flex;
align-items: center;
justify-content: space-between;
gap: 12px;
padding: 14px;
border-bottom: 1px solid var(--border);
}
.panel-heading h1 {
margin: 0;
font-size: 16px;
line-height: 1.2;
}
.panel-heading span {
color: var(--muted);
font-size: 12px;
font-weight: 700;
white-space: nowrap;
}
.vehicle-list {
height: calc(100% - 50px);
overflow: auto;
}
.driver-form {
display: grid;
grid-template-columns: 1fr 1fr;
gap: 10px;
padding: 12px;
border-bottom: 1px solid var(--border);
}
.driver-form label {
display: grid;
gap: 5px;
min-width: 0;
}
.driver-form label:nth-child(3),
.driver-form label:nth-child(4),
.driver-form button {
grid-column: 1 / -1;
}
.driver-form span {
color: var(--muted);
font-size: 12px;
font-weight: 800;
}
.driver-form input {
width: 100%;
min-height: 36px;
border: 1px solid var(--border);
border-radius: 6px;
padding: 0 9px;
background: #ffffff;
color: var(--text);
font: inherit;
}
.driver-form input:focus {
border-color: var(--blue);
outline: 2px solid rgba(31, 111, 235, 0.14);
}
.driver-list {
height: calc(100% - 259px);
min-height: 160px;
overflow: auto;
}
.driver-item {
display: grid;
gap: 10px;
padding: 13px 14px;
border-bottom: 1px solid var(--border);
}
.driver-head {
display: grid;
grid-template-columns: minmax(0, 1fr) auto;
gap: 8px;
align-items: start;
}
.driver-title {
min-width: 0;
}
.driver-title strong,
.driver-token code {
display: block;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.driver-token {
display: grid;
grid-template-columns: minmax(0, 1fr) auto;
gap: 8px;
align-items: center;
padding: 8px;
border: 1px solid var(--border);
border-radius: 6px;
background: #f8fafb;
}
.driver-token code {
color: #25313d;
font-family: Consolas, "SFMono-Regular", monospace;
font-size: 12px;
}
.driver-actions {
display: grid;
grid-template-columns: repeat(3, minmax(0, 1fr));
gap: 6px;
}
.empty-state {
padding: 20px 14px;
color: var(--muted);
font-size: 14px;
line-height: 1.5;
}
.vehicle-item {
display: grid;
grid-template-columns: minmax(0, 1fr) auto;
gap: 10px;
padding: 13px 14px;
border-bottom: 1px solid var(--border);
cursor: pointer;
}
.vehicle-item:hover {
background: #f6f9fb;
}
.vehicle-main {
min-width: 0;
}
.vehicle-title {
display: flex;
align-items: center;
gap: 8px;
min-width: 0;
}
.vehicle-title strong {
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.vehicle-meta {
margin-top: 6px;
color: var(--muted);
font-size: 12px;
line-height: 1.45;
}
.badge {
display: inline-flex;
align-items: center;
min-height: 22px;
padding: 0 7px;
border-radius: 999px;
font-size: 11px;
font-weight: 900;
}
.badge.active {
background: rgba(21, 128, 61, 0.1);
color: var(--green);
}
.badge.stale {
background: rgba(180, 83, 9, 0.12);
color: var(--amber);
}
.badge.offline {
background: rgba(180, 35, 24, 0.1);
color: var(--red);
}
.speed {
color: var(--text);
font-size: 13px;
font-weight: 800;
white-space: nowrap;
}
.map-panel {
position: relative;
min-width: 0;
min-height: 0;
}
#map {
width: 100%;
height: 100%;
background: #dfe7ed;
}
.map-message {
position: absolute;
z-index: 5;
top: 14px;
left: 50%;
max-width: min(420px, calc(100% - 28px));
padding: 10px 12px;
border: 1px solid var(--border);
border-radius: 8px;
background: rgba(255, 255, 255, 0.96);
color: var(--muted);
box-shadow: var(--shadow);
font-size: 13px;
font-weight: 800;
line-height: 1.35;
text-align: center;
transform: translateX(-50%);
}
.map-message.is-hidden {
display: none;
}
.history-drawer {
position: absolute;
z-index: 4;
right: 14px;
bottom: 14px;
left: 14px;
max-height: min(310px, calc(100% - 28px));
border: 1px solid var(--border);
border-radius: 8px;
background: rgba(255, 255, 255, 0.97);
box-shadow: var(--shadow);
overflow: hidden;
}
.history-drawer.is-hidden {
display: none;
}
.history-heading {
display: flex;
align-items: center;
justify-content: space-between;
gap: 12px;
padding: 12px;
border-bottom: 1px solid var(--border);
}
.history-heading strong,
.history-heading span {
display: block;
}
.history-heading span {
margin-top: 3px;
color: var(--muted);
font-size: 12px;
font-weight: 700;
}
.history-list {
display: grid;
max-height: 248px;
overflow: auto;
}
.history-row {
display: grid;
grid-template-columns: 92px minmax(0, 1fr) 72px;
gap: 10px;
align-items: center;
padding: 9px 12px;
border-bottom: 1px solid var(--border);
font-size: 13px;
}
.history-row time,
.history-row span {
min-width: 0;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.history-row time {
color: var(--muted);
font-weight: 800;
}
.kakao-marker {
display: flex;
align-items: center;
justify-content: center;
width: max-content;
min-width: 42px;
min-height: 30px;
padding: 0 9px;
border: 2px solid #ffffff;
border-radius: 999px;
background: var(--blue);
color: #ffffff;
box-shadow: 0 8px 18px rgba(16, 32, 48, 0.25);
font-size: 11px;
font-weight: 900;
font-family: inherit;
cursor: pointer;
}
.kakao-marker.stale {
background: var(--amber);
}
.kakao-marker.offline {
background: var(--red);
}
.kakao-popup {
min-width: 180px;
padding: 12px;
border: 1px solid var(--border);
border-radius: 8px;
background: var(--surface);
box-shadow: var(--shadow);
color: var(--text);
font-size: 13px;
line-height: 1.45;
}
.popup-title {
display: block;
margin-bottom: 6px;
font-weight: 900;
}
@media (max-width: 860px) {
.app-shell {
grid-template-rows: auto minmax(0, 1fr);
}
.topbar {
align-items: flex-start;
flex-direction: column;
padding: 12px;
}
.toolbar {
width: 100%;
flex-wrap: wrap;
}
.workspace {
grid-template-columns: 1fr;
grid-template-rows: minmax(260px, 38vh) minmax(0, 1fr);
}
.sidebar {
order: 2;
border-top: 1px solid var(--border);
border-right: 0;
}
.map-panel {
order: 1;
}
.driver-actions {
grid-template-columns: 1fr;
}
.history-drawer {
right: 8px;
bottom: 8px;
left: 8px;
}
.history-row {
grid-template-columns: 82px minmax(0, 1fr);
}
.history-row span:last-child {
display: none;
}
}