@import url("https://fonts.googleapis.com/css2?family=Cairo:wght@300;400;600;700&display=swap");

      /* ── Theme Variables — High Performance Opaque Dark & Light Modes ── */
      :root {
        --bg-body: #0b0f19;
        --bg-card: #0f172a;
        --bg-card-alt: #1e293b;
        --bg-input: #1e293b;
        --border-card: rgba(255, 255, 255, 0.1);
        --border-input: rgba(255, 255, 255, 0.15);
        --text-primary: #f8fafc;
        --text-secondary: #cbd5e1;
        --text-muted: #7c8aa3;
        --scrollbar-track: #0b0f19;
        --scrollbar-thumb: rgba(255, 255, 255, 0.2);
        --accent: #f59e0b;
        --accent-hover: #d97706;
        --accent-dim: rgba(245, 158, 11, 0.15);
        --danger: #ef4444;
        --success: #10b981;
        --info: #3b82f6;
      }
      [data-theme="light"] {
        --bg-body: #f8fafc;
        --bg-card: #ffffff;
        --bg-card-alt: #f1f5f9;
        --bg-input: #ffffff;
        --border-card: rgba(15, 23, 42, 0.08);
        --border-input: rgba(15, 23, 42, 0.12);
        --text-primary: #0f172a;
        --text-secondary: #475569;
        --text-muted: #64748b;
        --scrollbar-track: #f1f5f9;
        --scrollbar-thumb: rgba(0, 0, 0, 0.2);
        --accent: #d97706;
        --accent-hover: #b45309;
        --accent-dim: rgba(217, 119, 6, 0.12);
        --danger: #dc2626;
        --success: #059669;
        --info: #2563eb;
      }

      body {
        font-family: "Cairo", sans-serif;
        background: var(--bg-body);
        background-color: #0b0f19; /* Fallback */
        color: var(--text-primary);
        transition: background-color 0.2s ease, color 0.2s ease;
      }
      [data-theme="light"] body {
        background-color: #f8fafc; /* Fallback */
      }
      .studio-card {
        background: var(--bg-card);
        border: 1px solid var(--border-card);
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
        transition: border-color 0.2s ease;
      }
      .studio-card:hover {
        border-color: rgba(255, 255, 255, 0.2);
      }
      [data-theme="light"] .studio-card:hover {
        border-color: rgba(15, 23, 42, 0.2);
      }
      .studio-input {
        background: var(--bg-input);
        border: 1px solid var(--border-input);
        color: var(--text-primary);
        transition: border-color 0.15s ease;
      }
      .studio-input:focus {
        border-color: var(--accent);
        box-shadow: 0 0 0 2px var(--accent-dim);
        background: var(--bg-card-alt);
      }
      [data-theme="light"] .studio-input:focus {
        background: #ffffff;
      }
      .text-theme-primary {
        color: var(--text-primary);
      }
      .text-theme-secondary {
        color: var(--text-secondary);
      }
      .text-theme-muted {
        color: var(--text-muted);
      }

      .gradient-text {
        background: linear-gradient(to left, var(--accent), var(--accent-hover));
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
      }
      .cropper-view-box,
      .cropper-face {
        border-radius: 2px;
        outline-color: var(--accent);
      }
      ::-webkit-scrollbar {
        width: 6px;
      }
      ::-webkit-scrollbar-track {
        background: var(--scrollbar-track);
      }
      ::-webkit-scrollbar-thumb {
        background: var(--scrollbar-thumb);
        border-radius: 10px;
      }

      /* Indicators & Glow */
      .badge {
        font-size: 8px;
        padding: 1px 4px;
        border-radius: 3px;
        font-weight: 800;
        text-transform: uppercase;
      }
      .badge-rmbg {
        background: #10b981;
        color: #064e3b;
      }
      .badge-retouch {
        background: #3b82f6;
        color: #1e3a8a;
      }
      .badge-crop {
        background: #f59e0b;
        color: #78350f;
      }
      .badge-color {
        background: #a855f7;
        color: #4c1d95;
      }
      .badge-quality {
        font-size: 7px;
        padding: 1px 3px;
        border-radius: 2px;
        font-weight: 700;
      }
      .badge-hd {
        background: #10b981;
        color: white;
      }
      .badge-lowres {
        background: #ef4444;
        color: white;
      }
      .badge-mid {
        background: #f59e0b;
        color: white;
      }

      /* Drop zone */
      #queue-card {
        transition: border-color 0.3s cubic-bezier(0.4, 0, 0.2, 1), background-color 0.3s ease;
      }
      .drop-glow {
        border-color: var(--accent) !important;
        background-color: var(--accent-dim) !important;
        box-shadow: 0 0 20px var(--accent-dim);
      }

      /* Settings Panel Range Slider Styling */
      .settings-panel input[type="range"] {
        -webkit-appearance: none;
        appearance: none;
        background: var(--bg-input);
        border-radius: 9999px;
        height: 6px;
        border: 1px solid var(--border-input);
        outline: none;
        transition: all 0.2s ease;
      }
      .settings-panel input[type="range"]::-webkit-slider-thumb {
        -webkit-appearance: none;
        appearance: none;
        width: 14px;
        height: 14px;
        border-radius: 50%;
        background: var(--accent);
        cursor: pointer;
        border: 2px solid var(--bg-card);
        box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
        transition: transform 0.15s ease, background-color 0.2s ease;
      }
      .settings-panel input[type="range"]::-webkit-slider-thumb:hover {
        transform: scale(1.2);
        background: var(--accent-hover);
      }
      .settings-panel input[type="range"]::-moz-range-thumb {
        width: 14px;
        height: 14px;
        border-radius: 50%;
        background: var(--accent);
        cursor: pointer;
        border: 2px solid var(--bg-card);
        box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
        transition: transform 0.15s ease, background-color 0.2s ease;
      }
      .settings-panel input[type="range"]::-moz-range-thumb:hover {
        transform: scale(1.2);
        background: var(--accent-hover);
      }

      /* Skeleton Animation */
      @keyframes shimmer {
        0% {
          background-position: -468px 0;
        }
        100% {
          background-position: 468px 0;
        }
      }
      .skeleton {
        background: var(--bg-card);
        background-image: linear-gradient(
          to right,
          var(--bg-card) 0%,
          var(--border-card) 20%,
          var(--bg-card) 40%,
          var(--bg-card) 100%
        );
        background-repeat: no-repeat;
        background-size: 800px 104px;
        animation: shimmer 1.5s infinite linear;
      }

      .preview-transition {
        transition:
          opacity 0.3s ease-in-out,
          transform 0.3s ease-in-out;
      }
      .processing-spin {
        animation: spin 2s linear infinite;
      }
      @keyframes spin {
        from {
          transform: rotate(0deg);
        }
        to {
          transform: rotate(360deg);
        }
      }

      /* ── Toast Notifications ── */
      #toast-container {
        position: fixed;
        bottom: 90px;
        top: auto;
        left: 50%;
        transform: translateX(-50%);
        z-index: 9999;
        display: flex;
        flex-direction: column-reverse;
        gap: 8px;
        align-items: center;
        pointer-events: none;
      }
      .toast {
        pointer-events: auto;
        padding: 12px 24px;
        border-radius: 12px;
        font-size: 14px;
        font-weight: 600;
        display: flex;
        align-items: center;
        gap: 10px;
        box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
        animation: toastIn 0.35s ease-out;
        max-width: 420px;
      }
      .toast-success {
        background: #065f46;
        color: #d1fae5;
      }
      .toast-error {
        background: #7f1d1d;
        color: #fecaca;
      }
      .toast-info {
        background: #1e3a5f;
        color: #bfdbfe;
      }
      .toast-warning {
        background: #78350f;
        color: #fef3c7;
      }
      @keyframes toastIn {
        from {
          opacity: 0;
          transform: translateY(-20px);
        }
        to {
          opacity: 1;
          transform: translateY(0);
        }
      }
      @keyframes toastOut {
        from {
          opacity: 1;
          transform: translateY(0);
        }
        to {
          opacity: 0;
          transform: translateY(-20px);
        }
      }

      /* ── Upload Progress ── */
      .upload-progress-bar {
        height: 4px;
        border-radius: 2px;
        background: var(--border-card);
        overflow: hidden;
        margin-top: 8px;
      }
      .upload-progress-fill {
        height: 100%;
        background: var(--accent);
        width: 0%;
      }

      /* ── Zoom Modal ── */
      #zoom-modal {
        position: fixed;
        inset: 0;
        z-index: 100;
        display: none;
        background: rgba(0, 0, 0, 0.9);
        cursor: zoom-out;
        align-items: center;
        justify-content: center;
      }
      #zoom-modal.active {
        display: flex;
      }
      #zoom-modal img {
        max-width: 95vw;
        max-height: 95vh;
        object-fit: contain;
        transform-origin: center;
        transition: transform 0.2s;
      }

      /* ── Settings Panel ── */
      .settings-panel {
        max-height: 0;
        overflow: hidden;
        transition:
          max-height 0.35s ease-out,
          opacity 0.25s;
        opacity: 0;
      }
      .settings-panel.open {
        max-height: 80vh;
        overflow-y: auto;
        opacity: 1;
      }

      /* ── Mobile Drawer ── */
      .mobile-drawer-overlay {
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.5);
        z-index: 80;
        display: none;
      }
      .mobile-drawer-overlay.active {
        display: block;
      }
      .mobile-drawer {
        position: fixed;
        top: 0;
        bottom: 0;
        width: 85%;
        max-width: 380px;
        z-index: 81;
        transition: transform 0.3s ease;
        overflow-y: auto;
        padding: 20px;
        background: var(--bg-card);
      }
      /* RTL: drawer slides from left */
      [dir="rtl"] .mobile-drawer {
        left: 0;
        right: auto;
        transform: translateX(-100%);
      }
      .mobile-drawer.active {
        transform: translateX(0) !important;
      }


      /* Empty state */
      .empty-state-icon {
        font-size: 32px;
        color: var(--text-muted);
        opacity: 0.4;
        display: block;
        margin-bottom: 10px;
      }
      /* Phase 3.4: Jump popover */
      #jump-popover {
        position: absolute;
        top: calc(100% + 8px);
        left: 50%;
        transform: translateX(-50%);
        background: var(--bg-card);
        border: 1px solid var(--border-card);
        border-radius: 12px;
        padding: 12px;
        z-index: 50;
        box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
        min-width: 200px;
        display: none;
      }
      #jump-popover.active {
        display: block;
      }
      #jump-popover input {
        width: 100%;
        padding: 8px 12px;
        border-radius: 8px;
        background: var(--bg-input);
        border: 1px solid var(--border-input);
        color: var(--text-primary);
        text-align: center;
        font-size: 16px;
        outline: none;
      }
      #jump-popover input:focus {
        border-color: var(--accent);
      }
      /* Phase 3.5: Live preview thumbnail */
      #settings-live-preview {
        width: 100%;
        height: 80px;
        border-radius: 8px;
        overflow: hidden;
        border: 1px solid var(--border-card);
        background: var(--bg-card-alt);
        display: flex;
        align-items: center;
        justify-content: center;
        margin-top: 8px;
      }
      #settings-live-preview img {
        max-height: 100%;
        max-width: 100%;
        object-fit: contain;
      }
      /* Phase 3.6: Undo toast */
      .undo-toast {
        pointer-events: auto;
        padding: 10px 20px;
        border-radius: 12px;
        font-size: 13px;
        font-weight: 600;
        display: flex;
        align-items: center;
        gap: 10px;
        box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
        animation: toastIn 0.3s ease-out;
        background: #1e3a5f;
        color: #bfdbfe;
        max-width: 340px;
      }
      .undo-toast button {
        padding: 4px 12px;
        border-radius: 6px;
        font-size: 12px;
        font-weight: 700;
        cursor: pointer;
        border: none;
        transition: all 0.15s;
      }
      .undo-btn {
        background: var(--accent);
        color: #1a1a1a;
      }
      .undo-btn:hover {
        background: var(--accent-hover);
      }
      /* Focus */
      *:focus-visible {
        outline: 2px solid var(--accent);
        outline-offset: 2px;
        border-radius: 2px;
      }
      button:focus-visible,
      input:focus-visible,
      select:focus-visible,
      textarea:focus-visible {
        outline: 2px solid var(--accent);
        outline-offset: 2px;
      }

      /* ── Keyboard Shortcuts Modal ── */
      #shortcuts-modal {
        position: fixed;
        inset: 0;
        z-index: 90;
        display: none;
        background: rgba(0, 0, 0, 0.6);
        align-items: center;
        justify-content: center;
        backdrop-filter: blur(4px);
      }
      #shortcuts-modal.active {
        display: flex;
      }

      /* Horizontal queue slider */
      .queue-slider {
        display: flex;
        flex-direction: row;
        gap: 10px;
        flex-wrap: wrap;
        max-height: 340px;
        overflow-y: auto;
        overflow-x: hidden;
        padding: 8px 4px;
        scroll-behavior: smooth;
        scrollbar-width: thin;
      }
      .queue-slider::-webkit-scrollbar {
        width: 5px;
      }
      .queue-slider::-webkit-scrollbar-track {
        background: var(--scrollbar-track);
        border-radius: 10px;
      }
      .queue-slider::-webkit-scrollbar-thumb {
        background: var(--scrollbar-thumb);
        border-radius: 10px;
      }
      .queue-slider::-webkit-scrollbar-thumb:hover {
        background: var(--accent);
      }

      .queue-slide {
        flex: 0 0 auto;
        width: 72px;
        cursor: pointer;
        position: relative;
        border-radius: 10px;
        transition:
          transform 0.2s ease,
          box-shadow 0.2s ease;
        /* Phase 3.2 microinteraction */
      }
      .queue-slide:hover {
        transform: translateY(-2px);
      }
      .queue-slide.active {
        box-shadow: 0 0 0 2px var(--accent);
      }
      .queue-slide img {
        width: 72px;
        height: 72px;
        object-fit: cover;
        border-radius: 10px;
        display: block;
        border: 1px solid var(--border-card);
      }
      .queue-slide .slide-status {
        position: absolute;
        top: -4px;
        right: -4px;
        width: 16px;
        height: 16px;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 9px;
        z-index: 5;
        background: var(--bg-card);
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
      }
      .queue-slide .slide-delete {
        position: absolute;
        top: -4px;
        left: -4px;
        width: 18px;
        height: 18px;
        border-radius: 50%;
        background: #ef4444;
        color: white;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 8px;
        z-index: 5;
        opacity: 0;
        transition: opacity 0.15s;
        border: none;
        cursor: pointer;
      }
      .queue-slide:hover .slide-delete {
        opacity: 1;
      }
      .queue-slide .slide-name {
        font-size: 9px;
        text-align: center;
        margin-top: 4px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        color: var(--text-secondary);
        font-weight: 600;
        max-width: 72px;
      }
      /* Per-image countdown on queue slide */
      .slide-countdown {
        position: absolute;
        bottom: 22px;
        left: 50%;
        transform: translateX(-50%);
        background: rgba(0, 0, 0, 0.8);
        color: var(--accent);
        font-size: 8px;
        font-weight: 700;
        font-family: monospace;
        padding: 1px 5px;
        border-radius: 2px;
        z-index: 6;
        white-space: nowrap;
        display: none;
      }
      /* T7: per-image live step chip (Arabic step name while processing) */
      .slide-step-chip {
        position: absolute;
        bottom: 36px;
        left: 50%;
        transform: translateX(-50%);
        background: rgba(0, 0, 0, 0.85);
        color: var(--accent);
        font-size: 7px;
        font-weight: 700;
        padding: 1px 4px;
        border-radius: 2px;
        z-index: 6;
        white-space: nowrap;
        display: none;
        max-width: 70px;
        overflow: hidden;
        text-overflow: ellipsis;
      }
      /* Retry button on queue slide */
      .slide-retry {
        position: absolute;
        bottom: 22px;
        left: 50%;
        transform: translateX(-50%);
        width: 22px;
        height: 22px;
        border-radius: 50%;
        background: #f59e0b;
        color: white;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 9px;
        z-index: 5;
        opacity: 0;
        transition: opacity 0.15s;
        border: none;
        cursor: pointer;
      }
      .queue-slide:hover .slide-retry {
        opacity: 1;
      }
      /* Error detail tooltip */
      .slide-error-msg {
        position: absolute;
        bottom: 22px;
        right: -4px;
        background: #7f1d1d;
        color: #fecaca;
        font-size: 7px;
        padding: 3px 6px;
        border-radius: 6px;
        max-width: 120px;
        white-space: normal;
        text-align: right;
        z-index: 10;
        display: none;
        pointer-events: none;
      }
      .slide-error-msg::before {
        content: "";
        position: absolute;
        bottom: 4px;
        left: -4px;
        border: 4px solid transparent;
        border-left-color: #7f1d1d;
      }
      .queue-slide.has-error:hover .slide-error-msg {
        display: block;
      }
      /* Queue item slide-in animation */
      @keyframes slideInRight {
        from {
          opacity: 0;
          transform: translateX(20px);
        }
        to {
          opacity: 1;
          transform: translateX(0);
        }
      }
      .queue-slide-new {
        animation: slideInRight 0.25s ease-out;
      }
      /* Queue item fade-out animation */
      @keyframes fadeOutCollapse {
        from {
          opacity: 1;
          transform: scale(1);
        }
        to {
          opacity: 0;
          transform: scale(0.8);
        }
      }
      .queue-slide-removing {
        animation: fadeOutCollapse 0.2s ease-in forwards;
      }
      /* Phase 2.1: Frame thumbnail grid */
      .frame-thumb {
        width: 44px;
        height: 44px;
        border-radius: 8px;
        border: 2px solid var(--border-card);
        overflow: hidden;
        cursor: pointer;
        transition: all 0.15s ease;
        display: flex;
        align-items: center;
        justify-content: center;
      }
      .frame-thumb:hover {
        border-color: #fbbf24;
        transform: scale(1.05);
      }
      .frame-thumb img {
        width: 100%;
        height: 100%;
        object-fit: cover;
      }
      .frame-thumb-selected {
        border-color: #fbbf24;
        box-shadow: 0 0 0 2px rgba(251, 191, 36, 0.3);
      }
      /* Phase 2.4: Color swatch delete button */
      .color-swatch .color-delete-btn {
        position: absolute;
        top: -3px;
        left: -3px;
        width: 14px;
        height: 14px;
        border-radius: 50%;
        background: #ef4444;
        color: white;
        border: none;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        opacity: 0;
        transition: opacity 0.15s;
        font-size: 6px;
        z-index: 2;
      }
      .color-swatch:hover .color-delete-btn {
        opacity: 1;
      }

      /* ── Custom CropperJS Overrides ── */
      .cropper-view-box {
        outline: 2px solid var(--accent) !important;
        outline-color: var(--accent) !important;
      }
      .cropper-line {
        background-color: var(--accent) !important;
      }
      .cropper-point {
        background-color: var(--accent) !important;
        width: 8px !important;
        height: 8px !important;
      }
      .cropper-point.point-se {
        width: 12px !important;
        height: 12px !important;
        opacity: 0.9 !important;
      }
      .cropper-bg {
        background-image: repeating-linear-gradient(45deg, #222 25%, transparent 25%, transparent 75%, #222 75%, #222), repeating-linear-gradient(45deg, #222 25%, #111 25%, #111 75%, #222 75%, #222) !important;
        background-position: 0 0, 10px 10px !important;
        background-size: 20px 20px !important;
      }
      .cropper-face {
        background-color: transparent !important;
        opacity: 1 !important;
      }
      /* Faint face silhouette guides inside active crop box */
      .cropper-face::after {
        content: "";
        position: absolute;
        inset: 12% 20% 32% 20%;
        border: 1.5px dashed rgba(245, 158, 11, 0.45);
        border-radius: 50% 50% 45% 45%;
        pointer-events: none;
      }
      .cropper-face::before {
        content: "";
        position: absolute;
        bottom: 6%;
        left: 8%;
        right: 8%;
        height: 26%;
        border-top: 1.5px dashed rgba(245, 158, 11, 0.35);
        border-radius: 50% 50% 0 0;
        pointer-events: none;
      }

      /* ── Modern Centered Cropper Modal ── */
      #cropper-container {
        position: fixed !important;
        inset: 0 !important;
        width: 100vw !important;
        height: 100vh !important;
        height: 100dvh !important;
        z-index: 9999 !important;
        background: rgba(11, 15, 25, 0.8) !important;
        backdrop-filter: blur(16px) !important;
        -webkit-backdrop-filter: blur(16px) !important;
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 24px;
        transition: opacity 0.3s ease;
      }
      #cropper-container.hidden {
        display: none !important;
      }
      .cropper-modal-box {
        background: var(--bg-card);
        border: 1px solid var(--border-card);
        border-radius: 24px;
        backdrop-filter: blur(24px);
        -webkit-backdrop-filter: blur(24px);
        width: 100%;
        max-width: 900px;
        height: 100%;
        max-height: 85vh;
        display: flex;
        flex-direction: column;
        gap: 16px;
        padding: 24px;
        box-shadow: 0 30px 60px rgba(0, 0, 0, 0.45);
      }

      /* ── UX Improvement 1: Guided Empty State ── */
      .empty-drop-zone {
        border: 2px dashed var(--border-input);
        border-radius: 16px;
        padding: 40px 24px;
        cursor: pointer;
        transition: border-color 0.3s ease, background-color 0.3s ease, transform 0.2s ease;
        text-align: center;
      }
      .empty-drop-zone:hover {
        border-color: var(--accent);
        background-color: var(--accent-dim);
        transform: translateY(-2px);
      }
      .empty-drop-zone.drop-glow {
        border-color: var(--accent) !important;
        background-color: var(--accent-dim) !important;
        box-shadow: 0 0 24px var(--accent-dim);
      }
      @keyframes float-gentle {
        0%, 100% { transform: translateY(0); }
        50% { transform: translateY(-6px); }
      }
      .float-icon {
        animation: float-gentle 3s ease-in-out infinite;
      }
      .onboard-steps {
        display: flex;
        justify-content: center;
        gap: 32px;
        margin-top: 20px;
        flex-wrap: wrap;
        direction: rtl;
      }
      .onboard-step {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 6px;
        font-size: 11px;
        color: var(--text-muted);
      }
      .onboard-step-icon {
        width: 36px;
        height: 36px;
        border-radius: 10px;
        background: var(--accent-dim);
        display: flex;
        align-items: center;
        justify-content: center;
        color: var(--accent);
        font-size: 14px;
      }
      .onboard-step-arrow {
        color: var(--text-muted);
        opacity: 0.3;
        font-size: 12px;
        align-self: center;
        margin-top: -10px;
      }

      /* ── UX Improvement 4: Processing overlay on preview ── */
      .preview-processing-overlay {
        position: absolute;
        inset: 0;
        z-index: 15;
        display: none;
        align-items: center;
        justify-content: center;
        flex-direction: column;
        gap: 12px;
        background: rgba(0, 0, 0, 0.55);
        backdrop-filter: blur(4px);
        border-radius: 16px;
      }
      .preview-processing-overlay.active {
        display: flex;
      }


      /* ── UX Improvement 6: Queue status bottom-border ── */
      .queue-slide.status-done {
        border-bottom: 3px solid var(--success);
      }
      .queue-slide.status-processing {
        border-bottom: 3px solid var(--accent);
      }
      .queue-slide.status-error,
      .queue-slide.status-upload-failed {
        border-bottom: 3px solid var(--danger);
      }
      .queue-slide .slide-status {
        width: 20px;
        height: 20px;
        font-size: 10px;
      }

      /* ── (old mobile sticky bar replaced by universal sticky-action-bar) ── */
      @media (max-width: 1023px) {
        body {
          padding: 8px !important;
        }
        main {
          gap: 16px !important;
        }
        /* Mobile drawer queue slide layout transformation */
        .mobile-drawer .queue-slide {
          flex: 0 0 auto;
          width: 100% !important;
          display: flex;
          flex-direction: row-reverse;
          align-items: center;
          gap: 12px;
          padding: 8px 12px;
          background: rgba(255, 255, 255, 0.03);
          border: 1px solid rgba(255, 255, 255, 0.05);
          border-radius: 12px;
          position: relative;
          transform: none !important;
        }
        .mobile-drawer .queue-slide:hover {
          transform: none !important;
        }
        .mobile-drawer .queue-slide.active {
          background: rgba(245, 158, 11, 0.08);
          border-color: var(--accent);
          box-shadow: none;
        }
        .mobile-drawer .queue-slide img {
          width: 48px !important;
          height: 48px !important;
          border-radius: 8px;
          flex-shrink: 0;
        }
        .mobile-drawer .queue-slide .slide-name {
          flex-grow: 1;
          text-align: right;
          margin-top: 0;
          font-size: 13px;
          color: var(--text-primary);
          max-width: none !important;
          white-space: normal;
          word-break: break-all;
        }
        .mobile-drawer .queue-slide .slide-status {
          position: static !important;
          width: 24px;
          height: 24px;
          font-size: 12px;
          background: transparent !important;
          box-shadow: none !important;
          flex-shrink: 0;
        }
        .mobile-drawer .queue-slide .slide-delete {
          position: static !important;
          width: 28px;
          height: 28px;
          border-radius: 8px;
          background: rgba(239, 68, 68, 0.15) !important;
          color: #ef4444 !important;
          display: flex !important;
          align-items: center;
          justify-content: center;
          font-size: 12px;
          opacity: 1 !important;
          flex-shrink: 0;
        }
        .mobile-drawer .queue-slide .slide-delete:hover {
          background: #ef4444 !important;
          color: white !important;
        }
        .mobile-drawer .queue-slide .slide-retry {
          position: static !important;
          width: 28px;
          height: 28px;
          border-radius: 8px;
          background: rgba(245, 158, 11, 0.15) !important;
          color: var(--accent) !important;
          display: flex !important;
          align-items: center;
          justify-content: center;
          font-size: 12px;
          opacity: 1 !important;
          flex-shrink: 0;
        }
        .mobile-drawer .queue-slide .slide-countdown {
          position: static !important;
          transform: none !important;
          margin-left: auto;
          font-size: 10px;
        }
        /* Make delete buttons visible on hover-less mobile viewport */
        /* Make delete buttons visible on hover-less mobile viewport */
        .queue-slide .slide-delete {
          opacity: 1 !important;
        }

        /* ── Mobile Fullscreen Cropper ── */
        #cropper-container {
          padding: 8px !important;
        }
        .cropper-modal-box {
          max-width: 100% !important;
          max-height: 100% !important;
          height: 100% !important;
          border-radius: 0 !important;
          border: none !important;
          padding: 12px !important;
          gap: 8px !important;
        }
        /* Compact header on mobile */
        #cropper-container .cropper-header-row {
          padding-bottom: 8px !important;
          gap: 8px;
        }
        #cropper-container .cropper-header-row h3 {
          font-size: 14px !important;
        }
        #cropper-container .cropper-header-row p {
          display: none !important;
        }
        #cropper-container .cropper-header-row .badge {
          font-size: 10px !important;
          padding: 2px 6px !important;
        }
        /* Smaller toolbar buttons on mobile */
        #cropper-container .cropper-toolbar button {
          width: 34px !important;
          height: 34px !important;
          font-size: 13px !important;
        }
        #cropper-container .cropper-toolbar .cropper-reset-btn {
          width: auto !important;
          padding: 0 8px !important;
          font-size: 11px !important;
          height: 34px !important;
        }
        #cropper-container .cropper-toolbar {
          padding: 8px !important;
          gap: 6px !important;
        }
        #cropper-container .cropper-toolbar .flex.items-center {
          gap: 4px !important;
        }
        /* Compact action buttons on mobile */
        #cropper-container .cropper-actions {
          padding-top: 8px !important;
          gap: 8px !important;
        }
        #cropper-container .cropper-actions button {
          padding: 8px 14px !important;
          font-size: 13px !important;
        }
      }

      /* ── UX Improvement 2: Process button pulse ── */
      @keyframes pulse-ring {
        0% { box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.5); }
        70% { box-shadow: 0 0 0 8px rgba(245, 158, 11, 0); }
        100% { box-shadow: 0 0 0 0 rgba(245, 158, 11, 0); }
      }
      .pulse-attention:not(:disabled) {
        animation: pulse-ring 2s ease-out infinite;
      }

      /* ── T1: Bulk entry grid table ── */
      .bulk-table-wrap {
        width: 100%;
      }
      .bulk-table-head,
      .bulk-row {
        display: grid;
        grid-template-columns: 22px 34px 1fr 1fr 1fr 22px;
        gap: 6px;
        align-items: center;
      }
      .bulk-table-head {
        font-size: 9px;
        font-weight: 700;
        color: var(--text-muted);
        text-transform: uppercase;
        padding: 4px 6px;
        border-bottom: 1px solid var(--border-card);
        position: sticky;
        top: 0;
        background: var(--bg-card-alt);
        z-index: 2;
      }
      .bulk-table-body {
        max-height: 300px;
        overflow-y: auto;
        scrollbar-width: thin;
        padding: 2px 0;
      }
      .bulk-table-body::-webkit-scrollbar {
        width: 5px;
      }
      .bulk-table-body::-webkit-scrollbar-track {
        background: var(--scrollbar-track);
        border-radius: 10px;
      }
      .bulk-table-body::-webkit-scrollbar-thumb {
        background: var(--scrollbar-thumb);
        border-radius: 10px;
      }
      .bulk-table-body::-webkit-scrollbar-thumb:hover {
        background: var(--accent);
      }
      .bulk-row {
        padding: 4px 6px;
        border-bottom: 1px solid var(--border-card);
        border-radius: 6px;
        transition: background-color 0.15s ease;
      }
      .bulk-row:hover {
        background: var(--accent-dim);
      }
      .bulk-idx {
        font-size: 10px;
        color: var(--text-muted);
        text-align: center;
        font-weight: 700;
      }
      .bulk-thumb {
        display: flex;
        justify-content: center;
      }
      .bulk-filename {
        font-size: 10px;
        color: var(--text-secondary);
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        direction: ltr;
        text-align: right;
      }
      .bulk-input {
        font-size: 11px;
        padding: 3px 6px;
        border-radius: 5px;
        border: 1px solid var(--border-input);
        background: var(--bg-input);
        color: var(--text-primary);
        width: 100%;
        min-width: 0;
      }
      .bulk-input:focus {
        border-color: var(--accent);
        box-shadow: 0 0 0 2px var(--accent-dim);
        outline: none;
      }
      .bulk-status {
        display: flex;
        justify-content: center;
      }
      .bulk-dot {
        width: 8px;
        height: 8px;
        border-radius: 50%;
        display: inline-block;
      }
      /* RTL: status border on the start (right) edge */
      .bulk-row.status-done {
        border-right: 3px solid var(--success);
      }
      .bulk-row.status-processing {
        border-right: 3px solid var(--accent);
      }
      .bulk-row.status-error,
      .bulk-row.status-upload-failed {
        border-right: 3px solid var(--danger);
      }

      /* ── T4: Per-image step badges row in queue ── */
      .slide-badges {
        display: none !important;
      }
      .slide-badges .badge {
        font-size: 7px;
        padding: 1px 3px;
        border-radius: 2px;
        font-weight: 700;
        text-transform: none;
      }
      .slide-badges .badge-quality {
        font-size: 7px;
        padding: 1px 3px;
        border-radius: 2px;
      }
      .badge-restore {
        background: #06b6d4;
        color: #083344;
        display: inline-flex;
        align-items: center;
        gap: 2px;
      }
      .badge-restore i {
        font-size: 7px;
      }
      /* Hide step badges inside the mobile drawer row layout to avoid clutter */
      .mobile-drawer .slide-badges {
        display: none;
      }

      /* ── T13: invalid hex color input ── */
      .frame-color-hex-invalid {
        border-color: var(--danger) !important;
        box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.2);
      }

      /* ── T15: Tools dropdown ── */
      .tools-dropdown {
        position: relative;
        display: inline-block;
      }
      .tools-dropdown-btn {
        display: flex;
        align-items: center;
        gap: 6px;
        padding: 8px 14px;
        border-radius: 9999px;
        background: var(--bg-card);
        border: 1px solid var(--border-card);
        color: var(--text-secondary);
        font-size: 13px;
        font-weight: 700;
        cursor: pointer;
        transition: all 0.2s ease;
      }
      .tools-dropdown-btn:hover {
        background: var(--accent-dim);
        color: var(--accent);
        border-color: var(--accent);
      }
      .tools-dropdown-btn .fa-chevron-down {
        font-size: 9px;
        transition: transform 0.2s ease;
      }
      .tools-dropdown.open .tools-dropdown-btn .fa-chevron-down {
        transform: rotate(180deg);
      }
      .tools-menu {
        position: absolute;
        top: calc(100% + 8px);
        right: 0;
        min-width: 240px;
        background: var(--bg-card);
        border: 1px solid var(--border-card);
        border-radius: 14px;
        padding: 8px;
        z-index: 60;
        box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
        backdrop-filter: blur(16px);
        -webkit-backdrop-filter: blur(16px);
        display: none;
        flex-direction: column;
        gap: 4px;
      }
      .tools-dropdown.open .tools-menu {
        display: flex;
      }
      .tools-menu-item {
        display: flex;
        align-items: center;
        gap: 10px;
        padding: 10px 12px;
        border-radius: 10px;
        text-decoration: none;
        color: var(--text-secondary);
        transition: background-color 0.15s ease, color 0.15s ease;
      }
      .tools-menu-item:hover {
        background: var(--accent-dim);
        color: var(--accent);
      }
      .tools-menu-item-icon {
        width: 32px;
        height: 32px;
        border-radius: 8px;
        background: var(--bg-card-alt);
        display: flex;
        align-items: center;
        justify-content: center;
        color: var(--accent);
        flex-shrink: 0;
      }
      .tools-menu-item-text {
        display: flex;
        flex-direction: column;
        gap: 1px;
      }
      .tools-menu-item-title {
        font-size: 13px;
        font-weight: 700;
      }
      .tools-menu-item-sub {
        font-size: 10px;
        color: var(--text-muted);
        display: flex;
        align-items: center;
        gap: 4px;
      }

      /* ── T16: Collapsible options-card section toggle ── */
      .section-toggle-btn {
        width: 100%;
        display: flex;
        justify-content: space-between;
        align-items: center;
        gap: 8px;
        font-size: 11px;
        font-weight: 700;
        color: var(--text-muted);
        padding: 8px 10px;
        background: rgba(100, 116, 139, 0.06);
        border-radius: 10px;
        cursor: pointer;
        transition: color 0.2s ease, background-color 0.2s ease;
        text-align: right;
      }
      .section-toggle-btn:hover {
        color: var(--accent);
      }

      /* ── UX Overhaul: Inline Input Bar ── */
      .inline-input-bar {
        display: flex;
        align-items: center;
        gap: 10px;
        padding: 8px 12px;
        border-bottom: 1px solid var(--border-card);
        background: var(--bg-card-alt);
        flex-wrap: wrap;
      }
      .inline-field {
        background: var(--bg-input);
        border: 1px solid var(--border-input);
        color: var(--text-primary);
        border-radius: 8px;
        padding: 6px 10px;
        font-size: 13px;
        font-family: inherit;
        outline: none;
        transition: border-color 0.2s ease, box-shadow 0.2s ease;
      }
      .inline-field:focus {
        border-color: var(--accent);
        box-shadow: 0 0 0 2px var(--accent-dim);
      }
      .inline-field::placeholder {
        color: var(--text-muted);
        font-size: 11px;
      }

      /* ── UX Overhaul: Flat Options Panel ── */
      .options-panel {
        max-height: calc(100vh - 120px);
        overflow-y: auto;
        scrollbar-width: thin;
      }
      .options-section {
        padding-bottom: 8px;
        margin-bottom: 8px;
        border-bottom: 1px solid var(--border-card);
      }
      .options-section:last-of-type {
        border-bottom: none;
        margin-bottom: 4px;
        padding-bottom: 4px;
      }
      .options-section-label {
        display: flex;
        align-items: center;
        gap: 6px;
        font-size: 10px;
        font-weight: 700;
        color: var(--text-muted);
        text-transform: uppercase;
        letter-spacing: 0.08em;
        margin-bottom: 4px;
      }
      .option-row {
        display: flex;
        align-items: center;
        gap: 8px;
        cursor: pointer;
        padding: 5px 6px;
        border-radius: 8px;
        transition: background-color 0.15s ease;
      }
      .option-row:hover {
        background: rgba(100, 116, 139, 0.06);
      }
      .option-row-wrap {
        display: flex;
        flex-direction: column;
      }
      .cropper-point.point-se {
        width: 10px;
        height: 10px;
      }

      /* Custom Corner Rotation Handles */
      .cropper-rotate-point {
        position: absolute;
        width: 28px;
        height: 28px;
        background: var(--bg-card);
        border: 1px solid var(--border-card);
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 12px;
        color: var(--theme-secondary);
        cursor: pointer;
        z-index: 1000;
        box-shadow: 0 4px 12px rgba(0,0,0,0.4);
        transition: color 0.2s, background 0.2s, transform 0.2s;
      }
      .cropper-rotate-point:hover {
        color: var(--accent);
        background: var(--bg-input);
        transform: scale(1.1);
      }
      .cropper-rotate-point:active {
        transform: scale(0.95);
      }
      .cropper-rotate-ne { top: -35px; right: -35px; }
      .cropper-rotate-nw { top: -35px; left: -35px; }
      .cropper-rotate-se { bottom: -35px; right: -35px; }
      .cropper-rotate-sw { bottom: -35px; left: -35px; }
      .option-check {
        width: 15px;
        height: 15px;
        border-radius: 3px;
        flex-shrink: 0;
      }
      .option-text {
        font-size: 12px;
        font-weight: 500;
        color: var(--text-secondary);
        transition: color 0.15s ease;
      }
      .option-row:hover .option-text {
        color: var(--accent);
      }

      /* ── UX Overhaul: Desktop + Mobile Sticky Action Bar ── */
      .sticky-action-bar {
        position: fixed;
        bottom: 20px;
        left: 50%;
        transform: translateX(-50%);
        z-index: 70;
        background: var(--bg-card);
        border: 1px solid var(--border-card);
        border-radius: 20px;
        backdrop-filter: blur(24px);
        -webkit-backdrop-filter: blur(24px);
        padding: 0;
        display: none;
        box-shadow: 0 10px 40px rgba(0, 0, 0, 0.35),
                    0 0 30px rgba(255, 255, 255, 0.02);
        transition:
          background-color 0.4s cubic-bezier(0.16, 1, 0.3, 1),
          border-color 0.4s cubic-bezier(0.16, 1, 0.3, 1),
          box-shadow 0.4s cubic-bezier(0.16, 1, 0.3, 1),
          transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
        max-width: 95%;
        width: max-content;
      }
      .sticky-action-bar.has-images {
        display: block;
      }
      .sticky-action-bar:hover {
        transform: translateX(-50%) translateY(-4px);
        box-shadow: 0 20px 50px rgba(0, 0, 0, 0.45),
                    0 0 30px rgba(245, 158, 11, 0.05);
      }
      .sticky-bar-inner {
        padding: 8px 16px;
        display: flex;
        align-items: center;
        gap: 6px;
        flex-wrap: nowrap;
        overflow-x: auto;
      }
      .sticky-btn-primary {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 6px;
        padding: 10px 20px;
        border-radius: 10px;
        font-weight: 700;
        font-size: 13px;
        background: var(--accent);
        color: #1a1a1a;
        transition: all 0.2s ease;
        white-space: nowrap;
        flex-shrink: 0;
      }
      .sticky-btn-primary:not(:disabled):hover {
        transform: translateY(-1px);
        box-shadow: 0 4px 12px rgba(245, 158, 11, 0.4);
      }
      .sticky-btn-secondary {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 4px;
        padding: 8px 12px;
        border-radius: 8px;
        font-weight: 700;
        font-size: 11px;
        background: rgba(255, 255, 255, 0.05);
        border: 1px solid rgba(255, 255, 255, 0.1);
        color: var(--text-secondary);
        transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
        white-space: nowrap;
        flex-shrink: 0;
        backdrop-filter: blur(12px);
        -webkit-backdrop-filter: blur(12px);
      }
      [data-theme="light"] .sticky-btn-secondary {
        background: rgba(15, 23, 42, 0.04);
        border-color: rgba(15, 23, 42, 0.08);
        color: var(--text-secondary);
      }
      .sticky-btn-secondary:not(:disabled):hover {
        transform: translateY(-2px);
        background: var(--accent-dim);
        border-color: var(--accent);
        color: var(--accent);
      }
      .sticky-btn-blue {
        background: rgba(59, 130, 246, 0.15);
        border: 1px solid rgba(59, 130, 246, 0.25);
        color: #60a5fa;
      }
      .sticky-btn-blue:not(:disabled):hover {
        transform: translateY(-2px);
        background: rgba(59, 130, 246, 0.3);
        border-color: #3b82f6;
        color: #fff;
      }
      [data-theme="light"] .sticky-btn-blue {
        background: rgba(37, 99, 235, 0.08);
        border-color: rgba(37, 99, 235, 0.2);
        color: #2563eb;
      }
      [data-theme="light"] .sticky-btn-blue:not(:disabled):hover {
        background: #2563eb;
        color: #fff;
      }

      .sticky-btn-green {
        background: rgba(16, 185, 129, 0.15);
        border: 1px solid rgba(16, 185, 129, 0.25);
        color: #34d399;
      }
      .sticky-btn-green:not(:disabled):hover {
        transform: translateY(-2px);
        background: rgba(16, 185, 129, 0.3);
        border-color: #10b981;
        color: #fff;
      }
      [data-theme="light"] .sticky-btn-green {
        background: rgba(5, 150, 105, 0.08);
        border-color: rgba(5, 150, 105, 0.2);
        color: #059669;
      }
      [data-theme="light"] .sticky-btn-green:not(:disabled):hover {
        background: #059669;
        color: #fff;
      }

      .sticky-divider {
        width: 1px;
        height: 24px;
        background: var(--border-card);
        flex-shrink: 0;
        margin: 0 2px;
      }

      /* Adjust body padding for floating action bar */
      body {
        padding-bottom: 96px !important;
      }
      @media (max-width: 1023px) {
        .sticky-action-bar {
          bottom: 12px;
          border-radius: 16px;
          max-width: 98%;
        }
        .sticky-bar-inner {
          padding: 8px 12px;
          gap: 6px;
        }
        .sticky-btn-primary {
          flex: 1;
          padding: 10px 14px;
        }
        body {
          padding-bottom: 90px !important;
        }
      }

      /* ── Lightweight Static CSS Utilities (Replacing Tailwind JS Runtime) ── */

      /* BUG-11 FIX: animations that were used in HTML/JS but never defined */
      @keyframes pulse {
        0%, 100% { opacity: 1; }
        50% { opacity: 0.5; }
      }
      .animate-pulse { animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite; }
      .animate-spin { animation: spin 1s linear infinite; }
      @keyframes float-anim-kf {
        0%, 100% { transform: translateY(0); }
        50% { transform: translateY(-8px); }
      }
      .float-anim { animation: float-anim-kf 3s ease-in-out infinite; }

      /* Disabled state utilities */
      .disabled\:opacity-50:disabled { opacity: 0.5; }
      .disabled\:opacity-40:disabled { opacity: 0.4; }
      .disabled\:cursor-not-allowed:disabled { cursor: not-allowed; }

      /* Hover utilities */
      .hover\:bg-yellow-600:hover { background-color: #ca8a04; }
      .hover\:bg-slate-600:hover { background-color: #475569; }
      .hover\:scale-110:hover { transform: scale(1.1); }

      /* Missing color utilities */
      .text-orange-500 { color: #f97316; }
      .bg-emerald-500 { background-color: #10b981; }

      /* Arbitrary-value sizing/text used in templates */
      .w-\[72px\] { width: 72px; }
      .h-\[72px\] { height: 72px; }
      .text-\[6px\] { font-size: 6px; }
      .text-\[7px\] { font-size: 7px; }

      /* Arbitrary-value background/border with CSS variable references */
      .bg-\[\#3c0000\] { background-color: #3c0000; }
      .bg-black\/60 { background: rgba(0, 0, 0, 0.6); }
      .border-slate-600\/30 { border-color: rgba(71, 85, 105, 0.3); }
      .bg-slate-500\/5 { background-color: rgba(100, 116, 139, 0.05); }

      .hidden { display: none !important; }
      .flex { display: flex; }
      .inline-flex { display: inline-flex; }
      .block { display: block; }
      .inline-block { display: inline-block; }
      .inline { display: inline; }
      .grid { display: grid; }
      .grid-cols-1 { grid-template-columns: repeat(1, minmax(0, 1fr)); }
      .grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }

      .flex-col { flex-direction: column; }
      .flex-row { flex-direction: row; }
      .flex-wrap { flex-wrap: wrap; }
      .flex-1 { flex: 1 1 0%; }
      .flex-grow { flex-grow: 1; }
      .items-center { align-items: center; }
      .justify-between { justify-content: space-between; }
      .justify-center { justify-content: center; }
      .justify-end { justify-content: end; }

      .gap-1 { gap: 0.25rem; }
      .gap-1\.5 { gap: 0.375rem; }
      .gap-2 { gap: 0.5rem; }
      .gap-3 { gap: 0.75rem; }
      .gap-4 { gap: 1rem; }
      .gap-6 { gap: 1.5rem; }
      .space-y-3 > * + * { margin-top: 0.75rem; }

      .relative { position: relative; }
      .absolute { position: absolute; }
      .fixed { position: fixed; }
      .sticky { position: sticky; }
      .top-4 { top: 1rem; }
      .bottom-3 { bottom: 0.75rem; }
      .left-3 { left: 0.75rem; }
      .inset-0 { top: 0; right: 0; bottom: 0; left: 0; }
      .z-10 { z-index: 10; }
      .z-50 { z-index: 50; }

      .w-full { width: 100%; }
      .h-full { height: 100%; }
      .min-h-screen { min-height: 100vh; }
      .min-h-0 { min-height: 0; }
      .w-3 { width: 0.75rem; } .h-3 { height: 0.75rem; }
      .w-4 { width: 1rem; } .h-4 { height: 1rem; }
      .w-5 { width: 1.25rem; } .h-5 { height: 1.25rem; }
      .w-6 { width: 1.5rem; } .h-6 { height: 1.5rem; }
      .w-7 { width: 1.75rem; } .h-7 { height: 1.75rem; }
      .w-8 { width: 2rem; } .h-8 { height: 2rem; }
      .w-10 { width: 2.5rem; } .h-10 { height: 2.5rem; }
      .w-20 { width: 5rem; }
      .h-20 { height: 5rem; }
      .w-\[130px\] { width: 130px; }
      .min-w-0 { min-width: 0; }
      .min-w-\[32px\] { min-width: 32px; }
      .max-w-full { max-width: 100%; }
      .max-h-full { max-height: 100%; }
      .max-w-sm { max-width: 24rem; }
      .max-w-\[100px\] { max-width: 100px; }
      .max-w-\[1400px\] { max-width: 1400px; }
      .overflow-hidden { overflow: hidden; }
      .overflow-y-auto { overflow-y: auto; }

      .p-1 { padding: 0.25rem; }
      .p-1\.5 { padding: 0.375rem; }
      .p-2 { padding: 0.5rem; }
      .p-2\.5 { padding: 0.625rem; }
      .p-3 { padding: 0.75rem; }
      .p-4 { padding: 1rem; }
      .p-6 { padding: 1.5rem; }
      .px-1 { padding-left: 0.25rem; padding-right: 0.25rem; }
      .px-1\.5 { padding-left: 0.375rem; padding-right: 0.375rem; }
      .px-2 { padding-left: 0.5rem; padding-right: 0.5rem; }
      .px-2\.5 { padding-left: 0.625rem; padding-right: 0.625rem; }
      .px-3 { padding-left: 0.75rem; padding-right: 0.75rem; }
      .px-4 { padding-left: 1rem; padding-right: 1rem; }
      .px-5 { padding-left: 1.25rem; padding-right: 1.25rem; }
      .px-6 { padding-left: 1.5rem; padding-right: 1.5rem; }
      .py-0\.5 { padding-top: 0.125rem; padding-bottom: 0.125rem; }
      .py-1 { padding-top: 0.25rem; padding-bottom: 0.25rem; }
      .py-1\.5 { padding-top: 0.375rem; padding-bottom: 0.375rem; }
      .py-2 { padding-top: 0.5rem; padding-bottom: 0.5rem; }
      .py-2\.5 { padding-top: 0.625rem; padding-bottom: 0.625rem; }

      .m-1 { margin: 0.25rem; }
      .mx-1 { margin-left: 0.25rem; margin-right: 0.25rem; }
      .mx-4 { margin-left: 1rem; margin-right: 1rem; }
      .mx-auto { margin-left: auto; margin-right: auto; }
      .my-2 { margin-top: 0.5rem; margin-bottom: 0.5rem; }
      .mt-0\.5 { margin-top: 0.125rem; }
      .mt-1 { margin-top: 0.25rem; }
      .mt-1\.5 { margin-top: 0.375rem; }
      .mt-2 { margin-top: 0.5rem; }
      .mt-3 { margin-top: 0.75rem; }
      .mt-4 { margin-top: 1rem; }
      .mt-5 { margin-top: 1.25rem; }
      .mb-1 { margin-bottom: 0.25rem; }
      .mb-2 { margin-bottom: 0.5rem; }
      .mb-3 { margin-bottom: 0.75rem; }
      .mb-4 { margin-bottom: 1rem; }
      .ml-1 { margin-left: 0.25rem; }
      .pr-6 { padding-right: 1.5rem; }
      .pt-1\.5 { padding-top: 0.375rem; }
      .pt-2 { padding-top: 0.5rem; }
      .pt-3 { padding-top: 0.75rem; }
      .pb-3 { padding-bottom: 0.75rem; }

      .text-left { text-align: left; }
      .text-center { text-align: center; }
      .text-right { text-align: right; }
      .font-bold { font-weight: 700; }
      .font-semibold { font-weight: 600; }
      .font-medium { font-weight: 500; }
      .font-mono { font-family: monospace; }
      .uppercase { text-transform: uppercase; }
      .tracking-widest { letter-spacing: 0.1em; }
      .tracking-wider { letter-spacing: 0.05em; }
      .truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

      .text-3xl { font-size: 1.875rem; line-height: 2.25rem; }
      .text-2xl { font-size: 1.5rem; line-height: 2rem; }
      .text-xl { font-size: 1.25rem; line-height: 1.75rem; }
      .text-lg { font-size: 1.125rem; line-height: 1.75rem; }
      .text-md { font-size: 1rem; line-height: 1.5rem; }
      .text-sm { font-size: 0.875rem; line-height: 1.25rem; }
      .text-xs { font-size: 0.75rem; line-height: 1rem; }
      .text-\[11px\] { font-size: 11px; }
      .text-\[10px\] { font-size: 10px; }
      .text-\[9px\] { font-size: 9px; }
      .text-\[8px\] { font-size: 8px; }

      .rounded { border-radius: 0.25rem; }
      .rounded-lg { border-radius: 0.5rem; }
      .rounded-xl { border-radius: 0.75rem; }
      .rounded-2xl { border-radius: 1rem; }
      .rounded-full { border-radius: 9999px; }
      .border { border-width: 1px; border-style: solid; border-color: var(--border-card); }
      .border-0 { border-width: 0; }
      .border-t { border-top-width: 1px; border-top-style: solid; border-top-color: var(--border-card); }
      .border-b { border-bottom-width: 1px; border-bottom-style: solid; border-bottom-color: var(--border-card); }
      .w-px { width: 1px; }
      .h-px { height: 1px; }

      .bg-black { background-color: #000000; }
      .bg-slate-800 { background-color: #1e293b; }
      .bg-slate-700 { background-color: #334155; }
      .bg-slate-600 { background-color: #475569; }
      .bg-yellow-500 { background-color: #f59e0b; }
      .bg-yellow-400 { background-color: #fbbf24; }
      .bg-blue-600 { background-color: #2563eb; }
      .bg-blue-500 { background-color: #3b82f6; }
      .text-white { color: #ffffff; }
      .text-slate-900 { color: #0f172a; }
      .text-slate-600 { color: #475569; }
      .text-slate-400 { color: #94a3b8; }
      .text-slate-300 { color: #cbd5e1; }
      .text-yellow-500 { color: #f59e0b; }
      .text-yellow-400 { color: #fbbf24; }
      .text-cyan-500 { color: #06b6d4; }
      .text-blue-500 { color: #3b82f6; }
      .text-emerald-500 { color: #10b981; }
      .text-rose-500 { color: #f43f5e; }
      .text-rose-300 { color: #fca5a5; }

      .opacity-0 { opacity: 0; }
      .opacity-50 { opacity: 0.5; }
      .opacity-80 { opacity: 0.8; }
      .opacity-100 { opacity: 1; }
      .transition-all { transition-property: all; transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); transition-duration: 150ms; }
      .transition-transform { transition-property: transform; transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); transition-duration: 150ms; }
      .transition-colors { transition-property: color, background-color, border-color; transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); transition-duration: 150ms; }
      .shadow-2xl { box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3); }

      /* Responsive rules */
      @media (min-width: 640px) {
        .sm\:inline { display: inline !important; }
        .sm\:hidden { display: none !important; }
      }
      @media (min-width: 768px) {
        .md\:p-6 { padding: 1.5rem; }
        .md\:p-10 { padding: 2.5rem; }
        .md\:flex-row { flex-direction: row; }
        .md\:justify-end { justify-content: flex-end; }
        .md\:max-h-\[480px\] { max-height: 480px; }
        .md\:min-h-\[420px\] { min-height: 420px; }
      }
      @media (min-width: 1024px) {
        .lg\:p-8 { padding: 2rem; }
        .lg\:hidden { display: none !important; }
        .lg\:flex { display: flex !important; }
        .lg\:block { display: block !important; }
        .lg\:inline { display: inline !important; }
        .lg\:grid-cols-12 { grid-template-columns: repeat(12, minmax(0, 1fr)); }
        .lg\:col-span-3 { grid-column: span 3 / span 3; }
        .lg\:col-span-6 { grid-column: span 6 / span 6; }
        .lg\:gap-6 { gap: 1.5rem; }
      }
      @media (min-width: 1280px) {
        .xl\:inline { display: inline !important; }
      }