/* ==========================================================
   MAU DESIGN LIBRARY v1.2
   Foundation + Glow Engine + Desktop OS + App UI + Legacy Adapters
========================================================== */

/* ==========================================================
   01) TOKENS / RESET
========================================================== */
*,
*::before,
*::after { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
}

:root{
  --mau-bg-0: #050505;
  --mau-bg-1: #0b0b0b;
  --mau-bg-2: #111111;
  --mau-panel: #101010;

  --mau-text: #e8ecf3;
  --mau-text-dim: rgba(232,236,243,0.72);
  --mau-text-muted: rgba(232,236,243,0.52);

  --mau-border: rgba(255,255,255,0.12);
  --mau-border-strong: rgba(255,255,255,0.18);

  --mau-accent: #53a7ff;
  --mau-accent-2: #ae00ff;
  --mau-danger: #ff6b6b;
  --mau-success: #45d483;
  --mau-warn: #ffd000;

  --mau-glow-soft: 0 0 10px rgba(83,167,255,0.35);
  --mau-glow-mid: 0 0 18px rgba(83,167,255,0.55);
  --mau-glow-strong: 0 0 30px rgba(83,167,255,0.75);

  --mau-shadow-1: 0 10px 30px rgba(0,0,0,0.55);
  --mau-shadow-2: 0 16px 42px rgba(0,0,0,0.65);

  --mau-r-xs: 6px;
  --mau-r-sm: 10px;
  --mau-r-md: 14px;
  --mau-r-lg: 18px;

  --mau-pad-1: 8px;
  --mau-pad-2: 12px;
  --mau-pad-3: 16px;
  --mau-pad-4: 22px;

  --mau-fast: 120ms;
  --mau-med: 240ms;
  --mau-slow: 420ms;

  --mau-rainbow: linear-gradient(
    90deg,
    #ff004c,
    #ff7b00,
    #ffe600,
    #00ff88,
    #00cbff,
    #ae00ff,
    #ff004c
  );

  --steam-blue: #66c0f4;
  --steam-blue-deep: #417a9b;
  --steam-green: #a4d007;
  --steam-red: #f45c66;
  --steam-grey: #acb5bd;
  --steam-dark: rgba(0,0,0,0.45);
}

/* ==========================================================
   02) BASE / TYPO / LINKS / SCROLL
========================================================== */
body{
  background: var(--mau-bg-0);
  color: var(--mau-text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  letter-spacing: 0.15px;
  overflow-x: hidden;
}

a{
  color: var(--mau-accent);
  text-decoration: none;
}
a:hover{ text-decoration: underline; }

hr{
  border: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--mau-border-strong), transparent);
  margin: 16px 0;
}

::selection{
  background: rgba(83,167,255,0.22);
  color: var(--mau-text);
}

*::-webkit-scrollbar { width: 10px; height: 10px; }
*::-webkit-scrollbar-thumb{
  background: linear-gradient(180deg, rgba(83,167,255,0.35), rgba(174,0,255,0.22));
  border-radius: 999px;
  border: 2px solid rgba(0,0,0,0.45);
}
*::-webkit-scrollbar-track{
  background: rgba(255,255,255,0.04);
}

.hidden{ display:none !important; }
.mau-muted{ color: var(--mau-text-muted); }
.mau-dim{ color: var(--mau-text-dim); }

/* ==========================================================
   03) GLOW ENGINE
========================================================== */
@keyframes mau-rainbow-flow {
  0% { background-position: 0% 50%; }
  100% { background-position: 400% 50%; }
}

@keyframes mau-pulse {
  0%   { box-shadow: var(--mau-glow-soft); }
  50%  { box-shadow: var(--mau-glow-mid); }
  100% { box-shadow: var(--mau-glow-soft); }
}

@keyframes toastInOut{
  0%{opacity:0;transform:translateY(20px)}
  10%{opacity:1;transform:translateY(0)}
  80%{opacity:1}
  100%{opacity:0;transform:translateY(20px)}
}

@keyframes rain {
  from { background-position:0 0; }
  to { background-position:0 12px; }
}

