/* -------------------------------------------------
   Global Reset / Base
------------------------------------------------- */

* {
  box-sizing: border-box;
}

html, body {
  height: 100%;
}

body {
  margin: 0;
  background: #ffffff;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #111;

  overflow: hidden; /* 🔥 lock page scrolling */
}

/* -------------------------------------------------
   Page Skeleton (Header / Main / Footer)
------------------------------------------------- */

.page {
  height: 100vh;   /* 🔥 lock to viewport */
  display: flex;
  flex-direction: column;
}

.header {
  height: 64px;
  border-bottom: 1px solid #eee;
  background: #ffffff;

  position: sticky;
  top: 0;
  z-index: 1000;
}

/* -------------------------------------------------
   Unified Site Footer
------------------------------------------------- */

.site-footer {
  border-top: 1px solid #eee;
  background: #ffffff;
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 16px 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.footer-left {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 13px;
  color: #555;
}

.footer-left img {
  height: 22px;
  width: auto;
  display: block;
}

.footer-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.footer-right a {
  font-size: 13px;
  color: #555;
  text-decoration: none;
}

.footer-right a:hover {
  text-decoration: underline;
}

/* Ensure footer always sits at bottom */
.page > .site-footer {
  margin-top: auto;
}

/* -------------------------------------------------
   Main Split Layout
------------------------------------------------- */

.main {
  flex: 1;
  display: flex;
  gap: 32px;

  padding: 40px;
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;

  overflow: hidden; /* 🔥 prevent main from scrolling */
  min-height: 0;
}

.left-panel {
  flex: 0 0 40%;
}

.right-panel {
  flex: 1;

  border-left: 1px solid #eee;

  display: flex;
  flex-direction: column;

  overflow-y: auto;
  overflow-x: hidden;

  padding: 0 24px 0 32px;   /* 🔥 right padding added */

  min-height: 0;
}

/* -------------------------------------------------
   Existing Generator Styles (UNCHANGED)
------------------------------------------------- */

.container {
  max-width: 760px;
  margin: 0;
  padding: 0;
}

h1 {
  font-size: 26px;
  margin-bottom: 30px;
}

.label {
  display: block;
  font-size: 13px;
  margin: 20px 0 6px;
  color: #555;
}

.input {
  width: 100%;
  padding: 10px 12px;
  font-size: 15px;
  border: 1px solid #ddd;
  border-radius: 6px;
}

.editor {
  min-height: 180px;
  padding: 14px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 15px;
}

.signature {
  margin-top: 10px;
  padding: 12px;
  border-left: 3px solid #eee;
  font-size: 14px;
  color: #333;
}

.primary-btn {
  margin-top: 30px;
  padding: 12px 18px;
  font-size: 15px;
  background: #111;
  color: #fff;
  border: none;
  border-radius: 6px;
  cursor: pointer;
}

.primary-btn:hover {
  opacity: 0.9;
}

.feedback {
  margin-top: 18px;
  font-size: 14px;
  color: #2a7a2a;
}

/* -------------------------------------------------
   Tracking List (Right Panel)
------------------------------------------------- */

.tracking-list {
  margin-bottom: 24px;
}

.tracking-item:hover {
  background: #f9f9f9;
  border-color: #ddd;
}

/* Active must dominate hover */
.tracking-item.active,
.tracking-item.active:hover {
  background: #f5f8ff;
  border-color: #1976d2;
}

.tracking-title {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 6px;
}

.tracking-meta {
  font-size: 13px;
  color: #555;
}

/* -------------------------------------------------
   Tracking List – Single-Line Master Rows (NEW)
------------------------------------------------- */

.tracking-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border: 1px solid #e5e5e5;
  border-radius: 8px;
  margin-bottom: 8px;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}

/* Status dot */
.tracking-status {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #bbb;
  flex-shrink: 0;
}

.tracking-status.checking {
  background: #1976d2; /* blue */
}

.tracking-status.opened {
  background: #22c55e; /* green */
}

/* Label */
.tracking-label {
  flex: 1;
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Counters */
.tracking-created {
  font-size: 12px;
  color: #777;
  white-space: nowrap;
}

/* Chevron */
.tracking-chevron {
  color: #aaa;
  font-size: 16px;
  margin-left: 6px;

  transition: transform 0.2s ease, color 0.2s ease;
}

.tracking-item.active .tracking-chevron {
  color: #1976d2;
  transform: rotate(90deg);
}

/* Active row – visual anchor */
.tracking-item.active {
  background: #f5f8ff;
  border-color: #1976d2;
}

/* -------------------------------------------------
   Empty States
------------------------------------------------- */

.empty-state {
  font-size: 13px;
  color: #777;
  padding: 24px 0;
  text-align: left;
}

/* -------------------------------------------------
   Header Content
------------------------------------------------- */

.header-inner {
  height: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 40px;

  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: flex;
  align-items: center;
}

.brand-logo {
  height: 38px;
  width: auto;
  display: block;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

/* -------------------------------------------------
   Inline Dropdown (NEW)
------------------------------------------------- */

.tracking-dropdown {
  margin: 8px 0 20px 14px;
  padding: 18px 20px 14px 20px;

  background: #ffffff;
  border: 1px solid #e6e6e6;
  border-radius: 12px;

  animation: fadeDown 0.15s ease;
}

.dropdown-inner {
  padding: 16px 0 8px 0;
}

@keyframes fadeDown {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* -------------------------------------------------
   Restored Detail Styling (Inline Version)
------------------------------------------------- */

/* Summary card (blue block at top) */
.summary-block {
  background: #1976d2;
  color: #ffffff;
  padding: 16px 18px;
  border-radius: 10px;
  margin-bottom: 18px;
  font-size: 14px;
}

.summary-block strong {
  display: block;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 8px;
  color: #ffffff;
}

/* Section headers (Timeline / System Status) */
.delivery-row strong {
  display: block;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #555;
  margin-bottom: 6px;
}

/* Event rows */
.delivery-row {
  padding: 10px 0;
  border-bottom: 1px solid #eee;
  font-size: 13px;
  color: #333;
}

.delivery-row:last-child {
  border-bottom: none;
}

