:root {
    --color-bg: #111417;
    --color-surface: #1c2026;
    --color-light: #f4f0df;
    --color-accent: #2f5b3c;
}

body {
    font-family: "Segoe UI", Arial, sans-serif;
    margin: 0;
    min-height: 100vh;
    background: var(--color-bg);
    color: var(--color-light);
}

nav {
    display: flex;
    justify-content: flex-end;
    gap: 16px;
    padding: 20px 40px;
    background: rgba(17, 20, 23, 0.9);
    border-bottom: 1px solid rgba(244, 240, 223, 0.08);
}

nav a {
    color: var(--color-light);
    text-decoration: none;
    font-weight: 600;
    letter-spacing: 0.5px;
    padding-bottom: 4px;
    border-bottom: 2px solid transparent;
    transition: opacity 0.2s ease, border-bottom 0.2s ease;
}

nav a:hover,
nav a:focus {
    opacity: 0.75;
    border-bottom: 2px solid var(--color-accent);
}

.flash {
    max-width: 480px;
    margin: 20px auto;
    padding: 14px 18px;
    background: rgba(255, 153, 0, 0.08);
    border: 1px solid rgba(255, 153, 0, 0.4);
    border-radius: 10px;
    backdrop-filter: blur(6px);
}

.flash.success {
    background: rgba(76, 175, 80, 0.1);
    border: 1px solid rgba(76, 175, 80, 0.4);
    color: #81c784;
}

.flash.warning {
    background: rgba(255, 152, 0, 0.1);
    border: 1px solid rgba(255, 152, 0, 0.4);
    color: #ffb74d;
}

.flash.error {
    background: rgba(244, 67, 54, 0.1);
    border: 1px solid rgba(244, 67, 54, 0.4);
    color: #e57373;
}

.flash.info {
    background: rgba(33, 150, 243, 0.1);
    border: 1px solid rgba(33, 150, 243, 0.4);
    color: #64b5f6;
}

.download-link {
    color: var(--color-accent) !important;
    text-decoration: underline;
    font-weight: 600;
    transition: color 0.2s ease;
}

.download-link:hover {
    color: rgba(47, 91, 60, 0.8) !important;
    text-decoration: underline;
}

.form-container,
.upload-container {
    max-width: 480px;
    margin: 60px auto;
    padding: 32px;
    background: var(--color-surface);
    border-radius: 18px;
    border: 1px solid rgba(244, 240, 223, 0.08);
}

h2 {
    margin-top: 0;
    font-size: 1.8rem;
    letter-spacing: 0.6px;
}

form div {
    margin-bottom: 16px;
}

label {
    display: block;
    margin-bottom: 6px;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: rgba(244, 240, 223, 0.7);
}

input,
button {
    width: 100%;
    border-radius: 10px;
    border: none;
    font-size: 1rem;
}

input {
    padding: 12px;
    background: rgba(244, 240, 223, 0.02);
    color: var(--color-light);
    border: 1px solid rgba(244, 240, 223, 0.12);
    transition: border 0.2s ease, background 0.2s ease;
}

input:focus {
    outline: none;
    border: 1px solid var(--color-accent);
    background: rgba(47, 91, 60, 0.08);
}

button {
    padding: 14px;
    margin-top: 10px;
    background: var(--color-accent);
    color: var(--color-light);
    font-weight: 600;
    cursor: pointer;
    border-radius: 12px;
    border: none;
    transition: transform 0.15s ease, opacity 0.15s ease;
}

button:hover {
    transform: translateY(-1px);
    opacity: 0.9;
}

.btn-primary {
    background: var(--color-accent);
}

.btn-secondary {
    background: transparent;
    border: 1px solid rgba(244, 240, 223, 0.2);
    color: var(--color-light);
}

.btn-secondary:hover {
    background: rgba(244, 240, 223, 0.05);
    border-color: rgba(244, 240, 223, 0.35);
}

.action-buttons {
    display: flex;
    gap: 12px;
    margin-top: 16px;
}

.action-buttons button {
    flex: 1;
    margin-top: 0;
    width: auto;
}

/* Modal for eksport-valg */
.modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-card {
    background: var(--color-surface);
    border-radius: 16px;
    border: 1px solid rgba(244, 240, 223, 0.15);
    padding: 24px 24px 20px;
    max-width: 520px;
    width: 100%;
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.6);
}

.modal-card h3 {
    margin-top: 0;
    margin-bottom: 8px;
    font-size: 1.3rem;
}

.modal-card p {
    margin-top: 0;
    margin-bottom: 14px;
    font-size: 0.95rem;
    color: rgba(244, 240, 223, 0.75);
    white-space: pre-line;
}

.modal-field {
    margin-bottom: 18px;
}

.modal-field label {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: rgba(244, 240, 223, 0.6);
    margin-bottom: 6px;
    display: block;
}

.modal-field input {
    width: 100%;
    padding: 10px 12px;
    border-radius: 10px;
    border: 1px solid rgba(244, 240, 223, 0.18);
    background: rgba(244, 240, 223, 0.02);
    color: var(--color-light);
}

.modal-field input:focus {
    outline: none;
    border-color: var(--color-accent);
    background: rgba(47, 91, 60, 0.08);
}

.modal-hint {
    display: block;
    margin-top: 6px;
    font-size: 0.8rem;
    color: rgba(244, 240, 223, 0.6);
}

.modal-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    flex-wrap: wrap;
}

.modal-actions button {
    width: auto;
    flex: 0 0 auto;
    padding-inline: 16px;
}

.helper-link {
    margin-top: 18px;
    font-size: 0.95rem;
    color: rgba(244, 240, 223, 0.7);
    text-align: center;
}

.helper-link a {
    color: var(--color-light);
    text-decoration: none;
}

.helper-link a:hover {
    opacity: 0.75;
}

.file-note {
    margin-top: 8px;
    margin-bottom: 20px;
    font-size: 0.85rem;
    color: rgba(244, 240, 223, 0.7);
    font-style: italic;
    padding: 8px 12px;
    background: rgba(244, 240, 223, 0.04);
    border-left: 3px solid var(--color-accent);
    border-radius: 4px;
}

.user-form {
    margin-bottom: 32px;
}

.user-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.user-card {
    padding: 12px 16px;
    border: 1px solid rgba(244, 240, 223, 0.1);
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    background: rgba(244, 240, 223, 0.02);
}

.user-card strong {
    color: var(--color-light);
}

.user-card span {
    color: rgba(244, 240, 223, 0.65);
    font-size: 0.9rem;
}

.user-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.password-form {
    display: flex;
    gap: 12px;
    align-items: flex-end;
    flex-wrap: wrap;
}

.password-form button {
    flex: 0 0 auto;
}

.inline-input input {
    min-width: 180px;
}

.inline-input label {
    display: block;
    font-size: 0.75rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: rgba(244, 240, 223, 0.55);
    margin-bottom: 6px;
}

.delete-form {
    margin: 0;
}

.danger-link {
    background: transparent;
    border: none;
    color: #c2563a;
    font-weight: 600;
    cursor: pointer;
    padding: 6px 10px;
    border-radius: 6px;
    transition: background 0.2s ease, color 0.2s ease;
}

.danger-link:hover {
    background: rgba(194, 86, 58, 0.15);
    color: #e37458;
}

/* Export-liste */
.export-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 16px;
}

.export-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px;
    border-radius: 10px;
    border: 1px solid rgba(244, 240, 223, 0.1);
    background: rgba(244, 240, 223, 0.02);
}

.export-meta {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.export-meta span {
    font-size: 0.8rem;
    color: rgba(244, 240, 223, 0.6);
}