:root {
    --bg: #0f172a;
    --card: #1c2536;
    --card-alt: #1e293b;
    --accent: #38bdf8;
    --text: #e2e8f0;
    --row1: #1e293b;
    --row2: #2a364a;
}

/* RESET */
* {
    box-sizing: border-box;
}

/* BODY */
body {
    margin: 0;
    font-family: Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
    overflow-x: hidden;
  overflow-y: scroll;

}

/* HEADER */
header {
    background: var(--card-alt);
    padding: 1rem 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
}

.logo {
    font-weight: bold;
}

Färdig CSS:
/* NAV - desktop */
nav {
    display: flex;
    gap: 20px;
}

nav a {
    color: var(--text);
    text-decoration: none;
    padding: 5px 10px;
}

nav a:hover {
    color: var(--accent);
}

/* HAMBURGER - alltid dold på stora skärmar */
.menu-toggle {
    display: none;
    font-size: 26px;
    cursor: pointer;
}

/* HAMBURGER + VERTIKAL NAV PÅ MELLAN-STOR SKÄRM */
@media (max-width: 900px) {
    .menu-toggle {
        display: block;
    }

    nav {
        position: absolute;
        top: 60px; /* justera efter headerns höjd */
        left: 0;
        right: 0;
        flex-direction: column;
        background: var(--card-alt);
        display: none; /* visas när .active */
        box-shadow: 0 4px 8px rgba(0,0,0,0.3);
        z-index: 100;
        gap: 0;
    }

    nav.active {
        display: flex;
    }

    nav a {
        padding: 12px 20px;
        border-bottom: 1px solid rgba(255,255,255,0.1);
        width: 100%;
    }
}
/* CONTAINER */
.container {
    padding: 20px;
    max-width: 1000px;
    margin: auto;
    padding-bottom: 80px;
}

/* CARD */
.card {
    background: var(--card);
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 20px;
}

.react-btn {
     background: transparent !important;
    border: none;
    cursor: pointer; /* för att få pekaren att ändras vid hover */
    font-size: 1em;  /* valfritt, justerar textstorlek */
    padding: 0;      /* tar bort inre marginal */
}

/* FOOTER */
footer {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: rgba(30, 41, 59, 0.95);
    backdrop-filter: blur(6px);
    text-align: center;
    padding: 10px;
    font-size: 14px;
    border-top: 1px solid rgba(255,255,255,0.1);
}



/* TABLE */
table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
    color: var(--text);
}

table thead {
    background: var(--bg);
}

table th,
table td {
    padding: 10px;
    text-align: left;
}

table tbody tr:nth-child(odd) {
    background-color: var(--row1);
}

table tbody tr:nth-child(even) {
    background-color: var(--row2);
}

table a {
    color: var(--accent);
    text-decoration: none;
}

table a:hover {
    text-decoration: underline;
}
@media (max-width: 900px) {
    td[data-label]::before {
        background: transparent !important;
        color: inherit !important; /* Behåll textfärg */
        content: attr(data-label); /* se till att texten fortfarande visas */
        font-weight: normal;
        display: block;
        padding: 0;
        margin: 0;
    }
}


input:-webkit-autofill,
textarea:-webkit-autofill {
    -webkit-box-shadow: 0 0 0 1000px var(--row2) inset !important;
    -webkit-text-fill-color: var(--text) !important;
}

/* FORM GENERELL */
form input[type=text],
form input[type=password],
form textarea {
    width: 100%;
    padding: 8px;
    margin-top: 5px;
    margin-bottom: 15px;
    border-radius: 5px;
    border: 1px solid #555;
    background: var(--row2) !important;
    color: var(--text) !important;
    font-size: 14px;
    -webkit-appearance: none;
    -moz-appearance: appearance: none !important;
    appearance: none;
}
form button {
    padding: 8px 15px;
    border: none;
    border-radius: 5px;
    background: var(--accent);
    color: #fff;
    cursor: pointer;
}

