:root {
    --bg: #f4f7f6;
    --ink: #17302f;
    --side: #0f2f2e;
    --side2: #16403e;
    --acc: #ff7a59;
    --card: #fff;
    --line: #e2ebe9
}

* {
    box-sizing: border-box
}

body {
    margin: 0;
    font: 14px/1.5 "Segoe UI", system-ui, sans-serif;
    background: var(--bg);
    color: var(--ink)
}

a {
    color: #0d7c74;
    text-decoration: none
}

.side {
    position: fixed;
    inset: 0 auto 0 0;
    width: 250px;
    background: var(--side);
    overflow: auto;
    padding-bottom: 20px;
    z-index: 20
}

.brand {
    display: flex;
    gap: 10px;
    align-items: center;
    color: #fff;
    font-size: 26px;
    padding: 18px;
    border-bottom: 1px solid #ffffff1a
}

.brand span {
    font-size: 15px;
    font-weight: 600;
    line-height: 1.2
}

.side .m,
.side summary {
    display: block;
    color: #cfe5e2;
    padding: 11px 18px;
    cursor: pointer;
    font-weight: 600;
    list-style: none
}

.side summary:after {
    content: "▸";
    float: right
}

.side details[open] summary:after {
    content: "▾"
}

.side .s {
    display: block;
    color: #a9c9c5;
    padding: 7px 18px 7px 34px;
    font-size: 13px;
    background: var(--side2)
}

.side a.on,
.side a:hover,
.side summary:hover {
    color: #fff;
    background: #1d5a56;
    border-left: 3px solid var(--acc)
}

.main {
    margin-left: 250px;
    min-height: 100vh;
    display: flex;
    flex-direction: column
}

.top {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #fff;
    padding: 12px 24px;
    border-bottom: 1px solid var(--line);
    position: sticky;
    top: 0;
    z-index: 10
}

.top h1 {
    margin: 0;
    font-size: 20px;
    flex: 1
}

.user {
    font-size: 13px;
    color: #587
}

#tg {
    display: none;
    border: 0;
    background: none;
    font-size: 22px
}

.content {
    padding: 24px;
    flex: 1
}

footer {
    padding: 14px 24px;
    color: #789;
    font-size: 12px;
    border-top: 1px solid var(--line)
}

.card {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px #0f2f2e0d
}

.card h3 {
    margin: 0 0 14px
}

.stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 16px;
    margin-bottom: 20px
}

.stat {
    border-radius: 12px;
    color: #fff;
    padding: 18px;
    position: relative;
    overflow: hidden
}

.stat b {
    display: block;
    font-size: 34px
}

.stat a {
    display: block;
    margin: 10px -18px -18px;
    padding: 6px 18px;
    background: #0002;
    color: #fff;
    font-size: 12px
}

.c1 {
    background: #0d7c74
}

.c2 {
    background: #3b82a0
}

.c3 {
    background: #ff7a59
}

.c4 {
    background: #7c5cbf
}

.grid2 {
    display: grid;
    grid-template-columns: 1fr 1.4fr;
    gap: 20px
}

.bar {
    display: grid;
    grid-template-columns: 150px 1fr 30px;
    gap: 10px;
    align-items: center;
    margin: 10px 0
}

.bar div {
    background: #e8f0ee;
    border-radius: 8px;
    height: 12px
}

.bar i {
    display: block;
    height: 12px;
    border-radius: 8px;
    background: var(--acc)
}

table {
    width: 100%;
    border-collapse: collapse
}

th {
    background: #eef5f3;
    text-align: left;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: .4px
}

th,
td {
    padding: 9px 10px;
    border-bottom: 1px solid var(--line);
    white-space: nowrap
}

.tw {
    overflow-x: auto
}

.badge {
    padding: 2px 10px;
    border-radius: 20px;
    font-size: 12px;
    background: #e8f0ee
}

.Active,
.Approved,
.Paid {
    background: #d6f5e6;
    color: #14804a
}

.Pending,
.Unpaid {
    background: #fff0d1;
    color: #9a6200
}

.Closed,
.Rejected,
.Blocked {
    background: #fde0dc;
    color: #b3261e
}

.Relocated {
    background: #e4dcf8;
    color: #5a3fa0
}

.fgrid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 16px
}

.full {
    grid-column: 1/-1
}

label {
    display: block;
    font-weight: 600;
    margin: 0 0 4px;
    font-size: 13px
}

input,
select,
textarea {
    width: 100%;
    padding: 9px 11px;
    border: 1px solid #cdddda;
    border-radius: 8px;
    font: inherit;
    background: #fff
}

