/* Módulo de piezas: usa los mismos colores y tipografías del sitio */
.pz-page { min-height: 100vh; background: var(--color-bg, #FBF7F2); font-family: 'Inter', system-ui, sans-serif; color: #2E2321; }
.pz-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 20px; background: #fff; border-bottom: 1px solid #EADFD3; }
.pz-header img { height: 44px; width: auto; }
.pz-header a.pz-back { color: var(--color-primary, #622626); text-decoration: none; font-weight: 600; font-size: 14px; }
.pz-wrap { max-width: 640px; margin: 0 auto; padding: 24px 16px 56px; }
.pz-title { font-family: 'Fraunces', Georgia, serif; color: var(--color-primary, #622626); font-size: 28px; margin: 8px 0 4px; }
.pz-sub { color: #7A6B62; margin: 0 0 20px; font-size: 15px; line-height: 1.5; }
.pz-card { background: #fff; border: 1px solid #EADFD3; border-radius: 16px; padding: 20px; box-shadow: 0 2px 10px rgba(98,38,38,.06); margin-bottom: 16px; }
.pz-field { margin-bottom: 14px; }
.pz-field label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; }
.pz-field label small { font-weight: 400; color: #7A6B62; }
.pz-field input, .pz-field textarea { width: 100%; box-sizing: border-box; padding: 11px 12px; border: 1px solid #D9CCBE; border-radius: 10px; font: inherit; background: #fff; }
.pz-field input:focus, .pz-field textarea:focus { outline: 2px solid rgba(98,38,38,.25); border-color: var(--color-primary, #622626); }
.pz-field .pz-err { color: #B3261E; font-size: 12px; margin-top: 4px; min-height: 0; }
.pz-field.has-error input, .pz-field.has-error textarea, .pz-field.has-error .pz-drop { border-color: #B3261E; }
.pz-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 520px) { .pz-row { grid-template-columns: 1fr; } }
.pz-drop { border: 2px dashed #D9CCBE; border-radius: 14px; padding: 22px 14px; text-align: center; cursor: pointer; background: #FFFCF8; color: #7A6B62; }
.pz-drop:hover { border-color: var(--color-primary, #622626); }
.pz-drop input { display: none; }
.pz-preview { display: none; margin-top: 10px; position: relative; }
.pz-preview img { width: 100%; max-height: 360px; object-fit: cover; border-radius: 12px; display: block; }
.pz-hp { position: absolute; left: -9999px; height: 0; overflow: hidden; }
.pz-btn { display: inline-block; width: 100%; border: 0; border-radius: 12px; padding: 13px 18px; font: inherit; font-weight: 600; cursor: pointer; background: var(--color-primary, #622626); color: #fff; text-align: center; text-decoration: none; box-sizing: border-box; }
.pz-btn:disabled { opacity: .6; cursor: wait; }
.pz-btn--ghost { background: #fff; color: var(--color-primary, #622626); border: 1px solid var(--color-primary, #622626); }
.pz-alert { display: none; background: #FDECEA; color: #8C1D18; border-radius: 10px; padding: 10px 12px; font-size: 14px; margin-bottom: 14px; }
.pz-code { font-family: 'IBM Plex Mono', monospace; font-size: 30px; letter-spacing: 2px; color: var(--color-primary, #622626); text-align: center; margin: 6px 0 14px; }
.pz-link-box { word-break: break-all; background: #F6EFE7; border-radius: 10px; padding: 10px 12px; font-family: 'IBM Plex Mono', monospace; font-size: 12px; margin: 8px 0 12px; }
.pz-note { font-size: 13px; color: #7A6B62; line-height: 1.5; }
.pz-photo { width: 100%; max-height: 420px; object-fit: cover; border-radius: 12px; display: block; margin-bottom: 14px; }
.pz-meta { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 14px 0; }
.pz-meta div { background: #FFFCF8; border: 1px solid #EADFD3; border-radius: 10px; padding: 10px 12px; }
.pz-meta span { display: block; font-size: 11px; color: #7A6B62; text-transform: uppercase; letter-spacing: .5px; }
.pz-meta strong { font-size: 15px; }
/* Línea de seguimiento */
.pz-steps { list-style: none; padding: 0; margin: 18px 0 4px; display: grid; grid-template-columns: repeat(4, 1fr); position: relative; }
.pz-steps::before { content: ''; position: absolute; top: 15px; left: 12.5%; right: 12.5%; height: 4px; background: #EADFD3; border-radius: 2px; }
.pz-steps li { text-align: center; position: relative; font-size: 12px; color: #7A6B62; }
.pz-steps li .dot { width: 34px; height: 34px; border-radius: 50%; margin: 0 auto 8px; background: #fff; border: 3px solid #EADFD3; display: flex; align-items: center; justify-content: center; font-weight: 700; position: relative; z-index: 1; }
.pz-steps li.done .dot { background: var(--color-primary, #622626); border-color: var(--color-primary, #622626); color: #fff; }
.pz-steps li.current .dot { box-shadow: 0 0 0 5px rgba(98,38,38,.15); }
.pz-steps li.done, .pz-steps li.current { color: #2E2321; font-weight: 600; }
.pz-progress { height: 4px; background: var(--color-primary, #622626); position: absolute; top: 15px; left: 12.5%; border-radius: 2px; z-index: 0; transition: width .4s; }
.pz-badge { display: inline-block; padding: 4px 12px; border-radius: 999px; font-size: 13px; font-weight: 600; }
.pz-badge--REGISTRADA { background: #F1E7DA; color: #6B4A2B; }
.pz-badge--EN_PROCESO { background: #FFF1C9; color: #7A5A00; }
.pz-badge--LISTA_PARA_RECOGER { background: #DCF2DD; color: #1E6B2A; }
.pz-badge--ENTREGADA { background: #E5E7EB; color: #374151; }
.pz-tabs { display: flex; gap: 8px; margin-bottom: 16px; }
.pz-tabs button { flex: 1; padding: 10px; border-radius: 10px; border: 1px solid #D9CCBE; background: #fff; font: inherit; font-weight: 600; cursor: pointer; }
.pz-tabs button.active { background: var(--color-primary, #622626); color: #fff; border-color: var(--color-primary, #622626); }

/* ---------- Admin: Gestión de piezas ---------- */
.main-tabs { display: flex; gap: 8px; margin: 0 0 16px; border-bottom: 1px solid #EADFD3; }
.main-tabs button { background: none; border: 0; padding: 10px 16px; font: inherit; font-weight: 600; color: #7A6B62; cursor: pointer; border-bottom: 3px solid transparent; margin-bottom: -1px; }
.main-tabs button.active { color: var(--color-primary, #622626); border-bottom-color: var(--color-primary, #622626); }
.pz-filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.pz-filters input, .pz-filters select { padding: 8px 10px; border: 1px solid #D9CCBE; border-radius: 8px; font: inherit; font-size: 14px; background: #fff; }
.pz-filters input[type=search] { flex: 1; min-width: 180px; }
.pz-table-wrap { overflow-x: auto; background: #fff; border: 1px solid #EADFD3; border-radius: 12px; }
.pz-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.pz-table th { text-align: left; padding: 10px 12px; font-size: 12px; text-transform: uppercase; letter-spacing: .4px; color: #7A6B62; background: #FFFCF8; white-space: nowrap; }
.pz-table td { padding: 10px 12px; border-top: 1px solid #F0E6DB; vertical-align: middle; }
.pz-thumb { width: 52px; height: 52px; object-fit: cover; border-radius: 8px; cursor: pointer; display: block; background: #F1E7DA; }
.pz-empty { text-align: center; color: #7A6B62; padding: 28px !important; }
.pz-pager { display: flex; align-items: center; justify-content: space-between; margin-top: 10px; font-size: 13px; color: #7A6B62; }
.pz-modal { display: none; position: fixed; inset: 0; background: rgba(46,35,33,.55); z-index: 1000; align-items: center; justify-content: center; padding: 16px; }
.pz-modal-card { background: #fff; border-radius: 16px; width: 100%; max-width: 760px; max-height: 92vh; overflow-y: auto; padding: 20px; display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
@media (max-width: 680px) { .pz-modal-card { grid-template-columns: 1fr; } }
.pz-modal-card img.big { width: 100%; max-height: 420px; object-fit: cover; border-radius: 12px; }
.pz-modal-head { grid-column: 1 / -1; display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.pz-modal-head h3 { margin: 0; font-family: 'Fraunces', Georgia, serif; color: var(--color-primary, #622626); }
.pz-data { display: grid; gap: 6px; margin-bottom: 12px; }
.pz-data div { background: #FFFCF8; border: 1px solid #EADFD3; border-radius: 8px; padding: 6px 10px; }
.pz-data span { display: block; font-size: 11px; color: #7A6B62; text-transform: uppercase; }
.pz-admin-field { margin-bottom: 10px; }
.pz-admin-field label { display: block; font-size: 12px; font-weight: 600; margin-bottom: 4px; }
.pz-admin-field input, .pz-admin-field select, .pz-admin-field textarea { width: 100%; box-sizing: border-box; padding: 8px 10px; border: 1px solid #D9CCBE; border-radius: 8px; font: inherit; }
.pz-history { list-style: none; padding: 0; margin: 0; font-size: 13px; }
.pz-history li { padding: 6px 0; border-top: 1px solid #F0E6DB; }
.pz-modal-actions { grid-column: 1 / -1; display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; }
