@import url('https://fonts.googleapis.com/css2?family=DM+Mono:wght@400;500&family=Inter:wght@400;500;600;700&display=swap');
:root { color-scheme:dark; font-family:Inter,system-ui,sans-serif; color:#f4f4f5; background:#121212; } * { box-sizing:border-box; } body { margin:0; height:100vh; display:flex; overflow:hidden; background:#181818; }
button { border:0; font:inherit; cursor:pointer; } aside { width:255px; flex:none; display:flex; flex-direction:column; gap:22px; padding:17px 11px 13px; background:#111; border-right:1px solid #2a2a2a; }.brand { display:flex; align-items:center; gap:9px; padding:4px 8px; font-size:17px; font-weight:700; letter-spacing:-.4px; }.brand-mark { display:grid; place-items:center; width:28px; height:28px; border-radius:8px; color:#fff; background:#6d56eb; font-size:14px; }.brand em { color:#a997ff; font-style:normal; }.new-chat { display:flex; align-items:center; gap:9px; padding:10px 11px; color:#e7e4ef; background:#202020; border:1px solid #353535; border-radius:8px; text-align:left; font-size:13px; }.new-chat:hover { background:#292929; }.new-chat b { color:#b7a8ff; font-size:18px; font-weight:400; }.new-chat kbd { display:none; }.history { display:flex; flex-direction:column; gap:3px; overflow:auto; }.history::before { content:var(--history-label, "CONVERSATIONS"); padding:0 8px 7px; color:#777; font-size:10px; font-weight:700; letter-spacing:.8px; }.history-row { display:flex; align-items:center; border-radius:7px; }.history-open { flex:1; min-width:0; overflow:hidden; padding:8px 9px; border-radius:7px; color:#aaa; background:transparent; text-align:left; font-size:12px; white-space:nowrap; text-overflow:ellipsis; }.history-delete { opacity:0; padding:4px 8px; color:#888; background:transparent; font-size:17px; }.history-row:hover,.history-row.active { background:#242424; }.history-row:hover .history-open,.history-row.active .history-open { color:#eee; }.history-row:hover .history-delete { opacity:1; }.history-delete:hover { color:#ff8593; }.local-note { margin:auto 5px 0; padding:11px 8px 0; border-top:1px solid #292929; color:#6f6f6f; font-size:10px; line-height:1.55; }.local-note span { color:#70ddae; }
main { flex:1; min-width:0; height:100vh; display:flex; flex-direction:column; position:relative; } header { height:60px; flex:none; display:flex; align-items:center; justify-content:space-between; padding:0 28px; border-bottom:1px solid #292929; background:#181818eF; }.title { display:flex; align-items:center; gap:9px; }.title strong { font-size:14px; }.title span { display:flex; align-items:center; gap:5px; color:#858585; font-size:11px; }.title i { width:6px; height:6px; border-radius:50%; background:#65dba7; } header button { padding:6px 8px; color:#898989; background:transparent; border-radius:6px; font-size:12px; } header button:hover { color:#eee; background:#292929; }
.messages { width:min(790px,100%); flex:1; overflow:auto; margin:auto; padding:46px 27px 138px; display:flex; flex-direction:column; gap:24px; }.empty { width:100%; max-width:580px; margin:auto; text-align:center; }.empty::before { content:"✦"; display:grid; place-items:center; width:44px; height:44px; margin:0 auto 19px; border-radius:12px; color:#fff; background:#6d56eb; font-size:22px; }.empty h1 { margin:0 0 9px; font-size:30px; letter-spacing:-1px; }.empty p { margin:0; color:#969696; font-size:14px; }.quick { display:flex; justify-content:center; flex-wrap:wrap; gap:7px; margin-top:23px; }.quick button { padding:7px 10px; color:#bbb; background:#222; border:1px solid #353535; border-radius:6px; font-size:11px; }.quick button:hover { color:#f4f4f4; border-color:#7461d7; }.message { display:grid; grid-template-columns:31px 1fr; gap:11px; align-items:start; line-height:1.65; animation:in .18s ease both; }.avatar { display:grid; place-items:center; width:30px; height:30px; border-radius:8px; color:#ddd; background:#303030; border:1px solid #434343; font-size:10px; font-weight:700; }.assistant .avatar { color:#fff; background:#6d56eb; border-color:#836ff0; }.content { min-width:0; padding:4px 0; color:#e5e5e5; font-size:14px; white-space:pre-wrap; overflow-wrap:anywhere; }.user { grid-template-columns:1fr 31px; }.user .avatar { grid-column:2; background:#246e5c; border-color:#358f78; }.user .content { grid-column:1; grid-row:1; justify-self:end; max-width:79%; padding:9px 12px; background:#292929; border-radius:9px 3px 9px 9px; }.typing .content { color:#9a9a9a; font-style:italic; }.typing .content::after { content:""; display:inline-block; width:4px; height:4px; margin-left:5px; border-radius:50%; background:#a896ff; box-shadow:7px 0 #a896ff,14px 0 #a896ff; animation:pulse 1.2s infinite; }
.download-card { display:flex; align-items:center; gap:10px; width:min(100%,390px); margin-top:13px; padding:10px; color:#efedff; text-decoration:none; white-space:normal; background:#211d34; border:1px solid #4f4479; border-radius:9px; }.download-card:hover { background:#2b2542; border-color:#7766bc; }.zip-icon { display:grid; place-items:center; width:37px; height:37px; border-radius:7px; color:#f1edff; background:#735dde; font:700 10px "DM Mono",monospace; }.download-card span:nth-child(2) { display:flex; flex:1; min-width:0; flex-direction:column; }.download-card b { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-size:12px; }.download-card small { margin-top:2px; color:#aaa0cf; font-size:10px; }.download-card strong { font-size:19px; font-weight:400; }
.assistant .content h2 { margin:19px 0 7px; padding-bottom:6px; border-bottom:1px solid #353535; color:#f2efff; font-size:15px; }.assistant .content h3 { margin:15px 0 5px; color:#ddd6ff; font-size:13px; }.assistant .content p { margin:0; }.assistant .content strong { color:#f6f4ff; }.assistant .content ul { margin:8px 0; padding-left:19px; }.assistant .content li { margin:3px 0; }.assistant .content code { padding:2px 5px; color:#e1d9ff; background:#292536; border:1px solid #454052; border-radius:4px; font:11px "DM Mono",monospace; }.assistant .content pre { max-width:100%; margin:11px 0; padding:12px; overflow:auto; color:#dbd5ee; background:#121214; border:1px solid #35353a; border-radius:8px; }.assistant .content pre code { padding:0; background:transparent; border:0; font-size:11px; line-height:1.55; }
.composer { position:fixed; bottom:28px; left:max(275px,calc(50% - 267px)); display:flex; align-items:end; gap:7px; width:min(790px,calc(100% - 290px)); padding:8px 8px 8px 10px; background:#242424f8; border:1px solid #3b3b3b; border-radius:11px; box-shadow:0 14px 35px #0008; }.composer:focus-within { border-color:#6856bc; }.composer textarea { flex:1; max-height:180px; padding:8px 2px; resize:none; border:0; outline:0; color:#f5f5f5; background:transparent; font:14px/1.45 Inter,sans-serif; }.composer textarea::placeholder { color:#7b7b7b; }.composer button { width:35px; height:35px; border-radius:8px; color:#fff; background:#6d56eb; font-size:20px; }.composer .attach { color:#aaa; background:transparent; font-size:18px; }.composer .attach:hover { color:#eee; background:#333; }.composer button:disabled { opacity:.45; cursor:not-allowed; }.attachments { position:fixed; z-index:2; bottom:78px; left:max(275px,calc(50% - 267px)); display:flex; flex-wrap:wrap; gap:5px; width:min(790px,calc(100% - 290px)); }.attachments:empty { display:none; }.attachments span { max-width:220px; overflow:hidden; padding:5px 8px; color:#c7bfdc; background:#252132; border:1px solid #443d59; border-radius:6px; font-size:10px; text-overflow:ellipsis; white-space:nowrap; }.attachments button { color:#aaa1c3; padding:0 0 0 5px; background:transparent; }.disclaimer { position:fixed; bottom:5px; left:255px; right:0; margin:0; color:#666; font-size:9px; text-align:center; }
.preview { width:0; flex:none; overflow:hidden; display:flex; flex-direction:column; opacity:0; background:#151515; border-left:0 solid #2a2a2a; transition:.2s ease; }.preview.open { width:min(42vw,500px); opacity:1; border-left-width:1px; }.preview-head { display:flex; align-items:center; justify-content:space-between; height:52px; padding:0 14px; border-bottom:1px solid #2a2a2a; color:#999; font-size:10px; letter-spacing:.8px; font-weight:700; }.preview-head span { color:#6cdbab; }.preview-head button { color:#aaa; background:transparent; font-size:20px; }.preview-empty { padding:23px; color:#909090; font-size:12px; line-height:1.55; }.preview-empty b { color:#e5e5e5; font-size:14px; } #preview-frame { flex:1; width:100%; border:0; background:#fff; } @keyframes in { from { opacity:0; transform:translateY(4px); } } @keyframes pulse { 0%,60%,100% { opacity:.25; } 30% { opacity:1; } }
.mode-dialog { position:fixed; z-index:20; inset:0; display:grid; place-items:center; padding:20px; background:#0009; backdrop-filter:blur(5px); }.mode-dialog[hidden] { display:none; }.mode-card { position:relative; width:min(590px,100%); padding:31px; background:#1d1d20; border:1px solid #3a3a40; border-radius:14px; box-shadow:0 24px 80px #000b; }.close-mode { position:absolute; top:13px; right:15px; color:#999; background:transparent; font-size:23px; }.mode-eyebrow { color:#8d7bea; font-size:10px; font-weight:700; letter-spacing:1px; }.mode-card h2 { margin:9px 0 6px; font-size:22px; letter-spacing:-.5px; text-align:center; }.mode-card > p { text-align:center; }.mode-card p { margin:0 0 22px; color:#aaa; font-size:13px; }.mode-options { display:grid; grid-template-columns:1fr 1fr; gap:10px; }.mode-options button { min-height:142px; padding:18px; color:#ddd; background:#252529; border:1px solid #39393f; border-radius:10px; text-align:left; }.mode-options button:hover { color:#fff; border-color:#7765cf; background:#292635; }.premium-locked { opacity:.62; cursor:not-allowed; position:relative; }.premium-locked:hover { opacity:.72; border-color:#39393f !important; background:#252529 !important; }.premium-locked strong { display:block; margin-top:10px; font-size:10px; color:#6D28D9; font-weight:600; }.premium-locked em { font-style:normal; font-size:11px; margin-left:4px; }.mode-options span { display:grid; place-items:center; width:29px; height:29px; margin-bottom:14px; border-radius:7px; color:#e9e5ff; background:#5f4ac3; }.mode-options b,.mode-options small { display:block; }.mode-options b { margin-bottom:6px; font-size:13px; }.mode-options small { color:#999; font-size:11px; line-height:1.45; }
@media (max-width:900px) { .preview.open { position:fixed; z-index:4; inset:0; width:100%; }.preview-head { height:58px; } } @media (max-width:680px) { aside { display:none; } header { height:56px; padding:0 16px; }.messages { padding:30px 16px 118px; }.composer { bottom:23px; left:12px; width:calc(100% - 24px); }.attachments { bottom:72px; left:12px; width:calc(100% - 24px); }.disclaimer { left:0; }.user .content { max-width:88%; }.empty h1 { font-size:27px; } }

.account-panel { margin:auto 2px 0; padding:11px 7px 2px; border-top:1px solid #292929; }.credit-head { display:flex; justify-content:space-between; color:#858585; font-size:9px; font-weight:700; letter-spacing:.5px; }.credit-head b { color:#d4ccff; font-size:11px; }.credit-track { height:4px; margin:7px 0 5px; overflow:hidden; border-radius:99px; background:#303036; }.credit-track i { display:block; width:0; height:100%; border-radius:99px; background:#7562d9; }.account-panel > small { color:#6f6f6f; font-size:9px; }.settings { width:100%; display:flex; align-items:center; gap:8px; margin-top:11px; padding:7px; color:#d0d0d0; background:transparent; border-radius:7px; text-align:left; }.settings:hover { background:#242424; }.settings > span:first-child,.account-summary > span { display:grid; place-items:center; width:26px; height:26px; border-radius:8px; color:#fff; background:#6751ce; font-size:11px; font-weight:700; }.settings b,.settings small { display:block; max-width:160px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }.settings b { font-size:10px; }.settings small { color:#777; font-size:9px; }.settings em { margin-left:auto; color:#888; font-size:18px; font-style:normal; }.cost { display:block; margin-top:8px; color:#ee7f87; font-size:10px; }
.login-screen,.settings-dialog { position:fixed; z-index:30; inset:0; display:grid; place-items:center; padding:20px; background:#111; }.login-screen[hidden],.settings-dialog[hidden] { display:none; }.login-card,.settings-card { position:relative; width:min(410px,100%); padding:30px; background:#1d1d20; border:1px solid #39393f; border-radius:14px; box-shadow:0 20px 80px #0009; }.login-logo { display:grid; place-items:center; width:39px; height:39px; border-radius:10px; background:#6d56eb; font-weight:700; }.login-card h1,.settings-card h2 { margin:17px 0 7px; font-size:22px; letter-spacing:-.5px; }.login-card p { margin:0 0 22px; color:#999; font-size:13px; line-height:1.5; }.login-card label,.license-form label { display:block; color:#aaa; font-size:11px; }.login-card input,.license-form input { width:100%; margin-top:7px; padding:11px; color:#eee; outline:0; background:#141416; border:1px solid #3b3b42; border-radius:7px; }.login-card > button,.license-form > button { width:100%; margin-top:10px; padding:11px; color:#fff; background:#6d56eb; border-radius:7px; font-weight:600; }.login-card > small { display:block; margin-top:15px; color:#666; font-size:10px; }.account-summary { display:flex; align-items:center; gap:10px; margin:19px 0; padding:12px; background:#242429; border-radius:8px; }.account-summary b,.account-summary small { display:block; }.account-summary b { font-size:12px; }.account-summary small { margin-top:3px; color:#9d99b7; font-size:11px; }.license-form > button { width:auto; padding:9px 13px; }.license-form p { min-height:16px; margin:8px 0 0; font-size:11px; }.license-form p.success { color:#6de0ae; }.license-form p.error { color:#ef7d85; }.switch-account { width:100%; margin-top:14px; padding:9px; color:#aaa; background:#29292e; border:1px solid #3c3c42; border-radius:7px; font-size:12px; }


/* --- Refined authentication & account UI --- */
.login-screen,.settings-dialog {
  background:
    radial-gradient(circle at 50% 42%, rgba(109,86,235,.12), transparent 34%),
    rgba(10,10,11,.88);
  backdrop-filter: blur(14px);
}

.login-card,.settings-card {
  width:min(430px,100%);
  padding:30px;
  overflow:hidden;
  background:linear-gradient(180deg,#202023 0%,#1b1b1e 100%);
  border:1px solid #3a3a42;
  border-radius:18px;
  box-shadow:0 30px 100px rgba(0,0,0,.52),0 0 0 1px rgba(255,255,255,.018) inset;
}
.login-card::before,.settings-card::before {
  content:"";
  position:absolute;
  left:0;right:0;top:0;
  height:1px;
  background:linear-gradient(90deg,transparent,#8069f5 35%,#b3a4ff 50%,#8069f5 65%,transparent);
  opacity:.9;
}
.login-card::after,.settings-card::after {
  content:"";
  position:absolute;
  width:180px;height:180px;
  right:-105px;top:-105px;
  border-radius:50%;
  background:rgba(109,86,235,.12);
  filter:blur(10px);
  pointer-events:none;
}

.login-logo {
  display:grid;
  place-items:center;
  width:48px;height:48px;
  margin-bottom:18px;
  border-radius:14px;
  color:#fff;
  background:linear-gradient(145deg,#816cf5,#5f48d6);
  border:1px solid rgba(185,174,255,.28);
  box-shadow:0 10px 30px rgba(109,86,235,.26),inset 0 1px rgba(255,255,255,.2);
  font-size:17px;
  font-weight:700;
}

.mode-eyebrow {
  display:inline-flex;
  align-items:center;
  gap:7px;
  color:#9d8dff;
  font-size:10px;
  font-weight:700;
  letter-spacing:1.05px;
}
.mode-eyebrow::before {
  content:"";
  width:5px;height:5px;
  border-radius:50%;
  background:#8c78ff;
  box-shadow:0 0 12px rgba(140,120,255,.65);
}

.login-card h1,.settings-card h2 {
  margin:14px 0 7px;
  font-size:24px;
  letter-spacing:-.65px;
}
.login-card p {
  margin:0 0 24px;
  color:#94949b;
  font-size:13px;
  line-height:1.55;
}

.login-card label,.license-form label {
  display:block;
  margin-top:15px;
  color:#aaaab2;
  font-size:11px;
  font-weight:500;
}
.login-card input,.license-form input {
  height:43px;
  width:100%;
  margin-top:7px;
  padding:0 13px;
  color:#f1f1f3;
  outline:0;
  background:#151518;
  border:1px solid #38383f;
  border-radius:9px;
  transition:border-color .16s,box-shadow .16s,background .16s;
}
.login-card input::placeholder,.license-form input::placeholder { color:#66666e; }
.login-card input:hover,.license-form input:hover { border-color:#4a4a53; }
.login-card input:focus,.license-form input:focus {
  background:#17171b;
  border-color:#7662e7;
  box-shadow:0 0 0 3px rgba(109,86,235,.13);
}

.login-card > button:not(.auth-switch),.license-form > button {
  width:100%;
  height:43px;
  margin-top:18px;
  padding:0 14px;
  color:#fff;
  background:linear-gradient(135deg,#765ff0,#674fdc);
  border:1px solid rgba(183,171,255,.16);
  border-radius:9px;
  font-weight:600;
  box-shadow:0 8px 24px rgba(91,67,207,.22);
  transition:transform .16s,filter .16s,box-shadow .16s;
}
.login-card > button:not(.auth-switch):hover,.license-form > button:hover {
  filter:brightness(1.08);
  box-shadow:0 10px 28px rgba(91,67,207,.3);
  transform:translateY(-1px);
}
.login-card > button:not(.auth-switch):active,.license-form > button:active { transform:translateY(0); }

.auth-switch {
  width:100%;
  margin-top:9px;
  padding:10px 12px;
  color:#9999a2;
  background:transparent;
  border:1px solid transparent;
  border-radius:9px;
  font-size:12px;
  transition:color .16s,background .16s,border-color .16s;
}
.auth-switch:hover {
  color:#d0caff;
  background:#25252a;
  border-color:#363640;
}
.login-card > small {
  display:block;
  margin-top:14px;
  color:#606067;
  font-size:10px;
  text-align:center;
}

.settings-card { padding:26px 30px 24px; }
.settings-card h2 { margin-bottom:15px; }
.account-summary {
  position:relative;
  display:flex;
  align-items:center;
  gap:12px;
  margin:0 0 20px;
  padding:13px;
  background:linear-gradient(135deg,#28282e,#232328);
  border:1px solid #35353d;
  border-radius:11px;
  box-shadow:inset 0 1px rgba(255,255,255,.025);
}
.account-summary::after {
  content:"AKTÍV";
  margin-left:auto;
  padding:4px 7px;
  color:#7ce2b4;
  background:rgba(73,185,140,.08);
  border:1px solid rgba(73,185,140,.17);
  border-radius:5px;
  font-size:8px;
  font-weight:700;
  letter-spacing:.65px;
}
.settings > span:first-child,.account-summary > span {
  width:34px;height:34px;
  border-radius:10px;
  color:#fff;
  background:linear-gradient(145deg,#7a65ef,#5d47d0);
  border:1px solid rgba(190,180,255,.2);
  box-shadow:0 5px 16px rgba(109,86,235,.22);
  font-size:12px;
}
.account-summary b { font-size:12px; }
.account-summary small { margin-top:3px;color:#a29dbd;font-size:10px; }

.license-form {
  padding:15px;
  background:#18181b;
  border:1px solid #303038;
  border-radius:11px;
}
.license-form label { margin-top:0; color:#b4b4bb; }
.license-form input { background:#121214; }
.license-form > button { width:auto; min-width:108px; height:38px; margin-top:11px; }
.license-form p { min-height:15px; margin:8px 0 0; font-size:10px; }

.switch-account {
  width:100%;
  margin-top:10px;
  padding:10px;
  color:#8f8f98;
  background:#25252a;
  border:1px solid #36363e;
  border-radius:9px;
  font-size:11px;
  transition:color .16s,background .16s,border-color .16s;
}
.switch-account:hover { color:#ddd8ff; background:#2a2931; border-color:#49435f; }

.close-mode {
  top:14px;right:15px;
  width:30px;height:30px;
  display:grid;
  place-items:center;
  color:#85858e;
  background:#25252a;
  border:1px solid #34343b;
  border-radius:8px;
  font-size:18px;
  line-height:1;
  transition:color .16s,background .16s,border-color .16s;
}
.close-mode:hover { color:#eee; background:#2d2d33; border-color:#4a4a53; }

@media (max-width:520px) {
  .login-screen,.settings-dialog { padding:14px; }
  .login-card,.settings-card { padding:24px 20px 21px; border-radius:15px; }
  .login-card h1,.settings-card h2 { font-size:21px; }
  .account-summary::after { display:none; }
}

/* --- DopeAI brand logo --- */
.brand-mark {
  display:grid;
  place-items:center;
  width:32px;
  height:32px;
  padding:0;
  overflow:visible;
  border-radius:0;
  background:transparent;
  border:0;
  box-shadow:none;
}
.brand-mark img { width:32px;height:32px;object-fit:contain;display:block; }
.login-logo {
  width:68px;
  height:68px;
  margin-bottom:18px;
  padding:2px;
  display:grid;
  place-items:center;
  overflow:hidden;
  border-radius:19px;
  background:radial-gradient(circle at 50% 45%,#8058ff 0%,#4a20c8 74%);
  border:1px solid rgba(190,174,255,.28);
  box-shadow:0 14px 36px rgba(92,55,223,.3), inset 0 1px rgba(255,255,255,.22);
}
.login-logo img { width:65px;height:65px;object-fit:contain;display:block; }
.empty-logo {
  width:82px;
  height:82px;
  margin:0 auto 19px;
  display:grid;
  place-items:center;
  padding:0;
  overflow:hidden;
  border-radius:24px;
  background:transparent;
  border:0;
  box-shadow:none;
}
.empty-logo img { width:79px;height:79px;object-fit:contain;display:block; }
.empty::before { display:none; }
.empty h1 { margin-top:0; }

/* --- Sidebar / profile / package --- */
.sidebar-action {
  width:100%; display:flex; align-items:center; gap:8px; margin-top:9px; padding:7px;
  color:#d0d0d0; background:transparent; border-radius:7px; text-align:left;
}
.sidebar-action:hover { background:#242424; }
.sidebar-action > span:first-child { display:grid; place-items:center; width:30px; height:30px; flex:0 0 30px; border-radius:8px; color:#cfcfcf; background:transparent; border:none; box-shadow:none; font-size:12px; }
.sidebar-action > .action-icon svg { width:19px; height:19px; display:block; }
.sidebar-action:hover > .action-icon { color:#f1f1f3; }
.sidebar-action b,.sidebar-action small { display:block; max-width:160px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.sidebar-action b { font-size:10px; }
.sidebar-action small { color:#777; font-size:9px; }
.sidebar-action em { margin-left:auto; color:#888; font-size:18px; font-style:normal; }
.account-panel #account-email { cursor:pointer; }
.purchase-button {
  display:flex; align-items:center; justify-content:space-between; gap:10px; margin-top:12px; padding:11px 13px;
  color:#fff; background:#6d56eb; border:1px solid #816df1; border-radius:8px; font-size:12px; font-weight:600; text-decoration:none;
}
.purchase-button:hover { background:#765ff0; }
.purchase-note { margin:8px 0 0; color:#68686f; font-size:9px; line-height:1.45; }
.profile-card { padding-bottom:18px; }
.profile-card h2 { margin-bottom:15px; }
.profile-row { display:flex; align-items:center; justify-content:space-between; gap:20px; padding:16px 0; border-top:1px solid #303036; }
.profile-row span { color:#aaa; font-size:11px; }
.profile-row b { max-width:65%; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; color:#eee; font-size:11px; font-weight:500; text-align:right; }


/* --- API keys sidebar item / dialog --- */
.api-card { padding-bottom:18px; }
.api{ display:flex; align-items:center; justify-content:space-between; gap:14px; margin-top:18px; padding:13px; background:transparent; border:1px solid #35353d; border-radius:11px; }
.api-key-row b,.api-key-row small { display:block; }
.api-key-row b { color:#eee; font-size:12px; }
.api-key-row small { margin-top:3px; color:#8f8f98; font-size:10px; }
.api{ padding:4px 7px; color:#7ce2b4; background:transparent; border:1px solid rgba(73,185,140,.17); border-radius:5px; font-size:8px; font-weight:700; letter-spacing:.65px; }
.api-note { margin:12px 2px 0; color:#777780; font-size:10px; line-height:1.5; }


/* --- Minimal package dialog redesign --- */
.settings-dialog {
  background:rgba(8,8,10,.78);
  backdrop-filter:blur(7px);
}
.settings-dialog .settings-card {
  width:min(430px,100%);
  padding:28px 30px 26px;
  background:#19191c;
  border:1px solid #303036;
  border-radius:12px;
  box-shadow:0 24px 70px rgba(0,0,0,.42);
}
.settings-dialog .settings-card h2 {
  margin:10px 0 18px;
  color:#f1f1f3;
  font-size:22px;
  font-weight:650;
  letter-spacing:-.55px;
}
.settings-dialog .mode-eyebrow {
  color:#a99aff;
  font-size:9px;
  font-weight:700;
  letter-spacing:1px;
}
.settings-dialog .mode-eyebrow::before {
  content:"";
  display:inline-block;
  width:4px; height:4px;
  margin:0 7px 2px 0;
  border-radius:50%;
  background:#8068ef;
}
.settings-dialog .account-summary {
  margin:0 0 18px;
  padding:12px 0;
  background:transparent;
  border:0;
  border-top:1px solid #2b2b30;
  border-bottom:1px solid #2b2b30;
  border-radius:0;
}
.settings-dialog .account-summary > span {
  width:32px; height:32px;
  border-radius:9px;
  background:#252529;
  border:1px solid #3a3a41;
  box-shadow:none;
}
.settings-dialog .account-summary b { color:#e9e9eb; font-size:11px; }
.settings-dialog .account-summary small { color:#7f7f88; font-size:9px; }
.settings-dialog .account-summary::after {
  padding:3px 6px;
  background:transparent;
  border:1px solid #34343a;
  color:#8d8d96;
  border-radius:5px;
}
.settings-dialog .license-form {
  padding:0;
  background:transparent;
  border:0;
  border-radius:0;
}
.settings-dialog .license-form label {
  color:#9999a1;
  font-size:10px;
}
.settings-dialog .license-form input {
  box-sizing:border-box;
  height:42px;
  margin-top:7px;
  padding:0 12px;
  background:#141416;
  border:1px solid #303036;
  border-radius:8px;
  font-size:12px;
}
.settings-dialog .license-form input:focus {
  border-color:#4a465c;
  box-shadow:0 0 0 2px rgba(109,86,235,.07);
}
.settings-dialog .license-form > button {
  height:38px;
  margin-top:10px;
  min-width:100px;
  padding:0 15px;
  background:#6d56eb;
  border:0;
  border-radius:7px;
  font-size:11px;
  box-shadow:none;
}
.settings-dialog .purchase-button {
  margin-top:18px;
  padding:10px 12px;
  background:#202024;
  border:1px solid #34343a;
  border-radius:7px;
  color:#dddde1;
  font-size:11px;
}
.settings-dialog .purchase-button:hover {
  background:#252529;
  border-color:#414149;
}
.settings-dialog .purchase-note {
  margin-top:7px;
  color:#626269;
}
.settings-dialog .close-mode {
  width:28px; height:28px;
  top:13px; right:13px;
  background:transparent;
  border:1px solid transparent;
  color:#77777f;
  border-radius:7px;
}
.settings-dialog .close-mode:hover {
  background:#242428;
  border-color:#333339;
  color:#dddde1;
}
@media (max-width:520px) {
  .settings-dialog .settings-card { padding:24px 20px 22px; }
}

/* --- Minimal package expansion panel --- */
.settings-dialog .mode-eyebrow::before {
  display:none;
}
.settings-dialog .mode-eyebrow {
  display:block;
  text-align:center;
}
.settings-dialog .settings-card h2 {
  text-align:center;
  margin-top:9px;
}
.settings-dialog .license-form {
  text-align:center;
}
.settings-dialog .license-form label {
  text-align:left;
}
.settings-dialog .license-form > button {
  display:block;
  margin:10px auto 0;
}
.settings-dialog .purchase-button {
  display:block;
  width:max-content;
  margin:18px auto 0;
  padding:0;
  background:transparent;
  border:0;
  border-radius:0;
  color:#aaa;
  font-size:11px;
  text-decoration:underline;
  text-underline-offset:3px;
}
.settings-dialog .purchase-button:hover {
  background:transparent;
  border-color:transparent;
  color:#eee;
}
.settings-dialog .purchase-button span {
  display:none;
}
.settings-dialog .purchase-note {
  text-align:center;
}

/* Final mode chooser alignment */
#mode-dialog .mode-eyebrow {
  display:block;
  text-align:center;
}
#mode-dialog .mode-eyebrow::before {
  content:none !important;
  display:none !important;
}


/* Current account icon: same minimal style as sidebar Package/API icons. */
.settings > #account-avatar {
  display: grid !important;
  place-items: center !important;
  width: 26px !important;
  height: 26px !important;
  flex: 0 0 26px !important;
  border-radius: 0 !important;
  color: #cfcfcf !important;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  font-size: initial !important;
}
.settings > #account-avatar svg {
  width: 18px;
  height: 18px;
  display: block;
}

/* --- DopeAI V18 login + toast notification layer --- */
.login-screen {
  z-index:30;
  background:radial-gradient(circle at 50% 25%, rgba(109,86,235,.10), transparent 35%), #111214;
  backdrop-filter:blur(10px);
}
.login-card {
  width:min(430px,calc(100vw - 30px));
  padding:29px 30px 24px;
  background:linear-gradient(180deg,#1d1d21 0%,#19191c 100%);
  border:1px solid #38383f;
  border-radius:16px;
  box-shadow:0 30px 100px #000c,0 0 0 1px rgba(255,255,255,.015) inset;
  overflow:hidden;
}
.login-card::before {
  content:"";
  position:absolute;
  top:-80px;
  left:50%;
  width:260px;
  height:150px;
  transform:translateX(-50%);
  background:#6d56eb;
  opacity:.09;
  filter:blur(45px);
  pointer-events:none;
}
.login-top {
  position:relative;
  display:flex;
  align-items:center;
  justify-content:space-between;
  margin-bottom:25px;
}
.login-logo {
  width:48px;
  height:48px;
  display:grid;
  place-items:center;
  border-radius:12px;
  background:#6d56eb;
  border:1px solid #806df0;
  box-shadow:0 8px 28px rgba(109,86,235,.24),0 0 0 4px rgba(109,86,235,.07);
}
.login-logo img { width:34px; height:34px; object-fit:contain; display:block; }
.login-status {
  display:flex;
  align-items:center;
  gap:7px;
  padding:6px 8px;
  color:#777780;
  background:#17171a;
  border:1px solid #2e2e34;
  border-radius:6px;
  font:500 9px "DM Mono",monospace;
  letter-spacing:.6px;
}
.login-status i {
  width:5px;
  height:5px;
  border-radius:50%;
  background:#65dba7;
  box-shadow:0 0 8px rgba(101,219,167,.6);
}
.login-card .mode-eyebrow { display:block; color:#9585eb; font-size:9px; letter-spacing:1.2px; }
.login-card h1 { margin:9px 0 7px; font-size:24px; letter-spacing:-.7px; }
.login-card p { margin:0 0 22px; color:#888890; font-size:12px; line-height:1.55; }
.login-fields { display:grid; gap:13px; }
.login-card label > span { display:block; margin-bottom:7px; color:#9d9da5; font-size:10px; font-weight:600; letter-spacing:.15px; }
.field-wrap { position:relative; }
.field-icon {
  position:absolute;
  z-index:1;
  left:12px;
  top:50%;
  width:16px;
  transform:translateY(-50%);
  color:#696971;
  text-align:center;
  font:500 13px "DM Mono",monospace;
  pointer-events:none;
}
.login-card input {
  height:43px;
  margin:0;
  padding:0 12px 0 36px;
  color:#f0f0f2;
  background:#141416;
  border:1px solid #303036;
  border-radius:8px;
  font-size:12px;
  transition:border-color .15s,box-shadow .15s,background .15s;
}
.login-card input:hover { border-color:#414149; }
.login-card input:focus { border-color:#6657a9; background:#151519; box-shadow:0 0 0 3px rgba(109,86,235,.10); }
.login-card input::placeholder { color:#55555d; }
.auth-primary {
  width:100%;
  height:43px;
  display:flex;
  align-items:center;
  justify-content:center;
  gap:9px;
  margin-top:17px;
  color:#fff;
  background:#6d56eb;
  border:1px solid #806df0;
  border-radius:8px;
  font-size:12px;
  font-weight:700;
  box-shadow:0 8px 22px rgba(109,86,235,.18);
  transition:transform .15s,background .15s,box-shadow .15s;
}
.auth-primary:hover { background:#775ff0; box-shadow:0 10px 27px rgba(109,86,235,.24); }
.auth-primary:active { transform:translateY(1px); }
.auth-primary:disabled { opacity:.65; cursor:wait; }
.auth-primary span { font-size:17px; line-height:1; }
.login-card .auth-switch {
  width:100%;
  margin-top:11px;
  padding:6px;
  color:#777780;
  background:transparent;
  font-size:10px;
}
.login-card .auth-switch:hover { color:#aaaab2; }
.login-card .auth-switch b { color:#aaa0e8; font-weight:600; }
.login-divider {
  display:flex;
  align-items:center;
  gap:10px;
  margin:17px 0 12px;
  color:#48484f;
  font:500 8px "DM Mono",monospace;
  letter-spacing:1.2px;
}
.login-divider::before,.login-divider::after { content:""; height:1px; flex:1; background:#2a2a2f; }
.login-security {
  display:flex !important;
  align-items:center;
  justify-content:center;
  gap:6px;
  margin:0 !important;
  color:#5e5e66 !important;
  font-size:9px !important;
  line-height:1.4;
}
.login-security span { color:#7666c7; font-size:12px; }
.toast-container {
  position:fixed;
  z-index:100;
  top:18px;
  left:50%;
  width:min(440px,calc(100vw - 28px));
  transform:translateX(-50%);
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:8px;
  pointer-events:none;
}
.toast {
  position:relative;
  width:100%;
  min-height:48px;
  display:flex;
  align-items:center;
  gap:10px;
  padding:10px 38px 10px 11px;
  color:#dedee2;
  background:#202024;
  border:1px solid #38383f;
  border-radius:10px;
  box-shadow:0 14px 45px #0009;
  opacity:0;
  transform:translateY(-12px) scale(.98);
  transition:opacity .18s ease,transform .18s ease;
  overflow:hidden;
  pointer-events:auto;
}
.toast.show { opacity:1; transform:translateY(0) scale(1); }
.toast.hide { opacity:0; transform:translateY(-8px) scale(.98); }
.toast-icon {
  flex:0 0 27px;
  width:27px;
  height:27px;
  display:grid;
  place-items:center;
  border-radius:7px;
  color:#dcd7ff;
  background:#2b2544;
  border:1px solid #4a406f;
  font:700 12px "DM Mono",monospace;
}
.toast-message { min-width:0; flex:1; font-size:11px; line-height:1.45; }
.toast-close {
  position:absolute;
  top:8px;
  right:8px;
  width:25px;
  height:25px;
  display:grid;
  place-items:center;
  color:#777780;
  background:transparent;
  border-radius:6px;
  font-size:18px;
}
.toast-close:hover { color:#eee; background:#2a2a2e; }
.toast-progress {
  position:absolute;
  left:0;
  bottom:0;
  width:100%;
  height:2px;
  background:#6d56eb;
  transform-origin:left;
  animation:toast-life 3.6s linear forwards;
  opacity:.75;
}
.toast-success { border-color:#365347; }
.toast-success .toast-icon { color:#78e0b2; background:#1d3028; border-color:#365b49; }
.toast-success .toast-progress { background:#65dba7; }
.toast-error { border-color:#5a373d; }
.toast-error .toast-icon { color:#ff9aa3; background:#352126; border-color:#634048; }
.toast-error .toast-progress { background:#e97d89; }
.toast-warning { border-color:#51452f; }
.toast-warning .toast-icon { color:#e5c57b; background:#30291c; border-color:#5a4c32; }
.toast-warning .toast-progress { background:#d2ae61; }
@keyframes toast-life { from { transform:scaleX(1); } to { transform:scaleX(0); } }
@media (max-width:520px) {
  .login-card { padding:24px 20px 21px; border-radius:14px; }
  .login-top { margin-bottom:22px; }
  .login-card h1 { font-size:21px; }
  .toast-container { top:12px; }
}


.logout-account {
  margin-top: 10px;
  color: #e7a1aa;
  border-color: #4a3035;
  background: #241b1e;
}
.logout-account:hover {
  color: #ffb7bf;
  border-color: #654047;
  background: #2b2023;
}


/* V18 login refinements */
.login-top { justify-content:center; margin-bottom:22px; }
.login-logo {
  width:68px;
  height:68px;
  margin:0;
  padding:0;
  background:transparent !important;
  border:0 !important;
  box-shadow:none !important;
  border-radius:0;
}
.login-logo img { width:58px; height:58px; object-fit:contain; }
.login-status { display:none !important; }
.login-card .mode-eyebrow,
.login-card h1,
.login-card > p,
.login-card label > span,
.login-card .auth-switch,
.login-divider,
.login-security { text-align:center; }
.login-card .mode-eyebrow { width:100%; }
.login-card h1 { margin-top:8px; }
.login-card > p { width:100%; }
.login-card label > span { width:100%; }
.login-card .auth-switch { display:block; }
.login-divider { justify-content:center; }
.language-picker { position:relative; display:flex; align-items:center; }
.language-toggle { width:34px; height:34px; display:grid; place-items:center; padding:0; color:#eee; background:transparent; border:1px solid transparent; border-radius:8px; font-size:18px; }
.language-toggle:hover,.language-toggle[aria-expanded="true"] { background:#242424; border-color:#353535; }
.language-menu { position:absolute; top:42px; right:0; z-index:30; min-width:145px; padding:5px; background:#1d1d20; border:1px solid #38383e; border-radius:9px; box-shadow:0 16px 40px #0009; }
.language-menu[hidden] { display:none; }
.language-menu button { width:100%; display:flex; align-items:center; gap:9px; padding:9px 10px; color:#ccc; background:transparent; border-radius:6px; text-align:left; font-size:12px; }
.language-menu button:hover,.language-menu button.active { color:#fff; background:#292635; }
.language-menu button span { font-size:16px; }

/* V18.1 language selector on login */
.login-language-picker {
  position:absolute;
  top:22px;
  right:24px;
  z-index:40;
}
.login-language-picker .language-menu { top:42px; }
.login-language-picker .language-toggle { font-size:19px; }

/* Supplied emoji-style flag icons */
.language-toggle .flag-img { width:24px; height:24px; object-fit:contain; display:block; }
.language-menu .menu-flag { width:23px; height:23px; object-fit:contain; display:block; flex:0 0 23px; }


/* Minimal login redesign */
.login-screen { background:#101012; padding:24px; }
.login-card { width:min(380px,100%); padding:34px 32px 26px; background:#171719; border:1px solid #29292d; border-radius:12px; box-shadow:0 18px 55px rgba(0,0,0,.28); }
.login-card::before,.login-card::after { display:none !important; }
.login-brand { width:42px; height:42px; object-fit:contain; display:block; margin:0 auto 24px; }
.login-kicker { display:block; text-align:center; color:#85858c; font-size:10px; font-weight:600; letter-spacing:.8px; margin-bottom:8px; }
.login-card h1 { margin:0 0 7px; text-align:center; font-size:24px; letter-spacing:-.6px; }
.login-card > p { margin:0 0 24px; text-align:center; color:#85858c; font-size:13px; line-height:1.5; }
.login-fields { display:grid; gap:15px; }
.login-card label > span { color:#a4a4aa; font-size:11px; margin-bottom:7px; }
.login-card input[type=email],.login-card input[type=password] { box-sizing:border-box; margin:0; width:100%; height:42px; padding:0 12px; background:#111113; border:1px solid #2d2d31; border-radius:7px; color:#eee; font-size:13px; transition:border-color .15s,background .15s; }
.login-card input[type=email]:focus,.login-card input[type=password]:focus { border-color:#55555d; background:#121214; box-shadow:none; }
.login-options { display:flex; align-items:center; justify-content:space-between; margin:14px 0 18px; min-height:20px; }
.remember-option { display:flex !important; align-items:center; gap:7px; margin:0; cursor:pointer; }
.remember-option input { width:14px; height:14px; margin:0; accent-color:#777; }
.remember-option span { margin:0 !important; color:#85858c !important; font-size:11px !important; }
.forgot-button { padding:0; color:#99999f; background:none; font-size:11px; }
.forgot-button:hover { color:#fff; }
.auth-primary { width:100%; height:42px; margin:0; background:#eee; color:#111; border-radius:7px; font-size:13px; font-weight:600; }
.auth-primary:hover { background:#fff; box-shadow:none; }
.login-card .auth-switch { width:100%; margin-top:17px; color:#77777e; font-size:11px; background:none; }
.login-card .auth-switch:hover { color:#aaa; }
.login-card .auth-switch b { color:#d5d5d8; }
.login-foot { display:flex; justify-content:center; align-items:center; gap:7px; margin-top:22px; color:#55555c; font-size:10px; }
.login-language-picker { position:absolute; top:22px; right:22px; }
.login-language-picker .language-toggle { width:32px; height:32px; border:1px solid #29292d; background:#171719; border-radius:7px; }
.login-language-picker .language-toggle:hover,.login-language-picker .language-toggle[aria-expanded="true"] { background:#1d1d20; border-color:#38383d; }
@media (max-width:520px) { .login-screen{padding:18px;} .login-card{padding:28px 22px 22px;} .login-language-picker{top:14px;right:14px;} }

/* Login gate — minimal, with the real AI workspace visible behind it. */
.login-screen {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: grid;
  place-items: center;
  padding: 24px;
  background: transparent !important;
  overflow: hidden;
}
.login-screen[hidden] { display: none !important; }
.login-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(10,10,12,.58);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
}
.login-topbar {
  position: absolute;
  z-index: 3;
  top: 18px;
  right: 22px;
  display: flex;
  align-items: center;
  gap: 7px;
}
.login-discord,
.login-language-picker .language-toggle {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid rgba(255,255,255,.09);
  border-radius: 8px;
  background: rgba(24,24,27,.78);
  color: #d8d8dc;
  transition: background .15s ease, border-color .15s ease;
}
.login-discord:hover,
.login-language-picker .language-toggle:hover,
.login-language-picker .language-toggle[aria-expanded="true"] {
  background: #242428;
  border-color: rgba(255,255,255,.15);
}
.login-discord img { width: 20px; height: 20px; object-fit: contain; }
.login-language-picker { position: relative; }
.login-language-picker .language-menu { top: 43px; right: 0; }
.login-card {
  position: relative;
  z-index: 2;
  width: min(390px, calc(100vw - 32px));
  padding: 30px;
  background: rgba(25,25,28,.96);
  border: 1px solid #303035;
  border-radius: 10px;
  box-shadow: 0 20px 60px rgba(0,0,0,.35);
}
.login-brand {
  width: 38px;
  height: 38px;
  margin: 0 auto 21px;
  display: block;
  object-fit: contain;
}
.login-kicker {
  display: block;
  margin-bottom: 8px;
  color: #85858c;
  font-size: 9px;
  font-weight: 600;
  letter-spacing: .9px;
  text-align: center;
}
.login-card h1 {
  margin: 0 0 7px;
  color: #f1f1f3;
  font-size: 23px;
  line-height: 1.2;
  letter-spacing: -.5px;
  text-align: center;
}
.login-card > p {
  margin: 0 0 23px;
  color: #85858c;
  font-size: 12px;
  line-height: 1.5;
  text-align: center;
}
.login-fields { display: grid; gap: 13px; }
.login-card label > span {
  display: block;
  margin-bottom: 7px;
  color: #a4a4aa;
  font-size: 10px;
  font-weight: 500;
}
.login-card input {
  box-sizing: border-box;
  width: 100%;
  height: 42px;
  margin: 0;
  padding: 0 11px;
  color: #eeeef1;
  background: #141416;
  border: 1px solid #333339;
  border-radius: 7px;
  outline: none;
  font: 13px Inter, sans-serif;
}
.login-card input:hover { border-color: #414148; }
.login-card input:focus {
  border-color: #6258a4;
  box-shadow: 0 0 0 2px rgba(109,86,235,.10);
}
.login-card input::placeholder { color: #55555c; }
.login-options {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 14px 0 17px;
}
.remember-option {
  display: flex !important;
  align-items: center;
  gap: 7px;
  margin: 0 !important;
  color: #85858c !important;
  font-size: 10px !important;
}
.remember-option input { width: 13px; height: 13px; margin: 0; accent-color: #6d56eb; }
.forgot-button {
  padding: 0;
  color: #888891;
  background: transparent;
  font-size: 10px;
}
.forgot-button:hover { color: #c2c2c8; }
.auth-primary {
  width: 100%;
  height: 42px;
  padding: 0 14px;
  color: #fff;
  background: #6d56eb;
  border-radius: 7px;
  font-size: 12px;
  font-weight: 600;
}
.auth-primary:hover { background: #765ff1; }
.auth-primary:disabled { opacity: .55; cursor: wait; }
.login-card .auth-switch {
  width: 100%;
  margin-top: 14px;
  padding: 0;
  color: #77777f;
  background: transparent;
  font-size: 10px;
}
.login-card .auth-switch:hover { color: #aaaab1; }
.login-card .auth-switch b { color: #aaa0e8; font-weight: 600; }
.login-foot {
  display: flex;
  justify-content: center;
  gap: 7px;
  margin-top: 19px;
  color: #5e5e65;
  font-size: 9px;
}
.login-foot span:nth-child(2) { color: #3d3d43; }

@media (max-width: 520px) {
  .login-screen { padding: 16px; }
  .login-topbar { top: 12px; right: 12px; }
  .login-card { padding: 26px 20px 22px; }
  .login-card h1 { font-size: 21px; }
}

/* DopeAI — clean website-matched login v2 */
.login-screen {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: grid;
  place-items: center;
  padding: 28px;
  background: transparent !important;
  overflow: hidden;
}
.login-screen[hidden] { display: none !important; }

/* Keep the real DopeAI workspace visible underneath the gate. */
.login-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(9, 9, 11, .62);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
}

.login-topbar {
  position: absolute;
  z-index: 5;
  top: 20px;
  right: 22px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.login-discord,
.login-language-picker .language-toggle {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid rgba(255,255,255,.10);
  border-radius: 9px;
  background: rgba(19,19,22,.88);
  color: #d8d8dc;
  transition: .16s ease;
}
.login-discord:hover,
.login-language-picker .language-toggle:hover,
.login-language-picker .language-toggle[aria-expanded="true"] {
  background: #232327;
  border-color: rgba(255,255,255,.17);
}
.login-discord img { width: 21px; height: 21px; object-fit: contain; }
.login-language-picker { position: relative; }
.login-language-picker .language-menu { top: 46px; right: 0; }

/* New login panel: quiet, spacious and consistent with the main workspace. */
.login-card {
  position: relative;
  z-index: 3;
  box-sizing: border-box;
  width: min(430px, calc(100vw - 32px));
  padding: 42px 42px 32px;
  background: #18181b;
  border: 1px solid #2b2b30;
  border-radius: 16px;
  box-shadow: 0 28px 90px rgba(0,0,0,.46);
  overflow: hidden;
}
.login-card::before,
.login-card::after { display: none !important; }

.login-brand {
  width: 72px;
  height: 72px;
  display: block;
  object-fit: contain;
  margin: 0 0 28px;
}
.login-kicker {
  display: block;
  margin: 0 0 9px;
  color: #77777f;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 1.1px;
}
.login-card h1 {
  margin: 0 0 9px;
  color: #f2f2f4;
  font-size: 27px;
  line-height: 1.15;
  letter-spacing: -.75px;
  text-align: left;
}
.login-card > p {
  width: auto;
  margin: 0 0 30px;
  color: #85858d;
  font-size: 13px;
  line-height: 1.55;
  text-align: left;
}
.login-fields { display: grid; gap: 17px; }
.login-card label > span {
  display: block;
  width: auto;
  margin: 0 0 8px;
  color: #a4a4aa;
  font-size: 11px;
  font-weight: 500;
  text-align: left;
}
.login-card input[type="email"],
.login-card input[type="password"] {
  box-sizing: border-box;
  width: 100%;
  height: 46px;
  margin: 0;
  padding: 0 13px;
  color: #eeeeF1;
  background: #111113;
  border: 1px solid #303035;
  border-radius: 9px;
  outline: none;
  font-size: 13px;
  transition: border-color .15s ease, background .15s ease;
}
.login-card input[type="email"]:hover,
.login-card input[type="password"]:hover { border-color: #3b3b41; }
.login-card input[type="email"]:focus,
.login-card input[type="password"]:focus {
  background: #121214;
  border-color: #56565e;
  box-shadow: none;
}
.login-card input::placeholder { color: #55555c; }

.login-options {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 20px;
  margin: 15px 0 20px;
}
.remember-option {
  display: flex !important;
  align-items: center;
  gap: 7px;
  margin: 0 !important;
  cursor: pointer;
}
.remember-option input { width: 14px; height: 14px; margin: 0; accent-color: #77777d; }
.remember-option span {
  margin: 0 !important;
  color: #85858c !important;
  font-size: 11px !important;
  text-align: left !important;
}
.forgot-button {
  padding: 0;
  color: #8e8e96;
  background: transparent;
  font-size: 11px;
}
.forgot-button:hover { color: #e5e5e8; }

.auth-primary {
  width: 100%;
  height: 46px;
  margin: 0;
  color: #111113;
  background: #f0f0f1;
  border: 0;
  border-radius: 9px;
  font-size: 13px;
  font-weight: 650;
  box-shadow: none;
  transition: background .15s ease, transform .15s ease;
}
.auth-primary:hover { background: #fff; box-shadow: none; }
.auth-primary:active { transform: translateY(1px); }
.auth-primary:disabled { opacity: .6; cursor: wait; }

.login-card .auth-switch {
  width: 100%;
  margin: 18px 0 0;
  padding: 0;
  color: #77777f;
  background: transparent;
  font-size: 11px;
  text-align: center;
}
.login-card .auth-switch:hover { color: #aaaab1; }
.login-card .auth-switch b { color: #d3d3d7; font-weight: 600; }
.login-foot {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 7px;
  margin-top: 25px;
  color: #55555c;
  font-size: 9px;
}
.login-foot span:nth-child(2) { color: #38383d; }

@media (max-width: 520px) {
  .login-screen { padding: 16px; }
  .login-topbar { top: 13px; right: 14px; }
  .login-card { width: min(430px, calc(100vw - 24px)); padding: 32px 24px 26px; border-radius: 14px; }
  .login-brand { width: 62px; height: 62px; margin-bottom: 23px; }
  .login-card h1 { font-size: 24px; }
}

/* --- DopeAI minimal login v3 — matched to the workspace design --- */
.login-screen {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: grid;
  place-items: center;
  padding: 24px;
  background: #181818 !important;
  overflow: hidden;
}
.login-screen[hidden] { display: none !important; }
.login-backdrop {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(560px 340px at 50% -8%, rgba(109,86,235,.10), transparent 70%),
    #181818;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.login-topbar {
  position: absolute;
  z-index: 5;
  top: 18px;
  right: 20px;
  display: flex;
  align-items: center;
  gap: 7px;
}
.login-discord,
.login-language-picker .language-toggle {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  padding: 0;
  background: transparent;
  border: 1px solid #2a2a2a;
  border-radius: 8px;
  color: #d8d8dc;
  transition: background .15s ease, border-color .15s ease;
}
.login-discord:hover,
.login-language-picker .language-toggle:hover,
.login-language-picker .language-toggle[aria-expanded="true"] {
  background: #202020;
  border-color: #353535;
}
.login-discord img { width: 19px; height: 19px; object-fit: contain; }
.login-language-picker { position: relative; }
.login-language-picker .language-menu { top: 43px; right: 0; }

.login-card {
  position: relative;
  z-index: 3;
  box-sizing: border-box;
  width: min(400px, calc(100vw - 32px));
  padding: 38px 34px 28px;
  background: #111111;
  border: 1px solid #2a2a2a;
  border-radius: 14px;
  box-shadow: 0 24px 70px rgba(0,0,0,.4);
  overflow: hidden;
  animation: login-in .3s ease both;
}
.login-card::before,
.login-card::after { display: none !important; }
@keyframes login-in {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.login-brand {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  margin: 0 auto 22px;
  padding: 9px;
  object-fit: contain;
  background: rgba(109,86,235,.10);
  border: 1px solid rgba(109,86,235,.28);
  border-radius: 12px;
}

.login-kicker {
  display: block;
  margin: 0 0 8px;
  color: #9585eb;
  font: 500 9px "DM Mono", monospace;
  letter-spacing: 1.4px;
  text-align: center;
}
.login-card h1 {
  margin: 0 0 7px;
  color: #f2f2f4;
  font-size: 22px;
  line-height: 1.2;
  letter-spacing: -.6px;
  text-align: center;
}
.login-card > p {
  width: auto;
  margin: 0 0 26px;
  color: #85858c;
  font-size: 12px;
  line-height: 1.55;
  text-align: center;
}

.login-fields { display: grid; gap: 14px; }
.login-card label > span {
  display: block;
  width: auto;
  margin: 0 0 7px;
  color: #9d9da5;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .2px;
  text-align: left;
}
.login-card input[type="email"],
.login-card input[type="password"] {
  box-sizing: border-box;
  width: 100%;
  height: 42px;
  margin: 0;
  padding: 0 12px;
  color: #eeeef1;
  background: #181818;
  border: 1px solid #2e2e2e;
  border-radius: 8px;
  outline: none;
  font-size: 13px;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.login-card input[type="email"]:hover,
.login-card input[type="password"]:hover { border-color: #3a3a3a; }
.login-card input[type="email"]:focus,
.login-card input[type="password"]:focus {
  background: #181818;
  border-color: #6d56eb;
  box-shadow: 0 0 0 3px rgba(109,86,235,.12);
}
.login-card input::placeholder { color: #55555c; }

.login-options {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 20px;
  margin: 15px 0 18px;
}
.remember-option {
  display: flex !important;
  align-items: center;
  gap: 7px;
  margin: 0 !important;
  cursor: pointer;
}
.remember-option input { width: 14px; height: 14px; margin: 0; accent-color: #6d56eb; }
.remember-option span {
  margin: 0 !important;
  color: #85858c !important;
  font-size: 11px !important;
  text-align: left !important;
}
.forgot-button {
  padding: 0;
  color: #8e8e96;
  background: transparent;
  font-size: 11px;
}
.forgot-button:hover { color: #c9bdfa; }

.auth-primary {
  width: 100%;
  height: 43px;
  margin: 0;
  color: #fff;
  background: #6d56eb;
  border: 0;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  box-shadow: none;
  transition: background .15s ease, transform .15s ease;
}
.auth-primary:hover { background: #7a63ee; box-shadow: none; }
.auth-primary:active { transform: translateY(1px); }
.auth-primary:disabled { opacity: .6; cursor: wait; }

.login-card .auth-switch {
  width: 100%;
  margin: 16px 0 0;
  padding: 0;
  color: #77777f;
  background: transparent;
  font-size: 11px;
  text-align: center;
}
.login-card .auth-switch:hover { color: #a5a5ad; }
.login-card .auth-switch b { color: #a997ff; font-weight: 600; }

.login-foot {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 7px;
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid #222226;
  color: #55555c;
  font-size: 9px;
}
.login-foot span:nth-child(2) { color: #38383d; }

@media (max-width: 520px) {
  .login-screen { padding: 16px; }
  .login-topbar { top: 13px; right: 14px; }
  .login-card { padding: 30px 22px 24px; border-radius: 12px; }
  .login-brand { width: 42px; height: 42px; margin-bottom: 18px; }
  .login-card h1 { font-size: 20px; }
}

/* --- DopeAI login v4 — refined minimal, bigger bare logo --- */
.login-screen { background: #181818 !important; }
.login-backdrop {
  background:
    radial-gradient(640px 380px at 50% -10%, rgba(109,86,235,.14), transparent 70%),
    radial-gradient(900px 600px at 50% 115%, rgba(109,86,235,.05), transparent 65%),
    #181818;
}

.login-card {
  width: min(408px, calc(100vw - 32px));
  padding: 44px 38px 30px;
  background: #131315;
  border: 1px solid #26262b;
  border-radius: 18px;
  box-shadow: 0 32px 90px rgba(0,0,0,.5), 0 0 0 1px rgba(255,255,255,.02) inset;
}

.login-brand {
  width: 88px;
  height: 88px;
  display: block;
  margin: 0 auto 20px;
  padding: 0;
  object-fit: contain;
  background: none;
  border: 0;
  border-radius: 0;
  filter: drop-shadow(0 6px 22px rgba(109,86,235,.35));
  animation: login-in .35s ease both;
}

.login-kicker {
  margin-bottom: 10px;
  color: #9585eb;
  font-size: 9px;
  letter-spacing: 2px;
}
.login-card h1 {
  margin-bottom: 8px;
  font-size: 26px;
  letter-spacing: -.7px;
}
.login-card > p { margin-bottom: 28px; font-size: 12.5px; }

.login-card input[type="email"],
.login-card input[type="password"] {
  height: 44px;
  background: #1b1b1e;
  border: 1px solid #2c2c31;
  border-radius: 9px;
}
.login-card input[type="email"]:hover,
.login-card input[type="password"]:hover { border-color: #3a3a40; }
.login-card input[type="email"]:focus,
.login-card input[type="password"]:focus {
  background: #1d1d20;
  border-color: #6d56eb;
  box-shadow: 0 0 0 3px rgba(109,86,235,.14);
}

/* Password visibility toggle */
.password-wrap { position: relative; }
.password-wrap input { padding-right: 42px !important; }
.password-toggle {
  position: absolute;
  top: 50%;
  right: 6px;
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  padding: 0;
  color: #6a6a72;
  background: transparent;
  border-radius: 7px;
  transform: translateY(-50%);
  transition: color .15s ease, background .15s ease;
}
.password-toggle:hover { color: #c9bdfa; background: rgba(109,86,235,.10); }
.password-toggle svg { width: 17px; height: 17px; }

.caps-warning {
  display: block;
  margin: 7px 0 0;
  color: #e5c57b;
  font-size: 10px;
}
.caps-warning[hidden] { display: none; }

.auth-primary {
  height: 44px;
  background: linear-gradient(135deg, #7c66f0 0%, #6d56eb 100%);
  border-radius: 9px;
  letter-spacing: .1px;
  box-shadow: 0 8px 24px rgba(109,86,235,.22);
}
.auth-primary:hover {
  background: linear-gradient(135deg, #8671f3 0%, #7762ee 100%);
  box-shadow: 0 10px 30px rgba(109,86,235,.3);
}

.login-foot { margin-top: 24px; padding-top: 19px; border-top: 1px solid #212124; }

@media (max-width: 520px) {
  .login-card { padding: 34px 24px 26px; border-radius: 16px; }
  .login-brand { width: 74px; height: 74px; margin-bottom: 16px; }
  .login-card h1 { font-size: 22px; }
}
