/** * Copyright since 2025 Mifos Initiative * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ @use 'sass:color'; $navy: #0d1b2a; $blue: #1e88e5; $green: #10b981; $orange: #f59e0b; $red: #ef4444; $purple: #7c3aed; // ─── Container ─── .cal-container { padding: 20px 24px; max-width: 1440px; margin: 0 auto; background: #f0f2f5; min-height: 100vh; } // ─── Header ─── .cal-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; &__left { display: flex; align-items: center; gap: 10px; } &__icon { font-size: 22px; color: $blue; } &__title { font-size: 20px; font-weight: 700; color: $navy; } &__nav { display: flex; align-items: center; gap: 8px; } &__year { font-size: 20px; font-weight: 800; color: $navy; min-width: 60px; text-align: center; } } .cal-nav-btn { width: 34px; height: 34px; border: 1px solid #d0d5dd; background: #fff; border-radius: 8px; cursor: pointer; display: flex; align-items: center; justify-content: center; color: #475569; transition: all 0.15s; &:hover { background: $blue; color: #fff; border-color: $blue; } } .cal-today-btn { height: 34px; padding: 0 16px; border: 1px solid $blue; background: #eff6ff; color: $blue; border-radius: 8px; font-size: 13px; font-weight: 600; cursor: pointer; transition: all 0.15s; &:hover { background: $blue; color: #fff; } } // ─── Stats Row ─── .cal-stats { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; margin-bottom: 14px; } .cal-stat { background: #fff; border-radius: 10px; padding: 14px 16px; display: flex; align-items: center; gap: 12px; border: 1px solid #e8ecf0; box-shadow: 0 1px 4px rgb(0 0 0 / 6%); &__icon { font-size: 18px; width: 40px; height: 40px; border-radius: 10px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; } &__value { font-size: 22px; font-weight: 800; color: $navy; } &__label { font-size: 11px; color: #64748b; font-weight: 500; } &.working .cal-stat__icon { background: #ecfdf5; color: $green; } &.sundays .cal-stat__icon { background: #fef2f2; color: $red; } &.sat2nd4th .cal-stat__icon { background: #fff7ed; color: $orange; } &.holidays .cal-stat__icon { background: #f5f3ff; color: $purple; } &.total .cal-stat__icon { background: #eff6ff; color: $blue; } } // ─── Legend ─── .cal-legend { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; padding: 10px 16px; background: #fff; border-radius: 8px; border: 1px solid #e8ecf0; &__items { display: flex; gap: 20px; align-items: center; flex-wrap: wrap; } &__item { display: flex; align-items: center; gap: 6px; font-size: 12px; color: #475569; font-weight: 500; } &__actions { display: flex; align-items: center; gap: 10px; flex-shrink: 0; } &__print-btn { display: flex; align-items: center; gap: 6px; padding: 7px 18px; border: 1px solid #d0d5dd; background: #fff; color: #475569; border-radius: 8px; font-size: 13px; font-weight: 600; cursor: pointer; transition: all 0.15s; white-space: nowrap; &:hover { background: #f8fafc; border-color: #94a3b8; color: $navy; } } &__add-btn { display: flex; align-items: center; gap: 6px; padding: 7px 18px; border: none; background: $blue; color: #fff; border-radius: 8px; font-size: 13px; font-weight: 600; cursor: pointer; transition: all 0.15s; white-space: nowrap; flex-shrink: 0; &:hover { background: color.adjust($blue, $lightness: -8%); box-shadow: 0 2px 8px rgb(30 136 229 / 35%); } } &__tmpl-btn { display: flex; align-items: center; gap: 6px; padding: 7px 14px; border: 1px solid #bbf7d0; background: #ecfdf5; color: #047857; border-radius: 8px; font-size: 12.5px; font-weight: 600; cursor: pointer; transition: all 0.15s; white-space: nowrap; &:hover { background: #d1fae5; border-color: $green; } } &__import-btn { display: flex; align-items: center; gap: 6px; padding: 7px 14px; border: 1px solid #c4b5fd; background: #f5f3ff; color: $purple; border-radius: 8px; font-size: 12.5px; font-weight: 600; cursor: pointer; transition: all 0.15s; white-space: nowrap; &:hover:not(:disabled) { background: #ede9fe; border-color: $purple; } &:disabled { opacity: 0.6; cursor: progress; } } &__dot { width: 12px; height: 12px; border-radius: 3px; flex-shrink: 0; &.working { background: #ecfdf5; border: 1px solid $green; } &.sunday { background: #fef2f2; border: 1px solid $red; } &.sat2nd4th { background: #fff7ed; border: 1px solid $orange; } &.holiday { background: #f5f3ff; border: 1px solid $purple; } &.today { background: $blue; border: 1px solid $blue; } } } // ─── Monthly Grid ─── .cal-months { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; } .cal-month-card { background: #fff; border-radius: 10px; padding: 14px; border: 1px solid #e8ecf0; box-shadow: 0 1px 4px rgb(0 0 0 / 6%); transition: box-shadow 0.2s; &:hover { box-shadow: 0 4px 16px rgb(0 0 0 / 10%); } &__header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; padding-bottom: 8px; border-bottom: 2px solid #0d47a1; } &__name { font-size: 14px; font-weight: 700; color: #0d47a1; text-transform: uppercase; letter-spacing: 0.5px; } &__counts { display: flex; gap: 6px; .count-working { font-size: 11px; font-weight: 700; color: $green; background: #ecfdf5; padding: 2px 6px; border-radius: 4px; } .count-off { font-size: 11px; font-weight: 700; color: $red; background: #fef2f2; padding: 2px 6px; border-radius: 4px; } } &__summary { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; padding-top: 8px; border-top: 1px solid #f1f5f9; } } .summary-tag { font-size: 10px; font-weight: 600; padding: 2px 6px; border-radius: 4px; &.holiday { background: #f5f3ff; color: $purple; } &.sun { background: #fef2f2; color: $red; } &.sat { background: #fff7ed; color: $orange; } } // ─── Day Grid ─── .cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; &__wday { text-align: center; font-size: 10px; font-weight: 700; color: #64748b; padding: 4px 0; text-transform: uppercase; &--sun { color: $red; } } &__day { text-align: center; font-size: 12px; font-weight: 500; padding: 5px 2px; border-radius: 4px; cursor: default; color: #334155; transition: all 0.1s; &--other { color: transparent; } &--working { background: #f0fdf4; color: #166534; } &--sunday { background: #fef2f2; color: $red; font-weight: 700; } &--sat2nd4th { background: #fff7ed; color: #c2410c; font-weight: 700; } &--holiday { background: #f5f3ff; color: $purple; font-weight: 700; } &--today { background: $blue !important; color: #fff !important; font-weight: 800; box-shadow: 0 2px 6px rgb(30 136 229 / 40%); } } } // ─── Responsive ─── @media screen and (width <= 1200px) { .cal-months { grid-template-columns: repeat(2, 1fr); } .cal-stats { grid-template-columns: repeat(3, 1fr); } } @media screen and (width <= 768px) { .cal-months { grid-template-columns: 1fr; } .cal-stats { grid-template-columns: repeat(2, 1fr); } .cal-legend { flex-wrap: wrap; gap: 10px; } .cal-header { flex-direction: column; gap: 10px; align-items: flex-start; } } // ─── Holiday List (office-wise) ─── .cal-list { background: #fff; border-radius: 12px; box-shadow: 0 1px 3px rgb(15 23 42 / 6%); border: 1px solid #e2e8f0; margin-bottom: 18px; overflow: hidden; &__header { display: flex; flex-wrap: wrap; gap: 12px; padding: 14px 18px; border-bottom: 1px solid #e2e8f0; background: linear-gradient(180deg, #f8fafc 0%, #fff 100%); align-items: center; justify-content: space-between; } &__title { display: flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 700; color: $navy; &-ic { color: $blue; font-size: 15px; } } &__count { margin-left: 6px; padding: 2px 10px; background: #eff6ff; color: $blue; border-radius: 999px; font-size: 11px; font-weight: 700; letter-spacing: 0.02em; } &__filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; } &__search { position: relative; display: inline-flex; align-items: center; input { width: 240px; padding: 7px 10px 7px 32px; border: 1px solid #d0d5dd; border-radius: 8px; font-size: 12.5px; background: #fff; color: $navy; transition: all 0.15s; &:focus { outline: none; border-color: $blue; box-shadow: 0 0 0 3px rgb(30 136 229 / 12%); } } &-ic { position: absolute; left: 10px; color: #94a3b8; font-size: 11px; pointer-events: none; } } &__select { padding: 7px 10px; border: 1px solid #d0d5dd; border-radius: 8px; background: #fff; color: $navy; font-size: 12.5px; cursor: pointer; transition: all 0.15s; &:focus { outline: none; border-color: $blue; box-shadow: 0 0 0 3px rgb(30 136 229 / 12%); } } &__clear { display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; background: #fff; border: 1px solid #fecaca; color: $red; border-radius: 8px; cursor: pointer; font-size: 12px; font-weight: 600; transition: all 0.15s; &:hover { background: #fef2f2; border-color: #f87171; } } &__table-wrap { overflow: auto; max-height: 460px; } &__table { width: 100%; border-collapse: collapse; font-size: 12.5px; thead th { position: sticky; top: 0; z-index: 1; background: #f1f5f9; color: #475569; text-align: left; padding: 10px 14px; font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; border-bottom: 1px solid #e2e8f0; &.num { width: 48px; text-align: center; } &.actions { width: 140px; text-align: center; } } tbody td { padding: 9px 14px; border-bottom: 1px solid #f1f5f9; vertical-align: middle; color: $navy; &.num { text-align: center; color: #94a3b8; font-weight: 600; } &.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12px; } &.actions { text-align: center; white-space: nowrap; } } tbody tr { transition: background 0.12s; &:hover { background: #f8fafc; } } } &__name { font-weight: 600; color: $navy; } &__desc { font-size: 11px; color: #64748b; margin-top: 2px; } &__office-chip { display: inline-block; padding: 2px 8px; margin: 1px 4px 1px 0; background: #eef2ff; color: #4338ca; border-radius: 999px; font-size: 10.5px; font-weight: 600; } &__pill { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 10.5px; font-weight: 700; letter-spacing: 0.03em; text-transform: uppercase; &.gazetted { background: #f5f3ff; color: $purple; } &.custom { background: #ecfdf5; color: $green; } &.status { background: #f1f5f9; color: #64748b; &.active { background: #ecfdf5; color: $green; } } } &__act { width: 30px; height: 30px; margin: 0 2px; border: 1px solid #e2e8f0; background: #fff; border-radius: 7px; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; color: #64748b; font-size: 12px; transition: all 0.12s; &:hover:not(:disabled) { transform: translateY(-1px); } &.edit:hover:not(:disabled) { background: #eff6ff; border-color: #bfdbfe; color: $blue; } &.remove:hover:not(:disabled) { background: #fef2f2; border-color: #fecaca; color: $red; } &.more:hover:not(:disabled) { background: #f5f3ff; border-color: #ddd6fe; color: $purple; } &:disabled { opacity: 0.4; cursor: not-allowed; } } &__menu-ic { width: 18px; margin-right: 10px; color: #64748b; font-size: 13px; text-align: center; &.ok { color: $green; } &.warn { color: $red; } } &__empty { text-align: center; padding: 30px 16px; color: #94a3b8; font-size: 13px; } } @media (width <= 768px) { .cal-list { &__header { flex-direction: column; align-items: stretch; } &__filters { flex-direction: column; align-items: stretch; } &__search input, &__select { width: 100%; } } } // ─── Import result banner ─── .cal-import-result { margin-bottom: 16px; border-radius: 10px; border: 1px solid #e2e8f0; background: #fff; overflow: hidden; box-shadow: 0 1px 3px rgb(15 23 42 / 6%); &__head { display: flex; align-items: center; gap: 12px; padding: 12px 16px; } &__ic { font-size: 22px; flex-shrink: 0; } &__title { font-size: 14px; font-weight: 700; color: $navy; line-height: 1.2; } &__sub { font-size: 12px; color: #64748b; margin-top: 2px; } &__close { margin-left: auto; width: 28px; height: 28px; border-radius: 50%; border: 1px solid #e2e8f0; background: #fff; color: #94a3b8; cursor: pointer; transition: all 0.12s; &:hover { background: #f1f5f9; color: $navy; } } &__list { margin: 0; padding: 8px 18px 14px 36px; background: #f8fafc; border-top: 1px solid #e2e8f0; max-height: 160px; overflow-y: auto; font-size: 12px; color: #334155; li { padding: 3px 0; } strong { color: $navy; margin-right: 4px; } } &--ok { border-color: #bbf7d0; background: linear-gradient(180deg, #ecfdf5 0%, #fff 100%); .cal-import-result__ic { color: $green; } } &--mixed { border-color: #fde68a; background: linear-gradient(180deg, #fefce8 0%, #fff 100%); .cal-import-result__ic { color: $orange; } } &--fail { border-color: #fecaca; background: linear-gradient(180deg, #fef2f2 0%, #fff 100%); .cal-import-result__ic { color: $red; } } }