/* Luxora-X – admin area (extends assets/css/style.css) */
.admin-main { padding: 40px 0 100px; min-height: 70vh; }
.admin-user { display: flex; gap: 1.2rem; align-items: center; color: var(--muted); font-size: 0.9rem; flex-wrap: wrap; }
.admin-user #who { color: var(--text); }
.admin-user[hidden] { display: none; }
button.link { background: none; border: 0; color: var(--gold-2); cursor: pointer; font: inherit; padding: 0.3rem 0; }
button.link:hover { text-decoration: underline; }
.muted { color: var(--muted); }
.small { font-size: 0.85rem; }

.panel { background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(1.2rem, 3vw, 2rem); margin-bottom: 1.5rem; }
.panel h2 { font-size: 1.8rem; }
.panel h3 { font-size: 1.3rem; margin-top: 1.4rem; }
.login-box { max-width: 440px; margin: 40px auto; }

.form { display: grid; gap: 1rem; }
.form .row { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1rem; }
.field { display: grid; gap: 0.35rem; }
.field label { font-size: 0.85rem; color: var(--muted); }
.field .hint { font-size: 0.78rem; color: var(--muted); }
.admin input[type="text"], .admin input[type="email"], .admin input[type="password"], .admin input[type="tel"],
.admin input[type="number"], .admin select, .admin textarea {
  width: 100%; background: var(--bg); color: var(--text); border: 1px solid var(--line);
  border-radius: 10px; padding: 0.75rem 0.9rem; font: inherit; font-size: 16px;
}
.admin textarea { min-height: 110px; resize: vertical; line-height: 1.5; }
.admin input:focus, .admin select:focus, .admin textarea:focus, .admin button:focus-visible { outline: 2px solid var(--gold); outline-offset: 1px; }
.check { display: flex; gap: 0.5rem; align-items: center; color: var(--text); font-size: 0.95rem; }
.check input { width: 18px; height: 18px; accent-color: var(--gold); }
.actions { display: flex; gap: 0.7rem; flex-wrap: wrap; align-items: center; }
.btn[disabled] { opacity: 0.5; cursor: progress; transform: none; }
.btn-danger { background: transparent; border-color: #7a2d2d; color: #f1a3a3; }
.btn-danger:hover { border-color: #e06666; }
.btn-xs { padding: 0.4rem 0.8rem; font-size: 0.82rem; }

.tabs-admin { display: flex; gap: 0.4rem; margin-bottom: 1.5rem; flex-wrap: wrap; border-bottom: 1px solid var(--line); }
.tabs-admin button { background: none; border: 0; color: var(--muted); font: inherit; padding: 0.8rem 1rem; cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tabs-admin button.active, .tabs-admin button:hover { color: var(--gold-2); border-bottom-color: var(--gold); }

.notice { padding: 0.9rem 1.1rem; border-radius: 10px; margin-bottom: 1.2rem; border: 1px solid; }
.notice.ok { background: rgba(37, 211, 102, 0.08); border-color: rgba(37, 211, 102, 0.4); color: #bff3d2; }
.notice.err { background: rgba(224, 102, 102, 0.08); border-color: rgba(224, 102, 102, 0.45); color: #f6c2c2; }
.notice.info { background: rgba(212, 175, 55, 0.08); border-color: rgba(212, 175, 55, 0.4); color: var(--gold-2); }

/* Profile list */
.plist { display: grid; gap: 0.6rem; }
.pitem { display: grid; grid-template-columns: 56px 52px minmax(0, 1fr) auto; gap: 0.9rem; align-items: center; padding: 0.6rem 0.8rem; background: var(--card); border: 1px solid var(--line); border-radius: 12px; }
.pitem .no { color: var(--gold); font-size: 0.85rem; text-align: center; }
.pitem .thumb { width: 52px; height: 52px; border-radius: 8px; object-fit: cover; background: var(--bg); }
.pitem .nm { font-weight: 600; }
.pitem .sub { color: var(--muted); font-size: 0.85rem; }
.pitem .tag { font-size: 0.72rem; padding: 0.15rem 0.5rem; border-radius: 999px; border: 1px solid var(--line); margin-left: 0.4rem; color: var(--muted); }
.pitem .tag.on { border-color: rgba(37, 211, 102, 0.5); color: #9be8b8; }
.pitem .tag.gold { border-color: var(--gold); color: var(--gold-2); }
.pitem .ctrl { display: flex; gap: 0.35rem; flex-wrap: wrap; justify-content: flex-end; }
.icon-btn { width: 40px; height: 40px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg); color: var(--text); cursor: pointer; font-size: 1rem; }
.icon-btn:hover { border-color: var(--gold); }
.icon-btn[disabled] { opacity: 0.3; cursor: default; }

/* Images */
.cover-edit { display: grid; grid-template-columns: 160px minmax(0, 1fr); gap: 1rem; align-items: start; }
.cover-edit img, .gimg img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; border-radius: 10px; border: 1px solid var(--line); background: var(--bg); }
.gal-edit { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 0.8rem; }
.gimg { position: relative; }
.gimg .gctrl { display: flex; gap: 0.3rem; justify-content: center; margin-top: 0.35rem; }
.gimg .gctrl .icon-btn { width: 34px; height: 34px; font-size: 0.85rem; }
.upload-label { display: inline-flex; cursor: pointer; }
.upload-label input { position: absolute; width: 1px; height: 1px; opacity: 0; }

/* Accounts */
.utable { width: 100%; border-collapse: collapse; }
.utable th, .utable td { text-align: left; padding: 0.7rem 0.5rem; border-bottom: 1px solid var(--line); vertical-align: middle; }
.utable th { color: var(--muted); font-weight: 500; font-size: 0.85rem; }
.utable select { padding: 0.5rem; }

.modal-back { position: fixed; inset: 0; background: rgba(0, 0, 0, 0.75); display: grid; place-items: center; z-index: 200; padding: 1rem; }
.modal { background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.6rem; width: min(460px, 100%); }

@media (max-width: 700px) {
  .pitem { grid-template-columns: 40px 44px minmax(0, 1fr); }
  .pitem .thumb { width: 44px; height: 44px; }
  .pitem .ctrl { grid-column: 1 / -1; justify-content: flex-start; }
  .cover-edit { grid-template-columns: 110px minmax(0, 1fr); }
  .utable thead { display: none; }
  .utable tr { display: grid; gap: 0.4rem; padding: 0.8rem 0; border-bottom: 1px solid var(--line); }
  .utable td { border: 0; padding: 0; }
}

.svc-box { border: 1px solid var(--line); border-radius: 12px; padding: 0.9rem 1rem 1rem; margin: 0; }
.svc-box legend { color: var(--gold); padding: 0 0.4rem; font-size: 0.9rem; }
.svc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 0.55rem 1rem; }
.svc-grid .check { font-size: 0.92rem; min-height: 32px; }

[hidden] { display: none !important; }

.tr-box { border: 1px solid var(--line); border-radius: 12px; padding: 0.8rem 1rem; }
.tr-box summary { cursor: pointer; color: var(--gold-2); }
.tr-box[open] summary { margin-bottom: 0.8rem; }
.tr-box .field { margin-top: 0.8rem; }

/* Clear layout: collapsible sections, language tabs, sticky save bar */
.ed-head { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; flex-wrap: wrap; }
.sec { border: 1px solid var(--line); border-radius: 12px; background: var(--card); }
.sec > summary { cursor: pointer; list-style: none; padding: 0.95rem 1.1rem; font-family: var(--serif); font-size: 1.25rem; display: flex; justify-content: space-between; align-items: center; }
.sec > summary::-webkit-details-marker { display: none; }
.sec > summary::after { content: "+"; color: var(--gold); font-family: var(--sans); font-size: 1.3rem; }
.sec[open] > summary::after { content: "–"; }
.sec[open] > summary { border-bottom: 1px solid var(--line); }
.sec-body { padding: 1rem 1.1rem 1.2rem; }
.sub-h { font-family: var(--sans); font-size: 0.8rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--gold); margin: 0.4rem 0 0; }
.ltabs { display: flex; gap: 0.3rem; flex-wrap: wrap; margin-bottom: 0.4rem; }
.ltab { background: var(--bg); border: 1px solid var(--line); color: var(--muted); border-radius: 999px; padding: 0.45rem 1rem; cursor: pointer; font: inherit; font-size: 0.9rem; }
.ltab:hover { color: var(--gold-2); }
.ltab.on { background: var(--gold-metal); color: #1a1406; border-color: transparent; }
.lpanel { display: grid; gap: 0.8rem; }
.sub-list { display: grid; gap: 0.8rem; }
.sub-item { border: 1px dashed var(--line); border-radius: 10px; padding: 0.8rem 1rem; display: grid; gap: 0.7rem; }
.save-bar { position: sticky; bottom: 0; z-index: 5; display: flex; gap: 1rem; align-items: center; flex-wrap: wrap; padding: 0.9rem 0; margin-top: 0.4rem; background: linear-gradient(180deg, rgba(22, 20, 18, 0), var(--bg-2) 30%); }
.admin textarea::placeholder, .admin input::placeholder { color: #6f675c; }
.ok-mark { color: var(--gold); margin-left: 0.2rem; }
.ltab.on .ok-mark { color: #1a1406; }

/* Fields in one row aligned at the top, extra links aligned left */
.form .row { align-items: start; }
.field { align-content: start; }
.field > .link, .field > button.link { justify-self: start; text-align: left; padding-top: 0.15rem; }
.admin input[type="text"], .admin input[type="email"], .admin input[type="password"], .admin input[type="tel"], .admin input[type="number"], .admin select { height: 48px; padding-top: 0; padding-bottom: 0; }
.utable select { height: 40px; }
