body {
    margin: 0;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background-color: #f3f6fb;
}

.app-shell {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 230px;
    background: linear-gradient(180deg, #d0e9ff, #b9dcff);
    padding: 20px 16px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    border-right: 1px solid #a8c6e5;
}

.brand {
    margin-bottom: 24px;
}

.brand-title {
    font-weight: 800;
    font-size: 1.3rem;
    color: #1a4f7a;
}

.nav {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 24px;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    border-radius: 8px;
    text-decoration: none;
    color: #1a4f7a;
    font-weight: 500;
}

.nav-link:hover {
    background-color: rgba(255, 255, 255, 0.7);
}

.nav-icon {
    width: 18px;
}

.nav-section-title {
    margin-top: 16px;
    margin-bottom: 4px;
    font-size: 0.8rem;
    text-transform: uppercase;
    color: #355c7d;
    letter-spacing: 0.04em;
    font-weight: 700;
}

.sidebar-footer {
    margin-top: auto;
}

.btn-auth {
    display: inline-block;
    padding: 6px 10px;
    border-radius: 999px;
    border: 1px solid #1a4f7a;
    background-color: #1a4f7a;
    color: white;
    text-decoration: none;
    font-size: 0.85rem;
    cursor: pointer;
}

.btn-auth.secondary {
    background-color: transparent;
    color: #1a4f7a;
}

.btn-auth:hover {
    opacity: 0.9;
}

.user-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.user-name {
    font-weight: 600;
    color: #1a4f7a;
    font-size: 0.9rem;
}

.user-actions form {
    margin: 0;
}

.main-content {
    flex: 1;
    padding: 24px;
    box-sizing: border-box;
}

.content-inner {
    max-width: 800px;
    margin: 0 auto;
}

.card {
    background-color: white;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.06);
}

.auth-container {
    display: flex;
    justify-content: center;
}

.auth-card {
    background-color: white;
    border-radius: 16px;
    padding: 24px 32px;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.06);
    max-width: 640px;
    width: 100%;
}

.auth-subtitle {
    color: #555;
    margin-bottom: 16px;
}

.auth-form .form-group {
    margin-bottom: 12px;
}

.form-control {
    width: 100%;
    padding: 6px 8px;
    border-radius: 6px;
    border: 1px solid #c0c9d6;
    box-sizing: border-box;
}

.validation-summary {
    color: #b00020;
    margin-bottom: 8px;
}

.field-validation {
    color: #b00020;
    font-size: 0.8rem;
}

.btn-primary {
    display: inline-block;
    background-color: #007bff;
    color: white;
    border: none;
    padding: 8px 14px;
    border-radius: 8px;
    cursor: pointer;
}

.btn-primary:hover {
    background-color: #0069d9;
}

.btn-link {
    background: none;
    border: none;
    padding: 0;
    margin-left: 8px;
    color: #c00;
    cursor: pointer;
    text-decoration: underline;
    font-size: 0.85rem;
}

/* Rating list */
.rating-list {
    list-style: none;
    padding-left: 0;
    margin-top: 10px;
}

.rating-list li {
    padding: 10px 0;
    border-bottom: 1px solid #ddd;
}

/* Message board */
.message-list {
    list-style: none;
    padding-left: 0;
    margin-top: 10px;
}

.message-item {
    padding: 10px 12px;
    border-radius: 8px;
    border: 1px solid #ddd;
    margin-bottom: 10px;
    background-color: #ffffff;
}

.message-header {
    display: flex;
    gap: 8px;
    align-items: baseline;
    margin-bottom: 4px;
    font-size: 0.9rem;
}

.message-author {
    font-weight: 600;
}

.message-role {
    font-weight: 500;
}

.message-date {
    margin-left: auto;
    color: #777;
}

.message-content {
    white-space: pre-wrap;
}

/* Role colors */
.message-role-admin .message-header {
    color: #b30000;
}

.message-role-mieter .message-header {
    color: #004a80;
}

.message-role-guest .message-header {
    color: #555555;
}



/* --- Professional navigation refresh --- */
.sidebar {
    width: 250px;
    background-color: #ffffff;
    padding: 24px 20px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    border-right: 1px solid #e2e8f0;
    box-shadow: 4px 0 20px rgba(15, 23, 42, 0.04);
}

.brand {
    margin-bottom: 28px;
}

.brand-title {
    font-weight: 700;
    font-size: 1.25rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #0f172a;
}

.nav {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 24px;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 12px;
    border-radius: 999px;
    text-decoration: none;
    color: #334155;
    font-size: 0.95rem;
    font-weight: 500;
    transition: background-color 0.15s ease, color 0.15s ease, transform 0.1s ease;
}

.nav-link:hover {
    background-color: #e0f2f1;
    color: #0f766e;
    transform: translateX(1px);
}

.nav-link.active,
.nav-link[aria-current="page"] {
    background-color: #0f766e;
    color: #ffffff;
}

.nav-icon {
    width: auto;
    font-size: 1rem;
    opacity: 0.85;
}

.nav-section-title {
    margin-top: 18px;
    margin-bottom: 6px;
    font-size: 0.75rem;
    text-transform: uppercase;
    color: #94a3b8;
    letter-spacing: 0.08em;
    font-weight: 600;
}

.sidebar-footer {
    margin-top: auto;
    padding-top: 12px;
    border-top: 1px solid #e2e8f0;
}

.user-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.user-name {
    font-size: 0.9rem;
    font-weight: 600;
    color: #0f172a;
}

.user-actions,
.auth-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 6px;
}

.btn-auth {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 999px;
    border: 1px solid #0f766e;
    background-color: #0f766e;
    color: #ffffff;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
}

.btn-auth.secondary {
    background-color: transparent;
    color: #0f766e;
}

.btn-auth:hover {
    filter: brightness(1.05);
}

/* === User Roles page === */

.user-roles-card {
    max-width: 960px;
    margin: 0 auto;
}

.card-header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
}

.card-title {
    margin: 0;
}

.card-subtitle {
    margin: 4px 0 0 0;
    font-size: 0.9rem;
    color: #64748b;
}

.badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.badge-admin-area {
    background-color: #ecfeff;
    color: #0f766e;
    border: 1px solid #99f6e4;
}

.table-wrapper {
    margin-top: 8px;
    overflow-x: auto;
}

.user-roles-table th,
.user-roles-table td {
    padding: 8px 12px;
    vertical-align: middle;
}

.user-roles-table thead th {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #64748b;
    border-bottom: 1px solid #e2e8f0;
}

.user-roles-table tbody tr:nth-child(even) {
    background-color: #f8fafc;
}

.user-cell-email {
    font-size: 0.9rem;
    font-weight: 500;
}

.user-cell-nickname {
    font-size: 0.9rem;
    color: #0f172a;
}

.role-badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: 999px;
    background-color: #e0f2fe;
    color: #1d4ed8;
    font-size: 0.75rem;
    font-weight: 500;
    margin-right: 6px;
    margin-bottom: 4px;
}

.inline-form.user-role-form {
    display: flex;
    align-items: center;
    gap: 8px;
}

.role-select {
    max-width: 140px;
    font-size: 0.9rem;
    padding: 4px 8px;
}

.btn-save-role {
    padding: 5px 14px;
    font-size: 0.85rem;
}


/* === Multi-role user management === */

.role-checkbox-list {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    margin-bottom: 6px;
}

.role-checkbox-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.9rem;
}

.user-role-form {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
}


/* User roles column as vertical list */
.role-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.role-list-item {
    font-size: 0.85rem;
    padding: 2px 0;
}
