style.scss 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634
  1. #attendancePage {
  2. max-width: 860px;
  3. margin: 0 auto;
  4. padding: 0 32px 32px 32px;
  5. h1 {
  6. font-size: 22px;
  7. margin-bottom: 0;
  8. }
  9. .attendance {
  10. &__title-row {
  11. display: flex;
  12. align-items: center;
  13. gap: 8px;
  14. margin-bottom: 16px;
  15. }
  16. &__help-btn {
  17. color: var(--text-muted);
  18. transition: color 0.15s;
  19. line-height: 1;
  20. &:hover {
  21. color: var(--text-primary);
  22. }
  23. }
  24. &__section {
  25. position: relative;
  26. margin-bottom: 16px;
  27. }
  28. &__notice {
  29. text-align: center;
  30. color: var(--text-muted);
  31. padding: 2rem;
  32. }
  33. // ── 캘린더 ──
  34. &__calendar {
  35. border: 1px solid var(--border-default);
  36. border-radius: 8px;
  37. overflow: hidden;
  38. }
  39. &__calendar-nav {
  40. display: flex;
  41. justify-content: space-between;
  42. align-items: center;
  43. padding: 12px 16px;
  44. background-color: var(--bg-elevated);
  45. border-bottom: 1px solid var(--border-default);
  46. span {
  47. font-size: 1rem;
  48. font-weight: 600;
  49. }
  50. button {
  51. width: 32px;
  52. height: 32px;
  53. border-radius: 6px;
  54. font-size: 1rem;
  55. font-weight: 600;
  56. color: var(--text-secondary);
  57. transition: background-color 0.15s, color 0.15s;
  58. &:hover {
  59. background-color: var(--border-default);
  60. color: var(--text-primary);
  61. }
  62. &:disabled {
  63. opacity: 0.3;
  64. cursor: not-allowed;
  65. &:hover {
  66. background-color: transparent;
  67. color: var(--text-secondary);
  68. }
  69. }
  70. }
  71. }
  72. &__calendar-grid {
  73. display: grid;
  74. grid-template-columns: repeat(7, 1fr);
  75. }
  76. &__calendar-weekday {
  77. padding: 8px 4px;
  78. text-align: center;
  79. font-size: 0.75rem;
  80. font-weight: 600;
  81. color: var(--text-secondary);
  82. background-color: var(--bg-elevated);
  83. border-right: 1px solid var(--border-default);
  84. border-bottom: 1px solid var(--border-default);
  85. &:nth-child(7n) {
  86. border-right: none;
  87. }
  88. &:first-child,
  89. &:last-child {
  90. color: var(--color-danger);
  91. }
  92. }
  93. &__calendar-cell {
  94. position: relative;
  95. display: flex;
  96. flex-direction: column;
  97. align-items: center;
  98. justify-content: flex-start;
  99. padding: 8px 4px;
  100. min-height: 64px;
  101. background-color: var(--background);
  102. border-right: 1px solid var(--border-default);
  103. border-bottom: 1px solid var(--border-default);
  104. cursor: pointer;
  105. transition: background-color 0.15s;
  106. &:nth-child(7n) {
  107. border-right: none;
  108. }
  109. &:hover {
  110. background-color: var(--bg-elevated);
  111. .attendance__calendar-day {
  112. border-color: var(--text-link);
  113. }
  114. }
  115. &:active {
  116. background-color: var(--border-default);
  117. }
  118. &--empty {
  119. cursor: default;
  120. &:hover {
  121. background-color: var(--background);
  122. .attendance__calendar-day {
  123. border-color: transparent;
  124. }
  125. }
  126. }
  127. &--today {
  128. .attendance__calendar-day {
  129. background-color: var(--text-link);
  130. color: #fff;
  131. }
  132. }
  133. &--attended {
  134. background-color: #f0fdf4;
  135. .dark & {
  136. background-color: rgba(34, 197, 94, 0.08);
  137. }
  138. }
  139. &--selected {
  140. background-color: var(--list-row-active);
  141. .attendance__calendar-day {
  142. border-color: var(--text-link);
  143. border-width: 2px;
  144. font-weight: 700;
  145. }
  146. }
  147. &--future {
  148. cursor: not-allowed;
  149. opacity: 0.4;
  150. &:hover {
  151. background-color: var(--background);
  152. .attendance__calendar-day {
  153. border-color: transparent;
  154. }
  155. }
  156. }
  157. }
  158. &__calendar-day {
  159. font-size: 0.813rem;
  160. font-weight: 500;
  161. line-height: 1;
  162. display: flex;
  163. align-items: center;
  164. justify-content: center;
  165. width: 24px;
  166. height: 24px;
  167. border-radius: 50%;
  168. border: 1px solid transparent;
  169. transition: border-color 0.15s, background-color 0.15s;
  170. }
  171. &__calendar-bottom {
  172. display: flex;
  173. justify-content: space-around;
  174. align-items: center;
  175. width: 100%;
  176. margin-top: auto;
  177. padding: 9px 4px 5px 4px;
  178. }
  179. &__calendar-stamp {
  180. color: #d94040;
  181. transform: rotate(-12deg);
  182. opacity: 0.85;
  183. line-height: 1;
  184. min-width: 16px;
  185. min-height: 16px;
  186. }
  187. &__calendar-count {
  188. display: flex;
  189. align-items: center;
  190. gap: 3px;
  191. font-size: 0.75rem;
  192. color: var(--text-muted);
  193. line-height: 1;
  194. min-height: 14px;
  195. }
  196. // ── 출석 입력 ──
  197. &__form {
  198. display: flex;
  199. gap: 8px;
  200. margin-bottom: 24px;
  201. }
  202. &__form-input {
  203. flex: 1;
  204. padding: 10px 14px;
  205. border: 1px solid var(--border-default);
  206. border-radius: 6px;
  207. font-size: 0.875rem;
  208. background-color: var(--background);
  209. color: var(--text-primary);
  210. outline: none;
  211. transition: border-color 0.15s;
  212. &:focus {
  213. border-color: var(--text-link);
  214. }
  215. &:disabled {
  216. opacity: 0.5;
  217. cursor: not-allowed;
  218. }
  219. }
  220. &__form-btn {
  221. padding: 10px 24px;
  222. border-radius: 6px;
  223. font-size: 0.875rem;
  224. font-weight: 600;
  225. color: #fff;
  226. background-color: var(--text-link);
  227. white-space: nowrap;
  228. transition: background-color 0.15s, opacity 0.15s;
  229. &:hover {
  230. opacity: 0.9;
  231. }
  232. &:disabled {
  233. opacity: 0.5;
  234. cursor: not-allowed;
  235. }
  236. }
  237. // ── 리스트 ──
  238. &__list-toolbar {
  239. display: flex;
  240. justify-content: space-between;
  241. align-items: center;
  242. gap: 8px;
  243. padding: 12px 0;
  244. flex-wrap: wrap;
  245. }
  246. &__list-toolbar-left {
  247. display: flex;
  248. align-items: baseline;
  249. gap: 10px;
  250. }
  251. &__list-toolbar-total {
  252. font-size: 0.813rem;
  253. font-weight: 500;
  254. color: var(--text-muted);
  255. }
  256. &__list-toolbar-right {
  257. display: flex;
  258. gap: 8px;
  259. }
  260. &__list-toolbar-select {
  261. padding: 6px 10px;
  262. border: 1px solid var(--border-default);
  263. border-radius: 6px;
  264. font-size: 0.813rem;
  265. background-color: var(--background);
  266. color: var(--text-primary);
  267. cursor: pointer;
  268. &:focus {
  269. outline: none;
  270. border-color: var(--text-link);
  271. }
  272. }
  273. &__list {
  274. border-top: 1px solid var(--border-default);
  275. }
  276. &__list-header {
  277. display: grid;
  278. grid-template-columns: 60px 120px 1fr 160px 80px 80px 80px;
  279. column-gap: 0.75rem;
  280. padding: 10px 12px;
  281. background-color: var(--bg-elevated);
  282. border-bottom: 1px solid var(--border-default);
  283. span {
  284. font-size: 0.813rem;
  285. font-weight: 600;
  286. color: var(--text-secondary);
  287. text-align: center;
  288. }
  289. @media (max-width: 768px) {
  290. display: none;
  291. }
  292. }
  293. &__list-row {
  294. border-bottom: 1px solid var(--border-default);
  295. &:hover {
  296. background-color: var(--bg-elevated);
  297. }
  298. }
  299. &__list-row-pc {
  300. display: grid;
  301. grid-template-columns: 60px 120px 1fr 160px 80px 80px 80px;
  302. column-gap: 0.75rem;
  303. padding: 10px 12px;
  304. align-items: center;
  305. > span {
  306. font-size: 0.813rem;
  307. text-align: center;
  308. }
  309. @media (max-width: 768px) {
  310. display: none;
  311. }
  312. }
  313. &__list-row-mobile {
  314. display: none;
  315. padding: 10px 12px;
  316. flex-direction: column;
  317. gap: 4px;
  318. @media (max-width: 768px) {
  319. display: flex;
  320. }
  321. }
  322. &__list-row-mobile-top {
  323. display: flex;
  324. align-items: center;
  325. gap: 6px;
  326. }
  327. &__list-row-mobile-bottom {
  328. display: flex;
  329. justify-content: space-between;
  330. align-items: center;
  331. padding-left: 28px;
  332. }
  333. &__list-rank {
  334. font-weight: 700;
  335. color: var(--text-link);
  336. min-width: 28px;
  337. text-align: center;
  338. }
  339. &__list-member {
  340. display: flex;
  341. align-items: center;
  342. gap: 6px;
  343. justify-content: center;
  344. }
  345. &__list-member-name {
  346. font-weight: 500;
  347. font-size: 0.875rem;
  348. }
  349. &__list-greeting {
  350. font-size: 0.813rem;
  351. color: var(--text-secondary);
  352. overflow: hidden;
  353. text-overflow: ellipsis;
  354. white-space: nowrap;
  355. }
  356. &__list-point {
  357. font-weight: 600;
  358. color: var(--color-danger);
  359. }
  360. &__list-exp {
  361. font-weight: 600;
  362. color: var(--text-link);
  363. }
  364. &__list-streak {
  365. font-weight: 600;
  366. color: var(--color-success);
  367. }
  368. &__list-meta {
  369. display: flex;
  370. gap: 8px;
  371. font-size: 0.75rem;
  372. color: var(--text-muted);
  373. }
  374. &__empty {
  375. text-align: center;
  376. padding: 2.5rem;
  377. color: var(--text-muted);
  378. }
  379. }
  380. // ── 태블릿 (768 ~ 1024) ──
  381. @media (min-width: 769px) and (max-width: 1024px) {
  382. padding: 0 20px 24px 20px;
  383. .attendance {
  384. &__calendar-cell {
  385. min-height: 56px;
  386. padding: 6px 2px;
  387. }
  388. &__calendar-bottom {
  389. padding: 8px 3px 4px 3px;
  390. }
  391. &__list-header {
  392. grid-template-columns: 50px 100px 1fr 140px 70px 70px 70px;
  393. }
  394. &__list-row-pc {
  395. grid-template-columns: 50px 100px 1fr 140px 70px 70px 70px;
  396. }
  397. }
  398. }
  399. // ── 모바일 (≤ 768) ──
  400. @media (max-width: 768px) {
  401. padding: 0 12px 16px 12px;
  402. h1 {
  403. font-size: 18px;
  404. }
  405. .attendance {
  406. &__calendar-cell {
  407. min-height: 44px;
  408. padding: 4px 2px;
  409. }
  410. &__calendar-stamp {
  411. svg {
  412. width: 12px;
  413. height: 12px;
  414. }
  415. }
  416. &__calendar-bottom {
  417. padding: 4px 2px 2px 2px;
  418. }
  419. &__calendar-count {
  420. font-size: 0.688rem;
  421. svg {
  422. width: 12px;
  423. height: 12px;
  424. }
  425. }
  426. &__form {
  427. flex-direction: column;
  428. }
  429. &__form-btn {
  430. width: 100%;
  431. }
  432. }
  433. }
  434. }
  435. // ── 출석부 안내 Dialog ──
  436. // Radix Dialog 는 Portal 로 body 직속에 렌더됨.
  437. // Tailwind preflight (@tailwind base) 와 shadcn DialogDescription 의 'text-sm text-muted-foreground'
  438. // 둘 다 cascade 로 우리 styles 를 약화시키므로 핵심 룰엔 !important 로 강제 한다.
  439. .attendance__guide {
  440. display: flex !important;
  441. flex-direction: column !important;
  442. gap: 18px !important;
  443. color: var(--text-primary) !important;
  444. font-size: 0.875rem !important;
  445. .attendance__guide-section {
  446. display: block !important;
  447. h3, h4 {
  448. display: block !important;
  449. font-size: 0.9375rem !important;
  450. font-weight: 700 !important;
  451. margin: 0 0 6px !important;
  452. color: var(--text-primary) !important;
  453. line-height: 1.4 !important;
  454. }
  455. p {
  456. font-size: 0.875rem !important;
  457. color: var(--text-secondary) !important;
  458. margin: 0 0 4px !important;
  459. line-height: 1.6 !important;
  460. }
  461. strong {
  462. color: var(--text-primary) !important;
  463. font-weight: 700 !important;
  464. }
  465. p + p {
  466. margin-top: 2px !important;
  467. }
  468. }
  469. .attendance__guide-table {
  470. display: table !important;
  471. width: 100% !important;
  472. border-collapse: collapse !important;
  473. margin-top: 10px !important;
  474. font-size: 0.8125rem !important;
  475. border: 1px solid var(--border-default) !important;
  476. border-radius: 6px !important;
  477. overflow: hidden !important;
  478. table-layout: auto !important;
  479. thead {
  480. display: table-header-group !important;
  481. }
  482. thead tr {
  483. display: table-row !important;
  484. }
  485. thead th {
  486. display: table-cell !important;
  487. background: var(--bg-elevated) !important;
  488. color: var(--text-secondary) !important;
  489. font-weight: 600 !important;
  490. text-align: center !important;
  491. padding: 8px 12px !important;
  492. border-bottom: 1px solid var(--border-default) !important;
  493. white-space: nowrap !important;
  494. }
  495. tbody {
  496. display: table-row-group !important;
  497. }
  498. tbody tr {
  499. display: table-row !important;
  500. }
  501. tbody th,
  502. tbody td {
  503. display: table-cell !important;
  504. padding: 6px 12px !important;
  505. border-top: 1px solid var(--border-default) !important;
  506. line-height: 1.5 !important;
  507. }
  508. // 1열 (순위) - <th scope="row"> — 가운데, 강조
  509. tbody th {
  510. text-align: center !important;
  511. font-weight: 700 !important;
  512. width: 72px !important;
  513. color: var(--text-primary) !important;
  514. background: transparent !important;
  515. }
  516. // 2~3열 (보상 숫자) - 우측 정렬, 숫자 자리 정렬
  517. tbody td {
  518. text-align: right !important;
  519. font-variant-numeric: tabular-nums !important;
  520. color: var(--text-secondary) !important;
  521. }
  522. tbody tr:nth-child(even) th,
  523. tbody tr:nth-child(even) td {
  524. background: var(--bg-subtle) !important;
  525. }
  526. tbody tr:hover th,
  527. tbody tr:hover td {
  528. background: var(--bg-elevated) !important;
  529. }
  530. }
  531. }