/* Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, sans-serif;
    background-color: #f5f5f5;
    color: #333;
    line-height: 1.6;
}

/* Container */
.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

/* Header */
header {
    margin-bottom: 30px;
}

.header-title-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.btn-edit {
    background: transparent;
    border: none;
    font-size: 20px;
    cursor: pointer;
    padding: 5px 10px;
    color: #666;
    transition: all 0.2s;
}

.btn-edit:hover {
    background-color: #f0f0f0;
    border-color: #999;
}

.btn-home {
    background: transparent;
    border: none;
    font-size: 20px;
    cursor: pointer;
    padding: 5px 10px;
    color: #666;
    transition: all 0.2s;
}

.btn-home:hover {
    background-color: #f0f0f0;
    border-color: #999;
}

/* Edit Menu */
.edit-menu {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    margin-bottom: 30px;
}

.edit-menu h2 {
    margin-bottom: 20px;
}

.edit-menu input[type="color"] {
    width: 100%;
    height: 40px;
    padding: 5px;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
}

.btn-danger {
    background-color: #d32f2f;
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
    font-weight: bold;
    margin-left: auto;
}

.btn-danger:hover {
    background-color: #b71c1c;
}

.back-link {
    color: #0066cc;
    text-decoration: none;
    font-size: 14px;
    display: inline-block;
    margin-bottom: 10px;
}

.back-link:hover {
    text-decoration: underline;
}

h1 {
    color: #0066cc;
    margin-bottom: 10px;
}

h2 {
    color: #333;
    font-size: 18px;
    margin-bottom: 15px;
}

/* Forms */
.add-item-form {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    margin-bottom: 30px;
}

.form-group {
    margin-bottom: 15px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 15px;
}

label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    font-size: 14px;
}

input[type="text"],
input[type="number"] {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

input[type="text"]:focus,
input[type="number"]:focus {
    outline: none;
    border-color: #0066cc;
}

/* Buttons */
.btn-primary {
    background-color: #0066cc;
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
    font-weight: bold;
}

.btn-primary:hover {
    background-color: #0052a3;
}

.btn-delete {
    background: transparent;
    border: none;
    font-size: 18px;
    cursor: pointer;
    padding: 5px;
    opacity: 0.6;
}

.btn-delete:hover {
    opacity: 1;
}

/* Items Section */
.items-section {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.items-list {
    list-style: none;
}

.item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px;
    border-bottom: 1px solid #eee;
}

.item:last-child {
    border-bottom: none;
}

.item.checked {
    opacity: 0.6;
}

.item.checked .item-name {
    text-decoration: line-through;
}

.item-content {
    display: flex;
    align-items: center;
    gap: 15px;
    flex: 1;
}

.item-content input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
}

.item-details {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.item-name {
    font-weight: bold;
    font-size: 16px;
}

.item-quantity {
    font-size: 14px;
    color: #666;
}

.item-note {
    font-size: 13px;
    color: #999;
    font-style: italic;
}

.empty,
.error {
    text-align: center;
    padding: 20px;
    color: #999;
}

.error {
    color: #d32f2f;
}

/* Lists Overview */
ul {
    list-style-type: none;
}

li {
    background: white;
    margin: 0.5rem 0;
    padding: 1rem;
    border-radius: 6px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

li a {
    color: #0066cc;
    text-decoration: none;
    font-weight: bold;
}

li a:hover {
    text-decoration: underline;
}

/* Add List Button */
.add-list-button {
    background: white;
    margin: 1rem 0;
    padding: 1rem;
    border-radius: 6px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: background-color 0.2s;
}

.add-list-button:hover {
    background-color: #f0f0f0;
}

.plus-icon {
    font-size: 24px;
    font-weight: bold;
    color: #0066cc;
}

/* New List Form */
.new-list-form {
    background: white;
    margin: 1rem 0;
    padding: 20px;
    border-radius: 6px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.new-list-form h2 {
    margin-bottom: 20px;
}

.new-list-form input[type="color"] {
    width: 100%;
    height: 40px;
    padding: 5px;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
}

.form-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.btn-secondary {
    background-color: #999;
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
    font-weight: bold;
}

.btn-secondary:hover {
    background-color: #777;
}

/* Benachrichtigungen */
#notification-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.notification {
    padding: 15px 20px;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    font-weight: 500;
    min-width: 250px;
    opacity: 0;
    transform: translateX(400px);
    transition: all 0.3s ease;
}

.notification.show {
    opacity: 1;
    transform: translateX(0);
}

.notification-success {
    background-color: #4caf50;
    color: white;
}

.notification-warning {
    background-color: #ff9800;
    color: white;
}

.notification-error {
    background-color: #f44336;
    color: white;
}

/* Auth Pages */
.auth-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
}

.auth-card {
    background: white;
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    width: 100%;
    max-width: 400px;
}

.auth-card h1 {
    text-align: center;
    margin-bottom: 10px;
    font-size: 28px;
}

.auth-card h2 {
    text-align: center;
    margin-bottom: 30px;
    font-size: 20px;
    color: #666;
}

.auth-card small {
    display: block;
    margin-top: 5px;
    color: #999;
    font-size: 12px;
}

.btn-full {
    width: 100%;
}

.error-message {
    background-color: #ffebee;
    color: #c62828;
    padding: 10px;
    border-radius: 4px;
    margin-bottom: 15px;
    font-size: 14px;
}

.success-message {
    background-color: #e8f5e9;
    color: #2e7d32;
    padding: 10px;
    border-radius: 4px;
    margin-bottom: 15px;
    font-size: 14px;
}

.auth-link {
    text-align: center;
    margin-top: 20px;
    color: #666;
}

.auth-link a {
    color: #0066cc;
    text-decoration: none;
    font-weight: bold;
}

.auth-link a:hover {
    text-decoration: underline;
}

/* User Info & Logout */
.user-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: white;
    padding: 15px 20px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    margin-bottom: 20px;
}

.user-display {
    display: flex;
    align-items: center;
    gap: 10px;
}

.user-color {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 2px solid #ddd;
    flex-shrink: 0;
}

.user-name {
    font-weight: bold;
    color: #333;
}

.btn-logout {
    background-color: #d32f2f;
    color: white;
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
    font-weight: bold;
}

.btn-logout:hover {
    background-color: #b71c1c;
}

/* Access Management */
.access-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.access-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    background: #f9f9f9;
    border-radius: 4px;
    margin-bottom: 8px;
    transition: background-color 0.2s;
}

.access-item:hover {
    background-color: #f0f0f0;
}

.access-content {
    display: flex;
    align-items: center;
    gap: 15px;
    flex: 1;
}

.access-username {
    font-weight: bold;
    color: #333;
    min-width: 120px;
}

.access-role-select {
    padding: 6px 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background-color: white;
    cursor: pointer;
    font-size: 14px;
    min-width: 120px;
}

.access-role-select:hover {
    border-color: #0066cc;
}

.access-role-select:focus {
    outline: none;
    border-color: #0066cc;
    box-shadow: 0 0 0 2px rgba(0, 102, 204, 0.2);
}

#access-management h3 {
    margin-bottom: 15px;
    color: #333;
}

#access-management h4 {
    margin-bottom: 10px;
    color: #666;
    font-size: 16px;
}

#access-list-container {
    max-height: 300px;
    overflow-y: auto;
}
