/* Reset some default browser styles for consistency */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    /* Color Palette */
    --color-primary: #007bff;       /* Blue for primary actions */
    --color-primary-hover: #0056b3; /* Darker blue on hover */
    
    --color-secondary: #6c757d;       /* Grey for secondary actions */
    --color-secondary-hover: #5a6268; /* Darker grey on hover */
    
    --color-success: #28a745;       /* Green for success actions */
    --color-success-hover: #218838; /* Darker green on hover */
    
    --color-danger: #dc3545;       /* Red for destructive actions */
    --color-danger-hover: #c82333; /* Darker red on hover */
    
    --color-warning: #ffc107;       /* Yellow for warning actions */
    --color-warning-hover: #e0a800; /* Darker yellow on hover */
    
    --color-info: #17a2b8;          /* Teal for informational actions */
    --color-info-hover: #117a8b;    /* Darker teal on hover */
    
    --color-light: #f8f9fa;         /* Light grey for light buttons */
    --color-light-hover: #e2e6ea;   /* Darker light grey on hover */
    
    --color-dark: #343a40;          /* Dark grey for dark buttons */
    --color-dark-hover: #23272b;    /* Darker grey on hover */
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #1e1e1e; /* Soft dark grey */
    color: #e0e0e0; /* Light grey text */
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 100vh;
}

/* Header Styling */
header {
    width: 100%;
    background-color: #2c2c2c; /* Darker grey */
    color: #e0e0e0; /* Light text */
    padding: 20px 0;
    text-align: center;
    font-size: 28px; /* Increased font size for prominence */
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.5); /* Darker shadow for depth */
    margin-bottom: 20px;
    border-bottom: 3px solid #444; /* Slightly lighter border */
    border-radius: 10px; /* Rounded corners */
}

/* Navigation Bar Styling */
nav {
    width: 100%;
    background-color: #3a3a3a; /* Dark grey */
    padding: 15px 0; /* Increased padding for better spacing */
    text-align: center;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.5); /* Consistent shadow effect */
    border-radius: 10px; /* Rounded corners */
    margin-bottom: 20px;
}

nav a {
    color: #e0e0e0; /* Light text */
    margin: 0 10px; /* Adjusted margin for tighter layout */
    text-decoration: none;
    font-size: 16px; /* Slightly smaller font size */
    font-weight: 500; /* Slightly bolder text */
    padding: 8px 14px; /* Adjusted padding for button-like appearance */
    border-radius: 4px; /* Rounded corners */
    transition: background-color 0.3s ease, color 0.3s ease;
    background-color: #555; /* Dark button background */
}

nav a:hover {
    background-color: #777; /* Lighter grey on hover */
    color: #fff; /* White text on hover for better contrast */
}

/* Main Container Styling */
.container {
    max-width: 1200px; /* Increased width for more content */
    width: 90%; /* Adjusted width for better padding on smaller screens */
    margin: 20px auto;
    padding: 20px;
    background-color: #2c2c2c; /* Dark grey */
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.7); /* Enhanced shadow for depth */
    border: 1px solid rgba(0, 0, 0, 0.1); /* Subtle border */
    border-radius: 10px; /* More rounded corners */
}

/* Headings */
h2 {
    color: #e0e0e0; /* Light text */
    font-size: 26px;
    margin-bottom: 20px;
    text-align: left; /* Aligned left for modern look */
    border-bottom: 2px solid #444; /* Subtle separation */
    padding-bottom: 10px;
    font-weight: 600; /* Bolder header */
}

h3 {
    color: #e0e0e0; /* Light text */
    font-size: 20px;
    margin-bottom: 15px;
    padding-bottom: 8px;
    font-weight: 500; /* Bolder for subheaders */
    border-bottom: 1px solid #444; /* Subtle separation */
}

/* Form Styling */
form {
    margin: 20px 0;
    padding: 20px;
    background-color: #3a3a3a; /* Dark grey */
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.5); /* Soft shadow */
}

label {
    display: block;
    margin-bottom: 8px;
    font-size: 16px;
    color: #e0e0e0; /* Light text */
}

input[type="text"],
input[type="password"],
input[type="number"],
input[type="date"],
select {
    width: 100%;
    padding: 12px;
    margin-bottom: 20px;
    border: 1px solid #555; /* Darker border */
    border-radius: 4px;
    font-size: 16px;
    background-color: #444; /* Dark input background */
    color: #e0e0e0; /* Light text */
    transition: border-color 0.3s ease, background-color 0.3s ease;
}

input[type="text"]:focus,
input[type="password"]:focus,
input[type="number"]:focus,
input[type="date"]:focus,
select:focus {
    border-color: var(--color-primary); /* Blue border on focus */
    background-color: #555; /* Slightly lighter input background on focus */
    outline: none; /* Remove default outline */
}

input[type="submit"] {
    padding: 12px 20px;
    background-color: var(--color-primary); /* Blue button */
    color: #fff; /* White text */
    border: none;
    border-radius: 4px;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.3s ease;
}

