:root {
    --yellow: #ffda42;
    --soft: #fff1b3;
    --ink: #292929;
    --muted: #747474;
    --line: #d8d8d8;
    --canvas: #f5f5f5
}

* {
    box-sizing: border-box
}

body {
    margin: 0;
    color: var(--ink);
    font: 14px Arial, Helvetica, sans-serif;
    background: var(--canvas)
}

a {
    color: #285f92;
    text-decoration: none
}

a:hover {
    text-decoration: underline
}

button,
input,
select,
textarea {
    font: inherit
}

button,
.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 32px;
    padding: 6px 14px;
    border: 1px solid #c4c4c4;
    border-radius: 3px;
    background: #fff;
    color: var(--ink);
    cursor: pointer;
    text-decoration: none;
    white-space: nowrap
}

button:hover,
.button:hover {
    background: #f5f5f5;
    text-decoration: none
}

.primary {
    background: var(--yellow);
    border-color: #e0b62b;
    font-weight: 600
}

.primary:hover {
    background: #f5ca28
}

.plain {
    border: 0;
    background: transparent;
    padding: 4px 8px
}

.topbar {
    height: 56px;
    background: var(--yellow);
    display: flex;
    align-items: center;
    padding: 0 22px;
    gap: 38px;
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 10;
    box-shadow: 0 1px 0 #dbb62a
}

.brand {
    color: #292929;
    font-weight: 700;
    font-size: 18px;
    display: flex;
    align-items: center;
    gap: 10px
}

.brand-mark {
    font-size: 28px
}

.workspace {
    font-size: 13px;
    opacity: .7
}

.account {
    margin-left: auto;
    display: flex;
    gap: 15px;
    align-items: center
}

.account form {
    margin: 0
}

.sidebar {
    position: fixed;
    top: 56px;
    bottom: 0;
    left: 0;
    width: 224px;
    background: #efefef;
    border-right: 1px solid #d3d3d3;
    padding-top: 24px;
    display: flex;
    flex-direction: column
}

.nav-caption {
    padding: 0 22px 14px;
    font-size: 11px;
    color: #858585;
    letter-spacing: 1px
}

nav a {
    display: flex;
    align-items: center;
    gap: 13px;
    color: #393939;
    padding: 14px 20px;
    border-left: 3px solid transparent
}

nav a span {
    width: 22px;
    font-size: 20px;
    text-align: center
}

nav a:hover {
    background: #e5e5e5;
    text-decoration: none
}

nav a.active {
    background: var(--soft);
    border-left-color: #d2a800;
    font-weight: 600
}

.sidebar-foot {
    margin-top: auto;
    padding: 20px 22px;
    border-top: 1px solid #ddd;
    line-height: 1.8;
    font-size: 12px;
    color: #7c7c7c
}

main {
    margin: 56px 0 0 224px;
    min-height: calc(100vh - 56px)
}

.tabs {
    background: #e9e9e9;
    height: 41px;
    padding-left: 16px;
    border-bottom: 1px solid var(--line);
    display: flex;
    align-items: end
}

.tab {
    background: var(--canvas);
    border: 1px solid var(--line);
    border-bottom: 0;
    padding: 11px 25px 10px;
    font-size: 13px;
    border-radius: 4px 4px 0 0;
    position: relative;
    top: 1px
}

.content {
    padding: 24px 28px 40px
}

.page-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 22px
}

.breadcrumb {
    font-size: 12px;
    color: #919191;
    margin-bottom: 9px
}

h1 {
    font-size: 25px;
    font-weight: 500;
    margin: 0;
    line-height: 1.3
}

.actions {
    display: flex;
    gap: 9px
}

.metrics {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 24px
}

.metric {
    background: #fff;
    border: 1px solid var(--line);
    border-top: 3px solid var(--yellow);
    border-radius: 3px;
    padding: 19px 20px
}

.metric span {
    display: block;
    color: #666;
    font-size: 13px
}

