@import url('./ugfont.css');
@font-face {
  font-family: "RemixIcon";
  src: url("../vendor/remixicon/remixicon.woff2") format("woff2");
  font-display: swap;
}

:root {
  --ink: #171817;
  --muted: #70746f;
  --soft: #f1f2ef;
  --line: #e4e6e1;
  --paper: #ffffff;
  --stage: #e9ebe7;
  --accent: #c9ff3d;
  --accent-deep: #98cf13;
  --coral: #ff705f;
  --purple: #7357ff;
  --shadow: 0 18px 50px rgba(29, 31, 27, .12);
}

* { box-sizing: border-box;    font-family: 'ALKATIP Basma Tom';}

html, body { height: 100%; }

body {
  margin: 0;
  overflow: hidden;
  color: var(--ink);
  background: var(--soft);
  font-family: "Noto Sans Arabic", Tahoma, Arial, sans-serif;
  font-size: 14px;
  letter-spacing: 0;
}

button, input, select, textarea { font: inherit; letter-spacing: 0; }
button { color: inherit; }
button, label { -webkit-tap-highlight-color: transparent; }
button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--purple);
  outline-offset: 2px;
}

[v-cloak] { display: none; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; opacity: 0; pointer-events: none; }

.topbar {
  height: 68px;
  display: grid;
  grid-template-columns: 232px minmax(220px, 1fr) auto;
  align-items: center;
  gap: 20px;
  padding: 0 18px;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
  position: relative;
  z-index: 30;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  direction: ltr;
  color: var(--ink);
  text-decoration: none;
}

.brand-mark {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  background: var(--accent);
  border: 1px solid #9fcf24;
  border-radius: 8px;
  transform: rotate(-5deg);
  font-size: 20px;
}

.brand-name { font-family: Arial, sans-serif; font-size: 21px; font-weight: 800; }
.brand-name span { color: var(--purple); }

