body {
    margin: 0;
    font-family: 'Orbitron', sans-serif;
    background: #0a0a0a url("../img/bg-pattern.png") repeat;
    color: white;
}

header nav {
    background: black;
    border-bottom: 4px solid limegreen;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 30px;
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 30px;
}

.nav-links a {
    text-decoration: none;
    color: limegreen;
    font-weight: bold;
}

main {
    padding: 40px;
    text-align: center;
    max-width: 1200px;           /* Maksimal bredde for main-innhold */
    margin: 0 auto;              /* Sentrer innholdet */
}

footer {
    background: black;
    padding: 30px;
    text-align: center;
    border-top: 4px solid limegreen;
}

.footer-links a {
    color: limegreen;
    text-decoration: none;
    margin: 0 10px;
}

.footer-icons img {
    margin: 10px;
}
.nav-links a {
    text-decoration: none;
    padding: 8px 12px;
    transition: background-color 0.2s, color 0.2s;
}

.nav-links a.active {
    color: limegreen;
}

.nav-links a.external {
    color: white;
}

.nav-links a.external:hover {
    background-color: #222; /* Gråtonet hover-effekt */
    border-radius: 5px;
}
.flash-messages {
    max-width: 600px;
    margin: 0 auto 1rem auto;
    text-align: center;
}

.flash {
    padding: 12px;
    border-radius: 5px;
    margin-bottom: 10px;
    font-weight: bold;
}

.flash.danger {
    background-color: #300;
    color: #f88;
    border: 1px solid #f00;
}
.flash.success {
    background-color: #1d3;
    color: white;
    border: 1px solid #0c0;
}
.flash.info {
    background-color: #027;
    color: #bdf;
}
.flash-messages {
    max-width: 600px;
    margin: 0 auto 1rem auto;
    text-align: center;
}

.flash {
    padding: 12px;
    border-radius: 5px;
    margin-bottom: 10px;
    font-weight: bold;
}

.flash.success {
    background-color: #002d00;
    color: #aaffaa;
    border: 1px solid #00ff00;
}

.flash.info {
    background-color: #003366;
    color: #88ccff;
    border: 1px solid #0099ff;
}

.flash.warning {
    background-color: #332b00;
    color: #ffe066;
    border: 1px solid #ffcc00;
}

.flash.danger {
    background-color: #300;
    color: #f88;
    border: 1px solid #f00;
}
.remove-time-btn {
    background: none;
    border: none;
    color: #ff4444; /* rød X */
    font-size: 1.2rem;
    cursor: pointer;
    margin-left: 8px;
    padding: 0;
    line-height: 1;
    vertical-align: middle;
}

.remove-time-btn:hover {
    color: #ff6666;
}
.application-view {
    max-width: 600px;
    margin: 0 auto;
    text-align: left;
}

.application-view dl {
    display: grid;
    grid-template-columns: max-content 1fr;
    row-gap: 0.5rem;
    column-gap: 1rem;
    margin-bottom: 2rem;
}

.application-view dt {
    font-weight: bold;
}

.application-view dd {
    margin: 0;
}

.application-view ul {
    padding-left: 1.2rem;
    margin-bottom: 2rem;
}
.admin-menu {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    max-width: 600px;
    margin: 2rem auto;
    text-align: center;
}


.admin-button, .dropdown-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-width: 220px;    /* Felles minimumsbredde for like knapper */
    max-width: 300px;    /* Ikke la knapper bli for store */
    min-height: 60px;    /* Felles høyde */
    padding: 1rem;
    background: black;
    border: 2px solid limegreen;
    border-radius: 10px;
    color: limegreen;
    text-decoration: none;
    font-size: 1rem;
    font-family: inherit;
    cursor: pointer;
    transition: background 0.2s, color 0.2s, border-color 0.2s;
    box-sizing: border-box;
    margin: 0 auto;
    font-weight: 500;
}

.admin-button:hover,
.dropdown-toggle:hover,
.admin-button:focus,
.dropdown-toggle:focus {
    background: #111a;
    color: #bfff60;
    border-color: #bfff60;
    text-decoration: none;
}


