/* Portal-only responsive refinements. Public website styles are not changed. */
.portal-eyebrow{font-size:.72rem;letter-spacing:.13em;font-weight:800;color:var(--portal-blue);margin:12px 0 7px}
.portal-intro{font-size:.94rem;line-height:1.55;margin:0 0 18px}
.portal-login-form{margin-top:18px}
.portal-login-card{padding:clamp(22px,5vw,36px);border-radius:20px}
.portal-login-brand h1{line-height:1.2}
.portal-login-card h2{text-align:left;font-size:1.35rem;margin-top:12px}
.portal-login-card>.portal-intro{text-align:left}
.portal-field{margin:16px 0}
.portal-field input{min-height:48px}
.portal-login-btn{min-height:49px;border-radius:12px;font-weight:800}
.portal-login-btn:disabled{opacity:.68;cursor:wait}
.portal-status{margin-top:12px;padding:0;color:var(--portal-muted);font-size:.92rem;line-height:1.45;overflow-wrap:anywhere}
.portal-status:not(:empty){padding:10px 12px;border-radius:10px;background:#f1f5f9}
.portal-status.portal-error,.portal-status.danger{color:#991b1b;background:#fef2f2;border:1px solid #fecaca}
.portal-status.portal-success,.portal-status.success{color:#166534;background:#f0fdf4;border:1px solid #bbf7d0}
.field-error{display:block;color:#b91c1c;font-size:.82rem;margin-top:5px}
.portal-help{line-height:1.55}
.portal-dashboard-intro{margin:0 0 20px}
.portal-dashboard-intro h2{margin:3px 0 6px}
.portal-dashboard-intro>p:last-child{color:var(--portal-muted);margin:0}
.portal-static-grid{gap:20px;align-items:start}
.portal-static-sidebar{position:sticky;top:14px;max-height:calc(100vh - 28px);overflow:auto;padding:10px;background:#fff;border:1px solid var(--portal-border);border-radius:16px}
.portal-static-sidebar button,.portal-mobile-nav button{width:100%;text-align:left;border:0;border-radius:10px;padding:11px 12px;background:transparent;color:var(--portal-text);font:inherit;cursor:pointer}
.portal-static-sidebar button:hover,.portal-mobile-nav button:hover{background:#eff6ff}
.portal-static-sidebar button.active,.portal-mobile-nav button.active{background:var(--portal-navy);color:#fff;font-weight:750}
.portal-mobile-nav{display:flex;gap:8px;overflow-x:auto;padding:4px 0 12px}
.portal-mobile-nav button{white-space:nowrap;width:auto;flex:0 0 auto;background:#fff;border:1px solid var(--portal-border)}
.portal-static-main{min-width:0}
.portal-page button:focus-visible,.portal-page a:focus-visible,.portal-page input:focus-visible,.portal-page select:focus-visible,.portal-page textarea:focus-visible{outline:3px solid #93c5fd;outline-offset:2px}
@media(max-width:760px){.portal-login{padding:14px}.portal-login-card{padding:22px 18px}.portal-static-header{padding:13px 14px}.portal-static-grid{display:block}.portal-static-sidebar{display:none}.portal-dashboard-body{width:calc(100% - 24px);padding-top:16px}.portal-mobile-nav{margin-bottom:8px}.portal-static-header .btn{padding:9px 11px;white-space:nowrap}}


/* Admin CRUD dialogs and management controls (portal pages only). */
.portal-page .modal-backdrop{position:fixed;inset:0;z-index:10000;display:flex;align-items:center;justify-content:center;padding:16px;background:rgba(15,23,42,.62);overflow:auto}
.portal-page .modal-card{width:min(100%,720px);max-height:min(90vh,900px);overflow:auto;background:#fff;color:var(--portal-text);border-radius:18px;padding:22px;box-shadow:0 24px 80px rgba(15,23,42,.28)}
.portal-page .modal-card .section-head{display:flex;align-items:center;justify-content:space-between;gap:14px;border-bottom:1px solid var(--portal-border);padding-bottom:12px;margin-bottom:16px}
.portal-page .modal-card .section-head h2{margin:0;font-size:1.25rem}
.portal-page .modal-card .icon-btn{border:1px solid var(--portal-border);border-radius:9px;background:#fff;padding:8px 11px;cursor:pointer}
.portal-page .form-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}
.portal-page .form-grid .field{display:flex;flex-direction:column;gap:7px;font-weight:650;color:#334155;min-width:0}
.portal-page .form-grid .field input:not([type=checkbox]),.portal-page .form-grid .field select,.portal-page .form-grid .field textarea{width:100%;box-sizing:border-box;border:1px solid #cbd5e1;border-radius:9px;padding:11px 12px;font:inherit;font-weight:400;color:var(--portal-text);background:#fff}
.portal-page .form-grid .field input[type=checkbox]{margin-right:8px}
.portal-page .form-grid .field:has(input[type=checkbox]){flex-direction:row;align-items:center;grid-column:1/-1}
.portal-page .form-actions{grid-column:1/-1;display:flex;justify-content:flex-end;gap:10px;margin-top:8px}
.portal-page .portal-table-wrap td button{margin:2px 3px 2px 0;white-space:nowrap}
.portal-page .portal-table-wrap td select{max-width:150px;min-width:105px;border:1px solid #cbd5e1;border-radius:7px;padding:7px;background:#fff}
.portal-page #table-search{width:100%;box-sizing:border-box;border:1px solid #cbd5e1;border-radius:10px;padding:11px 12px;margin:5px 0 12px}
.portal-page .portal-error{margin:12px 0;padding:13px;border-radius:10px;color:#991b1b;background:#fef2f2;border:1px solid #fecaca;overflow-wrap:anywhere}
.portal-page .portal-error p{margin:7px 0}
@media(max-width:620px){.portal-page .modal-card{padding:16px}.portal-page .form-grid{grid-template-columns:1fr}.portal-page .form-actions{flex-direction:column-reverse}.portal-page .form-actions button{width:100%}.portal-page .portal-section-heading>div:last-child{display:flex;flex-wrap:wrap;gap:8px}}


/* Admin navigation: use the sidebar only on desktop and mobile. */
.portal-page .portal-mobile-nav{display:none!important}
.portal-page .portal-static-sidebar{display:flex;flex-direction:column;gap:4px}
@media(max-width:760px){.portal-page .portal-static-sidebar{display:flex;position:static;max-height:none;overflow:visible;margin:0 0 16px;padding:8px}.portal-page .portal-static-sidebar button{width:100%;text-align:left}.portal-page .portal-static-grid{display:block}.portal-page .portal-static-main{width:100%}}

/* Clear parent/teacher messaging access; portal-only styles. */
.portal-head-actions{display:flex;align-items:center;gap:10px;flex-wrap:wrap}
.portal-message-link{display:inline-flex;align-items:center;justify-content:center;gap:6px;min-height:42px;padding:9px 13px;border-radius:11px;background:#eaf2ff;color:#17375e;text-decoration:none;font-weight:850;border:1px solid #cfe0fb;white-space:nowrap}
.portal-message-link:hover,.portal-message-link:focus-visible{background:#dbeafe;outline:2px solid #93c5fd;outline-offset:2px}
@media(max-width:620px){.portal-head-actions{gap:6px}.portal-message-link{min-height:44px;padding:9px 10px;font-size:.85rem}.portal-static-header .inner{gap:10px;flex-wrap:wrap}.portal-static-header .portal-brand{min-width:0;flex:1}.portal-static-header .portal-brand h1{font-size:1.05rem}}


/* High-contrast actions across every administrator and teacher portal tab. */
.portal-page .btn,.portal-page button.btn{opacity:1!important;filter:none!important;text-shadow:none!important;font-weight:800!important;visibility:visible!important}
.portal-page .portal-table-wrap td .btn,.portal-page .portal-table-wrap td button,.portal-page [data-action],.portal-page [data-del]{display:inline-flex!important;align-items:center!important;justify-content:center!important;min-height:34px!important;padding:7px 11px!important;margin:3px 5px 3px 0!important;border:1px solid #64748b!important;border-radius:7px!important;background:#fff!important;color:#17375e!important;-webkit-text-fill-color:#17375e!important;box-shadow:0 1px 2px rgba(15,23,42,.12)!important;opacity:1!important;filter:none!important;white-space:nowrap!important;font-size:13px!important;line-height:1.2!important}
.portal-page .portal-table-wrap td .btn:hover,.portal-page .portal-table-wrap td button:hover,.portal-page [data-action]:hover,.portal-page [data-del]:hover{background:#eff6ff!important;border-color:#1d4ed8!important;color:#1d4ed8!important;-webkit-text-fill-color:#1d4ed8!important}
.portal-page .portal-table-wrap td .danger-btn,.portal-page .portal-table-wrap td button[data-action="delete"],.portal-page .portal-table-wrap td button[data-action="payment-reject"],.portal-page .portal-table-wrap td button[data-del]{background:#fff1f2!important;color:#b91c1c!important;-webkit-text-fill-color:#b91c1c!important;border-color:#fda4af!important}
.portal-page .portal-table-wrap td .navy-btn,.portal-page .portal-table-wrap td button[data-action="payment-confirm"]{background:#17375e!important;color:#fff!important;-webkit-text-fill-color:#fff!important;border-color:#17375e!important}
.portal-page .portal-table-wrap td .btn:disabled,.portal-page .portal-table-wrap td button:disabled{opacity:.8!important;cursor:not-allowed!important}

/* High-contrast action controls across every portal table, including legacy table wrappers. */
.portal-page button[data-action="edit"],
.portal-page button[data-action="delete"],
.portal-page button[data-action="payment-confirm"],
.portal-page button[data-action="payment-reject"],
.portal-page button[data-edit-subject],
.portal-page button[data-del],
.portal-page .data-table button[data-action],
.portal-page .data-table button[data-edit-subject],
.portal-page .data-table button[data-del],
.portal-page .table-wrap button[data-action],
.portal-page .table-wrap button[data-edit-subject],
.portal-page .table-wrap button[data-del],
.portal-page .portal-table-wrap button[data-action],
.portal-page .portal-table-wrap button[data-edit-subject],
.portal-page .portal-table-wrap button[data-del]{
  display:inline-flex!important;align-items:center!important;justify-content:center!important;
  min-height:36px!important;padding:7px 12px!important;margin:3px 5px 3px 0!important;
  border:1px solid #64748b!important;border-radius:8px!important;background:#fff!important;
  color:#17375e!important;-webkit-text-fill-color:#17375e!important;opacity:1!important;
  filter:none!important;backdrop-filter:none!important;text-shadow:none!important;
  box-shadow:0 1px 3px rgba(15,23,42,.18)!important;font-weight:800!important;
  font-size:13px!important;line-height:1.25!important;white-space:nowrap!important;
  visibility:visible!important;transform:none!important;
}
.portal-page button[data-action="delete"],
.portal-page button[data-action="payment-reject"],
.portal-page button[data-del],
.portal-page .data-table button[data-del],
.portal-page .table-wrap button[data-del],
.portal-page .portal-table-wrap button[data-del]{
  background:#fff1f2!important;color:#b91c1c!important;-webkit-text-fill-color:#b91c1c!important;border-color:#fda4af!important;
}
.portal-page button[data-action="payment-confirm"]{background:#17375e!important;color:#fff!important;-webkit-text-fill-color:#fff!important;border-color:#17375e!important}
.portal-page button[data-action="edit"]:hover,
.portal-page button[data-edit-subject]:hover,
.portal-page button[data-action="delete"]:hover,
.portal-page button[data-del]:hover{filter:brightness(.97)!important;box-shadow:0 2px 5px rgba(15,23,42,.22)!important}
.portal-page button[data-action]:disabled,
.portal-page button[data-edit-subject]:disabled,
.portal-page button[data-del]:disabled{opacity:.75!important;cursor:not-allowed!important}

/* Compact notification controls in the parent and teacher portal headers. */
.portal-page .portal-notification-button,
.portal-page #enable-browser-notifications{display:inline-flex!important;align-items:center!important;justify-content:center!important;min-height:36px!important;padding:7px 11px!important;border:1px solid rgba(255,255,255,.8)!important;border-radius:9px!important;background:#17375e!important;color:#fff!important;-webkit-text-fill-color:#fff!important;opacity:1!important;filter:none!important;white-space:nowrap!important;font-size:12px!important;font-weight:800!important}
.portal-page .portal-dashboard-header .portal-head-row{gap:10px;flex-wrap:wrap}
.portal-page .portal-dashboard-header .portal-head-row #enable-parent-browser-notifications,
.portal-page .portal-dashboard-header .portal-head-row #enable-teacher-browser-notifications{flex:0 0 auto}
@media(max-width:520px){.portal-page .portal-dashboard-header .portal-head-row{align-items:flex-start}.portal-page .portal-notification-button{max-width:100%;font-size:11px!important;padding:7px 9px!important}}


/* Final high-contrast override: keep Edit/Delete actions readable in every portal tab and table wrapper. */
.portal-page button[data-action="edit"],
.portal-page button[data-action="delete"],
.portal-page button[data-action="payment-confirm"],
.portal-page button[data-action="payment-reject"],
.portal-page button[data-edit-subject],
.portal-page button[data-del]{
  display:inline-flex!important;align-items:center!important;justify-content:center!important;
  opacity:1!important;visibility:visible!important;filter:none!important;
  backdrop-filter:none!important;-webkit-backdrop-filter:none!important;
  text-shadow:none!important;transform:none!important;
  font-weight:800!important;line-height:1.25!important;
}
.portal-page button[data-action="edit"],
.portal-page button[data-edit-subject]{background:#fff!important;color:#17375e!important;-webkit-text-fill-color:#17375e!important;border:1px solid #64748b!important}
.portal-page button[data-action="delete"],
.portal-page button[data-del],
.portal-page button[data-action="payment-reject"]{background:#fff1f2!important;color:#b91c1c!important;-webkit-text-fill-color:#b91c1c!important;border:1px solid #fda4af!important}
.portal-page button[data-action="payment-confirm"]{background:#17375e!important;color:#fff!important;-webkit-text-fill-color:#fff!important;border:1px solid #17375e!important}


/* Legacy admin action buttons: explicit, high-contrast styling for every management tab. */
.portal-page button[class*="edit-"],
.portal-page button[data-action="edit"],
.portal-page button[data-edit-subject]{
  display:inline-flex!important;align-items:center!important;justify-content:center!important;
  min-height:36px!important;padding:7px 12px!important;margin:3px 5px 3px 0!important;
  background:#fff!important;color:#17375e!important;-webkit-text-fill-color:#17375e!important;
  border:2px solid #64748b!important;border-radius:8px!important;
  opacity:1!important;visibility:visible!important;filter:none!important;
  -webkit-filter:none!important;backdrop-filter:none!important;-webkit-backdrop-filter:none!important;
  text-shadow:none!important;box-shadow:0 2px 4px rgba(15,23,42,.2)!important;
  font-weight:800!important;font-size:13px!important;line-height:1.25!important;
}
.portal-page button[class*="delete-"],
.portal-page button[data-action="delete"],
.portal-page button[data-del]{
  display:inline-flex!important;align-items:center!important;justify-content:center!important;
  min-height:36px!important;padding:7px 12px!important;margin:3px 5px 3px 0!important;
  background:#fff1f2!important;color:#b91c1c!important;-webkit-text-fill-color:#b91c1c!important;
  border:2px solid #fda4af!important;border-radius:8px!important;
  opacity:1!important;visibility:visible!important;filter:none!important;
  -webkit-filter:none!important;backdrop-filter:none!important;-webkit-backdrop-filter:none!important;
  text-shadow:none!important;box-shadow:0 2px 4px rgba(127,29,29,.16)!important;
  font-weight:800!important;font-size:13px!important;line-height:1.25!important;
}
.portal-page button[class*="edit-"]:hover,
.portal-page button[data-action="edit"]:hover,
.portal-page button[data-edit-subject]:hover{background:#eff6ff!important;border-color:#1d4ed8!important}
.portal-page button[class*="delete-"]:hover,
.portal-page button[data-action="delete"]:hover,
.portal-page button[data-del]:hover{background:#ffe4e6!important;border-color:#e11d48!important}


/* Final high-contrast edit/delete actions for every admin and teacher tab. */
.portal-page button[data-action="edit"],
.portal-page button[data-edit-subject],
.portal-page button[class*="edit-"],
.portal-page .data-table button[data-action="edit"],
.portal-page .table-wrap button[data-action="edit"],
.portal-page .portal-table-wrap button[data-action="edit"] {
  background: #2563eb !important;
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
  border: 1px solid #1d4ed8 !important;
  opacity: 1 !important;
  visibility: visible !important;
  filter: none !important;
  -webkit-filter: none !important;
  backdrop-filter: none !important;
  text-shadow: none !important;
  box-shadow: 0 1px 3px rgba(29, 78, 216, .25) !important;
  font-weight: 800 !important;
}
.portal-page button[data-action="delete"],
.portal-page button[data-del],
.portal-page button[class*="delete-"],
.portal-page .data-table button[data-action="delete"],
.portal-page .table-wrap button[data-action="delete"],
.portal-page .portal-table-wrap button[data-action="delete"] {
  background: #dc2626 !important;
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
  border: 1px solid #b91c1c !important;
  opacity: 1 !important;
  visibility: visible !important;
  filter: none !important;
  -webkit-filter: none !important;
  backdrop-filter: none !important;
  text-shadow: none !important;
  box-shadow: 0 1px 3px rgba(185, 28, 28, .25) !important;
  font-weight: 800 !important;
}
.portal-page button[data-action="edit"]:hover,
.portal-page button[data-edit-subject]:hover,
.portal-page button[class*="edit-"]:hover { background:#1d4ed8 !important; }
.portal-page button[data-action="delete"]:hover,
.portal-page button[data-del]:hover,
.portal-page button[class*="delete-"]:hover { background:#b91c1c !important; }
.portal-page button[data-action="edit"]:disabled,
.portal-page button[data-action="delete"]:disabled,
.portal-page button[data-edit-subject]:disabled,
.portal-page button[data-del]:disabled {
  opacity: .85 !important;
  cursor: not-allowed !important;
}

/* Mobile-first parent/teacher messaging refinements */
@media(max-width:680px){
 .dashboard-shell{width:calc(100% - 20px);max-width:100%;margin-left:auto;margin-right:auto}
 .portal-dashboard-header{padding:16px 12px}
 .portal-head-row{display:flex;align-items:flex-start;flex-wrap:wrap;gap:10px}
 .portal-head-row>div{min-width:0;flex:1 1 100%}
 .portal-head-row .btn{min-height:44px;max-width:100%;white-space:normal}
 .portal-head-row #logout{margin-left:auto}
 .dashboard-grid,.dashboard-grid.two-col,.dashboard-grid.three-col,.admin-card-grid,.advanced-grid,.advanced-wrap .advanced-grid{grid-template-columns:minmax(0,1fr)!important}
 .dashboard-card{min-width:0;padding:14px;border-radius:14px;margin-bottom:12px;overflow-wrap:anywhere}
 .dashboard-card .section-head{align-items:flex-start;gap:10px;flex-wrap:wrap}
 .dashboard-card .section-head>div{min-width:0;flex:1 1 100%}
 .form-grid{grid-template-columns:minmax(0,1fr)!important;gap:12px}
 .form-grid>*{min-width:0;max-width:100%}
 .form-grid input,.form-grid select,.form-grid textarea,.inline-form input,.inline-form select{box-sizing:border-box;width:100%;min-width:0;max-width:100%;font-size:16px}
 .form-actions{display:flex;flex-wrap:wrap;gap:8px}
 .form-actions .btn,.form-grid>.btn{min-height:44px}
 .stats{grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}
 .stat{padding:12px;min-width:0}
 .stat strong{font-size:clamp(18px,5vw,25px);overflow-wrap:anywhere}
 .cards.three,.cards.two{grid-template-columns:minmax(0,1fr)!important}
 .table-wrap,.table-responsive{max-width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch}
 .data-table{min-width:620px}
 .parent-chat-row,.teacher-chat-row{align-items:flex-start;flex-wrap:wrap}
 .parent-chat-row .btn,.teacher-chat-row .btn{width:100%;min-height:44px}
 .admin-chat-preview{display:grid;grid-template-columns:38px minmax(0,1fr);gap:10px;padding:12px}
 .admin-chat-avatar{width:38px;height:38px;flex-basis:38px}
 .admin-chat-preview-main{grid-column:2;grid-row:1}
 .admin-chat-preview .open-admin-chat{grid-column:1/-1;width:100%;min-height:44px}
 .admin-chat-preview-head{flex-direction:column;gap:3px}
 .admin-chat-preview-head small{text-align:left}
 .admin-chat-history{max-height:52dvh;padding:9px}
 .admin-chat-bubble{max-width:94%}
 .admin-chat-compose{grid-template-columns:minmax(0,1fr) auto}
 .admin-chat-compose button{padding:0 12px}
 .modal-backdrop{align-items:flex-end;padding:0}
 .modal-card{width:100%;max-width:none;max-height:92dvh;overflow-y:auto;border-radius:20px 20px 0 0;padding:18px 14px calc(18px + env(safe-area-inset-bottom))}
}
@media(max-width:380px){
 .stats{grid-template-columns:minmax(0,1fr)}
 .portal-head-row #logout{margin-left:0}
 .admin-chat-compose{grid-template-columns:minmax(0,1fr)}
 .admin-chat-compose button{width:100%}
}

@media(max-width:680px){
 .admin-chat-preview .open-admin-conversation{grid-column:1/-1;width:100%;min-height:44px}
}


/* Focused mobile polish for parent and teacher portals; leave other portal content unchanged. */
@media(max-width:680px){
  body.portal-page[data-role="parent"] .portal-dashboard-body,
  body.portal-page[data-role="teacher"] .portal-dashboard-body{width:100%;max-width:100%;padding:12px 10px calc(18px + env(safe-area-inset-bottom));}
  body.portal-page[data-role="parent"] .portal-static-grid,
  body.portal-page[data-role="teacher"] .portal-static-grid{display:flex;flex-direction:column;gap:12px;min-width:0;}
  body.portal-page[data-role="parent"] .portal-static-main,
  body.portal-page[data-role="teacher"] .portal-static-main,
  body.portal-page[data-role="parent"] #parent-panel,
  body.portal-page[data-role="teacher"] #teacher-panel{width:100%;max-width:100%;min-width:0;}
  body.portal-page[data-role="parent"] .portal-head-actions,
  body.portal-page[data-role="teacher"] .portal-head-actions{display:flex;flex-wrap:wrap;gap:8px;width:100%;}
  body.portal-page[data-role="parent"] .portal-head-actions .btn,
  body.portal-page[data-role="parent"] .portal-head-actions .portal-message-link,
  body.portal-page[data-role="teacher"] .portal-head-actions .btn,
  body.portal-page[data-role="teacher"] .portal-head-actions .portal-message-link{min-height:44px;flex:1 1 auto;justify-content:center;}
  body.portal-page[data-role="parent"] .parent-chat-row,
  body.portal-page[data-role="teacher"] .teacher-chat-row{display:flex;flex-direction:column;gap:10px;padding:12px 0;min-width:0;}
  body.portal-page[data-role="parent"] .parent-chat-row>div,
  body.portal-page[data-role="teacher"] .teacher-chat-person{width:100%;min-width:0;overflow-wrap:anywhere;}
  body.portal-page[data-role="parent"] .parent-chat-row .btn,
  body.portal-page[data-role="teacher"] .teacher-chat-row .btn{width:100%;min-height:46px;}
  body.portal-page[data-role="parent"] .parent-admin-chat-preview{padding:12px;border-radius:12px;background:#f8fafc;border:1px solid var(--portal-border,#dce4ef);margin:10px 0;overflow-wrap:anywhere;}
  body.portal-page[data-role="parent"] .parent-admin-chat-preview p{margin:0 0 6px;line-height:1.5;}
  body.portal-page[data-role="parent"] .parent-admin-chat-preview small{color:var(--portal-muted,#64748b);}
}
@media(max-width:380px){
  body.portal-page[data-role="parent"] .portal-head-actions,
  body.portal-page[data-role="teacher"] .portal-head-actions{display:grid;grid-template-columns:minmax(0,1fr);}
  body.portal-page[data-role="parent"] .portal-head-actions>*,
  body.portal-page[data-role="teacher"] .portal-head-actions>*{width:100%;min-width:0;}
}

/* Final contrast override after legacy table-control styling. */
.portal-page .portal-table-wrap td .btn:not(.btn-outline):not(.btn-outline-light):not(.btn-gold):not(.danger-btn):not(.btn-danger):not(.btn-success),.portal-page .portal-table-wrap td button:not(.btn-outline):not(.btn-outline-light):not(.btn-gold):not(.danger-btn):not(.btn-danger):not(.btn-success),.portal-page [data-action]:not([data-action="delete"]):not([data-action="payment-reject"]){background:#1d4ed8!important;color:#fff!important;-webkit-text-fill-color:#fff!important;border:1px solid #1d4ed8!important;opacity:1!important;filter:none!important;visibility:visible!important}
.portal-page .portal-table-wrap td .btn.btn-outline,.portal-page .portal-table-wrap td button.btn-outline,.portal-page .portal-table-wrap td .btn-outline-light{background:#e8f0ff!important;color:#17375e!important;-webkit-text-fill-color:#17375e!important;border-color:#8db5ff!important}
.portal-page .portal-table-wrap td .btn.btn-gold,.portal-page .portal-table-wrap td button.btn-gold{background:#f4c542!important;color:#172033!important;-webkit-text-fill-color:#172033!important;border-color:#d6a72c!important}
.portal-page .portal-table-wrap td .danger-btn,.portal-page .portal-table-wrap td .btn-danger,.portal-page .portal-table-wrap td button[data-action="delete"],.portal-page .portal-table-wrap td button[data-action="payment-reject"],.portal-page [data-action="delete"],.portal-page [data-del]{background:#b91c1c!important;color:#fff!important;-webkit-text-fill-color:#fff!important;border-color:#b91c1c!important}
.portal-page .portal-table-wrap td .btn-success{background:#15803d!important;color:#fff!important;-webkit-text-fill-color:#fff!important;border-color:#15803d!important}
.portal-page button,.portal-page .btn,.portal-page a.btn{opacity:1!important;filter:none!important;visibility:visible!important;text-shadow:none!important;backdrop-filter:none!important;-webkit-backdrop-filter:none!important;box-shadow:0 2px 5px rgba(15,23,42,.08)!important}
.portal-page .result-filters input[name="session"],.portal-page input[name="session"],.portal-page select[name="session"]{display:block!important;visibility:visible!important;opacity:1!important;background:#fff!important;color:#172033!important;border:2px solid #64748b!important;min-height:48px!important;width:100%!important;position:relative!important;z-index:1!important;box-shadow:0 0 0 2px rgba(37,99,235,.08)!important}
.portal-page .result-filters label,.portal-page .result-filters .field{display:block!important;visibility:visible!important;opacity:1!important;min-width:0!important}
@media print{@page{size:A4 portrait;margin:12mm}.portal-page .report-wrap{width:186mm!important;max-width:none!important;margin:0!important;padding:0!important;border:0!important;box-shadow:none!important;overflow:visible!important}.portal-page .report-actions,.portal-page .portal-dashboard-header,.portal-page .portal-static-header,.portal-page .portal-static-sidebar,.portal-page .portal-mobile-nav{display:none!important}.portal-page .report-wrap table{width:100%!important;min-width:0!important}.portal-page .report-wrap tr{break-inside:avoid}}


/* Consistent green sign-in actions for all three user portals. */
.portal-page .portal-login-btn,.portal-page .portal-login-form button[type="submit"]{background:#15803d!important;color:#fff!important;-webkit-text-fill-color:#fff!important;border:1px solid #15803d!important;box-shadow:0 3px 8px rgba(21,128,61,.18)!important;}
.portal-page .portal-login-btn:hover,.portal-page .portal-login-form button[type="submit"]:hover{background:#166534!important;border-color:#166534!important;}
.portal-page .portal-login-btn:focus-visible,.portal-page .portal-login-form button[type="submit"]:focus-visible{outline:3px solid rgba(21,128,61,.28)!important;outline-offset:3px;}


/* 2026-10-13 compact student and parent portal navigation */
.portal-page .student-compact-header .inner,.portal-page .parent-compact-header .inner{display:flex;align-items:center;justify-content:space-between;gap:12px;min-width:0;flex-wrap:nowrap;padding-top:10px;padding-bottom:10px}
.portal-page .student-compact-header .portal-brand,.portal-page .parent-compact-header .portal-brand{min-width:0;flex:1 1 auto;gap:9px}
.portal-page .student-compact-header .portal-brand img,.portal-page .parent-compact-header .portal-brand img{width:38px;height:38px;flex:0 0 38px;object-fit:contain}
.portal-page .student-compact-header .portal-brand h1,.portal-page .parent-compact-header .portal-brand h1{font-size:clamp(15px,2.3vw,21px);line-height:1.2;margin:0}
.portal-page .student-compact-header .portal-brand p,.portal-page .parent-compact-header .portal-brand p{font-size:11px;line-height:1.25;margin:3px 0 0}
.portal-page .student-header-actions,.portal-page .parent-compact-actions{display:flex;align-items:center;justify-content:flex-end;gap:5px;flex:0 0 auto;min-width:0}
.portal-page .student-header-actions .btn,.portal-page .parent-compact-actions .btn,.portal-page .parent-compact-actions .portal-message-link{min-height:32px;padding:6px 9px;font-size:11px;line-height:1.1;white-space:nowrap}
.portal-page .student-compact-body{padding-top:14px}.portal-page .student-compact-body #student-panel{width:100%;max-width:1180px;margin:0 auto}
.portal-page .student-header-menu,.portal-page .parent-header-menu{width:min(calc(100% - 20px),1180px);margin:8px auto 12px;grid-template-columns:repeat(3,minmax(0,1fr));gap:7px;padding:9px}
.portal-page .student-header-menu button,.portal-page .parent-header-menu a{min-height:36px;padding:8px 10px;font-size:12px;line-height:1.25}
.portal-page .student-header-menu[hidden],.portal-page .parent-header-menu[hidden]{display:none!important}
@media(max-width:680px){.portal-page .student-compact-header .inner,.portal-page .parent-compact-header .inner{padding:8px 10px;gap:6px}.portal-page .student-compact-header .portal-brand img,.portal-page .parent-compact-header .portal-brand img{width:30px;height:30px;flex-basis:30px}.portal-page .student-compact-header .portal-brand h1,.portal-page .parent-compact-header .portal-brand h1{font-size:14px}.portal-page .student-compact-header .portal-brand p,.portal-page .parent-compact-header .portal-brand p{display:none}.portal-page .student-header-actions,.portal-page .parent-compact-actions{gap:4px}.portal-page .student-header-actions .btn,.portal-page .parent-compact-actions .btn,.portal-page .parent-compact-actions .portal-message-link{min-height:30px;padding:6px 7px;font-size:10px}.portal-page .student-header-menu,.portal-page .parent-header-menu{grid-template-columns:repeat(2,minmax(0,1fr));margin-top:6px}.portal-page .student-compact-body{padding:10px}.portal-page .student-compact-body #student-panel{padding:0}}
@media(max-width:380px){.portal-page .parent-compact-header .inner{gap:4px;padding-inline:6px}.portal-page .parent-compact-header .portal-brand{gap:4px}.portal-page .parent-compact-header .portal-brand img{width:25px;height:25px;flex-basis:25px}.portal-page .parent-compact-header .portal-brand h1{font-size:12px}.portal-page .parent-compact-actions{gap:3px}.portal-page .parent-compact-actions .btn,.portal-page .parent-compact-actions .portal-message-link{padding:5px 5px;font-size:9px}.portal-page .student-compact-header .inner{padding-inline:7px}.portal-page .student-compact-header .portal-brand h1{font-size:12px}.portal-page .student-header-actions .btn{font-size:10px;padding:5px 6px}}


/* Keep the parent header actions in a single compact row on phones. */
@media(max-width:680px){body.portal-page[data-role="parent"] .parent-compact-header .inner{display:flex!important;flex-direction:row!important;align-items:center!important;flex-wrap:nowrap!important;gap:5px!important}body.portal-page[data-role="parent"] .parent-compact-header .portal-brand{flex:0 1 auto!important;width:auto!important;min-width:0!important}body.portal-page[data-role="parent"] .parent-compact-actions{display:flex!important;flex:0 0 auto!important;flex-wrap:nowrap!important;width:auto!important;max-width:100%!important;overflow:visible!important;margin-left:auto!important}body.portal-page[data-role="parent"] .parent-compact-actions>*{flex:0 0 auto!important;width:auto!important;min-width:0!important}body.portal-page[data-role="parent"] .parent-compact-actions .btn,body.portal-page[data-role="parent"] .parent-compact-actions .portal-message-link{min-height:30px!important;padding:5px 6px!important;font-size:10px!important}}@media(max-width:380px){body.portal-page[data-role="parent"] .parent-compact-header .inner{gap:3px!important;padding-inline:5px!important}body.portal-page[data-role="parent"] .parent-compact-header .portal-brand{gap:3px!important}body.portal-page[data-role="parent"] .parent-compact-header .portal-brand h1{font-size:11px!important}body.portal-page[data-role="parent"] .parent-compact-actions{gap:2px!important}body.portal-page[data-role="parent"] .parent-compact-actions .btn,body.portal-page[data-role="parent"] .parent-compact-actions .portal-message-link{padding:4px 4px!important;font-size:9px!important}}


/* Final mobile header overrides: compact, horizontal actions on parent and teacher portals. */
.portal-page .parent-compact-header,.portal-page .teacher-compact-header{padding:8px 12px!important}.portal-page .parent-compact-header .inner,.portal-page .teacher-compact-header .inner{display:flex!important;flex-direction:row!important;align-items:center!important;justify-content:space-between!important;flex-wrap:nowrap!important;gap:8px!important;max-width:1400px;margin:auto}.portal-page .parent-compact-header .portal-brand,.portal-page .teacher-compact-header .portal-brand{display:flex!important;align-items:center!important;flex:1 1 auto!important;min-width:0!important;gap:7px!important}.portal-page .parent-compact-header .portal-brand img,.portal-page .teacher-compact-header .portal-brand img{width:32px!important;height:32px!important;flex:0 0 32px!important}.portal-page .parent-compact-header .portal-brand h1,.portal-page .teacher-compact-header .portal-brand h1{font-size:clamp(12px,2vw,18px)!important;line-height:1.15!important;margin:0!important;white-space:nowrap}.portal-page .parent-compact-header .portal-brand p,.portal-page .teacher-compact-header .portal-brand p{display:none!important}.portal-page .parent-compact-actions,.portal-page .teacher-compact-actions{display:flex!important;align-items:center!important;justify-content:flex-end!important;flex:0 0 auto!important;flex-wrap:nowrap!important;gap:4px!important;width:auto!important;max-width:none!important;min-width:0!important;overflow:visible!important;margin:0!important;padding:0!important}.portal-page .parent-compact-actions>* ,.portal-page .teacher-compact-actions>*{display:inline-flex!important;align-items:center!important;justify-content:center!important;flex:0 0 auto!important;width:auto!important;min-width:0!important;min-height:30px!important;margin:0!important;padding:5px 7px!important;font-size:10px!important;line-height:1.1!important;white-space:nowrap!important}.portal-page .parent-header-menu,.portal-page .teacher-header-menu{display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr))!important;width:calc(100% - 20px)!important;margin:8px auto 12px!important;padding:9px!important;gap:7px!important;background:#fff!important;border:1px solid #dbe4ef!important;border-radius:12px!important}.portal-page .parent-header-menu[hidden],.portal-page .teacher-header-menu[hidden]{display:none!important}.portal-page .parent-header-menu a,.portal-page .teacher-header-menu button{min-width:0!important;min-height:34px!important;padding:7px 8px!important;font-size:11px!important;line-height:1.2!important;white-space:normal!important;border:1px solid #e2e8f0!important;border-radius:8px!important;background:#f8fafc!important;color:#17375e!important;text-decoration:none!important}.portal-page .teacher-header-menu button{text-align:left!important;font-weight:700!important}.portal-page .parent-compact-header .portal-head-actions .portal-message-link,.portal-page .teacher-compact-header .portal-head-actions .portal-message-link{background:transparent!important;color:#fff!important;border:1px solid rgba(255,255,255,.35)!important;border-radius:8px!important;text-decoration:none!important}
@media(max-width:520px){.portal-page .parent-compact-header,.portal-page .teacher-compact-header{padding:7px 7px!important}.portal-page .parent-compact-header .inner,.portal-page .teacher-compact-header .inner{gap:4px!important}.portal-page .parent-compact-header .portal-brand,.portal-page .teacher-compact-header .portal-brand{gap:4px!important}.portal-page .parent-compact-header .portal-brand img,.portal-page .teacher-compact-header .portal-brand img{width:25px!important;height:25px!important;flex-basis:25px!important}.portal-page .parent-compact-header .portal-brand h1,.portal-page .teacher-compact-header .portal-brand h1{font-size:11px!important;letter-spacing:-.2px}.portal-page .parent-compact-actions,.portal-page .teacher-compact-actions{gap:2px!important}.portal-page .parent-compact-actions>* ,.portal-page .teacher-compact-actions>*{min-height:27px!important;padding:4px 4px!important;font-size:9px!important;border-radius:6px!important}.portal-page .parent-header-menu,.portal-page .teacher-header-menu{grid-template-columns:repeat(2,minmax(0,1fr))!important;width:calc(100% - 14px)!important;gap:6px!important;padding:7px!important}.portal-page .parent-header-menu a,.portal-page .teacher-header-menu button{min-height:32px!important;padding:6px!important;font-size:10px!important}}
@media(max-width:365px){.portal-page .parent-compact-header .portal-brand h1,.portal-page .teacher-compact-header .portal-brand h1{font-size:10px!important}.portal-page .parent-compact-actions>* ,.portal-page .teacher-compact-actions>*{padding:4px 3px!important;font-size:8px!important}.portal-page .parent-header-menu,.portal-page .teacher-header-menu{grid-template-columns:repeat(2,minmax(0,1fr))!important}}

/* High-specificity mobile layout overrides for parent and teacher headers. */
@media(max-width:620px){body.portal-page[data-role="parent"] .parent-compact-header .inner,body.portal-page[data-role="teacher"] .teacher-compact-header .inner{display:flex!important;flex-direction:row!important;flex-wrap:nowrap!important;align-items:center!important;justify-content:space-between!important;gap:4px!important}body.portal-page[data-role="parent"] .parent-compact-actions,body.portal-page[data-role="teacher"] .teacher-compact-actions{display:flex!important;flex-direction:row!important;flex-wrap:nowrap!important;align-items:center!important;justify-content:flex-end!important;gap:3px!important;width:auto!important;flex:0 0 auto!important;overflow:visible!important;margin:0!important}body.portal-page[data-role="parent"] .parent-compact-actions>*,body.portal-page[data-role="teacher"] .teacher-compact-actions>*{display:inline-flex!important;flex:0 0 auto!important;width:auto!important;min-width:0!important;max-width:none!important;min-height:28px!important;padding:4px 5px!important;font-size:9px!important;white-space:nowrap!important}body.portal-page[data-role="parent"] .parent-compact-header .portal-brand,body.portal-page[data-role="teacher"] .teacher-compact-header .portal-brand{flex:1 1 auto!important;width:auto!important;min-width:0!important}body.portal-page[data-role="parent"] .parent-compact-header .portal-brand h1,body.portal-page[data-role="teacher"] .teacher-compact-header .portal-brand h1{font-size:11px!important;white-space:nowrap!important}}
@media(max-width:380px){body.portal-page[data-role="parent"] .parent-compact-header .inner,body.portal-page[data-role="teacher"] .teacher-compact-header .inner{padding-inline:5px!important;gap:3px!important}body.portal-page[data-role="parent"] .parent-compact-header .portal-brand img,body.portal-page[data-role="teacher"] .teacher-compact-header .portal-brand img{width:23px!important;height:23px!important;flex-basis:23px!important}body.portal-page[data-role="parent"] .parent-compact-header .portal-brand h1,body.portal-page[data-role="teacher"] .teacher-compact-header .portal-brand h1{font-size:10px!important}body.portal-page[data-role="parent"] .parent-compact-actions>*,body.portal-page[data-role="teacher"] .teacher-compact-actions>*{padding:4px 3px!important;font-size:8px!important}}


/* Final mobile portal navigation: compact horizontal controls and functional dropdown layout. */
.portal-page .parent-compact-header .inner,.portal-page .teacher-compact-header .inner{display:flex!important;align-items:center!important;justify-content:space-between!important;flex-flow:row nowrap!important;gap:8px!important;width:100%!important;min-width:0!important;padding:8px 10px!important}
.portal-page .parent-compact-header .portal-brand,.portal-page .teacher-compact-header .portal-brand{display:flex!important;align-items:center!important;flex:1 1 0!important;min-width:0!important;gap:6px!important}
.portal-page .parent-compact-header .portal-brand img,.portal-page .teacher-compact-header .portal-brand img{width:28px!important;height:28px!important;flex:0 0 28px!important}
.portal-page .parent-compact-header .portal-brand h1,.portal-page .teacher-compact-header .portal-brand h1{font-size:clamp(10px,2.6vw,15px)!important;line-height:1.1!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important;margin:0!important}
.portal-page .parent-compact-header .portal-brand p,.portal-page .teacher-compact-header .portal-brand p{display:none!important}
.portal-page .parent-compact-actions,.portal-page .teacher-compact-actions,.portal-page .portal-dashboard-header .portal-head-actions{display:flex!important;align-items:center!important;justify-content:flex-end!important;flex:0 0 auto!important;flex-flow:row nowrap!important;gap:4px!important;width:auto!important;min-width:0!important;margin:0!important;padding:0!important;overflow:visible!important}
.portal-page .parent-compact-actions>*,.portal-page .teacher-compact-actions>*,.portal-page .portal-dashboard-header .portal-head-actions>*{display:inline-flex!important;align-items:center!important;justify-content:center!important;flex:0 0 auto!important;width:auto!important;min-width:0!important;max-width:none!important;min-height:29px!important;margin:0!important;padding:5px 7px!important;font-size:10px!important;line-height:1.05!important;white-space:nowrap!important;border-radius:7px!important}
.portal-page .parent-header-menu,.portal-page .teacher-header-menu,.portal-page #portal-header-menu{display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:7px!important;width:calc(100% - 20px)!important;max-width:1180px!important;margin:8px auto 12px!important;padding:9px!important;background:#fff!important;border:1px solid #dbe4ef!important;border-radius:12px!important;box-shadow:0 8px 22px rgba(15,23,42,.08)!important}
.portal-page .parent-header-menu[hidden],.portal-page .teacher-header-menu[hidden],.portal-page #portal-header-menu[hidden]{display:none!important}
.portal-page .parent-header-menu a,.portal-page .teacher-header-menu button,.portal-page #portal-header-menu button{display:flex!important;align-items:center!important;min-width:0!important;min-height:36px!important;padding:8px!important;font-size:11px!important;line-height:1.2!important;white-space:normal!important;text-align:left!important;border:1px solid #e2e8f0!important;border-radius:8px!important;background:#f8fafc!important;color:#17375e!important;text-decoration:none!important;cursor:pointer!important}
.portal-page .parent-header-menu a:focus-visible,.portal-page .teacher-header-menu button:focus-visible,.portal-page #portal-header-menu button:focus-visible{outline:2px solid #c99418!important;outline-offset:2px!important}
.portal-page .portal-dashboard-body{padding-top:12px!important}
@media(max-width:620px){
 .portal-page .parent-compact-header .inner,.portal-page .teacher-compact-header .inner{gap:4px!important;padding:7px 6px!important}
 .portal-page .parent-compact-header .portal-brand,.portal-page .teacher-compact-header .portal-brand{gap:4px!important}
 .portal-page .parent-compact-header .portal-brand img,.portal-page .teacher-compact-header .portal-brand img{width:23px!important;height:23px!important;flex-basis:23px!important}
 .portal-page .parent-compact-header .portal-brand h1,.portal-page .teacher-compact-header .portal-brand h1{font-size:10px!important;letter-spacing:-.25px!important}
 .portal-page .parent-compact-actions,.portal-page .teacher-compact-actions,.portal-page .portal-dashboard-header .portal-head-actions{gap:3px!important}
 .portal-page .parent-compact-actions>*,.portal-page .teacher-compact-actions>*,.portal-page .portal-dashboard-header .portal-head-actions>*{min-height:27px!important;padding:4px 4px!important;font-size:9px!important;letter-spacing:-.15px!important}
 .portal-page .parent-header-menu,.portal-page .teacher-header-menu,.portal-page #portal-header-menu{grid-template-columns:repeat(2,minmax(0,1fr))!important;width:calc(100% - 12px)!important;margin:6px auto 10px!important;padding:7px!important;gap:5px!important}
 .portal-page .parent-header-menu a,.portal-page .teacher-header-menu button,.portal-page #portal-header-menu button{min-height:32px!important;padding:6px!important;font-size:10px!important}
}
@media(max-width:380px){
 .portal-page .parent-compact-header .inner,.portal-page .teacher-compact-header .inner{gap:2px!important;padding-inline:4px!important}
 .portal-page .parent-compact-header .portal-brand,.portal-page .teacher-compact-header .portal-brand{gap:3px!important}
 .portal-page .parent-compact-header .portal-brand img,.portal-page .teacher-compact-header .portal-brand img{width:20px!important;height:20px!important;flex-basis:20px!important}
 .portal-page .parent-compact-header .portal-brand h1,.portal-page .teacher-compact-header .portal-brand h1{font-size:9px!important}
 .portal-page .parent-compact-actions>*,.portal-page .teacher-compact-actions>*,.portal-page .portal-dashboard-header .portal-head-actions>*{padding:4px 3px!important;font-size:8px!important}
}
