index.styl 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680
  1. .admin-products
  2. padding: 20px
  3. background: #f8f9fa
  4. min-height: 100vh
  5. &__header
  6. display: flex
  7. justify-content: space-between
  8. align-items: center
  9. margin-bottom: 24px
  10. padding: 24px
  11. background: white
  12. border-radius: 8px
  13. box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1)
  14. &__title
  15. font-size: 24px
  16. font-weight: 600
  17. color: #1f2937
  18. margin: 0
  19. &__actions
  20. display: flex
  21. gap: 12px
  22. &__button
  23. padding: 10px 16px
  24. border: none
  25. border-radius: 6px
  26. font-size: 14px
  27. font-weight: 500
  28. cursor: pointer
  29. transition: all 0.2s ease
  30. text-decoration: none
  31. display: inline-flex
  32. align-items: center
  33. gap: 8px
  34. &--primary
  35. background: #3b82f6
  36. color: white
  37. &:hover
  38. background: #2563eb
  39. &--secondary
  40. background: #6b7280
  41. color: white
  42. &:hover
  43. background: #4b5563
  44. &--success
  45. background: #10b981
  46. color: white
  47. &:hover
  48. background: #059669
  49. &--warning
  50. background: #f59e0b
  51. color: white
  52. &:hover
  53. background: #d97706
  54. &--danger
  55. background: #ef4444
  56. color: white
  57. &:hover
  58. background: #dc2626
  59. &:disabled
  60. opacity: 0.6
  61. cursor: not-allowed
  62. &__filters
  63. display: flex
  64. gap: 16px
  65. margin-bottom: 24px
  66. padding: 20px
  67. background: white
  68. border-radius: 8px
  69. box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1)
  70. &__search
  71. flex: 1
  72. &-input
  73. width: 100%
  74. padding: 10px 12px
  75. border: 1px solid #d1d5db
  76. border-radius: 6px
  77. font-size: 14px
  78. transition: border-color 0.2s ease
  79. &:focus
  80. outline: none
  81. border-color: #3b82f6
  82. box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1)
  83. &__filter-group
  84. display: flex
  85. gap: 12px
  86. &__select
  87. padding: 10px 12px
  88. border: 1px solid #d1d5db
  89. border-radius: 6px
  90. font-size: 14px
  91. background: white
  92. cursor: pointer
  93. transition: border-color 0.2s ease
  94. &:focus
  95. outline: none
  96. border-color: #3b82f6
  97. box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1)
  98. &__content
  99. background: white
  100. border-radius: 8px
  101. box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1)
  102. overflow: hidden
  103. &__table-container
  104. overflow-x: auto
  105. &__table
  106. width: 100%
  107. border-collapse: collapse
  108. &__th
  109. padding: 16px
  110. text-align: left
  111. font-weight: 600
  112. color: #374151
  113. border-bottom: 1px solid #e5e7eb
  114. background: #f9fafb
  115. &--checkbox
  116. width: 40px
  117. &__tr
  118. border-bottom: 1px solid #e5e7eb
  119. transition: background-color 0.2s ease
  120. &:hover
  121. background: #f9fafb
  122. &--inactive
  123. opacity: 0.6
  124. &__td
  125. padding: 16px
  126. border-bottom: 1px solid #e5e7eb
  127. &--checkbox
  128. width: 40px
  129. &--sku
  130. font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace
  131. font-size: 12px
  132. color: #6b7280
  133. &--name
  134. font-weight: 500
  135. color: #1f2937
  136. &--price
  137. text-align: right
  138. &--actions
  139. display: flex
  140. gap: 8px
  141. &__checkbox
  142. width: 16px
  143. height: 16px
  144. cursor: pointer
  145. &__old-price
  146. text-decoration: line-through
  147. color: #6b7280
  148. font-size: 12px
  149. margin-right: 8px
  150. &__current-price
  151. font-weight: 600
  152. color: #1f2937
  153. &__status
  154. padding: 4px 8px
  155. border-radius: 12px
  156. font-size: 12px
  157. font-weight: 500
  158. &--active
  159. background: #d1fae5
  160. color: #065f46
  161. &--inactive
  162. background: #fee2e2
  163. color: #991b1b
  164. &__action-button
  165. padding: 6px 12px
  166. border: none
  167. border-radius: 4px
  168. font-size: 12px
  169. font-weight: 500
  170. cursor: pointer
  171. transition: all 0.2s ease
  172. &--edit
  173. background: #dbeafe
  174. color: #1e40af
  175. &:hover
  176. background: #bfdbfe
  177. &--activate
  178. background: #d1fae5
  179. color: #065f46
  180. &:hover
  181. background: #a7f3d0
  182. &--deactivate
  183. background: #fef3c7
  184. color: #92400e
  185. &:hover
  186. background: #fde68a
  187. &__empty
  188. padding: 60px 20px
  189. text-align: center
  190. &-text
  191. color: #6b7280
  192. font-size: 16px
  193. margin: 0
  194. &__modal
  195. position: fixed
  196. top: 0
  197. left: 0
  198. right: 0
  199. bottom: 0
  200. background: rgba(0, 0, 0, 0.5)
  201. display: flex
  202. align-items: center
  203. justify-content: center
  204. z-index: 1000
  205. &__modal-content
  206. background: white
  207. border-radius: 8px
  208. width: 90%
  209. max-width: 600px
  210. max-height: 90vh
  211. overflow-y: auto
  212. &__modal-header
  213. display: flex
  214. justify-content: space-between
  215. align-items: center
  216. padding: 24px
  217. border-bottom: 1px solid #e5e7eb
  218. &__modal-title
  219. font-size: 20px
  220. font-weight: 600
  221. color: #1f2937
  222. margin: 0
  223. &__modal-close
  224. background: none
  225. border: none
  226. font-size: 24px
  227. cursor: pointer
  228. color: #6b7280
  229. padding: 0
  230. width: 30px
  231. height: 30px
  232. display: flex
  233. align-items: center
  234. justify-content: center
  235. &:hover
  236. color: #374151
  237. &__modal-body
  238. padding: 24px
  239. &__modal-footer
  240. display: flex
  241. justify-content: flex-end
  242. gap: 12px
  243. padding: 24px
  244. border-top: 1px solid #e5e7eb
  245. &__import-progress
  246. text-align: center
  247. &__progress-bar
  248. width: 100%
  249. height: 8px
  250. background: #e5e7eb
  251. border-radius: 4px
  252. overflow: hidden
  253. margin-bottom: 12px
  254. &__progress-fill
  255. height: 100%
  256. background: #3b82f6
  257. transition: width 0.3s ease
  258. &__progress-text
  259. color: #6b7280
  260. font-size: 14px
  261. margin: 0
  262. &__import-form
  263. text-align: center
  264. &__file-input
  265. width: 100%
  266. padding: 12px
  267. border: 2px dashed #d1d5db
  268. border-radius: 6px
  269. margin-bottom: 12px
  270. &:focus
  271. outline: none
  272. border-color: #3b82f6
  273. &__help-text
  274. color: #6b7280
  275. font-size: 14px
  276. margin: 0
  277. &__import-results
  278. margin-top: 20px
  279. &__result
  280. padding: 16px
  281. border-radius: 6px
  282. &--success
  283. background: #d1fae5
  284. border: 1px solid #a7f3d0
  285. &--error
  286. background: #fee2e2
  287. border: 1px solid #fecaca
  288. h3
  289. margin: 0 0 8px 0
  290. font-size: 16px
  291. font-weight: 600
  292. p
  293. margin: 0 0 8px 0
  294. font-size: 14px
  295. ul
  296. margin: 8px 0 0 0
  297. padding-left: 20px
  298. li
  299. font-size: 12px
  300. color: #6b7280
  301. &__mass-actions
  302. display: grid
  303. grid-template-columns: 1fr 1fr
  304. gap: 12px
  305. // Адаптивные стили
  306. @media (max-width: 768px)
  307. .admin-products
  308. padding: 12px
  309. &__header
  310. flex-direction: column
  311. gap: 16px
  312. align-items: stretch
  313. &__actions
  314. flex-wrap: wrap
  315. justify-content: center
  316. &__filters
  317. flex-direction: column
  318. &__filter-group
  319. flex-direction: column
  320. &__td--actions
  321. flex-direction: column
  322. &__mass-actions
  323. grid-template-columns: 1fr
  324. &__modal-content
  325. width: 95%
  326. margin: 20px
  327. &__modal-footer
  328. flex-direction: column
  329. // ... предыдущие стилы остаются без изменений ...
  330. // Стили для формы редактирования
  331. .admin-products
  332. &__modal-content--large
  333. max-width: 800px
  334. &__form
  335. display: flex
  336. flex-direction: column
  337. gap: 16px
  338. &__form-row
  339. display: grid
  340. grid-template-columns: 1fr 1fr
  341. gap: 16px
  342. @media (max-width: 768px)
  343. grid-template-columns: 1fr
  344. &__form-group
  345. display: flex
  346. flex-direction: column
  347. gap: 8px
  348. &__label
  349. font-weight: 500
  350. color: #374151
  351. font-size: 14px
  352. &--checkbox
  353. display: flex
  354. align-items: center
  355. gap: 8px
  356. cursor: pointer
  357. &__input
  358. padding: 10px 12px
  359. border: 1px solid #d1d5db
  360. border-radius: 6px
  361. font-size: 14px
  362. transition: border-color 0.2s ease
  363. &:focus
  364. outline: none
  365. border-color: #3b82f6
  366. box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1)
  367. &__textarea
  368. padding: 10px 12px
  369. border: 1px solid #d1d5db
  370. border-radius: 6px
  371. font-size: 14px
  372. resize: vertical
  373. min-height: 80px
  374. transition: border-color 0.2s ease
  375. &:focus
  376. outline: none
  377. border-color: #3b82f6
  378. box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1)
  379. // Стили для загрузки изображений
  380. &__image-upload
  381. display: flex
  382. flex-direction: column
  383. gap: 12px
  384. &__image-preview
  385. display: flex
  386. align-items: center
  387. gap: 12px
  388. padding: 12px
  389. border: 1px solid #e5e7eb
  390. border-radius: 6px
  391. background: #f9fafb
  392. &__preview-img
  393. width: 60px
  394. height: 60px
  395. object-fit: cover
  396. border-radius: 4px
  397. &__image-info
  398. color: #6b7280
  399. font-size: 14px
  400. &__upload-controls
  401. display: flex
  402. gap: 8px
  403. @media (max-width: 768px)
  404. flex-direction: column
  405. &__additional-images
  406. display: grid
  407. grid-template-columns: repeat(auto-fill, minmax(80px, 1fr))
  408. gap: 8px
  409. margin-bottom: 12px
  410. &__additional-image
  411. position: relative
  412. width: 80px
  413. height: 80px
  414. &__image-remove
  415. position: absolute
  416. top: -8px
  417. right: -8px
  418. width: 24px
  419. height: 24px
  420. background: #ef4444
  421. color: white
  422. border: none
  423. border-radius: 50%
  424. cursor: pointer
  425. display: flex
  426. align-items: center
  427. justify-content: center
  428. font-size: 14px
  429. line-height: 1
  430. &:hover
  431. background: #dc2626
  432. // ... предыдущие стили остаются без изменений ...
  433. // Стили для управления атрибутами
  434. .admin-products
  435. &__attributes
  436. display: flex
  437. flex-direction: column
  438. gap: 8px
  439. margin-bottom: 12px
  440. &__attribute
  441. display: flex
  442. align-items: center
  443. gap: 8px
  444. padding: 8px
  445. border: 1px solid #e5e7eb
  446. border-radius: 4px
  447. background: #f9fafb
  448. &__attribute-key
  449. flex: 1
  450. font-weight: 500
  451. color: #374151
  452. font-size: 14px
  453. &__input--small
  454. flex: 2
  455. padding: 6px 8px
  456. font-size: 13px
  457. &__attribute-remove
  458. width: 24px
  459. height: 24px
  460. background: #ef4444
  461. color: white
  462. border: none
  463. border-radius: 4px
  464. cursor: pointer
  465. display: flex
  466. align-items: center
  467. justify-content: center
  468. font-size: 14px
  469. line-height: 1
  470. &:hover
  471. background: #dc2626
  472. &__attribute-add
  473. display: flex
  474. gap: 8px
  475. align-items: center
  476. @media (max-width: 768px)
  477. flex-direction: column
  478. // Стили для управления тегами
  479. .admin-products
  480. &__tags
  481. display: flex
  482. flex-wrap: wrap
  483. gap: 6px
  484. margin-bottom: 12px
  485. &__tag
  486. display: inline-flex
  487. align-items: center
  488. gap: 4px
  489. padding: 4px 8px
  490. background: #dbeafe
  491. color: #1e40af
  492. border-radius: 12px
  493. font-size: 12px
  494. font-weight: 500
  495. &__tag-remove
  496. width: 16px
  497. height: 16px
  498. background: #93c5fd
  499. color: #1e40af
  500. border: none
  501. border-radius: 50%
  502. cursor: pointer
  503. display: flex
  504. align-items: center
  505. justify-content: center
  506. font-size: 10px
  507. line-height: 1
  508. &:hover
  509. background: #60a5fa
  510. &__tag-add
  511. display: flex
  512. gap: 8px
  513. align-items: center
  514. @media (max-width: 768px)
  515. flex-direction: column
  516. // Стили для управления категориями
  517. .admin-products
  518. &__categories-header
  519. margin-bottom: 16px
  520. &__categories-list
  521. display: flex
  522. flex-direction: column
  523. gap: 8px
  524. &__category-item
  525. display: flex
  526. justify-content: space-between
  527. align-items: center
  528. padding: 12px
  529. border: 1px solid #e5e7eb
  530. border-radius: 6px
  531. background: white
  532. @media (max-width: 768px)
  533. flex-direction: column
  534. align-items: stretch
  535. gap: 8px
  536. &__category-info
  537. flex: 1
  538. &__category-name
  539. font-weight: 500
  540. color: #1f2937
  541. margin-bottom: 4px
  542. &__category-meta
  543. display: flex
  544. gap: 12px
  545. font-size: 12px
  546. color: #6b7280
  547. &__category-actions
  548. display: flex
  549. gap: 8px
  550. @media (max-width: 768px)
  551. justify-content: flex-end