/* ══════════════════════════════════════════════════════
   Trang Lưu Trữ Lá Số
══════════════════════════════════════════════════════ */
.lt-page {
  min-height: 80vh;
  padding-bottom: 80px;
}

/* ── Header ── */
.lt-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  padding-top: 40px;
  padding-bottom: 24px;
  border-bottom: .5px solid rgba(196,168,255,.15);
  margin-bottom: 28px;
}
.lt-title {
  font-family: 'Playfair Display', serif;
  font-size: 28px;
  font-weight: 400;
  color: #e8e0d0;
  margin: 0 0 6px;
}
.lt-desc {
  font-size: 14px;
  color: rgba(200,190,175,.5);
  margin: 0;
  font-weight: 300;
}
.lt-new-btn { white-space: nowrap; align-self: center; }

/* ── Empty / Loading ── */
.lt-empty {
  text-align: center;
  padding: 80px 20px;
}
.lt-empty-icon { font-size: 48px; margin-bottom: 16px; }
.lt-empty h2 {
  font-family: 'Playfair Display', serif;
  font-size: 22px;
  font-weight: 400;
  color: #e8e0d0;
  margin-bottom: 10px;
}
.lt-empty p { font-size: 14px; color: rgba(200,190,175,.55); margin-bottom: 24px; font-weight: 300; }
.lt-spinner {
  width: 40px; height: 40px;
  border: 3px solid rgba(201,168,76,.2);
  border-top-color: #c9a84c;
  border-radius: 50%;
  animation: ltSpin .8s linear infinite;
  margin: 0 auto 16px;
}
@keyframes ltSpin { to { transform: rotate(360deg); } }
.lt-login-btn {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 15px; margin-top: 8px;
}

