html, body, div, span, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
abbr, address, cite, code,
del, dfn, em, img, ins, kbd, q, samp,
small, strong, sub, sup, var,
b, i,
dl, dt, dd, ol, ul, li,
fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td,
article, aside, canvas, details, figcaption, figure,
footer, header, hgroup, menu, nav, section, summary,
time, mark, audio, video {
    margin:0;
    padding:0;
    border:0;
    outline: 0;
    font-size:100%;
    vertical-align:baseline;
    background:transparent;
}

body {
    line-height:1;
}

article,aside,details,figcaption,figure,
footer,header,hgroup,menu,nav,section {
    display:block;
}

nav ul {
    list-style:none;
}

blockquote, q {
    quotes:none;
}

blockquote:before, blockquote:after,
q:before, q:after {
    content:'';
    content:none;
}

a {
    margin:0;
    padding:0;
    font-size:100%;
    vertical-align:baseline;
    background:transparent;
}

/* change colours to suit your needs */
ins {
    background-color:#ff9;
    color:#000;
    text-decoration:none;
}

/* change colours to suit your needs */
mark {
    background-color:#ff9;
    color:#000;
    font-style:italic;
    font-weight:bold;
}

del {
    text-decoration: line-through;
}

abbr[title], dfn[title] {
    border-bottom:1px dotted;
    cursor:help;
}

table {
    border-collapse:collapse;
    border-spacing:0;
}

/* change border colour to suit your needs */

body {
    background-color: #eee;
}

.wrapper-login {
    display: flex;
    flex-direction: column;   /* stack logo above form */
    align-items: center;
    gap: 30px;               /* 30px space between logo and form */
}

.logo-img {
    width: 520px;
    height: 130px;
    object-fit: contain;
}

.login-form {
    width: 400px;
    height: 300px;
    background: white;
    border-radius: 12px;
    padding: 30px;
    box-sizing: border-box;
    box-shadow: 0 0 15px rgba(0,0,0,0.1);
}

.login-form h1 {
    margin-bottom: 30px;
    text-align: center;
}

.login-form form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.login-form input {
    padding: 14px;
    font-size: 16px;
    border: 1px solid #ccc;
    border-radius: 8px;
}

.login-form button {
    padding: 14px;
    font-size: 16px;
    border: none;
    border-radius: 8px;
    background: #2d6cdf;
    color: white;
    cursor: pointer;
}

.login-form button:hover {
    background: #1f56b5;
}

/* TOP BAR */
.topbar {
    display: grid;
    grid-template-columns: 260px 1fr 220px;
    align-items: center;
    padding: 20px 40px;
    background: white;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
}

.top-logo {
    width: 260px;   /* 50% of 520 */
    height: 65px;   /* 50% of 130 */
    object-fit: contain;
}

.welcome-section {
    text-align: center;
}

.welcome-section h1 {
    margin: 0 0 15px;
}

.level-box {
    max-width: 350px;
    margin: auto;
}

