style.scss 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656
  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. // ── fieldset (미리보기 패널용) ────────────────────
  75. &__fieldset {
  76. border: 1px solid hsl(var(--border));
  77. border-radius: var(--radius);
  78. padding: 16px 20px 20px;
  79. margin: 0;
  80. }
  81. &__legend {
  82. font-size: 1rem;
  83. font-weight: 600;
  84. color: hsl(var(--foreground));
  85. padding: 0 8px;
  86. margin-left: -4px;
  87. }
  88. // ── 미리보기 테스트 폼 ───────────────────────────
  89. &__preview-form {
  90. display: flex;
  91. flex-direction: column;
  92. gap: 12px;
  93. }
  94. &__preview-actions {
  95. display: flex;
  96. gap: 8px;
  97. margin-top: 4px;
  98. }
  99. &__preview-btn {
  100. flex: 1;
  101. justify-content: center;
  102. }
  103. &__field-hint {
  104. margin: 0;
  105. font-size: 0.8125rem;
  106. color: hsl(var(--muted-foreground));
  107. }
  108. // ── 툴바 ─────────────────────────────────────────
  109. &__toolbar {
  110. display: flex;
  111. align-items: center;
  112. justify-content: space-between;
  113. gap: 8px;
  114. margin-bottom: 12px;
  115. flex-wrap: wrap;
  116. }
  117. &__toolbar-left {
  118. display: flex;
  119. align-items: baseline;
  120. gap: 6px;
  121. }
  122. &__toolbar-right {
  123. display: flex;
  124. align-items: center;
  125. gap: 6px;
  126. flex-wrap: wrap;
  127. }
  128. &__count {
  129. font-size: 0.8125rem;
  130. color: hsl(var(--muted-foreground));
  131. }
  132. &__per-page {
  133. padding: 9px 10px;
  134. border: 1px solid hsl(var(--border));
  135. border-radius: calc(var(--radius) - 2px);
  136. background: hsl(var(--background));
  137. color: hsl(var(--foreground));
  138. font-size: 0.875rem;
  139. cursor: pointer;
  140. }
  141. // ── 버튼 ─────────────────────────────────────────
  142. &__btn {
  143. display: inline-flex;
  144. align-items: center;
  145. gap: 6px;
  146. padding: 8px 16px;
  147. border: 1px solid hsl(var(--border));
  148. border-radius: calc(var(--radius) - 2px);
  149. background: hsl(var(--background));
  150. color: hsl(var(--foreground));
  151. font-size: 0.875rem;
  152. font-weight: 500;
  153. cursor: pointer;
  154. white-space: nowrap;
  155. transition: background-color 0.15s, color 0.15s;
  156. justify-content: center;
  157. &:not([class*="--"]):hover:not(:disabled) {
  158. background: hsl(var(--accent));
  159. color: hsl(var(--accent-foreground));
  160. }
  161. &:disabled {
  162. opacity: 0.5;
  163. cursor: not-allowed;
  164. }
  165. &--sm {
  166. padding: 4px 10px;
  167. font-size: 0.75rem;
  168. }
  169. &--primary {
  170. background: hsl(var(--primary));
  171. color: hsl(var(--primary-foreground));
  172. border-color: hsl(var(--primary));
  173. &:hover:not(:disabled) {
  174. background: hsl(var(--primary) / 0.9);
  175. color: hsl(var(--primary-foreground));
  176. }
  177. }
  178. &--danger {
  179. color: hsl(var(--destructive));
  180. border-color: hsl(var(--destructive) / 0.5);
  181. &:hover:not(:disabled) {
  182. background: hsl(var(--destructive) / 0.1);
  183. }
  184. }
  185. }
  186. // ── 테이블 ───────────────────────────────────────
  187. &__table-wrap {
  188. border: 1px solid hsl(var(--border));
  189. border-radius: var(--radius);
  190. overflow: hidden;
  191. }
  192. &__table {
  193. width: 100%;
  194. border-collapse: collapse;
  195. font-size: 0.8125rem;
  196. th, td {
  197. padding: 10px 12px;
  198. text-align: left;
  199. border-bottom: 1px solid hsl(var(--border));
  200. }
  201. th {
  202. font-weight: 500;
  203. color: hsl(var(--muted-foreground));
  204. font-size: 0.75rem;
  205. background: hsl(var(--muted) / 0.4);
  206. }
  207. tbody tr:last-child td {
  208. border-bottom: none;
  209. }
  210. tbody tr {
  211. transition: background 0.15s;
  212. }
  213. tbody tr:hover {
  214. background: hsl(var(--muted) / 0.5);
  215. }
  216. }
  217. &__th--check,
  218. &__td--check {
  219. width: 40px;
  220. text-align: center;
  221. }
  222. &__td--date {
  223. white-space: nowrap;
  224. font-size: 0.75rem;
  225. }
  226. &__td--bar {
  227. min-width: 200px;
  228. }
  229. // ── 미니 프로그레스바 ────────────────────────────
  230. &__mini-bar {
  231. position: relative;
  232. height: 22px;
  233. border-radius: 4px;
  234. overflow: hidden;
  235. min-width: 160px;
  236. background: var(--mini-bar-bg, transparent);
  237. }
  238. &__mini-bar-fill {
  239. height: 100%;
  240. border-radius: 4px;
  241. transition: width 0.3s ease;
  242. width: var(--mini-bar-percent, 0%);
  243. background: var(--mini-bar-color, transparent);
  244. }
  245. &__mini-bar-text {
  246. position: absolute;
  247. inset: 0;
  248. display: flex;
  249. align-items: center;
  250. justify-content: center;
  251. font-size: 0.6875rem;
  252. font-weight: 600;
  253. color: #fff;
  254. white-space: nowrap;
  255. text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6), 0 0 1px rgba(0, 0, 0, 0.4);
  256. pointer-events: none;
  257. }
  258. &__row--checked {
  259. opacity: 0.5;
  260. td {
  261. text-decoration: line-through;
  262. }
  263. }
  264. // 활성 토글 스위치
  265. &__active-toggle {
  266. position: relative;
  267. display: inline-flex;
  268. align-items: center;
  269. width: 42px;
  270. height: 22px;
  271. padding: 2px;
  272. border: 1px solid hsl(var(--border));
  273. border-radius: 999px;
  274. background: hsl(var(--muted));
  275. cursor: pointer;
  276. transition: background 0.18s, border-color 0.18s;
  277. &-knob {
  278. width: 16px;
  279. height: 16px;
  280. border-radius: 50%;
  281. background: #fff;
  282. box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
  283. transition: transform 0.18s;
  284. }
  285. &--on {
  286. background: hsl(142 71% 45%);
  287. border-color: hsl(142 71% 45%);
  288. .goal-config__active-toggle-knob {
  289. transform: translateX(20px);
  290. }
  291. }
  292. &--busy {
  293. opacity: 0.7;
  294. cursor: progress;
  295. }
  296. &:disabled {
  297. cursor: not-allowed;
  298. &:not(.goal-config__active-toggle--busy) {
  299. opacity: 0.6;
  300. }
  301. }
  302. &:not(:disabled):hover {
  303. border-color: hsl(142 71% 45%);
  304. }
  305. }
  306. &__empty {
  307. padding: 48px 16px;
  308. text-align: center;
  309. color: hsl(var(--muted-foreground));
  310. font-size: 0.875rem;
  311. }
  312. &__loading {
  313. padding: 48px 16px;
  314. text-align: center;
  315. color: hsl(var(--muted-foreground));
  316. font-size: 0.875rem;
  317. }
  318. // ── 페이징 ───────────────────────────────────────
  319. &__pagination {
  320. display: flex;
  321. align-items: center;
  322. justify-content: center;
  323. gap: 4px;
  324. margin-top: 12px;
  325. }
  326. &__page-btn {
  327. min-width: 28px;
  328. height: 28px;
  329. display: inline-flex;
  330. align-items: center;
  331. justify-content: center;
  332. border: 1px solid hsl(var(--border));
  333. border-radius: calc(var(--radius) - 2px);
  334. background: hsl(var(--background));
  335. color: hsl(var(--foreground));
  336. font-size: 0.75rem;
  337. cursor: pointer;
  338. transition: background-color 0.15s;
  339. &:hover:not(:disabled) {
  340. background: hsl(var(--accent));
  341. }
  342. &:disabled {
  343. opacity: 0.5;
  344. cursor: not-allowed;
  345. }
  346. &--active {
  347. background: hsl(var(--primary));
  348. color: hsl(var(--primary-foreground));
  349. border-color: hsl(var(--primary));
  350. }
  351. }
  352. // ── 폼 필드 ──────────────────────────────────────
  353. &__field {
  354. display: flex;
  355. flex-direction: column;
  356. gap: 6px;
  357. }
  358. &__field-label {
  359. font-size: 0.875rem;
  360. font-weight: 500;
  361. color: hsl(var(--foreground));
  362. }
  363. &__field-row {
  364. display: grid;
  365. grid-template-columns: 1fr 1fr;
  366. gap: 10px;
  367. }
  368. &__input {
  369. padding: 8px 12px;
  370. border: 1px solid hsl(var(--border));
  371. border-radius: calc(var(--radius) - 2px);
  372. background: hsl(var(--background));
  373. color: hsl(var(--foreground));
  374. font-size: 0.875rem;
  375. width: 100%;
  376. &::placeholder {
  377. color: hsl(var(--muted-foreground));
  378. }
  379. }
  380. &__select {
  381. padding: 8px 12px;
  382. border: 1px solid hsl(var(--border));
  383. border-radius: calc(var(--radius) - 2px);
  384. background: hsl(var(--background));
  385. color: hsl(var(--foreground));
  386. font-size: 0.875rem;
  387. width: 100%;
  388. cursor: pointer;
  389. }
  390. &__checkbox-label {
  391. display: inline-flex;
  392. align-items: center;
  393. gap: 8px;
  394. font-size: 0.875rem;
  395. color: hsl(var(--foreground));
  396. cursor: pointer;
  397. }
  398. // ── 폰트 그룹 ────────────────────────────────────
  399. &__font-group {
  400. &:not(:first-child) {
  401. margin-top: 12px;
  402. padding-top: 12px;
  403. border-top: 1px solid hsl(var(--border));
  404. }
  405. }
  406. &__font-group-title {
  407. font-size: 0.875rem;
  408. font-weight: 500;
  409. color: hsl(var(--muted-foreground));
  410. margin-bottom: 10px;
  411. }
  412. &__font-grid {
  413. display: grid;
  414. grid-template-columns: 1fr 80px 1fr;
  415. gap: 12px;
  416. align-items: start;
  417. }
  418. // ── 색상 입력 ─────────────────────────────────────
  419. &__color-wrap {
  420. display: flex;
  421. gap: 8px;
  422. align-items: center;
  423. }
  424. &__color-input {
  425. width: 36px;
  426. height: 36px;
  427. padding: 2px;
  428. border: 1px solid hsl(var(--border));
  429. border-radius: calc(var(--radius) - 2px);
  430. background: hsl(var(--background));
  431. cursor: pointer;
  432. flex-shrink: 0;
  433. &::-webkit-color-swatch-wrapper {
  434. padding: 0;
  435. }
  436. &::-webkit-color-swatch {
  437. border: none;
  438. border-radius: calc(var(--radius) - 4px);
  439. }
  440. }
  441. &__color-text {
  442. flex: 1;
  443. min-width: 0;
  444. }
  445. // ── 폼 하단 ──────────────────────────────────────
  446. &__form-footer {
  447. display: flex;
  448. justify-content: center;
  449. gap: 8px;
  450. padding-top: 20px;
  451. margin-top: 4px;
  452. }
  453. }
  454. // ── 목표 바 미리보기 ─────────────────────────────────
  455. .goal-preview {
  456. display: flex;
  457. flex-direction: column;
  458. gap: 6px;
  459. &__title {
  460. text-align: center;
  461. font-weight: 600;
  462. line-height: 1.3;
  463. font-family: var(--title-font, inherit);
  464. font-size: var(--title-size, inherit);
  465. color: var(--title-color, inherit);
  466. }
  467. &__bar-wrap {
  468. border-radius: 4px;
  469. overflow: hidden;
  470. position: relative;
  471. min-height: var(--bar-height, 24px);
  472. height: var(--bar-height, auto);
  473. background: var(--bar-bg, transparent);
  474. }
  475. &__bar-fill {
  476. border-radius: 4px;
  477. transition: width 0.3s ease;
  478. width: var(--bar-percent, 0%);
  479. background: var(--bar-color, transparent);
  480. height: 100%;
  481. }
  482. &__amount {
  483. position: absolute;
  484. inset: 0;
  485. display: flex;
  486. align-items: center;
  487. justify-content: center;
  488. z-index: 1;
  489. line-height: 1.3;
  490. white-space: nowrap;
  491. text-shadow: 0 1px 3px rgba(0, 0, 0, 0.7), 0 0 2px rgba(0, 0, 0, 0.5);
  492. font-family: var(--amount-font, inherit);
  493. font-size: var(--amount-size, inherit);
  494. color: var(--amount-color, inherit);
  495. }
  496. &__percent {
  497. opacity: 0.7;
  498. }
  499. }
  500. // ── 반응형 ────────────────────────────────────────────
  501. @media (max-width: 1380px) {
  502. .goal-config {
  503. &__layout {
  504. grid-template-columns: minmax(0, 500px) auto 1fr;
  505. gap: 24px;
  506. align-items: start;
  507. }
  508. &__section {
  509. grid-template-columns: 1fr;
  510. gap: 5px;
  511. }
  512. &__section-title {
  513. margin-bottom: 9px;
  514. }
  515. }
  516. }
  517. @media (max-width: 1120px) {
  518. .goal-config {
  519. &__layout {
  520. grid-template-columns: 2fr auto 3fr;
  521. }
  522. }
  523. }
  524. @media (max-width: 768px) {
  525. .goal-config {
  526. &__layout {
  527. grid-template-columns: 1fr;
  528. }
  529. &__preview-panel {
  530. position: static;
  531. max-height: none;
  532. }
  533. &__section {
  534. grid-template-columns: 1fr;
  535. gap: 8px;
  536. }
  537. &__section-title {
  538. margin-bottom: 12px;
  539. }
  540. &__section-body {
  541. max-width: none;
  542. }
  543. &__field-row {
  544. grid-template-columns: 1fr;
  545. }
  546. &__font-grid {
  547. grid-template-columns: 1fr;
  548. }
  549. &__toolbar {
  550. flex-direction: column;
  551. align-items: flex-start;
  552. }
  553. &__table-wrap {
  554. overflow-x: auto;
  555. }
  556. &__table {
  557. min-width: 892px;
  558. }
  559. }
  560. }