/* Global Styles */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f4f6f9;
    color: #333;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

header {
    background-color: #2c3e50;
    color: white;
    padding: 1rem 0;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.logo {
    font-size: 1.5rem;
    font-weight: bold;
    text-decoration: none;
    color: white;
}

.nav-links a {
    color: white;
    text-decoration: none;
    margin-left: 20px;
    transition: color 0.3s;
}

.nav-links a:hover {
    color: #3498db;
}

main {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 40px 20px;
}

.container {
    background: white;
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    width: 100%;
    /* max-width: 500px; Remove this limitation for dashboard */
    width: 100%;
    text-align: center;
}

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

.form-group {
    margin-bottom: 20px;
    text-align: left;
}

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

input[type="text"],
input[type="password"] {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-sizing: border-box;
    /* Fix padding issue */
    font-size: 16px;
    transition: border-color 0.3s;
}

input[type="text"]:focus,
input[type="password"]:focus {
    border-color: #3498db;
    outline: none;
}

button {
    background-color: #3498db;
    color: white;
    padding: 12px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    width: 100%;
    transition: background-color 0.3s;
}

button:hover {
    background-color: #2980b9;
}

.result {
    margin-top: 20px;
    padding: 20px;
    background-color: #e8f6f3;
    border: 1px solid #a2d9ce;
    border-radius: 4px;
    display: none;
    text-align: left;
}

.error {
    color: #e74c3c;
    margin-top: 10px;
    display: none;
}

/* Dashboard Specifics */
.dashboard-wrapper {
    display: flex;
    min-height: calc(100vh - 60px);
    /* Adjust based on header height if needed */
}

.sidebar {
    width: 250px;
    background-color: #2c3e50;
    color: white;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    /* Ensure logout at bottom */
    padding-top: 20px;
    flex-shrink: 0;
}

.sidebar-item {
    padding: 15px 20px;
    color: #bdc3c7;
    text-decoration: none;
    transition: background 0.3s, color 0.3s;
    font-size: 16px;
    border-left: 4px solid transparent;
}

.sidebar-item:hover {
    background-color: #34495e;
    color: white;
}

.sidebar-item.active {
    background-color: #34495e;
    color: white;
    border-left-color: #3498db;
}

.content-area {
    flex: 1;
    padding: 20px;
    background-color: #ecf0f1;
    overflow-y: auto;
}

.dashboard-container {
    max-width: 100%;
    /* Use full width of content area */
    align-items: flex-start;
    text-align: left;
    margin: 0;
    /* Reset margin */
}

.tab-content {
    display: none;
    animation: fadeIn 0.3s;
}

.tab-content.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* Hide original .section styles if they conflict, but we used them for spacing */
.section {
    border-bottom: none;
    /* Remove separators since we use tabs */
}

.section {
    margin-bottom: 40px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
}

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

.hidden {
    display: none !important;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

th,
td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

th {
    background-color: #f8f9fa;
    font-weight: 600;
}

select {
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.5);
}

.modal-content {
    background-color: #fefefe;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    padding: 20px;
    border: 1px solid #888;
    width: 300px;
    border-radius: 8px;
    text-align: center;
    margin: 0;
}

.close {
    font-weight: bold;
}

.close:hover,
.close:focus {
    color: black;
    text-decoration: none;
    cursor: pointer;
}

/* Stats Styles */
.stats-container {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.stat-card {
    background: white;
    padding: 20px;
    border-radius: 8px;
    flex: 1;
    min-width: 150px;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    border-bottom: 4px solid #3498db;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.stat-card h3 {
    margin: 0 0 10px 0;
    font-size: 14px;
    color: #7f8c8d;
    text-transform: uppercase;
}

.stat-value {
    font-size: 28px;
    font-weight: bold;
    color: #2c3e50;
    margin: 0;
}

/* Button Styles */
/* Button Styles */
.btn-icon {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    border: none;
    color: white;
    font-size: 14px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-right: 5px;
    transition: transform 0.2s, background-color 0.2s;
    padding: 0;
    /* Override default */
}

.btn-icon:hover {
    transform: scale(1.1);
}

.btn-info {
    background-color: #17a2b8;
}

.btn-info:hover {
    background-color: #138496;
}

.btn-update {
    background-color: #3498db;
}

.btn-update:hover {
    background-color: #2980b9;
}

.btn-delete {
    background-color: #e74c3c;
}

.btn-delete:hover {
    background-color: #c0392b;
}