index.styl 7.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452
  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. background: white
  11. padding: 20px
  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. &__btn
  23. padding: 10px 20px
  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. &--primary
  31. background: #3b82f6
  32. color: white
  33. &:hover
  34. background: #2563eb
  35. &--secondary
  36. background: #6b7280
  37. color: white
  38. &:hover
  39. background: #4b5563
  40. &__filters
  41. display: flex
  42. gap: 16px
  43. margin-bottom: 20px
  44. background: white
  45. padding: 20px
  46. border-radius: 8px
  47. box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1)
  48. &__search
  49. flex: 1
  50. &-input
  51. width: 100%
  52. padding: 10px 12px
  53. border: 1px solid #d1d5db
  54. border-radius: 6px
  55. font-size: 14px
  56. &:focus
  57. outline: none
  58. border-color: #3b82f6
  59. box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1)
  60. &__category-filter
  61. min-width: 200px
  62. &-select
  63. width: 100%
  64. padding: 10px 12px
  65. border: 1px solid #d1d5db
  66. border-radius: 6px
  67. font-size: 14px
  68. background: white
  69. &:focus
  70. outline: none
  71. border-color: #3b82f6
  72. box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1)
  73. &__content
  74. background: white
  75. border-radius: 8px
  76. box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1)
  77. overflow: hidden
  78. &__table-container
  79. overflow-x: auto
  80. &__table
  81. width: 100%
  82. border-collapse: collapse
  83. &__th, &__td
  84. padding: 12px 16px
  85. text-align: left
  86. border-bottom: 1px solid #e5e7eb
  87. font-size: 14px
  88. &__th
  89. background: #f9fafb
  90. font-weight: 600
  91. color: #374151
  92. &-checkbox
  93. width: 40px
  94. &__tr
  95. transition: background-color 0.2s ease
  96. &:hover
  97. background: #f9fafb
  98. &__td
  99. &-checkbox
  100. width: 40px
  101. text-align: center
  102. &__status
  103. padding: 4px 8px
  104. border-radius: 12px
  105. font-size: 12px
  106. font-weight: 500
  107. &--active
  108. background: #dcfce7
  109. color: #166534
  110. &--inactive
  111. background: #fef2f2
  112. color: #991b1b
  113. &__actions
  114. display: flex
  115. gap: 8px
  116. &__action-btn
  117. padding: 6px 12px
  118. border: none
  119. border-radius: 4px
  120. font-size: 12px
  121. font-weight: 500
  122. cursor: pointer
  123. transition: all 0.2s ease
  124. &--edit
  125. background: #dbeafe
  126. color: #1e40af
  127. &:hover
  128. background: #bfdbfe
  129. &--delete
  130. background: #fef2f2
  131. color: #dc2626
  132. &:hover
  133. background: #fecaca
  134. &__empty
  135. padding: 40px 20px
  136. text-align: center
  137. &-text
  138. color: #6b7280
  139. font-size: 16px
  140. // Модальные окна
  141. .admin-modal
  142. position: fixed
  143. top: 0
  144. left: 0
  145. right: 0
  146. bottom: 0
  147. z-index: 1000
  148. display: flex
  149. align-items: center
  150. justify-content: center
  151. &__overlay
  152. position: absolute
  153. top: 0
  154. left: 0
  155. right: 0
  156. bottom: 0
  157. background: rgba(0, 0, 0, 0.5)
  158. &__content
  159. position: relative
  160. background: white
  161. border-radius: 8px
  162. box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2)
  163. max-width: 600px
  164. width: 90%
  165. max-height: 90vh
  166. overflow-y: auto
  167. &__header
  168. display: flex
  169. justify-content: space-between
  170. align-items: center
  171. padding: 20px 24px
  172. border-bottom: 1px solid #e5e7eb
  173. &__title
  174. font-size: 18px
  175. font-weight: 600
  176. color: #1f2937
  177. margin: 0
  178. &__close
  179. background: none
  180. border: none
  181. font-size: 24px
  182. cursor: pointer
  183. color: #6b7280
  184. padding: 0
  185. width: 30px
  186. height: 30px
  187. display: flex
  188. align-items: center
  189. justify-content: center
  190. &:hover
  191. color: #374151
  192. &__body
  193. padding: 24px
  194. &__footer
  195. display: flex
  196. justify-content: flex-end
  197. gap: 12px
  198. padding: 20px 24px
  199. border-top: 1px solid #e5e7eb
  200. &__btn
  201. padding: 10px 20px
  202. border: none
  203. border-radius: 6px
  204. font-size: 14px
  205. font-weight: 500
  206. cursor: pointer
  207. transition: all 0.2s ease
  208. &:disabled
  209. opacity: 0.6
  210. cursor: not-allowed
  211. &--primary
  212. background: #3b82f6
  213. color: white
  214. &:hover:not(:disabled)
  215. background: #2563eb
  216. &--secondary
  217. background: #6b7280
  218. color: white
  219. &:hover:not(:disabled)
  220. background: #4b5563
  221. // Формы
  222. .admin-form
  223. &__group
  224. margin-bottom: 20px
  225. &__label
  226. display: block
  227. margin-bottom: 6px
  228. font-weight: 500
  229. color: #374151
  230. font-size: 14px
  231. &__input, &__select, &__textarea
  232. width: 100%
  233. padding: 10px 12px
  234. border: 1px solid #d1d5db
  235. border-radius: 6px
  236. font-size: 14px
  237. transition: all 0.2s ease
  238. &:focus
  239. outline: none
  240. border-color: #3b82f6
  241. box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1)
  242. &__textarea
  243. resize: vertical
  244. min-height: 80px
  245. &__checkbox
  246. margin-right: 8px
  247. &__row
  248. display: grid
  249. grid-template-columns: 1fr 1fr
  250. gap: 16px
  251. // Импорт
  252. .admin-import
  253. &__upload
  254. margin-bottom: 20px
  255. &__file-input
  256. display: none
  257. &__upload-area
  258. border: 2px dashed #d1d5db
  259. border-radius: 8px
  260. padding: 40px 20px
  261. text-align: center
  262. cursor: pointer
  263. transition: all 0.2s ease
  264. &:hover, &--dragover
  265. border-color: #3b82f6
  266. background: #f0f9ff
  267. &__upload-text
  268. color: #6b7280
  269. font-size: 16px
  270. span
  271. color: #3b82f6
  272. text-decoration: underline
  273. &__file-info
  274. display: flex
  275. justify-content: space-between
  276. align-items: center
  277. background: #f3f4f6
  278. padding: 12px 16px
  279. border-radius: 6px
  280. margin-top: 12px
  281. &__file-name
  282. font-weight: 500
  283. color: #374151
  284. &__file-size
  285. color: #6b7280
  286. font-size: 14px
  287. &__progress
  288. margin: 20px 0
  289. &__progress-bar
  290. height: 8px
  291. background: #e5e7eb
  292. border-radius: 4px
  293. overflow: hidden
  294. &__progress-fill
  295. height: 100%
  296. background: #10b981
  297. transition: width 0.3s ease
  298. &__progress-text
  299. text-align: center
  300. margin-top: 8px
  301. font-size: 14px
  302. color: #6b7280
  303. font-weight: 500
  304. &__results
  305. margin-top: 20px
  306. &__result
  307. padding: 16px
  308. border-radius: 6px
  309. &--success
  310. background: #f0fdf4
  311. border: 1px solid #bbf7d0
  312. &--error
  313. background: #fef2f2
  314. border: 1px solid #fecaca
  315. &__result-title
  316. font-size: 16px
  317. font-weight: 600
  318. margin: 0 0 8px 0
  319. .admin-import__result--success &
  320. color: #166534
  321. .admin-import__result--error &
  322. color: #991b1b
  323. &__result-text
  324. margin: 0 0 12px 0
  325. color: #6b7280
  326. font-size: 14px
  327. &__errors
  328. &-title
  329. font-size: 14px
  330. font-weight: 600
  331. margin: 0 0 8px 0
  332. color: #374151
  333. &-list
  334. margin: 0
  335. padding-left: 20px
  336. &__error
  337. color: #dc2626
  338. font-size: 14px
  339. margin-bottom: 4px
  340. // Адаптивность
  341. @media (max-width: 768px)
  342. .admin-products
  343. padding: 12px
  344. &__header
  345. flex-direction: column
  346. gap: 16px
  347. align-items: stretch
  348. &__actions
  349. justify-content: stretch
  350. .admin-products__btn
  351. flex: 1
  352. &__filters
  353. flex-direction: column
  354. &__table-container
  355. font-size: 12px
  356. &__th, &__td
  357. padding: 8px 12px
  358. .admin-modal__content
  359. width: 95%
  360. margin: 20px
  361. .admin-form__row
  362. grid-template-columns: 1fr