footer {
    background: black;
    padding: 30px 20px;
    border-top: 4px solid limegreen;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.footer-links {
    display: flex;
    gap: 20px;
}

.footer-links a {
    color: limegreen;
    text-decoration: none;
    font-weight: bold;
}

.footer-icons {
    display: flex;
    gap: 20px;
}

.footer-icons img {
    height: 32px;
    width: 32px;
    fill: white;
    transition: transform 0.2s ease;
}

.footer-icons a:hover img {
    transform: scale(1.1);
}


footer p {
    color: white;
    margin: 0;
    font-size: 0.9rem;
}

@media (max-width: 768px) {
    .button {
        font-family: inherit;
        font-weight: bold;
        padding: 10px 18px;
        border: 2px solid;
        border-radius: 6px;
        cursor: pointer;
        display: inline-block;
        text-align: center;
        text-decoration: none;
        max-width: 320px;        /* ✅ maks bredde */
        width: 100%;             /* ✅ gjør at de skalerer */
        box-sizing: border-box;
        margin: 0.5rem auto;     /* ✅ sentrer og luft */
    }


  .popup-content {
    padding: 1rem;
    font-size: 0.9rem;
  }

  h2 {
    font-size: 1.4rem;
  }
}

.crew-rules {
    text-align: left;
    max-width: 800px;
    margin: 0 auto;
}

.crew-rules .intro {
    margin-bottom: 1rem;
    font-style: italic;
}

.crew-rules .rule {
    background-color: #111;
    border-left: 4px solid limegreen;
    padding: 10px 16px;
    margin-bottom: 12px;
    border-radius: 4px;
}

.crew-rules .rule strong {
    color: limegreen;
    display: block;
    margin-bottom: 4px;
}
.truncate-text {
    max-width: 200px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    cursor: pointer;
    color: #ccc;
}
.popup-overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.75);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}
.popup-content {
    background: #111;
    padding: 20px;
    border: 1px solid limegreen;
    max-width: 500px;
    max-height: 80vh;
    overflow-y: auto;
    border-radius: 6px;
    color: white;
}
.button {
    padding: 10px 18px;
    font-weight: bold;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    font-family: inherit;
    font-size: 1em;
    margin: 4px 6px 0 0;
    transition: background 0.2s, color 0.2s, box-shadow 0.2s;
    box-shadow: 0 2px 6px #0004;
}

.button-approve {
    background: #262;
    color: #aaffaa;
    border: 1.5px solid #33ff33;
}
.button-approve:hover {
    background: #3e3;
    color: white;
}

.button-reject {
    background: #711;
    color: #ffb5b5;
    border: 1.5px solid #ff3333;
}
.button-reject:hover {
    background: #e55;
    color: white;
}

.button-paid {
    background: #14434c;
    color: #50ffd5;
    border: 1.5px solid #16ffd1;
}
.button-paid:hover {
    background: #1d6e7a;
    color: #fff;
}


.button-blue {
    background-color: #0057ff;
    color: white;
    border: 1px solid #003fcc;
}

.button-blue:hover {
    background-color: #336dff;
}
button, .admin-button, .crew-button {
    cursor: pointer;
}

.kontonummer-seksjon {
    margin-bottom: 2em;
    text-align: center;
}
.kontonummer-input {
    font-size: 1em;
    padding: 0.4em 0.8em;
    width: 16em;
    margin-right: 0.8em;
}
.kontonummer-rediger-btn { font-size:1em; }
.ny-soknad-knapp-container { text-align: center; margin-bottom: 1.5em; }
.ny-soknad-btn { font-size:1.1em; padding:0.6em 2em; }

