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

* {
  box-sizing: border-box;
}

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

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

.page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

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

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

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

/* -------------------------------------------------
   Footer Content (NEW – NON-DESTRUCTIVE)
------------------------------------------------- */

.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;
}

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

.main {
  flex: 1;
  display: flex;
  gap: 32px;
  padding: 40px;
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
}

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

.right-panel {
  flex: 1;
  border-left: 1px solid #eee;
  padding-left: 32px;
  display: flex;
  flex-direction: column;
}

/* -------------------------------------------------
   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 {
  flex: 1;
  overflow-y: auto;
  margin-bottom: 24px;
}

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

/* Active must dominate hover */
.tracking-item.active,
.tracking-item.active:hover {
  background: #eef2ff;
  border-color: #6366f1;
}

.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.delivered {
  background: #3b82f6; /* 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;
}

.tracking-item.active .tracking-chevron {
  color: #4f46e5;
}

/* Active row – visual anchor */
.tracking-item.active {
  box-shadow: inset 3px 0 0 #6366f1;
}


/* -------------------------------------------------
   Tracking Details Panel
------------------------------------------------- */

/* Inspector structure */

.tracking-details h2 {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 18px;
}

/* Summary block */
.tracking-details .delivery-row:first-of-type {
  background: #f8fafc;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 14px 16px;
  margin-bottom: 18px;
  font-size: 14px;
}

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

.tracking-details {
  border-top: 1px solid #eee;
  padding-top: 20px;
}

.tracking-details h2 {
  font-size: 18px;
  margin-bottom: 16px;
}

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

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

.delivery-label {
  font-weight: 600;
  margin-bottom: 4px;
}

.delivery-times {
  color: #444;
}

/* -------------------------------------------------
   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;
}
