@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:wght,FILL@100..700,0..1&display=swap');

:root {
  --primary: 0 100% 32%;
  --primary-foreground: 0 0% 100%;
  --primary-hover: 4 100% 36%;
  --background: 0 0% 100%;
  --foreground: 222 47% 11%;
  --card: 0 0% 100%;
  --card-foreground: 222 47% 11%;
  --popover: 0 0% 100%;
  --popover-foreground: 222 47% 11%;
  --muted: 210 40% 96%;
  --muted-foreground: 215 14% 35%;
  --secondary: 215 20% 50%;
  --secondary-foreground: 222 47% 11%;
  --accent: 210 40% 96%;
  --accent-foreground: 222 47% 11%;
  --destructive: 0 84% 60%;
  --destructive-foreground: 0 0% 100%;
  --border: 214 32% 91%;
  --input: 214 32% 91%;
  --ring: 0 100% 32%;
  --radius: 0;
  --success: 145 63% 37%;
  --success-bg: 145 60% 95%;
  --warning: 36 92% 43%;
  --warning-bg: 48 100% 96%;
  --info: 217 91% 60%;
  --info-bg: 214 100% 97%;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  font-family: 'Inter', system-ui, sans-serif;
  background: hsl(var(--background));
  color: hsl(var(--foreground));
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }
input, select, textarea { outline: none; }
.material-symbols-outlined {
  font-family: 'Material Symbols Outlined';
  font-weight: normal;
  font-style: normal;
  font-size: 24px;
  line-height: 1;
  letter-spacing: normal;
  text-transform: none;
  display: inline-block;
  white-space: nowrap;
  word-wrap: normal;
  direction: ltr;
  -webkit-font-feature-settings: 'liga';
  -webkit-font-smoothing: antialiased;
  font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 40px;
  padding: 10px 16px;
  border-radius: 0;
  border: none;
  background: transparent;
  color: hsl(var(--foreground));
  font-size: 14px;
  font-weight: 600;
  line-height: 1;
  text-decoration: none;
  transition: all .15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: scale(.98); }
.btn:focus-visible {
  outline: 2px solid hsl(var(--ring) / 0.35);
  outline-offset: 2px;
}
.btn:disabled {
  opacity: .5;
  cursor: not-allowed;
  transform: none;
}
.btn-primary {
  background: hsl(var(--primary));
  color: hsl(var(--primary-foreground));
  box-shadow: 0 1px 2px hsl(var(--foreground) / 0.05);
}
.btn-primary:hover:not(:disabled) { background: hsl(var(--primary) / 0.92); }
.btn-secondary {
  border: 1px solid hsl(var(--primary));
  background: transparent;
  color: hsl(var(--primary));
}
.btn-secondary:hover:not(:disabled) {
  background: hsl(var(--primary) / 0.08);
  border-color: hsl(var(--primary));
}
.btn-outline {
  border: 1px solid hsl(var(--border));
  background: hsl(var(--background));
  color: hsl(var(--foreground));
}
.btn-outline:hover:not(:disabled) {
  background: hsl(var(--muted));
  border-color: hsl(var(--input));
}
.btn-ghost {
  color: hsl(var(--muted-foreground));
}
.btn-ghost:hover:not(:disabled) {
  background: hsl(var(--muted));
  color: hsl(var(--foreground));
}
.btn-danger {
  border: 1px solid hsl(var(--destructive));
  background: hsl(var(--destructive));
  color: hsl(var(--destructive-foreground));
}
.btn-danger:hover:not(:disabled) { background: hsl(var(--destructive) / 0.92); }
.btn-sm {
  min-height: 32px;
  padding: 8px 12px;
  font-size: 13px;
}

