body {
    font-family: "Source Sans Pro", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.content-wrapper {
    min-height: calc(100vh - 114px);
}

.dashboard-widget {
    min-height: 100%;
}

.handle {
    cursor: grab;
}

.handle:active {
    cursor: grabbing;
}

.list-group-item {
    gap: 1rem;
}

.auth-page {
    background: linear-gradient(135deg, #eef2f7 0%, #dfe7f3 100%);
}

.login-box,
.register-box {
    width: 420px;
    max-width: calc(100vw - 2rem);
}

.login-logo a,
.register-logo a {
    color: #1f2d3d;
}

.org-chart-wrapper {
    overflow-y: hidden;
    overflow-x: auto;
    padding-bottom: 1rem;
    width: 100%;
}

.org-chart-list,
.org-chart-list ul {
    display: flex;
    align-items: flex-start;
    flex-wrap: nowrap;
    justify-content: center;
    gap: 1.25rem;
    list-style: none;
    margin: 0;
    min-width: max-content;
    padding: 1.5rem 0 0;
    position: relative;
    width: max-content;
}

.org-chart-wrapper > .org-chart-list {
    display: inline-flex;
    padding-left: 1rem;
    padding-right: 1rem;
}

.org-chart-list ul::before {
    border-top: 2px solid #d7dee8;
    content: "";
    left: 10%;
    position: absolute;
    right: 10%;
    top: 0.6rem;
}

.org-chart-list li {
    align-items: center;
    display: flex;
    flex: 0 0 auto;
    flex-direction: column;
    min-width: 240px;
    position: relative;
}

.org-chart-list li::before {
    border-left: 2px solid #d7dee8;
    content: "";
    height: 0.95rem;
    position: absolute;
    top: 0;
}

.org-chart-list > li::before {
    display: none;
}

.org-chart-card {
    background: linear-gradient(180deg, #ffffff 0%, #f5f8fb 100%);
    border: 1px solid #d7dee8;
    border-radius: 0.75rem;
    box-shadow: 0 0.35rem 1rem rgba(31, 45, 61, 0.08);
    padding: 0.85rem 0.95rem;
    text-align: center;
    width: 240px;
}

.org-chart-title {
    color: #1f2d3d;
    font-size: 0.95rem;
    font-weight: 700;
    line-height: 1.25;
}

.org-chart-meta {
    color: #5b6773;
    display: grid;
    gap: 0.2rem;
    margin-top: 0.45rem;
    font-size: 0.82rem;
}

.tutorial-content {
    color: #243447;
    line-height: 1.6;
}

.tutorial-content h1,
.tutorial-content h2,
.tutorial-content h3,
.tutorial-content h4 {
    color: #1f2d3d;
    margin-top: 1.2rem;
    margin-bottom: 0.65rem;
}

.tutorial-content h1:first-child,
.tutorial-content h2:first-child {
    margin-top: 0;
}

.tutorial-content ul,
.tutorial-content ol {
    padding-left: 1.2rem;
}

.tutorial-content code {
    background: #f4f6f9;
    border-radius: 0.25rem;
    padding: 0.1rem 0.3rem;
}

.tutorial-editor {
    min-height: 26rem;
    font-family: Consolas, "Courier New", monospace;
    line-height: 1.45;
    white-space: pre-wrap;
}

.navbar-status-center {
    gap: 0.65rem;
}

.navbar-minimum-wage {
    background: linear-gradient(135deg, #f8fbff 0%, #edf5ff 100%);
    border: 1px solid #cfe0f5;
    border-radius: 999px;
    color: #26415f;
    cursor: help;
    gap: 0.6rem;
    padding: 0.28rem 0.9rem;
    white-space: nowrap;
}

.navbar-company-warning {
    background: linear-gradient(135deg, #fff8e1 0%, #fff1c2 100%);
    border: 1px solid #e9c766;
    border-radius: 999px;
    color: #795500;
    gap: 0.5rem;
    padding: 0.28rem 0.85rem;
    text-decoration: none;
    white-space: nowrap;
}

a.navbar-company-warning:hover,
a.navbar-company-warning:focus {
    background: #ffedb0;
    color: #5f4300;
    text-decoration: none;
}

.navbar-company-warning strong {
    font-size: 0.78rem;
    letter-spacing: 0.01em;
    text-transform: uppercase;
}

.navbar-company-warning span {
    font-size: 0.78rem;
    text-decoration: underline;
}

.navbar-company-warning-mobile {
    background: #fff1c2;
    border-radius: 999px;
    color: #795500 !important;
    font-size: 0.78rem;
    font-weight: 700;
    line-height: 1;
    padding: 0.42rem 0.75rem !important;
}

.navbar-minimum-wage__label {
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    text-transform: uppercase;
}

.navbar-minimum-wage__amount {
    color: #114a85;
    font-size: 0.95rem;
}

.navbar-minimum-wage__date {
    color: #5a6d82;
    font-size: 0.8rem;
}

.navbar-minimum-wage__icon {
    color: #6f88a4;
    font-size: 0.8rem;
}

.navbar-minimum-wage-mobile {
    background: #eef5ff;
    border-radius: 999px;
    color: #114a85;
    cursor: help;
    font-size: 0.78rem;
    font-weight: 700;
    line-height: 1;
    padding: 0.42rem 0.75rem !important;
}

.nav-sidebar .nav-link .nav-icon {
    min-width: 1.5rem;
    text-align: center;
}

.nav-sidebar .nav-treeview {
    margin-left: 0.35rem;
    padding-left: 0.65rem;
}

.nav-sidebar .nav-treeview > .nav-item > .nav-link {
    padding-left: 1.95rem;
}

body.sidebar-mini.sidebar-collapse .nav-sidebar .nav-treeview {
    margin-left: 0;
    padding-left: 0;
}

body.sidebar-mini.sidebar-collapse .nav-sidebar .nav-treeview > .nav-item > .nav-link {
    padding-left: 0.5rem;
}

@media (min-width: 992px) {
    body {
        font-size: 0.94rem;
    }

    .content-header {
        padding: 0.65rem 0.5rem 0.35rem;
    }

    .content-wrapper > .content {
        padding: 0 0.5rem 0.75rem;
    }

    .card-header,
    .card-body,
    .card-footer {
        padding-top: 0.75rem;
        padding-bottom: 0.75rem;
    }

    .card-title {
        font-size: 1rem;
    }

    .form-group {
        margin-bottom: 0.75rem;
    }

    .form-group label,
    .col-form-label {
        margin-bottom: 0.25rem;
        font-size: 0.86rem;
    }

    .form-control,
    .custom-select {
        min-height: calc(1.9rem + 2px);
        height: calc(1.9rem + 2px);
        padding: 0.25rem 0.55rem;
        font-size: 0.9rem;
        line-height: 1.25;
    }

    textarea.form-control {
        min-height: 5.5rem;
        height: auto;
    }

    .input-group-text,
    .btn {
        padding: 0.32rem 0.7rem;
        font-size: 0.9rem;
    }

    .btn-sm,
    .btn-xs {
        padding: 0.18rem 0.45rem;
        line-height: 1.2;
    }

    .table th,
    .table td {
        padding: 0.45rem 0.6rem;
        vertical-align: middle;
        font-size: 0.9rem;
    }

    .table thead th {
        padding-top: 0.55rem;
        padding-bottom: 0.55rem;
        font-size: 0.82rem;
        text-transform: uppercase;
        letter-spacing: 0.02em;
    }

    .badge {
        font-size: 0.74rem;
        padding: 0.3em 0.45em;
    }

    .modal-header,
    .modal-body,
    .modal-footer {
        padding: 0.8rem 1rem;
    }

    .modal-title {
        font-size: 1rem;
    }

    .nav-sidebar .nav-link {
        padding-top: 0.42rem;
        padding-bottom: 0.42rem;
    }

    .nav-header {
        padding-top: 0.65rem;
        padding-bottom: 0.3rem;
    }

    .main-header .nav-link {
        padding-top: 0.45rem;
        padding-bottom: 0.45rem;
    }

    h1,
    .h1 {
        font-size: 1.7rem;
    }

    h2,
    .h2 {
        font-size: 1.45rem;
    }

    h3,
    .h3 {
        font-size: 1.2rem;
    }

    dl.row dt,
    dl.row dd {
        margin-bottom: 0.35rem;
    }
}

@media (min-width: 768px) {
    .desktop-compact-summary > [class*="col-"] {
        display: flex;
    }

    .desktop-compact-summary > [class*="col-"] > .small-box {
        flex: 1 1 auto;
        width: 100%;
    }
}

.attendance-daily-ignore-punch {
    color: inherit;
    cursor: pointer;
    font: inherit;
    line-height: inherit;
    transition: color 0.15s ease, border-color 0.15s ease;
}

.attendance-daily-ignore-punch-icon {
    display: inline-block;
    width: 0;
    margin-left: 0;
    overflow: hidden;
    opacity: 0;
    transition: width 0.15s ease, margin-left 0.15s ease, opacity 0.15s ease;
}

.attendance-daily-ignore-punch:hover,
.attendance-daily-ignore-punch:focus {
    color: #dc3545;
    border-color: #dc3545 !important;
    outline: none;
}

.attendance-daily-ignore-punch:hover .attendance-daily-ignore-punch-icon,
.attendance-daily-ignore-punch:focus .attendance-daily-ignore-punch-icon {
    width: auto;
    margin-left: 0.25rem;
    opacity: 1;
}

@media (min-width: 1200px) {
    .desktop-compact-header {
        gap: 0.5rem;
    }

    .desktop-compact-header .h3,
    .desktop-compact-header h1 {
        margin-bottom: 0.15rem !important;
    }

    .desktop-compact-header p {
        font-size: 0.86rem;
        line-height: 1.3;
    }

    .desktop-compact-actions {
        display: flex;
        align-items: center;
        flex-wrap: wrap;
        gap: 0.35rem;
    }

    .desktop-compact-actions .btn,
    .desktop-compact-actions .btn-group .btn {
        padding: 0.24rem 0.58rem;
        font-size: 0.82rem;
        line-height: 1.2;
    }

    .desktop-compact-actions form {
        margin-bottom: 0;
    }

    .desktop-compact-summary {
        margin-bottom: 0.15rem;
    }

    .desktop-compact-page .callout {
        margin-bottom: 0.65rem;
        padding: 0.7rem 0.9rem;
    }

    .desktop-compact-page .callout h5 {
        font-size: 0.95rem;
        margin-bottom: 0.35rem;
    }

    .desktop-compact-page .callout p {
        font-size: 0.88rem;
        line-height: 1.35;
    }

    .desktop-compact-page .row {
        margin-left: -0.35rem;
        margin-right: -0.35rem;
    }

    .desktop-compact-page .row > [class*="col-"] {
        padding-left: 0.35rem;
        padding-right: 0.35rem;
    }

    .desktop-compact-page .small-box {
        margin-bottom: 0.65rem;
        overflow: hidden;
        position: relative;
    }

    .desktop-compact-page .small-box .inner {
        padding: 0.7rem 0.85rem;
    }

    .desktop-compact-page .small-box h3 {
        font-size: 1.35rem;
        margin-bottom: 0.15rem;
    }

    .desktop-compact-page .small-box p {
        font-size: 0.84rem;
        margin-bottom: 0;
    }

    .desktop-compact-page .small-box .icon {
        font-size: 2rem;
        max-width: 2.4rem;
        overflow: hidden;
        position: absolute;
        top: 0.45rem;
        right: 0.55rem;
    }

    .desktop-compact-page .card {
        margin-bottom: 0.7rem;
    }

    .desktop-compact-page .card-header,
    .desktop-compact-page .card-body,
    .desktop-compact-page .card-footer {
        padding: 0.6rem 0.8rem;
    }

    .desktop-compact-page .table th,
    .desktop-compact-page .table td {
        padding: 0.34rem 0.5rem;
        font-size: 0.85rem;
        vertical-align: top;
    }

    .desktop-compact-page .table thead th {
        padding-top: 0.42rem;
        padding-bottom: 0.42rem;
        font-size: 0.76rem;
    }

    .desktop-compact-page .btn {
        padding: 0.27rem 0.6rem;
        font-size: 0.86rem;
    }

    .desktop-compact-page .btn-sm,
    .desktop-compact-page .btn-xs {
        padding: 0.14rem 0.4rem;
        font-size: 0.78rem;
    }

    .desktop-compact-page .form-control,
    .desktop-compact-page .custom-select {
        min-height: calc(1.8rem + 2px);
        height: calc(1.8rem + 2px);
        font-size: 0.86rem;
        padding: 0.22rem 0.5rem;
    }

    .desktop-compact-page textarea.form-control {
        min-height: 4.7rem;
        height: auto;
    }

    .desktop-compact-page .badge {
        font-size: 0.7rem;
    }

    .desktop-compact-page .pagination {
        margin-bottom: 0;
    }

    .attendance-daily-date-form {
        gap: 0.35rem;
    }

    .attendance-daily-date-form label {
        margin-bottom: 0;
        font-size: 0.82rem;
    }

    .attendance-daily-date-form .form-control {
        width: 10.5rem;
    }

    .attendance-daily-summary .small-box {
        min-height: 0;
    }

    .attendance-daily-card-header {
        padding-top: 0.55rem;
        padding-bottom: 0.55rem;
    }

    .attendance-daily-header-row .card-title {
        font-size: 0.96rem;
    }

    .attendance-daily-header-row small {
        font-size: 0.78rem;
    }

    .attendance-daily-holiday-flag .badge {
        font-size: 0.76rem;
    }

    .attendance-daily-table .attendance-daily-employee-cell,
    .attendance-daily-table .attendance-daily-workday-cell,
    .attendance-daily-table .attendance-daily-events-cell,
    .attendance-daily-table .attendance-daily-approval-cell,
    .attendance-daily-table .attendance-daily-actions-cell {
        min-width: 11rem;
    }

    .attendance-daily-table .attendance-daily-department-cell {
        min-width: 8rem;
    }

    .attendance-daily-table .attendance-daily-status-cell {
        min-width: 6rem;
        white-space: nowrap;
    }

    .attendance-daily-event-item,
    .attendance-daily-approval-item {
        margin-bottom: 0.28rem;
    }

    .attendance-daily-event-item:last-child,
    .attendance-daily-approval-item:last-child {
        margin-bottom: 0;
    }

    .attendance-daily-approval-summary {
        display: flex;
        flex-wrap: wrap;
        gap: 0.2rem;
        margin-bottom: 0.25rem;
    }

    .attendance-daily-inline-detail {
        margin-left: 0.2rem;
        vertical-align: middle;
    }

    .attendance-daily-actions-list {
        display: flex;
        flex-wrap: wrap;
        justify-content: flex-end;
        gap: 0.2rem;
    }

    .attendance-daily-primary-action {
        min-width: 8.5rem;
    }

    .attendance-daily-actions-cell .btn-xs {
        min-height: 1.55rem;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        line-height: 1.2;
        white-space: nowrap;
    }

    .attendance-daily-actions-cell small {
        max-width: 14rem;
        margin-left: auto;
    }

    .attendance-modal-content {
        border-radius: 0.55rem;
    }

    .attendance-modal-header {
        align-items: flex-start;
    }

    .attendance-modal-header .modal-title {
        font-size: 1rem;
    }

    .attendance-modal-header small {
        font-size: 0.8rem;
        line-height: 1.3;
    }

    .attendance-modal-body {
        padding-top: 0.7rem;
        padding-bottom: 0.75rem;
    }

    .attendance-modal-top-summary {
        margin-bottom: 0.35rem;
    }

    .attendance-modal-section {
        background: #f8fafc;
        border: 1px solid #e2e8f0;
        border-radius: 0.45rem;
        margin-bottom: 0.55rem;
        padding: 0.65rem 0.75rem;
    }

    .attendance-modal-section__header {
        margin-bottom: 0.45rem;
    }

    .attendance-modal-section__header h6 {
        font-size: 0.9rem;
    }

    .attendance-modal-section__header small {
        display: block;
        font-size: 0.78rem;
        line-height: 1.3;
    }

    .attendance-modal-content .form-group {
        margin-bottom: 0.55rem;
    }

    .attendance-modal-content label {
        font-size: 0.8rem;
        margin-bottom: 0.2rem;
    }

    .attendance-modal-content .form-control {
        min-height: calc(1.75rem + 2px);
        height: calc(1.75rem + 2px);
        font-size: 0.84rem;
    }

    .attendance-modal-content textarea.form-control {
        min-height: 4.2rem;
        height: auto;
    }

    .attendance-modal-help {
        max-width: 20rem;
        line-height: 1.3;
    }

    .attendance-modal-footer {
        padding-top: 0.6rem;
        padding-bottom: 0.6rem;
    }

    .attendance-modal-detail-list dt,
    .attendance-modal-detail-list dd {
        margin-bottom: 0.18rem;
        font-size: 0.84rem;
    }

    .attendance-modal-detail-list dt {
        color: #4b5563;
        font-weight: 700;
    }
}
