body {
    margin: 0;
    font-family: Montserrat, sans-serif;
    background: #f4f6fa;
    color: #1f2937;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 20px;
}

h1 {
    margin-top: 0;
    margin-bottom: 20px;
}

.info {
    background: #ffffff;
    border-left: 4px solid #2563eb;
    padding: 14px 16px;
    border-radius: 10px;
    margin-bottom: 20px;
}

.sektion {
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 4px 18px rgba(0,0,0,0.06);
    padding: 16px;
    margin-bottom: 24px;
}

.sektion-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.sektion-header-hoger {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.view-toggle {
    display: inline-flex;
    background: #e2e8f0;
    border-radius: 10px;
    padding: 4px;
    gap: 4px;
}

.view-btn {
    border: 0;
    background: transparent;
    color: #334155;
    padding: 8px 12px;
    border-radius: 8px;
    font: inherit;
    cursor: pointer;
    font-weight: 600;
}

.view-btn.active {
    background: #ffffff;
    box-shadow: 0 1px 3px rgba(0,0,0,0.12);
}

.ny-knapp {
    border: 0;
    background: #16a34a;
    color: white;
    padding: 10px 14px;
    border-radius: 10px;
    font-weight: bold;
    cursor: pointer;
}

.ny-knapp:hover {
    background: #15803d;
}

.lista-wrap {
    margin-bottom: 16px;
}

.aktivitetslista,
.intresselista {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    overflow: hidden;
}

.aktivitetslista th,
.aktivitetslista td,
.intresselista th,
.intresselista td {
    padding: 8px 10px;
    border-bottom: 1px solid #e5e7eb;
    text-align: left;
    vertical-align: middle;
    line-height: 1.2;
}

.aktivitetslista th,
.intresselista th {
    background: #f8fafc;
    font-weight: 700;
    color: #334155;
    white-space: nowrap;
}

.aktivitetslista td,
.intresselista td {
    font-size: 12px;
}

.aktivitetslista tr:last-child td,
.intresselista tr:last-child td {
    border-bottom: 0;
}

.lista-rad:hover td {
    background: #fafafa;
}

.lista-oppen-knapp {
    border: 0;
    background: transparent;
    padding: 0;
    margin: 0;
    font: inherit;
    color: #1d4ed8;
    cursor: pointer;
    text-align: left;
}

.lista-oppen-knapp:hover {
    text-decoration: underline;
}

.lista-hjalptext {
    margin: 8px 2px 0;
    font-size: 13px;
    color: #64748b;
}

.kortlista {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.aktivitet-kort,
.intresse-kort {
    border: 1px solid grey;
    border-radius: 14px;
    background: #fafafa;
    overflow: hidden;
    transition: box-shadow 0.15s ease, transform 0.15s ease;
}

.aktivitet-kort:hover,
.intresse-kort:hover {
    box-shadow: 0 8px 22px rgba(0,0,0,0.08);
}

.kort-topp {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 14px;
    background: #f1f5f9;
    border-bottom: 1px solid #e5e7eb;
    cursor: pointer;
}

.kort-topp-hoger {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.kort-id {
    font-weight: bold;
}

.kort-sub {
    font-size: 14px;
    color: #64748b;
    margin-top: 2px;
}

.save-status {
    min-width: 52px;
    font-size: 13px;
    color: #6b7280;
}

.save-status.saving {
    color: #d97706;
    font-weight: bold;
}

.save-status.saved {
    color: #16a34a;
    font-weight: bold;
}

.save-status.error {
    color: #dc2626;
    font-weight: bold;
}

.radera-knapp {
    border: 0;
    background: #dc2626;
    color: #fff;
    border-radius: 8px;
    padding: 8px 12px;
    cursor: pointer;
    font-weight: bold;
}

.radera-knapp:hover {
    background: #b91c1c;
}

.kort-synlig {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    padding: 14px;
    background: #fff;
}

.aktivitet-kort .kort-synlig {
    grid-template-columns: 2fr 1.5fr;
}

.kort-detaljer {
    display: none;
    padding: 14px;
    border-top: 1px solid #e5e7eb;
    background: #fcfcfc;
}

.aktivitet-kort.open .kort-detaljer,
.intresse-kort.open .kort-detaljer {
    display: block;
}

.fält-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 14px;
}

.intresse-kort .fält-grid {
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.fält {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.fält label {
    font-size: 14px;
    font-weight: bold;
    color: #374151;
}

.form-rubrikrad {
    grid-column: 1 / -1;
    margin-top: 8px;
    padding-top: 10px;
    border-top: 1px solid #dbe3ee;
}

.form-rubrikrad p {
    margin: 0;
    font-weight: 700;
    color: #334155;
}

input,
select,
textarea,
button {
    
    box-sizing: border-box;
    padding: 9px 10px;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    font: inherit;
    background: #fff;
}

textarea {
    min-height: 90px;
    resize: vertical;
}

.checkbox-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 42px;
}

.checkbox-wrap input {
    width: auto;
}

.plats-wrapper {
    position: relative;
}

.plats-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    max-height: 180px;
    overflow-y: auto;
    z-index: 100;
    display: none;
}

.plats-option {
    padding: 8px 10px;
    cursor: pointer;
}

.plats-option:hover {
    background: #f1f5f9;
}

.status-bokat-wrap {
    display: flex;
    align-items: center;
}

.status-check-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #fff;
    border: 1px solid #cbd5e1;
    border-radius: 999px;
    padding: 6px 10px;
    white-space: nowrap;
    cursor: pointer;
}

.status-check {
    width: auto;
    margin: 0;
}

.status-check-text {
    font-size: 14px;
    font-weight: 600;
    color: #374151;
}

.color-input {
    width: 60px;
    min-width: 60px;
    height: 42px;
    padding: 4px;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    background: #fff;
    cursor: pointer;
}

.color-input::-webkit-color-swatch-wrapper {
    padding: 0;
}

.color-input::-webkit-color-swatch {
    border: 0;
    border-radius: 6px;
}

.color-input::-moz-color-swatch {
    border: 0;
    border-radius: 6px;
}

.inriktning-grupp {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding-top: 4px;
}

.inriktning-val {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 10px;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    background: #fff;
    cursor: pointer;
}

.inriktning-val input {
    width: auto;
    margin: 0;
}

.plats-konflikt {
    margin: 0 14px 14px 14px;
    padding: 10px 12px;
    border: 1px solid #f59e0b;
    background: #fffbeb;
    color: #92400e;
    border-radius: 10px;
    font-size: 14px;
}

.plats-konflikt strong {
    display: block;
    margin-bottom: 6px;
}

.plats-konflikt ul {
    margin: 6px 0 0 18px;
    padding: 0;
}

.veckotider-wrap {
    grid-column: 1 / -1;
    overflow-x: auto;
}

.veckotider-tabell {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    border: 1px solid #dbe3ee;
    border-radius: 12px;
    overflow: hidden;
}

.veckotider-tabell th,
.veckotider-tabell td {
    padding: 10px;
    border-bottom: 1px solid #e5e7eb;
    text-align: left;
    vertical-align: middle;
}

.veckotider-tabell th {
    background: #f8fafc;
    font-weight: 700;
    color: #334155;
}

.veckotider-tabell tr:last-child td {
    border-bottom: 0;
}

.veckotider-tabell .dagcell {
    font-weight: 600;
    white-space: nowrap;
    min-width: 110px;
}

.veckotider-tabell input[type="time"] {
    min-width: 120px;
}

.anteckningsblock,
.logg-block {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.ny-anteckning-rad {
    display: grid;
    grid-template-columns: 180px 1fr 190px;
    gap: 10px;
    align-items: start;
    background: #fff;
    border: 1px solid #dbe3ee;
    border-radius: 12px;
    padding: 12px;
}

.ny-logg-rad {
    display: grid;
    grid-template-columns: 180px 1fr 180px;
    gap: 10px;
    align-items: start;
    background: #fff;
    border: 1px solid #dbe3ee;
    border-radius: 12px;
    padding: 12px;
}

.anteckning-spara-knapp,
.spara-anteckning-rad-knapp,
.redigera-anteckning-knapp,
.logg-spara-knapp,
.spara-logg-rad-knapp,
.redigera-logg-knapp {
    cursor: pointer;
    background: #2563eb;
    color: #fff;
    border: 0;
}

.anteckning-spara-knapp,
.spara-anteckning-rad-knapp,
.redigera-anteckning-knapp {
    border-radius: 10px;
    padding: 10px 12px;
}

.redigera-anteckning-knapp,
.redigera-logg-knapp {
    width: auto;
    padding: 8px 12px;
    background: #0f766e;
}

.anteckning-lista,
.logg-lista {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.anteckning-rad,
.logg-rad {
    background: #fff;
    border: 1px solid #dbe3ee;
    border-radius: 12px;
    padding: 12px;
}

.anteckning-visning,
.logg-visning {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

.anteckning-rad-text,
.logg-rad-text {
    white-space: pre-wrap;
}

.anteckning-redigera {
    margin-top: 10px;
    display: grid;
    grid-template-columns: 180px 1fr 160px;
    gap: 10px;
    align-items: start;
}

.logg-redigera {
    margin-top: 10px;
    display: grid;
    grid-template-columns: 180px 1fr 160px;
    gap: 10px;
    align-items: start;
}

.ingen-anteckning,
.ingen-logg {
    margin: 0;
    color: #64748b;
}

.readonly-ja-nej {
    width: 100%;
    box-sizing: border-box;
    padding: 9px 10px;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    background: #f8fafc;
    color: #374151;
    min-height: 42px;
    display: flex;
    align-items: center;
}

.ledare-status {
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 700;
}

.ledare-status.ja {
    background: #dcfce7;
    color: #166534;
}

.ledare-status.nej {
    background: #fee2e2;
    color: #991b1b;
}

.intresselista th {
    cursor: pointer;
    user-select: none;
}

.intresselista th.sort-asc::after {
    content: " ↑";
}

.intresselista th.sort-desc::after {
    content: " ↓";
}

.intresselista tr.jobbar-ja td {
    background: #dcfce7;
}

.intresselista tr.jobbar-nej td {
    background: transparent;
}

.intresselista tr.jobbar-ja:hover td,
.intresselista tr.jobbar-nej:hover td {
    filter: brightness(0.98);
}

@media (max-width: 800px) {
    .kort-synlig,
    .aktivitet-kort .kort-synlig {
        grid-template-columns: 1fr;
    }

    .kort-topp {
        flex-wrap: wrap;
    }

    .kort-topp-hoger {
        width: 100%;
        justify-content: right;
    }

    .ny-anteckning-rad,
    .anteckning-redigera,
    .ny-logg-rad,
    .logg-redigera {
        grid-template-columns: 1fr;
    }

    .anteckning-visning,
    .logg-visning {
        flex-direction: column;
        align-items: stretch;
    }

    .sektion-header-hoger {
        width: 100%;
        justify-content: space-between;
    }

    .aktivitetslista th,
    .aktivitetslista td {
        padding: 7px 8px;
        font-size: 13px;
    }

    .intresselista th,
    .intresselista td {
        padding: 7px 8px;
        font-size: 11px;
    }
  h1 {
    margin-top: 0;
    margin-bottom: 20px;
    margin-left: 50px;
    font-size: 25px;
}
}
.lista-toolbar {
    margin-bottom: 10px;
}

.lista-sok {
    max-width: 360px;
}

.aktivitetslista th {
    cursor: pointer;
    user-select: none;
}

.aktivitetslista th.sort-asc::after {
    content: " ↑";
}

.aktivitetslista th.sort-desc::after {
    content: " ↓";
}

.lista-toolbar {
    margin-bottom: 12px;
}

.gemensam-sok {
    max-width: 420px;
}