:root {
    --ks-ink: #1d1d1f;
    --ks-muted: #6e6e73;
    --ks-blue: #1d6fe8;
    --ks-orange: #e07a2f;
    --ks-line: rgba(0, 0, 0, 0.06);
}

body[data-pc-theme],
body.ks-market {
    font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: var(--ks-ink);
}

body[data-pc-theme] {
    background: #f3f3f6 !important;
}

.pc-sidebar {
    background: linear-gradient(180deg, #f7f7f8 0%, #e7e7ec 100%) !important;
    border-right: 0 !important;
    box-shadow:
        inset 1px 1px 0 rgba(255, 255, 255, 0.95),
        inset -1px -1px 0 rgba(0, 0, 0, 0.04),
        14px 0 32px rgba(20, 20, 30, 0.08) !important;
}

.pc-sidebar .m-header {
    padding: 16px 16px 8px;
}

.pc-sidebar .b-brand {
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border-radius: 0;
    padding: 0;
    box-shadow: none;
}

.auth-form .brand-logo {
    background: transparent;
    border-radius: 0;
    padding: 0;
    max-height: 86px;
    width: auto;
    box-shadow: none;
}

.pc-sidebar .logo-lg {
    max-height: 58px;
    width: auto;
    max-width: 100%;
    object-fit: contain;
}

.pc-sidebar .navbar-content {
    padding-top: 8px;
}

.pc-sidebar .pc-caption label {
    color: #8e8e93;
    letter-spacing: 0.04em;
    font-size: 11px;
}

.pc-sidebar .pc-navbar > .pc-item > .pc-link {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 48px;
    margin: 4px 12px;
    padding: 8px 12px;
    border-radius: 14px;
    color: #1d1d1f;
    background: linear-gradient(180deg, #f8f8fa 0%, #e6e6eb 100%);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.95),
        inset 0 -1px 0 rgba(0, 0, 0, 0.05),
        0 6px 12px rgba(20, 20, 30, 0.05);
}

.pc-sidebar .pc-navbar > .pc-item > .pc-link:hover {
    background: linear-gradient(180deg, #ffffff 0%, #f2f2f5 100%);
}

.pc-sidebar .pc-navbar > .pc-item.active > .pc-link,
.pc-sidebar .pc-navbar > .pc-item.pc-trigger > .pc-link {
    background: linear-gradient(180deg, #ffffff 0%, #f4f4f7 100%);
    color: var(--ks-blue);
    box-shadow:
        inset 0 1px 0 #fff,
        0 8px 16px rgba(20, 20, 30, 0.1);
}

.pc-sidebar .pc-micon,
.pc-sidebar .pc-arrow {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 22px;
    width: 22px;
    height: 22px;
    margin: 0;
    float: none;
    color: var(--ks-blue);
}

.pc-sidebar .pc-micon i,
.pc-sidebar .pc-arrow i {
    font-size: 18px;
    line-height: 1;
}

.pc-sidebar .pc-mtext {
    flex: 1 1 auto;
    min-width: 0;
    line-height: 1.25;
    text-transform: none;
}

.pc-sidebar .pc-arrow {
    margin-left: auto;
    flex-basis: 16px;
    width: 16px;
    color: #64748b;
}

.pc-sidebar .pc-submenu {
    margin: 0 18px 8px;
    padding: 6px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.45);
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.05);
}

.pc-sidebar .pc-navbar > .pc-item .pc-submenu .pc-link {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 40px;
    padding: 8px 12px 8px 34px !important;
    border-radius: 10px;
    line-height: 1.25;
}

.pc-sidebar .pc-navbar > .pc-item .pc-submenu .pc-link:after {
    top: 50% !important;
    left: 14px !important;
    width: 6px;
    height: 6px;
    margin-top: -3px;
}

.pc-sidebar .pc-submenu .pc-link:has(.pc-micon) {
    padding-left: 10px !important;
}

.pc-sidebar .pc-submenu .pc-link:has(.pc-micon):after {
    content: none;
}

.pc-sidebar .pc-submenu .pc-mtext {
    white-space: normal;
}

.pc-header {
    background: rgba(255, 255, 255, 0.72) !important;
    backdrop-filter: saturate(180%) blur(18px);
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.8), 0 10px 30px rgba(20, 20, 30, 0.04) !important;
}

.pc-container .card,
.auth-wrapper .card,
body.ks-market .ks-card {
    border: 0;
    border-radius: 20px;
    background: linear-gradient(180deg, #ffffff 0%, #fbfbfd 100%);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.9),
        0 12px 32px rgba(20, 20, 40, 0.06),
        0 1px 2px rgba(20, 20, 40, 0.04);
}

.pc-container .card .card-header {
    background: transparent;
    border-bottom: 1px solid var(--ks-line);
}

.btn.btn-outline-primary,
.btn.btn-outline-secondary,
.btn.btn-outline-danger,
.btn.btn-outline-dark,
.btn.btn-outline-success,
.btn.btn-light,
.btn[class*="btn-outline-"]:not(:hover) {
    border-radius: 14px;
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.14);
}

.btn-secondary,
.ks-btn {
    border: 0;
    border-radius: 999px;
    background: linear-gradient(180deg, #3b86f0 0%, #1d6fe8 100%);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35), 0 8px 16px rgba(29, 111, 232, 0.25);
}

.ks-tabbar {
    display: none;
}

@media (max-width: 991.98px) {
    .ks-tabbar {
        display: flex;
        position: fixed;
        left: 12px;
        right: 12px;
        bottom: 12px;
        z-index: 1040;
        padding: 8px;
        gap: 4px;
        border-radius: 22px;
        background: rgba(255, 255, 255, 0.82);
        backdrop-filter: saturate(180%) blur(18px);
        box-shadow:
            inset 0 1px 0 rgba(255, 255, 255, 0.9),
            0 12px 30px rgba(0, 0, 0, 0.14);
    }

    .ks-tabbar a,
    .ks-tabbar button {
        flex: 1 1 0;
        min-width: 0;
        border: 0;
        background: transparent;
        color: #6e6e73;
        text-decoration: none;
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 2px;
        font-size: 10px;
        font-weight: 600;
        padding: 6px 2px;
        border-radius: 16px;
    }

    .ks-tabbar a span,
    .ks-tabbar button span {
        max-width: 100%;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .ks-tabbar svg {
        width: 20px;
        height: 20px;
        display: block;
        flex: 0 0 auto;
    }

    .ks-tabbar a i,
    .ks-tabbar button i {
        font-size: 18px;
    }

    .ks-tabbar a.is-on,
    .ks-tabbar a:hover,
    .ks-tabbar button:hover {
        color: var(--ks-blue);
        background: rgba(29, 111, 232, 0.08);
    }

    .pc-sidebar.mob-sidebar-active {
        z-index: 1080 !important;
        left: 0 !important;
    }

    .pc-sidebar .navbar-content {
        height: calc(100vh - 80px);
        padding-bottom: 36px;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }

    .pc-container,
    .pc-footer,
    body.ks-market {
        padding-bottom: 92px;
    }

    .pc-container {
        padding-left: 12px;
        padding-right: 12px;
    }

    .btn,
    .form-control,
    .form-select,
    input[type="date"],
    input[type="datetime-local"],
    input[type="time"] {
        min-height: 46px;
        font-size: 16px;
    }

    .card .card-header h5,
    .pc-content h5 {
        font-size: 1.15rem;
    }
}

.ks-actions-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.ks-actions-row form {
    display: inline-flex;
    margin: 0;
}

.ks-act {
    width: 40px;
    height: 40px;
    border: 0;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #0f172a;
    background: #e2e8f0;
    text-decoration: none;
    cursor: pointer;
}

.ks-act i {
    font-size: 18px;
    line-height: 1;
}

.ks-act-view { background: #fef3c7; color: #b45309; }
.ks-act-edit { background: #e0f2fe; color: #0369a1; }
.ks-act-delete { background: #fee2e2; color: #b91c1c; }
.ks-act-open { background: #dbeafe; color: #1d4ed8; }
.ks-act-hold { background: #ffedd5; color: #c2410c; }
.ks-act-ban { background: #fee2e2; color: #991b1b; }
.ks-act-restore { background: #dcfce7; color: #15803d; }

@media (max-width: 767.98px) {
    .ks-user-table thead {
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip: rect(0, 0, 0, 0);
    }

    .ks-user-table,
    .ks-user-table tbody,
    .ks-user-table tr,
    .ks-user-table td {
        display: block;
        width: 100%;
    }

    .ks-user-table tr {
        margin: 0 0 14px;
        padding: 14px;
        border: 0;
        border-radius: 18px;
        background: #fff;
        box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
    }

    .ks-user-table td {
        border: 0;
        padding: 6px 0;
        font-size: 16px;
    }

    .ks-user-table td[data-label]::before {
        content: attr(data-label);
        display: block;
        margin-bottom: 2px;
        font-size: 11px;
        font-weight: 700;
        letter-spacing: 0.04em;
        text-transform: uppercase;
        color: #64748b;
    }
}

input[type="date"],
input[type="datetime-local"],
input[type="time"] {
    border-radius: 14px;
    border: 1px solid rgba(148, 163, 184, 0.5);
    background: linear-gradient(180deg, #ffffff, #f8fafc);
    padding: 8px 12px;
}

.daterangepicker {
    border: 0;
    border-radius: 24px;
    overflow: hidden;
    padding: 10px;
    color: #e2e8f0;
    background: linear-gradient(180deg, #0f172a 0%, #172554 100%);
    box-shadow:
        0 28px 60px rgba(2, 6, 23, 0.45),
        inset 0 1px 0 rgba(255, 255, 255, 0.16);
}

.daterangepicker:before,
.daterangepicker:after {
    border-bottom-color: #0f172a;
}

.daterangepicker .calendar-table {
    background: transparent;
    border: 0;
}

.daterangepicker .calendar-table th,
.daterangepicker .calendar-table td {
    color: #e2e8f0;
    border: 0;
    border-radius: 12px;
    min-width: 36px;
    height: 36px;
    line-height: 36px;
    font-weight: 600;
}

.daterangepicker .month {
    color: #f8fafc;
    font-weight: 700;
}

.daterangepicker td.off,
.daterangepicker td.off.in-range,
.daterangepicker td.off.start-date,
.daterangepicker td.off.end-date {
    color: rgba(226, 232, 240, 0.35);
    background: transparent;
}

.daterangepicker td.available:hover,
.daterangepicker th.available:hover {
    background: rgba(56, 189, 248, 0.18);
    color: #fff;
}

.daterangepicker td.in-range {
    background: rgba(56, 189, 248, 0.22);
    color: #fff;
}

.daterangepicker td.active,
.daterangepicker td.active:hover,
.daterangepicker td.start-date,
.daterangepicker td.end-date {
    background: linear-gradient(180deg, #38bdf8, #2563eb) !important;
    color: #fff !important;
    box-shadow: 0 0 0 4px rgba(56, 189, 248, 0.28);
}

.daterangepicker .drp-buttons {
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.daterangepicker .drp-selected {
    color: #cbd5e1;
}

.daterangepicker .applyBtn,
.daterangepicker .cancelBtn {
    border: 0;
    border-radius: 999px;
    padding: 8px 14px;
    font-weight: 700;
}

.daterangepicker .applyBtn {
    background: linear-gradient(180deg, #38bdf8, #2563eb);
}

.ks-date {
    border-radius: 16px !important;
    border: 1px solid rgba(125, 211, 252, 0.45) !important;
    background-color: #f8fbff !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' fill='none' stroke='%232563eb' stroke-width='1.8' viewBox='0 0 24 24'%3E%3Crect x='3' y='5' width='18' height='16' rx='3'/%3E%3Cpath d='M3 10h18M8 3v4M16 3v4'/%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: right 14px center !important;
    padding-right: 42px !important;
}

.datepicker-dropdown {
    z-index: 20000 !important;
}

.datepicker-dropdown,
.datepicker-picker {
    border: 0 !important;
    border-radius: 24px !important;
    overflow: hidden;
    width: 292px !important;
    max-width: calc(100vw - 24px);
    color: #e2e8f0 !important;
    background: linear-gradient(180deg, #0b1224 0%, #172554 100%) !important;
    box-shadow: 0 24px 50px rgba(2, 6, 23, 0.45), 0 0 0 1px rgba(56, 189, 248, 0.35) !important;
}

.datepicker-grid {
    display: grid !important;
    grid-template-columns: repeat(7, minmax(0, 1fr)) !important;
    width: 100% !important;
}

.datepicker-main {
    padding: 10px 12px 6px !important;
}

.datepicker-header,
.datepicker-controls,
.datepicker-view,
.datepicker-grid,
.datepicker-footer,
.datepicker-title {
    background: transparent !important;
    color: #e2e8f0 !important;
    box-shadow: none !important;
}

.datepicker-controls .btn,
.datepicker-controls .ks-date-btn,
.datepicker-footer .btn,
.datepicker-footer .ks-date-btn {
    background: transparent !important;
    border: 0 !important;
    color: #7dd3fc !important;
    border-radius: 12px !important;
    font-weight: 700;
}

.datepicker-controls .view-switch {
    color: #f8fafc !important;
    letter-spacing: 0.04em;
}

.datepicker-grid {
    width: 100%;
}

.datepicker-cell {
    border-radius: 12px !important;
    color: #e2e8f0 !important;
    height: 36px;
}

.datepicker-cell.dow {
    color: #7dd3fc !important;
    font-size: 11px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    font-weight: 700;
}

.datepicker-cell.prev:not(.selected),
.datepicker-cell.next:not(.selected),
.datepicker-cell.disabled {
    color: rgba(226, 232, 240, 0.32) !important;
}

.datepicker-cell.today:not(.selected) {
    background: rgba(56, 189, 248, 0.16) !important;
    color: #7dd3fc !important;
    box-shadow: inset 0 0 0 1px rgba(56, 189, 248, 0.55);
}

.datepicker-cell.focused:not(.selected) {
    background: rgba(255, 255, 255, 0.08) !important;
}

.datepicker-cell.selected,
.datepicker-cell.selected:hover,
.datepicker-cell.range {
    background: linear-gradient(180deg, #38bdf8, #2563eb) !important;
    color: #fff !important;
    box-shadow: 0 0 0 4px rgba(56, 189, 248, 0.28);
}

.datepicker-footer {
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding-bottom: 6px;
}

.fc {
    --fc-border-color: rgba(148, 163, 184, 0.28);
    --fc-page-bg-color: transparent;
    --fc-neutral-bg-color: rgba(15, 23, 42, 0.45);
    --fc-today-bg-color: rgba(34, 211, 238, 0.16);
}

.fc .fc-toolbar-title {
    letter-spacing: 0.04em;
}

.fc .fc-button {
    border-radius: 999px !important;
    background: #0f2744 !important;
    border-color: #22d3ee !important;
    color: #e0f2fe !important;
}

.fc .fc-daygrid-day-number,
.fc .fc-col-header-cell-cushion {
    color: #dbeafe;
}

.fc .fc-day-today {
    box-shadow: inset 0 0 0 1px #22d3ee;
}

.fc-event {
    border: 0 !important;
    border-radius: 8px !important;
}

select.form-control,
select.form-select,
.form-select,
.select2-container--default .select2-selection--single,
.select2-container--default .select2-selection--multiple,
.select2-container--default .select2-dropdown,
.dropdown-menu {
    border-radius: 14px !important;
}

.select2-container--default .select2-dropdown {
    overflow: hidden;
}
