/* Velmio product UI: shared type, tokens and components for the Studio, dashboard and Contact page. */
@font-face { font-family: "Plus Jakarta Sans"; src: url("../fonts/plus-jakarta-sans-latin.woff2") format("woff2"); font-weight: 200 800; font-display: swap; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2190-2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Plus Jakarta Sans"; src: url("../fonts/plus-jakarta-sans-latin-ext.woff2") format("woff2"); font-weight: 200 800; font-display: swap; unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }

.vm-ui {
  --head: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --body: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --brand: #8E78E6;
  --brand-hover: #A08CEC;
  --on-brand: #FFFFFF;
  --sidebar: #151933;
  --card: #1A1D35;
  --soft: #242044;
  --sm-shadow: 0 1px 2px rgba(5, 7, 20, .4);
  --md-shadow: 0 10px 30px rgba(5, 7, 20, .4);
  --r: 14px;
  font-size: 1rem;
}
:root[data-theme="light"] .vm-ui {
  --bg: #FAF9FD;
  --bg-2: #FFFFFF;
  --violet: #E9E4FA;
  --purple: #7861D8;
  --lavender: #5B42C8;
  --ivory: #17152B;
  --muted: #66617B;
  --glass: #F4F2FA;
  --glass-line: #E7E4EF;
  --fg-rgb: 23, 21, 43;
  --bg-rgb: 255, 255, 255;
  --accent-rgb: 91, 66, 200;
  --shadow: 0 18px 50px rgba(40, 30, 90, .14);
  --brand: #5B42C8;
  --brand-hover: #4C35AE;
  --sidebar: #F4F2FA;
  --card: #FFFFFF;
  --soft: #E9E4FA;
  --sm-shadow: 0 1px 2px rgba(40, 30, 90, .06);
  --md-shadow: 0 8px 24px rgba(40, 30, 90, .08);
}

.ic { flex: none; width: 18px; height: 18px; }
.ui-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 0 18px; border: 1px solid var(--glass-line); border-radius: 12px; background: var(--card); color: var(--ivory); font: 600 .9rem/1.2 var(--body); text-decoration: none; cursor: pointer; transition: background-color .15s ease, border-color .15s ease, transform .15s ease, box-shadow .15s ease; }
.ui-btn:hover:not(:disabled) { border-color: var(--lavender); }
.ui-btn:active:not(:disabled) { transform: translateY(1px); }
.ui-btn:disabled { opacity: .55; cursor: default; }
.ui-btn.primary { border-color: transparent; background: var(--brand); color: var(--on-brand); }
.ui-btn.primary:hover:not(:disabled) { background: var(--brand-hover); }
.ui-btn.danger { color: var(--error); }
.ui-btn.danger:hover:not(:disabled) { border-color: var(--error); }
.soon { display: inline-block; padding: 2px 8px; border-radius: 999px; background: var(--glass); color: var(--muted); font-size: .7rem; font-weight: 600; line-height: 1.5; white-space: nowrap; }
.avatar { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--soft); color: var(--lavender); font-size: .82rem; font-weight: 700; text-transform: uppercase; }

/* Menus */
.menu { position: absolute; z-index: 70; top: calc(100% + 6px); inset-inline-end: 0; width: 256px; max-width: calc(100vw - 24px); max-height: calc(100vh - 80px); padding: 6px; border: 1px solid var(--glass-line); border-radius: 14px; background: var(--bg-2); box-shadow: var(--shadow); overflow-y: auto; text-align: start; }
.menu.is-up { top: auto; bottom: calc(100% + 6px); }
.motion .menu:not([hidden]) { animation: menu-in .14s ease-out; }
@keyframes menu-in { from { opacity: 0; transform: translateY(-4px); } }
.menu a, .menu button { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 44px; padding: 0 10px; border: 0; border-radius: 9px; background: none; color: var(--ivory); font: 500 .875rem/1.2 var(--body); text-align: start; text-decoration: none; cursor: pointer; }
.menu a:hover, .menu button:hover:not(:disabled), .menu a:focus-visible, .menu button:focus-visible { background: var(--glass); outline: none; }
.menu button:disabled { color: var(--muted); cursor: default; }
.menu .ic { color: var(--muted); }
.menu .is-danger, .menu .is-danger .ic { color: var(--error); }
.menu hr { height: 1px; margin: 6px; border: 0; background: var(--glass-line); }
.menu .soon { margin-inline-start: auto; }
.acct { position: relative; flex: none; }
.acct-btn { display: block; padding: 4px; border: 0; border-radius: 50%; background: none; cursor: pointer; }
.acct-btn:hover .avatar { background: var(--violet); }
.acct-id { display: flex; align-items: center; gap: 10px; padding: 8px 10px; }
.acct-id div { min-width: 0; }
.acct-id strong { display: block; overflow: hidden; color: var(--ivory); font-size: .9rem; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.acct-id span[data-account-email] { display: block; overflow: hidden; color: var(--muted); font-size: .8rem; text-overflow: ellipsis; white-space: nowrap; }
.ui-dialog { width: min(420px, calc(100vw - 32px)); padding: 20px; border: 1px solid var(--glass-line); border-radius: 16px; background: var(--bg-2); color: var(--ivory); box-shadow: var(--shadow); }
.ui-dialog::backdrop { background: rgba(10, 8, 30, .45); }
.ui-dialog p { margin-bottom: 12px; font-weight: 500; }
.ui-dialog input { width: 100%; height: 46px; padding: 0 12px; border: 1px solid var(--glass-line); border-radius: 10px; background: var(--card); color: var(--ivory); font: 400 16px var(--body); }
.ui-dialog-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 16px; }
.switch { position: relative; flex: none; width: 40px; height: 24px; border: 0; border-radius: 999px; background: var(--glass-line); cursor: pointer; }
.switch::after { content: ""; position: absolute; top: 3px; inset-inline-start: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: transform .15s ease; }
.switch[aria-checked="true"] { background: var(--brand); }
.switch[aria-checked="true"]::after { transform: translateX(16px); }
[dir="rtl"] .switch[aria-checked="true"]::after { transform: translateX(-16px); }
.switch:disabled { opacity: .55; cursor: default; }
input[type="range"] { width: 100%; accent-color: var(--brand); }
input[type="range"]:disabled { opacity: .45; }

@media (prefers-reduced-motion: reduce) {
  .ui-btn, .switch::after { transition: none; }
}