.expense-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 2vw;
}
.expense-col {
    flex: 1 1 240px;
    min-width: 260px;
    background: #181818;
    border-radius: 10px;
    padding: 10px;
    margin-bottom: 2vw;
}
.utlegg-card {
    background: #202020;
    border-radius: 8px;
    padding: 1em 1.2em;
    margin: 0 0 1em 0;
    box-shadow: 0 1px 5px #0003;
}
.utlegg-card.zebra-0 { background: #242424; }
.utlegg-card.zebra-1 { background: #191919; }
.belop-ikke-oppgitt { color: #888; }
.admin-btn-form { display:inline; }
.faktisk-belop { margin:0.7em 0 0.3em 0;}
.kvitteringer-list { margin-bottom: 0.6em; }
.kvitteringer-ul { margin: 0.4em 0 0 0.5em; }
.modal {
    display: none;
    position: fixed; z-index: 99; left: 0; top: 0; width: 100vw; height: 100vh;
    background: rgba(0,0,0,0.5);
    align-items: center;
    justify-content: center;
}
.modal-content {
    background: #252525;
    margin: auto;
    padding: 2em;
    border-radius: 12px;
    width: 95%;
    max-width: 400px;
    box-shadow: 0 8px 32px #0008;
    position: absolute;
    left: 50%; top: 50%; transform: translate(-50%,-50%);
}
.close { position: absolute; top: 12px; right: 22px; font-size: 1.8em; color: #aaa; cursor: pointer; }
@media (max-width: 900px) {
    .expense-grid { flex-direction: column; }
    .expense-col { min-width: 0; }
}
.expense-col h3 { font-size:1.3em; margin-bottom: 1em; text-align:center; letter-spacing:1px; }
.utlegg-status-pending { color: #ffdc73; }
.utlegg-status-approved { color: #7ed957; }
.utlegg-status-paid { color: #48d1c2; }
.utlegg-status-rejected { color: #fc6868; }
.utlegg-card { border-radius: 10px; padding: 1em 1.2em; margin: 0 0 1em 0; box-shadow: 0 1px 5px #0003; text-align:left; border:1.5px solid #282d31;}
.zebra-0 { background: #242a2f; }
.zebra-1 { background: #16181b; }
.utlegg-label { color: #ccc; font-weight:bold; }
.utlegg-beskrivelse { color: #fff; font-weight: bold; }
.utlegg-sum, .utlegg-actual { color: #ffe066; font-weight:bold; }
.utlegg-bruker, .utlegg-kontonr { color: #60d394; font-weight: bold;}
.utlegg-nick { color: #aaa; }
.utlegg-admin { color: #7ed957; font-weight:bold;}
.kvitt-lenke { color: #40cfff; font-weight: bold; text-decoration: none; }
.kvitt-lenke:hover { text-decoration: underline; }
.kvitt-dato { color: #aaa; font-size: 0.95em; }
.belop-ikke-oppgitt { color: #888; font-style: italic; }
.kvitteringer-list { margin-bottom: 0.5em; margin-top:0.7em; }
.kvitteringer-ul { margin: 0.4em 0 0 0.5em; }

.instant-tooltip {
    position: relative;
    cursor: pointer;
}
.instant-tooltip:hover .tooltip-text {
    display: block;
}
.tooltip-text {
    display: none;
    position: absolute;
    background: #333;
    color: #fff;
    padding: 6px 12px;
    border-radius: 6px;
    left: 50%;
    transform: translateX(-50%);
    top: 110%;
    white-space: nowrap;
    z-index: 100;
    font-size: 0.92em;
    box-shadow: 0 2px 8px #0006;
}

.kvitteringer-ul {
    list-style: none;
    padding-left: 0;
    margin: 0;
}

.dropdown {
    position: relative;
    width: 100%;  /* viktig for at dropdown tar plassen til grid-kolonnen */
}


.dropdown-toggle {
    cursor: pointer;
    position: relative;
}

.dropdown-content {
    display: none;
    position: absolute;
    left: 0;
    right: 0;
    min-width: 100%;
    background: #101010;
    border: 2px solid limegreen;
    border-top: none;
    border-radius: 0 0 10px 10px;
    z-index: 100;
    box-shadow: 0 4px 16px #000c;
    padding: 0;
}


.dropdown-content a {
    color: black;
    padding: 12px 16px;
    text-decoration: none;
    display: block;
}
.dropdown:hover .dropdown-content,
.dropdown:focus-within .dropdown-content {
    display: block;
}

.dropdown-content a.dropdown-link {
    display: block;
    padding: 0.9rem 1rem;
    color: #8affaf;           /* Lys grå tekst istedenfor svart */
    background: transparent;
    border: none;
    text-align: left;
    text-decoration: none;
    font-family: inherit;
    font-size: 1rem;
    opacity: 0.85;
    border-bottom: 1px solid #222;
    border-radius: 0;
    transition: background 0.13s, color 0.13s, opacity 0.13s;
    font-weight: 500;
}
.dropdown-link:last-child {
    border-bottom: none;
}
.dropdown-content a.dropdown-link:hover {
    background: #232b15;
    color: #eaffb7;         /* Lys lime på hover */
    opacity: 1;
}

.dragdrop-area {
    border: 2px dashed #888;
    border-radius: 8px;
    padding: 24px;
    text-align: center;
    margin-bottom: 6px;
    background: #fafafa;
    max-width: 400px;     /* Maksbredde på store skjermer */
    margin-left: auto;    /* Sentrasjon */
    margin-right: auto;
    width: 100%;          /* Full bredde på mobil */
    box-sizing: border-box;
}

@media (max-width: 500px) {
    .dragdrop-area {
        max-width: 100%;
        padding: 12px;
    }
}
.dragdrop-area p, .dragdrop-area strong {
    color: #222;  /* Mørk grå tekst */
}

.status-boks {
    display: inline-block;
    padding: 11px 30px;
    border-radius: 12px;
    font-size: 1.5em;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin: 18px 0 26px 0;
    background: #111;
    border: 3px solid limegreen;
    color: limegreen;
    box-shadow: 0 1px 18px 0 #0f0b;
}
.status-boks.status-godkjent    { border-color: #18dc55; color: #18dc55; }
.status-boks.status-retur       { border-color: #ffb703; color: #ffb703; }
.status-boks.status-kladd,
.status-boks.status-ubesvart    { border-color: #2ec0ff; color: #2ec0ff; }
.status-boks.status-avslått     { border-color: #ff4444; color: #ff4444;}

.btn {
    display: inline-block;
    padding: 8px 16px;
    margin: 4px 2px;
    text-decoration: none;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.btn-primary { background-color: #007bff; color: white; }
.btn-secondary { background-color: #6c757d; color: white; }
.btn-success { background-color: #28a745; color: white; }
.btn-danger { background-color: #dc3545; color: white; }

/* Responsive styling for detaljsider og skjemaer */
.detail-container, .form-container {
    max-width: 800px;
    margin: 0 auto;
    text-align: left;
}

/* Responsive styling for tabeller */
.table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    background: #1a1a1a;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #333;
}

.table th, .table td {
    padding: 12px 15px;
    border-bottom: 1px solid #333;
    text-align: left;
    vertical-align: top;
}

.table th {
    background: #2a2a2a;
    color: limegreen;
    font-weight: bold;
}

.table tr:hover {
    background: #252525;
}

.table a {
    color: #66ddff;
    text-decoration: none;
}

.table a:hover {
    text-decoration: underline;
}

/* Spesifikk styling for admin-tabellen */
.admin-table {
    table-layout: fixed;  /* Faste kolonnebredder */
    min-width: 1000px;    /* Minste bredde for å unngå wrapping */
}

.admin-table th,
.admin-table td {
    padding: 8px 12px;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Responsive breakpoints for tabeller */
@media (max-width: 1200px) {
    main {
        padding: 20px;
        max-width: 100%;
        overflow-x: auto;
    }

    .admin-table {
        min-width: 900px;
    }
}

@media (max-width: 1024px) {
    .admin-table {
        font-size: 0.9rem;
        min-width: 800px;
    }

    .admin-table th, .admin-table td {
        padding: 6px 8px;
    }
}

@media (max-width: 768px) {
    main {
        padding: 15px;
    }

    .admin-table {
        font-size: 0.8rem;
        min-width: 700px;
    }

    .admin-table th, .admin-table td {
        padding: 4px 6px;
    }
}

/* Spesifikk styling for admin utlegg-tabellen */
.admin-utlegg-table {
    table-layout: fixed;
    width: 100%;
    min-width: 1200px;
}

/* Kolonnebredder */
.col-innsender { width: 120px; }
.col-registrert { width: 100px; }
.col-beskrivelse { width: 300px; }
.col-belop { width: 140px; }
.col-adminstatus { width: 180px; }
.col-kommentar { width: 200px; }
.col-vedlegg { width: 100px; }
.col-kvitteringer { width: 120px; }

/* Cellestyling */
.admin-utlegg-table th {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    padding: 12px 8px;
    vertical-align: top;
}

.admin-utlegg-table td {
    padding: 8px;
    vertical-align: top;
    word-wrap: break-word;
}

/* Tekstcontainer for celle-innhold som kan være lang */
.text-container {
    max-height: 3em;
    line-height: 1.4em;
    overflow: hidden;
    word-wrap: break-word;
    hyphens: auto;
}

/* Beløp-container */
.belop-container {
    font-size: 0.9em;
    line-height: 1.3;
}

.belop-container div {
    white-space: nowrap;
}

/* Spesifikke celle-klasser */
.cell-innsender,
.cell-registrert,
.cell-vedlegg,
.cell-kvitteringer {
    white-space: nowrap;
}

.cell-adminstatus {
    font-size: 0.9em;
    line-height: 1.2;
}

/* Responsive breakpoints */
@media (max-width: 1400px) {
    .admin-utlegg-table {
        min-width: 1000px;
        font-size: 0.9em;
    }

    .col-beskrivelse { width: 250px; }
    .col-kommentar { width: 150px; }
}

@media (max-width: 1200px) {
    .admin-utlegg-table {
        min-width: 900px;
        font-size: 0.85em;
    }

    .col-beskrivelse { width: 200px; }
    .col-kommentar { width: 120px; }
    .col-adminstatus { width: 150px; }
}

@media (max-width: 1024px) {
    main {
        padding: 15px;
        overflow-x: auto;
    }

    .admin-utlegg-table {
        min-width: 800px;
        font-size: 0.8em;
    }
}