form button:hover {
    background: #38bdf8;
}

/* FLEXFORM FÖR REGLER */
.rule-form {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
    margin-bottom: 15px;
}

.rule-card {
    margin-bottom: 15px;
    background: var(--row1);
    padding: 5px;
    border-radius: 5px;
}

.rule-card h4 {
    font-size: 16px;
    margin: 2px 0;
}

.rule-card p {
    font-size: 11px;
    color: #ccc;
    margin: 0 !important;
}

.rule-card a {
    display: inline-block;
    margin-right: 10px;
    color: #38bdf8;
    font-weight: bold;
    text-decoration: none;
    transition: color 0.2s;
}

.rule-card a:hover {
    text-decoration: underline;
}

.rule-card a .fa-trash {
    color: red;
}

.rule-card a .fa-edit {
    color: #38bdf8;
}

.cancel-link {
    color: #ccc !important;
}

/* LÄNKAR FÖR ADMIN */
.link {
    color: #38bdf8;
    text-decoration: none;
    font-weight: bold;
    transition: all 0.2s;
    cursor: pointer;
}

.link:hover {
    text-decoration: underline;
}

/* FORM FÖR HOME/INFO */
.home-form,
.info-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 15px;
}

.home-form label,
.info-form label {
    font-weight: bold;
    color: #ccc;
    margin-bottom: 3px;
}

.home-form textarea,
.info-form textarea {
    min-height: 100px;
    resize: vertical;
}

.home-card,
.info-card {
    background: var(--row1);
    padding: 10px;
    border-radius: 5px;
    margin-bottom: 15px;
}

/* ADMIN FORM */
.admin-form .admin-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.admin-form .admin-row input,
.admin-form .admin-row select {
    padding: 8px;
    border-radius: 5px;
    border: 1px solid #555;
    background: var(--row2);
    color: var(--text);
    font-size: 14px;
}

.admin-form .admin-row input[name="name"] { flex: 2; }
.admin-form .admin-row input[name="age"] { flex: 1; max-width: 80px; }
.admin-form .admin-row select[name="country"] { flex: 1.5; }
.admin-form .admin-row input[name="role"] { flex: 2; }
.admin-form .admin-row button { flex: 1; }

/* MOBIL */
@media (max-width: 900px) {
    .menu-toggle { display: block; }

    nav {
        position: absolute;
        top: 60px;
        left: 0;
        right: 0;
        width: 100%;
        background: var(--card-alt);
        flex-direction: column;
        padding: 10px 0;
        gap: 10px;
        display: none;
        box-shadow: 0 4px 8px rgba(0,0,0,0.3);
        z-index: 100;
    }

    nav.active { display: flex; }

    nav a { padding: 10px 20px; width: 100%; }

    table, table thead, table tbody, table th, table td, table tr { display: block; }
    table thead { display: none; }
    table tr {
        margin-bottom: 10px;
        border-radius: 6px;
        padding: 10px;
        background-color: var(--row1);
    }
    table td {
        padding-left: 50%;
        text-align: right;
        position: relative;
        border-bottom: 0;
    }
    table td::before {
        content: attr(data-label);
        position: absolute;
        left: 10px;
        top: 10px;
        width: 45%;
        font-weight: bold;
        color: #fff;
        text-align: left;
        background: rgba(0,0,0,0.2);
        padding: 2px 4px;
        border-radius: 4px;
    }

    .admin-form .admin-row { flex-direction: column; align-items: stretch; }
    .admin-form .admin-row input,
    .admin-form .admin-row select,
    .admin-form .admin-row button { flex: unset; width: 100%; }
}



/* =========================
   FORM BASE (INGEN KONFLIKT MED FLEX)
========================= */
form input[type=text],
form input[type=number],
form input[type=password],
form textarea,
form select {
    padding: 8px;
    border-radius: 5px;
    border: 1px solid #555;
    background: var(--row2);
    color: var(--text);
    font-size: 14px;
    box-sizing: border-box;
}

