.mobile-reference-statusbar,
.mobile-reference-auth-topbar,
.mobile-card-badge,
.mobile-reference-registration-link,
.mobile-auth-about{display:none}

@media (max-width:900px){
  :root{--mobile-auth-navy:#09152f;--mobile-auth-blue:#1556ce;--mobile-auth-line:#d7dce7;--mobile-auth-muted:#747c8e;--mobile-auth-shadow:0 10px 25px rgba(39,47,69,.10)}
  html,body{margin:0;min-height:100%;background:#000!important;color:var(--mobile-auth-navy);font-family:Inter,ui-sans-serif,-apple-system,BlinkMacSystemFont,"Segoe UI",Arial,sans-serif}
  body{overflow-x:hidden}
  .auth-shell{width:min(810px,100%);min-height:1672px;margin:0 auto;background:linear-gradient(145deg,#fffdf8,#f9f7f3);border:16px solid #151719;border-radius:78px;padding:20px 36px 42px;overflow:hidden;position:relative;box-shadow:none}
  .auth-shell::before,.auth-shell::after,.top-actions,.left-side,.footer,.divider,.security-note{display:none!important}
  .mobile-reference-statusbar{height:59px;display:flex;justify-content:space-between;align-items:flex-start;padding:0 23px;font-size:29px;font-weight:700;color:#080808}
  .mobile-reference-system-icons{display:flex;gap:11px;align-items:center}
  .mobile-reference-system-icons>svg{width:31px;height:24px;fill:none;stroke:#080808;stroke-width:3;stroke-linecap:round}
  .mobile-reference-signal{display:flex;align-items:flex-end;gap:3px;height:24px}
  .mobile-reference-signal i{width:5px;background:#080808;border-radius:3px}
  .mobile-reference-signal i:nth-child(1){height:8px}.mobile-reference-signal i:nth-child(2){height:13px}.mobile-reference-signal i:nth-child(3){height:18px}.mobile-reference-signal i:nth-child(4){height:23px}
  .mobile-reference-battery{display:block;width:42px;height:22px;border:2.4px solid #111;border-radius:5px;position:relative}
  .mobile-reference-battery:after{content:"";position:absolute;right:-5px;top:6px;width:3px;height:8px;background:#111}
  .mobile-reference-battery i{position:absolute;inset:3px;background:#111;border-radius:2px}
  .mobile-reference-auth-topbar{height:152px;display:flex;align-items:center;justify-content:space-between;padding:0 16px 6px}
  .mobile-reference-auth-topbar h1{font-size:52px;line-height:1;margin:0;font-weight:750;letter-spacing:-1.4px;color:var(--mobile-auth-navy)}
  .mobile-reference-auth-actions{display:flex;gap:22px}
  .mobile-reference-auth-actions button,.mobile-reference-auth-actions a{width:97px;height:104px;border:0;background:#fff;border-radius:17px;box-shadow:var(--mobile-auth-shadow);display:flex;flex-direction:column;align-items:center;justify-content:center;gap:6px;color:var(--mobile-auth-navy);font-size:17px;text-decoration:none;padding:0}
  .mobile-reference-auth-actions svg{width:43px;height:43px;fill:none;stroke:currentColor;stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round}
  .auth-layout{min-height:auto;display:block;padding:0;position:relative}
  .right-side{display:block;padding:0}
  .login-card{width:100%;min-height:auto;padding:36px 30px 31px;margin:0 0 32px;background:rgba(255,255,255,.96);border:1px solid #eee;border-radius:34px;box-shadow:var(--mobile-auth-shadow)}
  .login-card h2,.login-card>p{display:none!important}
  .mobile-card-badge{width:max-content;margin:0 auto 32px;padding:11px 24px;background:#edf3ff;color:var(--mobile-auth-blue);border-radius:16px;display:flex;align-items:center;gap:12px;font-weight:650;font-size:28px}
  .mobile-card-badge svg{width:39px;height:39px;fill:var(--mobile-auth-blue);stroke:var(--mobile-auth-blue);stroke-width:1.2}
  #login-form>label{font-size:23px;font-weight:620;display:block;margin:0 0 29px}
  #login-form>label>span{margin:0;color:var(--mobile-auth-navy);font-size:23px;font-weight:620}
  .input-wrap{height:78px;margin:13px 0 0;border:1.5px solid #ccd3df;border-radius:15px;display:flex;align-items:center;padding:0 20px;gap:18px;background:#fff}
  .input-wrap>svg{position:static;transform:none;width:38px;height:38px;flex:0 0 38px;fill:none;stroke:#6f778a;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round;color:#6f778a}
  .input-wrap input{height:auto;width:100%;border:0!important;outline:0;background:transparent!important;padding:0!important;color:var(--mobile-auth-navy);font-size:24px;box-shadow:none!important}
  .input-wrap input::placeholder{color:#80889a}
  .password-toggle-btn{position:static!important;transform:none!important;width:auto!important;height:auto!important;border:0!important;background:transparent!important;padding:4px!important;box-shadow:none!important}
  .password-toggle-btn svg{width:37px!important;height:37px!important;fill:none;stroke:#6f778a;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
  .form-row{margin:4px 0 34px;display:flex;align-items:center;justify-content:space-between;font-size:21px}
  .remember{display:flex;align-items:center;gap:14px}
  .remember i{width:39px;height:39px;border:2px solid #adb5c4;border-radius:9px;background:#fff}
  .remember span{font-size:21px!important;font-weight:400!important;color:var(--mobile-auth-navy)!important}
  .form-row>a{color:#0c57da;text-decoration:none;font-size:21px;font-weight:400}
  .submit-btn{width:100%;height:78px;border:0;border-radius:12px;background:linear-gradient(135deg,#2962c7,#174fb6);color:#fff;font-size:30px;font-weight:400;box-shadow:none}
  .mobile-reference-registration-link{display:block;text-align:center;margin:26px 0 2px;font-size:21px;color:var(--mobile-auth-navy)}
  .mobile-reference-registration-link a{color:#0c57da;text-decoration:none}
  .twofa-panel,.superadmin-panel{margin-top:24px}
  .mobile-auth-about{display:block;padding:26px 30px 29px;background:rgba(255,255,255,.96);border:1px solid #eee;border-radius:34px;box-shadow:var(--mobile-auth-shadow)}
  .mobile-auth-about h3{font-size:31px;margin:0 0 25px;color:var(--mobile-auth-navy)}
  .mobile-auth-about__item{min-height:112px;border:1px solid #e0e4eb;border-radius:15px;padding:15px 16px;display:flex;align-items:center;gap:27px;margin-bottom:13px;background:transparent}
  .mobile-auth-about__item:last-child{margin-bottom:0}
  .mobile-auth-about__item i{width:72px;height:72px;border-radius:13px;background:#eef4ff;display:flex;align-items:center;justify-content:center;flex:0 0 72px;font-style:normal}
  .mobile-auth-about__item i svg{width:46px;height:46px;fill:none;stroke:#2360c9;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
  .mobile-auth-about__item strong{font-size:23px;margin:0 0 8px;display:block;color:var(--mobile-auth-navy)}
  .mobile-auth-about__item span{font-size:18px;color:var(--mobile-auth-muted);margin:0;line-height:1.38;display:block}
  html[data-theme="dark"] body{background:#000!important}
  html[data-theme="dark"] .auth-shell{background:linear-gradient(145deg,#fffdf8,#f9f7f3)!important}
  html[data-theme="dark"] .login-card,html[data-theme="dark"] .mobile-auth-about{background:rgba(255,255,255,.96)!important;border-color:#eee!important}
  html[data-theme="dark"] .mobile-reference-auth-topbar h1,html[data-theme="dark"] #login-form>label>span,html[data-theme="dark"] .remember span,html[data-theme="dark"] .mobile-reference-registration-link,html[data-theme="dark"] .mobile-auth-about h3,html[data-theme="dark"] .mobile-auth-about__item strong{color:var(--mobile-auth-navy)!important}
  html[data-theme="dark"] .input-wrap{background:#fff!important;border-color:#ccd3df!important}
  html[data-theme="dark"] .input-wrap input{color:var(--mobile-auth-navy)!important}
}

@media(max-width:700px){
  .auth-shell{min-height:100vh;border-width:8px;border-radius:40px;padding:10px 18px 24px}
  .mobile-reference-statusbar{height:38px;font-size:18px;padding:0 12px}
  .mobile-reference-system-icons{transform:scale(.65);transform-origin:right top}
  .mobile-reference-auth-topbar{height:100px;padding:0 8px}
  .mobile-reference-auth-topbar h1{font-size:34px}
  .mobile-reference-auth-actions{gap:9px}
  .mobile-reference-auth-actions button,.mobile-reference-auth-actions a{width:62px;height:67px;font-size:11px;border-radius:12px}
  .mobile-reference-auth-actions svg{width:28px;height:28px}
  .login-card{padding:24px 18px}
  .mobile-card-badge{font-size:19px;margin-bottom:25px}
  .mobile-card-badge svg{width:30px;height:30px}
  #login-form>label{font-size:16px;margin-bottom:20px}
  #login-form>label>span{font-size:16px}
  .input-wrap{height:58px;margin-top:8px;padding:0 14px;gap:12px}
  .input-wrap>svg{width:28px;height:28px;flex-basis:28px}
  .input-wrap input{font-size:16px}
  .password-toggle-btn svg{width:28px!important;height:28px!important}
  .form-row,.mobile-reference-registration-link{font-size:14px}
  .remember span,.form-row>a{font-size:14px!important}
  .remember i{width:27px;height:27px}
  .submit-btn{height:58px;font-size:20px}
  .mobile-auth-about{padding:20px 18px}
  .mobile-auth-about h3{font-size:24px}
  .mobile-auth-about__item{min-height:84px;gap:14px}
  .mobile-auth-about__item i{width:51px;height:51px;flex-basis:51px}
  .mobile-auth-about__item i svg{width:32px;height:32px}
  .mobile-auth-about__item strong{font-size:16px}
  .mobile-auth-about__item span{font-size:13px}
}
@media(max-width:430px){
  .mobile-reference-auth-topbar h1{font-size:30px;letter-spacing:-1px}
  .mobile-reference-auth-actions{gap:7px}
  .mobile-reference-auth-actions button,.mobile-reference-auth-actions a{width:58px;height:64px;font-size:10px}
  .mobile-reference-auth-actions svg{width:26px;height:26px}
}

/* v1.0.90: real mobile header and complete light/dark theme support */
@media (max-width: 900px) {
  html[data-theme="light"] {
    --auth-mobile-page: #f6f3ed;
    --auth-mobile-shell: linear-gradient(145deg, #fffdf8, #f8f5ef);
    --auth-mobile-card: rgba(255, 255, 255, .97);
    --auth-mobile-card-solid: #ffffff;
    --auth-mobile-border: #d9deea;
    --auth-mobile-text: #09152f;
    --auth-mobile-muted: #68748a;
    --auth-mobile-field: #ffffff;
    --auth-mobile-field-border: #cbd3e1;
    --auth-mobile-action: #ffffff;
    --auth-mobile-soft: #edf3ff;
    --auth-mobile-shadow: 0 10px 25px rgba(39, 47, 69, .10);
    --auth-mobile-frame: #151719;
  }

  html[data-theme="dark"] {
    --auth-mobile-page: #020612;
    --auth-mobile-shell: linear-gradient(160deg, #071329 0%, #040a18 100%);
    --auth-mobile-card: rgba(10, 24, 52, .97);
    --auth-mobile-card-solid: #0b1a38;
    --auth-mobile-border: #294775;
    --auth-mobile-text: #f3f7ff;
    --auth-mobile-muted: #aebbd1;
    --auth-mobile-field: #07162f;
    --auth-mobile-field-border: #315386;
    --auth-mobile-action: #0d2146;
    --auth-mobile-soft: #102a5b;
    --auth-mobile-shadow: 0 12px 30px rgba(0, 0, 0, .28);
    --auth-mobile-frame: #02040a;
  }

  html,
  body {
    background: var(--auth-mobile-page) !important;
    color: var(--auth-mobile-text) !important;
  }

  .mobile-reference-statusbar {
    display: none !important;
  }

  .auth-shell,
  html[data-theme="dark"] .auth-shell {
    min-height: 100vh;
    background: var(--auth-mobile-shell) !important;
    border-color: var(--auth-mobile-frame) !important;
    color: var(--auth-mobile-text) !important;
    transition: background-color .2s ease, border-color .2s ease, color .2s ease;
  }

  .mobile-reference-auth-topbar {
    height: 118px;
    padding-top: 10px;
  }

  .mobile-reference-auth-topbar h1,
  html[data-theme="dark"] .mobile-reference-auth-topbar h1 {
    color: var(--auth-mobile-text) !important;
  }

  .mobile-reference-auth-actions {
    gap: 10px;
  }

  .mobile-reference-auth-actions button,
  .mobile-reference-auth-actions a,
  html[data-theme="dark"] .mobile-reference-auth-actions button,
  html[data-theme="dark"] .mobile-reference-auth-actions a {
    border: 1px solid var(--auth-mobile-border);
    background: var(--auth-mobile-action) !important;
    color: var(--auth-mobile-text) !important;
    box-shadow: var(--auth-mobile-shadow);
    transition: background-color .2s ease, border-color .2s ease, color .2s ease;
  }

  .mobile-reference-auth-actions button:focus-visible,
  .mobile-reference-auth-actions a:focus-visible {
    outline: 3px solid rgba(48, 116, 255, .35);
    outline-offset: 2px;
  }

  .mobile-theme-toggle__icons {
    width: 43px;
    height: 43px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2px;
    border-radius: 12px;
    background: var(--auth-mobile-soft);
  }

  .mobile-theme-toggle__icons i {
    width: 18px;
    height: 18px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    font-style: normal;
    font-size: 15px;
    line-height: 1;
  }

  html[data-theme="light"] .mobile-theme-toggle__sun {
    background: #fff0b8;
    color: #d98900;
  }

  html[data-theme="light"] .mobile-theme-toggle__moon {
    color: #49617e;
  }

  html[data-theme="dark"] .mobile-theme-toggle__sun {
    color: #f6c94f;
  }

  html[data-theme="dark"] .mobile-theme-toggle__moon {
    background: #284a85;
    color: #ffffff;
  }

  .login-card,
  .mobile-auth-about,
  html[data-theme="dark"] .login-card,
  html[data-theme="dark"] .mobile-auth-about {
    background: var(--auth-mobile-card) !important;
    border-color: var(--auth-mobile-border) !important;
    box-shadow: var(--auth-mobile-shadow) !important;
    color: var(--auth-mobile-text) !important;
  }

  .mobile-card-badge,
  html[data-theme="dark"] .mobile-card-badge {
    background: var(--auth-mobile-soft) !important;
    color: #4f8cff !important;
  }

  #login-form > label > span,
  .remember span,
  .mobile-reference-registration-link,
  .mobile-auth-about h3,
  .mobile-auth-about__item strong,
  html[data-theme="dark"] #login-form > label > span,
  html[data-theme="dark"] .remember span,
  html[data-theme="dark"] .mobile-reference-registration-link,
  html[data-theme="dark"] .mobile-auth-about h3,
  html[data-theme="dark"] .mobile-auth-about__item strong {
    color: var(--auth-mobile-text) !important;
  }

  .input-wrap,
  html[data-theme="dark"] .input-wrap {
    background: var(--auth-mobile-field) !important;
    border-color: var(--auth-mobile-field-border) !important;
    color: var(--auth-mobile-text) !important;
  }

  .input-wrap:focus-within {
    border-color: #4f8cff !important;
    box-shadow: 0 0 0 3px rgba(61, 126, 255, .18) !important;
  }

  .input-wrap input,
  html[data-theme="dark"] .input-wrap input {
    color: var(--auth-mobile-text) !important;
    -webkit-text-fill-color: var(--auth-mobile-text);
  }

  .input-wrap input::placeholder,
  html[data-theme="dark"] .input-wrap input::placeholder {
    color: var(--auth-mobile-muted) !important;
    opacity: 1;
  }

  .input-wrap > svg,
  .password-toggle-btn svg {
    color: var(--auth-mobile-muted) !important;
    stroke: currentColor !important;
  }

  .remember i,
  html[data-theme="dark"] .remember i {
    background: var(--auth-mobile-field) !important;
    border-color: var(--auth-mobile-field-border) !important;
  }

  .remember input:checked + i {
    background: #2264dc !important;
    border-color: #2264dc !important;
  }

  .form-row > a,
  .mobile-reference-registration-link a {
    color: #4285ff !important;
  }

  .mobile-auth-about__item,
  html[data-theme="dark"] .mobile-auth-about__item {
    background: var(--auth-mobile-card-solid) !important;
    border-color: var(--auth-mobile-border) !important;
  }

  .mobile-auth-about__item span,
  html[data-theme="dark"] .mobile-auth-about__item span {
    color: var(--auth-mobile-muted) !important;
  }

  .mobile-auth-about__item i {
    background: var(--auth-mobile-soft) !important;
  }

  .twofa-panel,
  .superadmin-panel {
    border-color: var(--auth-mobile-border) !important;
    background: var(--auth-mobile-card-solid) !important;
    color: var(--auth-mobile-text) !important;
  }

  .auth-message {
    border-color: var(--auth-mobile-border);
  }
}

@media (max-width: 700px) {
  .mobile-reference-auth-topbar {
    height: 82px;
    padding: 6px 4px 4px;
  }

  .mobile-reference-auth-actions {
    gap: 6px;
  }

  .mobile-reference-auth-actions button,
  .mobile-reference-auth-actions a {
    width: 58px;
    height: 62px;
    font-size: 10px;
  }

  .mobile-reference-auth-actions svg,
  .mobile-theme-toggle__icons {
    width: 27px;
    height: 27px;
  }

  .mobile-theme-toggle__icons i {
    width: 13px;
    height: 13px;
    font-size: 11px;
  }
}

@media (max-width: 430px) {
  .mobile-reference-auth-topbar {
    height: 76px;
    padding-inline: 2px;
  }

  .mobile-reference-auth-topbar h1 {
    font-size: 28px;
  }

  .mobile-reference-auth-actions button,
  .mobile-reference-auth-actions a {
    width: 52px;
    height: 57px;
    border-radius: 10px;
    font-size: 9px;
  }
}

