attr-extraction.css 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391
  1. :root {
  2. --text: #0b1220; /* primary text on white */
  3. --muted: #5b6b80; /* secondary text */
  4. --brand: #2563eb; /* blue */
  5. --brand-2: #14b8a6; /* teal */
  6. --accent: #7c3aed; /* violet */
  7. --danger: #ef4444; /* red */
  8. --success: #16a34a; /* green */
  9. --chip: #f5f7fb; /* chip bg */
  10. --border: #e5eaf2; /* light border */
  11. --shadow: 0 8px 24px rgba(17, 24, 39, .08);
  12. --radius: 14px;
  13. --card: #ffffff; /* card bg on white */
  14. --row-hover: #e6effd; /* subtle hover border tint */
  15. --zebra: #fafbfc;
  16. }
  17. * { box-sizing: border-box; }
  18. html, body { height: 100%; }
  19. body {
  20. margin: 0;
  21. font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, "Helvetica Neue", Arial, "Apple Color Emoji", "Segoe UI Emoji";
  22. color: var(--text);
  23. background: #ffffff; /* White background */
  24. letter-spacing: .2px;
  25. }
  26. .container { max-width: 1200px; margin: 24px auto 80px; padding: 0 20px; }
  27. header.hero { display: grid; grid-template-columns: 1fr auto; gap: 16px; align-items: center; margin-bottom: 20px; }
  28. .title { display: flex; align-items: center; gap: 14px; }
  29. .title-logo { width: 44px; height: 44px; border-radius: 12px; background: linear-gradient(135deg, var(--brand), var(--accent)); display: grid; place-items: center; box-shadow: var(--shadow); }
  30. .title-logo svg { filter: drop-shadow(0 2px 6px rgba(0,0,0,.15)); }
  31. h1 { font-size: 1.6rem; margin: 0; letter-spacing: .3px; }
  32. .sub { color: var(--muted); font-size: .95rem; margin-top: 4px; }
  33. .actions { display: flex; gap: 10px; flex-wrap: wrap; }
  34. button, .btn {
  35. appearance: none; border: 1px solid var(--border); cursor: pointer;
  36. padding: 10px 14px; border-radius: 10px; font-weight: 600;
  37. color: var(--text); background: #ffffff; transition: transform .06s ease, box-shadow .2s ease, border-color .2s ease;
  38. box-shadow: var(--shadow);
  39. }
  40. .btn:hover{
  41. color: black !important;
  42. }
  43. button:hover { transform: translateY(-1px); border-color: #cbd5e1; }
  44. .btn-secondary { background: #f7fafc; }
  45. .btn-ghost { background: transparent; color: var(--muted); border-style: dashed; }
  46. .btn-success { background: linear-gradient(135deg, #eef2ff, #e6fffa); color: var(--text); }
  47. /* Single-column layout */
  48. .grid { display: grid; grid-template-columns: 1fr; gap: 18px; }
  49. .card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
  50. .card h2 { margin: 0; font-size: 1.1rem; }
  51. .card-header { padding: 14px 16px; border-bottom: 1px solid var(--border); display:flex; align-items:center; justify-content:space-between; gap:10px; }
  52. .card-body { padding: 14px 16px; }
  53. .toolbar { display:flex; align-items:center; gap:10px; flex-wrap: wrap; }
  54. .pill { display: inline-flex; align-items: center; gap: 8px; padding: 6px 10px; border-radius: 999px; background: var(--chip); color: #2e3a49; border: 1px solid var(--border); font-size: .85rem; }
  55. /* Segmented Toggle */
  56. .seg { display:inline-flex; border:1px solid var(--border); border-radius: 999px; overflow:hidden; background: #fff; box-shadow: var(--shadow); }
  57. .seg button { border:none; background:#fff; padding:8px 12px; font-weight:700; color:#334155; cursor:pointer; }
  58. .seg button + button { border-left:1px solid var(--border); }
  59. .seg button.active { background: #eff6ff; color:#1e3a8a; }
  60. /* Cards layout */
  61. .list { display: grid; gap: 12px; }
  62. .product { display: grid; grid-template-columns: 64px 1fr auto; gap: 12px; align-items: start; padding: 10px; border-radius: 12px; background: #ffffff; border: 1px solid var(--border); cursor: pointer; }
  63. .product:hover { border-color: var(--row-hover); }
  64. .product.selected { outline: 2px solid var(--accent); box-shadow: 0 0 0 3px rgba(20,184,166,.15); }
  65. .thumb { width: 64px; height: 64px; border-radius: 10px; overflow: hidden; position: relative; background: #f3f4f6; border:1px solid var(--border); }
  66. .thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
  67. .thumb .fallback { position:absolute; inset:0; display:grid; place-items:center; color:#64748b; font-weight:700; font-size: .8rem; background: #f8fafc; }
  68. .meta { display: grid; gap: 4px; }
  69. .meta .name { font-weight: 700; }
  70. .meta .desc { color: var(--muted); font-size: .92rem; }
  71. .badges { display:flex; gap:6px; flex-wrap: wrap; }
  72. .select { display:flex; align-items:center; gap:8px; }
  73. input[type="checkbox"] { width: 18px; height: 18px; }
  74. .divider { height:1px; background: var(--border); margin: 14px 0; }
  75. /* Inline attributes in cards */
  76. .attr-inline { grid-column: 1 / -1; margin-top: 10px; border-top: 1px dashed var(--border); padding-top: 10px; }
  77. .attr-inline .section-title { display:flex; align-items:center; gap:10px; margin: 6px 0 8px; color: var(--muted); }
  78. .chips { display:flex; flex-wrap:wrap; gap:8px; }
  79. .chip { background: var(--chip); border: 1px solid var(--border); border-radius: 999px; padding: 6px 9px; font-size: .86rem; display: inline-flex; gap: 8px; align-items: center; color: #1f2937; }
  80. .chip .k { color:#475569; }
  81. .chip .v { color:#111827; font-weight:600; }
  82. .chip.new { outline: 2px solid var(--accent); box-shadow: 0 0 0 3px rgba(20,184,166,.15); }
  83. .chip.new::after { content: 'NEW'; margin-left: 6px; font-size: .68rem; background: var(--accent); color: #07221f; padding: 3px 6px; border-radius: 999px; font-weight: 900; letter-spacing:.4px; }
  84. /* Table layout */
  85. .table-wrap { border: 1px solid var(--border); border-radius: 12px; overflow: hidden; box-shadow: var(--shadow); }
  86. table { width: 100%; border-collapse: collapse; background:#fff; }
  87. thead { background:#f8fafc; border-bottom:1px solid var(--border); }
  88. th, td { padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--border); font-size: .93rem; vertical-align: top; }
  89. tbody tr:nth-child(odd) { background: var(--zebra); }
  90. tbody tr:hover { background: #f0f7ff; }
  91. td.select-cell { width: 60px; }
  92. td.thumb-cell { width: 60px; }
  93. .mini-thumb { width: 40px; height: 40px; border-radius: 8px; overflow: hidden; border:1px solid var(--border); background:#f3f4f6; display:grid; place-items:center; }
  94. .mini-thumb img { width: 100%; height: 100%; object-fit: cover; }
  95. .mini-thumb .fallback { color:#64748b; font-weight:700; font-size:.8rem; }
  96. .badge { display:inline-block; padding: 4px 8px; border-radius:999px; background:#eef2ff; color:#1e3a8a; font-size:.8rem; border:1px solid #e5e7eb; }
  97. /* Detail rows for table */
  98. .detail-row td { background:#ffffff; }
  99. .detail-content { padding: 10px 6px; border-left: 4px solid var(--accent); border-radius: 8px; background:#f8fafc; }
  100. .detail-content .section-title { display:flex; align-items:center; gap:10px; margin: 6px 0 8px; color: var(--muted); }
  101. .summary {
  102. display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 10px;
  103. }
  104. .summary .stat { border:1px solid var(--border); padding: 12px; border-radius: 12px; text-align:center; }
  105. .stat .label { color: var(--muted); font-size:.85rem; }
  106. .stat .value { font-size: 1.25rem; font-weight: 800; }
  107. .empty { color: var(--muted); padding: 6px 0; }
  108. /* Upload: dropzone + status */
  109. .dropzone { border: 2px dashed var(--border); padding: 18px; text-align:center; background:#fafbfc; color:#475569; }
  110. .dropzone.drag { background:#eef6ff; border-color:#93c5fd; }
  111. .file-info { color: var(--muted); font-size:.9rem; }
  112. /* Optional success/error coloring */
  113. #uploadStatus.success { color: #16a34a; }
  114. #uploadStatus.error { color: #ef4444; }
  115. /* Pagination bar */
  116. .pagination-bar {
  117. margin-top: 12px;
  118. padding-top: 10px;
  119. border-top: 1px solid var(--border);
  120. display: flex;
  121. flex-wrap: wrap;
  122. gap: 10px;
  123. align-items: center;
  124. justify-content: space-between;
  125. }
  126. .page-size {
  127. display: inline-flex;
  128. gap: 8px;
  129. align-items: center;
  130. color: var(--muted);
  131. font-size: .92rem;
  132. }
  133. .page-size select {
  134. border: 1px solid var(--border);
  135. background: #fff;
  136. padding: 6px 10px;
  137. border-radius: 8px;
  138. font-weight: 600;
  139. }
  140. .pager {
  141. display: inline-flex;
  142. gap: 8px;
  143. align-items: center;
  144. }
  145. .pager-btn {
  146. border: 1px solid var(--border);
  147. background: #fff;
  148. padding: 6px 10px;
  149. border-radius: 8px;
  150. cursor: pointer;
  151. box-shadow: var(--shadow);
  152. font-weight: 600;
  153. color: var(--text);
  154. }
  155. .pager-btn[disabled] {
  156. opacity: .5;
  157. cursor: not-allowed;
  158. }
  159. .page-info {
  160. color: var(--muted);
  161. font-weight: 600;
  162. }
  163. /* loader */
  164. #full-page-loader {
  165. position: fixed;
  166. top: 0;
  167. left: 0;
  168. width: 100%;
  169. height: 100%;
  170. background-color: rgba(0, 0, 0, 0.6); /* semi-transparent black */
  171. z-index: 9999;
  172. display: flex;
  173. justify-content: center;
  174. align-items: center;
  175. }
  176. .loader-overlay .spinner-border {
  177. width: 3rem;
  178. height: 3rem;
  179. }
  180. .select-attr {
  181. margin-left: 10px;
  182. font-size: 0.9em;
  183. color: #666;
  184. }
  185. /*
  186. /* Container for the attribute selection */
  187. .attribute-selectors {
  188. padding: 10px 0;
  189. border-top: 1px dashed #ddd;
  190. margin-top: 10px;
  191. transition: opacity 0.3s ease;
  192. display: flex;
  193. text-align: center;
  194. width: -webkit-fill-available;
  195. flex-direction: row;
  196. flex-wrap: nowrap;
  197. align-content: space-around;
  198. justify-content: space-around;
  199. align-items: baseline;
  200. }
  201. .attribute-selectors.disabled {
  202. opacity: 0.5;
  203. pointer-events: none; /* Disable interaction */
  204. }
  205. /* Header for the attribute group */
  206. .attribute-header {
  207. font-weight: bold;
  208. margin: 10px 0 5px 0;
  209. font-size: 0.9em;
  210. color: #333;
  211. }
  212. /* Container for the individual chips */
  213. .chips-container {
  214. display: flex;
  215. flex-wrap: wrap;
  216. gap: 6px; /* Space between chips */
  217. margin-bottom: 10px;
  218. justify-content: center;
  219. }
  220. /* The label/chip itself */
  221. .attribute-chip {
  222. display: inline-flex;
  223. align-items: center;
  224. padding: 4px 10px;
  225. border: 1px solid #ccc;
  226. border-radius: 20px;
  227. cursor: pointer;
  228. background-color: #f8f8f8;
  229. transition: all 0.2s ease;
  230. font-size: 0.85em;
  231. color: #555;
  232. user-select: none; /* Prevent text selection */
  233. }
  234. /* Hide the native checkbox */
  235. .attribute-chip input[type="checkbox"] {
  236. display: none;
  237. }
  238. /* Style when the chip is checked (selected) */
  239. .attribute-chip input[type="checkbox"]:checked + span {
  240. background-color: #007bff; /* Primary color */
  241. color: white;
  242. border-color: #007bff;
  243. padding: 4px 10px; /* Ensure padding remains after hiding checkbox */
  244. border-radius: 20px;
  245. }
  246. /* Style the visible span part */
  247. .attribute-chip span {
  248. display: block;
  249. line-height: 1;
  250. }
  251. /* Hover effect */
  252. .attribute-chip:hover {
  253. background-color: #eee;
  254. }
  255. /* Style for when the checkbox is checked, applied to the parent label/chip */
  256. .attribute-chip input[type="checkbox"]:checked + span {
  257. background-color: #007bff;
  258. color: white;
  259. font-weight: 500;
  260. } */
  261. /* Container for all attribute groups, adding padding at the bottom for separation */
  262. .attribute-selectors {
  263. padding: 10px 0 20px 0; /* More padding at bottom */
  264. border-top: 1px dashed #ddd;
  265. margin-top: 10px;
  266. }
  267. /* Style for the individual attribute group block */
  268. .attribute-chip-group {
  269. margin-bottom: 15px; /* Add space between groups */
  270. padding: 8px 0;
  271. border-bottom: 1px dotted #eee; /* Light divider between groups */
  272. }
  273. /* Style for the attribute name header */
  274. .attribute-header {
  275. font-weight: 600; /* Slightly bolder */
  276. margin: 0 0 5px 0;
  277. font-size: 0.95em;
  278. color: #333;
  279. /* Optional: Use a slightly different color or background for better distinction */
  280. /* background-color: #f7f7f7; */
  281. /* padding: 3px 0; */
  282. }
  283. /* Container for the individual chips - ensure consistent wrapping */
  284. .chips-container {
  285. display: flex;
  286. flex-wrap: wrap;
  287. gap: 8px; /* Slightly more space between chips */
  288. }
  289. /* The visual chip style for better clarity */
  290. .attribute-chip {
  291. padding: 6px 12px; /* Increased padding */
  292. border: 1px solid #c9c9c9;
  293. border-radius: 4px; /* Slightly squarer, more modern look */
  294. background-color: #fcfcfc;
  295. font-size: 0.8em;
  296. color: #444;
  297. }
  298. /* Style when selected */
  299. .attribute-chip input[type="checkbox"]:checked + span {
  300. background-color: #28a745; /* Using a distinct "selected" color (e.g., green) */
  301. color: white;
  302. border-color: #28a745;
  303. }
  304. /* Hover effect */
  305. .attribute-chip:hover {
  306. background-color: #efefef;
  307. border-color: #aaa;
  308. }
  309. /* Add separation and a strong visual break before the Optional section starts */
  310. .attribute-chip-group.first-optional-group {
  311. /* Push it down from the last mandatory group */
  312. margin-top: 15px;
  313. /* Stronger visual separator than the dotted line used for groups */
  314. border-top: 2px solid #ddd;
  315. padding-top: 15px; /* Add space between the border and the header */
  316. }
  317. /* Refined Spacing for the main attribute container */
  318. .attribute-selectors {
  319. /* Increase padding to ensure groups don't touch the top/bottom border */
  320. padding: 15px 0 20px 0;
  321. border-top: 1px dashed #ccc;
  322. margin-top: 10px;
  323. }
  324. /* Ensure good spacing between individual attribute groups */
  325. .attribute-chip-group {
  326. margin-bottom: 12px;
  327. /* Remove the dotted bottom border if you use the new separator above */
  328. border-bottom: none;
  329. }
  330. .pSelectRight {
  331. padding-left: 50px !important;
  332. /* text-align: center; */
  333. /* width: 195px; */
  334. }