.mau-glow{
  box-shadow: var(--mau-glow-soft);
  transition: box-shadow var(--mau-med) ease;
}
.mau-glow:hover{ box-shadow: var(--mau-glow-mid); }

.mau-rainbow-border{
  position: relative;
  border-radius: var(--mau-r-md);
  isolation: isolate;
}
.mau-rainbow-border::before{
  content:"";
  position:absolute;
  inset:-2px;
  border-radius: inherit;
  background: var(--mau-rainbow);
  background-size: 400%;
  animation: mau-rainbow-flow 18s linear infinite;
  z-index:-1;
}

.mau-rainbow-line{
  position: fixed;
  top: 56px;
  left: 0;
  right: 0;
  height: 3px;
  width: 100%;
  background: var(--mau-rainbow);
  background-size: 400%;
  animation: mau-rainbow-flow 15s linear infinite;
  border-radius: 999px;
  filter: drop-shadow(0 0 8px rgba(83,167,255,0.25));
  box-shadow: 0 0 8px rgba(180,80,255,0.6);
  z-index: 999;
}

/* ==========================================================
   04) LAYOUT
========================================================== */
.app-shell{
  display:flex;
  flex-direction:column;
  min-height:100vh;
}

.app-body{
  display:block;
  flex:1;
  min-height:0;
  padding-top: 59px;
}

.sidebar{
  position: fixed;
  top: 56px;
  left: 0;
  width: 240px;
  height: calc(100vh - 56px);
  padding: 16px;
  background: rgba(16,16,16,0.96);
  border-right: 1px solid var(--mau-border);
  transform: translateX(-100%);
  transition: transform 0.25s ease;
  z-index: 900;
  overflow-y: auto;
}

.sidebar.is-open{
  transform: translateX(0);
}

.sidebar-menu{
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.menu-section{
  margin-top: 14px;
  margin-bottom: 4px;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--mau-text-muted);
}

.menu-item{
  display: block;
  padding: 10px 12px;
  border-radius: var(--mau-r-xs);
  color: var(--mau-text);
  transition:
    background var(--mau-fast),
    color var(--mau-fast),
    box-shadow var(--mau-fast);
}

.menu-item:hover{
  background: rgba(255,255,255,0.06);
  text-decoration: none;
}

.menu-item.is-active{
  background: rgba(255,255,255,0.08);
  color: var(--mau-accent);
  font-weight: 700;
  box-shadow: inset 0 0 0 1px rgba(83,167,255,0.18);
}

.topbar{
  display:flex;
  justify-content:space-between;
  align-items:center;
  padding: 12px 16px;
  background: rgba(17,17,17,0.86);
  border-bottom: 1px solid var(--mau-border);
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 56px;
  z-index: 1000;
  backdrop-filter: blur(10px);
  box-shadow: 0 0 22px rgba(0,0,0,0.55);
}

.topbar-right{
  display:flex;
  align-items:center;
  gap: 12px;
}

.brand{
  color: var(--mau-text);
  font-weight: 800;
  letter-spacing: 0.4px;
}

.topbar-nav ul{
  list-style:none;
  display:flex;
  gap: 12px;
  padding:0;
  margin:0;
}

.topbar-link a{
  color: var(--mau-text);
  padding: 6px 8px;
  border-radius: var(--mau-r-xs);
}

.topbar-link.is-active a{
  background: rgba(255,255,255,0.06);
  color: var(--mau-accent);
}

.app-content{
  flex:1;
  min-width:0;
  margin-left: 0;
  padding: 24px;
}

.panel-grid{
  display:grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 16px;
}

.panel{
  background: rgba(16,16,16,0.86);
  border: 1px solid var(--mau-border);
  border-radius: var(--mau-r-md);
  overflow:hidden;
  box-shadow: var(--mau-shadow-1);
}

.panel-header{
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding: 12px 16px;
  border-bottom: 1px solid var(--mau-border);
}

.panel-subtitle{
  margin:0;
  font-size: 0.9rem;
  color: var(--mau-text-muted);
}

.panel-body{
  padding: 16px;
}

.panel-body p {
  line-height: 1.55;
}

