
@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Manrope:wght@600;700;800&display=swap');

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: #f3f6fa;
    color: #203149;
    font: 14px 'DM Sans', sans-serif;
}

/* SIDEBAR */
.side {
    position: fixed;
    inset: 0 auto 0 0;
    width: 230px;
    background: #142b49;
    color: white;
    padding: 27px 18px;
    display: flex;
    flex-direction: column;
}

.logo {
    font: 800 23px Manrope;
    letter-spacing: 1px;
}

.logo span {
    color: #6db6e9;
}

.side > small {
    color: #8da3bb;
    font-size: 9px;
    letter-spacing: 2px;
    margin: 5px 0 34px;
}

.side > a {
    padding: 13px;
    color: #c3d0df;
    text-decoration: none;
    border-radius: 8px;
    margin: 2px 0;
}

.side > a:hover {
    background: #234465;
    color: white;
}

/* SIDEBAR BOTTOM */
.bottom {
    margin-top: auto;
    border-top: 1px solid #34506c;
    padding: 17px 8px 0;
    display: grid;
    gap: 5px;
}

.bottom small {
    color: #a7b9cc;
    font-size: 10px;
}

.bottom form {
    margin-top: 10px;
}

.bottom button {
    background: none;
    border: 0;
    color: #b8cee2;
    cursor: pointer;
    padding: 0;
}

/* MAIN CONTENT */
main {
    display: block;
    margin-left: 230px;
    width: calc(100% - 230px);
    min-height: 100vh;
    padding: 30px 36px;
}

/* HEADER */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 23px;
}

header small {
    font-size: 9px;
    color: #8495a9;
    letter-spacing: 1.6px;
}

h2 {
    font: 700 25px Manrope;
    margin: 6px 0;
}

.user {
    background: white;
    border: 1px solid #e3eaf1;
    padding: 9px 13px;
    border-radius: 8px;
    color: #61748a;
    font-size: 12px;
}

