.admin-shell { max-width: 1440px; }
.admin-layout { grid-template-columns: 170px minmax(0, 1fr); align-items: start; }
.admin-content { min-height: 260px; }
.admin-nav { height: auto; }
.pim-logged-out { grid-template-columns: minmax(0, 560px); justify-content: center; }
.pim-header-actions { display: flex; gap: 20px; align-items: center; }
#admin-status { min-height: 26px; color: #456b52; font-weight: 750; margin: 20px 0; }
#admin-status.pim-error, .pim-danger { color: #a33152; }
.pim-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.pim-toolbar h2 { margin: 0; }
.pim-link { color: #6b47b5; font-weight: 850; padding: 8px 0; }
.pim-secondary { padding: 11px 16px; background: #eee5fa; color: #573783; border: 1px solid #d7c6eb; border-radius: 14px; font-weight: 850; }
.pim-search { display: block; margin-bottom: 20px; }
.pim-row-note, .pim-file small { display: block; margin-top: 5px; color: var(--muted); font-size: 12px; }
.pim-badge { display: inline-flex; align-items: center; background: #f0e9f9; color: #6f4f91; font-size: 12px; font-weight: 800; padding: 5px 9px; border-radius: 10px; white-space: nowrap; }
.pim-badge.published { background: #e0f1e6; color: #39694b; }
.pim-badge.archived { background: #eee9e6; color: #766b66; }
.pim-section { padding: 24px 0; border: 0; border-bottom: 1px solid #e6deef; margin: 0; }
.pim-section > legend { font-size: 20px; font-weight: 950; margin: 0 0 18px; }
.pim-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; clear: both; }
.admin-content .pim-field { display: flex; flex-direction: column; align-items: stretch; gap: 7px; padding: 0; font-size: 13px; font-weight: 850; }
.admin-content .pim-field input, .admin-content .pim-field select, .admin-content .pim-field textarea { display: block; width: 100%; min-width: 0; color: var(--ink); background: #fffcff; border: 1px solid #cfc1df; border-radius: 12px; padding: 11px 12px; font: 500 15px/1.5 'Nunito', sans-serif; }
.admin-content .pim-field textarea { resize: vertical; min-height: 130px; }
.admin-content .pim-field input[type='file'] { font-size: 13px; padding: 9px; }
.admin-content .pim-checks { display: flex; flex-wrap: wrap; gap: 10px; clear: both; }
.admin-content .pim-checks label, .admin-content .pim-check { display: flex; align-items: center; gap: 10px; padding: 10px 12px; background: #f2ebfa; border-radius: 12px; font-size: 13px; }
.admin-content input[type='checkbox'] { width: 18px; height: 18px; padding: 0; border-radius: 5px; flex-shrink: 0; }
.pim-help { font-size: 13px; color: var(--muted); line-height: 1.7; }
.pim-variants { clear: both; }
.pim-variant { display: grid; grid-template-columns: 1fr 1fr 1fr auto; gap: 12px; align-items: end; margin-bottom: 15px; padding: 17px; background: #f7f2fb; border-radius: 18px; }
.pim-translations { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; clear: both; }
.pim-translation { padding: 20px; border-radius: 22px; border: 1px solid #e2d7ee; background: #fdfaff; }
.pim-translation h3 { margin: 0 0 16px; font-size: 18px; }
.pim-translation .pim-field { margin-bottom: 14px; }
.pim-save-bar { position: sticky; bottom: 12px; z-index: 2; display: flex; flex-wrap: wrap; align-items: center; gap: 16px; background: #fffaf3f5; border: 1px solid #e3d6ee; padding: 15px; margin: 22px 0; border-radius: 18px; box-shadow: 0 5px 20px #49316b12; }
#dirty-indicator { font-size: 13px; color: #87601f; }
.pim-save-bar .pim-link { margin-left: auto; }
.pim-file { display: flex; justify-content: space-between; align-items: center; gap: 18px; padding: 16px; margin-bottom: 10px; background: #f6f1fb; border-radius: 16px; }
.pim-file > div { min-width: 0; overflow-wrap: anywhere; }
.pim-file-actions { display: flex; flex-wrap: wrap; gap: 7px 12px; }
.pim-file-actions button { color: #684494; font-size: 13px; font-weight: 850; }
.pim-file-actions .pim-danger { color: #a33152; }
.pim-upload { padding: 22px; margin-top: 24px; border: 1px dashed #c5aedf; border-radius: 22px; }
.pim-upload h3 { margin-top: 0; }
.pim-upload .primary-button { margin-top: 20px; }
.pim-upload progress { width: 100%; height: 12px; accent-color: #6b47b5; margin-top: 20px; }
.pim-file-dialog { padding: 28px; width: min(700px, calc(100% - 24px)); border-radius: 24px; }
.pim-file-dialog h2 { font-size: 23px; overflow-wrap: anywhere; }
.pim-file-dialog .pim-toolbar { margin-top: 22px; margin-bottom: 0; }
.pim-package-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.pim-package-grid legend { font-size: 24px; font-weight: 950; }
.pim-package-grid label { clear: both; align-items: start; font-size: 14px; overflow-wrap: anywhere; }
.pim-package-grid .pim-badge { margin-left: auto; font-size: 10px; }
.pim-login .primary-button { margin-top: 20px; }
button:disabled { opacity: .55; cursor: not-allowed; }
@media (max-width: 1050px) {
 .pim-translations, .pim-package-grid { grid-template-columns: 1fr; }
 .pim-variant { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 800px) {
 .admin-layout { grid-template-columns: 1fr; }
 .pim-file { flex-direction: column; align-items: start; }
 .pim-fields { grid-template-columns: 1fr; }
 .pim-save-bar { bottom: 5px; }
 .pim-translation, .pim-upload { padding: 16px; }
}
.pim-inline-error { color: #a33152; font-size: 14px; }
#reauth-form .primary-button { margin-top: 20px; }

.admin-signed-out .admin-shell { max-width: 600px; margin: 12vh auto 0; }
.admin-signed-out #admin-status:empty { display: none; }