/* ==========================================================
   05) CONTROLS
========================================================== */
.mau-btn{
  appearance:none;
  border: 2px solid var(--mau-border);
  background: rgba(20,20,20,0.85);
  color: var(--mau-text);
  padding: 10px 16px;
  border-radius: var(--mau-r-sm);
  font-weight: 700;
  cursor:pointer;
  transition: transform var(--mau-fast), border-color var(--mau-fast), box-shadow var(--mau-fast), background var(--mau-fast);
  margin: 0;
}

.mau-btn:hover{
  border-color: rgba(83,167,255,0.70);
  box-shadow: var(--mau-glow-soft);
  transform: translateY(-1px);
}

.mau-btn:active{
  transform: translateY(0px);
  box-shadow: none;
}

.mau-btn.is-primary{
  border-color: rgba(83,167,255,0.75);
  background: rgba(83,167,255,0.14);
}

.mau-btn.is-danger{
  border-color: rgba(255,107,107,0.70);
  background: rgba(255,107,107,0.10);
}

.mau-btn.is-ghost{
  background: transparent;
  border-color: var(--mau-border);
}

.mau-btn.is-event:hover{
  border-color: transparent;
  background: var(--mau-rainbow);
  background-size: 400%;
  animation: mau-rainbow-flow 13s linear infinite;
  color: #000;
  text-shadow: 0 0 6px rgba(255,255,255,0.6);
  box-shadow:
    0 0 6px rgba(83,167,255,0.35),
    0 0 14px rgba(83,167,255,0.28),
    0 0 26px rgba(83,167,255,0.20);
}

.mau-label{
  display:block;
  font-size: 0.85rem;
  font-weight: 700;
  color: rgba(154,203,255,0.92);
  margin-bottom: 6px;
  text-shadow: 0 0 4px rgba(83,167,255,0.25);
}

.mau-input,
textarea.mau-input,
select.mau-input{
  width:100%;
  background: rgba(11,11,11,0.92);
  color: var(--mau-text);
  border: 2px solid rgba(83,167,255,0.22);
  border-radius: var(--mau-r-md);
  padding: 10px 12px;
  transition: border-color var(--mau-fast), box-shadow var(--mau-med), background var(--mau-fast);
}

.mau-input:hover{
  border-color: rgba(83,167,255,0.45);
}

.mau-input:focus{
  outline:none;
  border-color: rgba(83,167,255,0.75);
  box-shadow: var(--mau-glow-soft);
}

.mau-textarea{
  min-height: 120px;
  resize: vertical;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
}

.badge{
  display:inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--mau-border);
  font-size: 0.85rem;
}

.badge.is-alert{
  background: rgba(255,107,107,0.18);
  border-color: rgba(255,107,107,0.45);
  color: #fff;
}

.badge.is-ok{
  background: rgba(69,212,131,0.16);
  border-color: rgba(69,212,131,0.45);
  color: var(--mau-success);
}

/* ==========================================================
   06) OVERLAYS
========================================================== */
.mau-modal-overlay,
#mau-modal-overlay{
  position:fixed;
  inset:0;
  background: rgba(0,0,0,0.55);
  z-index: 9980;
  backdrop-filter: blur(8px);
}

.mau-modal-window{
  position:fixed;
  top:50%;
  left:50%;
  transform: translate(-50%,-50%);
  background: rgba(16,16,16,0.92);
  border: 1px solid var(--mau-border-strong);
  border-radius: var(--mau-r-md);
  padding: 20px;
  min-width: 320px;
  max-width: min(720px, 92vw);
  z-index: 9981;
  box-shadow: var(--mau-shadow-2);
}

.mau-tooltip{
  position: fixed;
  background: rgba(18,18,18,0.92);
  color: var(--mau-text);
  border: 1px solid var(--mau-border-strong);
  padding: 6px 10px;
  border-radius: var(--mau-r-xs);
  font-size: 0.8rem;
  box-shadow: 0 6px 20px rgba(0,0,0,0.7);
  opacity: 0;
  transform: translateY(4px);
  transition: opacity var(--mau-fast) ease, transform var(--mau-fast) ease;
  z-index: 9999;
}

