html, body{
  margin:0;
  min-height:100%;
  scroll-behavior: smooth;
}

body{
  margin:0;
  font-family:'Poppins', sans-serif;
  background:linear-gradient(135deg,#0b0f2a,#2b1e5a);
  color:white;
  transition:
    background 0.35s ease,
    color 0.35s ease;
  min-height:100vh;
  overflow-x:hidden;
  overflow-y:auto;
}

.layout{
  display:flex;
  min-height:100vh;
}

/* SIDEBAR */
.sidebar{
  width:240px;
  background:#1a1140;
  min-height:100vh;
  display:flex;
  flex-direction:column;
  justify-content:space-between;
  padding:20px;
  box-sizing:border-box;
  transition:background 0.35s ease;
}

.sidebar-toggle{
  display:none;
  width:46px;
  height:46px;
  border:none;
  border-radius:14px;
  background:rgba(255,255,255,0.08);
  cursor:pointer;
  align-items:center;
  justify-content:center;
  flex-direction:column;
  gap:5px;
  padding:0;
  flex-shrink:0;
}

.sidebar-toggle span{
  width:20px;
  height:2px;
  background:#fff;
  border-radius:999px;
  display:block;
  transition:transform 0.25s ease, opacity 0.25s ease, background 0.35s ease;
}

.top-section{
  display:flex;
  flex-direction:column;
  gap:30px;
}

.logo-link{
  text-decoration:none;
  display:inline-block;
}

.logo{
  font-family:'Press Start 2P', cursive;
  font-size:14px;
  line-height:1.5;
  background:linear-gradient(90deg,#ff982e 0%,#ff7c2e 28%,#ff4d95 68%,#ff4fb8 100%);
  -webkit-background-clip:text;
  background-clip:text;
  -webkit-text-fill-color:transparent;
  margin:0;
  cursor:pointer;
  transition:transform 0.25s ease;
  filter:
    drop-shadow(0 0 6px rgba(255,138,42,0.45))
    drop-shadow(0 0 14px rgba(255,46,151,0.28));
}

.logo-link:hover .logo{
  transform:scale(1.03);
}

.menu{
  display:flex;
  flex-direction:column;
  gap:30px;
  padding-top:14px;
}

.menu a{
  color:white;
  text-decoration:none;
  opacity:0.8;
  font-size:14px;
  line-height:1.2;
  padding:2px 0;
  transition:
    0.25s ease,
    color 0.35s ease;
}

.menu a:hover,
.menu a.active-link{
  opacity:1;
  transform:translateX(5px);
}

.bottom-section{
  padding-top:20px;
  border-top:1px solid rgba(255,255,255,0.1);
}

.logout-btn{
  width:100%;
  padding:12px;
  border:none;
  border-radius:12px;
  background:#ff2e97;
  color:white;
  cursor:pointer;
  font-weight:600;
  transition:
    transform 0.2s ease,
    box-shadow 0.25s ease,
    filter 0.25s ease;
}

.logout-btn:hover{
  transform:translateY(-2px);
  box-shadow:0 10px 22px rgba(255,46,151,0.22);
  filter:brightness(1.05);
}

/* MAIN */
.main{
  flex:1;
  padding:24px;
  box-sizing:border-box;
  min-height:100vh;
  display:flex;
  flex-direction:column;
  gap:20px;
  overflow-y:auto;
}

.main::-webkit-scrollbar{
  width:8px;
}

.main::-webkit-scrollbar-thumb{
  background:rgba(255,255,255,0.18);
  border-radius:999px;
}

/* TOPBAR */
.topbar{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:20px;
  animation:fadeSlideUp 0.55s ease both;
}

.topbar-title{
  display:flex;
  align-items:flex-start;
  gap:12px;
}

.page-title{
  margin:0;
  font-size:32px;
}

.page-subtitle{
  margin:8px 0 0 0;
  opacity:0.82;
  font-size:14px;
}

.user-top{
  display:flex;
  align-items:center;
  gap:10px;
  background:rgba(255,255,255,0.06);
  padding:10px 14px;
  border-radius:14px;
  transition:
    background 0.35s ease,
    box-shadow 0.35s ease,
    transform 0.25s ease;
}

.user-top:hover{
  transform:translateY(-2px);
}

.user-top span{
  font-weight:600;
}

.user-top img{
  width:38px;
  height:38px;
  border-radius:50%;
  object-fit:cover;
}

/* CARDS */
.card{
  background:#3a2575;
  padding:20px;
  border-radius:18px;
  box-sizing:border-box;
  transition:
    transform 0.28s ease,
    box-shadow 0.3s ease,
    background 0.35s ease,
    color 0.35s ease;
}

.card:hover{
  transform:translateY(-4px);
  box-shadow:0 14px 28px rgba(0,0,0,0.16);
}

.settings-grid{
  display:grid;
  grid-template-columns:repeat(2,1fr);
  gap:22px;
}

.settings-card{
  animation:fadeSlideUp 0.6s ease both;
}

.slow-load-warning{
  color:#8effe4 !important;
  font-weight:700;
}

.settings-card:nth-child(1){ animation-delay:0.06s; }
.settings-card:nth-child(2){ animation-delay:0.12s; }
.settings-card:nth-child(3){ animation-delay:0.18s; }
.settings-card:nth-child(4){ animation-delay:0.24s; }
.settings-card:nth-child(5){ animation-delay:0.30s; }

.settings-card h3{
  margin:0 0 16px 0;
  font-size:20px;
}

.full-width{
  grid-column:1 / -1;
}

/* ACCOUNT */
.account-box{
  display:flex;
  gap:18px;
  align-items:center;
}

.account-box img{
  width:80px;
  height:80px;
  border-radius:50%;
  object-fit:cover;
  box-shadow:0 8px 18px rgba(0,0,0,0.18);
}

.account-info p{
  margin:6px 0;
  font-size:14px;
}

.profile-edit-form{
  margin-top:20px;
  display:grid;
  gap:14px;
}

.profile-form-grid{
  display:grid;
  grid-template-columns:repeat(2,1fr);
  gap:14px;
}

.profile-edit-form label{
  display:grid;
  gap:6px;
  font-size:13px;
}

.profile-edit-form label span{
  font-weight:600;
}

.profile-edit-form input{
  width:100%;
  box-sizing:border-box;
  border:1px solid rgba(255,255,255,0.12);
  background:rgba(10,16,42,0.28);
  color:white;
  border-radius:14px;
  padding:12px 14px;
  font:inherit;
  transition:
    border-color 0.25s ease,
    box-shadow 0.25s ease,
    background 0.35s ease,
    color 0.35s ease;
}

.profile-edit-form input:focus{
  outline:none;
  border-color:rgba(34,211,238,0.68);
  box-shadow:0 0 0 4px rgba(34,211,238,0.12);
}

.profile-upload-field input{
  padding:10px 12px;
}

.profile-edit-actions{
  display:flex;
  align-items:center;
  gap:14px;
  flex-wrap:wrap;
}

.account-actions{
  margin-top:14px;
  display:flex;
  gap:12px;
  flex-wrap:wrap;
}

.account-security-panel{
  margin-top:20px;
  padding-top:18px;
  border-top:1px solid rgba(255,255,255,0.1);
}

.account-security-panel h4{
  margin:0 0 8px;
  font-size:16px;
}

.account-security-note{
  margin:0 0 14px;
  font-size:13px;
  opacity:0.82;
  line-height:1.5;
}

.account-security-warning{
  margin:0 0 14px;
  padding:12px 14px;
  border-radius:14px;
  background:rgba(245,158,11,0.14);
  border:1px solid rgba(245,158,11,0.32);
  color:#ffd89a;
  font-size:13px;
  font-weight:600;
  line-height:1.5;
}

.account-security-grid{
  display:grid;
  grid-template-columns:1fr auto;
  align-items:end;
  gap:14px;
}

.account-security-grid label{
  display:grid;
  gap:6px;
  font-size:13px;
}

.account-security-grid label span{
  font-weight:600;
}

.account-security-grid input{
  width:100%;
  box-sizing:border-box;
  border:1px solid rgba(255,255,255,0.12);
  background:rgba(10,16,42,0.28);
  color:white;
  border-radius:14px;
  padding:12px 14px;
  font:inherit;
  transition:
    border-color 0.25s ease,
    box-shadow 0.25s ease,
    background 0.35s ease,
    color 0.35s ease;
}

.account-security-grid input:focus{
  outline:none;
  border-color:rgba(34,211,238,0.68);
  box-shadow:0 0 0 4px rgba(34,211,238,0.12);
}

.account-security-grid input:disabled{
  cursor:not-allowed;
  opacity:0.6;
}

.account-security-actions{
  margin-top:14px;
  display:flex;
  align-items:center;
  gap:12px;
  flex-wrap:wrap;
}

.profile-edit-status{
  margin:0;
  min-height:20px;
  font-size:13px;
  color:#8df6cb;
}

.secondary-action-btn{
  background:transparent;
  border:2px solid rgba(0,229,255,0.45);
  color:#baf8ff;
}

.secondary-action-btn:hover{
  box-shadow:0 12px 24px rgba(0,229,255,0.16);
  filter:none;
}

.status-pill{
  display:inline-block;
  font-size:12px;
  font-weight:700;
  padding:6px 10px;
  border-radius:999px;
}

.status-pill.unlocked{
  background:#00ffcc;
  color:#0b0f2a;
}

.status-pill.locked{
  background:rgba(255,255,255,0.16);
  color:white;
}

/* SETTING ROW */
.setting-row{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:20px;
  padding:14px 0;
  border-bottom:1px solid rgba(255,255,255,0.08);
}

.setting-row:last-child{
  border-bottom:none;
}

.setting-row strong{
  display:block;
  margin-bottom:4px;
}

.setting-row p{
  margin:0;
  font-size:13px;
  opacity:0.82;
  line-height:1.5;
}

.volume-setting-row{
  align-items:center;
}

.volume-control{
  width:min(260px, 42%);
  min-width:210px;
  display:grid;
  grid-template-columns:1fr 52px;
  align-items:center;
  gap:12px;
}

.volume-control input[type="range"]{
  width:100%;
  appearance:none;
  height:10px;
  border-radius:999px;
  background:rgba(255,255,255,0.2);
  outline:none;
  cursor:pointer;
}

.volume-control input[type="range"]::-webkit-slider-thumb{
  appearance:none;
  width:22px;
  height:22px;
  border-radius:50%;
  background:linear-gradient(135deg,#00e5ff,#00ffcc);
  border:3px solid #fff;
  box-shadow:0 8px 18px rgba(0,229,255,0.24);
}

.volume-control input[type="range"]::-moz-range-thumb{
  width:18px;
  height:18px;
  border-radius:50%;
  background:#00e5ff;
  border:3px solid #fff;
  box-shadow:0 8px 18px rgba(0,229,255,0.24);
}

.volume-control span{
  font-size:13px;
  font-weight:700;
  text-align:right;
  color:#8df6cb;
}

.select-control{
  width:min(260px, 42%);
  min-width:210px;
  display:block;
}

.select-control select{
  width:100%;
  box-sizing:border-box;
  border:1px solid rgba(255,255,255,0.14);
  background:rgba(10,16,42,0.28);
  color:white;
  border-radius:14px;
  padding:12px 14px;
  font:inherit;
  font-weight:600;
  cursor:pointer;
  transition:
    border-color 0.25s ease,
    box-shadow 0.25s ease,
    background 0.35s ease,
    color 0.35s ease;
}

.select-control select:focus{
  outline:none;
  border-color:rgba(34,211,238,0.68);
  box-shadow:0 0 0 4px rgba(34,211,238,0.12);
}

.read-aloud-actions{
  display:flex;
  justify-content:flex-end;
  gap:10px;
  flex-wrap:wrap;
}

.settings-section-note{
  margin:0 0 16px 0;
  font-size:13px;
  opacity:0.82;
  line-height:1.6;
}

.retention-schedule-grid{
  display:grid;
  grid-template-columns:repeat(2,1fr);
  gap:14px;
  margin-top:18px;
}

.retention-schedule-grid label{
  display:grid;
  gap:6px;
  font-size:13px;
}

.retention-schedule-grid label span{
  font-weight:600;
}

.retention-schedule-grid input{
  width:100%;
  box-sizing:border-box;
  border:1px solid rgba(255,255,255,0.12);
  background:rgba(10,16,42,0.28);
  color:white;
  border-radius:14px;
  padding:12px 14px;
  font:inherit;
  transition:
    border-color 0.25s ease,
    box-shadow 0.25s ease,
    background 0.35s ease,
    color 0.35s ease;
}

.retention-schedule-grid input:focus{
  outline:none;
  border-color:rgba(34,211,238,0.68);
  box-shadow:0 0 0 4px rgba(34,211,238,0.12);
}

.retention-actions{
  margin-top:16px;
  display:flex;
  gap:12px;
  flex-wrap:wrap;
}

/* PROGRESS */
.progress-info p{
  margin:10px 0;
  font-size:15px;
}

.career-path-panel{
  margin-top:18px;
  padding:16px;
  border-radius:16px;
  background:rgba(10,16,42,0.24);
  border:1px solid rgba(255,255,255,0.08);
}

.career-path-label{
  display:block;
  margin-bottom:8px;
  color:#7ff7ff;
  font-size:12px;
  font-weight:800;
  text-transform:uppercase;
}

.career-path-panel strong{
  display:block;
  font-size:22px;
  margin-bottom:4px;
}

.career-path-panel p{
  margin:6px 0;
}

.protection-grid{
  display:grid;
  grid-template-columns:repeat(2,1fr);
  gap:12px;
}

.protection-item{
  min-height:72px;
  padding:14px;
  border-radius:14px;
  background:rgba(10,16,42,0.24);
  border:1px solid rgba(255,255,255,0.08);
  display:flex;
  flex-direction:column;
  justify-content:space-between;
  gap:8px;
  transition:
    background 0.35s ease,
    border-color 0.35s ease,
    color 0.35s ease;
}

.protection-item span{
  font-size:12px;
  opacity:0.78;
  line-height:1.4;
}

.protection-item strong{
  font-size:15px;
  line-height:1.3;
}

.protection-summary{
  margin:16px 0 0;
  padding:12px 14px;
  border-radius:14px;
  background:rgba(0,229,255,0.08);
  border:1px solid rgba(0,229,255,0.16);
  color:#baf8ff;
  font-size:13px;
  line-height:1.6;
}

.protection-actions{
  margin-top:14px;
  display:flex;
  gap:12px;
  flex-wrap:wrap;
}

.privacy-data-grid{
  display:grid;
  grid-template-columns:repeat(2, minmax(0, 1fr));
  gap:12px;
}

.privacy-data-item{
  min-height:112px;
  padding:14px;
  border-radius:14px;
  background:rgba(10,16,42,0.24);
  border:1px solid rgba(255,255,255,0.08);
}

.privacy-data-item span{
  display:block;
  font-size:12px;
  opacity:0.78;
  margin-bottom:8px;
}

.privacy-data-item strong{
  display:block;
  font-size:16px;
  margin-bottom:8px;
}

.privacy-data-item p{
  margin:0;
  font-size:13px;
  line-height:1.5;
  opacity:0.82;
}

.privacy-data-actions{
  margin-top:16px;
  display:flex;
  gap:12px;
  flex-wrap:wrap;
}

.privacy-link-btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  text-decoration:none;
}

.compliance-list{
  display:grid;
  gap:12px;
}

.compliance-item{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  padding:14px;
  border-radius:14px;
  background:rgba(10,16,42,0.24);
  border:1px solid rgba(255,255,255,0.08);
}

.compliance-item span{
  font-size:13px;
  opacity:0.82;
}

.compliance-item strong{
  color:#8df6cb;
  font-size:14px;
  text-align:right;
}

/* BUTTONS */
.action-btn{
  border:none;
  border-radius:12px;
  padding:12px 16px;
  background:#ff2e97;
  color:white;
  cursor:pointer;
  font-weight:600;
  transition:
    transform 0.22s ease,
    box-shadow 0.28s ease,
    filter 0.25s ease,
    background 0.35s ease,
    color 0.35s ease;
}

.action-btn:hover{
  transform:translateY(-2px) scale(1.01);
  box-shadow:0 12px 24px rgba(255,46,151,0.2);
  filter:brightness(1.04);
}

.theme-action-btn{
  background:linear-gradient(135deg,#00e5ff,#00ffcc);
  color:#081228;
  box-shadow:0 0 16px rgba(0,229,255,0.14);
}

.logout-action{
  background:#ff2e97;
}

.danger-btn{
  background:#ef4444;
}

.warning-btn{
  background:#f59e0b;
}

.system-actions{
  display:flex;
  gap:14px;
  flex-wrap:wrap;
}

/* SWITCH */
.switch{
  position:relative;
  display:inline-block;
  width:54px;
  height:30px;
  flex-shrink:0;
}

.switch input{
  opacity:0;
  width:0;
  height:0;
}

.slider{
  position:absolute;
  cursor:pointer;
  inset:0;
  background:#777;
  transition:.3s ease;
  border-radius:34px;
  box-shadow:inset 0 0 0 1px rgba(255,255,255,0.05);
}

.slider:before{
  position:absolute;
  content:"";
  height:22px;
  width:22px;
  left:4px;
  bottom:4px;
  background:white;
  transition:.3s ease;
  border-radius:50%;
  box-shadow:0 3px 8px rgba(0,0,0,0.18);
}

.switch input:checked + .slider{
  background:#00e5ff;
  box-shadow:0 0 14px rgba(0,229,255,0.2);
}

.switch input:checked + .slider:before{
  transform:translateX(24px);
}

/* THEME BUTTON */
.theme-toggle{
  position:fixed;
  bottom:20px;
  right:20px;
  width:55px;
  height:55px;
  border:none;
  border-radius:50%;
  display:flex;
  align-items:center;
  justify-content:center;
  font-size:20px;
  cursor:pointer;
  background:linear-gradient(135deg,#00e5ff,#00ffcc);
  color:#000;
  box-shadow:0 0 15px #00e5ff;
  transition:
    transform 0.28s ease,
    box-shadow 0.35s ease,
    background 0.35s ease,
    color 0.35s ease;
  z-index:1000;
}

.theme-toggle:hover{
  transform:scale(1.1) rotate(10deg);
  box-shadow:0 0 24px rgba(0,229,255,0.45);
}

/* POPUPS */
.popup{
  position:fixed;
  inset:0;
  background:rgba(0,0,0,0.65);
  display:flex;
  justify-content:center;
  align-items:center;
  opacity:0;
  pointer-events:none;
  transition:0.25s;
  z-index:1200;
}

.popup.active{
  opacity:1;
  pointer-events:auto;
}

.popup-box{
  width:360px;
  max-width:90%;
  background:#1a1140;
  border-radius:18px;
  padding:24px;
  box-shadow:0 0 35px rgba(255,46,151,0.45);
  text-align:center;
  transition:
    background 0.35s ease,
    color 0.35s ease,
    box-shadow 0.35s ease;
}

.popup-box h3{
  margin:0 0 12px 0;
}

.popup-box p{
  margin:0;
  line-height:1.6;
  font-size:14px;
  opacity:0.95;
}

.popup-actions{
  display:flex;
  flex-direction:column;
  gap:10px;
  margin-top:18px;
}

.popup-actions button{
  border:none;
  border-radius:12px;
  padding:12px;
  cursor:pointer;
  font-weight:600;
  background:#ff2e97;
  color:white;
}

.popup-actions .secondary-btn{
  background:transparent;
  border:2px solid #00e5ff;
  color:#00e5ff;
}

/* ANIMATIONS */
@keyframes fadeSlideUp{
  from{
    opacity:0;
    transform:translateY(18px);
  }
  to{
    opacity:1;
    transform:translateY(0);
  }
}

/* LIGHT MODE */
body.light-mode{
  background:#f4f6fb;
  color:#222;
}

body.light-mode .sidebar{
  background:white;
}

body.light-mode .sidebar-toggle{
  background:rgba(108,76,255,0.1);
}

body.light-mode .sidebar-toggle span{
  background:#1a1140;
}

body.light-mode .menu a{
  color:#222;
}

body.light-mode .card{
  background:white;
  color:#222;
  box-shadow:0 5px 15px rgba(0,0,0,0.1);
}

body.light-mode .user-top{
  background:#ffffff;
  box-shadow:0 5px 15px rgba(0,0,0,0.08);
}

body.light-mode .setting-row{
  border-bottom:1px solid rgba(0,0,0,0.08);
}

body.light-mode .popup-box{
  background:white;
  color:#222;
  box-shadow:0 10px 30px rgba(0,0,0,0.15);
}

body.light-mode .popup-actions .secondary-btn{
  color:#0077ff;
  border-color:#0077ff;
}

body.light-mode .status-pill.locked{
  background:#ececf7;
  color:#222;
}

body.light-mode .profile-edit-form input{
  background:#f6f8fc;
  color:#222;
  border-color:rgba(0,0,0,0.1);
}

body.light-mode .account-security-panel{
  border-top-color:rgba(0,0,0,0.08);
}

body.light-mode .account-security-grid input{
  background:#f6f8fc;
  color:#222;
  border-color:rgba(0,0,0,0.1);
}

body.light-mode .account-security-warning{
  background:rgba(245,158,11,0.12);
  border-color:rgba(180,83,9,0.22);
  color:#92400e;
}

body.light-mode .retention-schedule-grid input{
  background:#f6f8fc;
  color:#222;
  border-color:rgba(0,0,0,0.1);
}

body.light-mode .theme-toggle{
  background:linear-gradient(135deg,#ff2e97,#ff8c00);
  color:white;
  box-shadow:0 0 15px rgba(255,46,151,0.35);
}

body.light-mode .theme-action-btn{
  background:linear-gradient(135deg,#ff2e97,#ff8c00);
  color:white;
  box-shadow:0 0 16px rgba(255,46,151,0.14);
}

body.light-mode .secondary-action-btn{
  border-color:rgba(255,46,151,0.35);
  color:#c72d7c;
}

body.light-mode .slider{
  background:#d8dfeb;
}

body.light-mode .switch input:checked + .slider{
  background:#00c8ff;
  box-shadow:0 0 14px rgba(0,200,255,0.18);
}

body.light-mode .volume-control input[type="range"]{
  background:#d8dfeb;
}

body.light-mode .volume-control input[type="range"]::-webkit-slider-thumb{
  background:linear-gradient(135deg,#ff2e97,#ff8c00);
  box-shadow:0 8px 18px rgba(255,46,151,0.2);
}

body.light-mode .volume-control input[type="range"]::-moz-range-thumb{
  background:#ff2e97;
  box-shadow:0 8px 18px rgba(255,46,151,0.2);
}

body.light-mode .volume-control span{
  color:#0f766e;
}

body.light-mode .select-control select{
  background:#f6f8fc;
  color:#222;
  border-color:rgba(0,0,0,0.1);
}

body.access-text-large{
  font-size:116%;
}

body.access-text-extra-large{
  font-size:130%;
}

body.access-text-large .menu a{
  font-size:16px;
}

body.access-text-extra-large .menu a{
  font-size:18px;
}

body.access-text-large .page-title{
  font-size:38px;
}

body.access-text-extra-large .page-title{
  font-size:46px;
}

body.access-text-large .settings-card h3{
  font-size:24px;
}

body.access-text-extra-large .settings-card h3{
  font-size:30px;
}

body.access-text-large .setting-row p,
body.access-text-large .account-info p,
body.access-text-large .profile-edit-form label,
body.access-text-large .account-security-note,
body.access-text-large .account-security-warning,
body.access-text-large .settings-section-note,
body.access-text-large .protection-summary,
body.access-text-large .protection-item span{
  font-size:15px;
}

body.access-text-extra-large .setting-row p,
body.access-text-extra-large .account-info p,
body.access-text-extra-large .profile-edit-form label,
body.access-text-extra-large .account-security-note,
body.access-text-extra-large .account-security-warning,
body.access-text-extra-large .settings-section-note,
body.access-text-extra-large .protection-summary,
body.access-text-extra-large .protection-item span{
  font-size:18px;
}

body.access-text-large .protection-item strong{
  font-size:18px;
}

body.access-text-extra-large .protection-item strong{
  font-size:22px;
}

body.access-text-large .action-btn,
body.access-text-large input,
body.access-text-large select{
  font-size:15px;
}

body.access-text-extra-large .action-btn,
body.access-text-extra-large input,
body.access-text-extra-large select{
  font-size:18px;
}

body.access-text-extra-large .settings-grid{
  grid-template-columns:1fr;
}

body.access-text-extra-large .card{
  padding:28px;
}

body.access-text-extra-large .setting-row{
  gap:28px;
  padding:20px 0;
}

body.access-text-extra-large .volume-control,
body.access-text-extra-large .select-control{
  width:min(360px, 48%);
  min-width:280px;
}

body.access-text-extra-large .read-aloud-actions{
  justify-content:flex-start;
}

body.access-high-contrast{
  color:#fff;
}

body.access-high-contrast .card,
body.access-high-contrast .sidebar,
body.access-high-contrast .popup-box,
body.access-high-contrast .user-top{
  border:2px solid rgba(141,246,203,0.55);
}

body.access-high-contrast .setting-row,
body.access-high-contrast .account-security-panel{
  border-color:rgba(255,255,255,0.24);
}

body.access-high-contrast a:focus-visible,
body.access-high-contrast button:focus-visible,
body.access-high-contrast input:focus-visible,
body.access-high-contrast select:focus-visible{
  outline:4px solid #8df6cb;
  outline-offset:4px;
}

body.light-mode.access-high-contrast{
  color:#111827;
}

body.light-mode.access-high-contrast .card,
body.light-mode.access-high-contrast .sidebar,
body.light-mode.access-high-contrast .popup-box,
body.light-mode.access-high-contrast .user-top{
  border:2px solid #0f766e;
  box-shadow:0 8px 20px rgba(15,118,110,0.16);
}

body.access-reduced-motion *,
body.access-reduced-motion *::before,
body.access-reduced-motion *::after{
  animation-duration:0.01ms !important;
  animation-iteration-count:1 !important;
  scroll-behavior:auto !important;
  transition-duration:0.01ms !important;
}

/* RESPONSIVE */
@media(max-width:1100px){
  .settings-grid{
    grid-template-columns:1fr;
  }

  .full-width{
    grid-column:auto;
  }
}

@media(max-width:900px){
  .layout{
    flex-direction:column;
    position:relative;
  }

  .sidebar-toggle{
    display:inline-flex;
  }

  .sidebar{
    display:none;
    position:fixed;
    top:84px;
    left:12px;
    right:12px;
    width:auto;
    min-height:auto;
    max-height:calc(100vh - 108px);
    overflow:auto;
    border-radius:22px;
    box-shadow:0 18px 42px rgba(6,8,28,0.4);
    border:1px solid rgba(255,255,255,0.08);
    z-index:1200;
  }

  .layout.mobile-nav-open .sidebar{
    display:flex;
  }

  .layout.mobile-nav-open .sidebar-toggle span:nth-child(1){
    transform:translateY(7px) rotate(45deg);
  }

  .layout.mobile-nav-open .sidebar-toggle span:nth-child(2){
    opacity:0;
  }

  .layout.mobile-nav-open .sidebar-toggle span:nth-child(3){
    transform:translateY(-7px) rotate(-45deg);
  }

  .main{
    padding:20px;
  }

  .topbar{
    flex-direction:row;
    align-items:center;
    justify-content:space-between;
    flex-wrap:nowrap;
  }

  .user-top{
    margin-left:auto;
    align-self:auto;
    flex-shrink:0;
  }
}

@media(max-width:600px){
  .main{
    padding:16px 12px 24px;
  }

  .topbar{
    gap:10px;
  }

  .topbar-title{
    flex:1;
    min-width:0;
  }

  .page-title{
    font-size:28px;
  }

  .page-subtitle{
    display:none;
  }

  .user-top{
    padding:8px 10px;
    gap:8px;
  }

  .user-top span{
    font-size:13px;
    white-space:nowrap;
  }

  .user-top img{
    width:34px;
    height:34px;
  }

  .sidebar{
    top:72px;
    left:10px;
    right:10px;
    padding:18px;
  }

  .menu{
    gap:20px;
    padding-top:8px;
  }

  .account-box{
    flex-direction:column;
    align-items:flex-start;
  }

  .profile-form-grid{
    grid-template-columns:1fr;
  }

  .account-security-grid{
    grid-template-columns:1fr;
  }

  .retention-schedule-grid{
    grid-template-columns:1fr;
  }

  .protection-grid{
    grid-template-columns:1fr;
  }

  .privacy-data-grid{
    grid-template-columns:1fr;
  }

  .setting-row{
    flex-direction:column;
    align-items:flex-start;
  }

  .volume-control{
    width:100%;
    min-width:0;
  }

  .select-control{
    width:100%;
    min-width:0;
  }

  .read-aloud-actions{
    width:100%;
    justify-content:flex-start;
  }
}

.progress-bar-container {
  width: 100%;
  height: 12px;
  background: rgba(255,255,255,0.22);
  border-radius: 10px;
  overflow: hidden;
  margin-top: 8px;
  margin-bottom: 6px;
  box-shadow: inset 0 0 6px rgba(0,0,0,0.18);
}

.progress-bar {
  height: 100%;
  width: 0%;
  border-radius: 10px;
  transition: width 0.4s ease;
}

.xp-bar {
  background: linear-gradient(90deg, #00f5a0, #00d9f5);
  box-shadow: 0 0 8px rgba(0, 245, 160, 0.45);
}

.level-bar {
  background: linear-gradient(90deg, #ffd54f, #ff9800);
  box-shadow: 0 0 8px rgba(255, 193, 7, 0.45);
}

.subject-bar {
  background: linear-gradient(90deg, #ff5f8a, #ff8fab);
  box-shadow: 0 0 8px rgba(255, 95, 138, 0.45);
}

.career-bar {
  background: linear-gradient(90deg, #ff2e97, #00e5ff, #32ffc7);
  box-shadow: 0 0 8px rgba(0, 229, 255, 0.42);
}

.progress-text {
  font-size: 12px;
  opacity: 0.85;
  margin: 0 0 12px 0;
}

.performance-diagnostics-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:14px;
  margin:16px 0;
}

.performance-stat,
.performance-log-row{
  border:1px solid rgba(255,255,255,0.08);
  background:rgba(20,14,52,0.42);
  border-radius:12px;
  padding:14px;
}

.performance-stat span,
.performance-log-row span{
  display:block;
  font-size:12px;
  color:#c9c1ef;
  margin-bottom:6px;
}

.performance-stat strong,
.performance-log-row strong{
  color:#fff;
}

.performance-stat p{
  margin:8px 0 0;
  color:#d8d1ef;
  font-size:13px;
}

.performance-log-list{
  display:grid;
  gap:10px;
  margin-bottom:16px;
}

.performance-log-row{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
}

.performance-log-row.good strong{ color:#7fffd6; }
.performance-log-row.watch strong{ color:#ffd166; }
.performance-log-row.slow strong{ color:#ff8fab; }

.performance-actions{
  display:flex;
  flex-wrap:wrap;
  gap:12px;
}

body.light-mode .progress-bar-container {
  background: rgba(0,0,0,0.08);
}

body.light-mode .progress-text {
  color: #555;
}

body.light-mode .performance-stat,
body.light-mode .performance-log-row{
  background:rgba(255,255,255,0.78);
  border-color:rgba(42,34,85,0.14);
}

body.light-mode .performance-stat span,
body.light-mode .performance-log-row span,
body.light-mode .performance-stat p{
  color:#5a5470;
}

body.light-mode .performance-stat strong,
body.light-mode .performance-log-row strong{
  color:#19142d;
}

body.light-mode .career-path-panel{
  background:#f6f8fc;
  border-color:rgba(0,0,0,0.08);
}

body.light-mode .career-path-label{
  color:#007ca6;
}

body.light-mode .protection-item{
  background:#f6f8fc;
  border-color:rgba(0,0,0,0.08);
}

body.light-mode .privacy-data-item{
  background:#f6f8fc;
  border-color:rgba(0,0,0,0.08);
}

body.light-mode .compliance-item{
  background:#f6f8fc;
  border-color:rgba(0,0,0,0.08);
}

body.light-mode .compliance-item strong{
  color:#0f766e;
}

body.light-mode .protection-summary{
  background:rgba(15,118,110,0.08);
  border-color:rgba(15,118,110,0.16);
  color:#0f766e;
}
