.hidden {
    display: none !important;
}

body {
    font-family: Arial, sans-serif;
    background-color: #f4f4f4;
    text-align: center;
    margin: 0;
    padding: 20px;
}

/* Login screen (Phase 1: Microsoft Auth) */
.login-screen {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 20px;
}

.login-box {
    background: #fff;
    padding: 2.5rem;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    max-width: 380px;
    width: 100%;
}

.login-box h1 {
    margin-top: 0;
    color: #333;
}

.login-box p {
    color: #666;
    margin-bottom: 1.5rem;
}

.login-button {
    background-color: #2f2f2f;
    color: #fff;
    padding: 12px 24px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    width: 100%;
}

.login-button:hover {
    background-color: #0078d4;
}

/* App shell (shown when authenticated) */
.app-shell {
    max-width: 640px;
    margin: 0 auto;
}

.auth-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 0 15px;
    margin-bottom: 5px;
    border-bottom: 1px solid #ddd;
}

.user-email {
    color: #555;
    font-size: 0.9rem;
}

.logout-button {
    background-color: #6c757d;
    color: white;
    padding: 6px 14px;
    font-size: 14px;
    margin-top: 0;
}

.logout-button:hover {
    background-color: #5a6268;
}

.container {
    max-width: 600px;
    margin: 0 auto;
    background-color: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

h1, h2 {
    color: #333;
}

label {
    display: block;
    margin-top: 15px;
    margin-bottom: 5px;
    color: #333;
    font-weight: 500;
}

input {
    width: 90%;
    padding: 10px;
    margin: 5px 0;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box;
}

input:focus {
    outline: none;
    border-color: #28a745;
}

button {
    background-color: #28a745;
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    margin-top: 5px;
    font-size: 16px;
    transition: background-color 0.3s;
}

button:hover {
    background-color: #218838;
}

/* List containers */
#inntekter-list,
#utgifter-list,
#skyldnere-list {
    margin: 15px 0;
    text-align: left;
    min-height: 20px;
}

#inntekter-list p,
#utgifter-list p {
    margin: 8px 0;
    padding: 8px;
    background-color: #f8f9fa;
    border-radius: 4px;
}

#inntekter-list button,
#utgifter-list button {
    margin-left: 10px;
    padding: 5px 10px;
    font-size: 14px;
}

/* Expense inputs container */
.utgift-inputs {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

/* Center button container */
.center-button {
    text-align: center;
    margin-top: 10px;
}

/* Button group for main actions */
.button-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin: 20px 0;
}

.button-group button {
    width: 100%;
}

/* Result display */
#resultat {
    font-weight: bold;
    margin-top: 20px;
    padding: 15px;
    background-color: #f8f9fa;
    border-radius: 4px;
    text-align: left;
}

/* Charts */
canvas {
    width: 100%;
    max-width: 550px;
    margin: 20px 0;
}