input[type="submit"]:hover {
    background-color: var(--color-primary-hover); /* Darker blue on hover */
    transform: translateY(-2px); /* Slight lift on hover */
}

/* Table Styling */
.table-responsive {
    width: 100%;
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    table-layout: fixed; /* Ensures consistent column widths */
    word-wrap: break-word; /* Prevents overflow */
}

table th, table td {
    border: 1px solid #555; /* Darker border */
    padding: 14px; /* Increased padding for better readability */
    text-align: left;
    font-size: 16px;
    vertical-align: middle; /* Vertically center the content */
    white-space: nowrap; /* Prevent text wrapping */
    color: #e0e0e0; /* Light text */
}

table th {
    background-color: #444; /* Dark grey header */
    font-weight: 600;
}

table tr:nth-child(even) {
    background-color: #3a3a3a; /* Slightly lighter grey for even rows */
}

table tr:hover {
    background-color: #555; /* Darker grey on hover */
}

/* Chart Container Styling */
.chart-container {
    margin: 40px 0;
    position: relative;
    height: 400px; /* Adjust height of the charts */
    width: 100%;
    background-color: #3a3a3a; /* Dark grey background */
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.5); /* Consistent shadow */
}

/* Calendar Styling */
#calendar {
    margin-top: 20px;
    padding: 20px;
    border: 1px solid #555; /* Darker border */
    border-radius: 8px;
    background-color: #3a3a3a; /* Dark grey background */
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.5); /* Soft shadow */
}

/* Card Styling */
.card {
    padding: 20px;
    margin-bottom: 20px;
    background-color: #3a3a3a; /* Dark grey background */
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.5); /* Soft shadow */
}

.card h3 {
    margin-top: 0;
    font-size: 18px; /* Slightly smaller header */
    color: var(--color-primary); /* Blue color for headings */
}

/* Button Styling */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px; /* Increased padding for better clickability */
    background-color: var(--color-primary); /* Blue button */
    color: #fff; /* White text */
    text-decoration: none; /* Ensures buttons used as links appear as buttons */
    border: none; /* Remove default border */
    border-radius: 20px; /* Pill-shaped buttons */
    transition: background-color 0.3s ease, transform 0.2s ease;
    font-size: 16px; /* Slightly larger font for better readability */
    font-weight: 500; /* Slightly bolder button text */
    cursor: pointer; /* Pointer cursor on hover */
    margin-right: 5px; /* Space between buttons */
    white-space: nowrap; /* Prevent text wrapping */
}

.btn:hover {
    background-color: var(--color-primary-hover); /* Darker blue on hover */
    transform: translateY(-2px); /* Slight lift on hover */
}

.btn-sm {
    padding: 6px 12px; /* Reduced padding for smaller buttons */
    font-size: 14px; /* Smaller font size */
    border-radius: 15px;
    margin-right: 3px; /* Reduced margin for spacing */
}

.btn-danger {
    background-color: var(--color-danger); /* Red button for destructive actions */
}

.btn-danger:hover {
    background-color: var(--color-danger-hover); /* Darker red on hover */
    transform: translateY(-2px); /* Slight lift on hover */
}

.btn-secondary {
    background-color: var(--color-secondary); /* Grey button for secondary actions */
}

.btn-secondary:hover {
    background-color: var(--color-secondary-hover); /* Darker grey on hover */
}

.btn-success {
    background-color: var(--color-success); /* Green button for success actions */
}

.btn-success:hover {
    background-color: var(--color-success-hover); /* Darker green on hover */
}

.btn-warning {
    background-color: var(--color-warning); /* Yellow button for warning actions */
    color: #333; /* Dark text for better contrast */
}

.btn-warning:hover {
    background-color: var(--color-warning-hover); /* Darker yellow on hover */
}

.btn-info {
    background-color: var(--color-info); /* Teal button for informational actions */
}

.btn-info:hover {
    background-color: var(--color-info-hover); /* Darker teal on hover */
}

.btn-light {
    background-color: var(--color-light); /* Light grey button */
    color: #333; /* Dark text for contrast */
}

.btn-light:hover {
    background-color: var(--color-light-hover); /* Darker light grey on hover */
}

.btn-dark {
    background-color: var(--color-dark); /* Dark grey button */
}

.btn-dark:hover {
    background-color: var(--color-dark-hover); /* Darker grey on hover */
}

/* Flex container for action buttons in table */
.table-actions {
    display: flex;
    align-items: center;
}

/* Responsive Design Enhancements */
@media (max-width: 768px) {
    header {
        font-size: 20px;
    }

    nav a {
        font-size: 14px;
        padding: 6px 12px;
        margin: 0 8px;
    }

    h2 {
        font-size: 22px;
    }

    h3 {
        font-size: 18px;
    }

    input[type="submit"] {
        font-size: 14px;
        padding: 10px 16px;
    }

    .btn {
        font-size: 14px;
        padding: 8px 16px;
    }

    .btn-sm {
        font-size: 12px;
        padding: 6px 10px;
    }

    table th, table td {
        font-size: 14px;
        padding: 10px;
    }
}
