:root {
  --tn-canvas: #edf3f8;
  --tn-surface: #ffffff;
  --tn-surface-soft: #f6f9fc;
  --tn-ink: #152033;
  --tn-ink-soft: #52627a;
  --tn-muted: #7d8ba0;
  --tn-border: #dbe5ef;
  --tn-border-strong: #cbd9e7;
  --tn-blue: #1477e8;
  --tn-blue-dark: #0d5fbe;
  --tn-green: #0b9b71;
  --tn-violet: #7057df;
  --tn-amber: #dc850b;
  --tn-danger: #d83b5d;
  --tn-shadow-sm: 0 5px 16px rgba(38, 57, 84, .06);
  --tn-shadow-md: 0 16px 42px rgba(38, 57, 84, .1);
  --tn-shadow-lg: 0 30px 80px rgba(31, 46, 70, .16);
}

html { text-rendering: optimizeLegibility; }
body { -webkit-font-smoothing: antialiased; }
button, a, input, textarea, select { -webkit-tap-highlight-color: transparent; }
button:focus-visible, a:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible {
  outline: 3px solid rgba(20, 119, 232, .2);
  outline-offset: 2px;
}

/* Studio application shell */
body:not(.landing-page):has(.studio-sidebar) {
  background: var(--tn-canvas);
  color: var(--tn-ink);
}
.studio-sidebar {
  border-right: 1px solid #18273b;
  background: #081424;
  box-shadow: 14px 0 42px rgba(29, 47, 71, .09);
}
.sidebar-brand-row { min-height: 86px; }
.sidebar-logo {
  border: 1px solid #29405c;
  border-radius: 8px;
  background: #0d1d31;
  box-shadow: 0 10px 24px rgba(0, 0, 0, .18);
}
.sidebar-brand .brand-wordmark { font-size: 18px; }
.sidebar-brand small { margin-top: 5px; font-size: 11px; color: #8ea0b8; }
.sidebar-status-row { font-size: 11px; letter-spacing: .08em; }
.studio-navigation { gap: 6px; }
.studio-nav-item {
  min-height: 48px;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 0 14px;
  color: #aebbd0;
  font-size: 13px;
  transition: color .18s ease, border-color .18s ease, background-color .18s ease, transform .18s ease;
}
.studio-nav-item:hover {
  border-color: #233a57;
  background: #102239;
  color: #f5f8fc;
  transform: translateX(2px);
}
.studio-nav-item.active {
  border-color: #2f8cff;
  background: #1477e8;
  color: #fff;
  box-shadow: 0 12px 28px rgba(20, 119, 232, .25);
}
.studio-nav-create {
  border-color: #294664;
  background: #10243c;
  color: #dcecff;
}
.studio-nav-item .tn-icon { width: 18px; height: 18px; }
.upgrade-panel {
  border: 1px solid #334a68;
  border-radius: 8px;
  background: #11243a;
  box-shadow: none;
}
.upgrade-panel p { font-size: 11px; line-height: 1.55; }
.upgrade-panel a { border-radius: 7px; }
.sidebar-footer { font-size: 11px; }

.studio-main { background: var(--tn-canvas); }
.top {
  min-height: 74px;
  border: 1px solid var(--tn-border);
  border-radius: 8px;
  background: rgba(255, 255, 255, .94);
  box-shadow: var(--tn-shadow-sm);
  backdrop-filter: blur(18px);
}
.dashboard-command-title span, .project > span { font-size: 10px; letter-spacing: .08em; }
.dashboard-command-title b { font-size: 15px; }
.project input {
  height: 40px;
  border: 1px solid var(--tn-border);
  border-radius: 7px;
  background: var(--tn-surface-soft);
  color: var(--tn-ink);
  font-size: 13px;
}
.top .btn {
  min-height: 40px;
  border-radius: 7px;
  font-size: 12px;
}
.top .btn.primary {
  background: var(--tn-blue);
  box-shadow: 0 9px 20px rgba(20, 119, 232, .2);
}
.profile-trigger {
  min-height: 48px;
  border-radius: 8px;
  box-shadow: none;
}
.profile-trigger-copy b { font-size: 12px; }
.profile-trigger-copy small { font-size: 10px; }

.user-dashboard {
  width: min(100%, 1540px);
  padding: 34px 30px 52px;
}
.dashboard-hero { margin-bottom: 24px; }
.dashboard-kicker {
  color: var(--tn-blue-dark);
  font-size: 10px;
  letter-spacing: .14em;
}
.dashboard-hero h1 { font-size: clamp(30px, 3vw, 42px); line-height: 1.08; }
.dashboard-hero > div > p:last-child { margin-top: 9px; font-size: 14px; color: var(--tn-ink-soft); }
.dashboard-hero-actions .btn { min-height: 44px; border-radius: 8px; font-size: 13px; }
.dashboard-hero-actions .primary { background: var(--tn-blue); }

.dashboard-metrics { gap: 14px; }
.dashboard-metrics article {
  position: relative;
  min-height: 126px;
  align-items: flex-start;
  border: 1px solid var(--tn-border);
  border-radius: 8px;
  background: var(--tn-surface);
  box-shadow: var(--tn-shadow-sm);
  padding: 20px;
  overflow: hidden;
}
.dashboard-metrics article::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3px;
  background: var(--tn-blue);
}
.dashboard-metrics article:nth-child(2)::after { background: var(--tn-green); }
.dashboard-metrics article:nth-child(3)::after { background: var(--tn-violet); }
.dashboard-metrics article:nth-child(4)::after { background: var(--tn-amber); }
.dashboard-metric-icon {
  width: 42px;
  height: 42px;
  border-radius: 8px;
}
.dashboard-metrics article small { font-size: 10px; letter-spacing: .08em; }
.dashboard-metrics article b { margin-top: 6px; font-size: 24px; line-height: 1; }
.dashboard-metrics article em { margin-top: 8px; font-size: 11px; }