input:focus,
select:focus,
textarea:focus {
    outline: 2px solid #0d7c7440;
    border-color: #0d7c74
}

.chk {
    font-weight: 400
}

.chk input {
    width: auto
}

.btn {
    display: inline-block;
    background: var(--acc);
    color: #fff;
    border: 0;
    padding: 9px 20px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer
}

.btn.sm {
    padding: 8px 14px
}

.btn.ghost {
    background: #e8f0ee;
    color: var(--ink)
}

.bar2 {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 14px;
    flex-wrap: wrap
}

.bar2 form {
    display: flex;
    gap: 8px
}

.bar2 input {
    width: 240px
}

.act {
    display: flex;
    gap: 10px;
    align-items: center
}

.inl {
    display: inline
}

.lnk {
    border: 0;
    background: none;
    cursor: pointer;
    font: inherit;
    padding: 0;
    color: #b3261e
}

.lnk.Approved {
    color: #14804a
}

.alert {
    background: #d6f5e6;
    color: #14804a;
    padding: 10px 14px;
    border-radius: 8px;
    margin-bottom: 16px
}

.alert.err {
    background: #fde0dc;
    color: #b3261e
}

.login {
    background: linear-gradient(135deg, #0f2f2e, #0d7c74);
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 16px
}

.lbox {
    display: grid;
    grid-template-columns: 1fr 1fr;
    max-width: 820px;
    width: 100%;
    background: #fff;
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 20px 60px #0006
}

.lhero {
    background: #16403e;
    color: #fff;
    padding: 40px 32px
}

.logo {
    font-size: 52px;
    color: var(--acc)
}

.lhero p {
    color: #a9c9c5
}

.lform {
    padding: 40px 32px
}

.lform label {
    margin-top: 14px
}

.lform .btn {
    width: 100%;
    margin-top: 22px
}

@media(max-width:860px) {
    .side {
        transform: translateX(-100%)
    }

    .side.show {
        transform: none
    }

    .main {
        margin-left: 0
    }

    #tg {
        display: block
    }

    .grid2,
    .lbox {
        grid-template-columns: 1fr
    }

    .user {
        display: none
    }
}

/* DataTables theme */
.dt-top {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px
}

.dt-top .dataTables_length,
.dt-top .dataTables_filter {
    margin: 0
}

.dataTables_wrapper .dataTables_filter input,
.dataTables_wrapper .dataTables_length select {
    width: auto;
    padding: 6px 10px
}

.dataTables_wrapper .dt-buttons {
    float: none;
    display: flex;
    flex-wrap: wrap;
    gap: 6px
}

.dt-button {
    background: #eef5f3 !important;
    border: 1px solid #cdddda !important;
    color: var(--ink) !important;
    border-radius: 8px !important;
    padding: 6px 14px !important;
    font-weight: 600;
    font-size: 13px !important
}

.dt-button:hover {
    background: var(--acc) !important;
    color: #fff !important;
    border-color: var(--acc) !important
}

table.dataTable thead th {
    border-bottom: 2px solid #cfe0dc
}

table.dataTable.no-footer {
    border-bottom: 1px solid var(--line)
}

.dt-bot {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    margin-top: 12px
}

.dataTables_wrapper .dataTables_paginate .paginate_button.current,
.dataTables_wrapper .dataTables_paginate .paginate_button.current:hover {
    background: var(--acc) !important;
    color: #fff !important;
    border: 1px solid var(--acc) !important
}

.dataTables_wrapper .dataTables_paginate .paginate_button:hover {
    background: #eef5f3 !important;
    color: var(--ink) !important;
    border: 1px solid #cdddda !important
}

.dataTables_wrapper .dataTables_info,
.dataTables_wrapper .dataTables_paginate {
    padding: 0
}

/* Icon action buttons */
.act {
    gap: 6px
}

.ib {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 8px;
    border: 0;
    cursor: pointer;
    color: #fff;
    padding: 0;
    text-decoration: none;
    transition: transform .12s, opacity .12s
}

.ib:hover {
    transform: translateY(-1px);
    opacity: .88;
    color: #fff
}

.ib svg {
    width: 16px;
    height: 16px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round
}

.ib.view {
    background: #3b82a0
}

.ib.edit {
    background: #14a06a
}

.ib.del,
.ib.no {
    background: #e0483e
}

.ib.ok {
    background: #0d7c74
}

.vt th {
    width: 260px;
    background: #f4f9f8;
    text-align: left;
    text-transform: none;
    font-size: 13px;
    letter-spacing: 0
}

.vt td {
    white-space: normal
}