:root {
        --ink: #1a1416;
        --cloud: #fbf7f4;
        --sand: #f1e6e0;
        --mist: #f7f0ea;
        --burgundy-900: #3b0f1e;
        --burgundy-700: #6a1b33;
        --burgundy-500: #8d2a45;
        --burgundy-300: #b86a7a;
        --gold: #f2c14e;
        --steel: #5a4b52;
      }

      * {
        box-sizing: border-box;
      }

      body {
        margin: 0;
        font-family: "Space Grotesk", system-ui, sans-serif;
        color: var(--ink);
        background: radial-gradient(circle at top, #fff7f2 0%, #f3e6de 55%, #ead9d2 100%);
        min-height: 100vh;
      }

      .app-shell {
        display: grid;
        grid-template-columns: 280px 1fr;
        min-height: 100vh;
      }

      .app-shell.no-sidebar {
        grid-template-columns: 1fr;
      }

      .sidebar {
        background: linear-gradient(160deg, var(--burgundy-900), #4a1224 45%, #2d0d17 100%);
        color: #fff;
        padding: 28px 22px;
        display: flex;
        flex-direction: column;
        gap: 24px;
        position: sticky;
        top: 0;
        height: 100vh;
        overflow: hidden;
      }

      .sidebar__brand .brand {
        font-size: 20px;
      }

      .sidebar .menu-label {
        color: rgba(255, 255, 255, 0.6);
        letter-spacing: 0.08em;
        font-size: 11px;
      }

      .sidebar .menu-list a {
        color: #f9e9e2;
        display: inline-flex;
        align-items: center;
        gap: 8px;
        width: 100%;
      }

      .sidebar .menu-list a:hover {
        background: rgba(255, 255, 255, 0.12);
      }

      .sidebar .menu-list a.is-active {
        background: #fff;
        color: var(--burgundy-900);
        font-weight: 600;
      }

      .sidebar__footer {
        margin-top: auto;
        display: grid;
        gap: 12px;
        flex-shrink: 0;
      }
      .sidebar .menu {
        flex: 1 1 auto;
        min-height: 0;
        overflow-y: auto;
        padding-right: 6px;
        scrollbar-gutter: stable;
      }
      .sidebar .menu-list {
        padding-bottom: 8px;
      }

      .main {
        padding: 32px 32px 80px;
      }

      .topbar {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 16px;
        margin-bottom: 24px;
      }

      .brand {
        font-weight: 700;
        letter-spacing: 0.02em;
      }

      .badge {
        display: inline-flex;
        align-items: center;
        gap: 8px;
        padding: 6px 12px;
        background: rgba(255, 255, 255, 0.15);
        font-size: 14px;
      }


      .title .ph,
      .subtitle .ph {
        margin-right: 0.45em;
      }


      .topbar__title h1 .ph {
        margin-right: 0.45em;
      }

      .label .ph {
        margin-right: 0.4em;
      }


      .icon-bn {
        color: var(--burgundy-700);
      }

      .icon-muted {
        color: rgba(26, 20, 22, 0.55);
      }

      .icon-danger {
        color: #c43a4b;
      }

      .switch {
        position: relative;
        display: inline-block;
        width: 42px;
        height: 24px;
      }

      .switch input {
        opacity: 0;
        width: 0;
        height: 0;
      }

      .slider {
        position: absolute;
        cursor: pointer;
        inset: 0;
        background-color: rgba(90, 75, 82, 0.25);
        transition: 0.2s;
      }

      .slider:before {
        position: absolute;
        content: "";
        height: 18px;
        width: 18px;
        left: 3px;
        bottom: 3px;
        background-color: white;
        transition: 0.2s;
      }

      .switch input:checked + .slider {
        background-color: var(--burgundy-700);
      }
      
      .switch .slider {
        border-radius: 4px;
      }

      .switch input:checked + .slider:before {
        transform: translateX(18px);
      }

      .table-meta {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
      }

      .table-wrap {
        margin-top: 16px;
      }

      .dashboard-hero {
        margin-bottom: 24px;
      }

      .dashboard-welcome .pill {
        display: inline-flex;
        margin-bottom: 8px;
      }

      .dashboard-welcome .pill {
        background: rgba(106, 27, 51, 0.12);
        color: var(--burgundy-900);
      }

      .dashboard-next {
        margin-top: 12px;
        display: flex;
        flex-direction: column;
        gap: 4px;
      }

      .stats-grid {
        margin-bottom: 24px;
      }

      .stat-card {
        display: grid;
        gap: 6px;
        min-height: 110px;
      }

      .stat-value {
        font-size: 22px;
        font-weight: 600;
      }

      .stat-label {
        color: rgba(26, 20, 22, 0.6);
        font-size: 13px;
      }

      .dashboard-lists {
        margin-bottom: 24px;
      }

      .dashboard-list {
        list-style: none;
        margin: 0;
        padding: 0;
        display: grid;
        gap: 10px;
      }

      .dashboard-list li {
        display: flex;
        justify-content: space-between;
        gap: 12px;
        align-items: center;
        border-bottom: 1px solid rgba(26, 20, 22, 0.08);
        padding-bottom: 8px;
      }

      .dashboard-list li:last-child {
        border-bottom: none;
        padding-bottom: 0;
      }

      .filters-bar {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
        align-items: end;
        gap: 10px;
        margin-top: 12px;
      }

      .filters-bar--single {
        display: flex;
        flex-wrap: nowrap;
        align-items: end;
        gap: 12px;
        overflow-x: auto;
        padding-bottom: 4px;
      }

      .filters-bar--single .field {
        min-width: 180px;
        flex: 0 0 auto;
        display: flex;
        flex-direction: column;
      }

      .filters-bar--single .filters-actions {
        margin-left: auto;
      }

      .filters-bar--single .select.is-small,
      .filters-bar--single .select.is-small select {
        height: 36px;
      }

      .filters-bar--single .select.is-small:not(.is-multiple):not(.is-loading)::after {
        border-color: rgb(68 85 102);
      }

      .filters-bar--single .checkbox {
        display: flex;
        align-items: center;
        height: 36px;
        gap: 6px;
      }

      .filters-bar .field {
        margin-bottom: 0;
      }

      .filters-bar .input,
      .filters-bar .select select,
      .filters-inline .input,
      .filters-inline .select select {
        min-width: 180px;
      }

      .filters-actions {
        margin-left: 0;
        justify-self: end;
      }

      .filters-inline {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
        align-items: end;
        gap: 10px;
        margin-top: 8px;
      }

      .calendar-grid {
        display: grid;
        grid-template-columns: repeat(7, minmax(120px, 1fr));
        gap: 12px;
      }

      .calendar-cell {
        background: #fff;
        padding: 12px;
        min-height: 120px;
        border: 1px solid rgba(106, 27, 51, 0.08);
      }

      .calendar-cell.muted {
        opacity: 0.45;
      }

      .calendar-day {
        font-weight: 600;
        margin-bottom: 6px;
      }

      .event-chip {
        display: block;
        padding: 6px 8px;
        background: rgba(106, 27, 51, 0.12);
        color: var(--burgundy-900);
        font-size: 12px;
        margin-bottom: 6px;
      }

      .calendar-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
        margin-bottom: 16px;
      }

      .overlay {
        display: none;
      }

      h1 {
        font-size: clamp(28px, 4vw, 40px);
        margin: 0 0 8px;
      }

      h2 {
        font-size: 18px;
        margin: 0 0 12px;
        color: var(--steel);
      }


      th.actions-col,
      td.actions-col,
      th.detail-col,
      td.detail-col {
        text-align: right;
        white-space: nowrap;
      }

      .pill {
        padding: 6px 10px;
        background: rgba(255, 255, 255, 0.18);
        color: #fff;
        font-size: 12px;
        font-weight: 600;
      }

      .muted {
        color: rgba(255, 255, 255, 0.75);
        font-size: 13px;
      }

      .muted.dark {
        color: rgba(26, 20, 22, 0.6);
      }

      .source-ellipsis {
        display: inline-block;
        max-width: 600px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        vertical-align: bottom;
      }
      .variant-card .source-ellipsis {
        max-width: 200px;
      }

      .error {
        background: #ffebe6;
        color: #962200;
        padding: 10px 12px;
        margin-bottom: 12px;
      }

      .input,
      .textarea,
      .select select {
        border-color: rgba(68, 85, 102, 0.25);
        box-shadow: none;
      }

      .input.is-small,
      .select.is-small select {
      }

      .input:focus,
      .textarea:focus,
      .select select:focus,
      .input.is-focused,
      .textarea.is-focused,
      .select select.is-focused {
        border-color: var(--burgundy-500);
        box-shadow: 0 0 0 0.125em rgba(141, 42, 69, 0.2);
      }

      dialog {
        border: none;
        padding: 0;
        width: min(520px, 92vw);
        max-height: 85vh;
        box-shadow: 0 24px 48px rgba(26, 20, 22, 0.3);
      }

      dialog::backdrop {
        background: rgba(26, 20, 22, 0.4);
      }

      dialog.modal-card-dialog {
        background: transparent;
        width: auto;
        max-height: none;
        box-shadow: none;
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 0;
        position: fixed;
        inset: 0;
      }

      dialog.modal-card-dialog:not([open]) {
        display: none;
      }

      dialog.modal-card-dialog::backdrop {
        background: rgba(10, 10, 10, 0.86);
      }

      dialog.modal-card-dialog .modal-background {
        background: transparent;
        position: absolute;
        inset: 0;
      }

      dialog.modal-card-dialog .modal-card {
        width: min(640px, 92vw);
        max-height: 90vh;
        position: relative;
        z-index: 1;
      }

      dialog.modal-card-dialog.wide .modal-card {
        width: min(860px, 92vw);
      }

      dialog.modal-card-dialog.xl .modal-card {
        width: min(1120px, 96vw);
      }

      dialog.modal-card-dialog .modal-card-body {
        overflow: auto;
      }

      .bn-modal {
        padding: 24px;
        display: grid;
        gap: 16px;
      }

      .bn-modal.scroll {
        max-height: 75vh;
        overflow: auto;
      }

      dialog.modal-card-dialog .bn-modal {
        padding: 20px;
        display: block;
        gap: 0;
      }

      dialog.modal-card-dialog .bn-modal.scroll {
        max-height: none;
      }

      dialog.wide {
        width: min(860px, 92vw);
      }

      dialog.xl {
        width: min(1120px, 96vw);
      }

      dialog.graphics-dialog {
        width: min(96vw, 1400px);
        max-height: 92vh;
        overflow: hidden;
      }

      dialog.graphics-dialog .modal-card {
        width: 100%;
        height: 92vh;
        max-height: 92vh;
      }

      dialog.graphics-dialog .modal-card-body {
        flex: 1;
        overflow: hidden;
        padding: 0;
      }

      dialog.google-dialog {
        width: min(96vw, 1280px);
        max-height: 92vh;
        overflow: hidden;
      }

      .bn-modal h3 {
        margin: 0;
      }

      .canva-picker-list {
        display: flex;
        flex-direction: column;
        gap: 12px;
      }

      .canva-picker-item {
        display: flex;
        align-items: center;
        gap: 12px;
        padding: 10px 12px;
        border: 1px solid rgba(68, 85, 102, 0.2);
        border-radius: 10px;
        background: #fff;
      }

      .canva-picker-thumb {
        width: 64px;
        height: 64px;
        border-radius: 10px;
        background: rgba(26, 20, 22, 0.06);
        display: flex;
        align-items: center;
        justify-content: center;
        overflow: hidden;
        color: rgba(26, 20, 22, 0.4);
      }

      .canva-picker-thumb img {
        width: 100%;
        height: 100%;
        object-fit: cover;
      }

      .canva-picker-info {
        flex: 1;
        min-width: 0;
      }

      .canva-picker-title {
        font-weight: 600;
        margin-bottom: 2px;
      }

      .canva-picker-meta {
        font-size: 12px;
        color: rgba(26, 20, 22, 0.6);
      }

      .canva-picker-actions {
        margin-left: auto;
      }

      .canva-picker-empty {
        padding: 12px;
        border-radius: 10px;
        background: rgba(26, 20, 22, 0.04);
        color: rgba(26, 20, 22, 0.7);
      }

      .qr-wrap {
        display: flex;
        justify-content: center;
        align-items: center;
        padding: 16px;
        background: rgba(26, 20, 22, 0.03);
        border-radius: 12px;
      }

      .qr-wrap canvas {
        width: 220px;
        height: 220px;
      }

      @media (max-width: 640px) {
        .canva-picker-item {
          flex-direction: column;
          align-items: flex-start;
        }

        .canva-picker-actions {
          width: 100%;
        }

        .canva-picker-actions .button {
          width: 100%;
        }
      }

      .dataTable-wrapper {
        display: grid;
        gap: 12px;
      }

      .dataTable-top,
      .dataTable-bottom {
        display: flex;
        flex-wrap: wrap;
        align-items: flex-end;
        justify-content: space-between;
        gap: 12px;
      }

      .dataTable-dropdown,
      .dataTable-search {
        display: flex;
        align-items: center;
        gap: 8px;
      }

      .dataTable-search {
        margin-left: auto;
      }

      .dataTable-container {
        overflow-x: auto;
      }

      .dataTable-table th,
      .dataTable-table td {
        vertical-align: middle;
        padding: 14px 10px;
        line-height: 1.3;
      }

      .datatable-table > tbody > tr > td,
      .datatable-table > tbody > tr > th,
      .datatable-table > tfoot > tr > td,
      .datatable-table > tfoot > tr > th,
      .datatable-table > thead > tr > td,
      .datatable-table > thead > tr > th {
        vertical-align: middle !important;
        padding: 12px 10px;
      }

      .dataTable-selector,
      .dataTable-input {
        border: 1px solid rgba(68, 85, 102, 0.2);
        padding: 10px 12px;
        font-size: 14px;
        font-family: inherit;
      }

      .dataTable-input {
        min-width: 200px;
      }

      .dataTable-info {
        color: rgba(26, 20, 22, 0.6);
        font-size: 13px;
      }

      .dataTable-pagination a {
        color: var(--burgundy-700);
        padding: 6px 10px;
        border: 1px solid rgba(106, 27, 51, 0.15);
      }

      .dataTable-pagination a.active {
        background: var(--burgundy-700);
        color: #fff;
      }

      .events-table td,
      .events-table th {
        vertical-align: middle;
      }

      .icon-text {
        display: inline-flex;
        align-items: center;
        gap: 3px;
      }

      [data-calendar] {
        margin-top: 8px;
      }


      .calendar-shell {
        display: grid;
        gap: 16px;
        margin-bottom: 24px;
      }

      .graphics-preview {
        border: 1px solid rgba(26, 20, 22, 0.1);
        background: #fff;
        min-height: 280px;
        height: 280px;
        display: flex;
        align-items: center;
        justify-content: center;
        overflow: hidden;
      }

      .graphics-preview img {
        width: 100%;
        height: 100%;
        object-fit: contain;
        cursor: zoom-in;
      }

      .graphics-preview.preview {
        height: 70vh;
        min-height: 60vh;
      }

      .preview-dialog .preview-modal {
        padding: 8px;
        gap: 8px;
      }

      .preview-dialog .preview-modal h3 {
        margin-bottom: 0;
      }

      .graphics-preview.small {
        min-height: 320px;
        height: 100%;
      }

      .variant-template {
        opacity: 0.9;
      }

      .graphics-placeholder {
        color: rgba(26, 20, 22, 0.6);
        font-size: 14px;
        text-align: center;
      }

      .graphics-actions .buttons,
      .graphics-actions form {
        margin-top: 8px;
        margin-bottom: 0;
        flex-direction: column;
      }

      .variant-card .card-content {
        height: 550px;
        padding: 0;
      }

      .variant-layout {
        height: 100%;
        align-items: stretch;
        margin: 0;
      }

      .variant-main {
        display: flex;
        flex-direction: column;
        padding: 16px !important;
      }

      .variant-main .graphics-preview {
        flex: 1;
      }

      .variant-actions {
        display: flex;
        justify-content: flex-end;
        padding: 0;
      }

      .variant-actions .graphics-actions {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 12px;
      }

      .variant-action-rail {
        height: 100%;
        width: 100%;
        padding: 12px 8px;
        border-left: 1px solid rgba(26, 20, 22, 0.12);
        justify-content: space-between;
      }

      .graphics-action-bar .button,
      .graphics-actions .file-cta-small {
        width: 87px;
        height: 44px;
        padding: 0;
        justify-content: center;
        margin: 0 !important;
        border-radius: 10px;
      }

      .graphics-action-bar .has-addons .button{
        width: 44px;
      }

      .graphics-action-bar .field {
        margin-bottom: 0;
      }

      .graphics-action-bar {
        gap: 10px;
      }

      .graphics-action-icon {
        font-size: 1.5rem;
      }

      .variant-action-rail .block {
        flex-direction: column;
        display: flex;
        margin-bottom: 0px;
      }

      .variant-action-rail .variant-delete-block {
        margin-top: auto;
      }

      .status-dropdown .button {
        font-weight: 600;
      }

      .status-dropdown.is-disabled {
        opacity: 0.6;
        pointer-events: none;
      }

      .status-dropdown.status-ready .button {
        background: #e6f7ef;
        border-color: #2f9e62;
        color: #1f6f45;
      }

      .status-dropdown.status-exporting .button {
        background: #fff4e6;
        border-color: #f08c00;
        color: #9c4a00;
      }

      .status-dropdown.status-in_canva .button {
        background: #e7f5ff;
        border-color: #1c7ed6;
        color: #0b4e8b;
      }

      .status-dropdown.status-draft .button {
        background: #f3f0ff;
        border-color: #7048e8;
        color: #4a2aa3;
      }

      .status-dropdown.status-archived .button {
        background: #f1f3f5;
        border-color: #868e96;
        color: #495057;
      }

      .file-cta .icon:first-child:not(:last-child) {
        margin-left: calc(-.5em - 1px);
        margin-right: .25em;
        min-width: 1.5rem !important;
      }

      .field.is-fullwidth {
        display: flex;
        width: 100%;
      }

      .file-cta.is-fullwidth {
        display: flex;
        width: 100%;
      }

      .master-card {
        padding: 0;
      }

      .master-card .card-content {
        padding: 0;
      }

      .master-layout {
        align-items: stretch;
        margin: 0;
      }

      .master-main {
        display: flex;
        flex-direction: column;
        padding: 16px !important;
      }

      .master-preview-square {
        height: 600px;
      }

      .master-actions {
        padding: 0;
      }

      .master-action-rail {
        height: 100%;
        width: 100%;
        padding: 16px;
        border-left: 1px solid rgba(26, 20, 22, 0.12);
        display: flex;
        flex-direction: column;
        gap: 12px;
      }

      .master-action-rail .buttons {
        width: 100%;
        flex-direction: column;
      }

      .master-action-rail .button {
        justify-content: flex-start;
      }

      .master-action-group {
        gap: 8px;
      }

      .graphics-editor-modal {
        width: 100%;
        height: 100%;
        max-width: none;
        padding: 0;
        display: flex;
        flex-direction: column;
        gap: 0;
        overflow: hidden;
      }

      .graphics-editor-wrap {
        position: relative;
        background: #f8f8f8;
        padding: 0;
        flex: 1;
        height: 100%;
        min-height: 0;
      }

      [data-graphics-editor-container] {
        height: 100%;
      }

      .graphics-editor-wrap .tui-image-editor-container,
      .graphics-editor-wrap .tui-image-editor-main,
      .graphics-editor-wrap .tui-image-editor {
        height: 100%;
      }

      .graphics-editor-wrap .tui-image-editor-container {
        width: 100%;
      }

      .graphics-editor-wrap .tui-image-editor-main {
        overflow: hidden;
      }

      .graphics-safe-area {
        position: absolute;
        border: 2px dashed rgba(106, 27, 51, 0.6);
        pointer-events: none;
        opacity: 0;
      }

      .graphics-search-results {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
        gap: 14px;
        margin-top: 12px;
        max-height: 56vh;
        overflow: auto;
      }

      .graphics-search-results .search-item {
        border: 1px solid rgba(26, 20, 22, 0.08);
        padding: 10px;
        background: #fff;
        display: flex;
        flex-direction: column;
        gap: 10px;
        min-height: 320px;
      }

      .graphics-search-results img {
        width: 100%;
        height: 200px;
        object-fit: contain;
        object-position: center;
        background: #f6f6f6;
        border-radius: 6px;
        cursor: zoom-in;
      }

      dialog.google-dialog .bn-modal.scroll {
        max-height: 85vh;
        overflow: hidden;
      }

      [data-google-filters] {
        margin-bottom: 8px;
      }

      .tabs-panel {
        padding: 1.5rem;
      }

      .tabs-panel .tabs {
        margin-bottom: 1.5rem;
      }

      .tabs-panel .tabs-content > section + section {
        margin-top: 1.5rem;
      }

      .filters-bar .label,
      .filters-inline .label {
        margin-bottom: 0.35rem;
        color: rgba(26, 20, 22, 0.7);
        font-weight: 600;
      }

      .filters-bar .input,
      .filters-inline .input,
      .filters-bar .select select,
      .filters-inline .select select {
        border-color: rgba(68, 85, 102, 0.2);
        height: 36px;
        border-radius: 8px;
      }

      .filters-bar .input:focus,
      .filters-inline .input:focus,
      .filters-bar .select select:focus,
      .filters-inline .select select:focus {
        border-color: rgba(106, 27, 51, 0.55);
        box-shadow: 0 0 0 0.125em rgba(106, 27, 51, 0.2);
      }

      .events-table .buttons .button {
        min-width: 36px;
      }


      .sr-only {
        position: absolute;
        width: 1px;
        height: 1px;
        padding: 0;
        margin: -1px;
        overflow: hidden;
        clip: rect(0, 0, 0, 0);
        border: 0;
      }

      @media (max-width: 900px) {
        .app-shell {
          grid-template-columns: 1fr;
        }

        .sidebar {
          position: fixed;
          inset: 0 auto 0 0;
          width: 260px;
          transform: translateX(-100%);
          transition: transform 0.25s ease;
          z-index: 20;
          overflow: hidden;
        }

        .sidebar.open {
          transform: translateX(0);
        }

        .main {
          padding: 24px 20px 60px;
        }

        .mobile-toggle {
          display: inline-flex;
        }

        .overlay {
          display: none;
          position: fixed;
          inset: 0;
          background: rgba(26, 20, 22, 0.45);
          z-index: 10;
        }

        .overlay.show {
          display: block;
        }

        .modal-grid {
          grid-template-columns: 1fr;
        }

        .filters-actions {
          margin-left: 0;
          width: 100%;
        }

        .filters-bar .input,
        .filters-bar .select select,
        .filters-inline .input,
        .filters-inline .select select {
          min-width: 100%;
        }

        .filters-bar--single {
          flex-wrap: wrap;
          overflow-x: visible;
        }

        .filters-bar--single .field,
        .filters-bar--single .filters-actions {
          min-width: 100%;
        }

        .dashboard-list li {
          flex-direction: column;
          align-items: flex-start;
        }
      }

      .mobile-toggle {
        display: none;
        border: 1px solid rgba(106, 27, 51, 0.2);
        background: #fff;
        color: var(--burgundy-700);
        padding: 8px 14px;
        font-weight: 600;
        cursor: pointer;
      }