/* Focus */
form input:focus,
form textarea:focus,
form select:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 5px rgba(56, 189, 248, 0.4);
}

/* Remove native select look */
form select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    cursor: pointer;
}


/* =========================
   ADMIN ROW - PIXEL PERFEKT ALIGNMENT
========================= */

.admin-form .admin-row {
    display: flex;
    gap: 10px;
    align-items: stretch;
}

/* hård reset på ALLT */
.admin-form .admin-row input,
.admin-form .admin-row select,
.admin-form .admin-row button {
    height: 38px;
    min-height: 38px;
    max-height: 38px;

    padding: 0 10px;
    margin: 0;

    border-radius: 5px;
    border: 1px solid #555;

    background: var(--row2);
    color: var(--text);

    font-size: 14px;
    line-height: 38px;

    box-sizing: border-box;

    display: flex;
    align-items: center;
}

/* gör att de inte “drar olika höjd” */
.admin-form .admin-row input,
.admin-form .admin-row select {
    flex: 1;
    min-width: 0;
}



/* button fast */
.admin-form .admin-row button {
    flex: 0 0 120px;
    justify-content: center;
    cursor: pointer;
}

/* select fix (detta är ofta boven) */
.admin-form .admin-row select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
}

/* focus */
.admin-form .admin-row input:focus,
.admin-form .admin-row select:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 5px rgba(56, 189, 248, 0.4);
}

@media (max-width: 900px) {

    .admin-form .admin-row {
        flex-direction: column !important;
    }

    .admin-form .admin-row input,
    .admin-form .admin-row select,
    .admin-form .admin-row button {
        width: 100% !important;
        flex: unset !important;
    }

    /* VIKTIG FIX: override age */
    .admin-form .admin-row input[name="age"] {
        width: 100% !important;
        flex: unset !important;
    }


.admin-form .admin-row {
    display: flex;
    gap: 10px;
}

.admin-form .admin-row input[name="age"] {
    all: unset;
    flex: 1;
    min-width: 0;
    height: 38px;
    padding: 0 10px;
    border: 1px solid #555;
    border-radius: 5px;
    background: var(--row2);
    color: var(--text);
    box-sizing: border-box;
}

.admin-container {
  display: flex;
  flex-direction: column;
  gap: 30px;
}

@media (max-width: 900px) {
    table#list td[data-label] {
        display: block;
        width: 100%;
        background: transparent !important;
        padding: 8px;
        margin-bottom: 5px;
    }
}
/* gör table edit exakt samma look som admin-form */
table input,
table select {
    height: 38px;
    padding: 0 10px;
    border-radius: 5px;
    border: 1px solid #555;
    background: var(--row2);
    color: var(--text);
    font-size: 14px;
    box-sizing: border-box;
    width: 100%;
}

table td input,
table td select {
    width: 100%;
    height: 38px;

    padding: 0 10px;
    margin: 0;

    border-radius: 5px;
    border: 1px solid #555;

    background: var(--row2);
    color: var(--text);

    font-size: 14px;
    box-sizing: border-box;
}

table td input[type="number"] {
    appearance: textfield;
    -moz-appearance: textfield;
    -webkit-appearance: none;
}

table td input:focus,
table td select:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 5px rgba(56, 189, 248, 0.4);
}
/* ==========================
   DATE INPUT - desktop + mobil
========================== */
input[type="date"] {
    appearance: none;           /* standard */
    -webkit-appearance: none;   /* Chrome, Safari */
    -moz-appearance: none;      /* Firefox */
    background-color: var(--row2);
    color: var(--text);
    border: 1px solid #555;
    border-radius: 5px;
    padding: 8px 10px;
    font-size: 14px;
}

/* Kalenderikon på desktop */
input[type="date"]::-webkit-calendar-picker-indicator {
    background-color: var(--row2);
    color: var(--text);
    cursor: pointer;
    border-radius: 0 5px 5px 0;
}