.mau-tooltip.visible{
  opacity:1;
  transform: translateY(0);
}

.mau-context-menu{
  position: fixed;
  background: rgba(18,18,18,0.95);
  border: 1px solid var(--mau-border-strong);
  border-radius: var(--mau-r-sm);
  padding: 4px 0;
  min-width: 160px;
  box-shadow: var(--mau-shadow-2);
  z-index: 9999;
}

.mau-context-menu .item{
  padding: 8px 12px;
  cursor:pointer;
  color: var(--mau-text);
}

.mau-context-menu .item:hover{
  background: rgba(255,255,255,0.06);
  color: var(--mau-accent);
}

/* ==========================================================
   07) BOOT + AUTH
========================================================== */
#mau-boot{
  position: fixed;
  inset: 0;
  z-index: 9998;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  background:#000;
}

.mau-logo{
  width: 260px;
  height: 260px;
  background: var(--mau-rainbow);
  background-size: 400% 400%;
  animation: mau-rainbow-flow 8s linear infinite, mau-pulse 3s ease-in-out infinite;
  mask-size: contain;
  mask-repeat: no-repeat;
  mask-position: center;
  filter: drop-shadow(0 0 15px rgba(83,167,255,0.55));
}

#boot-text{
  background: rgba(25,25,25,0.85);
  margin-top: 40px;
  padding: 16px 28px;
  border-radius: var(--mau-r-md);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 1.05rem;
  color: #ff8a00;
  min-width: 320px;
  text-align:center;
  box-shadow: 0 0 25px rgba(0,0,0,0.6);
}

.mau-progress{
  width: 320px;
  height: 8px;
  border-radius: 999px;
  background: #222;
  margin-top: 18px;
  overflow:hidden;
}

.mau-progress-bar{
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg,#ff8a00,#ffd000);
}

.auth-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.78);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  padding: 20px;
}

.auth-modal {
  width: 100%;
  max-width: 380px;
  background: linear-gradient(180deg, #121212, #0a0a0a);
  border-radius: 14px;
  padding: 24px;
  border: 1px solid rgba(255,255,255,0.08);
  box-shadow:
    0 0 0 1px rgba(255,255,255,0.04),
    0 20px 60px rgba(0,0,0,0.82);
}

.auth-modal h1,
.auth-modal h2 {
  margin: 0 0 16px 0;
  font-size: 1.2rem;
  color: var(--mau-text);
}

.auth-modal form:not(.auth-switch) {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.auth-modal input:not([type="checkbox"]):not([type="radio"]) {
  width: 100%;
  padding: 10px 12px;
  background: #0e0e0e;
  border: 1px solid var(--mau-border);
  border-radius: 8px;
  color: var(--mau-text);
}

.auth-modal input:not([type="checkbox"]):not([type="radio"]):focus {
  outline: none;
  border-color: rgba(83,167,255,0.7);
  box-shadow: 0 0 0 3px rgba(83,167,255,0.12);
}

.auth-modal input[type="checkbox"],
.auth-modal input[type="radio"] {
  width: auto;
  margin: 0;
  padding: 0;
  accent-color: var(--mau-accent);
}

.auth-modal .mau-btn {
  width: 100%;
  margin-top: 4px;
}

.auth-error {
  display: block;
  margin-bottom: 12px;
  padding: 8px 10px;
  background: rgba(255, 80, 80, 0.15);
  border-left: 3px solid #ff5555;
  border-radius: 8px;
  font-size: 0.85rem;
  color: #ffd7d7;
}

.auth-switch {
  margin-top: 14px;
  text-align: center;
}

.auth-modal label {
  color: var(--mau-text-dim);
}

.link-button {
  background: none;
  border: none;
  color: var(--mau-accent);
  cursor: pointer;
  font-size: 0.85rem;
  padding: 0;
}

.link-button:hover {
  text-decoration: underline;
}

.achievement-toast{
  position:fixed;
  right:20px;
  bottom:20px;
  background:#111;
  color:#caffc6;
  padding:14px 18px;
  border-radius:12px;
  box-shadow:0 0 0 1px rgba(255,255,255,.1),0 20px 40px rgba(0,0,0,.8);
  cursor:pointer;
  animation:toastInOut 10s ease forwards;
  z-index:3000;
}

.achievement-list {
  list-style: none;
  padding: 0;
  margin: 16px 0;
}

.achievement-list li {
  margin-bottom: 12px;
  padding: 10px 12px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 10px;
}

/* ==========================================================
   08) DESKTOP OS
========================================================== */
#mau-desktop{
  position: relative;
  width: 100%;
  height: calc(100vh - 70px);
  background: var(--mau-bg-0);
  overflow: hidden;
}

.mau-sidebar{
  position:absolute;
  top:0; left:0;
  width:72px;
  height:100%;
  background: rgba(13,13,13,0.95);
  border-right: 1px solid rgba(255,255,255,0.10);
  display:flex;
  flex-direction:column;
  align-items:center;
  padding-top: 20px;
  gap: 12px;
  z-index: 900;
}

.mau-sidebar-btn{
  width: 52px;
  height: 52px;
  background: rgba(20,20,20,0.92);
  border-radius: var(--mau-r-md);
  border: 2px solid rgba(255,255,255,0.14);
  color: rgba(232,236,243,0.82);
  font-size: 1.2rem;
  display:flex;
  align-items:center;
  justify-content:center;
  cursor:pointer;
  transition: border-color var(--mau-med), box-shadow var(--mau-med), transform var(--mau-fast);
}

.mau-sidebar-btn:hover{
  border-color: var(--mau-accent);
  box-shadow: var(--mau-glow-soft);
  transform: translateY(-1px);
}

#mau-window-area{
  position:absolute;
  left:72px; top:0; right:0; bottom:0;
  overflow: visible;
}