/* ── Toolbar ── */
.lt-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}
.lt-toolbar-left, .lt-toolbar-right { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

.lt-search-input {
  padding: 8px 14px;
  background: rgba(255,255,255,.06);
  border: .5px solid rgba(196,168,255,.2);
  border-radius: 8px;
  color: #e8e0d0;
  font-size: 13px;
  width: 220px;
  outline: none;
  transition: border-color .2s;
}
.lt-search-input::placeholder { color: rgba(200,190,175,.35); }
.lt-search-input:focus { border-color: rgba(196,168,255,.5); }

.lt-sort-select {
  padding: 8px 12px;
  background: rgba(255,255,255,.06);
  border: .5px solid rgba(196,168,255,.2);
  border-radius: 8px;
  color: #e8e0d0;
  font-size: 13px;
  cursor: pointer;
  outline: none;
}
.lt-sort-select option { background: #0f0620; }

.lt-count { font-size: 13px; color: rgba(200,190,175,.45); }

.lt-mode-btn {
  padding: 7px 14px;
  background: rgba(201,168,76,.1);
  border: .5px solid rgba(201,168,76,.35);
  border-radius: 7px;
  color: #c9a84c;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: background .2s;
}
.lt-mode-btn:hover { background: rgba(201,168,76,.2); }

.lt-compare-btn {
  padding: 7px 16px !important;
  font-size: 13px !important;
}
.lt-cancel-btn {
  padding: 7px 12px;
  background: transparent;
  border: .5px solid rgba(252,165,165,.3);
  border-radius: 7px;
  color: #fca5a5;
  font-size: 13px;
  cursor: pointer;
}
.lt-cancel-btn:hover { background: rgba(252,165,165,.08); }

/* ── Cards grid ── */
.lt-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

.lt-card {
  background: rgba(20,10,42,.6);
  border: .5px solid rgba(196,168,255,.12);
  border-radius: 14px;
  overflow: hidden;
  transition: border-color .2s, transform .15s, box-shadow .2s;
  position: relative;
  cursor: default;
}
.lt-card:hover { border-color: rgba(196,168,255,.3); box-shadow: 0 6px 24px rgba(0,0,0,.35); }
.lt-card.selectable { cursor: pointer; }
.lt-card.selectable:hover { transform: translateY(-2px); }
.lt-card.selected {
  border: 1.5px solid #c9a84c;
  box-shadow: 0 0 0 3px rgba(201,168,76,.15);
}

.lt-card-check {
  position: absolute;
  top: 10px; right: 10px;
  width: 24px; height: 24px;
  background: #c9a84c;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: #0f0620;
  font-weight: 700;
  font-size: 13px;
  z-index: 2;
}

.lt-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 14px 16px 10px;
  background: rgba(45,17,87,.3);
  border-bottom: .5px solid rgba(196,168,255,.08);
}
.lt-card-name {
  font-family: 'Playfair Display', serif;
  font-size: 15px;
  font-weight: 500;
  color: #e8e0d0;
  line-height: 1.3;
}
.lt-card-date { font-size: 11px; color: rgba(200,190,175,.4); flex-shrink: 0; margin-left: 8px; }

.lt-card-body { padding: 12px 16px; }
.lt-info-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 4px 0;
  border-bottom: .5px solid rgba(196,168,255,.05);
  font-size: 12px;
}
.lt-info-row:last-child { border-bottom: none; }
.lt-info-l {
  color: rgba(200,190,175,.4);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .05em;
  flex-shrink: 0;
  margin-right: 8px;
}
.lt-info-v { color: #e8e0d0; text-align: right; word-break: break-word; }
.lt-info-v.hl { color: #c9a84c; font-weight: 500; }
.lt-sao-menh .lt-info-v { font-style: italic; font-size: 11px; }

.lt-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px 14px;
  border-top: .5px solid rgba(196,168,255,.07);
  gap: 8px;
}
.lt-btn {
  padding: 6px 14px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  border: none;
  transition: background .15s, opacity .15s;
}
.lt-btn-view {
  background: rgba(201,168,76,.12);
  color: #c9a84c;
  border: .5px solid rgba(201,168,76,.3) !important;
  flex: 1;
}
.lt-btn-view:hover { background: rgba(201,168,76,.22); }
.lt-btn-delete {
  background: rgba(252,165,165,.06);
  color: #fca5a5;
  border: .5px solid rgba(252,165,165,.2) !important;
  padding: 6px 10px !important;
}
.lt-btn-delete:hover { background: rgba(252,165,165,.15); }
.lt-no-link { font-size: 11px; color: rgba(200,190,175,.3); font-style: italic; }

/* ── Compare overlay ── */
.lt-compare-overlay {
  position: fixed;
  inset: 0;
  background: rgba(4,2,14,.88);
  backdrop-filter: blur(8px);
  z-index: 9999;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 40px 16px;
  overflow-y: auto;
}
.lt-compare-panel {
  background: #0e0a1f;
  border: .5px solid rgba(196,168,255,.2);
  border-radius: 18px;
  width: 100%;
  max-width: 960px;
  box-shadow: 0 24px 60px rgba(0,0,0,.6);
  animation: ltPanelIn .3s cubic-bezier(.22,1,.36,1);
}
@keyframes ltPanelIn {
  from { opacity:0; transform: translateY(20px); }
  to   { opacity:1; transform: translateY(0); }
}
.lt-compare-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 28px 16px;
  border-bottom: .5px solid rgba(196,168,255,.12);
  background: rgba(45,17,87,.3);
  border-radius: 18px 18px 0 0;
}
.lt-compare-header h2 {
  font-family: 'Playfair Display', serif;
  font-size: 20px;
  font-weight: 400;
  color: #c9a84c;
  margin: 0;
}
.lt-close-compare {
  background: none; border: none;
  color: rgba(200,190,175,.5);
  font-size: 20px; cursor: pointer; padding: 4px 8px;
  transition: color .2s;
}
.lt-close-compare:hover { color: #e8e0d0; }

.lt-compare-content { padding: 24px 28px 28px; overflow-x: auto; }
.lt-cmp-wrap { min-width: 400px; }

/* Compare table */
.lt-cmp-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  margin-bottom: 16px;
}
.lt-cmp-field-th {
  text-align: left;
  padding: 8px 14px;
  background: rgba(45,17,87,.4);
  color: rgba(200,190,175,.5);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .08em;
  border-radius: 6px 0 0 6px;
  white-space: nowrap;
  width: 130px;
}
.lt-cmp-col {
  text-align: center;
  padding: 8px 14px;
  background: rgba(45,17,87,.4);
  color: #c9a84c;
  font-family: 'Playfair Display', serif;
  font-size: 14px;
  font-weight: 500;
  border-left: .5px solid rgba(196,168,255,.1);
}
.lt-cmp-row td { padding: 8px 14px; border-bottom: .5px solid rgba(196,168,255,.06); }
.lt-cmp-label {
  color: rgba(200,190,175,.45);
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
}
.lt-cmp-val {
  text-align: center;
  color: #e8e0d0;
  border-left: .5px solid rgba(196,168,255,.06);
}
/* Highlight rows with differences */
.lt-cmp-row.diff td { background: rgba(201,168,76,.06); }
.lt-cmp-row.diff .lt-cmp-label { color: #c9a84c; }
.lt-cmp-row.diff .lt-cmp-val { color: #e0c070; font-weight: 500; }

.lt-cmp-diff-note {
  font-size: 12px;
  color: rgba(200,190,175,.45);
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.lt-diff-badge {
  background: rgba(201,168,76,.15);
  color: #c9a84c;
  border: .5px solid rgba(201,168,76,.3);
  padding: 1px 8px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .06em;
}
.lt-cmp-links { display: flex; gap: 12px; flex-wrap: wrap; }
.lt-cmp-view-btn { font-size: 13px !important; padding: 8px 16px !important; }

/* ── Toast ── */
.lt-toast {
  position: fixed;
  bottom: 28px; left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: rgba(20,10,42,.95);
  border: .5px solid rgba(196,168,255,.25);
  border-radius: 8px;
  padding: 10px 20px;
  font-size: 13px;
  color: #e8e0d0;
  z-index: 10000;
  opacity: 0;
  transition: opacity .25s, transform .25s;
  pointer-events: none;
  white-space: nowrap;
}
.lt-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
