    :root {
      --modal-surface: #111214;
      --modal-surface-strong: #141418;
      --bg: var(--modal-surface);
      --panel: var(--modal-surface);
      --panel-2: var(--modal-surface);
      --panel-3: var(--modal-surface-strong);
      --border: rgba(255, 255, 255, 0.08);
      --border-soft: rgba(255, 255, 255, 0.05);
      --text: #f5f7fb;
      --text-soft: #b0b7c4;
      --text-dim: #7f8796;
      --accent: #ffffff;
      --state-active-bg: #ffffff;
      --state-active-text: #111214;
      --chip: #0d1118;
      --success: rgba(255, 255, 255, 0.92);
      --warning: rgba(255, 255, 255, 0.72);
      --danger: rgba(255, 255, 255, 0.82);
      --shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
      --shadow-soft: 0 18px 38px rgba(0, 0, 0, 0.24);
      --ease-standard: cubic-bezier(0.16, 1, 0.3, 1);
      --radius-xl: 22px;
      --radius-lg: 18px;
      --radius-md: 14px;
      --radius-sm: 10px;
      --sidebar-width: 270px;
      --topbar-height: 72px;
    }

    * {
      box-sizing: border-box;
    }

    html, body {
      margin: 0;
      padding: 0;
      background: var(--bg);
      color: var(--text);
      font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
      min-height: 100%;
    }

    a {
      color: inherit;
      text-decoration: none;
      transition: color 180ms var(--ease-standard), opacity 180ms var(--ease-standard), transform 180ms var(--ease-standard);
    }

    button,
    select {
      font: inherit;
      color: inherit;
      background: none;
      border: none;
      outline: none;
    }

    button,
    input,
    textarea,
    .btn,
    .action-link,
    .tab,
    .range-btn,
    .nav-item,
    .icon-btn,
    .pill,
    .mini-select {
      transition:
        transform 180ms var(--ease-standard),
        background-color 180ms var(--ease-standard),
        border-color 180ms var(--ease-standard),
        box-shadow 220ms var(--ease-standard),
        color 180ms var(--ease-standard),
        opacity 180ms var(--ease-standard);
    }

    .topbar,
    .stat-card,
    .chart-card,
    .table-card,
    .audit-shell-card,
    .documents-manager-card,
    .bulk-toolbar {
      opacity: 0;
      transform: translateY(18px) scale(0.985);
    }

    body.app-ready .topbar,
    body.app-ready .stat-card,
    body.app-ready .chart-card,
    body.app-ready .table-card,
    body.app-ready .audit-shell-card,
    body.app-ready .documents-manager-card,
    body.app-ready .bulk-toolbar {
      transition:
        opacity 520ms var(--ease-standard),
        transform 520ms var(--ease-standard);
    }

    body.app-ready .is-visible {
      opacity: 1;
      transform: translateY(0) scale(1);
    }

    select,
    option,
    optgroup {
      color-scheme: dark;
    }

    .app-shell {
      min-height: 100vh;
      display: grid;
      grid-template-columns: var(--sidebar-width) 1fr;
      background: var(--modal-surface);
    }

    /* Sidebar */
    .sidebar {
      border-right: 1px solid var(--border-soft);
      padding: 18px 16px 20px;
      display: flex;
      flex-direction: column;
      gap: 18px;
      background: var(--modal-surface);
    }

    .brand {
      display: flex;
      align-items: center;
      gap: 12px;
      padding: 4px 4px 10px;
      font-weight: 700;
      letter-spacing: -0.02em;
    }

    .brand-mark {
      width: 18px;
      height: 18px;
      border-radius: 50%;
      border: 2px solid rgba(255,255,255,0.9);
      position: relative;
      flex-shrink: 0;
    }

    .brand-mark::after {
      content: "";
      position: absolute;
      inset: 4px;
      border-radius: 50%;
      background: rgba(255,255,255,0.08);
    }

    .nav {
      display: flex;
      flex-direction: column;
      gap: 8px;
    }

    .nav-item {
      height: 48px;
      display: flex;
      align-items: center;
      gap: 12px;
      padding: 0 14px;
      border-radius: 12px;
      color: var(--text);
      font-weight: 500;
    }

    .nav-item:hover {
      background: var(--modal-surface-strong);
      transform: translateX(4px);
    }

    .nav-item.active {
      background: var(--state-active-bg);
      color: var(--state-active-text);
      box-shadow: 0 12px 24px rgba(255, 255, 255, 0.12);
    }

    .nav-item svg {
      width: 17px;
      height: 17px;
      opacity: 0.95;
      flex-shrink: 0;
    }

    .svg-icon {
      width: 17px;
      height: 17px;
      display: inline-block;
      flex-shrink: 0;
      background-color: currentColor;
      mask-repeat: no-repeat;
      mask-position: center;
      mask-size: contain;
      -webkit-mask-repeat: no-repeat;
      -webkit-mask-position: center;
      -webkit-mask-size: contain;
    }

    .icon-add-circle {
      mask-image: url("../img/icons/add-circle.svg");
      -webkit-mask-image: url("../img/icons/add-circle.svg");
    }

    .icon-dashboard-grid {
      mask-image: url("../img/icons/dashboard-grid.svg");
      -webkit-mask-image: url("../img/icons/dashboard-grid.svg");
    }

    .icon-chart-bars {
      mask-image: url("../img/icons/chart-bars.svg");
      -webkit-mask-image: url("../img/icons/chart-bars.svg");
    }

    .icon-folder {
      mask-image: url("../img/icons/folder.svg");
      -webkit-mask-image: url("../img/icons/folder.svg");
    }

    .icon-more-vertical {
      mask-image: url("../img/icons/more-vertical.svg");
      -webkit-mask-image: url("../img/icons/more-vertical.svg");
    }

    .icon-panel-split {
      mask-image: url("../img/icons/panel-split.svg");
      -webkit-mask-image: url("../img/icons/panel-split.svg");
    }

    .icon-arrow-up-right {
      mask-image: url("../img/icons/arrow-up-right.svg");
      -webkit-mask-image: url("../img/icons/arrow-up-right.svg");
    }

    .icon-plus {
      mask-image: url("../img/icons/plus.svg");
      -webkit-mask-image: url("../img/icons/plus.svg");
    }

    .icon-chevron-down {
      mask-image: url("../img/icons/chevron-down.svg");
      -webkit-mask-image: url("../img/icons/chevron-down.svg");
    }

    .sidebar-spacer {
      flex: 1;
    }

    .profile-card {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 12px;
      padding: 12px 10px;
      border-radius: 14px;
      background: transparent;
    }

    .profile-card:hover {
      background: var(--modal-surface-strong);
      transform: translateY(-1px);
    }

    .profile-left {
      display: flex;
      align-items: center;
      gap: 12px;
      min-width: 0;
    }

    .avatar {
      width: 38px;
      height: 38px;
      border-radius: 12px;
      display: grid;
      place-items: center;
      background: rgba(255,255,255,0.08);
      color: var(--text-soft);
      font-size: 13px;
      flex-shrink: 0;
    }

    .profile-meta {
      min-width: 0;
    }

    .profile-name {
      font-size: 15px;
      font-weight: 600;
      color: var(--text);
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }

    .profile-email {
      font-size: 13px;
      color: var(--text-dim);
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }

    /* Main */
    .main {
      padding: 0 18px 18px;
    }

    .topbar {
      height: var(--topbar-height);
      display: flex;
      align-items: center;
      justify-content: space-between;
      border-bottom: 1px solid var(--border-soft);
      margin-bottom: 20px;
      padding: 0 8px 0 4px;
    }

    .topbar-left {
      display: flex;
      align-items: center;
      gap: 14px;
      min-width: 0;
    }

    .divider {
      width: 1px;
      height: 22px;
      background: var(--border);
    }

    .page-title {
      font-size: 28px;
      font-weight: 600;
      letter-spacing: -0.03em;
    }

    .topbar-right {
      display: flex;
      align-items: center;
      gap: 14px;
    }

    .icon-btn {
      width: 34px;
      height: 34px;
      border-radius: 12px;
      display: grid;
      place-items: center;
      color: var(--text-soft);
    }

    .icon-btn:hover {
      background: var(--modal-surface-strong);
      color: var(--text);
      transform: translateY(-1px);
    }

    .pill-badge {
      padding: 8px 14px;
      border-radius: 999px;
      border: 1px solid var(--border);
      background: var(--modal-surface-strong);
      font-size: 13px;
      color: var(--text);
    }

    .dashboard-grid {
      display: grid;
      gap: 20px;
    }

    .stats-row {
      display: grid;
      grid-template-columns: repeat(4, minmax(0, 1fr));
      gap: 14px;
    }

    .card {
      background: var(--modal-surface);
      border: 1px solid var(--border);
      border-radius: var(--radius-xl);
      box-shadow: var(--shadow);
    }

    .card:hover {
      border-color: rgba(255,255,255,0.12);
      box-shadow: var(--shadow-soft);
    }

    .stat-card {
      padding: 22px 22px 20px;
      min-height: 170px;
      position: relative;
      overflow: hidden;
    }

    .stat-card::before {
      content: "";
      position: absolute;
      inset: -30% auto auto -10%;
      width: 160px;
      height: 160px;
      border-radius: 999px;
      background: radial-gradient(circle, rgba(255,255,255,0.06), transparent 68%);
      opacity: 0;
      transform: translateY(8px);
      transition: opacity 280ms var(--ease-standard), transform 280ms var(--ease-standard);
      pointer-events: none;
    }

    .stat-card:hover {
      transform: translateY(-4px);
    }

    .stat-card:hover::before {
      opacity: 1;
      transform: translateY(0);
    }

    .stat-head {
      display: flex;
      align-items: flex-start;
      justify-content: space-between;
      gap: 12px;
      margin-bottom: 12px;
    }

    .stat-label {
      font-size: 15px;
      color: var(--text-soft);
      margin-bottom: 10px;
    }

    .stat-value {
      font-size: 30px;
      line-height: 1;
      font-weight: 700;
      letter-spacing: -0.03em;
      margin-bottom: 22px;
    }

    .stat-trend {
      display: inline-flex;
      align-items: center;
      gap: 6px;
      padding: 5px 9px;
      border-radius: 999px;
      border: 1px solid var(--border);
      background: var(--modal-surface-strong);
      font-size: 13px;
      color: var(--text);
      white-space: nowrap;
    }

    .stat-card:hover .stat-trend {
      background: var(--modal-surface-strong);
      transform: translateY(-1px);
    }

    .stat-meta-title {
      display: flex;
      align-items: center;
      gap: 6px;
      font-size: 15px;
      font-weight: 600;
      margin-bottom: 6px;
    }

    .stat-meta-sub {
      font-size: 14px;
      color: var(--text-dim);
      line-height: 1.4;
    }

    /* Chart panel */
    .chart-card {
      padding: 18px 20px 16px;
      min-height: 420px;
      display: flex;
      flex-direction: column;
    }

    .chart-card:hover {
      transform: translateY(-3px);
    }

    .chart-top {
      display: flex;
      align-items: flex-start;
      justify-content: space-between;
      gap: 14px;
      margin-bottom: 18px;
    }

    .chart-title {
      font-size: 30px;
      font-weight: 700;
      letter-spacing: -0.04em;
      margin-bottom: 4px;
    }

    .chart-subtitle {
      color: var(--text-soft);
      font-size: 15px;
    }

    .range-group {
      display: inline-flex;
      align-items: center;
      gap: 8px;
      padding: 4px;
      border: 1px solid var(--border);
      border-radius: 14px;
      background: var(--modal-surface);
    }

    .range-btn {
      min-width: 104px;
      height: 42px;
      border-radius: 10px;
      padding: 0 14px;
      color: var(--text);
      cursor: pointer;
    }

    .range-btn.active {
      background: var(--state-active-bg);
      color: var(--state-active-text);
      border: 1px solid rgba(255,255,255,0.08);
      box-shadow: inset 0 1px 0 rgba(255,255,255,0.06), 0 8px 18px rgba(255,255,255,0.12);
    }

    .range-btn:hover {
      background: var(--modal-surface-strong);
      color: #fff;
      transform: translateY(-1px);
    }

    .chart-wrap {
      flex: 1;
      min-height: 300px;
      border-radius: 8px;
      overflow: hidden;
      position: relative;
      background: #151619;
      box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
    }

    .chart-svg {
      width: 100%;
      height: 100%;
      min-height: 300px;
      display: block;
    }

    .chart-grid-line {
      stroke: rgba(255, 255, 255, 0.045);
      stroke-width: 1;
    }

    .chart-reveal {
      transform-box: fill-box;
      transform-origin: left center;
      animation: chartRevealX 900ms var(--ease-standard) both;
    }

    .chart-area {
      fill: url("#dashboard-chart-area-gradient");
      opacity: 0;
      animation: chartAreaFade 700ms 90ms var(--ease-standard) both;
    }

    .chart-line {
      fill: none;
      stroke: rgba(255, 255, 255, 0.74);
      stroke-width: 1.9;
      stroke-linecap: round;
      stroke-linejoin: round;
      stroke-dasharray: 1;
      stroke-dashoffset: 1;
      animation: chartLineDraw 980ms 80ms var(--ease-standard) both;
    }

    .chart-line-secondary {
      fill: none;
      stroke: rgba(255, 255, 255, 0.38);
      stroke-width: 1.25;
      stroke-linecap: round;
      stroke-linejoin: round;
      stroke-dasharray: 1;
      stroke-dashoffset: 1;
      animation: chartLineDraw 980ms 160ms var(--ease-standard) both;
    }

    .chart-axis-label {
      fill: var(--text-dim);
      font-size: 12px;
    }

    .chart-empty-label {
      fill: var(--text-soft);
      font-size: 15px;
      font-weight: 600;
      text-anchor: middle;
    }

    @keyframes chartRevealX {
      from {
        transform: scaleX(0);
      }
      to {
        transform: scaleX(1);
      }
    }

    @keyframes chartLineDraw {
      to {
        stroke-dashoffset: 0;
      }
    }

    @keyframes chartAreaFade {
      from {
        opacity: 0;
        transform: translateY(8px);
      }
      to {
        opacity: 1;
        transform: translateY(0);
      }
    }

    /* Tabs + actions */
    .content-top {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 16px;
      flex-wrap: wrap;
    }

    .tabs {
      display: flex;
      align-items: center;
      gap: 4px;
      padding: 4px;
      background: var(--modal-surface);
      border: 1px solid var(--border);
      border-radius: 14px;
      width: fit-content;
    }

    .tab {
      padding: 10px 12px;
      border-radius: 10px;
      color: var(--text-soft);
      font-size: 14px;
      cursor: pointer;
      display: inline-flex;
      align-items: center;
      gap: 8px;
    }

    .tab.active {
      color: var(--state-active-text);
      background: var(--state-active-bg);
      border: 1px solid rgba(255,255,255,0.06);
      box-shadow: inset 0 1px 0 rgba(255,255,255,0.06), 0 10px 18px rgba(255,255,255,0.12);
    }

    .tab:hover {
      color: var(--text);
      background: var(--modal-surface-strong);
      transform: translateY(-1px);
    }

    .tab-count {
      min-width: 18px;
      height: 18px;
      border-radius: 999px;
      background: var(--modal-surface-strong);
      display: inline-grid;
      place-items: center;
      font-size: 11px;
      color: var(--text);
      padding: 0 5px;
    }

    .tab.active .tab-count,
    .range-btn.active .tab-count {
      background: rgba(17, 18, 20, 0.08);
      color: var(--state-active-text);
    }

    .actions {
      display: flex;
      align-items: center;
      gap: 10px;
      flex-wrap: wrap;
    }

    .btn {
      height: 42px;
      padding: 0 16px;
      border-radius: 12px;
      border: 1px solid var(--border);
      background: var(--modal-surface);
      color: var(--text);
      display: inline-flex;
      align-items: center;
      gap: 10px;
      cursor: pointer;
    }

    .btn-primary,
    .bulk-toolbar .btn:enabled {
      background: var(--state-active-bg);
      color: var(--state-active-text);
      border-color: transparent;
    }

    .btn:hover,
    .action-link:hover {
      background: var(--modal-surface-strong);
      border-color: rgba(255,255,255,0.14);
      transform: translateY(-1px);
      box-shadow: 0 12px 20px rgba(0,0,0,0.18);
    }

    .btn-primary:hover,
    .bulk-toolbar .btn:enabled:hover {
      background: #f1f1f1;
      color: var(--state-active-text);
      border-color: transparent;
      box-shadow: 0 12px 20px rgba(255,255,255,0.12);
    }

    .btn:active,
    .action-link:active,
    .tab:active,
    .range-btn:active,
    .nav-item:active,
    .icon-btn:active {
      transform: translateY(0);
    }

    .btn svg {
      width: 16px;
      height: 16px;
    }

    .table-card {
      overflow: hidden;
      background: var(--modal-surface);
      border: 1px solid var(--border);
      border-radius: var(--radius-xl);
    }

    .table-card:hover {
      border-color: rgba(255,255,255,0.11);
      box-shadow: var(--shadow-soft);
    }

    .skeleton-row td {
      background: transparent !important;
    }

    .skeleton-block {
      position: relative;
      display: inline-flex;
      width: 100%;
      height: 14px;
      border-radius: 999px;
      overflow: hidden;
      background: rgba(255,255,255,0.06);
    }

    .skeleton-block::after {
      content: "";
      position: absolute;
      inset: 0;
      transform: translateX(-100%);
      background: linear-gradient(
        90deg,
        transparent,
        rgba(255,255,255,0.12),
        transparent
      );
      animation: skeletonShimmer 1.35s infinite;
    }

    .skeleton-block-sm {
      max-width: 96px;
    }

    .skeleton-block-icon {
      width: 18px;
      height: 18px;
      border-radius: 6px;
    }

    .table-scroll {
      overflow-x: auto;
    }

    table {
      width: 100%;
      border-collapse: separate;
      border-spacing: 0;
      min-width: 1150px;
    }

    thead th {
      font-size: 14px;
      color: var(--text);
      font-weight: 600;
      text-align: left;
      padding: 14px 16px;
      background: var(--modal-surface-strong);
      border-bottom: 1px solid var(--border);
      white-space: nowrap;
    }

    tbody td {
      padding: 14px 16px;
      border-bottom: 1px solid rgba(255,255,255,0.06);
      color: var(--text);
      font-size: 15px;
      vertical-align: middle;
      white-space: nowrap;
    }

    tbody tr {
      transition: background-color 180ms var(--ease-standard), transform 180ms var(--ease-standard);
    }

    tbody tr:hover td {
      background: var(--modal-surface-strong);
    }

    tbody tr:last-child td {
      border-bottom: none;
    }

    .checkbox-cell,
    .drag-cell,
    .menu-cell {
      width: 40px;
      text-align: center;
      padding-left: 10px;
      padding-right: 10px;
    }

    .drag-grip {
      display: inline-grid;
      gap: 2px;
      grid-template-columns: repeat(2, 3px);
      opacity: 0.55;
    }

    .drag-grip span {
      width: 3px;
      height: 3px;
      background: rgba(255,255,255,0.48);
      border-radius: 50%;
      display: block;
    }

    .check {
      width: 16px;
      height: 16px;
      border: 1px solid var(--border);
      border-radius: 4px;
      display: inline-block;
      background: transparent;
    }

    .pill {
      display: inline-flex;
      align-items: center;
      gap: 8px;
      padding: 6px 10px;
      border-radius: 999px;
      border: 1px solid var(--border);
      background: var(--modal-surface);
      font-size: 13px;
      line-height: 1;
    }

    .pill:hover {
      background: var(--modal-surface-strong);
      border-color: rgba(255,255,255,0.14);
    }

    .status-pill .dot {
      width: 8px;
      height: 8px;
      border-radius: 50%;
      display: inline-block;
    }

    .dot-processing { background: rgba(255, 255, 255, 0.72); }
    .dot-new { background: rgba(255, 255, 255, 0.56); }
    .dot-done { background: var(--success); }

    .mini-select {
      height: 38px;
      padding: 0 12px;
      border-radius: 10px;
      border: 1px solid var(--border);
      background: var(--panel-2);
      color: var(--text);
      appearance: none;
      padding-right: 38px;
      background-image: url("../img/icons/chevron-down.svg");
      background-repeat: no-repeat;
      background-position: right 12px center;
      background-size: 14px 14px;
      transition: border-color 0.18s ease, background-color 0.18s ease, box-shadow 0.18s ease;
    }

    .mini-select:hover:not(:disabled) {
      background-color: var(--panel-3);
      border-color: rgba(255, 255, 255, 0.14);
      transform: translateY(-1px);
    }

    .mini-select:focus,
    .mini-select:focus-visible {
      outline: none;
      border-color: rgba(255, 255, 255, 0.18);
      box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.14);
    }

    .mini-select option,
    .mini-select optgroup {
      background: var(--panel-2);
      color: var(--text);
    }

    .action-link {
      height: 38px;
      padding: 0 16px;
      border-radius: 10px;
      border: 1px solid var(--border);
      background: var(--modal-surface);
      color: var(--text);
      display: inline-flex;
      align-items: center;
      justify-content: center;
      font-weight: 500;
    }

    .ellipsis {
      color: var(--text-soft);
      font-size: 20px;
      line-height: 1;
    }

    .bulk-toolbar {
      position: fixed;
      left: calc(var(--sidebar-width) + 18px);
      right: 18px;
      bottom: 16px;
      z-index: 50;
      margin: 0;
      padding: 14px 16px;
      border: 1px solid var(--border);
      border-radius: 18px;
      background: rgba(17, 18, 20, 0.96);
      box-shadow: 0 18px 40px rgba(0, 0, 0, 0.42);
      backdrop-filter: blur(12px);
      -webkit-backdrop-filter: blur(12px);
    }

    .dashboard-page.has-bulk-toolbar {
      padding-bottom: 86px;
    }

    .bulk-toolbar-main {
      display: flex;
      align-items: center;
      gap: 12px;
      flex-wrap: wrap;
    }

    .bulk-toolbar-feedback {
      margin-top: 10px;
      font-size: 14px;
      color: var(--text-soft);
    }

    .bulk-toolbar-select {
      min-width: 190px;
    }

    .email-template-modal[hidden] {
      display: none;
    }

    .email-template-modal {
      position: fixed;
      inset: 0;
      z-index: 70;
      display: grid;
      place-items: center;
      padding: 18px;
    }

    .email-template-backdrop {
      position: absolute;
      inset: 0;
      background: rgba(0, 0, 0, 0.56);
      backdrop-filter: blur(8px);
      -webkit-backdrop-filter: blur(8px);
    }

    .email-template-panel {
      position: relative;
      width: min(560px, 100%);
      border: 1px solid var(--border);
      border-radius: 18px;
      background: rgba(17, 18, 20, 0.98);
      box-shadow: 0 24px 60px rgba(0, 0, 0, 0.48);
      padding: 18px;
    }

    .email-template-head {
      display: flex;
      align-items: flex-start;
      justify-content: space-between;
      gap: 16px;
      margin-bottom: 16px;
    }

    .email-template-head h2 {
      margin: 0 0 6px;
      font-size: 20px;
      letter-spacing: 0;
    }

    .email-template-head p {
      margin: 0;
      color: var(--text-soft);
      font-size: 14px;
    }

    .email-template-close {
      font-size: 24px;
      line-height: 1;
    }

    .email-template-list {
      display: grid;
      gap: 10px;
    }

    .email-template-option {
      display: grid;
      gap: 5px;
      width: 100%;
      padding: 14px 15px;
      border: 1px solid var(--border);
      border-radius: 12px;
      background: var(--modal-surface);
      color: var(--text);
      text-align: left;
      cursor: pointer;
    }

    .email-template-option:hover,
    .email-template-option:focus-visible {
      background: var(--modal-surface-strong);
      border-color: rgba(255, 255, 255, 0.18);
      transform: translateY(-1px);
    }

    .email-template-option strong {
      font-size: 15px;
    }

    .email-template-option span {
      color: var(--text-soft);
      font-size: 13px;
      line-height: 1.4;
    }

    .app-toast {
      position: fixed;
      top: 18px;
      left: 50%;
      z-index: 80;
      display: none;
      min-width: 280px;
      max-width: min(520px, calc(100vw - 24px));
      padding: 13px 16px;
      border-radius: 14px;
      border: 1px solid var(--border);
      background: var(--modal-surface-strong);
      color: var(--text);
      box-shadow: 0 18px 40px rgba(0, 0, 0, 0.42);
      text-align: center;
      font-size: 14px;
      font-weight: 600;
      transform: translate(-50%, -12px) scale(0.98);
      opacity: 0;
      align-items: center;
      justify-content: center;
      gap: 10px;
      transition: opacity 220ms var(--ease-standard), transform 220ms var(--ease-standard);
    }

    .app-toast.show {
      display: inline-flex;
      opacity: 1;
      transform: translate(-50%, 0) scale(1);
      animation: appToastIn 420ms var(--ease-standard) both;
    }

    .app-toast.success {
      background: rgba(22, 101, 52, 0.96);
      border-color: rgba(74, 222, 128, 0.5);
      color: #dcfce7;
    }

    .app-toast.error {
      background: rgba(127, 29, 29, 0.96);
      border-color: rgba(248, 113, 113, 0.5);
      color: #fee2e2;
    }

    .app-toast.warning {
      background: rgba(113, 63, 18, 0.96);
      border-color: rgba(251, 191, 36, 0.5);
      color: #fef3c7;
    }

    .app-toast.info,
    .app-toast.loading {
      background: rgba(30, 64, 175, 0.96);
      border-color: rgba(96, 165, 250, 0.5);
      color: #dbeafe;
    }

    .app-toast.loading {
      box-shadow: 0 18px 40px rgba(30, 64, 175, 0.28), 0 0 0 1px rgba(96, 165, 250, 0.12);
    }

    .app-toast-spinner {
      width: 15px;
      height: 15px;
      border-radius: 50%;
      border: 2px solid rgba(219, 234, 254, 0.36);
      border-top-color: #dbeafe;
      flex: 0 0 auto;
      animation: appToastSpin 780ms linear infinite;
    }

    @keyframes appToastIn {
      0% {
        opacity: 0;
        transform: translate(-50%, -18px) scale(0.96);
      }
      68% {
        opacity: 1;
        transform: translate(-50%, 3px) scale(1.01);
      }
      100% {
        opacity: 1;
        transform: translate(-50%, 0) scale(1);
      }
    }

    @keyframes appToastSpin {
      to {
        transform: rotate(360deg);
      }
    }

    @keyframes skeletonShimmer {
      100% {
        transform: translateX(100%);
      }
    }

    .stats-row .stat-card:nth-child(1) { transition-delay: 30ms; }
    .stats-row .stat-card:nth-child(2) { transition-delay: 80ms; }
    .stats-row .stat-card:nth-child(3) { transition-delay: 130ms; }
    .stats-row .stat-card:nth-child(4) { transition-delay: 180ms; }
    .dashboard-grid > .chart-card { transition-delay: 110ms; }
    .dashboard-grid > .table-card { transition-delay: 160ms; }

    @media (prefers-reduced-motion: reduce) {
      *,
      *::before,
      *::after {
        animation: none !important;
        transition: none !important;
        scroll-behavior: auto !important;
      }

      .topbar,
      .stat-card,
      .chart-card,
      .table-card,
      .audit-shell-card,
      .documents-manager-card,
      .bulk-toolbar {
        opacity: 1 !important;
        transform: none !important;
      }
    }

    @media (max-width: 1500px) {
      .stats-row {
        grid-template-columns: repeat(2, minmax(0, 1fr));
      }
    }

    @media (max-width: 1100px) {
      .app-shell {
        grid-template-columns: 1fr;
      }

      .sidebar {
        display: none;
      }

      .main {
        padding: 0 12px 12px;
      }

      .topbar {
        padding-right: 0;
      }

      .chart-top,
      .content-top {
        flex-direction: column;
        align-items: stretch;
      }

      .range-group,
      .tabs,
      .actions {
        width: fit-content;
      }

      .bulk-toolbar {
        left: 12px;
        right: 12px;
        bottom: 12px;
      }
    }

    @media (max-width: 760px) {
      .stats-row {
        grid-template-columns: 1fr;
      }

      .page-title {
        font-size: 22px;
      }

      .chart-title {
        font-size: 24px;
      }

      .bulk-toolbar {
        left: 8px;
        right: 8px;
        bottom: 8px;
        padding: 12px;
      }

      .dashboard-page.has-bulk-toolbar {
        padding-bottom: 176px;
      }

      .bulk-toolbar-main {
        align-items: stretch;
      }

      .bulk-toolbar-select,
      .bulk-toolbar .btn {
        width: 100%;
      }

      .app-toast {
        top: 12px;
        left: 50%;
        min-width: 0;
        width: calc(100vw - 24px);
        max-width: none;
      }
    }
