feat: AutoBooking initial commit — PHP WordPress Plugin (REST API, wpdb, WP_User_Query)
This commit is contained in:
@@ -0,0 +1,451 @@
|
||||
/* ── Command Center — AutoBooking dark theme ─────────────────── */
|
||||
|
||||
* { box-sizing: border-box; margin: 0; padding: 0; }
|
||||
|
||||
#cc-app {
|
||||
background: #0b0b0b;
|
||||
color: #e0e0e0;
|
||||
font-family: 'Inter', 'Segoe UI', sans-serif;
|
||||
height: 100vh;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
/* ── Header ──────────────────────────────────────────────────── */
|
||||
|
||||
#cc-header {
|
||||
background: rgba(17,17,17,0.97);
|
||||
border-bottom: 1px solid rgba(255,111,0,0.35);
|
||||
padding: 10px 18px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 16px;
|
||||
flex-shrink: 0;
|
||||
z-index: 50;
|
||||
}
|
||||
|
||||
.cc-brand {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 8px;
|
||||
font-size: 13px;
|
||||
font-weight: 800;
|
||||
letter-spacing: 2.5px;
|
||||
color: #FF6F00;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.cc-kpis {
|
||||
display: flex;
|
||||
gap: 10px;
|
||||
flex: 1;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.cc-kpi {
|
||||
background: rgba(255,255,255,0.04);
|
||||
border: 1px solid rgba(255,255,255,0.1);
|
||||
border-radius: 8px;
|
||||
padding: 5px 14px;
|
||||
text-align: center;
|
||||
min-width: 78px;
|
||||
}
|
||||
|
||||
.cc-kpi span {
|
||||
display: block;
|
||||
font-size: 20px;
|
||||
font-weight: 700;
|
||||
color: #FF6F00;
|
||||
line-height: 1.2;
|
||||
}
|
||||
|
||||
.cc-kpi small {
|
||||
font-size: 9px;
|
||||
color: #666;
|
||||
text-transform: uppercase;
|
||||
letter-spacing: 0.5px;
|
||||
}
|
||||
|
||||
.cc-kpi-sos { border-color: rgba(255,68,68,0.3); }
|
||||
.cc-kpi-sos span { color: #ff4444; }
|
||||
.cc-kpi-sos.sos-active { animation: sosPulse 0.8s ease-in-out infinite; border-color: rgba(255,68,68,0.7); }
|
||||
|
||||
@keyframes sosPulse {
|
||||
0%, 100% { background: rgba(255,68,68,0.08); }
|
||||
50% { background: rgba(255,68,68,0.25); }
|
||||
}
|
||||
|
||||
#cc-theme-switcher {
|
||||
display: flex;
|
||||
gap: 4px;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.cc-theme-btn {
|
||||
background: rgba(255,255,255,0.05);
|
||||
border: 1px solid rgba(255,255,255,0.12);
|
||||
border-radius: 5px;
|
||||
color: #888;
|
||||
font-size: 10px;
|
||||
font-weight: 600;
|
||||
letter-spacing: 0.5px;
|
||||
padding: 3px 8px;
|
||||
cursor: pointer;
|
||||
transition: all 0.15s;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.cc-theme-btn:hover {
|
||||
background: rgba(255,255,255,0.1);
|
||||
color: #ccc;
|
||||
}
|
||||
|
||||
.cc-theme-btn.active {
|
||||
background: rgba(255,111,0,0.18);
|
||||
border-color: rgba(255,111,0,0.5);
|
||||
color: #FF6F00;
|
||||
}
|
||||
|
||||
#cc-clock {
|
||||
font-size: 15px;
|
||||
font-family: 'Courier New', monospace;
|
||||
color: #888;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
/* ── Body layout ─────────────────────────────────────────────── */
|
||||
|
||||
#cc-body {
|
||||
display: flex;
|
||||
flex: 1;
|
||||
overflow: hidden;
|
||||
min-height: 0;
|
||||
}
|
||||
|
||||
/* ── Map ─────────────────────────────────────────────────────── */
|
||||
|
||||
#cc-map-wrap {
|
||||
flex: 2;
|
||||
position: relative;
|
||||
min-width: 0;
|
||||
min-height: 500px;
|
||||
}
|
||||
|
||||
#cc-map {
|
||||
position: absolute;
|
||||
inset: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
min-height: 500px;
|
||||
}
|
||||
|
||||
#cc-legend {
|
||||
position: absolute;
|
||||
bottom: 14px;
|
||||
left: 14px;
|
||||
background: rgba(11,11,11,0.88);
|
||||
border: 1px solid rgba(255,255,255,0.1);
|
||||
border-radius: 8px;
|
||||
padding: 7px 12px;
|
||||
display: flex;
|
||||
gap: 14px;
|
||||
font-size: 11px;
|
||||
color: #bbb;
|
||||
z-index: 5;
|
||||
backdrop-filter: blur(6px);
|
||||
}
|
||||
|
||||
.leg-dot {
|
||||
display: inline-block;
|
||||
width: 9px; height: 9px;
|
||||
border-radius: 50%;
|
||||
margin-right: 5px;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
.leg-trip { background: #FF6F00; }
|
||||
.leg-free { background: #00cc66; }
|
||||
.leg-sos { background: #ff4444; }
|
||||
|
||||
/* ── Sidebar ─────────────────────────────────────────────────── */
|
||||
|
||||
#cc-sidebar {
|
||||
width: 330px;
|
||||
flex-shrink: 0;
|
||||
background: rgba(11,11,11,0.97);
|
||||
border-left: 1px solid rgba(255,111,0,0.18);
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.cc-section {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
flex: 1;
|
||||
min-height: 0;
|
||||
border-bottom: 1px solid rgba(255,255,255,0.06);
|
||||
}
|
||||
|
||||
.cc-sec-hdr {
|
||||
padding: 9px 13px;
|
||||
font-size: 10px;
|
||||
font-weight: 800;
|
||||
letter-spacing: 1.8px;
|
||||
color: #FF6F00;
|
||||
background: rgba(255,111,0,0.06);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 7px;
|
||||
flex-shrink: 0;
|
||||
text-transform: uppercase;
|
||||
}
|
||||
|
||||
.sos-hdr { color: #ff4444; background: rgba(255,68,68,0.07); }
|
||||
|
||||
.cc-badge {
|
||||
margin-left: auto;
|
||||
background: #ff4444;
|
||||
color: #fff;
|
||||
font-size: 10px;
|
||||
font-weight: 700;
|
||||
padding: 2px 7px;
|
||||
border-radius: 10px;
|
||||
min-width: 20px;
|
||||
text-align: center;
|
||||
line-height: 1.4;
|
||||
}
|
||||
|
||||
#sos-list, #trips-list {
|
||||
overflow-y: auto;
|
||||
flex: 1;
|
||||
padding: 6px;
|
||||
scrollbar-width: thin;
|
||||
scrollbar-color: rgba(255,111,0,0.3) transparent;
|
||||
}
|
||||
|
||||
.cc-empty { text-align: center; color: #444; font-size: 12px; padding: 24px 10px; }
|
||||
|
||||
/* ── SOS card ────────────────────────────────────────────────── */
|
||||
|
||||
.sos-card {
|
||||
background: rgba(255,68,68,0.08);
|
||||
border: 1px solid rgba(255,68,68,0.35);
|
||||
border-radius: 8px;
|
||||
padding: 10px 12px;
|
||||
margin-bottom: 6px;
|
||||
transition: border-color 0.2s;
|
||||
}
|
||||
|
||||
.sos-card:hover { border-color: #ff4444; }
|
||||
|
||||
.sos-card-top { display: flex; justify-content: space-between; margin-bottom: 4px; }
|
||||
.sos-card-name { font-size: 13px; font-weight: 600; color: #ff7070; }
|
||||
.sos-card-time { font-size: 11px; color: #666; }
|
||||
.sos-card-type { font-size: 11px; color: #999; margin-bottom: 8px; }
|
||||
.sos-card-actions { display: flex; gap: 6px; }
|
||||
|
||||
/* ── Trip card ───────────────────────────────────────────────── */
|
||||
|
||||
.trip-card {
|
||||
background: rgba(255,255,255,0.03);
|
||||
border: 1px solid rgba(255,255,255,0.07);
|
||||
border-radius: 8px;
|
||||
padding: 10px 12px;
|
||||
margin-bottom: 6px;
|
||||
cursor: pointer;
|
||||
transition: border-color 0.2s, background 0.2s;
|
||||
}
|
||||
|
||||
.trip-card:hover,
|
||||
.trip-card.selected {
|
||||
border-color: rgba(255,111,0,0.5);
|
||||
background: rgba(255,111,0,0.05);
|
||||
}
|
||||
|
||||
.trip-card-driver { font-size: 13px; font-weight: 600; color: #FF6F00; margin-bottom: 2px; }
|
||||
.trip-card-passenger { font-size: 12px; color: #999; margin-bottom: 3px; }
|
||||
.trip-card-route { font-size: 11px; color: #555; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
|
||||
.trip-card-status { font-size: 10px; color: #00cc66; margin-top: 4px; text-transform: uppercase; letter-spacing: 0.5px; }
|
||||
|
||||
/* ── Google Maps InfoWindow — dark theme override ────────────── */
|
||||
|
||||
.gm-style-iw-c {
|
||||
background: rgba(13,13,13,0.95) !important;
|
||||
border: 1px solid rgba(255,111,0,0.4) !important;
|
||||
border-radius: 10px !important;
|
||||
padding: 0 !important;
|
||||
box-shadow: 0 4px 24px rgba(0,0,0,0.75) !important;
|
||||
}
|
||||
.gm-style-iw-d { overflow: hidden !important; }
|
||||
.gm-style-iw-t::after { background: rgba(13,13,13,0.95) !important; }
|
||||
.gm-ui-hover-effect,
|
||||
button[aria-label="Close"] { display: none !important; }
|
||||
|
||||
/* ── Trip panel (sidebar) ────────────────────────────────────── */
|
||||
|
||||
.cc-trip-panel-section { flex: none !important; }
|
||||
|
||||
.cc-panel-body {
|
||||
padding: 8px;
|
||||
overflow-y: auto;
|
||||
max-height: 340px;
|
||||
scrollbar-width: thin;
|
||||
scrollbar-color: rgba(255,111,0,0.3) transparent;
|
||||
}
|
||||
|
||||
#cc-panel-info {
|
||||
display: grid;
|
||||
grid-template-columns: 1fr 1fr;
|
||||
gap: 6px;
|
||||
margin-bottom: 8px;
|
||||
}
|
||||
|
||||
.cc-info-item label {
|
||||
display: block;
|
||||
font-size: 9px;
|
||||
color: #555;
|
||||
text-transform: uppercase;
|
||||
letter-spacing: 0.5px;
|
||||
margin-bottom: 2px;
|
||||
}
|
||||
|
||||
.cc-info-item span { font-size: 12px; color: #ddd; font-weight: 500; }
|
||||
|
||||
.cc-panel-close {
|
||||
margin-left: auto;
|
||||
background: none; border: none; color: #555;
|
||||
cursor: pointer; font-size: 15px; line-height: 1;
|
||||
padding: 0 2px;
|
||||
transition: color 0.2s;
|
||||
}
|
||||
.cc-panel-close:hover { color: #fff; }
|
||||
|
||||
#cc-panel-btns {
|
||||
display: flex; flex-wrap: wrap; gap: 6px;
|
||||
padding-top: 8px;
|
||||
border-top: 1px solid rgba(255,255,255,0.06);
|
||||
}
|
||||
|
||||
/* ── Pattern analysis ────────────────────────────────────────── */
|
||||
|
||||
.cc-pattern {
|
||||
background: rgba(255,255,255,0.03);
|
||||
border: 1px solid rgba(255,255,255,0.07);
|
||||
border-radius: 8px;
|
||||
padding: 8px 10px;
|
||||
margin-bottom: 8px;
|
||||
font-size: 12px;
|
||||
}
|
||||
.cc-pattern-hdr {
|
||||
font-size: 9px; text-transform: uppercase;
|
||||
letter-spacing: 1.2px; color: #FF6F00;
|
||||
font-weight: 700; margin-bottom: 7px;
|
||||
}
|
||||
.cc-pattern-row {
|
||||
display: flex; justify-content: space-between;
|
||||
margin-bottom: 4px; color: #888; font-size: 11px;
|
||||
}
|
||||
.cc-pattern-row strong { color: #ddd; }
|
||||
.cc-p-ok { color: #00cc66; font-size: 11px; font-weight: 600; margin-top: 5px; }
|
||||
.cc-p-warn { color: #FF6F00; font-size: 11px; font-weight: 600; margin-top: 5px; }
|
||||
.cc-p-alert { color: #ff4444; font-size: 11px; font-weight: 600; margin-top: 5px; }
|
||||
|
||||
/* ── Buttons ─────────────────────────────────────────────────── */
|
||||
|
||||
.ccb {
|
||||
padding: 8px 14px;
|
||||
border-radius: 8px; border: none;
|
||||
cursor: pointer; font-size: 12px; font-weight: 600;
|
||||
transition: opacity 0.15s, transform 0.1s;
|
||||
white-space: nowrap; font-family: inherit;
|
||||
}
|
||||
|
||||
.ccb:hover { opacity: 0.8; }
|
||||
.ccb:active { transform: scale(0.97); }
|
||||
|
||||
.ccb-green { background: rgba(0,204,102,0.15); color: #00cc66; border: 1px solid rgba(0,204,102,0.4); }
|
||||
.ccb-red { background: rgba(255,68,68,0.15); color: #ff5555; border: 1px solid rgba(255,68,68,0.4); }
|
||||
.ccb-orange { background: rgba(255,111,0,0.15); color: #FF6F00; border: 1px solid rgba(255,111,0,0.4); }
|
||||
.ccb-blue { background: rgba(66,153,225,0.15); color: #66b3ff; border: 1px solid rgba(66,153,225,0.4); }
|
||||
.ccb-dark { background: rgba(255,255,255,0.07); color: #999; border: 1px solid rgba(255,255,255,0.12); }
|
||||
|
||||
.ccbs { padding: 4px 10px; border-radius: 6px; border: none; cursor: pointer; font-size: 11px; font-weight: 600; font-family: inherit; transition: opacity 0.15s; }
|
||||
.ccbs:hover { opacity: 0.75; }
|
||||
.ccbs-resolve { background: rgba(0,204,102,0.15); color: #00cc66; border: 1px solid rgba(0,204,102,0.3); }
|
||||
.ccbs-select { background: rgba(255,111,0,0.12); color: #FF6F00; border: 1px solid rgba(255,111,0,0.3); }
|
||||
|
||||
/* ── Modals ──────────────────────────────────────────────────── */
|
||||
|
||||
.cc-modal { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.75); z-index: 400; align-items: center; justify-content: center; }
|
||||
.cc-modal.open { display: flex; }
|
||||
|
||||
.cc-modal-inner {
|
||||
background: #141414;
|
||||
border: 1px solid rgba(255,111,0,0.3);
|
||||
border-radius: 12px;
|
||||
padding: 22px 24px;
|
||||
width: 480px; max-width: 95vw;
|
||||
max-height: 90vh; overflow-y: auto;
|
||||
}
|
||||
|
||||
.cc-modal-inner h3 { color: #FF6F00; font-size: 14px; margin-bottom: 16px; letter-spacing: 0.5px; text-transform: uppercase; }
|
||||
|
||||
.cc-modal-inner select,
|
||||
.cc-modal-inner textarea {
|
||||
width: 100%;
|
||||
background: rgba(255,255,255,0.05);
|
||||
border: 1px solid rgba(255,255,255,0.12);
|
||||
color: #e0e0e0;
|
||||
border-radius: 8px;
|
||||
padding: 9px 12px;
|
||||
font-size: 13px;
|
||||
margin-bottom: 12px;
|
||||
resize: vertical;
|
||||
font-family: inherit;
|
||||
}
|
||||
|
||||
.cc-modal-inner select { resize: none; }
|
||||
|
||||
.proto-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 12px; }
|
||||
|
||||
.proto-opt {
|
||||
background: rgba(255,255,255,0.04);
|
||||
border: 1px solid rgba(255,255,255,0.09);
|
||||
color: #ccc; padding: 11px 10px;
|
||||
border-radius: 8px; cursor: pointer;
|
||||
font-size: 13px; text-align: left;
|
||||
transition: all 0.2s; font-family: inherit;
|
||||
}
|
||||
|
||||
.proto-opt:hover { border-color: rgba(255,111,0,0.4); color: #ddd; }
|
||||
.proto-opt.selected { background: rgba(255,111,0,0.15); border-color: #FF6F00; color: #FF6F00; }
|
||||
|
||||
.cc-modal-btns { display: flex; gap: 8px; justify-content: flex-end; margin-top: 4px; }
|
||||
|
||||
/* ── Toast ───────────────────────────────────────────────────── */
|
||||
|
||||
.cc-toast {
|
||||
position: fixed; bottom: 24px; right: 20px;
|
||||
background: #1c1c1c; border-radius: 8px;
|
||||
padding: 11px 16px; font-size: 13px; color: #fff;
|
||||
z-index: 9999; transform: translateX(120%);
|
||||
transition: transform 0.3s ease;
|
||||
max-width: 280px; box-shadow: 0 4px 20px rgba(0,0,0,0.5);
|
||||
}
|
||||
|
||||
.cc-toast.show { transform: translateX(0); }
|
||||
.cc-toast.t-success { border-left: 3px solid #00cc66; }
|
||||
.cc-toast.t-warning { border-left: 3px solid #FF6F00; }
|
||||
.cc-toast.t-error { border-left: 3px solid #ff4444; }
|
||||
.cc-toast.t-info { border-left: 3px solid #66b3ff; }
|
||||
|
||||
/* ── SOS section flash ───────────────────────────────────────── */
|
||||
|
||||
.sos-flash { animation: sosFlash 0.5s ease-in-out 6; }
|
||||
|
||||
@keyframes sosFlash {
|
||||
0%, 100% { background: transparent; }
|
||||
50% { background: rgba(255,68,68,0.15); }
|
||||
}
|
||||
Reference in New Issue
Block a user