:root {

    --bg: #f6f8f7;
    --surface: #ffffff;
    --surface-alt: #faf8ea;
    --primary: #2f8f46;
    --primary-dark: #27763a;
    --primary-light: #e9f6ec;
    --secondary: #fa9d46;
    --error: #800404;
    --border: #dfe5df;
    --border-light: #ececec;
    --text: #232323;
    --text-light: #666;
    --text-muted: #8a8a8a;
    --warning: #fff7d8;
    --shadow: 0 2px 10px rgba(0, 0, 0, .05);
    --default-gradient: linear-gradient(175deg, var(--surface-alt), var(--border), var(--bg));
    --radius: 8px;
}

html {
    font-size: 18px;
}

body {
    background: var(--bg);
    color: var(--text);
    font-family: "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    line-height: 1.4;
}

h1 {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 32px;
}

h2 {
    width: 100%;
    margin: 0;
}

.text-small {
    font-size: 13px;
}

.hide {
    display: none !important;
}

.error {
    color: var(--error);
}

header,
main {
    position: relative;
    width: 100%;
    max-width: 1200px;
    min-width: 420px;
    margin: 0 auto;
}

main {
    display: grid;
    grid-template-columns: 150px 1fr;
    gap: 28px;

    transition: all ease .2s;
    align-items: start;

}

main.closed {
    grid-template-columns: 45px 1fr;
    transition: all ease .4s;
}

.card {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 15px;
    margin-bottom: 15px;

    background: var(--default-gradient);
}

.mate-card {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface-alt);
    padding: 15px;
    margin-bottom: 15px;
}

.info {
    position: sticky;
    top: 30px;
    width: 120px;
    padding-top: 0;
    border-radius: 12px;
    transition: all ease .2s;
}

.info h2 {
    font-size: 1.3rem;
    text-align: right;
    width: 100%;
    margin: 10px 0;
    cursor: pointer;
}

.info h3 {
    width: 100%;
    margin: 0 0 5px 0;
}

.info div.half {
    display: inline-block;
    width: 58px;
    margin-bottom: 10px;

}

.info div.half .odd {
    padding-right: 20px;
}

.info label,
.info input {
    display: inline-block;
    max-width: 100%;
    margin-bottom: 5px;
}

.info input {
    padding: 5px 0;
    width: calc(100% - 10px);
    text-align: center;
    background: var(--surface-alt);
    border: none;
    border-bottom: 1px dashed #000;
}

.info button {
    margin-top: 5px;
    width: 100%;
}

.closed .info {
    width: 20px;
    right: 0;
    transition: all ease .3s;
    padding: 0 15px;

}

.closed .info .text-small {
    display: none;
    visibility: 0;
}

.default-flex {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
}

.top>div {
    width: calc(50% - 72px);
    padding: 10px;
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    gap: 15px;
}

.top>div.strike {
    width: 0;
    border-left: 1px solid green;
}

#allTime {
    font-size: 2.5rem;
    font-weight: bold;
    color: var(--primary);
    letter-spacing: -2px;
}

button {
    text-transform: uppercase;
    cursor: pointer;
    height: 2em;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    padding: 0 8px;
    letter-spacing: .04em;
    background: var(--primary-light);
    opacity: .9;
    transition: all ease .2s;
}

button:hover {
    opacity: 1;
}

button:disabled {
    cursor: not-allowed;
    opacity: .45;
}

button:disabled:hover {
    background: var(--primary-light);
}

.end-button,
.start-button {
    width: 100%;
    background: var(--primary);
    color: #fff;
    font-size: 2rem;
    font-weight: bold;
    box-shadow: 0 8px 22px rgba(47, 143, 70, .25);
}

.btn-sort {
    float: right;
    height: 2.4em;
    width: 3em;
    display: flex;
    justify-content: center;
    align-items: center;
}

.btn-sort svg {
    height: 20px;
    width: 20px;
    display: inline-block;
}

.btn-edit {
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
}

.btn-delete {
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
}

.btn-delete:hover,
.btn-edit:hover,
.btn-sort:hover {
    background: var(--surface);
}

.start-button:disabled,
.end-button:disabled {
    box-shadow: none;
}

.start-button:disabled:hover,
.end-button:disabled:hover {
    background: var(--primary);
    opacity: .45;
}

.history>div {
    width: 100%;
}

.history h3 {
    padding: 10px 0;
    gap: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all ease 0.3s;
    cursor: pointer;
}

.history h3 span {
    flex-grow: 1;
}

.history h3 span:first-child {
    padding: 0 20px;
    flex-grow: 2;
}

.history h3 span.monthArrow {
    padding: 0 20px;
    max-width: 20px;
    flex-grow: 2;
}

table {
    width: 100%;
    display: block;
    margin-top: 10px;
    border-radius: 12px;
    transition: all ease 0.6s;
}

.sort tbody {
    flex-direction: column-reverse;
}

tbody,
thead {
    display: flex;
    flex-direction: column;
    flex-wrap: nowrap;
    align-items: stretch;
}

tr {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    border: 1px solid var(--surface-alt);
    border-radius: var(--radius);
    padding: 5px 10px;
}

.history tbody tr:hover {
    border: 1px dotted var(--primary);
    background: var(--surface);
}

th {
    padding: 5px 0;
}

td,
th {
    display: block;
    text-align: left;
    min-width: 104px;
    width: 25%;
}



.monthArrow {
    display: inline-block;
    transition: all ease 0.3s;
    color: black;
}

.open .monthArrow {
    transition: all ease 0.3s;
}