.card {
  background: hsl(var(--card));
  border: 1px solid hsl(var(--border));
  border-radius: 0;
  box-shadow: 0 2px 10px hsl(var(--foreground) / 0.04);
}
.card-header {
  padding: 24px;
  border-bottom: 1px solid hsl(var(--border));
}
.card-content { padding: 24px; }
.card-footer {
  padding: 16px 24px;
  border-top: 1px solid hsl(var(--border));
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}
.badge-default {
  background: hsl(var(--muted));
  color: hsl(var(--muted-foreground));
}
.badge-primary {
  background: hsl(var(--primary) / 0.1);
  border: 1px solid hsl(var(--primary) / 0.16);
  color: hsl(var(--primary));
}
.badge-success {
  background: hsl(var(--success-bg));
  color: hsl(var(--success));
}
.badge-warning {
  background: hsl(var(--warning-bg));
  color: hsl(var(--warning));
}
.badge-info {
  background: hsl(var(--info-bg));
  color: hsl(var(--info));
}

.input,
.select,
.textarea {
  width: 100%;
  min-height: 40px;
  padding: 10px 12px;
  border: 1px solid hsl(var(--input));
  border-radius: 0;
  background: hsl(var(--background));
  color: hsl(var(--foreground));
  font-size: 14px;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.input::placeholder,
.textarea::placeholder { color: hsl(var(--muted-foreground)); }
.input:focus,
.select:focus,
.textarea:focus {
  border-color: hsl(var(--primary));
  box-shadow: 0 0 0 3px hsl(var(--primary) / 0.1);
}

.table {
  width: 100%;
  border-collapse: collapse;
}
.table thead {
  background: hsl(var(--muted) / 0.5);
  border-bottom: 1px solid hsl(var(--border));
}
.table th,
.table td {
  padding: 12px 16px;
  text-align: left;
}
.table th {
  font-size: 12px;
  font-weight: 700;
  color: hsl(var(--muted-foreground));
}
.table td {
  font-size: 14px;
  border-bottom: 1px solid hsl(var(--border));
}
.table tbody tr:hover { background: hsl(var(--muted) / 0.35); }

.dialog-overlay {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: hsl(var(--foreground) / 0.36);
  backdrop-filter: blur(6px);
  opacity: 0;
  pointer-events: none;
  transition: opacity .15s ease;
}
.dialog-overlay.open {
  opacity: 1;
  pointer-events: auto;
}
.dialog-content {
  width: min(100%, 560px);
  background: hsl(var(--card));
  border: 1px solid hsl(var(--border));
  border-radius: 0;
  box-shadow: 0 24px 64px hsl(var(--foreground) / 0.18);
}

#toast {
  position: fixed;
  top: 32px;
  right: 32px;
  z-index: 300;
  display: none;
}
#toast-container {
  width: 384px;
  background: hsl(var(--card));
  border-radius: 0;
  box-shadow: 0 20px 25px -5px hsl(var(--foreground) / 0.1);
  overflow: hidden;
}
.toast-body {
  padding: 16px;
  display: flex;
  gap: 12px;
}
.toast-icon {
  font-size: 18px;
}
.toast-main {
  flex: 1;
}
.toast-header {
  display: flex;
  align-items: flex-start;
  gap: 8px;
}
.toast-copy {
  flex: 1;
}
.toast-title {
  margin: 0;
  font-size: 13px;
  font-weight: 700;
}
.toast-desc {
  margin: 4px 0 0;
  font-size: 12px;
  color: hsl(var(--muted-foreground));
}
.toast-close {
  border: 0;
  background: transparent;
  color: hsl(var(--muted-foreground));
  padding: 0;
  cursor: pointer;
  flex-shrink: 0;
}
.toast-actions {
  padding: 0 16px 12px;
  display: flex;
  gap: 8px;
}

