.backlink { margin-left: auto; color: #ffd9de; text-decoration: none; font-size: 14px; border: 1px solid rgba(255,255,255,.4); padding: 8px 14px; border-radius: 999px; }
.login-card { max-width: 420px; margin: 40px auto; }
.tab-panel { background: #fff; border-radius: 18px; padding: 20px 16px 24px; box-shadow: 0 6px 24px rgba(110,31,46,.08); border: 1px solid #f6e3e1; }
.tab-panel h2 { font-family: var(--f-head); font-size: 23px; color: #5c1725; border-bottom: 2px solid #f0d5d3; padding-bottom: 8px; margin: 18px 0 12px; }
.tab-panel h3 { color: #7a3040; margin: 22px 0 10px; }
.countpill { background: var(--c-rose); color: #fff; border-radius: 999px; padding: 3px 12px; font-size: 14px; vertical-align: middle; }
.qrow { display: flex; align-items: center; gap: 10px; background: #fdf6f5; border: 1px solid #f0d5d3; border-radius: 12px; padding: 12px 14px; margin-bottom: 8px; flex-wrap: wrap; }
.qrow .qi { flex: 1; min-width: 150px; }
.qrow .qi b { display: block; font-size: 15px; }
.qrow .qi small { color: #a0606a; font-size: 12px; }
.tpl-grid { display: grid; grid-template-columns: 1fr; gap: 18px; }
@media (min-width: 900px) { .tpl-grid { grid-template-columns: 1fr 1fr; } }
.pv-inline { border: 2px solid #f0d5d3; border-radius: 12px; background: #fdf6f5; max-height: 640px; }
#admPv { width: 794px; height: 1123px; }
.color-row { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.color-row input[type=color] { width: 56px; height: 40px; border: 2px solid #e8c4c6; border-radius: 8px; background: #fff; padding: 2px; }
.color-row label { flex: 1; font-size: 15px; }
.pick { width: 100%; font-size: 16px; font-family: inherit; padding: 12px; border: 2px solid #e8c4c6; border-radius: 10px; background: #fff; }
.edit-row { display: flex; gap: 8px; margin-bottom: 8px; align-items: center; }
.edit-row input { flex: 1; min-width: 0; font-size: 15px; font-family: inherit; padding: 10px; border: 2px solid #e8c4c6; border-radius: 8px; }
.order-row { display: flex; align-items: center; gap: 10px; background: #fdf6f5; border: 1px solid #f0d5d3; border-radius: 10px; padding: 10px 12px; margin-bottom: 6px; }
.order-row b { flex: 1; font-weight: 500; }
.order-row button { width: 40px; height: 36px; border: none; border-radius: 8px; background: var(--c-rose); color: #fff; font-size: 16px; cursor: pointer; }
textarea { width: 100%; font-size: 15px; font-family: inherit; padding: 12px; border: 2px solid #e8c4c6; border-radius: 10px; }
.qdetail { background: #fff; border: 1px solid #f0d5d3; border-radius: 10px; padding: 12px 14px; margin: -4px 0 8px; font-size: 13.5px; color: #555; line-height: 1.65; }
.qdetail b { color: #7a3040; }
.urole { font-size: 11px; background: var(--c-rose); color: #fff; border-radius: 999px; padding: 2px 10px; margin-left: 8px; }
.urole.staff { background: #8a8a8a; }
.uoff { opacity: .55; }
#invModal { position: fixed; inset: 0; z-index: 60; background: rgba(110,31,46,.28); backdrop-filter: blur(3px); overflow: auto; padding: 30px 16px 60px; }
#invModal.hidden { display: none; }
.invrow { display: grid; grid-template-columns: 1fr 90px 70px 110px 34px; gap: 8px; margin-bottom: 8px; }
.invrow input { width: 100%; }

/* --- classy user registration form --- */
.user-form { background: linear-gradient(160deg, #fff 0%, #fdf3f1 100%); border: 1px solid #f0d5d3; border-radius: 16px; padding: 22px 24px; box-shadow: 0 6px 24px rgba(110,31,46,.06); margin-bottom: 22px; }
.uf-head { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; padding-bottom: 14px; border-bottom: 1px solid #f0d5d3; }
.uf-avatar { width: 46px; height: 46px; border-radius: 50%; background: var(--c-maroon, #6e1f2e); color: #fff; display: flex; align-items: center; justify-content: center; font-family: 'Playfair Display', serif; font-size: 17px; letter-spacing: 1px; }
.uf-title { font-family: 'Playfair Display', serif; font-size: 19px; color: var(--c-maroon, #6e1f2e); }
.uf-sub { font-size: 12.5px; color: #8a6a6e; margin-top: 2px; }
.uf-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 18px; }
.uf-wide { grid-column: 1 / -1; }
.ucard { background: #fff; border: 1px solid #f0d5d3; border-radius: 12px; padding: 14px 16px; margin-bottom: 10px; }
.ucard-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.ucard-meta { font-size: 12.5px; color: #7a6a6d; margin-top: 6px; line-height: 1.7; }
.ucard-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
@media (max-width: 640px) { .uf-grid { grid-template-columns: 1fr; } }

/* ===== Puhor-style shell: sidebar + topbar + dashboard ===== */
.login-full { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: linear-gradient(160deg, #f9e2df, #fdf3f1); }
.login-logo { width: 74px; margin: 0 auto 10px; display: block; }
.shell { display: flex; min-height: 100vh; background: #fdf6f4; }
.side { width: 232px; flex: 0 0 232px; background: linear-gradient(180deg, #5d1a28 0%, #6e1f2e 60%, #7a2a3a 100%); color: #f6dfe0; display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; }
.side-brand { display: flex; align-items: center; gap: 10px; padding: 20px 18px 16px; border-bottom: 1px solid rgba(255,255,255,.12); }
.side-brand img { width: 40px; height: 40px; border-radius: 50%; background: #fff; object-fit: cover; }
.side-brand b { font-family: 'Playfair Display', serif; font-size: 19px; letter-spacing: 2px; display: block; line-height: 1.1; }
.side-brand span { font-size: 10px; letter-spacing: 2.5px; color: #e6b8bd; }
.side-nav { flex: 1; padding: 14px 10px; display: flex; flex-direction: column; gap: 4px; }
.side-nav .step-btn { display: flex; align-items: center; gap: 11px; width: 100%; text-align: left; background: transparent; border: none; color: #efd5d7; font-family: Poppins, sans-serif; font-size: 14px; padding: 11px 12px; border-radius: 10px; cursor: pointer; transition: background .15s, color .15s; }
.side-nav .step-btn i { font-style: normal; font-size: 16px; width: 20px; text-align: center; }
.side-nav .step-btn:hover { background: rgba(255,255,255,.08); color: #fff; }
.side-nav .step-btn.active { background: rgba(255,255,255,.14); color: #fff; font-weight: 500; box-shadow: inset 3px 0 0 #e9b7a2; }
.side-nav .step-btn.hidden { display: none; }
.side-foot { padding: 14px; border-top: 1px solid rgba(255,255,255,.12); display: flex; flex-direction: column; gap: 9px; }
.side-foot a { color: #e6b8bd; font-size: 13px; text-decoration: none; padding-left: 4px; }
.side-foot a:hover { color: #fff; }
.side-foot button { background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.18); color: #fff; border-radius: 9px; padding: 9px; font-family: Poppins, sans-serif; font-size: 13.5px; cursor: pointer; }
.side-foot button:hover { background: rgba(255,255,255,.2); }
.main-wrap { flex: 1; min-width: 0; padding: 0 26px 50px; }
.topbar { display: flex; align-items: center; justify-content: space-between; padding: 18px 4px 14px; position: sticky; top: 0; background: #fdf6f4; z-index: 5; border-bottom: 1px solid #f3dcd9; margin-bottom: 20px; }
.topbar h1 { font-family: 'Playfair Display', serif; font-size: 22px; color: #6e1f2e; margin: 0; }
.top-right { display: flex; align-items: center; gap: 14px; }
#topDate { font-size: 12.5px; color: #a07a7f; }
#userChipTop { display: flex; align-items: center; gap: 8px; background: #fff; border: 1px solid #f0d5d3; border-radius: 999px; padding: 5px 14px 5px 5px; cursor: pointer; font-family: Poppins, sans-serif; font-size: 13px; color: #6e1f2e; }
#userAvatar { width: 28px; height: 28px; border-radius: 50%; background: #6e1f2e; color: #fff; display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 600; }
.dash-hero { background: linear-gradient(120deg, #6e1f2e, #8d3547); color: #fff; border-radius: 16px; padding: 26px 28px; display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 20px; box-shadow: 0 8px 24px rgba(110,31,46,.18); }
.dash-hero h2 { font-family: 'Playfair Display', serif; font-size: 24px; margin: 0 0 4px; }
.dash-hero p { margin: 0; font-size: 13.5px; color: #f0cdd1; }
.dash-cta { background: linear-gradient(120deg, #d9a05b, #c08083); color: #fff; text-decoration: none; font-size: 14px; font-weight: 500; padding: 11px 18px; border-radius: 10px; white-space: nowrap; }
.stat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 14px; margin-bottom: 22px; }
.stat-card { border-radius: 14px; padding: 18px; color: #fff; min-height: 92px; display: flex; flex-direction: column; justify-content: space-between; box-shadow: 0 6px 18px rgba(110,31,46,.12); }
.stat-card .n { font-size: 30px; font-weight: 600; font-family: Poppins, sans-serif; }
.stat-card .l { font-size: 12.5px; opacity: .92; }
.sc-1 { background: linear-gradient(135deg, #6e1f2e, #8d3547); }
.sc-2 { background: linear-gradient(135deg, #b76e79, #c98995); }
.sc-3 { background: linear-gradient(135deg, #2f6f5e, #3f8a76); }
.sc-4 { background: linear-gradient(135deg, #8a5a2b, #a9743d); }
.sc-5 { background: linear-gradient(135deg, #5b4a8a, #7260a8); }
.dash-cols { display: grid; grid-template-columns: 1.4fr 1fr; gap: 16px; }
.dash-card { background: #fff; border: 1px solid #f0d5d3; border-radius: 14px; padding: 18px 20px; }
.dash-card h3 { font-family: 'Playfair Display', serif; color: #6e1f2e; font-size: 17px; margin: 0 0 12px; }
.dash-row { display: flex; justify-content: space-between; align-items: center; padding: 9px 0; border-bottom: 1px solid #f7e9e7; font-size: 13.5px; }
.dash-row:last-child { border-bottom: none; }
.dash-row small { color: #a07a7f; display: block; font-size: 11.5px; }
.qa-list { display: flex; flex-direction: column; gap: 9px; }
.qa-item { display: block; width: 100%; text-align: left; background: #fdf3f1; border: 1px solid #f0d5d3; border-radius: 10px; padding: 11px 14px; font-family: Poppins, sans-serif; font-size: 13.5px; color: #6e1f2e; cursor: pointer; text-decoration: none; }
.qa-item:hover { background: #f9e6e3; }
.qa-item.hidden { display: none; }
@media (max-width: 900px) {
  .shell { flex-direction: column; }
  .side { width: 100%; flex: none; height: auto; position: static; }
  .side-nav { flex-direction: row; overflow-x: auto; padding: 10px; }
  .side-nav .step-btn { width: auto; white-space: nowrap; }
  .side-foot { flex-direction: row; align-items: center; justify-content: space-between; }
  .dash-cols { grid-template-columns: 1fr; }
}
.login-full.hidden, .shell.hidden { display: none !important; }
.dash-hero h2, .dash-card h3 { border: none !important; text-decoration: none !important; }
.dash-hero h2::after, .dash-card h3::after { display: none !important; }
.dash-hero h2 { color: #fff !important; }

@media (max-width: 640px){
  .topbar{flex-wrap:wrap;gap:6px;padding:12px 4px 10px}
  .topbar h1{flex-basis:100%;font-size:20px}
  .top-right{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
  .dash-hero{flex-direction:column;align-items:flex-start;gap:12px}
  .dash-hero a,.dash-hero button{align-self:stretch;text-align:center}
}