.document-title { display: flex; justify-content: center; align-items: center; gap: 12px; min-width: 0; }
.title-line { display: flex; align-items: center; justify-content: center; gap: 7px; white-space: nowrap; }
.title-line strong { max-width: 320px; overflow: hidden; text-overflow: ellipsis; font-size: 14px; }
.project-name { width: min(320px, 32vw); padding: 2px 4px; border: 1px solid transparent; border-radius: 4px; background: transparent; color: var(--ink); font-weight: 800; text-align: center; }
.project-name:hover, .project-name:focus { border-color: var(--line); background: #fafbf9; }
.title-line i { color: var(--muted); font-size: 13px; }
.document-title small { margin-top: 3px; display: flex; align-items: center; justify-content: center; gap: 6px; color: var(--muted); font-size: 11px; }
.status-dot { width: 6px; height: 6px; background: #3ec66f; border-radius: 50%; }

.top-actions, .history-actions { display: flex; align-items: center; gap: 8px; }
.history-actions { direction: ltr; margin-left: 4px; }

.icon-btn {
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  border: 1px solid transparent;
  background: transparent;
  border-radius: 7px;
  display: grid;
  place-items: center;
  cursor: pointer;
  font-size: 18px;
  transition: background .16s ease, border-color .16s ease, transform .16s ease;
}
.icon-btn:hover { background: var(--soft); border-color: var(--line); }
.icon-btn:active { transform: scale(.94); }
.icon-btn:disabled { opacity: .28; cursor: default; }

.btn {
  height: 38px;
  padding: 0 15px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--paper);
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-weight: 700;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn-dark { color: #fff; background: var(--ink); border-color: var(--ink); }
.btn-ghost:hover { background: var(--soft); }
.btn.full { width: 100%; margin-top: 12px; }
.mobile-menu { display: none; }

.avatar {
  width: 36px;
  height: 36px;
  border: 1px solid #df5f50;
  border-radius: 50%;
  background: var(--coral);
  color: #fff;
  cursor: pointer;
  font-weight: 800;
}

.workspace-shell {
  height: calc(100vh - 68px);
  display: flex;
  direction: rtl;
  overflow: hidden;
}

.tool-rail {
  width: 76px;
  flex: 0 0 76px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 10px 8px;
  border-left: 1px solid var(--line);
  background: var(--paper);
  overflow-y: auto;
  scrollbar-width: none;
  position: relative;
  z-index: 15;
}
.tool-rail::-webkit-scrollbar { display: none; }
.rail-spacer { flex: 1; }
.tool-button {
  width: 60px;
  min-height: 55px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: #565a55;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  cursor: pointer;
  font-size: 10px;
  white-space: nowrap;
}
.tool-button i { font-size: 20px; }
.tool-button:hover { color: var(--ink); background: var(--soft); }
.tool-button.active { color: var(--ink); background: var(--accent); font-weight: 800; }

.asset-panel {
  width: 286px;
  flex: 0 0 286px;
  background: var(--paper);
  border-left: 1px solid var(--line);
  overflow: hidden;
  transition: width .2s ease, flex-basis .2s ease;
}
.asset-panel.collapsed { width: 54px; flex-basis: 54px; }
.asset-panel.collapsed .panel-head { padding: 16px 9px; }
.asset-panel.collapsed .panel-head > div, .asset-panel.collapsed .panel-content { display: none; }
.panel-head {
  min-width: 286px;
  height: 75px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.panel-head h2, .modal-head h2 { margin: 2px 0 0; font-size: 18px; line-height: 1.3; }
.eyebrow { color: var(--muted); font-size: 10px; font-weight: 700; }
.panel-content { height: calc(100% - 75px); min-width: 286px; padding: 16px; overflow-y: auto; }
.panel-content h3 { margin: 0 0 12px; font-size: 13px; }

.dropzone {
  min-height: 188px;
  padding: 20px 12px;
  border: 1px dashed #b9bdb5;
  border-radius: 8px;
  background: #fafbf9;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  cursor: pointer;
  transition: .18s ease;
}
.dropzone:hover, .dropzone.dragover { background: #f6ffdF; border-color: var(--accent-deep); }
.dropzone input { display: none; }
.drop-icon { width: 48px; height: 48px; display: grid; place-items: center; background: var(--accent); border-radius: 50%; font-size: 22px; margin-bottom: 10px; }
.dropzone strong { font-size: 14px; }
.dropzone p { margin: 5px 0; color: var(--muted); font-size: 11px; }
.dropzone small { color: #a0a49f; font-size: 9px; direction: ltr; }

.section-row { display: flex; justify-content: space-between; align-items: center; margin: 23px 0 10px; }
.section-row h3 { margin: 0; }
.section-row span { color: var(--muted); font-size: 10px; }
.media-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; direction: rtl; }
.media-card {
  min-width: 0;
  padding: 0;
  border: 2px solid transparent;
  border-radius: 7px;
  background: var(--soft);
  overflow: hidden;
  cursor: pointer;
  position: relative;
  aspect-ratio: 1.2;
}
.media-card img { width: 100%; height: 100%; display: block; object-fit: cover; }
.media-card > span { position: absolute; right: 5px; left: 5px; bottom: 5px; padding: 4px 5px; background: rgba(20, 21, 19, .72); color: #fff; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; border-radius: 4px; font-size: 9px; }
.media-card.selected { border-color: var(--purple); }
.media-card.add-media { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; border: 1px dashed #bec2bb; color: var(--muted); }
.media-card.add-media i { font-size: 20px; }
.media-card.add-media span { position: static; color: inherit; background: transparent; }

.ratio-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 18px; }
.ratio-grid button { height: 76px; border: 1px solid var(--line); background: #fafbf9; border-radius: 7px; cursor: pointer; display: flex; flex-direction: column; gap: 6px; align-items: center; justify-content: center; font-size: 10px; }
.ratio-grid button span { width: 28px; max-height: 30px; border: 1.5px solid #7a7e78; }
.ratio-grid button.active { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }

textarea, select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--paper);
  padding: 10px;
  color: var(--ink);
}
textarea { resize: vertical; min-height: 84px; }
.inline-controls { display: grid; grid-template-columns: 1fr 42px 38px 38px; gap: 7px; margin-top: 10px; direction: rtl; }
.inline-controls select { padding: 4px 8px; }
.inline-controls input[type="color"], .format-btn { width: 100%; height: 38px; padding: 4px; border: 1px solid var(--line); border-radius: 7px; background: #fff; cursor: pointer; }
.text-edit-controls { grid-template-columns: 1fr 48px; }
.text-edit-controls input[type="number"] { width: 100%; height: 38px; padding: 0 8px; border: 1px solid var(--line); border-radius: 7px; direction: ltr; }
.control-label { display: block; margin-top: 12px; color: var(--muted); font-size: 10px; }
.control-label select { margin-top: 5px; color: var(--ink); }
.text-control-row { display: grid; grid-template-columns: 1fr 55px; gap: 9px; margin-top: 10px; align-items: end; }
.text-control-row label { color: var(--muted); font-size: 10px; }
.text-control-row input[type="number"] { width: 100%; height: 36px; margin-top: 4px; padding: 0 8px; border: 1px solid var(--line); border-radius: 7px; direction: ltr; }
.text-control-row input[type="color"] { width: 100%; height: 36px; margin-top: 4px; padding: 3px; border: 1px solid var(--line); border-radius: 7px; background: #fff; }
.format-toolbar { display: flex; align-items: center; gap: 5px; margin: 13px 0; direction: ltr; }
.format-toolbar button { width: 34px; height: 34px; border: 1px solid var(--line); border-radius: 6px; background: #fff; cursor: pointer; font-size: 17px; }
.format-toolbar button.active { border-color: var(--ink); background: var(--accent); }
.format-toolbar span { width: 1px; height: 22px; margin: 0 5px; background: var(--line); }
.text-slider { margin-top: 13px; font-size: 10px; }
.text-slider input { accent-color: var(--ink); }
.flip-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 15px; }
.flip-actions button { height: 36px; display: flex; justify-content: center; align-items: center; gap: 6px; border: 1px solid var(--line); border-radius: 6px; background: #fff; cursor: pointer; font-size: 10px; }
.flip-actions button:hover { background: var(--soft); }
.effect-block { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line); }
.size-fields { display: grid; grid-template-columns: 1fr 28px 1fr; align-items: end; gap: 6px; direction: rtl; }
.size-fields label { color: var(--muted); font-size: 10px; }
.size-fields input { width: 100%; height: 40px; margin-top: 5px; padding: 0 8px; border: 1px solid var(--line); border-radius: 7px; direction: ltr; }
.size-fields > span { height: 40px; display: grid; place-items: center; color: var(--muted); }
.check-row { margin-top: 14px; display: flex; align-items: center; gap: 7px; color: var(--muted); font-size: 11px; }
.check-row input { accent-color: var(--ink); }

.shape-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.shape-grid button { height: 58px; background: #fafbf9; border: 1px solid var(--line); border-radius: 7px; cursor: pointer; font-size: 24px; }
.shape-grid button:hover { border-color: var(--ink); }
.sticker-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.sticker-grid button { height: 52px; border: 1px solid var(--line); border-radius: 7px; background: #fafbf9; cursor: pointer; font-size: 25px; }
.sticker-grid button:hover { background: #f0f2ed; border-color: #b8bcb5; }
.swatches { display: flex; flex-wrap: wrap; gap: 9px; direction: ltr; }
.swatches button { width: 26px; height: 26px; border: 2px solid #fff; border-radius: 50%; cursor: pointer; box-shadow: 0 0 0 1px var(--line); }
.swatches button.active { box-shadow: 0 0 0 2px var(--ink); }
.brush-preview { height: 120px; display: grid; place-items: center; background: #f3f4f1; border-radius: 8px; margin-bottom: 18px; }
.brush-preview span { display: block; max-width: 60px; max-height: 60px; border-radius: 50%; }
.eraser-preview span { background: #fff; border: 2px solid var(--ink); box-shadow: inset 0 0 0 4px #e4e6e1; }
.background-sample { height: 130px; margin-bottom: 18px; position: relative; overflow: hidden; border-radius: 7px; background-color: #eee; background-image: linear-gradient(45deg,#ddd 25%,transparent 25%),linear-gradient(-45deg,#ddd 25%,transparent 25%),linear-gradient(45deg,transparent 75%,#ddd 75%),linear-gradient(-45deg,transparent 75%,#ddd 75%); background-size: 16px 16px; background-position: 0 0,0 8px,8px -8px,-8px 0; }
.background-sample img { width: 100%; height: 100%; object-fit: cover; }
.background-sample span { position: absolute; top: 8px; left: 8px; width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%; background: var(--accent); font-size: 18px; }
.slider-row { display: block; }
.slider-row span { display: flex; justify-content: space-between; }
.slider-row input { width: 100%; margin-top: 10px; }
.color-input { display: flex; justify-content: space-between; align-items: center; margin-top: 20px; }
.color-input input { width: 48px; height: 34px; padding: 3px; background: #fff; border: 1px solid var(--line); border-radius: 6px; }
.helper-note { padding: 10px; display: flex; align-items: flex-start; gap: 7px; background: #f7f7f5; color: var(--muted); border-radius: 6px; font-size: 11px; line-height: 1.7; }
.coming-tool { min-height: 300px; display: flex; flex-direction: column; align-items: center; justify-content: center; color: var(--muted); text-align: center; }
.coming-tool > i { font-size: 42px; color: var(--ink); }
.coming-tool h3 { margin: 12px 0 2px; color: var(--ink); }

.editor-stage { min-width: 360px; flex: 1; position: relative; display: flex; flex-direction: column; background: var(--stage); overflow: hidden; }
.stage-toolbar { height: 52px; flex: 0 0 52px; padding: 0 15px; display: flex; align-items: center; justify-content: space-between; direction: ltr; border-bottom: 1px solid #daddd7; background: rgba(255, 255, 255, .68); }
.canvas-size { display: flex; align-items: center; gap: 7px; color: var(--muted); font-size: 11px; direction: ltr; }
.quick-tools { display: flex; align-items: center; direction: ltr; }
.quick-tools .icon-btn { width: 34px; height: 34px; flex-basis: 34px; }
.divider { height: 20px; width: 1px; background: #cfd2cc; margin: 0 5px; }

.canvas-viewport {
  flex: 1;
  overflow: auto;
  display: grid;
  place-items: center;
  padding: 70px;
  direction: ltr;
  background-color: var(--stage);
  background-image: linear-gradient(45deg, rgba(255,255,255,.25) 25%, transparent 25%), linear-gradient(-45deg, rgba(255,255,255,.25) 25%, transparent 25%), linear-gradient(45deg, transparent 75%, rgba(255,255,255,.25) 75%), linear-gradient(-45deg, transparent 75%, rgba(255,255,255,.25) 75%);
  background-size: 24px 24px;
  background-position: 0 0, 0 12px, 12px -12px, -12px 0;
}
.canvas-wrap { width: 760px; height: 500px; flex: 0 0 auto; transform-origin: center; transition: width .12s ease, height .12s ease; }
.artboard { width: 760px; height: 500px; overflow: hidden; background: #fff; position: relative; box-shadow: var(--shadow), 0 0 0 1px rgba(31, 32, 29, .08); transform-origin: top left; user-select: none; }
.artboard.drawing { cursor: crosshair; }
.artboard.drawing { touch-action: none; }
.base-image { width: 100%; height: 100%; object-fit: cover; display: block; transform-origin: center; pointer-events: none; }
.draw-layer { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.artboard.drawing .draw-layer { pointer-events: auto; }

.design-layer { position: absolute; min-width: 60px; min-height: 44px; display: grid; place-items: center; cursor: move; direction: rtl; line-height: 1.25; }
.design-layer { touch-action: none; }
.design-layer.type-text { padding: 8px 12px; font-weight: 800; white-space: pre-wrap; text-align: center; }
.design-layer.type-text { overflow-wrap: anywhere; }
.design-layer.type-text textarea { width: 100%; min-width: 180px; min-height: 54px; padding: 5px; color: inherit; border: 1px dashed var(--purple); background: rgba(20, 20, 20, .55); font-weight: inherit; font-size: inherit; text-align: center; resize: both; }
.design-layer.type-shape { width: 90px; height: 90px; font-size: 72px; }
.design-layer.type-sticker { font-family: "Apple Color Emoji", "Segoe UI Emoji", sans-serif; text-align: center; }
.design-layer.selected { outline: 1.5px solid var(--purple); outline-offset: 3px; }
.resize-handle { position: absolute; width: 11px; height: 11px; left: -8px; bottom: -8px; background: #fff; border: 2px solid var(--purple); border-radius: 50%; }

.zoom-bar { position: absolute; bottom: 18px; left: 50%; transform: translateX(-50%); height: 44px; padding: 4px 7px; background: rgba(255,255,255,.96); border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 8px 26px rgba(28,30,27,.12); display: flex; align-items: center; gap: 3px; direction: ltr; z-index: 5; }
.zoom-bar .icon-btn { width: 32px; height: 32px; flex-basis: 32px; }
.zoom-bar input { width: 100px; accent-color: var(--ink); }
.zoom-value { width: 48px; border: 0; background: transparent; font-size: 11px; cursor: pointer; }

.properties-panel { width: 296px; flex: 0 0 296px; background: var(--paper); border-right: 1px solid var(--line); overflow: hidden; }
.property-tabs { height: 54px; padding: 8px 10px 0; display: grid; grid-template-columns: repeat(3, 1fr); border-bottom: 1px solid var(--line); gap: 4px; }
.property-tabs button { border: 0; border-bottom: 2px solid transparent; background: transparent; cursor: pointer; color: var(--muted); font-size: 12px; }
.property-tabs button.active { color: var(--ink); border-color: var(--ink); font-weight: 800; }
.properties-scroll { height: calc(100% - 54px); overflow-y: auto; padding: 18px; }
.property-heading { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.property-heading.compact { margin-top: 28px; margin-bottom: 12px; }
.property-heading h3 { margin: 0; font-size: 13px; }
.property-heading button { border: 0; background: transparent; color: var(--purple); cursor: pointer; font-size: 10px; }

.adjust-control { display: block; margin-bottom: 19px; }
.adjust-control > span { display: grid; grid-template-columns: 20px 1fr auto; align-items: center; gap: 5px; margin-bottom: 8px; font-size: 11px; }
.adjust-control > span i { color: var(--muted); }
.adjust-control > span b { color: var(--muted); font-size: 10px; font-weight: 500; direction: ltr; }
input[type="range"] { accent-color: var(--ink); }
.adjust-control input { width: 100%; height: 4px; display: block; margin: 0; }

.preset-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.preset-row button, .filter-grid button { min-width: 0; padding: 0; border: 1px solid transparent; background: transparent; cursor: pointer; font-size: 9px; }
.preset-row button span { height: 58px; display: block; border-radius: 6px; overflow: hidden; margin-bottom: 5px; }
.preset-row img, .filter-grid img { width: 100%; height: 100%; object-fit: cover; display: block; }

.filter-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 13px 9px; }
.filter-grid button span { height: 82px; display: block; overflow: hidden; border: 2px solid transparent; border-radius: 7px; margin-bottom: 5px; }
.filter-grid button.active span { border-color: var(--purple); }

.layers-list { display: flex; flex-direction: column; gap: 7px; }
.layer-item { min-height: 54px; padding: 6px; border: 1px solid transparent; border-radius: 7px; display: grid; grid-template-columns: 28px 42px 1fr 18px; align-items: center; gap: 7px; cursor: pointer; }
.layer-item:hover { background: #f7f8f5; }
.layer-item.active { background: #f1f0ff; border-color: #d9d3ff; }
.visibility { width: 28px; height: 28px; border: 0; background: transparent; cursor: pointer; color: var(--muted); }
.layer-thumb { width: 42px; height: 42px; display: grid; place-items: center; background: #e8eae5; border-radius: 5px; overflow: hidden; font-size: 18px; }
.layer-thumb img { width: 100%; height: 100%; object-fit: cover; }
.layer-item div { min-width: 0; }
.layer-item strong, .layer-item small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.layer-item strong { font-size: 11px; }
.layer-item small { margin-top: 3px; color: var(--muted); font-size: 9px; }
.drag-icon { color: #a2a6a0; }
.layer-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 16px; }
.layer-actions .btn { padding: 0 8px; font-size: 10px; }
.danger { color: #c7372f !important; }
.layer-inspector { margin-top: 16px; padding-top: 6px; border-top: 1px solid var(--line); }
.layer-inspector textarea { min-height: 66px; }
.inspector-row { display: grid; grid-template-columns: 1fr 54px; align-items: end; gap: 10px; margin-top: 10px; }
.inspector-row label { color: var(--muted); font-size: 10px; }
.inspector-row input[type="number"] { width: 100%; height: 34px; margin-top: 4px; padding: 0 7px; border: 1px solid var(--line); border-radius: 6px; direction: ltr; }
.inspector-row input[type="color"] { width: 100%; height: 34px; margin-top: 4px; padding: 3px; border: 1px solid var(--line); border-radius: 6px; background: #fff; }

.modal-backdrop { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 20px; background: rgba(15,16,14,.55); backdrop-filter: blur(3px); }
.export-modal { width: min(440px, 100%); padding: 22px; background: #fff; border-radius: 8px; box-shadow: 0 30px 90px rgba(0,0,0,.25); }
.projects-modal { width: min(620px, 100%); max-height: min(700px, 90vh); padding: 22px; overflow-y: auto; background: #fff; border-radius: 8px; box-shadow: 0 30px 90px rgba(0,0,0,.25); }
.modal-head { display: flex; justify-content: space-between; align-items: flex-start; }
.export-preview { height: 180px; margin: 18px 0; background: var(--stage); overflow: hidden; border-radius: 7px; }
.export-preview img { width: 100%; height: 100%; object-fit: cover; }
.export-options { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.export-options label { font-size: 11px; font-weight: 700; }
.export-options select { margin-top: 6px; }
.export-action { margin-top: 18px !important; }
.export-secondary { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 9px; }
.new-project { width: 100%; min-height: 70px; margin: 18px 0 12px; padding: 10px 14px; display: flex; align-items: center; gap: 12px; border: 1px dashed #b9bdb5; border-radius: 7px; background: #fafbf9; cursor: pointer; text-align: right; }
.new-project > i { color: var(--purple); font-size: 28px; }
.new-project span, .new-project strong, .new-project small { display: block; }
.new-project small { margin-top: 3px; color: var(--muted); font-size: 10px; }
.saved-projects { display: flex; flex-direction: column; gap: 7px; }
.saved-projects article { padding: 8px; display: grid; grid-template-columns: 74px 1fr 38px; gap: 12px; align-items: center; border: 1px solid var(--line); border-radius: 7px; }
.project-preview { width: 74px; height: 50px; padding: 0; display: grid; place-items: center; overflow: hidden; border: 0; border-radius: 5px; background: var(--stage); cursor: pointer; font-size: 20px; }
.project-preview img { width: 100%; height: 100%; object-fit: cover; }
.saved-projects article div { min-width: 0; }
.saved-projects strong, .saved-projects small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.saved-projects small { margin-top: 4px; color: var(--muted); font-size: 10px; }
.empty-projects { padding: 45px 20px; color: var(--muted); text-align: center; }
.empty-projects i { font-size: 36px; }

.toast { position: fixed; z-index: 130; left: 50%; bottom: 28px; transform: translateX(-50%); padding: 11px 16px; display: flex; align-items: center; gap: 8px; color: #fff; background: #191a18; border-radius: 7px; box-shadow: 0 10px 30px rgba(0,0,0,.2); font-size: 12px; }
.toast i { color: var(--accent); font-size: 16px; }
.modal-enter-active, .modal-leave-active, .toast-enter-active, .toast-leave-active { transition: .2s ease; }
.modal-enter-from, .modal-leave-to { opacity: 0; }
.modal-enter-from .export-modal, .modal-leave-to .export-modal { transform: translateY(12px) scale(.98); }
.toast-enter-from, .toast-leave-to { opacity: 0; transform: translate(-50%, 10px); }

@media (max-width: 1180px) {
  .properties-panel { width: 260px; flex-basis: 260px; }
  .asset-panel { width: 250px; flex-basis: 250px; }
  .panel-head, .panel-content { min-width: 250px; }
  .topbar { grid-template-columns: 190px minmax(160px, 1fr) auto; }
  .canvas-viewport { padding: 50px; }
}

@media (max-width: 920px) {
  .topbar { height: 60px; display: flex; direction: rtl; padding: 0 10px; gap: 8px; }
  .workspace-shell { height: calc(100vh - 60px); }
  .brand { display: none; }
  .mobile-menu { display: grid; }
  .document-title { flex: 1; min-width: 0; justify-content: flex-start; direction: rtl; }
  .document-title > div { min-width: 0; direction: rtl; }
  .title-line { justify-content: flex-start; }
  .document-title small { justify-content: flex-start; }
  .save-btn span, .top-actions .btn-dark span { display: none; }
  .projects-btn span { display: none; }
  .top-actions .btn { width: 38px; padding: 0; }
  .history-actions { display: none; }
  .top-actions { direction: rtl; }
  .tool-rail { position: fixed; right: 0; top: 60px; bottom: 0; transform: translateX(100%); box-shadow: -8px 0 30px rgba(0,0,0,.12); transition: transform .2s ease; }
  .tool-rail.open { transform: translateX(0); }
  .asset-panel { width: 244px; flex-basis: 244px; }
  .panel-head, .panel-content { min-width: 244px; }
  .properties-panel { display: none; }
  .editor-stage { min-width: 0; }
}

@media (max-width: 620px) {
  .avatar { display: none; }
  .save-btn { display: none; }
  .projects-btn { display: none; }
  .project-name { width: 150px; text-align: right; }
  .document-title strong { max-width: 135px; }
  .asset-panel { position: fixed; z-index: 12; top: 60px; right: 76px; bottom: 0; width: calc(100vw - 76px); transform: translateX(calc(100% + 76px)); transition: transform .2s ease; box-shadow: -10px 0 30px rgba(0,0,0,.12); }
  .asset-panel { flex: 0 0 0; }
  .tool-rail.open + .asset-panel { transform: translateX(0); }
  .asset-panel.collapsed { width: 0; flex-basis: 0; }
  .panel-head, .panel-content { min-width: calc(100vw - 76px); }
  .stage-toolbar { padding: 0 8px; }
  .quick-tools .icon-btn:nth-of-type(3), .quick-tools .icon-btn:nth-of-type(4), .quick-tools .divider { display: none; }
  .canvas-viewport { padding: 30px; }
  .zoom-bar { bottom: 12px; }
  .zoom-bar input { width: 70px; }
  .export-options { grid-template-columns: 1fr; }
}

@media (max-height: 690px) {
  .tool-button { min-height: 48px; }
  .dropzone { min-height: 150px; }
  .zoom-bar { bottom: 8px; }
}