.mau-window{
  position:absolute;
  background: rgba(15,15,15,0.96);
  border: 2px solid rgba(255,255,255,0.12);
  border-radius: var(--mau-r-sm);
  width: 600px;
  height: 380px;
  box-shadow: 0 0 35px rgba(0,0,0,0.55);
  overflow:hidden;
  display:flex;
  flex-direction:column;
  z-index: 10;
  transition: box-shadow var(--mau-med) ease, border-color var(--mau-med) ease;
}

.mau-window.active{
  border-color: var(--mau-accent);
  box-shadow: var(--mau-glow-mid);
  z-index: 999;
}

.mau-window-header{
  background: rgba(26,26,26,0.96);
  padding: 10px 14px;
  color: rgba(232,236,243,0.92);
  display:flex;
  justify-content: space-between;
  align-items:center;
  cursor: move;
  user-select:none;
}

.mau-window-title{
  font-size: 1rem;
  font-weight: 700;
  pointer-events:none;
}

.mau-window-close{
  font-size: 18px;
  cursor: pointer;
  opacity: 0.75;
  transition: opacity var(--mau-fast), transform var(--mau-fast), color var(--mau-fast);
}

.mau-window-close:hover{
  opacity: 1;
  transform: scale(1.15);
  color: var(--mau-danger);
}

.mau-window-body{
  flex:1;
  padding: 16px;
  overflow:auto;
  color: rgba(232,236,243,0.90);
  font-size: 0.95rem;
}

.mau-window.dragging{
  opacity: 0.86;
  transform: scale(0.99);
  transition: none;
}

.mau-resize{
  position:absolute;
  width: 15px;
  height: 15px;
  bottom:0; right:0;
  cursor: se-resize;
}

/* ==========================================================
   09) PRIO
========================================================== */
.prio-row{
  background: rgba(16,16,16,0.92);
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: var(--mau-r-sm);
  margin-bottom: 14px;
  box-shadow: 0 0 12px rgba(0,0,0,0.5);
  overflow: visible !important;
}

.prio-rainbow-pill{
  position: relative;
  display:flex;
  align-items:center;
  justify-content:center;
  padding: 14px 18px;
  border-radius: var(--mau-r-sm);
  font-weight: 900;
  font-size: 1.05rem;
  background: rgba(17,17,17,0.96);
  color: #fff;
  text-align:center;
  z-index: 1;
}

