:root{--gold:#d4af37;--black:#090909;--panel:#151515;--soft:#f7f3e8;--white:#fff;--muted:#707070;--green:#2e7d32;--red:#b00020;--blue:#2457a6}*{box-sizing:border-box}body{margin:0;font-family:Arial,Helvetica,sans-serif;background:#f4f1ea;color:#1c1c1c}.topbar{background:#000;color:#fff;padding:14px 24px;display:flex;align-items:center;justify-content:space-between;gap:20px;box-shadow:0 4px 18px rgba(0,0,0,.25)}.brand{display:flex;align-items:center;gap:12px}.brand img{height:48px;width:auto;background:#fff;border-radius:10px;padding:4px}.brand span{display:block;color:var(--gold);font-size:13px;margin-top:2px}.topbar nav{display:flex;gap:10px;flex-wrap:wrap}.topbar a{color:#fff;text-decoration:none;padding:8px 10px;border-radius:10px}.topbar a:hover{background:var(--gold);color:#000}.container{max-width:1180px;margin:0 auto;padding:24px}.hero,.card{background:#fff;border:1px solid #e7decb;border-radius:18px;padding:22px;box-shadow:0 8px 24px rgba(0,0,0,.06);margin-bottom:18px}.hero{background:linear-gradient(135deg,#111,#372b08);color:#fff}.hero h1{margin:0 0 8px}.hero p{color:#f5e8be;max-width:900px}.grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(260px,1fr));gap:16px}.plan{border:2px solid #e2d5b7;border-radius:18px;padding:20px;background:#fff}.plan.premium{border-color:var(--gold);box-shadow:0 0 0 4px rgba(212,175,55,.12)}.price{font-size:32px;font-weight:800;margin:8px 0}.discount{color:var(--green);font-weight:700}.btn,button,input[type=submit]{display:inline-block;border:0;background:#000;color:#fff;padding:10px 14px;border-radius:12px;text-decoration:none;cursor:pointer;font-weight:700}.btn.gold,button.gold{background:var(--gold);color:#000}.btn.soft{background:#eee;color:#111}.btn.red{background:var(--red)}.btn.blue{background:var(--blue)}table{width:100%;border-collapse:collapse;background:#fff;border-radius:14px;overflow:hidden}th,td{padding:12px;border-bottom:1px solid #eee;text-align:left;vertical-align:top}th{background:#111;color:#fff}tr:hover td{background:#fffaf0}.form-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(230px,1fr));gap:14px}label{font-weight:700;display:block;margin-bottom:5px}input,select,textarea{width:100%;padding:10px;border:1px solid #cfc7b8;border-radius:10px;font:inherit;background:#fff}textarea{min-height:100px}.notice{padding:12px 14px;border-radius:12px;background:#fff7da;border:1px solid #e5c767;margin-bottom:16px}.error{background:#fde7e9;border-color:#f5a3ad;color:#65000b}.success{background:#e8f5e9;border-color:#9bd29d;color:#154a19}.badge{display:inline-block;padding:4px 8px;border-radius:999px;font-size:12px;font-weight:800;background:#eee}.badge.active{background:#dff3df;color:#155b17}.badge.expired,.badge.suspended{background:#ffd9df;color:#820016}.cards{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:14px}.metric{background:#111;color:#fff;border-radius:16px;padding:18px}.metric strong{font-size:34px;display:block;color:var(--gold)}.tool-card{min-height:190px;display:flex;flex-direction:column;justify-content:space-between}.small{font-size:13px;color:#666}.footer{text-align:center;padding:30px;color:#666}@media(max-width:720px){.topbar{display:block}.topbar nav{margin-top:12px}.container{padding:14px}}
.topbar a.account-link{background:rgba(212,175,55,.16);border:1px solid rgba(212,175,55,.65);color:#fff}.topbar a.account-link:hover{background:var(--gold);color:#000}.account-card{border-color:#b9c8eb}.account-card h2{color:#163f82}


/* Account settings visibility fix */
.account-link,
.account-settings-link {
  background: #d4af37;
  color: #000 !important;
  padding: 8px 12px;
  border-radius: 999px;
  font-weight: 800;
  border: 1px solid rgba(255,255,255,.35);
}
.password-alert-banner {
  margin: 18px 0;
  padding: 14px 18px;
  border-radius: 16px;
  background: #fff7d6;
  border: 2px solid #d4af37;
  color: #111;
  box-shadow: 0 8px 24px rgba(0,0,0,.12);
}
.password-alert-banner a {
  display: inline-block;
  margin-left: 10px;
  background: #111;
  color: #fff !important;
  padding: 8px 14px;
  border-radius: 999px;
  font-weight: 800;
  text-decoration: none;
}
.account-card {
  border: 2px solid #d4af37;
}

.inline-form { display: inline; margin: 0; }
button.danger, .danger {
    background: #9f1d1d;
    color: #fff;
    border: 0;
    border-radius: 8px;
    padding: 8px 12px;
    cursor: pointer;
    font-weight: 700;
}
button.danger:hover, .danger:hover { background: #7f1414; }
.muted { color: #777; font-size: 0.95em; }


/* Account button color update: inactive/default state is white for readability */
.topbar a.account-link,
.topbar a.account-settings-link,
.account-password-btn,
a.account-password-btn,
.account-settings-banner a {
    background: #ffffff !important;
    color: #111111 !important;
    border: 1px solid var(--gold) !important;
    box-shadow: 0 2px 8px rgba(0,0,0,.08);
}

.topbar a.account-link:hover,
.topbar a.account-settings-link:hover,
.account-password-btn:hover,
a.account-password-btn:hover,
.account-settings-banner a:hover {
    background: var(--gold) !important;
    color: #000000 !important;
}

/* Top row button color update: inactive/default state is white for readability */
.topbar nav a,
.topbar nav a:visited {
    background: #ffffff !important;
    color: #111111 !important;
    border: 1px solid var(--gold) !important;
    box-shadow: 0 2px 8px rgba(0,0,0,.10);
    font-weight: 800;
}

.topbar nav a:hover,
.topbar nav a:focus {
    background: var(--gold) !important;
    color: #000000 !important;
    border-color: var(--gold) !important;
}

/* Super Admin correction styles */
.signed-in-user{
  display:flex;
  flex-direction:column;
  align-items:flex-end;
  gap:1px;
  padding:8px 12px;
  border:1px solid rgba(212,175,55,.65);
  border-radius:12px;
  background:#fff;
  color:#111;
  min-width:170px;
  box-shadow:0 4px 12px rgba(0,0,0,.12);
}
.signed-in-user .signed-in-label{font-size:.72rem;text-transform:uppercase;letter-spacing:.05em;color:#555;font-weight:700}
.signed-in-user strong{font-size:.98rem;color:#111;line-height:1.1}
.signed-in-user span:last-child{font-size:.8rem;color:#6b4c00;font-weight:700}
.detail-card{border-left:6px solid #d4af37}
.detail-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(230px,1fr));gap:10px 18px}
.detail-grid p{padding:10px;border:1px solid #eee;border-radius:10px;background:#fffdf4;margin:0}
.actions-cell{display:flex;gap:6px;flex-wrap:wrap;align-items:center}
.inline-form{display:inline-block;margin:0}
.inline-form button{margin:0}
.action-row{align-items:center}
.btns.action-row{display:flex;gap:8px;flex-wrap:wrap;margin-top:12px}
button.danger,.btn.danger,.danger{background:#b3261e!important;color:#fff!important;border:1px solid #8f1d17!important}
.badge.active{background:#dcfce7;color:#166534}
.badge.pending{background:#fef3c7;color:#854d0e}
.badge.suspended,.badge.expired,.badge.inactive{background:#fee2e2;color:#991b1b}
.badge.trial{background:#dbeafe;color:#1e40af}
.notice.warning{background:#fff7d6;border-color:#d4af37;color:#4d3800}
@media(max-width:900px){.signed-in-user{align-items:flex-start;width:100%}.topbar{gap:10px}}

/* Confirmed Super Admin Fix 2026-08-14 */
.current-user-strip{
  max-width:1180px;
  margin:12px auto 0;
  padding:10px 18px;
  background:#fff7d6;
  border:2px solid var(--gold);
  border-radius:14px;
  box-shadow:0 6px 18px rgba(0,0,0,.08);
  display:flex;
  gap:10px;
  align-items:center;
  flex-wrap:wrap;
}
.current-user-strip span{
  font-weight:900;
  color:#111;
}
.current-user-strip em{
  font-style:normal;
  color:#684d00;
  font-weight:800;
  background:#fff;
  border:1px solid #e7decb;
  padding:4px 8px;
  border-radius:999px;
}
.dashboard-card-highlight{
  border:3px solid var(--gold)!important;
  box-shadow:0 10px 26px rgba(212,175,55,.18)!important;
}
.card a:not(.btn), table a:not(.btn){
  color:#1a4f9c;
  font-weight:800;
  text-decoration:underline;
}
.card a:not(.btn):hover, table a:not(.btn):hover{
  color:#000;
  background:#fff1b8;
}
.btns.action-row{display:flex;gap:8px;flex-wrap:wrap;margin-top:14px;align-items:center}
.actions-cell{display:flex;gap:6px;flex-wrap:wrap;align-items:center}
.detail-card{border-left:7px solid var(--gold)!important}
.detail-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(230px,1fr));gap:10px 18px}
.detail-grid p{padding:10px;border:1px solid #eee;border-radius:10px;background:#fffdf4;margin:0}
.inline-form{display:inline-block;margin:0}
.inline-form button{margin:0}
button.danger,.btn.danger,.danger{background:#b3261e!important;color:#fff!important;border:1px solid #8f1d17!important}
.notice.warning{background:#fff7d6;border-color:#d4af37;color:#4d3800}
.badge.pending{background:#fef3c7;color:#854d0e}
.badge.trial{background:#dbeafe;color:#1e40af}
.badge.inactive,.badge.suspended,.badge.expired{background:#fee2e2;color:#991b1b}
@media(max-width:720px){.current-user-strip{margin:10px 12px 0}.actions-cell{display:block}.actions-cell .btn,.actions-cell form{margin-bottom:6px}}

/* User, school account, and PDF management hotfix 2026-08-14 */
.user-info-banner{
  background:#fff7d6!important;
  border:2px solid var(--gold)!important;
  color:#111!important;
  margin-top:12px!important;
}
.user-info-banner strong{color:#111!important;}
.user-info-banner span{font-weight:900!important;color:#111!important;}
.user-info-banner em{background:#fff!important;color:#5b4300!important;border:1px solid #e3cc74!important;}
.table-action-note{font-size:13px;color:#555;margin:.25rem 0 1rem;}
.actions-cell .btn,.actions-cell button{margin:2px 0;white-space:nowrap;}
.pdf-preview-box{border:1px solid #e7decb;border-radius:14px;overflow:hidden;background:#f9f6ee;margin:14px 0;}
.pdf-preview-box iframe{display:block;width:100%;min-height:650px;border:0;background:#fff;}
.inline-check{font-weight:500;display:flex;align-items:center;gap:8px;margin-top:8px;}
.inline-check input{width:auto;}
.card table a:not(.btn), table a:not(.btn){cursor:pointer;}
