/* insert sans-serif font for all html and body */
html, body {
    font-family: 'Arial', sans-serif;
    margin: 0;
    padding: 0;
}

/* Authentication styles */
#auth-container {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: #f5f5f5;
}

#auth-card {
    background: white;
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 400px;
}

#auth-card h1 {
    margin-top: 0;
    margin-bottom: 30px;
    text-align: center;
    color: #333;
}

#login-form .form-group {
    margin-bottom: 20px;
}

#login-form input {
    width: 100%;
    box-sizing: border-box;
}

#login-btn {
    width: 100%;
    background: #0066cc;
    color: white;
    padding: 12px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    margin-top: 10px;
}

#login-btn:hover {
    background: #0052a3;
}

#login-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.auth-error {
    margin-top: 15px;
    padding: 10px;
    background: #ffe6e6;
    border-radius: 4px;
    color: #cc0000;
    font-size: 14px;
    display: none;
}

.auth-error:not(:empty) {
    display: block;
}

.forgot-password-link {
    text-align: center;
    margin-top: 15px;
}

.forgot-password-link a {
    font-size: 14px;
    color: #0066cc;
    text-decoration: none;
}

.forgot-password-link a:hover {
    text-decoration: underline;
}

/* Password Reset Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-content {
    background: white;
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.2);
    width: 100%;
    max-width: 400px;
    margin: 20px;
}

.modal-content h2 {
    margin-top: 0;
    margin-bottom: 15px;
    color: #333;
}

.modal-content p {
    margin-bottom: 25px;
    color: #666;
    font-size: 14px;
    line-height: 1.5;
}

.modal-content .form-group input {
    width: 100%;
    box-sizing: border-box;
}

.modal-buttons {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.modal-buttons button {
    flex: 1;
    padding: 12px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
}

.secondary-btn {
    background: #f0f0f0;
    color: #333;
}

.secondary-btn:hover {
    background: #e0e0e0;
}

#reset-btn {
    background: #0066cc;
    color: white;
}

#reset-btn:hover {
    background: #0052a3;
}

#reset-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.reset-message {
    margin-top: 15px;
    padding: 10px;
    border-radius: 4px;
    font-size: 14px;
    display: none;
}

.reset-message:not(:empty) {
    display: block;
}

.reset-message.success {
    background: #e6ffe6;
    color: #006600;
}

.reset-message.error {
    background: #ffe6e6;
    color: #cc0000;
}

/* App header with sign out */
#app-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
    border-bottom: 2px solid #eee;
    margin-bottom: 20px;
}

#app-header h1 {
    margin: 0;
    font-size: 24px;
}

#user-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

#user-email {
    color: #666;
    font-size: 14px;
}

#signout-btn {
    background: #666;
    color: white;
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
}

#signout-btn:hover {
    background: #555;
}

a {
    color: #0066cc;
    text-decoration: none;
    font-size: 0.9em;
}

a:hover {
    text-decoration: underline;
}

/* Base layout */
main {
    max-width: 780px;
    margin: 0 auto;
    padding: 20px;
}

section {
    margin-bottom: 2rem;
}

/* Upload component */
.drop-zone, #cad-frame, #gizmo-frame {
    width: 100%;
    height: 200px;
    border: 1px dashed #ccc;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    cursor: pointer;
    transition: border .3s ease;
}

.drop-zone.drag-over {
    border-color: #000;
    background: #f7f7f7;
}

.status {
    margin-top: 20px;
    padding: 10px;
    border-radius: 4px;
}

.status.error { 
    background: #ffe6e6; 
}

.status.success { 
    background: #e6ffe6; 
}

/* Jobs lists */
.jobs-list {
    min-height: 50px;
    margin-top: 10px;
}

.no-jobs {
    padding: 15px;
    color: #666;
    text-align: center;
}

.job-item {
    padding: 10px 15px 0 15px;
    border: 1px solid #eee;
    border-radius: 4px;
    display: flex;
    flex-direction: column;
    gap: 5px;
    margin: 5px 0;
    position: relative;
}

.job-spec {
    font-family: monospace;
    font-weight: bolder;
}

.job-time {
    font-size: x-small;
    color: #666;
    margin-top: -3px;
}

.job-files {
    display: flex;
    gap: 10px;
}

.job-files:has(*) {
    padding-bottom: 10px;
}

.job-output-files {
    padding-bottom: 10px;
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.job-output-files a {
    color: #0066cc;
    text-decoration: none;
}

.job-output-files a:hover {
    text-decoration: underline;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
    margin-bottom: 10px;
}

.section-header h2 {
    margin: 0;
    flex: 1;
}

.section-header button {
    white-space: nowrap;
    flex-shrink: 0;
}

.config-link {
    font-size: 12px;
    color: #666;
    text-decoration: none;
    white-space: nowrap;
    padding: 4px 8px;
    border-radius: 3px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 4px;
}

.config-link:hover {
    color: #0066cc;
    background: #f0f0f0;
    text-decoration: none;
}

.config-icon {
    display: inline-block;
}

h2 > div {
    display: inline;
    font-size: small;
}

.normal-termination {
    font-size: x-small;
}

.normal-termination.true {
    color: #00cc00;
}

.normal-termination.false {
    color: #cc0000;
}

.error-termination-reason {
    font-size: x-small;
    color: #cc0000;
}

.job-results {
    margin-top: -3px;
    margin-left: 6px;
    margin-bottom: 5px;
    font-size: smaller;
    font-family: monospace;
}

.btn-clipboard {
    border: 0;
    background: transparent;
    color: #0066cc;
    cursor: pointer;
    font-size: medium;
}

.btn-clipboard img {
    vertical-align: text-bottom;
}

.btn-download-folder {
    float: right;
    border: 0;
    background: transparent;
    color: #0066cc;
    cursor: pointer;
    font-size: medium;
    padding: 0;
    display: inline-block;
    margin-left: 10px;
    position: relative;
    top: -5px;
}

.btn-download-folder img {
    vertical-align: middle;
    width: 24px;
    height: 24px;
}

.job-actions {
    margin-top: 5px;
    padding-top: 0;
}

.btn-confirm {
    background: #5f5d5d;
    color: white;
    padding: 4px 6px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
}

.btn-confirm:hover {
    background: #218838;
}

.btn-delete {
    background: #5f5d5d;
    color: white;
    padding: 4px 6px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
}

.btn-delete:hover {
    background: #ad2929;
}
.form-group, .direction-group {
    margin: 20px 0 0;
}

.form-group label, .direction-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}

.form-group input,
.form-group select {
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
}

.submit-btn {
    background: #0066cc;
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    margin-top: 20px;
    float: right;
}

.submit-btn:hover {
    background: #0052a3;
}

.direction-options {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-top: 10px;
}

.radio-label {
    display: flex;
    align-items: center;
    gap: 5px;
}

.step-details {
    display: flex;
    gap: 20px;
}

.step-details .form-group {
    flex: 1;
}

textarea {
    box-sizing: border-box;
    width: 100%;
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
    resize: vertical;
}

.file-scratch {
    text-decoration: line-through;
}

.file-clickable {
    transition: opacity 0.2s;
}

.file-clickable:hover {
    opacity: 0.7;
}
