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

.container {
    max-width: 1200px;
    margin: 0 auto;
}

h1 {
    color: #333;
    margin-bottom: 20px;
}

/* Message animation */
#message {
    display: none;
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 12px 20px;
    border-radius: 6px;
    color: white;
    z-index: 2000;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    font-weight: bold;
    max-width: 400px;
    opacity: 0;
    transform: translateY(-10px);
    transition: opacity 0.3s ease-out, transform 0.3s ease-out;
}

#message.show {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

/* Grid för items */
#items {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 15px;
    margin-top: 20px;
}

/* Vanliga items (för vanlig vy) */
.item {
    background: white;
    border-left: 4px solid #007cba;
    padding: 15px;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    font-size: 16px;
}

.item strong {
    color: #007cba;
    font-size: 1.1em;
    display: block;
    margin-bottom: 8px;
}

/* Admin items */
.item-admin {
    background: white;
    border-left: 4px solid #28a745;
    padding: 15px;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    margin-bottom: 15px;
}

.item-admin strong {
    color: #28a745;
    font-size: 1.1em;
    display: block;
    margin-bottom: 8px;
}

.item-admin .actions {
    margin-top: 12px;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

/* Sökfält */
#search { 
    padding: 10px 15px; 
    width: 100%;
    max-width: 400px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
    margin-bottom: 20px;
    box-sizing: border-box;
}

/* Knappar */
button {
    padding: 10px 15px;
    background: #007cba;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    transition: background 0.2s;
}

button:hover {
    background: #005a87;
}

.button-group {
    margin-bottom: 20px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.button-group button {
    margin: 0;
}

/* Logout-knapp */
.logout-btn {
    position: fixed;
    top: 10px;
    right: 10px;
    background: #6c757d;
    padding: 5px 10px;
    font-size: 12px;
    border: none;
    border-radius: 4px;
    color: white;
    cursor: pointer;
}

.logout-btn:hover {
    background: #5a6268;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.7);
    z-index: 1000;
    justify-content: center;
    align-items: center;
	cursor: pointer;
}

.modal-content {
    background: white;
    padding: 30px;
    border-radius: 10px;
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
	cursor: default;
}

.modal-content h2 {
    margin-top: 0;
    color: #333;
}

.modal-buttons {
    margin-top: 25px;
    display: flex;
    gap: 10px;
}

/* Formulär i modal */
.modal-content label {
    display: block;
    margin: 15px 0 5px;
    font-weight: bold;
    color: #555;
}

.modal-content input,
.modal-content select,
.modal-content textarea {
    width: 100%;
    padding: 10px;
    margin-bottom: 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-sizing: border-box;
    font-size: 16px;
}

.modal-content input:focus,
.modal-content select:focus,
.modal-content textarea:focus {
    outline: none;
    border-color: #007cba;
    box-shadow: 0 0 0 2px rgba(0,124,186,0.2);
}

/* Link modal styles */
.link-section {
    margin-bottom: 15px;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 4px;
}

.link-section h4 {
    margin-top: 0;
    margin-bottom: 8px;
    color: #495057;
}

.link-select {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.compatibility-warning {
    color: #856404;
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    padding: 5px 10px;
    border-radius: 4px;
    margin-top: 5px;
    font-size: 12px;
}

.compatibility-ok {
    color: #155724;
    background: #d4edda;
    border: 1px solid #c3e6cb;
    padding: 5px 10px;
    border-radius: 4px;
    margin-top: 5px;
    font-size: 12px;
}

/* Färger för specifika knappar */
button[style*="background: #dc3545"] {
    background: #dc3545;
}

button[style*="background: #dc3545"]:hover {
    background: #c82333;
}

button[style*="background: #28a745"] {
    background: #28a745;
}

button[style*="background: #28a745"]:hover {
    background: #218838;
}

button[style*="background: #6c757d"] {
    background: #6c757d;
}

button[style*="background: #6c757d"]:hover {
    background: #5a6268;
}

/* Mobil */
@media (max-width: 768px) {
    body {
        padding: 10px;
    }
    
    #items {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .item, .item-admin {
        padding: 12px;
        font-size: 16px;
    }
    
    .button-group {
        flex-direction: column;
    }
    
    .button-group button {
        width: 100%;
        margin-bottom: 8px;
    }
    
    .modal-content {
        padding: 20px;
        width: 95%;
    }
    
    .modal-buttons {
        flex-direction: column;
    }
    
    .modal-buttons button {
        width: 100%;
        margin-bottom: 8px;
    }
}