.layout-shell { min-height: 100vh; display: flex; }
.sidebar {
  width: 288px;
  flex-shrink: 0;
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 20px 16px;
  border-right: 1px solid hsl(var(--border));
  background: hsl(210 20% 98% / 0.92);
  backdrop-filter: blur(20px);
  display: flex;
  flex-direction: column;
}
.brand-card {
  border: 1px solid hsl(var(--border));
  border-radius: 0;
  background: linear-gradient(135deg, hsl(0 100% 97%) 0%, hsl(var(--background)) 100%);
  padding: 16px;
  box-shadow: 0 2px 10px hsl(var(--foreground) / 0.04);
}
.brand-row { display: flex; align-items: center; gap: 12px; }
.brand-logo {
  width: 48px;
  height: 48px;
  border-radius: 0;
  background: hsl(var(--primary));
  color: hsl(var(--primary-foreground));
  display: grid;
  place-items: center;
  font-size: 20px;
  font-weight: 800;
  box-shadow: 0 10px 20px hsl(var(--primary) / 0.18);
}
.brand-logo--large { width: 56px; height: 56px; border-radius: 0; font-size: 24px; }
.brand-title { margin: 0; font-size: 14px; font-weight: 700; color: hsl(var(--foreground)); }
.brand-subtitle { margin: 4px 0 0; font-size: 12px; color: hsl(var(--muted-foreground)); }
.workspace-card {
  margin-top: 16px;
  padding: 12px;
  border-radius: 0;
  background: hsl(var(--muted));
  border: 1px solid hsl(var(--border));
}
.workspace-card--interactive {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  text-align: left;
  color: inherit;
}
.workspace-card--interactive:hover { border-color: hsl(var(--primary) / 0.2); background: hsl(var(--background)); }
.workspace-label { margin: 0; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .16em; color: hsl(var(--muted-foreground)); }
.workspace-name { margin: 4px 0 0; font-size: 14px; font-weight: 700; }
.workspace-role { margin: 4px 0 0; font-size: 12px; color: hsl(var(--muted-foreground)); }
.sidebar-nav { margin-top: 24px; display: flex; flex-direction: column; gap: 20px; }
.nav-group-title {
  margin: 0 12px 8px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .16em;
  color: hsl(var(--muted-foreground));
}
.nav-group-items { display: flex; flex-direction: column; gap: 4px; }
.nav-item {
  width: 100%;
  border: 0;
  background: transparent;
  color: hsl(var(--muted-foreground));
  display: flex;
  align-items: center;
  gap: 12px;
  text-align: left;
  padding: 10px 12px;
  border-radius: 0;
  transition: all .15s ease;
}
.nav-item:hover { background: hsl(var(--accent)); color: hsl(var(--accent-foreground)); }
.nav-item.active {
  background: hsl(0 100% 97%);
  color: hsl(var(--primary));
  font-weight: 700;
  box-shadow: inset 0 0 0 1px hsl(var(--primary) / 0.08);
}
.nav-item.active .material-symbols-outlined { font-variation-settings: 'FILL' 1, 'wght' 500, 'GRAD' 0, 'opsz' 24; }
.sidebar-tip {
  margin-top: auto;
  border-radius: 0;
  background: hsl(var(--muted));
  border: 1px solid hsl(var(--border));
  padding: 16px;
}
.sidebar-tip-title { margin: 0; font-size: 12px; font-weight: 700; color: hsl(var(--foreground)); }
.sidebar-tip-copy { margin: 6px 0 0; font-size: 12px; color: hsl(var(--muted-foreground)); line-height: 1.5; }

