/* Hüsn-i Hat 3.4.2: respects the existing brand/theme */
.upload-feedback{margin:.75rem 0;padding:.65rem .85rem;border:1px solid #a2b9b4;border-radius:9px;font-size:.92rem;line-height:1.45;background:#eff9f7;color:#174c43}
.upload-feedback:empty{display:none}
.upload-feedback-error{background:#fff0ef;border-color:#c67a78;color:#862b25}
.upload-feedback-ok{background:#eff9f7;border-color:#8ab6a7;color:#174c43}
.script-grant-item{display:flex;align-items:center;justify-content:space-between;gap:1rem;border-top:1px solid rgba(110,130,125,.26);padding:.7rem 0;flex-wrap:wrap}
.script-grant-item form{margin:0}
.sticker-admin-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(175px,1fr));gap:1rem;margin-top:1rem}
.sticker-admin-tile{border:1px solid rgba(110,130,125,.3);padding:1rem;border-radius:12px;display:flex;flex-direction:column;gap:.5rem;min-width:0}
.sticker-admin-image{background:rgba(150,160,150,.075);border-radius:10px;min-height:125px;display:flex;justify-content:center;align-items:center;padding:.4rem}
.sticker-admin-image img{width:100%;max-width:165px;max-height:125px;object-fit:contain}
.sticker-admin-tile small{color:var(--text-muted,#586964)}
.sticker-admin-tile form{margin-top:auto}
.sticker-delete-check{font-size:.78rem;display:block;margin:.4rem 0}
.sticker-delete-check input{width:auto;display:inline;margin-right:.25rem}
.sticker-delete-btn{background:#963a36!important;color:white!important}

/* Hüsn-i Hat 3.4.6 – einheitliche, kleine Sticker-Symbole in allen Ansichten */
.portal-main img[src*="r=sticker_image"],.portal-main .hh-sticker-thumb{width:40px!important;height:40px!important;max-width:40px!important;max-height:40px!important;object-fit:contain!important;display:inline-block;vertical-align:middle}
.sticker-admin-grid{grid-template-columns:repeat(auto-fill,minmax(140px,170px));gap:.6rem}
.sticker-admin-tile{padding:.6rem;gap:.3rem;font-size:.85rem}
.sticker-admin-image{min-height:54px;padding:.25rem}.sticker-admin-image img{width:40px!important;height:40px!important;max-width:40px!important;max-height:40px!important}
.hh-sticker-choice{max-width:90px!important;padding:5px!important}.hh-sticker-choice img{width:36px!important;height:36px!important;max-height:36px!important}.hh-sticker-choice span{font-size:10px!important}
.hh-sticker-collection{display:grid;grid-template-columns:repeat(auto-fill,minmax(148px,1fr));gap:.65rem}.hh-sticker-collection .card{padding:.7rem;text-align:center;overflow-wrap:anywhere}.hh-sticker-collection .card h3{font-size:.88rem}.hh-sticker-collection .card p{font-size:.78rem}
.top-message-link,.top-profile-link{display:inline-flex;align-items:center;justify-content:center;gap:5px;white-space:nowrap;border:1px solid rgba(225,246,243,.3);border-radius:9px;padding:7px 10px;text-decoration:none;font-size:13px;position:relative}
.top-message-link:hover,.top-profile-link:hover{background:rgba(255,255,255,.14)}
.top-unread-badge{position:absolute;top:-8px;right:-8px;background:#c92737;color:#fff;border-radius:100px;padding:1px 6px;min-width:18px;min-height:18px;text-align:center;font-size:11px;font-weight:800;line-height:17px;border:2px solid #14343b}
.hh-assessment-edit{border-top:1px solid #d5e3df;margin-top:.5rem;padding-top:.6rem}.hh-assessment-edit summary{cursor:pointer;color:#23645c;font-weight:650}.hh-assessment-edit textarea{min-height:70px}.hh-history-sticker{width:40px;height:40px;object-fit:contain}
@media(max-width:550px){.top-profile-link .label{display:none}.top-message-link .label{display:none}.sticker-admin-grid{grid-template-columns:repeat(auto-fill,minmax(130px,1fr))}}

/* Hüsn-i Hat 3.4.7 – kompakte, einheitliche Stickerwahl (fix: globale label/input-Stile) */
.portal-main fieldset.hh-sticker-fieldset {display:block!important;width:100%;min-width:0;padding:10px 12px;margin:8px 0 14px;border-radius:10px}
.portal-main .hh-sticker-picker{display:flex!important;flex-flow:row wrap!important;align-items:flex-start!important;justify-content:flex-start!important;gap:8px!important;width:auto!important;max-width:100%!important}
.portal-main label.hh-sticker-choice{display:flex!important;flex:0 0 80px!important;width:80px!important;min-width:80px!important;max-width:80px!important;min-height:0!important;height:auto!important;flex-direction:column!important;align-items:center!important;justify-content:flex-start!important;gap:3px!important;margin:0!important;padding:6px 3px!important;border:1px solid #cbdad8;border-radius:9px;cursor:pointer;font-size:11px!important;line-height:1.15!important;text-align:center;overflow-wrap:anywhere;background:white}
.portal-main label.hh-sticker-choice input[type="radio"]{appearance:auto!important;width:16px!important;height:16px!important;min-height:16px!important;max-width:16px!important;margin:0!important;padding:0!important;flex:0 0 16px!important;align-self:center!important}
.portal-main label.hh-sticker-choice img,.portal-main .hh-sticker-choice img{display:block!important;width:36px!important;height:36px!important;min-height:0!important;max-width:36px!important;max-height:36px!important;object-fit:contain!important;margin:0 auto!important}
.portal-main label.hh-sticker-choice span{display:block!important;max-width:72px!important;font-size:10px!important;line-height:1.2!important;white-space:normal!important}
.portal-main label.hh-sticker-choice:has(input:checked){border-color:#206b64;box-shadow:0 0 0 1px #206b64;background:#f0faf7}
.portal-main .hh-sticker-fieldset[hidden]{display:none!important}
.portal-main .hh-sticker-collection img,.portal-main .sticker-admin-tile img,.portal-main .hh-history-sticker{width:36px!important;height:36px!important;max-height:36px!important;max-width:36px!important;object-fit:contain!important}
.portal-main .sticker-admin-grid{display:flex!important;flex-wrap:wrap!important;gap:10px!important}
.portal-main .sticker-admin-tile{width:146px!important;max-width:146px!important;min-height:0!important;align-items:center!important;text-align:center!important}
.portal-main .sticker-admin-image{min-height:42px!important;height:42px!important;width:48px!important;padding:2px!important}
.portal-main .sticker-admin-tile form{width:100%}
.portal-main .hh-sticker-collection{grid-template-columns:repeat(auto-fill,minmax(140px,1fr))!important}
.portal-main .hh-edit-action{display:inline-flex!important;background:#e8f2ef;color:#1d625b;border:1px solid #b9d3cc;padding:7px 12px!important;border-radius:8px;font-weight:700!important;cursor:pointer;margin:6px 0}
.portal-main .hh-edit-action:hover{background:#d8ebe6}
/* Postfach: Mail-Liste mit Ordnern statt großer Nachrichtenkarten */
.hh-inbox-tools{display:flex;align-items:end;flex-wrap:wrap;gap:16px;justify-content:space-between}
.hh-inbox-tools>p{width:100%;margin:0 0 4px;color:#617b78;font-size:13px}
.hh-inbox-tools form{display:flex;align-items:end;flex-wrap:wrap;gap:8px;margin:0}
.hh-inbox-tools form label{margin:0;min-width:185px}
.hh-inbox-tools form input{min-height:38px}
.hh-button-outline{background:white!important;color:#246766!important;border:1px solid #b9d2c9!important}
.hh-inbox-layout{display:grid;grid-template-columns:205px minmax(0,1fr);gap:14px;align-items:start}
.hh-inbox-folders{display:flex!important;flex-direction:column!important;align-items:stretch!important;gap:4px!important;background:white;border:1px solid #dbe5e1;border-radius:12px;padding:9px!important}
.hh-inbox-folders a{display:block!important;padding:9px 10px;border-radius:7px;text-decoration:none;font-size:13px;font-weight:550;overflow-wrap:anywhere}
.hh-inbox-folders a.is-selected{background:#e8f3f0;color:#174e46;font-weight:800}
.hh-inbox-messages{background:white;border:1px solid #dbe5e1;border-radius:12px;overflow:hidden;min-width:0}
.hh-inbox-list-heading{display:flex;gap:9px;align-items:center;justify-content:space-between;padding:15px 17px;border-bottom:1px solid #e4ebe7;font-weight:700}
.hh-inbox-message{border-bottom:1px solid #e9efeb}
.hh-inbox-row-form{margin:0!important}
.hh-inbox-row{display:grid!important;grid-template-columns:minmax(110px,180px) minmax(120px,1fr) auto 10px;align-items:center;text-align:left;gap:12px;width:100%;min-height:54px;padding:12px 15px!important;background:white!important;color:#253f3d!important;border:0!important;border-radius:0!important;font-size:13px!important;font-weight:400!important;white-space:normal}
.hh-inbox-row:hover{background:#f3f8f6!important}
.hh-inbox-message.is-unread .hh-inbox-row{background:#f0f7f4!important}
.hh-inbox-row strong{font-size:13px;overflow-wrap:anywhere;font-weight:600}
.hh-inbox-row time{font-size:11px;color:#778f89;white-space:nowrap}
.hh-inbox-from{font-size:12px;white-space:nowrap;text-overflow:ellipsis;overflow:hidden}
.hh-unread-dot{width:8px;height:8px;border-radius:50%;background:#bb342a;display:block}
.hh-inbox-message-body{padding:17px 19px;background:#fbfdfc;border-top:1px solid #d8e8e1}
.hh-inbox-message-body p{margin:0 0 14px;white-space:normal}
.hh-inbox-message-body form{display:flex;gap:10px;flex-wrap:wrap;align-items:end}
.hh-inbox-message-body form label{max-width:300px;margin:0}
.hh-inbox-empty{padding:24px;color:#6c817b}
.hh-inbox-pagination,.hh-homework-pages{display:flex;gap:16px;align-items:center;justify-content:center;padding:15px}
.hh-inbox-pagination span,.hh-homework-pages span{font-size:12px;color:#6b837e}
.top-feedback-link{display:inline-flex;gap:5px;align-items:center;padding:7px 10px;border:1px solid rgba(225,246,243,.3);border-radius:9px;position:relative;white-space:nowrap;text-decoration:none;font-size:13px}
/* Hausaufgaben: von max. 150 langen Karten zu kurzen, gefilterten Listen */
.hh-homework-tabs{display:flex!important;gap:8px!important;flex-wrap:wrap;margin:0 0 15px}
.hh-homework-tabs a{padding:9px 13px;border:1px solid #bfd6d0;border-radius:8px;background:white;text-decoration:none;font-size:13px;font-weight:650}
.hh-homework-tabs a.active{background:#245e5e;color:white;border-color:#245e5e}
.hh-homework-filters form{display:flex;flex-wrap:wrap;gap:10px;align-items:end}
.hh-homework-filters form label{min-width:180px;flex:1;margin:0}
.hh-homework-table-wrap{overflow-x:auto}
.hh-homework-accordion{border:1px solid #dce6e2;border-radius:9px;margin-bottom:9px;padding:11px 14px}
.hh-homework-accordion summary{font-size:13px;font-weight:550}
.hh-homework-accordion>form{margin-top:16px}
@media(max-width:800px){.hh-inbox-layout{grid-template-columns:1fr}.hh-inbox-folders{flex-flow:row wrap!important}.hh-inbox-folders a{padding:7px 9px}}
@media(max-width:600px){.hh-inbox-row{grid-template-columns:minmax(100px,1fr) auto 10px;gap:6px}.hh-inbox-row strong{grid-column:1/-1;grid-row:2}.hh-inbox-row time{grid-column:2}.hh-inbox-from{grid-column:1}.hh-unread-dot{grid-column:3}}