.metric strong {
    display: block;
    font-size: 36px;
    font-weight: 500;
    margin: 14px 0 9px
}

.metric small {
    color: #909090;
    font-size: 12px
}

.panel {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 3px;
    margin-bottom: 20px;
    overflow: hidden
}

.panel-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    border-bottom: 1px solid var(--line);
    font-weight: 600;
    background: #fafafa;
    gap: 14px
}

.panel-title .muted {
    font-size: 12px;
    font-weight: 400
}

.dashboard-grid {
    display: grid;
    grid-template-columns: minmax(0, 2.2fr) minmax(270px, 1fr);
    gap: 22px
}

.table-scroll {
    overflow: auto
}

table {
    border-collapse: collapse;
    width: 100%;
    font-size: 13px;
    text-align: left
}

th {
    background: #f0f0f0;
    font-weight: 500;
    color: #626262;
    white-space: nowrap
}

th,
td {
    padding: 12px 15px;
    border-bottom: 1px solid #e3e3e3;
    vertical-align: middle
}

th+th,
td+td {
    border-left: 1px solid #eee
}

tbody tr:hover {
    background: #fff9df
}

td small {
    display: block;
    color: #8c8c8c;
    margin-top: 5px
}

.badge {
    display: inline-block;
    background: #f4f0dc;
    color: #786526;
    border: 1px solid #e9e2bf;
    padding: 4px 8px;
    border-radius: 3px;
    font-size: 12px;
    font-weight: 400;
    white-space: nowrap
}

.empty {
    padding: 35px 20px;
    color: #888;
    text-align: center;
    font-size: 13px
}

.stage-summary {
    padding: 5px 17px
}

.stage-summary>div {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
    padding: 11px 0;
    border-bottom: 1px solid #eee;
    font-size: 12px
}

.stage-summary strong {
    background: #f0f0f0;
    border-radius: 3px;
    padding: 3px 8px
}

.toolbar {
    display: flex;
    align-items: center;
    gap: 9px;
    flex-wrap: wrap;
    padding: 12px 16px;
    background: #fafafa;
    border-bottom: 1px solid var(--line)
}

.toolbar input {
    min-width: 270px
}

.toolbar .muted {
    margin-left: auto
}

.muted {
    color: var(--muted)
}

input,
select,
textarea {
    background: #fff;
    border: 1px solid #c9c9c9;
    border-radius: 2px;
    padding: 7px 9px;
    color: var(--ink);
    max-width: 100%
}

input:focus,
select:focus,
textarea:focus {
    outline: 2px solid #e4bf42;
    outline-offset: 1px
}

textarea {
    resize: vertical;
    min-height: 75px
}

.pagination {
    display: flex;
    gap: 16px;
    padding: 13px 16px;
    color: #777;
    font-size: 12px
}

.form-panel {
    max-width: 1040px
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px 28px;
    padding: 24px
}

.field label {
    display: block;
    font-size: 13px;
    margin-bottom: 7px
}

.field input,
.field select,
.field textarea {
    width: 100%
}

.required {
    color: #b87616
}

.form-footer {
    display: flex;
    gap: 10px;
    padding: 16px 24px;
    background: #fafafa;
    border-top: 1px solid var(--line)
}

.errorlist {
    list-style: none;
    padding: 0;
    color: #ac3030;
    font-size: 12px
}

.notice {
    background: #fff4cc;
    border: 1px solid #e8d68e;
    border-radius: 3px;
    padding: 13px 17px;
    margin-bottom: 18px
}

.notice.error {
    background: #fff0ef;
    border-color: #e7b2ac
}

.notice.success {
    background: #edf7ec;
    border-color: #c0d5bb
}

.details {
    display: grid;
    grid-template-columns: 230px 1fr;
    gap: 16px;
    padding: 20px;
    font-size: 13px
}

.details dt {
    color: #777
}

.details dd {
    margin: 0
}