.prio-rainbow-pill::before{
  content:"";
  position:absolute;
  inset:-3px;
  border-radius: calc(var(--mau-r-sm) + 2px);
  background: var(--mau-rainbow);
  background-size: 400%;
  animation: mau-rainbow-flow 25s linear infinite;
  z-index:-1;
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
}

/* ==========================================================
   10) USER MENU / PROFILE / RPG
========================================================== */
.user-menu {
  position: relative;
}

.user-name {
  cursor: pointer;
}

.user-dropdown {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  min-width: 180px;
  background: rgba(20,20,20,0.98);
  border: 1px solid var(--mau-border);
  border-radius: 12px;
  box-shadow: 0 16px 40px rgba(0,0,0,0.7);
  padding: 6px;
  display: none;
  z-index: 1100;
}

.user-dropdown.open {
  display: block;
}

.user-dropdown a {
  display: block;
  padding: 10px 12px;
  color: var(--mau-text);
  border-radius: 8px;
  text-decoration: none;
}

.user-dropdown a:hover {
  background: rgba(255,255,255,0.06);
  text-decoration: none;
}

.user-dropdown form {
  margin: 0;
}

.user-dropdown .mau-btn {
  display: block;
  width: 100%;
  text-align: left;
  padding: 10px 12px !important;
  border: none !important;
  border-radius: 8px !important;
  background: transparent !important;
  box-shadow: none !important;
  transform: none !important;
  color: var(--mau-text);
  font-weight: 500;
}

.user-dropdown .mau-btn:hover {
  background: rgba(255,255,255,0.06) !important;
  color: var(--mau-danger);
}

.user-dropdown hr {
  border: none;
  border-top: 1px solid rgba(255,255,255,0.08);
  margin: 6px 0;
}

.profile-block {
  margin-bottom: 12px;
}

#rpg-scene-shell {
  display:flex;
  height: calc(100vh - 140px);
}

.rpg-scene-list {
  width: 260px;
  background: rgba(10,10,10,0.6);
  border-right: 1px solid var(--mau-border);
}

.rpg-stage {
  position: relative;
  flex:1;
  overflow:hidden;
}

.rpg-bg {
  position:absolute;
  inset:0;
  background-size:cover;
  background-position:center;
  transition: opacity 3s ease;
}

.rpg-mood-layer {
  position:absolute;
  inset:0;
  pointer-events:none;
}

#mood-layer.sunny { opacity:0; }

#mood-layer.fog {
  background:rgba(200,200,200,0.25);
  filter:blur(20px);
  opacity:1;
}

#mood-layer.rain {
  background-image:linear-gradient(
    rgba(255,255,255,.2) 1px,
    transparent 1px
  );
  background-size:2px 12px;
  animation:rain 0.5s linear infinite;
  opacity:0.4;
}

#mood-layer.storm {
  background:rgba(0,0,0,0.4);
  opacity:1;
}

/* ==========================================================
   11) LEGACY ADAPTERS
========================================================== */
.btn_green_white_innerfade,
.btn_blue_white_innerfade,
.btn_darkblue_white_innerfade,
.btn_darkred_white_innerfade,
.btn_grey_white_innerfade,
.btn_grey_grey,
.btn_grey_grey_outer_bevel,
.btn_grey_black,
.btn_black,
.btnv6_blue_hoverfade,
.btnv6_lightblue_blue{
  border-radius: 2px;
  border: none;
  padding: 1px;
  display: inline-block;
  cursor: pointer;
  text-decoration: none !important;
  user-select: none;
}