.progress-bar {
    width: 100%;
    height: 20px;
    background: #ddd;
    border-radius: 30px;
    overflow: hidden;
    margin: 8px 0;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(to right, #2d6cdf, #54a3ff);
}

/* RIGHT BUTTONS */
.top-buttons {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

.btn {
    text-decoration: none;
    padding: 10px 18px;
    border-radius: 8px;
    color: white;
    font-weight: bold;
}

.logout-btn {
    background: #d9534f;
}

.admin-btn {
    background: #444;
}

/* MAIN CARDS */
.dashboard {
    display: flex;
    justify-content: center;
    gap: 30px;
    padding: 40px;
}

.card {
    width: 320px;
    height: 600px;
    overflow-x: auto;
    background: white;
    border-radius: 14px;
    padding: 25px;
    box-shadow: 0 0 15px rgba(0,0,0,0.08);
}

.card h2 {
    text-align: center;
    margin-top: 0;
    margin-bottom: 10px;
}

/* TASKS */
.task-row {
    padding: 15px;
    margin-bottom: 15px;
    border-radius: 10px;
    background: #f7f9fc;
    border: 1px solid #e0e0e0;
}

.task-btn {
    display: inline-block;
    margin-top: 10px;
    padding: 8px 14px;
    background: #2d6cdf;
    color: white;
    border-radius: 8px;
    text-decoration: none;
}

.task-btn-un {
    display: inline-block;
    margin-top: 10px;
    padding: 8px 14px;
    background: #5e6777;
    color: white;
    border-radius: 8px;
    text-decoration: none;
}

.inv-gr {
    font-size: 10px;
    color: orange;
}

/* FORM */
.shopping-form {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.shopping-form input {
    flex: 1;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
}

.shopping-form button {
    padding: 10px 14px;
    border: none;
    border-radius: 8px;
    background: #2d6cdf;
    color: white;
    cursor: pointer;
    font-weight: bold;
}

.shopping-form button:hover {
    background: #1f56b5;
}

/* LIST */
.shopping-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.shopping-item {
    display: flex;
    align-items: center;
    gap: 8px;

    padding: 10px 12px;
    border-radius: 10px;
    background: #f7f9fc;
    border: 1px solid #e6e6e6;

    transition: 0.15s ease;
}

.shopping-item:hover {
    background: #eef3ff;
    transform: translateX(3px);
}

.bullet {
    color: #2d6cdf;
    font-weight: bold;
}

.text {
    flex: 1;
}

.meta {
    font-size: 12px;
    color: #888;
}

.remove-btn {
    color: red;
    font-size: 12px;
    text-decoration: none;
}

/* TABS */
.tab-header {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.tab-btn {
    flex: 1;
    padding: 12px;
    border: none;
    border-radius: 10px;
    background: #e9edf3;
    cursor: pointer;
    font-weight: bold;
    transition: 0.2s ease;
}

.tab-btn.active {
    background: #2d6cdf;
    color: white;
}

.tab-content {
    display: none;
}

.active-tab {
    display: block;
}

/* ITEMS */
.store-item {
    display: flex;
    justify-content: space-between;
    align-items: center;

    padding: 14px;
    margin-bottom: 15px;

    border-radius: 12px;
    background: #f7f9fc;
    border: 1px solid #e4e8ef;
}

.store-item span {
    font-size: 13px;
    color: #777;
}

/* BUTTONS */
.buy-btn,
.claim-btn,
.buy-btn-dis {
    border: none;
    padding: 10px 14px;
    border-radius: 8px;
    color: white;
    font-weight: bold;
    cursor: pointer;
}

.buy-btn {
    background: #2d6cdf;
}

.buy-btn:hover {
    background: #1f56b5;
}

.buy-btn-dis {
    background: #5e6777;
}

.claim-btn {
    background: #28a745;
}

.claim-btn:hover {
    background: #218838;
}

/* =========================
   MEAL SCHEDULE CONTAINER
========================= */
.meal-wrapper {
    width: 1170px;                 /* matches 3 cards width */
    margin: 0 auto 50px;
    background: white;
    border-radius: 18px;
    padding: 30px;
    box-sizing: border-box;
    box-shadow: 0 8px 24px rgba(0,0,0,0.08);
}

/* =========================
   TOP BAR
========================= */
.meal-topbar {
    display: grid;
    grid-template-columns: 80px 1fr 80px;
    align-items: center;
    margin-bottom: 30px;
}

.meal-topbar h2 {
    margin: 0;
    text-align: center;
    font-size: 28px;
}

.week-btn {
    display: flex;
    justify-content: center;
    align-items: center;

    width: 52px;
    height: 52px;

    background: #2d6cdf;
    color: white;
    text-decoration: none;
    font-size: 22px;
    border-radius: 12px;
    font-weight: bold;

    transition: 0.2s ease;
}

.week-btn:hover {
    background: #1f56b5;
    transform: translateY(-2px);
}

.meal-topbar a:last-child {
    justify-self: end;
}

/* =========================
   DAYS GRID
========================= */
.meal-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 15px;
}

/* =========================
   EACH DAY CARD
========================= */
.meal-day {
    background: #f8faff;
    border: 1px solid #e3e8f2;
    border-radius: 14px;
    padding: 14px;
    min-height: 320px;

    display: flex;
    flex-direction: column;
    gap: 12px;
}

.meal-day h3:first-child {
    margin: 0 0 8px;
    text-align: center;
    font-size: 16px;
    color: #333;
    padding-bottom: 10px;
    border-bottom: 1px solid #e2e7f0;
}

/* =========================
   MEAL BLOCKS
========================= */
.meal-form {
    background: white;
    border-radius: 12px;
    padding: 14px;
    border: 1px solid #edf1f7;
    box-shadow: 0 2px 6px rgba(0,0,0,0.04);

    flex: 1;

    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

.meal-form h2 {
    margin: 0 0 12px;
    font-size: 16px;
    color: #2d6cdf;
    text-align: center;
}

.meal-form h3 {
    margin: 0;
    font-size: 14px;
    font-weight: normal;
    color: #444;
    line-height: 1.5;
    text-align: center;
    word-break: break-word;
}

/* Empty meal text */
.meal-form h3:empty::before {
    content: "Ingen planerad";
    color: #aaa;
    font-style: italic;
}

/* =========================
   MOBILE
========================= */
@media (max-width: 1200px) {
    .meal-wrapper {
        width: 95%;
    }

    .meal-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 700px) {
    .meal-grid {
        grid-template-columns: 1fr;
    }
}