.main-shell { flex: 1; min-width: 0; }
.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  background: hsl(var(--background) / 0.88);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid hsl(var(--border));
  padding: 18px 32px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  color: hsl(var(--muted-foreground));
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .16em;
}
.breadcrumb .material-symbols-outlined { font-size: 14px; }
.breadcrumb-current { color: hsl(var(--primary)); }
.page-heading-row { margin-top: 6px; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.page-title { margin: 0; font-size: 32px; font-weight: 800; color: hsl(var(--foreground)); }
.page-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  border-radius: 999px;
  border: 1px solid hsl(var(--primary) / 0.1);
  background: hsl(0 100% 97%);
  color: hsl(var(--primary));
  font-size: 11px;
  font-weight: 700;
}
.page-description { margin: 6px 0 0; font-size: 14px; color: hsl(var(--muted-foreground)); }
.topbar-actions { display: flex; align-items: center; gap: 12px; }
.topbar-search {
  min-width: 300px;
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid hsl(var(--border));
  background: hsl(var(--background));
  border-radius: 0;
  padding: 10px 12px;
}
.topbar-search input { border: 0; width: 100%; background: transparent; color: hsl(var(--foreground)); }
.topbar-search .material-symbols-outlined { color: hsl(var(--muted-foreground)); font-size: 18px; }
.icon-button {
  position: relative;
  width: 42px;
  height: 42px;
  border-radius: 0;
  border: 1px solid hsl(var(--border));
  background: hsl(var(--background));
  color: hsl(var(--muted-foreground));
}
.icon-button:hover { background: hsl(var(--muted)); color: hsl(var(--foreground)); }
.icon-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  border-radius: 999px;
  background: hsl(var(--primary));
  color: hsl(var(--primary-foreground));
  display: grid;
  place-items: center;
  font-size: 10px;
  font-weight: 700;
}
.user-chip {
  border: 1px solid hsl(var(--border));
  background: hsl(var(--background));
  border-radius: 0;
  padding: 8px 10px 8px 14px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.user-chip:hover { background: hsl(var(--muted)); }
.user-chip__meta { display: flex; flex-direction: column; align-items: flex-end; }
.user-chip__name { font-size: 13px; font-weight: 700; color: hsl(var(--foreground)); }
.user-chip__role { font-size: 11px; color: hsl(var(--muted-foreground)); }
.user-chip__avatar {
  width: 36px;
  height: 36px;
  border-radius: 0;
  background: hsl(var(--primary));
  color: hsl(var(--primary-foreground));
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 700;
}

.content-shell { padding: 24px 32px; }
.content-grid { display: grid; grid-template-columns: minmax(0,1fr) 320px; gap: 24px; align-items: start; }
.frame-column { min-width: 0; }
.utility-bar {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  margin-bottom: 12px;
  flex-wrap: wrap;
}
.utility-bar__actions,
.utility-bar__meta { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 999px;
  background: hsl(var(--background));
  border: 1px solid hsl(var(--border));
  padding: 7px 12px;
  font-size: 12px;
  font-weight: 600;
  color: hsl(var(--muted-foreground));
}
.status-pill--success { background: hsl(var(--success-bg)); color: hsl(var(--success)); border-color: hsl(var(--success) / 0.15); }
.ghost-button,
.secondary-action,
.primary-action,
.workspace-option {
  border-radius: 0;
  transition: all .15s ease;
}
.ghost-button,
.secondary-action {
  border: 1px solid hsl(var(--border));
  background: hsl(var(--background));
  color: hsl(var(--muted-foreground));
  padding: 10px 14px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
}
.ghost-button:hover,
.secondary-action:hover { background: hsl(var(--muted)); color: hsl(var(--foreground)); }
.ghost-button--primary,
.primary-action {
  border: 1px solid transparent;
  background: hsl(var(--primary));
  color: hsl(var(--primary-foreground));
  font-weight: 700;
}
.ghost-button--primary:hover,
.primary-action:hover { background: hsl(var(--primary) / 0.9); }
.primary-action,
.secondary-action { width: 100%; justify-content: center; padding: 12px 14px; }

.app-frame-shell {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  border: 1px solid hsl(var(--border));
  background: hsl(var(--background));
  box-shadow: 0 12px 30px hsl(var(--foreground) / 0.08);
}
.app-frame-shell.loading .app-frame { opacity: 0; transform: translateY(18px) scale(.995); }
.app-frame-shell.ready .app-frame { opacity: 1; transform: translateY(0) scale(1); }
.app-frame {
  width: 100%;
  height: calc(100vh - 13.25rem);
  display: block;
  background: hsl(var(--background));
  border: 0;
  transition: opacity .22s ease, transform .28s ease;
}
.loading-overlay {
  position: absolute;
  inset: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: hsl(var(--background) / 0.8);
  backdrop-filter: blur(6px);
  opacity: 0;
  pointer-events: none;
  transition: opacity .18s ease;
}
.app-frame-shell.loading .loading-overlay { opacity: 1; }
.pulse-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: hsl(var(--primary));
  animation: pulse 1.2s infinite ease-in-out;
}
@keyframes pulse {
  0%,100% { opacity: .35; transform: scale(.92); }
  50% { opacity: 1; transform: scale(1); }
}

