.student-join-banner{position:sticky;top:0;z-index:3;display:flex;align-items:center;gap:18px;padding:16px;margin:0 0 20px;border:2px solid #1763db;border-radius:16px;background:#eef6ff;box-shadow:0 5px 16px #1763db20}.student-join-banner button{font-size:21px;min-height:56px;padding:14px 30px;white-space:nowrap}.student-join-banner span{color:#173763;font-size:14px}@media(max-width:600px){.student-join-banner{flex-direction:column;align-items:stretch;gap:8px}.student-join-banner button{width:100%}}
.recording-controls{display:flex;flex-wrap:wrap;gap:8px;align-items:center;margin:8px 0}.recording-controls audio{max-width:100%;height:36px}.recording-preview{max-width:160px;max-height:120px;object-fit:contain}.chat-attachment{display:block;margin:6px 0}.chat-attachment img{max-width:200px;max-height:180px;object-fit:contain}.chat-attachment audio{max-width:230px;height:38px}

/* Familiar chat media composer, shared by classroom and floating conversations. */
.wa-composer{background:#f0f2f5!important;border:1px solid #d9e1df!important;border-radius:22px!important;padding:12px!important;gap:8px!important;position:relative}
.wa-composer textarea{background:#fff!important;border:0!important;border-radius:22px!important;min-height:44px!important;max-height:120px;padding:12px 16px!important;resize:vertical;box-shadow:none!important}
.wa-composer .recording-controls{margin:0;gap:8px;width:100%}.wa-composer .recording-controls>label,.wa-composer [data-record-start],.wa-composer .wa-send{display:inline-flex!important;justify-content:center;align-items:center;width:44px;height:44px;border-radius:50%!important;padding:0!important;font-size:24px!important;border:0!important;cursor:pointer}
.wa-composer [data-record-start],.wa-composer .wa-send{background:#008069!important;color:#fff!important}.wa-composer .recording-controls>label{background:#fff!important;color:#54656f!important;font-size:30px!important}
.wa-composer button:hover,.wa-composer .recording-controls>label:hover{filter:brightness(.94)}.wa-composer button:focus-visible,.wa-composer label:focus-within{outline:3px solid #53bdeb;outline-offset:3px}
.wa-composer [data-record-status]{flex:1 1 100%;color:#667781;font-size:11px}.wa-composer [data-media-preview]{display:flex;gap:8px;flex-wrap:wrap;width:100%}.wa-preview-card{position:relative;background:#d9fdd3;border-radius:14px;padding:10px 30px 10px 10px;max-width:100%}.wa-preview-card>button{position:absolute;right:3px;top:3px;border:0;border-radius:50%;background:#fff;color:#37474f;width:24px;height:24px;cursor:pointer}.wa-preview-card img{border-radius:9px;max-height:160px;max-width:220px}.wa-preview-card audio{width:240px;max-width:100%}
.wa-recording [data-record-status]{color:#d44343;font-weight:700;font-size:16px}.wa-recording [data-record-stop]{background:#008069!important;color:#fff!important;border-radius:24px!important}.wa-recording [data-record-cancel]{color:#c53232!important}.wa-recording .wa-send{opacity:.45}.wa-composer [hidden]{display:none!important}
@media(max-width:480px){.wa-preview-card audio{width:195px}.wa-composer{padding:9px!important}.wa-composer .recording-controls{gap:6px}}

/* Keep chat composition in one row at narrow phone/popup widths. */
form.wa-composer{display:block!important;border-radius:0!important;border:0!important;padding:8px!important;margin:0!important;min-width:0!important}
.wa-composer .wa-input-row{display:flex!important;align-items:center!important;gap:8px;width:100%;min-width:0}
.wa-composer .wa-input{display:block!important;flex:1 1 0!important;width:0!important;min-width:0!important;margin:0!important;font-size:0!important}
.wa-composer .wa-input textarea{box-sizing:border-box!important;width:100%!important;min-width:0!important;min-height:44px!important;height:44px;max-height:110px!important;margin:0!important;font:14px/20px Arial,sans-serif!important;resize:none!important;padding:12px 15px!important}
.wa-composer .wa-input-row>label[role=button]{flex:0 0 36px;display:flex;align-items:center;justify-content:center;width:36px;height:42px;margin:0;color:#54656f;cursor:pointer}
.wa-composer .wa-input-row>button{flex:0 0 44px!important;margin:0!important;width:44px!important;height:44px!important;min-width:44px!important}
.wa-composer .recording-controls{display:flex!important;flex-wrap:wrap!important;padding:0!important;margin:0!important;border:0!important;min-width:0!important}
.wa-composer [data-record-status]:empty{display:none!important}.wa-composer .wa-limits{width:100%;font-size:10px;color:#667781;margin-top:3px}.wa-composer .wa-limits summary{cursor:pointer;list-style:none;text-align:center;opacity:.8}.wa-composer .wa-limits small{display:block;padding:8px}
.wa-composer:not(.wa-has-media) [data-media-preview]{display:none!important}.wa-composer.wa-recording .wa-input-row{display:none!important}.wa-composer.wa-recording .recording-controls{min-height:44px;align-items:center}.wa-composer.wa-recording [data-record-status]{flex:1 1 auto!important;width:auto!important;margin:0}.wa-composer.wa-recording .wa-limits{display:none!important}.wa-composer .wa-input-row>[hidden],.wa-composer .recording-controls>[hidden]{display:none!important}
body:has(.portal-chat-panel) #aal-floating-ai{display:none!important}

.wa-media-bubble{display:flex;align-items:center;gap:8px;max-width:100%;padding:4px 0;position:relative;min-width:0}.wa-voice-note{width:280px;height:46px}.wa-media-play{border:0!important;background:transparent!important;color:#54656f!important;width:32px!important;height:32px!important;min-width:32px!important;padding:0!important;font-size:22px!important;cursor:pointer}.wa-media-label{font-size:12px;color:#54656f}.wa-wave{font-size:18px;letter-spacing:1px;color:#93a6a0;white-space:nowrap;overflow:hidden;flex:1;line-height:1}.wa-duration{font-size:11px;color:#667781}.wa-media-bubble input[type=range]{width:110px;min-width:30px;flex:1;accent-color:#008069;height:20px}.wa-media-menu{margin-left:auto;flex:0 0 18px}.wa-media-menu summary{list-style:none;cursor:pointer;font-size:22px;color:#667781}.wa-media-menu>div{position:absolute;z-index:5;right:0;top:40px;width:220px;background:#fff;padding:10px;box-shadow:0 2px 12px #0003;border-radius:8px}.wa-media-menu small{display:block;font-size:10px;overflow-wrap:anywhere;margin-top:5px}.wa-photo-note{flex-wrap:wrap;width:240px}.wa-shared-photo{width:100%;max-height:240px;object-fit:contain;border-radius:8px}.portal-chat-history article:has(.wa-media-bubble){padding:8px 12px!important;width:fit-content;max-width:90%!important}.wa-media-bubble audio{display:none!important}


.portal-chat-history article.portal-message-sent,.portal-chat-history article.portal-message-received{position:relative;padding:6px 10px!important;margin:3px 0!important;border-radius:8px!important;max-width:82%!important;font-size:13px!important;line-height:1.35!important;box-shadow:0 1px 1px #0001!important}
.portal-chat-history article p{margin:3px 0!important;line-height:1.35!important;font-size:13px!important;overflow-wrap:anywhere}.portal-chat-history article>strong{font-size:11px!important}.portal-chat-history article>small{font-size:10px!important}.portal-chat-history article>.chat-avatar{width:22px!important;height:22px!important;font-size:11px!important}.portal-chat-history article:has(.wa-media-bubble){padding:5px 8px!important}.wa-voice-note{width:230px;height:34px;gap:5px}.wa-media-label{font-size:11px}.wa-wave{font-size:14px;letter-spacing:0}.wa-media-play{font-size:18px!important;width:28px!important;height:28px!important;min-width:28px!important}.wa-duration{font-size:10px}.wa-photo-note{width:190px}.wa-shared-photo{max-height:190px}.wa-quote{margin:3px 0;padding:5px 8px;border:0;border-inline-start:3px solid #008069;border-radius:4px;background:#00806912;max-width:240px;font-size:11px;line-height:1.3}.wa-quote b,.wa-quote span{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.wa-quote b{color:#008069;font-size:11px}.wa-reply-action{border:0;background:transparent;color:#667781;font-size:16px;cursor:pointer;padding:1px 5px;float:inline-end}.wa-reply-preview{display:flex;gap:5px;align-items:center;margin-bottom:5px}.wa-reply-preview .wa-quote{flex:1;max-width:none}.wa-reply-preview button{border:0;background:transparent;color:#667781;cursor:pointer;font-size:20px}.portal-chat-date{font-size:10px!important;padding:3px 6px!important;margin:4px auto!important}

.portal-chat-history article.portal-message-sent,.portal-chat-history article.portal-message-received{padding:4px 8px!important;margin:2px 0!important;max-width:75%!important;min-width:0!important;width:fit-content!important;line-height:1.25!important}.portal-chat-history article .wa-message-text{font-size:12px!important;line-height:1.3!important;margin:2px 0!important;white-space:pre-wrap;overflow-wrap:anywhere}.wa-message-text.wa-folded{display:-webkit-box!important;-webkit-box-orient:vertical;-webkit-line-clamp:4;overflow:hidden!important;max-height:5.2em}.wa-read-more{display:block;border:0;background:transparent;padding:1px 0;color:#087f8c;font-size:11px;cursor:pointer}.portal-chat-history article>strong{font-size:10px!important}.portal-chat-history article>small{font-size:9px!important}.wa-quote{padding:3px 6px!important;margin:2px 0!important}.portal-chat-history{gap:2px!important}

/* Reduce bubble HEIGHT: no avatar row, compact header, inline timestamp. */
.portal-chat-history article.portal-message{position:relative!important;display:block!important;padding:4px 8px 14px!important;margin:2px 0!important;min-height:0!important;max-width:90%!important;width:fit-content!important;line-height:1.2!important}
.portal-chat-history article.portal-message>.portal-chat-avatar{display:none!important}
.portal-chat-history article.portal-message>strong{display:block!important;margin:0 20px 1px 0!important;font-size:10px!important;line-height:12px!important}
.portal-chat-history article.portal-message>p{margin:0!important;font-size:13px!important;line-height:16px!important;min-height:0!important}
.portal-chat-history article.portal-message>small:last-of-type{position:absolute!important;bottom:2px!important;right:24px!important;margin:0!important;padding:0!important;font-size:9px!important;line-height:10px!important;display:inline-flex!important;align-items:center!important;gap:2px!important}
.portal-chat-history article.portal-message .wa-reply-action{position:absolute;bottom:0;right:2px;margin:0!important;padding:0 2px!important;font-size:13px!important;line-height:14px!important;height:14px!important}
.portal-chat-history article.portal-message .portal-delete-message{position:absolute!important;top:1px!important;right:2px!important;width:16px!important;height:16px!important;min-height:0!important;padding:0!important;font-size:12px!important;line-height:14px!important}
.portal-chat-history article.portal-message .wa-voice-note{height:28px!important;padding:0!important;margin:0!important;width:240px!important;gap:5px!important}
.portal-chat-history article.portal-message .wa-media-play{height:26px!important;width:26px!important;min-height:0!important;line-height:26px!important}
.portal-chat-history article.portal-message .wa-quote{margin:2px 0!important;padding:2px 6px!important;line-height:12px!important}

.account-loading{min-height:70vh;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:14px;color:#155dcc;font:15px Arial,sans-serif}.account-loading-spinner{width:32px;height:32px;border:3px solid #e1ebfa;border-top-color:#155dcc;border-radius:50%;animation:account-spin .8s linear infinite}@keyframes account-spin{to{transform:rotate(360deg)}}@media(prefers-reduced-motion:reduce){.account-loading-spinner{animation:none}}


.wa-call-card{display:flex;align-items:center;gap:9px;padding:5px 2px;min-width:170px;max-width:240px}.wa-call-card>span:first-child{display:flex;align-items:center;justify-content:center;border-radius:50%;width:32px;height:32px;background:#00806915;color:#008069;font-size:23px}.wa-call-card b{font-size:12px;line-height:16px;display:block}.wa-call-card small{font-size:10px;color:#667781;display:block}.wa-call-missed b,.wa-call-missed>span:first-child{color:#d34444}.wa-call-open{font-size:11px;color:#008069;margin-inline-start:auto}


.payment-summary-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(170px,1fr));gap:12px}.payment-summary-grid article{padding:16px;border:1px solid #dbe7f8;border-radius:12px;background:#f6faff}.payment-summary-grid strong{display:block;font-size:20px;margin-top:6px}.payment-summary-grid small{color:#53647c}.payment-chart{display:flex;gap:8px;overflow-x:auto;padding:20px 8px 8px;border-bottom:1px solid #dbe7f8}.payment-chart-month{flex:1;min-width:30px;text-align:center}.payment-bars{height:125px;display:flex;gap:3px;align-items:flex-end;justify-content:center}.payment-bars span{display:block;width:12px;border-radius:3px 3px 0 0;background:#008069}.payment-bars .payment-expense{background:#2563eb}.payment-bars .negative{background:#d34444}

.p4-shell{max-width:940px;margin:auto;padding:24px}.p4-shell .a-card{margin:18px 0;padding:24px}.p4-shell audio{display:block;max-width:100%;margin:12px 0}.p4-shell fieldset{border:1px solid #dbe7f8;border-radius:10px;padding:14px;margin:16px 0}.p4-shell .p4-option{display:flex;align-items:flex-start;gap:10px;min-height:44px;box-sizing:border-box;padding:10px 12px;margin:4px 0;cursor:pointer;line-height:1.5;border-radius:8px}.p4-shell .p4-option input[type=radio]{display:block;flex:0 0 18px;width:18px;min-width:18px;height:18px;padding:0;margin:3px 0 0;accent-color:#155dcc}.p4-shell .p4-option span{flex:1;min-width:0;overflow-wrap:anywhere}.p4-shell .p4-option:hover{background:#f0f6ff}.p4-shell .p4-option:focus-within{outline:2px solid #155dcc;outline-offset:1px}.p4-shell fieldset{direction:ltr;text-align:start}.p4-passage{background:#f0f6ff;padding:18px;border-radius:10px;line-height:1.8}.p4-navigation{display:flex;justify-content:space-between;gap:10px;margin:24px 0}.p4-shell [role=status]{color:#b42318}.p4-shell label select{display:block;padding:10px}.p4-shell textarea{border:1px solid #adc5e5;border-radius:10px;padding:12px;font:16px/1.6 Arial,sans-serif}
.p4-shell .p4-record-icon{display:inline-flex;align-items:center;justify-content:center;width:48px;height:48px;padding:0!important;border-radius:50%!important;min-width:48px;cursor:pointer;background:#008069!important;color:#fff!important;border:0!important;margin:5px}.p4-shell .p4-record-icon[data-p4-action="stop"]{background:#b42318!important}.p4-shell .p4-record-icon[hidden]{display:none!important}.p4-shell .p4-record-icon:focus-visible{outline:3px solid #53bdeb;outline-offset:3px}.p4-shell .p4-voice-preview{width:280px;height:40px;max-width:100%;margin:10px 0}.p4-shell #p4-autosave-status{display:block;color:#52647d;margin:8px 0}

.p4-shell .p4-record-icon.p4-record-again{width:auto;max-width:100%;padding:0 16px!important;border-radius:24px!important;gap:8px;font-size:14px;white-space:nowrap}
