:root {
    --bg:     #0f1220;
    --card:   #161a2e;
    --accent: #7c5cff;
    --text:   #e6e8ef;
    --muted:  #9aa3b2
}

* {
    box-sizing: border-box
}

html, body {
    height: 100%
}

body {
    margin:      0;
    background:  var(--bg);
    color:       var(--text);
    font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif
}

.app {
    display:        flex;
    gap:            16px;
    padding:        16px;
    flex-direction: column;
    max-height:     100%;
    position:       fixed;
    left:           0;
    top:            0;
    right:          0;
    bottom:         0;
}

header {
    display:         flex;
    align-items:     baseline;
    justify-content: space-between
}

.muted {
    color: var(--muted)
}

.card {
    background:     var(--card);
    border:         1px solid rgba(255, 255, 255, .08);
    border-radius:  12px;
    overflow:       hidden;
    display:        flex;
    flex-direction: column;
    padding-bottom:  60px;
}

.cardheader {
    padding: 0 14px;
}

.cardscroll {
    padding:    14px;
    overflow-y: scroll;
    height:     100%;
    width:      calc(100% + 20px);
}

.topbar {
    display:         flex;
    align-items:     center;
    justify-content: space-between;
    gap:             12px;
    position:        sticky;
    top:             0;
    z-index:         1
}

.points-display {
    display:     flex;
    align-items: baseline;
    gap:         10px
}

.points-display .label {
    color:     var(--muted);
    font-size: 14px
}

.points-display .value {
    font-size:   22px;
    font-weight: 700
}

.columns {
    display:               grid;
    grid-template-columns: 1fr 1fr;
    gap:                   16px;
    height:                100%;
    flex:                  1;
    overflow-y:            hidden;
}

.column h3 {
    margin-top: 0
}

.row {
    display: flex;
    gap:     8px;
    margin:  8px 0
}

input, button {
    background:    #0d1020;
    color:         var(--text);
    border:        1px solid rgba(255, 255, 255, .1);
    border-radius: 8px;
    padding:       8px 10px;
    font-size:     14px
}

button {
    cursor: pointer
}

button.primary {
    background: linear-gradient(135deg, var(--accent), #4d62ff);
    border:     none
}

.list {
    display: grid;
    gap:     8px;
}

.item {
    display:              grid;
    grid-template-columns:1fr auto;
    gap:                  8px;
    align-items:          center
}

.badge {
    color: var(--muted)
}

/* Progress bars inside items */
.item .info {
    display:        flex;
    flex-direction: column;
    gap:            6px;
    width:          100%
}

.item .title {
    display:     block;
}

.item .title .nope
{
    text-decoration: line-through;
    color:           var(--muted)
}

.barrow {
    display:     flex;
    align-items: center;
    gap:         10px
}

.barrow .progress {
    flex: 1
}

.progress {
    height:        8px;
    background:    rgba(255, 255, 255, .08);
    border-radius: 6px;
    overflow:      hidden
}

.progress-inner {
    height:     100%;
    width:      0;
    background: linear-gradient(90deg, var(--accent), #4d62ff)
}

.progress-inner.ok {
    background: linear-gradient(90deg, #27ae60, #2ecc71)
}

.item .pct {
    min-width:  70px;
    text-align: right;
    color:      var(--muted)
}

.item .actions {
    display: flex;
    gap:     6px
}

.small {
    font-size:  12px;
    margin-top: 4px
}

/* a11y helpers */
.visually-hidden {
    position:    absolute;
    width:       1px;
    height:      1px;
    padding:     0;
    margin:      -1px;
    overflow:    hidden;
    clip:        rect(0, 0, 1px, 1px);
    white-space: nowrap;
    border:      0
}

.headers {
    display: flex;
}

.headers h2 {
    flex:            1;
    display:         block;
    width:           100%;
    font-size:       22px;
    text-decoration: underline;
}

.headers h2.notActive {
    display:         none;
    text-decoration: none;
}

#overlay {
    min-height: 75px !important;
}


#taskSuggestions ul, #rewardSuggestions ul {
    margin:  2px 20px 2px 0;
    padding: 0 10px 0 0;
}

.answer, .reject
{
    font-size: small;
    color: yellowgreen;
    margin-left: 5px;
}

.reject
{
    color: indianred;
}

#headerbox
{
    display: flex;
    background: var(--card);
    border: 1px solid rgba(255, 255, 255, .08);
    border-radius: 12px;
    padding: 15px;
    position: relative;
}

#closeHeaderBox
{
    position: absolute;
    top: 10px;
    right: 10px;
    background: none;
    border: none;
    color: var(--muted);
    font-size: 16px;
    cursor: pointer;
}


.mobileOnly
{
    display: none;
}


@media screen and (max-width: 768px) {
    .columns {
        grid-template-columns:1fr
    }

    .item .title {
        flex-direction: column;
        width:          100%;
        align-items:    flex-start;
    }

    #overlay {
        display: none !important;
    }

    .row.header h1 {
        font-size: 24px !important;
    }

    .columns {
        height: auto !important;
    }

    .card.column {
        display: block;
    }

    .headers h2.notActive {
        display: block;
        color:   var(--muted);
    }

    .hidden {
        display: none !important;
    }

    .mobileOnly {
        display: block !important;
    }


    #suggestRewardForm, #suggestTaskForm {
        margin-right: 20px;
    }

    .item .pct {
        padding-right: 5px
    }

    #headerbox
    {
        flex-direction: column;
    }
    #headerbox > div
    {
        width: 100% !important;
    }
}
