
/* V59 — professional icon system, owner control, high contrast light/dark */
:root{
  --v59-line:rgba(130,190,255,.20);
  --v59-panel:rgba(7,18,35,.82);
  --v59-panel-2:rgba(16,30,53,.78);
  --v59-text:#f5f8ff;
  --v59-muted:#aebdd0;
  --v59-accent:#67c9ff;
  --v59-accent-2:#9a75ff;
  --v59-danger:#ff667f;
  --v59-shadow:0 18px 55px rgba(0,0,0,.26);
}
html[data-theme="light"]{
  --v59-line:rgba(21,86,145,.18);
  --v59-panel:rgba(255,255,255,.96);
  --v59-panel-2:rgba(245,249,255,.96);
  --v59-text:#0d1b2c;
  --v59-muted:#53677d;
  --v59-accent:#0b77c8;
  --v59-accent-2:#6847c7;
  --v59-shadow:0 18px 48px rgba(24,66,107,.12);
}
.v59-pro-ui .qis-pro-icon{display:inline-grid;place-items:center;width:1.35em;height:1.35em;flex:0 0 1.35em;vertical-align:-.25em;color:currentColor;pointer-events:none}
.v59-pro-ui .qis-pro-icon svg{width:100%;height:100%;fill:none;stroke:currentColor;stroke-width:1.75;stroke-linecap:round;stroke-linejoin:round;pointer-events:none}
.v59-pro-ui .qis-icon,.v59-pro-ui .qis-icon svg{pointer-events:none}
.v59-pro-ui button,.v59-pro-ui a.btn,.v59-pro-ui summary,.v59-pro-ui [role="button"]{touch-action:manipulation}
.v59-pro-ui .btn,.v59-pro-ui .v44-pro-control,.v59-pro-ui .nav button,.v59-pro-ui .v45-owner-grid button{
  min-height:42px;gap:8px;align-items:center;justify-content:center;border-radius:12px;
  transition:transform .16s ease,border-color .16s ease,box-shadow .16s ease,background .16s ease,color .16s ease;
}
.v59-pro-ui .btn:hover,.v59-pro-ui .v44-pro-control:hover,.v59-pro-ui .nav button:hover,.v59-pro-ui .v45-owner-grid button:hover{
  transform:translateY(-1px);box-shadow:0 8px 22px rgba(56,144,222,.13);border-color:rgba(100,190,255,.42)
}
.v59-pro-ui .btn:focus-visible,.v59-pro-ui button:focus-visible,.v59-pro-ui a:focus-visible,.v59-pro-ui summary:focus-visible,.v59-pro-ui input:focus-visible,.v59-pro-ui select:focus-visible,.v59-pro-ui textarea:focus-visible{
  outline:3px solid rgba(80,190,255,.30)!important;outline-offset:2px!important
}
.v59-pro-ui .v59-pressed{transform:scale(.975)!important;filter:brightness(1.12)}
.v59-pro-ui .section-title h2{display:flex;align-items:center;gap:9px}
.v59-pro-ui .section-title h2>.qis-pro-icon{color:var(--v59-accent)}
.v59-pro-ui .brand-mark,.v59-pro-ui .qis-atom-mark{filter:drop-shadow(0 0 14px rgba(84,203,255,.28))}
.v59-pro-ui .admin-card,.v59-pro-ui .card,.v59-pro-ui .v44-parent-card{
  border-color:var(--v59-line);box-shadow:0 10px 34px rgba(0,0,0,.08)
}
.v59-pro-ui .v44-pro-control{border:1px solid var(--v59-line)!important;background:linear-gradient(180deg,rgba(103,201,255,.10),rgba(115,87,225,.06))!important}
.v59-pro-ui .v59-logout{border-color:rgba(255,102,127,.25)!important}
.v59-pro-ui .v59-state-disabled{opacity:.58;filter:saturate(.75)}
.v59-guidance-hidden,.v59-install-hidden,.v59-notifications-hidden{display:none!important}

.v59-ui-control-card{background:linear-gradient(135deg,var(--v59-panel),var(--v59-panel-2));border:1px solid var(--v59-line)!important;box-shadow:var(--v59-shadow)}
.v59-setting-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin:14px 0}
.v59-setting-grid .field,.v59-toggle{border:1px solid var(--v59-line);border-radius:14px;background:rgba(110,180,255,.045);padding:12px;min-height:82px}
.v59-setting-grid .field{display:flex;flex-direction:column;gap:8px}
.v59-setting-grid .field>span,.v59-toggle b{font-size:13px;font-weight:800}
.v59-toggle{display:flex;gap:10px;align-items:flex-start;cursor:pointer}
.v59-toggle input{margin-top:3px;accent-color:var(--v59-accent);width:18px;height:18px}
.v59-toggle span{display:flex;flex-direction:column;gap:5px}
.v59-toggle small{color:var(--v59-muted);line-height:1.55}
.v59-control-actions{margin:8px 0 12px}
#v59ControlAudit{border-color:var(--v59-line)}