.detail-tabs {
    display: flex;
    gap: 0;
    border-bottom: 1px solid #ccc;
    margin-bottom: 20px
}

.detail-tabs a {
    padding: 12px 18px;
    background: #eee;
    border: 1px solid #ddd;
    border-bottom: 0;
    color: #333
}

.detail-tabs a:first-child {
    background: #fff1b3
}

.response {
    padding: 18px;
    border-bottom: 1px solid #eee
}

.response-heading {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap
}

.response-heading>a {
    font-weight: 600
}

.response small {
    color: #777
}

.stage-form {
    display: flex;
    gap: 14px;
    align-items: end;
    flex-wrap: wrap;
    margin-top: 14px
}

.stage-form p {
    margin: 0;
    max-width: 260px
}

.stage-form label {
    display: block;
    color: #777;
    font-size: 12px;
    margin-bottom: 5px
}

.stage-form textarea {
    height: 36px;
    min-height: 36px
}

.timeline {
    padding: 20px
}

.timeline>div {
    padding: 0 0 18px 18px;
    border-left: 2px solid #efd47c
}

.timeline small {
    display: block;
    color: #888;
    margin-top: 6px
}

.timeline p {
    font-size: 13px
}

.kanban {
    display: flex;
    gap: 14px;
    overflow: auto;
    padding: 20px 0;
    align-items: start;
    min-height: 400px
}

.kanban-column {
    min-width: 255px;
    max-width: 255px;
    background: #ededed;
    border: 1px solid #d8d8d8;
    border-radius: 3px;
    min-height: 260px
}

.kanban-column header {
    display: flex;
    justify-content: space-between;
    padding: 13px;
    font-size: 13px;
    font-weight: 600;
    border-top: 3px solid var(--yellow);
    border-bottom: 1px solid #ddd;
    gap: 8px
}

.kanban-column header span {
    font-weight: 400
}

.kanban-card {
    display: block;
    background: white;
    border: 1px solid #d7d7d7;
    border-radius: 3px;
    padding: 14px;
    margin: 10px;
    color: #333
}

.kanban-card small {
    display: block;
    color: #888;
    margin-top: 9px;
    font-size: 12px
}

.kanban-empty {
    text-align: center;
    color: #999;
    font-size: 12px;
    padding: 25px
}

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

.login-main {
    margin-left: 0
}

.login-card {
    max-width: 430px;
    margin: 45px auto
}

.login-card form {
    padding: 24px
}

.login-card label {
    display: block;
    margin-bottom: 6px
}

.login-card input {
    width: 100%
}

@media(max-width:1100px) {
    .metrics {
        grid-template-columns: 1fr 1fr
    }

    .dashboard-grid {
        grid-template-columns: 1fr
    }

    .workspace {
        display: none
    }
}

@media(max-width:700px) {
    .topbar {
        padding: 0 12px
    }

    .brand {
        font-size: 15px
    }

    .account>span {
        display: none
    }

    .sidebar {
        position: static;
        width: auto;
        margin-top: 56px;
        padding-top: 0
    }

    .nav-caption,
    .sidebar-foot {
        display: none
    }

    nav {
        display: flex;
        overflow: auto
    }

    nav a {
        white-space: nowrap;
        padding: 12px;
        font-size: 12px
    }

    nav a span {
        display: none
    }

    main {
        margin: 0
    }

    .content {
        padding: 18px 12px
    }

    .page-heading {
        align-items: start;
        flex-direction: column
    }

    h1 {
        font-size: 22px
    }

    .metrics {
        gap: 9px
    }

    .metric {
        padding: 14px
    }

    .form-grid,
    .integration-grid {
        grid-template-columns: 1fr
    }

    .details {
        grid-template-columns: 1fr;
        gap: 8px
    }

    .details dd {
        margin-bottom: 12px
    }

    .detail-tabs {
        overflow: auto;
        white-space: nowrap
    }

    .toolbar input {
        min-width: 0;
        width: 100%
    }
}