/* DASHBOARD HERO */
.hero {
    padding: 30px 34px;
    border-radius: 14px;
    background: linear-gradient(110deg, #173552, #286da2);
    color: white;
}

.hero small {
    letter-spacing: 2px;
    color: #b5d4ed;
}

.hero h1 {
    font: 800 28px Manrope;
    line-height: 1.25;
    margin: 10px 0;
}

.hero p {
    color: #d4e5f2;
}

/* DASHBOARD CARDS */
.cards {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
    margin: 18px 0;
}

.card,
.panel {
    background: white;
    border: 1px solid #e5ebf2;
    border-radius: 11px;
    box-shadow: 0 3px 12px #233c5908;
}

.card {
    padding: 18px;
    color: inherit;
    text-decoration: none;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.card small {
    color: #64788d;
}

.card strong {
    font: 800 28px Manrope;
    margin-top: 8px;
}

.card span {
    font-size: 11px;
    color: #9aa7b5;
}

.card b {
    border-top: 1px solid #edf0f4;
    padding-top: 12px;
    margin-top: 8px;
    color: #2468a5;
}

/* PANELS */
.panel {
    margin-top: 18px;
    padding: 20px;
}

.panel h3 {
    font: 700 16px Manrope;
    margin: 0 0 16px;
}

.scroll {
    overflow: auto;
}

/* TABLE */
table {
    width: 100%;
    border-collapse: collapse;
    white-space: nowrap;
    font-size: 12px;
}

th {
    text-align: left;
    background: #f8fafc;
    color: #8391a2;
    font-size: 10px;
    text-transform: uppercase;
    padding: 13px;
}

td {
    padding: 13px;
    border-top: 1px solid #edf1f5;
}

td small {
    display: block;
    color: #97a4b1;
    margin-top: 3px;
}

.empty {
    text-align: center;
    color: #98a5b3;
    padding: 30px;
}

/* TOOLBAR */
.toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    gap: 12px;
}

.search {
    display: flex;
    gap: 8px;
}

/* INPUTS */
.search input,
input,
select,
textarea {
    padding: 11px;
    border: 1px solid #dce4ed;
    border-radius: 7px;
    font: 13px 'DM Sans';
    background: white;
}

.btn,
button {
    cursor: pointer;
}

.btn {
    display: inline-block;
    padding: 11px 14px;
    border-radius: 7px;
    text-decoration: none;
    font-size: 12px;
    font-weight: 700;
}

.primary {
    background: #2468a5;
    color: white;
    border: 0;
}

.secondary {
    background: white;
    border: 1px solid #dce4ed;
    color: #50647a;
}

.danger {
    border: 0;
    background: none;
    color: #c04e4e;
}

.inline {
    display: inline;
}

/* ENTRY FORM */
.entry h3 {
    margin-bottom: 18px;
}

.fields {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
}

.fields label,
.user-create label {
    display: flex;
    flex-direction: column;
    gap: 7px;
    font-size: 11px;
    font-weight: 700;
    color: #627387;
}

.fields input,
.fields select,
.fields textarea {
    width: 100%;
    font-weight: 400;
}

.wide {
    grid-column: 1 / -1;
}

/* TOTALS */
.totals {
    display: flex;
    justify-content: flex-end;
    gap: 32px;
    background: #f5f8fb;
    padding: 15px;
    margin-top: 20px;
    border-radius: 8px;
}

.totals span {
    display: grid;
    gap: 5px;
    color: #7d8c9c;
    font-size: 11px;
}

.totals b {
    font-size: 14px;
    color: #253b54;
}

.totals span:last-child b {
    font-size: 17px;
    color: #2468a5;
}

/* FORM BUTTONS */
.end {
    display: flex;
    justify-content: flex-end;
    gap: 9px;
    margin-top: 18px;
}

/* USER CREATE */
.user-create {
    display: flex;
    align-items: end;
    gap: 12px;
    flex-wrap: wrap;
}

.user-create label {
    flex: 1;
    min-width: 160px;
}

/* ALERT MESSAGES */
.alert {
    padding: 12px;
    border-radius: 7px;
    margin-bottom: 12px;
}

.success {
    background: #e8f6ed;
    color: #287747;
}

.error {
    background: #fff0ee;
    color: #a9433d;
}

/* LOGIN PAGE */
.login-page {
    min-height: 100vh;
    display: grid;
    place-items: center;
    background: linear-gradient(130deg, #142b49, #286da2);
}

.login-card {
    width: min(420px, calc(100% - 30px));
    background: white;
    border-radius: 16px;
    padding: 34px;
    box-shadow: 0 20px 60px #07182c55;
    display: flex;
    flex-direction: column;
    gap: 13px;
}

.login-card > small {
    color: #8c9aab;
    letter-spacing: 1.5px;
    font-size: 9px;
}

.login-card h2 {
    margin: 14px 0 0;
}

.login-card p {
    color: #7f8fa1;
    margin: 0 0 12px;
}

.login-card label {
    display: flex;
    flex-direction: column;
    gap: 7px;
    font-size: 12px;
    font-weight: 700;
}

.login-card button {
    padding: 13px;
    border-radius: 7px;
    margin-top: 8px;
}

.login-card footer {
    text-align: center;
    color: #9aa6b4;
    font-size: 10px;
    margin-top: 8px;
}

/* TABLET RESPONSIVE */
@media (max-width: 950px) {
    .cards {
        grid-template-columns: repeat(2, 1fr);
    }

    .fields {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* MOBILE RESPONSIVE */
@media (max-width: 650px) {
    .side {
        position: static;
        width: auto;
        display: flex;
        flex-direction: row;
        flex-wrap: wrap;
        padding: 12px;
    }

    .side .logo {
        width: 100%;
    }

    .side > small,
    .bottom {
        display: none;
    }

    .side > a {
        font-size: 11px;
        padding: 8px;
    }

    main {
        margin: 0;
        width: 100%;
        padding: 17px;
    }

    .cards {
        grid-template-columns: 1fr 1fr;
    }

    .toolbar {
        align-items: stretch;
        flex-direction: column;
    }

    .fields {
        grid-template-columns: 1fr;
    }

    .wide {
        grid-column: auto;
    }

    .totals {
        gap: 10px;
        justify-content: space-between;
    }

    .user {
        display: none;
    }
}
