Explorar el Código

Add frontend stylesheet

k4be hace 7 horas
padre
commit
236f84aa40
Se han modificado 1 ficheros con 920 adiciones y 0 borrados
  1. 920 0
      gpx-vis-frontend/css/style.css

+ 920 - 0
gpx-vis-frontend/css/style.css

@@ -0,0 +1,920 @@
+/* ===== CSS Variables ===== */
+:root {
+  --color-dark: #2c3e50;
+  --color-blue: #3498db;
+  --color-blue-hover: #2980b9;
+  --color-green: #27ae60;
+  --color-red: #e74c3c;
+  --color-red-hover: #c0392b;
+  --color-gray: #95a5a6;
+  --color-gray-hover: #7f8c8d;
+  --color-border: #e0e3e7;
+  --color-border-light: #f0f0f0;
+  --color-bg: #f8f9fa;
+  --color-white: #ffffff;
+  --color-text: #2c3e50;
+  --color-text-light: #666666;
+  --color-text-lighter: #999999;
+  --sidebar-width: 320px;
+  --topbar-height: 48px;
+  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.1);
+  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.15);
+  --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.2);
+  --radius-sm: 4px;
+  --radius-md: 6px;
+  --radius-lg: 8px;
+  --radius-xl: 12px;
+}
+
+/* ===== Reset ===== */
+*, *::before, *::after {
+  box-sizing: border-box;
+  margin: 0;
+  padding: 0;
+}
+
+/* ===== Base ===== */
+body {
+  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
+  display: flex;
+  flex-direction: column;
+  height: 100vh;
+  overflow: hidden;
+  color: var(--color-text);
+  font-size: 14px;
+  line-height: 1.5;
+}
+
+/* ===== Auth Page ===== */
+#auth-page {
+  position: fixed;
+  inset: 0;
+  display: flex;
+  align-items: center;
+  justify-content: center;
+  background: linear-gradient(135deg, var(--color-dark) 0%, var(--color-blue) 100%);
+  z-index: 10000;
+}
+
+.auth-container {
+  background: var(--color-white);
+  padding: 40px;
+  border-radius: var(--radius-xl);
+  box-shadow: var(--shadow-lg);
+  min-width: 360px;
+  width: 100%;
+  max-width: 420px;
+}
+
+.auth-container h1 {
+  text-align: center;
+  margin-bottom: 24px;
+  color: var(--color-dark);
+  font-size: 24px;
+  font-weight: 700;
+}
+
+.auth-tabs {
+  display: flex;
+  margin-bottom: 20px;
+  border-radius: var(--radius-md);
+  overflow: hidden;
+  border: 1px solid var(--color-border);
+}
+
+.auth-tab {
+  flex: 1;
+  padding: 10px;
+  border: none;
+  border-right: 1px solid var(--color-border);
+  cursor: pointer;
+  background: var(--color-white);
+  color: var(--color-text-light);
+  font-size: 14px;
+  font-weight: 500;
+  transition: background 0.2s, color 0.2s;
+}
+
+.auth-tab:last-child {
+  border-right: none;
+}
+
+.auth-tab:hover:not(.active) {
+  background: var(--color-bg);
+}
+
+.auth-tab.active {
+  background: var(--color-blue);
+  color: var(--color-white);
+}
+
+/* ===== Form Inputs ===== */
+input[type="text"],
+input[type="password"],
+input[type="email"] {
+  display: block;
+  width: 100%;
+  padding: 10px 12px;
+  border: 1px solid #ddd;
+  border-radius: var(--radius-md);
+  margin-bottom: 12px;
+  font-size: 14px;
+  outline: none;
+  transition: border-color 0.2s;
+  color: var(--color-text);
+  background: var(--color-white);
+}
+
+input[type="text"]:focus,
+input[type="password"]:focus,
+input[type="email"]:focus {
+  border-color: var(--color-blue);
+  box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
+}
+
+form button[type="submit"] {
+  display: block;
+  width: 100%;
+  padding: 12px;
+  background: var(--color-blue);
+  color: var(--color-white);
+  border: none;
+  border-radius: var(--radius-md);
+  cursor: pointer;
+  font-size: 16px;
+  font-weight: 500;
+  transition: background 0.2s;
+  margin-top: 4px;
+}
+
+form button[type="submit"]:hover {
+  background: var(--color-blue-hover);
+}
+
+#login-form,
+#register-form {
+  display: flex;
+  flex-direction: column;
+}
+
+/* ===== Messages ===== */
+.error-msg {
+  color: var(--color-red);
+  font-size: 13px;
+  margin-bottom: 12px;
+  padding: 8px 12px;
+  background: #fdf0ef;
+  border-radius: var(--radius-sm);
+  border-left: 3px solid var(--color-red);
+}
+
+.success-msg {
+  color: var(--color-green);
+  font-size: 13px;
+  margin-bottom: 12px;
+  padding: 8px 12px;
+  background: #eafaf1;
+  border-radius: var(--radius-sm);
+  border-left: 3px solid var(--color-green);
+}
+
+/* ===== Topbar ===== */
+#topbar {
+  height: var(--topbar-height);
+  background: var(--color-dark);
+  color: var(--color-white);
+  display: flex;
+  align-items: center;
+  justify-content: space-between;
+  padding: 0 16px;
+  flex-shrink: 0;
+  z-index: 100;
+}
+
+#topbar-left {
+  display: flex;
+  align-items: center;
+  gap: 12px;
+}
+
+#topbar-right {
+  display: flex;
+  align-items: center;
+  gap: 8px;
+}
+
+#topbar-title {
+  font-size: 16px;
+  font-weight: 600;
+  letter-spacing: 0.3px;
+}
+
+#topbar-user {
+  font-size: 13px;
+  color: rgba(255, 255, 255, 0.75);
+  margin-right: 4px;
+}
+
+/* ===== Icon & Topbar Buttons ===== */
+.icon-btn,
+.topbar-btn {
+  background: transparent;
+  border: 1px solid rgba(255, 255, 255, 0.3);
+  color: var(--color-white);
+  padding: 6px 12px;
+  border-radius: var(--radius-sm);
+  cursor: pointer;
+  font-size: 14px;
+  transition: background 0.2s, border-color 0.2s;
+  line-height: 1;
+}
+
+.icon-btn:hover,
+.topbar-btn:hover {
+  background: rgba(255, 255, 255, 0.1);
+  border-color: rgba(255, 255, 255, 0.5);
+}
+
+.icon-btn {
+  font-size: 18px;
+  padding: 4px 10px;
+}
+
+/* ===== Main Content ===== */
+#main-content {
+  display: flex;
+  flex: 1;
+  overflow: hidden;
+}
+
+/* ===== Sidebar ===== */
+#sidebar {
+  width: var(--sidebar-width);
+  background: var(--color-white);
+  border-right: 1px solid var(--color-border);
+  display: flex;
+  flex-direction: column;
+  flex-shrink: 0;
+  transition: width 0.2s ease;
+  overflow: hidden;
+}
+
+#sidebar.collapsed {
+  width: 0;
+  border-right: none;
+}
+
+/* ===== Sidebar Tabs ===== */
+#sidebar-tabs {
+  display: flex;
+  border-bottom: 1px solid var(--color-border);
+  flex-shrink: 0;
+}
+
+.sidebar-tab {
+  flex: 1;
+  padding: 12px;
+  border: none;
+  background: none;
+  cursor: pointer;
+  font-size: 13px;
+  font-weight: 500;
+  color: var(--color-text-light);
+  transition: color 0.2s;
+  border-bottom: 2px solid transparent;
+  margin-bottom: -1px;
+}
+
+.sidebar-tab:hover:not(.active) {
+  color: var(--color-text);
+  background: var(--color-bg);
+}
+
+.sidebar-tab.active {
+  color: var(--color-blue);
+  border-bottom-color: var(--color-blue);
+}
+
+/* ===== Sidebar Tab Content ===== */
+.sidebar-tab-content {
+  display: flex;
+  flex-direction: column;
+  flex: 1;
+  overflow: hidden;
+}
+
+#browser-tab {
+  display: flex;
+  flex-direction: column;
+  flex: 1;
+  overflow: hidden;
+}
+
+#stats-tab {
+  flex: 1;
+  overflow-y: auto;
+  padding: 12px;
+}
+
+/* ===== Breadcrumb ===== */
+#breadcrumb {
+  padding: 8px 12px;
+  font-size: 13px;
+  background: var(--color-bg);
+  border-bottom: 1px solid var(--color-border);
+  flex-shrink: 0;
+  white-space: nowrap;
+  overflow: hidden;
+  text-overflow: ellipsis;
+}
+
+.bc-item {
+  cursor: pointer;
+  color: var(--color-blue);
+  transition: text-decoration 0.1s;
+}
+
+.bc-item:hover {
+  text-decoration: underline;
+}
+
+.bc-item:last-child {
+  color: var(--color-text);
+  cursor: default;
+  font-weight: 500;
+}
+
+.bc-item:last-child:hover {
+  text-decoration: none;
+}
+
+.bc-sep {
+  color: var(--color-text-lighter);
+  margin: 0 4px;
+}
+
+/* ===== Browser Actions ===== */
+#browser-actions {
+  display: flex;
+  gap: 8px;
+  padding: 8px;
+  border-bottom: 1px solid var(--color-border);
+  flex-shrink: 0;
+}
+
+.action-btn {
+  padding: 6px 12px;
+  border: 1px solid var(--color-blue);
+  color: var(--color-blue);
+  background: var(--color-white);
+  border-radius: var(--radius-sm);
+  cursor: pointer;
+  font-size: 13px;
+  transition: background 0.2s, color 0.2s;
+  font-weight: 500;
+}
+
+.action-btn:hover {
+  background: var(--color-blue);
+  color: var(--color-white);
+}
+
+/* ===== Browser List ===== */
+#browser-list {
+  flex: 1;
+  overflow-y: auto;
+}
+
+.dir-item,
+.track-item {
+  display: flex;
+  align-items: center;
+  padding: 8px 12px;
+  border-bottom: 1px solid var(--color-border-light);
+  cursor: pointer;
+  position: relative;
+  gap: 8px;
+  transition: background 0.15s;
+  min-height: 40px;
+}
+
+.dir-item:hover,
+.track-item:hover {
+  background: var(--color-bg);
+}
+
+.item-icon {
+  flex-shrink: 0;
+  width: 20px;
+  text-align: center;
+  font-size: 15px;
+}
+
+.item-name {
+  flex: 1;
+  font-size: 13px;
+  overflow: hidden;
+  text-overflow: ellipsis;
+  white-space: nowrap;
+  color: var(--color-text);
+}
+
+.item-meta {
+  font-size: 12px;
+  color: var(--color-text-light);
+  flex-shrink: 0;
+}
+
+.item-date {
+  font-size: 11px;
+  color: var(--color-text-lighter);
+  flex-shrink: 0;
+}
+
+.item-actions {
+  display: none;
+  gap: 4px;
+  flex-shrink: 0;
+}
+
+.dir-item:hover .item-actions,
+.track-item:hover .item-actions {
+  display: flex;
+}
+
+.item-btn {
+  background: none;
+  border: 1px solid #ddd;
+  border-radius: var(--radius-sm);
+  cursor: pointer;
+  padding: 2px 6px;
+  font-size: 13px;
+  line-height: 1.4;
+  transition: background 0.15s;
+  color: var(--color-text-light);
+}
+
+.item-btn:hover {
+  background: var(--color-border-light);
+  border-color: #bbb;
+}
+
+.empty-list {
+  color: var(--color-text-lighter);
+  font-size: 13px;
+  text-align: center;
+  padding: 32px 16px;
+}
+
+.loading {
+  color: var(--color-text-light);
+  text-align: center;
+  padding: 24px 16px;
+  font-size: 13px;
+}
+
+/* ===== Map Container ===== */
+#map-container {
+  flex: 1;
+  position: relative;
+  overflow: hidden;
+}
+
+#map {
+  width: 100%;
+  height: 100%;
+}
+
+.drag-over {
+  outline: 4px dashed var(--color-blue);
+  outline-offset: -4px;
+}
+
+/* ===== Track Info Panel ===== */
+#track-info-panel {
+  position: absolute;
+  bottom: 20px;
+  right: 20px;
+  background: var(--color-white);
+  border-radius: var(--radius-lg);
+  box-shadow: var(--shadow-md);
+  padding: 16px;
+  min-width: 220px;
+  max-width: 300px;
+  z-index: 1000;
+}
+
+#track-info-panel h3 {
+  margin-bottom: 8px;
+  font-size: 14px;
+  font-weight: 600;
+  color: var(--color-text);
+  padding-right: 24px;
+}
+
+.info-row {
+  display: flex;
+  justify-content: space-between;
+  font-size: 13px;
+  padding: 4px 0;
+  border-bottom: 1px solid var(--color-border-light);
+}
+
+.info-row:last-child {
+  border-bottom: none;
+}
+
+.info-row label {
+  color: var(--color-text-light);
+}
+
+.info-row span {
+  font-weight: 500;
+  color: var(--color-text);
+}
+
+#track-info-close {
+  position: absolute;
+  top: 8px;
+  right: 8px;
+  background: none;
+  border: none;
+  cursor: pointer;
+  font-size: 20px;
+  color: var(--color-text-lighter);
+  line-height: 1;
+  padding: 2px 4px;
+  transition: color 0.15s;
+}
+
+#track-info-close:hover {
+  color: var(--color-text);
+}
+
+/* ===== Modals ===== */
+.modal {
+  position: fixed;
+  inset: 0;
+  background: rgba(0, 0, 0, 0.5);
+  display: flex;
+  align-items: center;
+  justify-content: center;
+  z-index: 9999;
+}
+
+.modal-content {
+  background: var(--color-white);
+  border-radius: var(--radius-lg);
+  padding: 24px;
+  min-width: 300px;
+  max-width: 90vw;
+  max-height: 90vh;
+  overflow-y: auto;
+  position: relative;
+  box-shadow: var(--shadow-lg);
+}
+
+.modal-large {
+  min-width: min(700px, 95vw);
+}
+
+.modal-header {
+  display: flex;
+  justify-content: space-between;
+  align-items: center;
+  margin-bottom: 16px;
+}
+
+.modal-header h2 {
+  font-size: 18px;
+  font-weight: 600;
+  color: var(--color-text);
+}
+
+.modal-close {
+  background: none;
+  border: none;
+  font-size: 24px;
+  cursor: pointer;
+  color: var(--color-text-lighter);
+  line-height: 1;
+  padding: 2px 6px;
+  transition: color 0.15s;
+}
+
+.modal-close:hover {
+  color: var(--color-text);
+}
+
+/* ===== Buttons ===== */
+.btn-primary {
+  padding: 8px 16px;
+  background: var(--color-blue);
+  color: var(--color-white);
+  border: none;
+  border-radius: var(--radius-sm);
+  cursor: pointer;
+  font-size: 14px;
+  font-weight: 500;
+  transition: background 0.2s;
+}
+
+.btn-primary:hover {
+  background: var(--color-blue-hover);
+}
+
+.btn-secondary {
+  padding: 8px 16px;
+  background: var(--color-gray);
+  color: var(--color-white);
+  border: none;
+  border-radius: var(--radius-sm);
+  cursor: pointer;
+  font-size: 14px;
+  font-weight: 500;
+  transition: background 0.2s;
+}
+
+.btn-secondary:hover {
+  background: var(--color-gray-hover);
+}
+
+.btn-danger {
+  padding: 8px 16px;
+  background: var(--color-red);
+  color: var(--color-white);
+  border: none;
+  border-radius: var(--radius-sm);
+  cursor: pointer;
+  font-size: 14px;
+  font-weight: 500;
+  transition: background 0.2s;
+}
+
+.btn-danger:hover {
+  background: var(--color-red-hover);
+}
+
+.btn-small {
+  padding: 4px 10px;
+  font-size: 12px;
+  border-radius: var(--radius-sm);
+  cursor: pointer;
+  border: none;
+  font-weight: 500;
+  transition: background 0.2s;
+}
+
+.btn-small.btn-primary {
+  background: var(--color-blue);
+  color: var(--color-white);
+}
+
+.btn-small.btn-primary:hover {
+  background: var(--color-blue-hover);
+}
+
+.btn-small.btn-secondary {
+  background: var(--color-gray);
+  color: var(--color-white);
+}
+
+.btn-small.btn-secondary:hover {
+  background: var(--color-gray-hover);
+}
+
+.btn-small.btn-danger {
+  background: var(--color-red);
+  color: var(--color-white);
+}
+
+.btn-small.btn-danger:hover {
+  background: var(--color-red-hover);
+}
+
+/* ===== Upload Toast ===== */
+#upload-toast {
+  position: fixed;
+  top: 16px;
+  right: 16px;
+  background: var(--color-dark);
+  color: var(--color-white);
+  padding: 12px 20px;
+  border-radius: var(--radius-md);
+  z-index: 99999;
+  font-size: 14px;
+  box-shadow: var(--shadow-md);
+  max-width: 300px;
+  word-break: break-word;
+}
+
+#upload-toast.success {
+  background: var(--color-green);
+}
+
+#upload-toast.error {
+  background: var(--color-red);
+}
+
+/* ===== Stats ===== */
+.stats-section {
+  margin-bottom: 24px;
+}
+
+.stats-section h3 {
+  font-size: 11px;
+  text-transform: uppercase;
+  color: var(--color-text-light);
+  margin-bottom: 12px;
+  letter-spacing: 0.5px;
+  font-weight: 600;
+}
+
+.stat-row {
+  display: flex;
+  align-items: center;
+  margin-bottom: 6px;
+  gap: 8px;
+}
+
+.stat-row .stat-label {
+  width: 80px;
+  font-size: 12px;
+  color: var(--color-text-light);
+  flex-shrink: 0;
+}
+
+.stat-bar-wrap {
+  flex: 1;
+  height: 16px;
+  background: var(--color-border-light);
+  border-radius: 8px;
+  overflow: hidden;
+}
+
+.stat-bar {
+  height: 100%;
+  background: var(--color-blue);
+  border-radius: 8px;
+  transition: width 0.3s ease;
+  min-width: 2px;
+}
+
+.stat-row .stat-value {
+  width: 80px;
+  text-align: right;
+  font-size: 12px;
+  font-weight: 600;
+  flex-shrink: 0;
+  color: var(--color-text);
+}
+
+/* ===== Admin Table ===== */
+.admin-table {
+  width: 100%;
+  border-collapse: collapse;
+  font-size: 13px;
+}
+
+.admin-table th {
+  background: var(--color-bg);
+  padding: 10px 12px;
+  text-align: left;
+  border-bottom: 2px solid #dee2e6;
+  font-weight: 600;
+  color: var(--color-text);
+  white-space: nowrap;
+}
+
+.admin-table td {
+  padding: 8px 12px;
+  border-bottom: 1px solid var(--color-border-light);
+  color: var(--color-text);
+  vertical-align: middle;
+}
+
+.admin-table tr:hover td {
+  background: var(--color-bg);
+}
+
+.admin-table td:last-child {
+  white-space: nowrap;
+  display: flex;
+  gap: 4px;
+  flex-wrap: wrap;
+}
+
+/* ===== Move Dialog ===== */
+#move-dir-list {
+  max-height: 300px;
+  overflow-y: auto;
+  border: 1px solid var(--color-border);
+  border-radius: var(--radius-md);
+  padding: 4px;
+}
+
+.move-dir-item {
+  padding: 8px 12px;
+  cursor: pointer;
+  border-radius: var(--radius-sm);
+  margin-bottom: 2px;
+  font-size: 13px;
+  transition: background 0.15s;
+  color: var(--color-text);
+}
+
+.move-dir-item:hover {
+  background: var(--color-border-light);
+}
+
+.move-dir-item.selected {
+  background: #e8f4fd;
+  border: 1px solid var(--color-blue);
+  color: var(--color-blue);
+  font-weight: 500;
+}
+
+/* ===== Share URL Box ===== */
+.share-url-box {
+  display: flex;
+  gap: 8px;
+  margin-top: 8px;
+}
+
+.share-url-box input {
+  flex: 1;
+  padding: 8px;
+  border: 1px solid #ddd;
+  border-radius: var(--radius-sm);
+  font-size: 13px;
+  margin-bottom: 0;
+  color: var(--color-text-light);
+  background: var(--color-bg);
+}
+
+.share-url-box button {
+  flex-shrink: 0;
+  padding: 8px 14px;
+  background: var(--color-blue);
+  color: var(--color-white);
+  border: none;
+  border-radius: var(--radius-sm);
+  cursor: pointer;
+  font-size: 13px;
+  transition: background 0.2s;
+}
+
+.share-url-box button:hover {
+  background: var(--color-blue-hover);
+}
+
+/* ===== Responsive ===== */
+@media (max-width: 768px) {
+  #sidebar {
+    position: absolute;
+    left: 0;
+    top: var(--topbar-height);
+    bottom: 0;
+    z-index: 500;
+    box-shadow: var(--shadow-md);
+  }
+
+  #sidebar.collapsed {
+    width: 0;
+  }
+
+  .modal-large {
+    min-width: 95vw;
+  }
+
+  #track-info-panel {
+    bottom: 10px;
+    right: 10px;
+    max-width: calc(100vw - 20px);
+  }
+}
+
+@media (max-width: 480px) {
+  .auth-container {
+    min-width: unset;
+    margin: 16px;
+    padding: 28px 20px;
+  }
+
+  #topbar {
+    padding: 0 10px;
+  }
+
+  #topbar-title {
+    font-size: 14px;
+  }
+
+  .admin-table {
+    font-size: 11px;
+  }
+
+  .admin-table th,
+  .admin-table td {
+    padding: 6px 8px;
+  }
+}