/* General Reset and Body Styling */
body, html {
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f0f2f5; /* Light grey background */
    color: #333;
    line-height: 1.6;
}

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

/* Sidebar Styling */
.sidebar {
    width: 260px;
    background-color: #2c3e50; /* Dark blue/grey */
    color: #ecf0f1; /* Light grey text */
    display: flex;
    flex-direction: column;
    box-shadow: 2px 0 8px rgba(0, 0, 0, 0.15);
    transition: width 0.3s ease;
}

.sidebar-header {
    padding: 20px 15px;
    text-align: center;
    border-bottom: 1px solid #34495e; /* Slightly lighter border */
}

.sidebar-header h2 {
    margin: 0;
    font-size: 1.5em;
    color: #ffffff; /* White text for header */
}

.sidebar-nav ul {
    list-style-type: none;
    padding: 0;
    margin: 0;
    flex-grow: 1; /* Allows nav to fill space */
}

.sidebar-nav ul li a {
    display: block;
    color: #bdc3c7; /* Lighter grey for links */
    text-decoration: none;
    padding: 12px 20px;
    font-size: 0.95em;
    border-left: 3px solid transparent;
    transition: background-color 0.2s ease, color 0.2s ease, border-left-color 0.2s ease;
}

.sidebar-nav ul li a:hover {
    background-color: #34495e; /* Darker shade on hover */
    color: #ffffff;
    border-left-color: #3498db; /* Blue accent on hover */
}

.sidebar-nav ul li a.active {
    background-color: #1abc9c; /* Teal for active link */
    color: #ffffff;
    font-weight: 600;
    border-left-color: #16a085; /* Darker teal border */
}

/* Main Content Area Styling */
.content {
    flex-grow: 1;
    padding: 0; /* Remove padding to allow header/footer to span full width */
    display: flex;
    flex-direction: column;
}

.main-header {
    background: #ffffff; /* White background for header */
    padding: 15px 30px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    border-bottom: 1px solid #e0e0e0;
    z-index: 10; /* Ensure header is above content scroll */
}

.main-header h1 {
    margin: 0;
    color: #2c3e50; /* Dark blue/grey text */
    font-size: 1.75em;
    font-weight: 600;
}

.page-content {
    padding: 25px 30px;
    flex-grow: 1;
    overflow-y: auto; /* Allow content to scroll independently */
}

.main-footer {
    background: #ffffff;
    padding: 15px 30px;
    text-align: center;
    font-size: 0.85em;
    color: #777;
    border-top: 1px solid #e0e0e0;
}

/* Form Elements Styling */
input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
select,
textarea {
    width: 100%;
    padding: 10px 12px;
    margin-bottom: 15px;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box;
    font-size: 0.9em;
    transition: border-color 0.2s ease;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
input[type="number"]:focus,
select:focus,
textarea:focus {
    border-color: #3498db; /* Blue border on focus */
    outline: none;
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.2);
}

textarea {
    min-height: 120px;
    resize: vertical;
}

button, input[type="submit"], .btn {
    background-color: #3498db; /* Primary blue */
    color: white;
    padding: 10px 18px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.95em;
    font-weight: 500;
    text-decoration: none;
    display: inline-block;
    transition: background-color 0.2s ease;
}

button:hover, input[type="submit"]:hover, .btn:hover {
    background-color: #2980b9; /* Darker blue on hover */
}

.btn-danger {
    background-color: #e74c3c; /* Red for danger/delete */
}
.btn-danger:hover {
    background-color: #c0392b;
}
.btn-success {
    background-color: #2ecc71; /* Green for success */
}
.btn-success:hover {
    background-color: #27ae60;
}

/* Output/Log Area Styling */
.output-log-area {
    background-color: #1e1e1e; /* Dark background for logs (VSCode dark) */
    color: #d4d4d4; /* Light text for logs */
    padding: 15px;
    border-radius: 5px;
    min-height: 200px;
    max-height: 400px; /* Set a max height */
    overflow-y: auto;
    white-space: pre-wrap; /* Respect newlines and spacing */
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 0.85em;
    margin-top: 20px;
    border: 1px solid #333;
}

/* Alert Messages */
.alert {
    padding: 15px;
    margin-bottom: 20px;
    border: 1px solid transparent;
    border-radius: 4px;
}
.alert-success {
    color: #155724;
    background-color: #d4edda;
    border-color: #c3e6cb;
}
.alert-danger {
    color: #721c24;
    background-color: #f8d7da;
    border-color: #f5c6cb;
}
.alert-warning {
    color: #856404;
    background-color: #fff3cd;
    border-color: #ffeeba;
}
.alert-info {
    color: #0c5460;
    background-color: #d1ecf1;
    border-color: #bee5eb;
}

/* Tables */
table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}
table th, table td {
    padding: 10px 12px;
    text-align: left;
    border-bottom: 1px solid #e0e0e0;
}
table th {
    background-color: #f7f7f7; /* Light grey for table headers */
    font-weight: 600;
    color: #333;
}
table tr:hover {
    background-color: #f1f1f1;
}

/* Cards for dashboard or item display */
.card {
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 5px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}
.card-header {
    font-size: 1.2em;
    font-weight: 600;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

/* Utility Classes */
.text-center { text-align: center; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
