/* General Body Styles */
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    background-color: #f0f2f5;
    color: #1c1e21;
    margin: 0;
    -webkit-font-smoothing: antialiased;
}

/* Header and Navigation */
header {
    background-color: #fff;
    padding: 0 24px;
    border-bottom: 1px solid #dddfe2;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 100;
}

header h1 {
    color: #0d6efd; /* A nice blue */
    font-size: 24px;
    font-weight: 700;
}

nav a {
    text-decoration: none;
    color: #4b4f56;
    font-weight: 600;
    padding: 20px 16px;
    display: inline-block;
    border-bottom: 2px solid transparent;
}

nav a:hover, nav a.active {
    color: #0d6efd;
    border-bottom-color: #0d6efd;
}

/* Main Content Area */
main {
    padding: 24px;
    max-width: 1000px;
    margin: 0 auto;
}

/* Card Style - The core of the new design */
.card {
    background-color: #fff;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 24px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    border: 1px solid #dddfe2;
}

.card h3 {
    margin-top: 0;
    font-size: 18px;
    color: #1c1e21;
    border-bottom: 1px solid #e9ebee;
    padding-bottom: 10px;
    margin-bottom: 15px;
}

/* Dashboard Statistics */
.dashboard-stats {
    display: flex;
    gap: 24px;
    flex-wrap: wrap; /* Allows wrapping on smaller screens */
    margin-bottom: 24px;
}

/* Re-style stat-card to use the new card look */
.stat-card {
    flex: 1;
    min-width: 200px; /* Ensures cards don't get too squished */
    background-color: #fff;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    border: 1px solid #dddfe2;
    text-align: center;
}

.stat-card h3 {
    margin-top: 0;
    margin-bottom: 8px;
    font-size: 16px;
    color: #606770;
}

.stat-card p {
    margin: 0;
    font-size: 28px;
    font-weight: 700;
    color: #0d6efd;
}

/* Alert / Info Banners */
.alert-info {
    background-color: #e7f3ff;
    color: #0d6efd;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 24px;
    border: 1px solid #b7d9f7;
}

/* Form Styling */
form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

label {
    font-weight: 600;
    color: #4b4f56;
    font-size: 14px;
}

input[type="text"],
input[type="password"],
input[type="number"],
input[type="url"],
select {
    width: 100%;
    padding: 12px;
    border: 1px solid #ccd0d5;
    border-radius: 6px;
    font-size: 16px;
    box-sizing: border-box;
}

input:focus, select:focus {
    border-color: #0d6efd;
    outline: none;
    box-shadow: 0 0 0 2px #e7f3ff;
}

/* Button Styling */
button {
    background-color: #0d6efd;
    color: #fff;
    border: none;
    padding: 12px 20px;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s;
    width: fit-content;
    align-self: flex-start; /* Align button to the left */
}

button:hover {
    background-color: #0b5ed7;
}

/* Table Styling */
table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

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

thead th {
    background-color: #f5f6f7;
    font-weight: 600;
    color: #4b4f56;
}

tbody tr:hover {
    background-color: #f5f6f7;
}

/* Utility Classes */
.text-danger {
    color: #fa383e;
}

.text-success {
    color: #28a745;
}

/* Responsive Design */
@media (max-width: 768px) {
    header {
        flex-direction: column;
        align-items: flex-start;
        padding: 10px;
    }
    nav {
        width: 100%;
    }
    nav a {
        display: block;
        padding: 10px;
        text-align: center;
    }
    .dashboard-stats {
        flex-direction: column;
    }
    main {
        padding: 16px;
    }
}
