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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f4f4f4;
}

a {
    color: #0066cc;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* Sidebar Layout and Navigation */
.app-container {
    display: flex;
    height: 100vh;
    overflow: hidden;
}

.sidebar {
    width: 250px;
    background-color: #2c3e50;
    color: #fff;
    flex-shrink: 0;
    box-shadow: 2px 0 5px rgba(0, 0, 0, 0.1);
    overflow-y: auto;
}

.sidebar-header {
    padding: 20px;
    font-size: 1.5rem;
    font-weight: bold;
    background-color: #1a252f;
}

.sidebar-nav ul {
    list-style: none;
}

.sidebar-nav li a {
    color: #ecf0f1;
    padding: 12px 20px;
    display: block;
    transition: all 0.3s ease;
    border-bottom: 1px solid #34495e;
}

.sidebar-nav li a:hover {
    background-color: #34495e;
    text-decoration: none;
}

.sidebar-nav li a.active:not(.submenu-toggle) {
    background-color: #3498db;
    color: #fff;
}

.submenu {
    display: none;
    background-color: #1a252f;
}

.submenu.open {
    display: block;
}

.submenu li a {
    padding-left: 40px;
    font-size: 0.9rem;
}

.submenu-toggle::after {
    content: ' ▼';
    float: right;
    font-size: 0.7rem;
}

.submenu-toggle.active::after {
    content: ' ▲';
}

.main-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: auto;
}

/* Main content area */
main {
    flex: 0 0 auto;
    margin: 20px 20px ;
    padding: 20px;
    background-color: #fff;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    border-radius: 5px;
}

/* Footer */
footer {
    text-align: center;
    padding: 20px;
    font-size: 0.9rem;
    color: #666;
    max-width: 1200px;
    margin: 0 auto;
}

/* Headings */
h1, h2, h3 {
    margin-bottom: 1rem;
    color: #2c3e50;
}

/* Buttons */
.button {
    display: inline-block;
    padding: 8px 16px;
    margin: 5px;
    background-color: #3498db;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    text-align: center;
    text-decoration: none;
    transition: background-color 0.3s;
}

.button:hover {
    background-color: #2980b9;
    text-decoration: none;
}

.button.primary {
    background-color: #2ecc71;
}

.button.primary:hover {
    background-color: #27ae60;
}

.button.danger {
    background-color: #e74c3c;
}

.button.danger:hover {
    background-color: #c0392b;
}

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

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

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

.form-actions {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid #eee;
}

/* Item Details */
.item-details {
    margin-bottom: 20px;
}

.detail-row {
    padding: 10px 0;
    border-bottom: 1px solid #eee;
    display: flex;
}

.detail-label {
    font-weight: bold;
    width: 150px;
}

.detail-value {
    flex: 1;
}

.action-buttons {
    margin-top: 20px;
    display: flex;
    gap: 10px;
}

/* Responsive */
@media (max-width: 768px) {
    nav {
        flex-direction: column;
        height: auto;
        padding: 10px;
    }
    
    nav div {
        margin-bottom: 10px;
    }
    
    nav ul {
        flex-direction: column;
        width: 100%;
    }
    
    nav ul li {
        margin-left: 0;
        margin-bottom: 5px;
    }
    
    nav ul li a {
        text-align: center;
    }
}

/* Alerts */
.alert {
    padding: 15px;
    margin-top: 20px;
    margin-bottom: 20px;
    border: 1px solid transparent;
    border-radius: 4px;
}

.alert-danger {
    color: #a94442;
    background-color: #f2dede;
    border-color: #ebccd1;
}