.dashboard-plan {
  min-height: 90px;
  border: 1px solid #bfd8f1;
  border-radius: 8px;
  background: #f4f9ff;
  box-shadow: none;
  padding: 18px 20px;
}
.plan-badge { border-radius: 6px; font-size: 10px; }
.plan-copy h2 { font-size: 16px; }
.plan-copy p { font-size: 11px; }
.plan-usage { gap: 18px; }
.plan-usage label { font-size: 10px; }
.plan-upgrade { min-height: 38px; border-radius: 7px; font-size: 11px; }

.dashboard-layout { gap: 16px; }
.dashboard-surface {
  border: 1px solid var(--tn-border);
  border-radius: 8px;
  background: var(--tn-surface);
  box-shadow: var(--tn-shadow-sm);
}
.dashboard-section-head { padding: 22px 22px 18px; }
.dashboard-section-head h2 { font-size: 20px; }
.dashboard-section-head p:not(.dashboard-kicker) { font-size: 12px; }
.dashboard-icon-action { width: 40px; height: 40px; border-radius: 7px; }
.dashboard-tabs { min-height: 52px; padding-inline: 22px; }
.dashboard-tabs button { min-height: 52px; font-size: 12px; }
.dashboard-tabs button span { font-size: 10px; }
.dashboard-template-grid { padding: 16px 22px 22px; gap: 14px; }
.project-card, .library-template-card {
  border-radius: 8px;
  box-shadow: none;
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.project-card:hover, .library-template-card:hover {
  border-color: #a9caeb;
  box-shadow: 0 14px 30px rgba(37, 65, 99, .1);
  transform: translateY(-2px);
}
.project-card h3, .library-template-card h3 { font-size: 15px; }
.project-card p, .library-template-card p { font-size: 11px; }
.project-card .btn, .library-template-card .btn { min-height: 38px; font-size: 11px; }
.dashboard-employee-list { padding: 0 22px 22px; gap: 9px; }
.dashboard-employee-list > * { min-height: 58px; border-radius: 8px; }
.dashboard-activity-list, .quick-start { font-size: 12px; }
.quick-start > button { min-height: 68px; border-radius: 8px; }
.quick-start > button b { font-size: 12px; }
.quick-start > button small { font-size: 10px; }

/* Signature editor */
.workspace { gap: 14px; padding: 14px 16px 16px; }
.workspace .panel {
  border: 1px solid var(--tn-border);
  border-radius: 8px;
  background: var(--tn-surface);
  box-shadow: var(--tn-shadow-sm);
}
.canvasbar { min-height: 58px; padding-inline: 14px; }
.editor-back, .canvas-icon-button { border-radius: 7px; }
.live b { font-size: 13px; }
.live span { display: block; margin: 3px 0 0; font-size: 10px; }
.modes { border-radius: 7px; background: #edf3f8; }
.mode { min-height: 32px; border-radius: 5px; font-size: 11px; }
.stage { padding: 28px; background-color: #eaf1f7; background-size: 28px 28px; }
.browser { border-radius: 8px; box-shadow: 0 22px 60px rgba(34, 51, 75, .16); }
.browserbar { height: 42px; }
.url { height: 26px; font-size: 10px; }
.status { height: 36px; font-size: 10px; }
.editor-inspector { min-width: 0; }
.editor-employees { padding: 14px; }
.editor-employees-head span { font-size: 9px; }
.editor-employees-head b { font-size: 12px; }
.editor-add-person { min-height: 36px; border-radius: 7px; font-size: 11px; }
.editor-employee-list .emp { min-height: 52px; border-radius: 7px; }
.empname { font-size: 12px; }
.emprole { font-size: 10px; }
.tabs { height: 54px; }
.tab { font-size: 11px; }
.rightbody { padding: 14px; }
.rightbody .card {
  border: 1px solid var(--tn-border);
  border-radius: 8px;
  background: var(--tn-surface-soft);
  padding: 14px;
  margin-bottom: 12px;
}
.ct { margin-bottom: 12px; color: #33445a; font-size: 10px; letter-spacing: .1em; }
.field label { margin-bottom: 6px; color: #55657a; font-size: 10px; }
.field input, .field textarea, .field select {
  min-height: 40px;
  border-color: var(--tn-border);
  border-radius: 7px;
  background: #fff;
  color: var(--tn-ink);
  font-size: 12px;
}
.text-card, .image-card, .backend-editor {
  border-color: var(--tn-border);
  border-radius: 7px;
  background: #fff;
}
.text-card label b, .image-title { color: var(--tn-ink); font-size: 11px; }
.text-card textarea { font-size: 12px; }
.note, .warning, .switchrow span, .backend-editor summary { font-size: 10px; }
.chip, .pill { font-size: 9px; }
.code { min-height: 240px; font-size: 11px; }
.empty-card { max-width: 560px; }
.empty-card h4 { font-size: 22px; }
.empty-card p { max-width: 470px; font-size: 13px; }
.modalcard { border-radius: 8px; }
.modalhead h3 { font-size: 16px; }
.modalbody { font-size: 13px; }

/* Admin console */
.admin-page {
  background: var(--tn-canvas);
  color: var(--tn-ink);
  font-size: 14px;
}
.admin-app { background: var(--tn-canvas); }
.admin-rail {
  border-right: 1px solid var(--tn-border);
  background: #fff;
  box-shadow: 10px 0 36px rgba(40, 58, 84, .05);
}
.admin-brand { min-height: 80px; }
.brand-copy b { font-size: 18px; }
.brand-copy small { font-size: 10px; }
.admin-navigation > p { font-size: 10px; letter-spacing: .12em; }
.admin-nav-item {
  min-height: 46px;
  border-radius: 8px;
  font-size: 13px;
}
.admin-nav-item.active {
  background: var(--tn-blue);
  box-shadow: 0 10px 24px rgba(20, 119, 232, .2);
}
.nav-icon { border-radius: 7px; }
.admin-commandbar {
  min-height: 76px;
  border-bottom-color: var(--tn-border);
  background: rgba(255, 255, 255, .94);
  backdrop-filter: blur(16px);
}
.view-identity small { font-size: 10px; }
.view-identity b { font-size: 15px; }
.command-search { height: 44px; border-radius: 8px; }
.command-search input { font-size: 13px; }
.admin-profile { min-height: 48px; border-radius: 8px; }
.admin-content { width: min(100%, 1540px); padding: 38px 36px 56px; }
.view-heading { margin-bottom: 28px; }
.view-heading h1 { font-size: clamp(30px, 3vw, 42px); }
.view-heading p { font-size: 13px; }
.action-btn { min-height: 42px; border-radius: 7px; font-size: 12px; }
.metric-grid { gap: 14px; }
.metric-card {
  min-height: 150px;
  border-radius: 8px;
  box-shadow: var(--tn-shadow-sm);
  padding: 20px;
}
.metric-card .metric-icon { width: 42px; height: 42px; border-radius: 8px; }
.metric-card strong { font-size: 30px; }
.metric-card b { font-size: 12px; }
.metric-card p { font-size: 11px; }
.admin-surface {
  border-radius: 8px;
  box-shadow: var(--tn-shadow-sm);
  padding: 22px;
}
.surface-head h2 { font-size: 20px; }
.surface-head p { font-size: 12px; }
.admin-table { font-size: 12px; }
.admin-table th { height: 46px; font-size: 10px; letter-spacing: .07em; }
.admin-table td { min-height: 62px; padding-block: 13px; }
.filter-bar { border-radius: 8px; padding: 10px; }
.filter-search, .filter-bar select { min-height: 42px; border-radius: 7px; font-size: 12px; }
.package-card, .admin-template-card { border-radius: 8px; box-shadow: var(--tn-shadow-sm); }
.package-card h3, .admin-template-copy h3 { font-size: 17px; }
.package-card p, .admin-template-copy p { font-size: 12px; }
.admin-template-media { min-height: 190px; }
.admin-drawer { box-shadow: -28px 0 70px rgba(31, 47, 70, .18); }
.drawer-head h2 { font-size: 26px; }
.drawer-form label { font-size: 12px; }
.drawer-form input:not([type=checkbox]), .drawer-form select { min-height: 46px; font-size: 13px; }

/* Authentication, guide and landing consistency */
body:has(.auth-shell) { background: var(--tn-canvas); color: var(--tn-ink); }
.auth-card, .auth-panel { border-radius: 8px !important; box-shadow: var(--tn-shadow-lg) !important; }
.auth-card h1, .auth-panel h1 { font-size: 30px !important; }
.auth-card input, .auth-panel input { min-height: 46px; border-radius: 7px !important; font-size: 13px !important; }
.auth-card button, .auth-panel button { min-height: 44px; border-radius: 7px !important; }

.nav-wrap .nav { border-radius: 8px; box-shadow: var(--tn-shadow-md); }
.nav-wrap .btn { border-radius: 7px; }
#guides .toolbar { border-radius: 8px; }
#guides .card { border-radius: 8px; box-shadow: var(--tn-shadow-sm); }
#guides .brand-icon, #guides .video-link, #guides .tip { border-radius: 8px; }

.landing-page .nav { border-radius: 8px; }
.landing-page .btn { border-radius: 8px; }
.landing-page .feature-grid article,
.landing-page .pricing-card,
.landing-page .showcase-card,
.landing-page .faq-item { border-radius: 8px; }

@media (max-width: 1180px) {
  .user-dashboard, .admin-content { padding-inline: 22px; }
  .dashboard-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .workspace { grid-template-columns: minmax(0, 1fr) 360px; }
}

@media (max-width: 1520px) and (min-width: 761px) {
  body:not(.dashboard-mode) .top .compact-command {
    width: 40px;
    flex: 0 0 40px;
    padding: 0;
    overflow: hidden;
    font-size: 0;
  }
  body:not(.dashboard-mode) .top .compact-command .tn-icon { width: 17px; height: 17px; }
  body:not(.dashboard-mode) .top .project input { width: 220px; }
}

@media (max-width: 760px) {
  .top { min-height: 66px; margin: 10px; }
  .user-dashboard { padding: 24px 12px 36px; }
  .dashboard-hero { align-items: stretch; }
  .dashboard-hero h1 { font-size: 30px; }
  .dashboard-hero-actions { display: grid; grid-template-columns: 1fr 1fr; }
  .dashboard-metrics { grid-template-columns: 1fr 1fr; gap: 10px; }
  .dashboard-metrics article { min-height: 142px; padding: 16px; }
  .dashboard-metrics article b { font-size: 21px; }
  .dashboard-plan { padding: 16px; }
  .dashboard-section-head { padding: 18px 16px 14px; }
  .dashboard-tabs { padding-inline: 16px; overflow-x: auto; }
  .dashboard-template-grid { padding: 14px 16px 18px; }
  .dashboard-employee-list { padding: 0 16px 18px; }
  .workspace { display: block; padding: 10px; }
  .workspace .panel { margin-bottom: 10px; }
  .stage { padding: 12px; }
  .admin-content { padding: 26px 14px 40px; }
  .admin-commandbar { min-height: 70px; }
  .admin-app.mobile-rail-open.sidebar-compact .admin-rail { width: 280px; }
  .admin-app.mobile-rail-open.sidebar-compact .rail-top { display: flex; justify-content: space-between; }
  .admin-app.mobile-rail-open.sidebar-compact .admin-brand { justify-content: flex-start; }
  .admin-app.mobile-rail-open.sidebar-compact .brand-copy,
  .admin-app.mobile-rail-open.sidebar-compact .admin-navigation > p,
  .admin-app.mobile-rail-open.sidebar-compact .nav-label,
  .admin-app.mobile-rail-open.sidebar-compact .nav-count,
  .admin-app.mobile-rail-open.sidebar-compact .nav-arrow,
  .admin-app.mobile-rail-open.sidebar-compact .rail-status div { display: initial; }
  .admin-app.mobile-rail-open.sidebar-compact .admin-nav-item {
    justify-content: flex-start;
    padding: 0 12px;
  }
  .admin-app.mobile-rail-open.sidebar-compact .nav-count,
  .admin-app.mobile-rail-open.sidebar-compact .nav-arrow { margin-left: auto; }
  .admin-app.mobile-rail-open.sidebar-compact .rail-status { justify-content: flex-start; }
}

@media (max-width: 430px) {
  .dashboard-hero-actions { grid-template-columns: 1fr; }
  .dashboard-metrics { grid-template-columns: 1fr; }
  .dashboard-metrics article { min-height: 112px; }
  .dashboard-template-grid { grid-template-columns: 1fr; }
  .profile-trigger { min-width: 46px; }
  .user-dashboard { padding-inline: 10px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}

/* 2026 B2B SaaS motion and interaction system */
@keyframes tn-reveal {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes tn-dialog-in {
  from { opacity: 0; transform: translateY(12px) scale(.985); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes tn-menu-in {
  from { opacity: 0; transform: translateY(-7px) scale(.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes tn-progress-in {
  from { transform: scaleX(0); }
  to { transform: scaleX(1); }
}
@keyframes tn-status-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(11, 155, 113, .22); }
  50% { box-shadow: 0 0 0 6px rgba(11, 155, 113, 0); }
}
@keyframes tn-shimmer {
  to { background-position-x: -200%; }
}

.premium-motion .premium-reveal {
  opacity: 0;
  transform: translateY(14px);
}
.premium-motion .premium-reveal.is-visible {
  animation: tn-reveal .48s cubic-bezier(.2, .75, .25, 1) both;
  animation-delay: calc(var(--reveal-order, 0) * 45ms);
}
.sync-badge::before,
.sidebar-server > i,
.rail-status > i,
.signature-preview-head > span i { animation: tn-status-pulse 2.4s ease-in-out infinite; }
.dashboard-usage-row i > em,
.plan-row i > em { transform-origin: left; animation: tn-progress-in .7s cubic-bezier(.2, .8, .2, 1) both; }

.btn,
.action-btn,
.text-action,
.dashboard-icon-action,
.canvas-icon-button,
.square-action,
.mini,
.profile-trigger,
.admin-profile,
.editor-back,
.editor-add-person {
  transition: transform .18s ease, border-color .18s ease, background-color .18s ease, color .18s ease, box-shadow .18s ease;
}
.btn .tn-icon,
.action-btn .tn-icon,
.text-action .tn-icon,
.dashboard-icon-action .tn-icon,
.canvas-icon-button .tn-icon,
.square-action .tn-icon,
.studio-nav-item .tn-icon,
.admin-nav-item .tn-icon,
.quick-start .tn-icon {
  transition: transform .2s cubic-bezier(.2, .8, .2, 1);
}

.studio-sidebar,
.admin-rail { transition: width .24s cubic-bezier(.2, .75, .25, 1), transform .24s cubic-bezier(.2, .75, .25, 1); }
.studio-nav-item::before,
.admin-nav-item::before {
  content: "";
  position: absolute;
  inset: 8px auto 8px 0;
  width: 2px;
  border-radius: 2px;
  background: currentColor;
  opacity: 0;
  transform: scaleY(.3);
  transition: opacity .18s ease, transform .18s ease;
}
.studio-nav-item,
.admin-nav-item { position: relative; }
.studio-nav-item.active::before,
.admin-nav-item.active::before { opacity: .9; transform: scaleY(1); }

.dashboard-metrics article,
.user-template-card,
.library-template-card,
.dashboard-employee-list > button,
.quick-start > button,
.account-page-grid > article,
.metric-card,
.package-card,
.admin-template-card,
.activity-event,
#guides .card,
.pricing-card,
.sample-card,
.faq-item {
  transition: translate .24s cubic-bezier(.2, .75, .25, 1), transform .24s cubic-bezier(.2, .75, .25, 1), border-color .2s ease, box-shadow .24s ease, background-color .2s ease;
}
.dashboard-metrics article::before,
.metric-card::before,
.package-card::before,
.admin-template-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  border: 1px solid transparent;
  pointer-events: none;
  transition: border-color .2s ease, box-shadow .2s ease;
}
.dashboard-metrics article,
.metric-card,
.package-card,
.admin-template-card { position: relative; }

.template-preview,
.library-preview,
.admin-template-media { overflow: hidden; }
.template-preview > span,
.library-preview > img,
.admin-template-media > img {
  transition: transform .38s cubic-bezier(.2, .75, .25, 1), filter .3s ease;
}
.library-preview-action {
  transform: translateY(8px);
  opacity: 0;
  transition: opacity .2s ease, transform .2s ease, box-shadow .2s ease;
}
.library-access,
.template-tier { transition: transform .2s ease, box-shadow .2s ease; }
.template-card-actions,
.admin-template-meta,
.package-actions { transition: border-color .2s ease, background-color .2s ease; }
.template-card-actions button,
.library-template-card > button,
.admin-template-meta .action-btn { transition: transform .18s ease, color .18s ease, border-color .18s ease, background-color .18s ease, box-shadow .18s ease; }

.admin-table tbody tr { transition: transform .16s ease, background-color .16s ease, box-shadow .16s ease; }
.activity-event .event-icon,
.dashboard-activity-list > div > span,
.dashboard-employee-list > button > span:first-child,
.metric-icon { transition: transform .22s cubic-bezier(.2, .8, .2, 1), background-color .2s ease; }

.field input,
.field textarea,
.field select,
.drawer-form input,
.drawer-form textarea,
.drawer-form select,
.template-publisher-panel input,
.template-publisher-panel textarea,
.template-publisher-panel select,
.filter-search,
.command-search {
  transition: border-color .18s ease, background-color .18s ease, box-shadow .18s ease, transform .18s ease;
}
.field:focus-within label,
.drawer-form label:focus-within,
.template-publisher-panel label:focus-within { color: var(--tn-blue-dark); }
.thumbnail-dropzone .thumbnail-empty,
.drop > * { transition: transform .22s ease, opacity .22s ease; }
.thumbnail-dropzone:hover .thumbnail-empty,
.drop:hover > * { transform: translateY(-3px); }

.modal.show .modalcard { animation: tn-dialog-in .26s cubic-bezier(.2, .8, .2, 1) both; }
.admin-drawer-layer.show .admin-drawer { animation-duration: .3s; animation-timing-function: cubic-bezier(.2, .8, .2, 1); }
.profile-menu.show,
.profile-menu[aria-hidden="false"] { transform-origin: top right; animation: tn-menu-in .2s ease both; }
.toast.show { animation: tn-menu-in .2s ease both; }

.is-loading,
.skeleton {
  color: transparent !important;
  background: linear-gradient(100deg, #edf2f7 20%, #f8fafc 38%, #edf2f7 56%);
  background-size: 200% 100%;
  animation: tn-shimmer 1.2s linear infinite;
}

@media (hover: hover) and (pointer: fine) {
  .btn:hover,
  .action-btn:hover,
  .text-action:hover,
  .dashboard-icon-action:hover,
  .canvas-icon-button:hover,
  .square-action:hover,
  .editor-back:hover,
  .editor-add-person:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 24px rgba(37, 58, 87, .12);
  }
  .btn:hover .tn-icon,
  .action-btn:hover .tn-icon,
  .text-action:hover .tn-icon,
  .dashboard-icon-action:hover .tn-icon,
  .canvas-icon-button:hover .tn-icon,
  .square-action:hover .tn-icon { transform: translateY(-1px) scale(1.08); }
  .studio-nav-item:hover .tn-icon,
  .admin-nav-item:hover .tn-icon { transform: translateX(2px) scale(1.06); }
  .profile-trigger:hover,
  .admin-profile:hover { transform: translateY(-1px); border-color: #a9c9e8; box-shadow: 0 10px 24px rgba(37, 58, 87, .09); }

  .dashboard-metrics article:hover,
  .metric-card:hover {
    translate: 0 -4px;
    border-color: #bdd4e9;
    box-shadow: 0 18px 34px rgba(37, 58, 87, .11);
  }
  .dashboard-metrics article:hover::before,
  .metric-card:hover::before { border-color: rgba(20, 119, 232, .22); box-shadow: inset 0 0 0 1px rgba(20, 119, 232, .05); }
  .dashboard-metrics article:hover .dashboard-metric-icon,
  .metric-card:hover .metric-icon { transform: translateY(-2px) rotate(-3deg) scale(1.06); }

  .user-template-card:hover,
  .library-template-card:hover,
  .package-card:hover,
  .admin-template-card:hover,
  #guides .card:hover,
  .pricing-card:hover,
  .sample-card:hover {
    translate: 0 -5px;
    border-color: #a9c9e8;
    box-shadow: 0 20px 42px rgba(37, 58, 87, .13);
  }
  .package-card:hover::before,
  .admin-template-card:hover::before { border-color: rgba(20, 119, 232, .22); }
  .user-template-card:hover .template-preview > span { transform: scale(1.1) rotate(-4deg); }
  .library-template-card:hover .library-preview > img,
  .admin-template-card:hover .admin-template-media > img { transform: scale(1.035); filter: saturate(1.05) contrast(1.02); }
  .library-template-card:hover .library-preview-action { opacity: 1; transform: translateY(0); box-shadow: 0 10px 24px rgba(17, 31, 51, .22); }
  .library-template-card:hover .library-access,
  .admin-template-card:hover .template-tier { transform: translateY(-2px); box-shadow: 0 7px 16px rgba(38, 57, 84, .12); }
  .library-template-card > button:hover,
  .template-card-actions button:hover,
  .admin-template-meta .action-btn:hover { transform: translateY(-1px); }

  .dashboard-employee-list > button:hover,
  .quick-start > button:hover,
  .activity-event:hover {
    translate: 3px 0;
    border-color: #b7d1e9;
    background: #f5f9fd;
    box-shadow: 0 10px 22px rgba(37, 58, 87, .08);
  }
  .dashboard-employee-list > button:hover > span:first-child,
  .activity-event:hover .event-icon,
  .dashboard-activity-list > div:hover > span { transform: scale(1.08) rotate(-3deg); }
  .quick-start > button:hover i { transform: translateX(3px); }
  .admin-table tbody tr:hover { transform: translateY(-1px); background: #f4f9fe; box-shadow: 0 5px 14px rgba(37, 58, 87, .05); }
  .faq-item:hover { border-color: #afcbe6; box-shadow: 0 12px 26px rgba(37, 58, 87, .08); }
}

.theme-dark .rightbody .card,
.theme-dark .text-card,
.theme-dark .image-card,
.theme-dark .backend-editor { border-color: #293b53; background: #111e2f; }
.theme-dark .ct,
.theme-dark .text-card label b,
.theme-dark .image-title { color: #e4edf8; }
.theme-dark .field label { color: #9aa9bd; }
.theme-dark .field input,
.theme-dark .field textarea,
.theme-dark .field select { border-color: #2c3e56; background: #0c1726; color: #eef5fd; }
.theme-dark .dashboard-employee-list > button:hover,
.theme-dark .quick-start > button:hover { border-color: #395674; background: #17283c; }

@media (prefers-reduced-motion: reduce) {
  .premium-motion .premium-reveal { opacity: 1; transform: none; }
  .premium-motion .premium-reveal.is-visible { animation: none; }
  .sync-badge::before,
  .sidebar-server > i,
  .rail-status > i,
  .signature-preview-head > span i,
  .dashboard-usage-row i > em,
  .plan-row i > em { animation: none; }
}
