/* Trang sửa thiệp cưới + trang /thiep-cuoi/ */
.te { padding: 24px 0 64px; background: var(--bg-alt); min-height: 70vh; }
.te-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.te-head h1 { margin: 0; font-size: clamp(1.4rem, 4vw, 2rem); }
.te-eyebrow { margin: 0; color: #a3192b; font-weight: 600; font-size: .85rem; text-transform: uppercase; letter-spacing: .08em; }
.te-head-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.te-status { color: var(--muted); font-size: .9rem; }
.te-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .4em; background: #a3192b; color: #fff; border: 1px solid #a3192b;
  border-radius: 999px; padding: .55em 1.2em; font: inherit; font-weight: 600; font-size: .92rem; cursor: pointer; text-decoration: none;
}
.te-btn:hover { text-decoration: none; filter: brightness(1.08); }
.te-btn-ghost { background: #fff; color: #a3192b; }
.te-btn-lg { padding: .8em 2em; font-size: 1.05rem; }
.te-link { background: none; border: 0; color: var(--brand); cursor: pointer; font: inherit; font-size: .88rem; padding: 2px 6px; }
.te-danger { color: #b42318 !important; }
.te-alert { background: #fff6e5; border: 1px solid #f3d9a4; color: #6b4b00; border-radius: 12px; padding: 12px 16px; margin-bottom: 12px; }
.te-alert-ok { background: #eef7ee; border-color: #cfe6cf; color: #2f5d34; }
.te-error { color: #b42318; font-weight: 600; }

.te-tabs { display: flex; gap: 4px; overflow-x: auto; margin: 8px 0 16px; border-bottom: 1px solid var(--line); }
.te-tabs button { background: none; border: 0; border-bottom: 3px solid transparent; padding: 10px 14px; font: inherit; font-weight: 600; color: var(--muted); cursor: pointer; white-space: nowrap; }
.te-tabs button[aria-selected="true"] { color: #a3192b; border-bottom-color: #a3192b; }

.te-panel { display: grid; gap: 16px; }
.te-panel[hidden] { display: none; }
.te-box { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 18px; margin: 0; min-width: 0; }
.te-box legend { font-weight: 700; padding: 0 6px; }
.te-box h2 { font-size: 1.1rem; margin: 0 0 10px; }
.te-box h2:not(:first-child) { margin-top: 18px; }
.te-boxhead { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 8px; }
.te-boxhead h2 { margin: 0; }
.te-help { color: var(--muted); font-size: .88rem; margin: 0 0 12px; }
.te-f { display: grid; gap: 4px; font-size: .88rem; color: var(--muted); margin-bottom: 10px; min-width: 0; }
.te-f input, .te-f select, .te-f textarea, .te-copyrow input {
  font: inherit; color: var(--ink); border: 1px solid var(--line); border-radius: 10px; padding: 9px 11px; width: 100%; background: #fff; min-width: 0;
}
.te-f input:focus, .te-f select:focus, .te-f textarea:focus { outline: 2px solid #e8b4bb; border-color: #a3192b; }
.te-check { display: flex; gap: 8px; align-items: center; margin: 6px 0; }
.te-check input { width: 18px; height: 18px; accent-color: #a3192b; }
.te-grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
.te-grid3 { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 0 12px; }
#tab-noi-dung > .te-grid2 { gap: 16px; }
.te-item { border: 1px dashed var(--line); border-radius: 12px; padding: 12px 12px 4px; margin-bottom: 12px; background: #fcfcfd; }
.te-item-actions { display: flex; justify-content: flex-end; gap: 4px; margin-bottom: 6px; }

.te-themes { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.te-theme { display: flex; align-items: center; gap: 8px; border: 1px solid var(--line); border-radius: 999px; padding: 6px 14px 6px 8px; cursor: pointer; }
.te-theme span::before { content: ""; display: inline-block; width: 18px; height: 18px; border-radius: 50%; vertical-align: -4px; margin-right: 6px; background: var(--sw); }
.te-theme input { accent-color: #a3192b; }
.te-theme-son { --sw: #a3192b; } .te-theme-kem { --sw: #c39a45; } .te-theme-la { --sw: #46634e; } .te-theme-hong { --sw: #b14d65; }

.te-upload { cursor: pointer; }
.te-photos { list-style: none; padding: 0; margin: 16px 0 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.te-photos li { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: #fafafa; }
.te-photos img { width: 100%; aspect-ratio: 1; object-fit: cover; display: block; }
.te-photo-actions { display: flex; flex-wrap: wrap; gap: 4px; padding: 6px; align-items: center; }
.te-photo-actions button { background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 2px 8px; cursor: pointer; font: inherit; font-size: .8rem; }
.te-cover-tag { font-size: .78rem; font-weight: 700; color: #a3192b; padding: 0 4px; }

.te-copyrow { display: flex; gap: 8px; margin-bottom: 8px; }
.te-invites { list-style: none; padding: 0; margin: 12px 0; display: grid; gap: 8px; }
.te-invites li { display: grid; grid-template-columns: minmax(100px, 180px) 1fr auto auto; gap: 8px; align-items: center; }
.te-invites input { font: inherit; font-size: .85rem; border: 1px solid var(--line); border-radius: 8px; padding: 6px 8px; min-width: 0; color: var(--muted); }

.te-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 12px; }
.te-stats div { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 14px; }
.te-stats b { display: block; font-size: 1.5rem; color: #a3192b; }
.te-stats span { color: var(--muted); font-size: .85rem; }
.te-tablewrap { overflow-x: auto; }
.te-table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.te-table th, .te-table td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.te-table th { color: var(--muted); font-weight: 600; font-size: .82rem; }
.te-msg { max-width: 320px; white-space: pre-line; }

/* trang giới thiệu /thiep-cuoi/ */
.tl-hero { background: linear-gradient(160deg, #fbf5ec, #fff 60%); }
.tl-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 40px; align-items: start; }
.tl-eyebrow { color: #a3192b; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; font-size: .85rem; margin: 0 0 6px; }
.tl-points { padding-left: 1.2em; }
.tl-points li { margin-bottom: .5em; }
.tl-create { background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 24px; box-shadow: var(--shadow); }
.tl-create h2 { margin-top: 0; }
.tl-create .te-btn { width: 100%; padding: .8em; font-size: 1.02rem; margin-top: 6px; }
.tl-mine { list-style: none; padding: 0; display: grid; gap: 8px; }
.tl-steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.tl-steps div { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 18px; }
.tl-steps b { color: #a3192b; display: block; font-size: 1.05rem; margin-bottom: 4px; }

@media (max-width: 760px) {
  .tl-grid, .te-grid2, .te-grid3 { grid-template-columns: 1fr; }
  .te-invites li { grid-template-columns: 1fr auto; }
  .te-invites li strong { grid-column: 1 / -1; }
  .te-head-actions { width: 100%; }
}

/* cáo phó: tông xám đen thay cho đỏ */
.te-tang .te-eyebrow, .tl-tang .tl-eyebrow { color: #444; }
.te-tang .te-btn, .tl-tang .te-btn { background: #2b2b2b; border-color: #2b2b2b; }
.te-tang .te-btn-ghost, .tl-tang .te-btn-ghost { background: #fff; color: #2b2b2b; }
.te-tang .te-tabs button[aria-selected="true"] { color: #1f1f1f; border-bottom-color: #1f1f1f; }
.te-tang .te-stats b, .te-tang .te-cover-tag { color: #1f1f1f; }
.te-tang .te-check input { accent-color: #2b2b2b; }
.tl-tang { background: linear-gradient(160deg, #f1f1ef, #fff 60%); }

.te-slug { display: flex; align-items: center; border: 1px solid var(--line); border-radius: 10px; background: #fff; overflow: hidden; margin-bottom: 8px; }
.te-slug span { padding: 9px 0 9px 11px; color: var(--muted); white-space: nowrap; }
.te-slug input { flex: 1; min-width: 0; border: 0; padding: 9px 11px 9px 1px; font: inherit; color: var(--ink); font-weight: 600; }
.te-slug input:focus { outline: none; }
.te-slug:focus-within { border-color: #a3192b; box-shadow: 0 0 0 2px #e8b4bb; }