.context-column { display: flex; flex-direction: column; gap: 16px; position: sticky; top: 110px; }
.context-card {
  border-radius: 0;
  border: 1px solid hsl(var(--border));
  background: hsl(var(--background));
  padding: 20px;
  box-shadow: 0 2px 10px hsl(var(--foreground) / 0.04);
}
.context-card--accent { background: hsl(var(--warning-bg)); border-color: hsl(var(--warning) / 0.3); }
.context-label {
  margin: 0;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .16em;
  color: hsl(var(--muted-foreground));
}
.quick-actions { margin-top: 16px; display: flex; flex-direction: column; gap: 8px; }
.context-panel { margin-top: 12px; display: flex; flex-direction: column; gap: 12px; }
.context-item {
  border-radius: 0;
  background: hsl(var(--muted));
  border: 1px solid hsl(var(--border));
  padding: 12px;
  font-size: 13px;
  color: hsl(var(--muted-foreground));
  line-height: 1.5;
}
.context-accent-row { display: flex; align-items: flex-start; gap: 8px; }
.context-accent-row .material-symbols-outlined { color: hsl(var(--warning)); font-size: 18px; margin-top: 2px; }
.context-accent-title { margin: 0; font-size: 12px; font-weight: 700; color: hsl(var(--warning) / 0.8); }
.context-accent-copy { margin: 4px 0 0; font-size: 12px; color: hsl(var(--warning) / 0.7); line-height: 1.5; }

/* ===== Login v2 ===== */
.login-v2 {
  min-height: 100vh;
  display: flex;
  background: hsl(var(--background));
}

.login-v2__left {
  width: 45%;
  display: flex;
  flex-direction: column;
  padding: 48px 56px;
  background: hsl(var(--background));
  overflow-y: auto;
}

.login-v2__logo {
  display: flex;
  align-items: center;
  gap: 10px;
}
.login-v2__logo .brand-logo {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  font-size: 18px;
  box-shadow: 0 6px 14px hsl(var(--primary) / 0.15);
}

.login-v2__body {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 0;
}

.login-v2__card {
  width: 100%;
  max-width: 400px;
  background: hsl(var(--background));
  border: 1px solid hsl(var(--border));
  border-radius: 0;
  padding: 32px;
  box-shadow: 0 2px 16px hsl(var(--foreground) / 0.06);
}

.login-v2__title {
  margin: 0 0 24px;
  font-size: 24px;
  font-weight: 700;
  color: hsl(var(--foreground));
  line-height: 1.2;
}

.login-v2__tabs {
  display: flex;
  gap: 24px;
  border-bottom: 1px solid hsl(var(--border));
  margin-bottom: 24px;
}

.login-v2__tab {
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  padding: 0 2px 10px;
  font-size: 14px;
  font-weight: 500;
  color: hsl(var(--muted-foreground));
  cursor: pointer;
  transition: color .15s, border-color .15s;
}
.login-v2__tab.active {
  color: hsl(var(--primary));
  border-bottom-color: hsl(var(--primary));
  font-weight: 600;
}

.login-v2__input {
  width: 100%;
  border: 1px solid hsl(var(--border));
  border-radius: 8px;
  padding: 12px 16px;
  font-size: 13px;
  background: hsl(var(--background));
  color: hsl(var(--foreground));
  margin-bottom: 14px;
  display: block;
  transition: border-color .15s, box-shadow .15s;
}
.login-v2__input::placeholder { color: hsl(var(--muted-foreground)); }
.login-v2__input:focus {
  outline: none;
  border-color: hsl(var(--primary) / 0.4);
  box-shadow: 0 0 0 3px hsl(var(--primary) / 0.08);
}

.login-v2__btn-continue {
  width: 100%;
  padding: 12px 16px;
  background: hsl(220 13% 91%);
  color: hsl(var(--primary-foreground));
  border: none;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  margin-bottom: 18px;
  display: block;
  transition: background .15s, transform .1s;
}
.login-v2__btn-continue:hover { background: hsl(220 13% 85%); }
.login-v2__btn-continue:active { transform: scale(.98); }

