/* Basic Clean CSS */
:root {
    --primary-color: #3182ce;
    --primary-error: #e53e3e;
    --text-color: #333;
    --bg-color: #f7fafc;
    --white: #ffffff;
    --border-color: #e2e8f0;
}

/* User Dropdown override for shared menu */
#dropmenu {
    position: relative;
    display: inline-block;
}

.dropdown-content {
    display: none;
    position: absolute;
    right: 0;
    top: 100%;
    background-color: #f9f9f9;
    min-width: 160px;
    box-shadow: 0px 8px 16px 0px rgba(0, 0, 0, 0.2);
    z-index: 100;
    border-radius: 4px;
    border: 1px solid #ddd;
}

.dropdown-content a {
    color: black;
    padding: 12px 16px;
    text-decoration: none;
    display: block;
}

.dropdown-content a:hover {
    background-color: #f1f1f1;
}

#dropmenu:hover .dropdown-content {
    display: block;
}

/* Main Content */
#body {
    max-width: 600px;
    margin: 20px auto;
    padding: 0 1rem;
}

/* Form Styles */
.form-section {
    background: var(--white);
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    margin-bottom: 2rem;
}

.form-section h1 {
    margin-top: 0;
    text-align: center;
    color: #2d3748;
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
}

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #4a5568;
}

.form-group input {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    box-sizing: border-box;
    font-size: 1rem;
}

.form-group input:focus,
.form-inline input:focus,
.dashboard-controls select:focus {
    border-color: var(--primary-color);
    outline: none;
    box-shadow: 0 0 0 3px rgba(49, 130, 206, 0.1);
}

.button-primary {
    width: 100%;
    background-color: var(--primary-color);
    color: white;
    padding: 0.75rem;
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s;
    margin-top: 1rem;
}

.button-primary:hover {
    background-color: #2b6cb0;
}

.button-primary:disabled {
    background-color: #cbd5e0;
    cursor: not-allowed;
    color: #718096;
}

.error-message {
    color: var(--primary-error);
    font-size: 0.875rem;
    margin-top: 0.5rem;
    text-align: center;
    min-height: 1.25rem;
}

.links {
    margin-top: 1.5rem;
    text-align: center;
}

.links a {
    color: var(--primary-color);
    text-decoration: none;
    font-size: 0.9rem;
}

.links a:hover {
    text-decoration: underline;
}

/* Dashboard Specifics */
#home-section {
    max-width: 1000px;
    /* Wider for table */
    width: 100%;
    margin: 0 auto;
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.dashboard-controls {
    margin-bottom: 20px;
    font-size: 1.2em;
}

.dashboard-controls select {
    padding: 5px;
    font-size: 1em;
    border: 1px solid var(--border-color);
    border-radius: 4px;
}

.form-inline {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    margin-bottom: 20px;
    padding: 15px;
    background: #f8fafc;
    border-radius: 4px;
}

.form-inline label {
    font-weight: 500;
}

.form-inline input {
    padding: 8px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
}

.form-inline .button-primary {
    width: auto;
    margin-top: 0;
    padding: 8px 16px;
}

.input-max-width {
    flex-grow: 1;
}

/* Utilities */
.hidden {
    display: none !important;
}

/* Spinner */
.spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid var(--primary-color);
    border-radius: 50%;
    width: 30px;
    height: 30px;
    animation: spin 2s linear infinite;
    margin: 20px auto;
}

#loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Table Layout overrides */
#jobs-table {
    width: 100%;
}

/* ID Column */
#jobs-table th:nth-child(1),
#jobs-table td:nth-child(1) {
    width: 15%;
    white-space: nowrap;
}

/* Date Column */
#jobs-table th:nth-child(2),
#jobs-table td:nth-child(2) {
    width: 20%;
    white-space: nowrap;
}

/* Note Column */
#jobs-table th:nth-child(3),
#jobs-table td:nth-child(3) {
    width: 65%;
}