style.scss 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572
  1. .goal-config {
  2. display: flex;
  3. flex-direction: column;
  4. // ── 목록 패널 ────────────────────────────────────
  5. &__list-panel {
  6. display: flex;
  7. flex-direction: column;
  8. gap: 0;
  9. }
  10. // ── 30/70 레이아웃 ────────────────────────────────
  11. &__layout {
  12. display: grid;
  13. grid-template-columns: minmax(0, 500px) auto 1fr;
  14. gap: 24px;
  15. align-items: start;
  16. }
  17. // ── 좌측 패널 (미리보기) ─────────────────────────
  18. &__preview-panel {
  19. position: sticky;
  20. top: 16px;
  21. display: flex;
  22. flex-direction: column;
  23. gap: 16px;
  24. max-height: calc(100vh - 48px);
  25. overflow-y: auto;
  26. }
  27. // ── 우측 패널 (폼) ───────────────────────────────
  28. &__form-panel {
  29. display: flex;
  30. flex-direction: column;
  31. gap: 0;
  32. }
  33. // ── 섹션 (제목 좌 / 콘텐츠 우) ──────────────────
  34. &__section {
  35. display: grid;
  36. grid-template-columns: 140px 1fr;
  37. gap: 24px;
  38. padding: 24px 0;
  39. border-bottom: 1px solid hsl(var(--border));
  40. &:first-of-type {
  41. padding-top: 0;
  42. }
  43. }
  44. &__section-title {
  45. font-size: 0.875rem;
  46. font-weight: 600;
  47. color: hsl(var(--foreground));
  48. padding-top: 2px;
  49. margin: 0;
  50. }
  51. &__section-body {
  52. display: flex;
  53. flex-direction: column;
  54. gap: 17px;
  55. max-width: 520px;
  56. }
  57. // ── 위젯 미리보기 ────────────────────────────────
  58. &__widget {
  59. border: 1px solid hsl(var(--border));
  60. border-radius: var(--radius);
  61. overflow: hidden;
  62. }
  63. &__widget-label {
  64. padding: 8px 14px;
  65. font-size: 0.8125rem;
  66. font-weight: 500;
  67. color: hsl(var(--muted));
  68. background: #0e0e1a;
  69. }
  70. &__widget-body {
  71. padding: 16px;
  72. background: #1a1a2e;
  73. }
  74. // ── 툴바 ─────────────────────────────────────────
  75. &__toolbar {
  76. display: flex;
  77. align-items: center;
  78. justify-content: space-between;
  79. gap: 8px;
  80. margin-bottom: 12px;
  81. flex-wrap: wrap;
  82. }
  83. &__toolbar-left {
  84. display: flex;
  85. align-items: baseline;
  86. gap: 6px;
  87. }
  88. &__toolbar-right {
  89. display: flex;
  90. align-items: center;
  91. gap: 6px;
  92. flex-wrap: wrap;
  93. }
  94. &__count {
  95. font-size: 0.8125rem;
  96. color: hsl(var(--muted-foreground));
  97. }
  98. &__per-page {
  99. padding: 9px 10px;
  100. border: 1px solid hsl(var(--border));
  101. border-radius: calc(var(--radius) - 2px);
  102. background: hsl(var(--background));
  103. color: hsl(var(--foreground));
  104. font-size: 0.875rem;
  105. cursor: pointer;
  106. }
  107. // ── 버튼 ─────────────────────────────────────────
  108. &__btn {
  109. display: inline-flex;
  110. align-items: center;
  111. gap: 6px;
  112. padding: 8px 16px;
  113. border: 1px solid hsl(var(--border));
  114. border-radius: calc(var(--radius) - 2px);
  115. background: hsl(var(--background));
  116. color: hsl(var(--foreground));
  117. font-size: 0.875rem;
  118. font-weight: 500;
  119. cursor: pointer;
  120. white-space: nowrap;
  121. transition: background-color 0.15s, color 0.15s;
  122. justify-content: center;
  123. &:not([class*="--"]):hover:not(:disabled) {
  124. background: hsl(var(--accent));
  125. color: hsl(var(--accent-foreground));
  126. }
  127. &:disabled {
  128. opacity: 0.5;
  129. cursor: not-allowed;
  130. }
  131. &--sm {
  132. padding: 4px 10px;
  133. font-size: 0.75rem;
  134. }
  135. &--primary {
  136. background: hsl(var(--primary));
  137. color: hsl(var(--primary-foreground));
  138. border-color: hsl(var(--primary));
  139. &:hover:not(:disabled) {
  140. background: hsl(var(--primary) / 0.9);
  141. color: hsl(var(--primary-foreground));
  142. }
  143. }
  144. &--danger {
  145. color: hsl(var(--destructive));
  146. border-color: hsl(var(--destructive) / 0.5);
  147. &:hover:not(:disabled) {
  148. background: hsl(var(--destructive) / 0.1);
  149. }
  150. }
  151. }
  152. // ── 테이블 ───────────────────────────────────────
  153. &__table-wrap {
  154. border: 1px solid hsl(var(--border));
  155. border-radius: var(--radius);
  156. overflow: hidden;
  157. }
  158. &__table {
  159. width: 100%;
  160. border-collapse: collapse;
  161. font-size: 0.8125rem;
  162. th, td {
  163. padding: 10px 12px;
  164. text-align: left;
  165. border-bottom: 1px solid hsl(var(--border));
  166. }
  167. th {
  168. font-weight: 500;
  169. color: hsl(var(--muted-foreground));
  170. font-size: 0.75rem;
  171. background: hsl(var(--muted) / 0.4);
  172. }
  173. tbody tr:last-child td {
  174. border-bottom: none;
  175. }
  176. tbody tr {
  177. transition: background 0.15s;
  178. }
  179. tbody tr:hover {
  180. background: hsl(var(--muted) / 0.5);
  181. }
  182. }
  183. &__th--check,
  184. &__td--check {
  185. width: 40px;
  186. text-align: center;
  187. }
  188. &__td--date {
  189. white-space: nowrap;
  190. font-size: 0.75rem;
  191. }
  192. &__td--bar {
  193. min-width: 200px;
  194. }
  195. // ── 미니 프로그레스바 ────────────────────────────
  196. &__mini-bar {
  197. position: relative;
  198. height: 22px;
  199. border-radius: 4px;
  200. overflow: hidden;
  201. min-width: 160px;
  202. }
  203. &__mini-bar-fill {
  204. height: 100%;
  205. border-radius: 4px;
  206. transition: width 0.3s ease;
  207. }
  208. &__mini-bar-text {
  209. position: absolute;
  210. inset: 0;
  211. display: flex;
  212. align-items: center;
  213. justify-content: center;
  214. font-size: 0.6875rem;
  215. font-weight: 600;
  216. color: #fff;
  217. white-space: nowrap;
  218. text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6), 0 0 1px rgba(0, 0, 0, 0.4);
  219. pointer-events: none;
  220. }
  221. &__row--checked {
  222. opacity: 0.5;
  223. td {
  224. text-decoration: line-through;
  225. }
  226. }
  227. &__status-badge {
  228. display: inline-flex;
  229. align-items: center;
  230. padding: 2px 8px;
  231. border-radius: calc(var(--radius) - 2px);
  232. font-size: 0.6875rem;
  233. font-weight: 500;
  234. white-space: nowrap;
  235. &--active {
  236. background: hsl(142 71% 45% / 0.1);
  237. color: hsl(142 71% 45%);
  238. }
  239. &--inactive {
  240. background: hsl(var(--muted));
  241. color: hsl(var(--muted-foreground));
  242. }
  243. }
  244. &__empty {
  245. padding: 48px 16px;
  246. text-align: center;
  247. color: hsl(var(--muted-foreground));
  248. font-size: 0.875rem;
  249. }
  250. &__loading {
  251. padding: 48px 16px;
  252. text-align: center;
  253. color: hsl(var(--muted-foreground));
  254. font-size: 0.875rem;
  255. }
  256. // ── 페이징 ───────────────────────────────────────
  257. &__pagination {
  258. display: flex;
  259. align-items: center;
  260. justify-content: center;
  261. gap: 4px;
  262. margin-top: 12px;
  263. }
  264. &__page-btn {
  265. min-width: 28px;
  266. height: 28px;
  267. display: inline-flex;
  268. align-items: center;
  269. justify-content: center;
  270. border: 1px solid hsl(var(--border));
  271. border-radius: calc(var(--radius) - 2px);
  272. background: hsl(var(--background));
  273. color: hsl(var(--foreground));
  274. font-size: 0.75rem;
  275. cursor: pointer;
  276. transition: background-color 0.15s;
  277. &:hover:not(:disabled) {
  278. background: hsl(var(--accent));
  279. }
  280. &:disabled {
  281. opacity: 0.5;
  282. cursor: not-allowed;
  283. }
  284. &--active {
  285. background: hsl(var(--primary));
  286. color: hsl(var(--primary-foreground));
  287. border-color: hsl(var(--primary));
  288. }
  289. }
  290. // ── 폼 필드 ──────────────────────────────────────
  291. &__field {
  292. display: flex;
  293. flex-direction: column;
  294. gap: 6px;
  295. }
  296. &__field-label {
  297. font-size: 0.875rem;
  298. font-weight: 500;
  299. color: hsl(var(--foreground));
  300. }
  301. &__field-row {
  302. display: grid;
  303. grid-template-columns: 1fr 1fr;
  304. gap: 10px;
  305. }
  306. &__input {
  307. padding: 8px 12px;
  308. border: 1px solid hsl(var(--border));
  309. border-radius: calc(var(--radius) - 2px);
  310. background: hsl(var(--background));
  311. color: hsl(var(--foreground));
  312. font-size: 0.875rem;
  313. width: 100%;
  314. &::placeholder {
  315. color: hsl(var(--muted-foreground));
  316. }
  317. }
  318. &__select {
  319. padding: 8px 12px;
  320. border: 1px solid hsl(var(--border));
  321. border-radius: calc(var(--radius) - 2px);
  322. background: hsl(var(--background));
  323. color: hsl(var(--foreground));
  324. font-size: 0.875rem;
  325. width: 100%;
  326. cursor: pointer;
  327. }
  328. &__checkbox-label {
  329. display: inline-flex;
  330. align-items: center;
  331. gap: 8px;
  332. font-size: 0.875rem;
  333. color: hsl(var(--foreground));
  334. cursor: pointer;
  335. }
  336. // ── 폰트 그룹 ────────────────────────────────────
  337. &__font-group {
  338. &:not(:first-child) {
  339. margin-top: 12px;
  340. padding-top: 12px;
  341. border-top: 1px solid hsl(var(--border));
  342. }
  343. }
  344. &__font-group-title {
  345. font-size: 0.875rem;
  346. font-weight: 500;
  347. color: hsl(var(--muted-foreground));
  348. margin-bottom: 10px;
  349. }
  350. &__font-grid {
  351. display: grid;
  352. grid-template-columns: 1fr 80px 1fr;
  353. gap: 12px;
  354. align-items: start;
  355. }
  356. // ── 색상 입력 ─────────────────────────────────────
  357. &__color-wrap {
  358. display: flex;
  359. gap: 8px;
  360. align-items: center;
  361. }
  362. &__color-input {
  363. width: 36px;
  364. height: 36px;
  365. padding: 2px;
  366. border: 1px solid hsl(var(--border));
  367. border-radius: calc(var(--radius) - 2px);
  368. background: hsl(var(--background));
  369. cursor: pointer;
  370. flex-shrink: 0;
  371. &::-webkit-color-swatch-wrapper {
  372. padding: 0;
  373. }
  374. &::-webkit-color-swatch {
  375. border: none;
  376. border-radius: calc(var(--radius) - 4px);
  377. }
  378. }
  379. &__color-text {
  380. flex: 1;
  381. min-width: 0;
  382. }
  383. // ── 폼 하단 ──────────────────────────────────────
  384. &__form-footer {
  385. display: flex;
  386. justify-content: center;
  387. gap: 8px;
  388. padding-top: 20px;
  389. margin-top: 4px;
  390. }
  391. }
  392. // ── 목표 바 미리보기 ─────────────────────────────────
  393. .goal-preview {
  394. display: flex;
  395. flex-direction: column;
  396. gap: 6px;
  397. &__title {
  398. text-align: center;
  399. font-weight: 600;
  400. line-height: 1.3;
  401. }
  402. &__bar-wrap {
  403. border-radius: 4px;
  404. overflow: hidden;
  405. position: relative;
  406. min-height: 24px;
  407. }
  408. &__bar-fill {
  409. border-radius: 4px;
  410. transition: width 0.3s ease;
  411. }
  412. &__amount {
  413. position: absolute;
  414. inset: 0;
  415. display: flex;
  416. align-items: center;
  417. justify-content: center;
  418. z-index: 1;
  419. line-height: 1.3;
  420. white-space: nowrap;
  421. text-shadow: 0 1px 3px rgba(0, 0, 0, 0.7), 0 0 2px rgba(0, 0, 0, 0.5);
  422. }
  423. &__percent {
  424. opacity: 0.7;
  425. }
  426. }
  427. // ── 반응형 ────────────────────────────────────────────
  428. @media (max-width: 1380px) {
  429. .goal-config {
  430. &__layout {
  431. grid-template-columns: minmax(0, 500px) auto 1fr;
  432. gap: 24px;
  433. align-items: start;
  434. }
  435. &__section {
  436. grid-template-columns: 1fr;
  437. gap: 5px;
  438. }
  439. &__section-title {
  440. margin-bottom: 9px;
  441. }
  442. }
  443. }
  444. @media (max-width: 1120px) {
  445. .goal-config {
  446. &__layout {
  447. grid-template-columns: 2fr auto 3fr;
  448. }
  449. }
  450. }
  451. @media (max-width: 768px) {
  452. .goal-config {
  453. &__layout {
  454. grid-template-columns: 1fr;
  455. }
  456. &__preview-panel {
  457. position: static;
  458. max-height: none;
  459. }
  460. &__section {
  461. grid-template-columns: 1fr;
  462. gap: 8px;
  463. }
  464. &__section-title {
  465. margin-bottom: 12px;
  466. }
  467. &__section-body {
  468. max-width: none;
  469. }
  470. &__field-row {
  471. grid-template-columns: 1fr;
  472. }
  473. &__font-grid {
  474. grid-template-columns: 1fr;
  475. }
  476. &__toolbar {
  477. flex-direction: column;
  478. align-items: flex-start;
  479. }
  480. &__table-wrap {
  481. overflow-x: auto;
  482. }
  483. &__table {
  484. min-width: 892px;
  485. }
  486. }
  487. }