.login-v2__terms {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 24px;
}
.login-v2__terms input[type=checkbox] {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  margin-top: 2px;
  accent-color: hsl(var(--primary));
  cursor: pointer;
}
.login-v2__terms label {
  font-size: 12px;
  color: hsl(var(--muted-foreground));
  line-height: 1.55;
  cursor: pointer;
}
.login-v2__terms a { color: hsl(var(--info)); text-decoration: none; }
.login-v2__terms a:hover { text-decoration: underline; }

.login-v2__divider {
  position: relative;
  text-align: center;
  margin-bottom: 20px;
}
.login-v2__divider::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 0; right: 0;
  height: 1px;
  background: hsl(var(--border));
}
.login-v2__divider span {
  position: relative;
  background: hsl(var(--background));
  padding: 0 12px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: hsl(var(--muted-foreground));
}

.login-v2__socials { display: flex; flex-direction: column; gap: 10px; }

.login-v2__social-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 16px;
  border: 1px solid hsl(var(--border));
  border-radius: 8px;
  background: hsl(var(--background));
  font-size: 13px;
  font-weight: 500;
  color: hsl(var(--muted-foreground));
  cursor: pointer;
  transition: background .15s;
}
.login-v2__social-btn:hover { background: hsl(var(--muted)); }

.login-v2__vid-icon {
  width: 20px;
  height: 20px;
  border-radius: 5px;
  background: hsl(var(--primary));
  color: hsl(var(--primary-foreground));
  display: grid;
  place-items: center;
  font-size: 11px;
  font-weight: 800;
  flex-shrink: 0;
}

.login-v2__footer { margin-top: auto; padding-top: 32px; }

.login-v2__lang-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: none;
  border: none;
  color: hsl(var(--muted-foreground));
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  padding: 0;
  transition: color .15s;
}
.login-v2__lang-btn:hover { color: hsl(var(--foreground)); }

.login-v2__right {
  width: 55%;
  background: hsl(var(--info-bg));
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px;
  position: relative;
  overflow: hidden;
}