.v59-modal{position:fixed;inset:0;z-index:99999;background:rgba(2,8,18,.76);backdrop-filter:blur(10px);display:none;align-items:center;justify-content:center;padding:18px}
.v59-modal.open{display:flex}
.v59-modal-card{width:min(980px,100%);max-height:88vh;overflow:auto;background:var(--v59-panel);color:var(--v59-text);border:1px solid var(--v59-line);border-radius:22px;box-shadow:0 28px 90px rgba(0,0,0,.44);padding:18px}
.v59-modal-head{display:flex;justify-content:space-between;gap:18px;align-items:flex-start;padding-bottom:14px;border-bottom:1px solid var(--v59-line)}
.v59-modal-head>div{display:flex;gap:12px}.v59-modal-head .qis-pro-icon{width:34px;height:34px;color:var(--v59-accent)}
.v59-modal-head small{letter-spacing:.13em;color:var(--v59-accent);font-weight:800}.v59-modal-head h2{margin:4px 0}.v59-modal-head p{margin:0;color:var(--v59-muted)}
.v59-undo-toolbar{display:grid;grid-template-columns:minmax(180px,1fr) repeat(3,auto);gap:8px;margin:14px 0}
.v59-undo-toolbar input{min-height:42px;border-radius:12px;border:1px solid var(--v59-line);background:var(--v59-panel-2);color:var(--v59-text);padding:0 12px}
.v59-undo-rows{display:grid;gap:8px;margin-top:10px}
.v59-undo-row{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:11px 12px;border:1px solid var(--v59-line);border-radius:13px;background:rgba(120,180,255,.035)}
.v59-undo-row>div{display:flex;flex-direction:column;gap:3px}.v59-undo-row small{color:var(--v59-muted)}
.v59-undo-history{white-space:nowrap}

.v59-pro-ui .profile-avatar{border:2px solid rgba(105,202,255,.48)!important;box-shadow:0 0 0 4px rgba(105,202,255,.07),0 10px 32px rgba(0,0,0,.18)}
.v59-pro-ui .student-welcome-profile,.v59-pro-ui .v44-parent-hero{
  border:1px solid var(--v59-line);box-shadow:var(--v59-shadow);position:relative;overflow:hidden
}
.v59-pro-ui .student-welcome-profile::after,.v59-pro-ui .v44-parent-hero::after{
  content:"";position:absolute;inset:auto -15% -70% 35%;height:180px;background:radial-gradient(circle,rgba(82,194,255,.18),transparent 67%);pointer-events:none
}
.v59-pro-ui .stat,.v59-pro-ui .mini-stat-grid>div,.v59-pro-ui .v44-parent-summary>*{border-color:var(--v59-line)!important}
.v59-pro-ui .student-notification,.v59-pro-ui #parentPaymentAlert>*{border-color:var(--v59-line)!important}

html[data-theme="light"] .v59-pro-ui .admin-card,
html[data-theme="light"] .v59-pro-ui .card,
html[data-theme="light"] .v59-pro-ui .v44-parent-card,
html[data-theme="light"] .v59-modal-card{color:#0d1b2c;background:rgba(255,255,255,.94)}
html[data-theme="light"] .v59-setting-grid .field,
html[data-theme="light"] .v59-toggle,
html[data-theme="light"] .v59-undo-row{background:rgba(39,119,190,.035)}

#flash.v59-flash-hidden{opacity:0!important;transform:translateY(-8px)!important;pointer-events:none!important}
html[data-v59-notif-position="bottom"] #flash{position:fixed!important;bottom:18px!important;top:auto!important;left:50%!important;transform:translateX(-50%);z-index:100000;max-width:min(92vw,680px);box-shadow:var(--v59-shadow)}
html[data-v59-notif-position="bottom"] #flash.v59-flash-hidden{transform:translate(-50%,8px)!important}

@media(max-width:980px){
  .v59-setting-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .v59-undo-toolbar{grid-template-columns:1fr 1fr}.v59-undo-toolbar input{grid-column:1/-1}
}
@media(max-width:620px){
  .v59-setting-grid{grid-template-columns:1fr}
  .v59-modal{padding:8px}.v59-modal-card{border-radius:18px;padding:13px;max-height:94vh}
  .v59-modal-head{flex-direction:column}.v59-modal-head>[data-v59-undo-close]{align-self:stretch}
  .v59-undo-toolbar{grid-template-columns:1fr}.v59-undo-toolbar input{grid-column:auto}
  .v59-undo-row{align-items:flex-start;flex-direction:column}.v59-undo-row .btn{width:100%}
  .v59-pro-ui .v44-pro-control b{display:inline!important;font-size:11px}
  .v59-pro-ui .v44-pro-control{min-width:54px;padding:7px 8px!important}
}
@media(prefers-reduced-motion:reduce){
 .v59-pro-ui *{scroll-behavior:auto!important;transition-duration:.01ms!important;animation-duration:.01ms!important}
}

.qis-app-logo-v59{width:84px;height:84px;border-radius:22px;display:block;margin:0 auto 10px;box-shadow:0 14px 38px rgba(0,0,0,.28),0 0 0 1px rgba(116,202,255,.18)}

html[data-theme="light"] .qis-app-card{background:linear-gradient(180deg,#ffffff,#f3f8ff);color:#10233a;border-color:rgba(35,113,181,.22)}
html[data-theme="light"] .qis-app-copy{color:#53677d}
html[data-theme="light"] .qis-app-copy b{color:#10233a}
html[data-theme="light"] .qis-app-x{background:#eef6ff;color:#10233a;border-color:rgba(35,113,181,.22)}