.btn_green_white_innerfade{
  color: #D2E885 !important;
  background: linear-gradient(to bottom, var(--steam-green) 5%, #536904 95%);
}
.btn_green_white_innerfade > span{
  border-radius: 2px;
  display:block;
  background: linear-gradient(to bottom, #799905 5%, #536904 95%);
}
.btn_green_white_innerfade:hover{
  color: #fff !important;
  background: linear-gradient(to bottom, #b6d908 5%, #80a006 95%);
}
.btn_green_white_innerfade:hover > span{
  background: linear-gradient(to bottom, #a1bf07 5%, #80a006 95%);
}

.btn_blue_white_innerfade{
  color:#fff !important;
  background: linear-gradient(to bottom, #aaceff 5%, #3c6091 95%);
}
.btn_blue_white_innerfade > span{
  border-radius:2px;
  display:block;
  background: linear-gradient(to bottom, #82a6d7 5%, #3c6091 95%);
}
.btn_blue_white_innerfade:hover{
  background: linear-gradient(to bottom, #bbd8ff 5%, #4873a7 95%);
}
.btn_blue_white_innerfade:hover > span{
  background: linear-gradient(to bottom, #9ab7de 5%, #4873a7 95%);
}

.btn_darkblue_white_innerfade{
  color:#A4D7F5 !important;
  background: linear-gradient(to bottom, rgba(47,137,188,1) 5%, rgba(23,67,92,1) 95%);
}
.btn_darkblue_white_innerfade > span{
  border-radius:2px;
  display:block;
  background: linear-gradient(to bottom, rgba(33,101,138,1) 5%, rgba(23,67,92,1) 95%);
}
.btn_darkblue_white_innerfade:hover{
  color:#fff !important;
  background: linear-gradient(to bottom, rgba(102,192,244,1) 5%, rgba(47,137,188,1) 95%);
}
.btn_darkblue_white_innerfade:hover > span{ background: transparent; }

.btn_darkred_white_innerfade{
  color:#F5D7A4 !important;
  background: linear-gradient(to bottom, rgba(188,47,47,1) 5%, rgba(92,37,23,1) 95%);
}
.btn_darkred_white_innerfade > span{
  border-radius:2px;
  display:block;
  background: linear-gradient(to bottom, rgba(138,51,33,1) 5%, rgba(92,37,23,1) 95%);
}
.btn_darkred_white_innerfade:hover{
  color:#fff !important;
  background: linear-gradient(to bottom, var(--steam-red) 5%, rgba(188,67,47,1) 95%);
}
.btn_darkred_white_innerfade:hover > span{ background: transparent; }

.btnv6_blue_hoverfade{
  color: var(--steam-blue) !important;
  background: rgba(103,193,245,0.2);
}
.btnv6_blue_hoverfade > span{
  display:block;
  border-radius:2px;
  background:transparent;
}
.btnv6_blue_hoverfade:hover{
  color:#fff !important;
  background: linear-gradient(-60deg, var(--steam-blue-deep) 5%, var(--steam-blue) 95%);
}

@media (forced-colors: active){
  .mau-btn,
  .mau-input,
  .panel,
  .mau-window{
    forced-color-adjust: auto;
    border: 1px solid ButtonBorder;
  }
}

@media (max-width: 768px) {
  .app-content {
    padding: 16px;
  }

  .auth-modal {
    max-width: 100%;
    padding: 20px;
  }
}

.password-field {
    position: relative;
}

.password-field input {
    padding-right: 44px !important;
}

.pw-toggle {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--mau-text-dim);
    cursor: pointer;
    font-size: 1rem;
    padding: 0;
    line-height: 1;
}

.pw-toggle:hover {
    color: var(--mau-text);
}

.password-strength {
    height: 6px;
    background: rgba(255,255,255,0.08);
    border-radius: 999px;
    overflow: hidden;
    margin-top: 2px;
    margin-bottom: 2px;
}

.strength-bar {
    height: 100%;
    width: 0%;
    background: transparent;
    transition: width 0.25s ease, background 0.25s ease;
}

.password-hint {
    font-size: 0.8rem;
    margin-top: 4px;
    margin-bottom: 6px;
    color: var(--mau-text-muted);
    line-height: 1.4;
}

.password-match-hint {
    font-size: 0.8rem;
    margin-top: -2px;
    margin-bottom: 6px;
    min-height: 18px;
    line-height: 1.4;
    color: var(--mau-text-muted);
}

.password-match-hint.is-error {
    color: #ff8a8a;
}

.password-match-hint.is-ok {
    color: #7dffb0;
}