.login-v2__visual {
  max-width: 500px;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.login-v2__visual-img {
  width: 100%;
  border-radius: 0;
  box-shadow: 0 24px 60px hsl(var(--foreground) / 0.1);
  margin-bottom: 40px;
  object-fit: contain;
}

.login-v2__visual-title {
  margin: 0 0 16px;
  font-size: 32px;
  font-weight: 700;
  color: hsl(var(--foreground));
  text-align: center;
  line-height: 1.15;
  letter-spacing: -.02em;
}

.login-v2__visual-copy {
  margin: 0;
  font-size: 16px;
  color: hsl(var(--muted-foreground));
  text-align: center;
  line-height: 1.6;
  max-width: 360px;
}

.login-v2__deco-1 {
  position: absolute;
  bottom: 40px; left: 40px;
  width: 96px; height: 96px;
  border-radius: 50%;
  background: hsl(var(--background) / 0.3);
  filter: blur(32px);
  pointer-events: none;
}
.login-v2__deco-2 {
  position: absolute;
  top: 40px; right: 40px;
  width: 128px; height: 128px;
  border-radius: 50%;
  background: hsl(var(--primary) / 0.15);
  filter: blur(40px);
  pointer-events: none;
}

.workspace-shell {
  min-height: 100vh;
  padding: 48px 56px;
  background: hsl(var(--background));
}
.workspace-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 24px;
  margin-bottom: 32px;
}
.workspace-header__eyebrow {
  margin: 0;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: hsl(var(--muted-foreground));
}
.workspace-header__title { margin: 10px 0 0; font-size: 40px; line-height: 1.1; }
.workspace-header__subtitle { margin: 10px 0 0; font-size: 15px; color: hsl(var(--muted-foreground)); max-width: 720px; }
.workspace-header__actions { display: flex; gap: 12px; flex-wrap: wrap; }
.workspace-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}
.workspace-option {
  width: 100%;
  border: 1px solid hsl(var(--border));
  background: hsl(var(--background));
  padding: 0;
  overflow: hidden;
  box-shadow: 0 10px 24px hsl(var(--foreground) / 0.05);
}
.workspace-option:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 32px hsl(var(--foreground) / 0.08);
  border-color: hsl(var(--primary) / 0.18);
}
.workspace-option--active { border-color: hsl(var(--primary) / 0.28); box-shadow: 0 0 0 3px hsl(var(--primary) / 0.08); }
.workspace-option__hero {
  height: 120px;
  display: grid;
  place-items: center;
  color: white;
  font-size: 42px;
  font-weight: 800;
  background: linear-gradient(135deg, #0f766e, #14b8a6);
}
.workspace-option__body { padding: 20px; text-align: left; }
.workspace-option__name { margin: 0; font-size: 18px; font-weight: 700; }
.workspace-option__subtitle { margin: 6px 0 0; font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: hsl(var(--muted-foreground)); }
.workspace-option__copy { margin: 14px 0 0; font-size: 13px; line-height: 1.6; color: hsl(var(--muted-foreground)); }
.workspace-option__stats { margin-top: 18px; display: flex; gap: 10px; flex-wrap: wrap; }
.workspace-option__stats span {
  display: inline-flex;
  padding: 6px 10px;
  border-radius: 999px;
  background: hsl(var(--muted));
  border: 1px solid hsl(var(--border));
  font-size: 12px;
  font-weight: 600;
  color: hsl(var(--muted-foreground));
}

/* ===== Fullscreen app frame ===== */
.fs-wrap {
  width: 100%;
  height: 100vh;
  position: relative;
  overflow: hidden;
  background: hsl(var(--background));
}
.fs-wrap .loading-overlay { opacity: 0; transition: opacity .18s ease; }
.fs-wrap.loading .loading-overlay { opacity: 1; }
.fs-frame {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
  background: hsl(var(--background));
  opacity: 0;
  transition: opacity .22s ease;
}
.fs-wrap.ready .fs-frame { opacity: 1; }

::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: hsl(var(--border)); border-radius: 999px; }

@media (max-width: 1180px) {
  .content-grid { grid-template-columns: 1fr; }
  .context-column { position: static; }
  .workspace-grid { grid-template-columns: 1fr; }
}

@media (max-width: 980px) {
  .login-v2 { flex-direction: column; }
  .login-v2__right { display: none; }
  .login-v2__left { width: 100%; padding: 32px 24px; }
  .workspace-shell { padding: 24px; }
  .workspace-header { flex-direction: column; align-items: flex-start; }
  .layout-shell { flex-direction: column; }
  .sidebar { width: 100%; height: auto; position: static; }
  .topbar { position: static; flex-direction: column; }
  .topbar-actions { width: 100%; flex-wrap: wrap; }
  .topbar-search { min-width: 0; width: 100%; }
  .content-shell { padding: 16px; }
  .topbar { padding: 16px; }
  .app-frame { height: 70vh; }
}

/* Toast Notifications */
@keyframes slideInRight { from { opacity: 0; transform: translateX(400px); } to { opacity: 1; transform: translateX(0); } }
#toast-container { animation: slideInRight 0.3s ease-out; }
#toast-container.success { border-l: 4px solid #10B981; background: #F0FAF4; }
#toast-container.success #toast-icon { color: #10B981; }
#toast-container.success #toast-title { color: #10B981; }
#toast-container.warning { border-l: 4px solid #F59E0B; background: #FFFBEB; }
#toast-container.warning #toast-icon { color: #F59E0B; }
#toast-container.warning #toast-title { color: #F59E0B; }
#toast-container.error { border-l: 4px solid #EF4444; background: #FEE2E2; }
#toast-container.error #toast-icon { color: #EF4444; }
#toast-container.error #toast-title { color: #EF4444; }
#toast-container.normal { border-l: 4px solid #1F2937; background: #F3F4F6; }
#toast-container.normal #toast-icon { color: #1F2937; }
#toast-container.normal #toast-title { color: #1F2937; }
