/* Font Face */
@font-face {
    font-family: 'LFPressSans';
    src: url('../fonts/LFPressSans.woff2') format('woff2'),
         url('../fonts/LFPressSans.woff') format('woff'),
         url('../fonts/LFPressSans.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'LFPressSans';
    src: url('../fonts/Crops-LFPressSans-Bold.woff2') format('woff2'),
         url('../fonts/Crops-LFPressSans-Bold.woff') format('woff'),
         url('../fonts/Crops-LFPressSans-Bold.ttf') format('truetype');
    font-weight: bold;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'LFPressSans';
    src: url('../fonts/Crops-LFPressSans-Italic.woff2') format('woff2'),
         url('../fonts/Crops-LFPressSans-Italic.woff') format('woff'),
         url('../fonts/Crops-LFPressSans-Italic.ttf') format('truetype');
    font-weight: normal;
    font-style: italic;
    font-display: swap;
}

/* Global Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'LFPressSans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Utility Classes */
.d-none {
    display: none !important;
}

.mb-3 {
    margin-bottom: 0.75rem;
}

.mt-3 {
    margin-top: 1rem;
}

/* Navigation */
.navbar {
    background-color: #f0f0e9;
    color: #333;
    padding: 1rem 0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.navbar-brand-container {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.navbar-brand {
    color: #333;
    text-decoration: none;
    font-size: 1.5rem;
    font-weight: bold;
}

.environment-badge {
    background-color: #ffc107;
    color: #333;
    font-size: 0.75rem;
    font-weight: bold;
    padding: 0.25rem 0.6rem;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

.navbar-nav {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

.nav-link {
    color: #333;
    text-decoration: none;
    transition: opacity 0.3s;
}

.nav-link:hover {
    opacity: 0.8;
}

.nav-text {
    color: #333;
}

/* Main Content */
main {
    padding: 0 0;
    min-height: calc(100vh - 200px);
}

/* Footer */
.footer {
    background-color: #333;
    color: white;
    padding: 1.5rem 0;
    text-align: center;
    margin-top: 3rem;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    text-decoration: none;
    font-size: 1rem;
    transition: all 0.3s;
}

.btn-primary {
    background-color: #076471;
    color: white;
}

.btn-primary:hover {
    background-color: #054a54;
}

.btn-secondary {
    background-color: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background-color: #5a6268;
}

/* Forms */
.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.3rem;
    font-weight: 500;
}

.form-control {
    width: 100%;
    padding: 0.35rem 0.6rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 0.9rem;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.form-control:focus {
    outline: none;
    border-color: #076471;
    box-shadow: 0 0 0 3px rgba(7, 100, 113, 0.1);
}

.form-control[type="file"] {
    padding: 0.3rem 0.5rem;
    font-size: 0.875rem;
    background-color: #fff;
}

.form-control[type="file"]::file-selector-button {
    padding: 0.3rem 0.6rem;
    margin-right: 0.6rem;
    background-color: #f8f9fa;
    color: #333;
    border: 1px solid #ddd;
    border-radius: 3px;
    cursor: pointer;
    font-size: 0.875rem;
    transition: background-color 0.15s ease-in-out, border-color 0.15s ease-in-out;
}

.form-control[type="file"]::file-selector-button:hover {
    background-color: #e9ecef;
    border-color: #adb5bd;
}

.form-label {
    display: block;
    margin-bottom: 0.3rem;
    font-weight: 500;
}

/* Inline file upload layout */
.file-upload-row {
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 1rem;
    align-items: center;
}

.form-label-inline {
    margin-bottom: 0;
    font-weight: 600;
    font-size: 0.9rem;
    color: #333;
    text-align: left;
    white-space: nowrap;
}

.form-control-inline {
    padding: 0.3rem 0.5rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 0.875rem;
    background-color: #fff;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.form-control-inline:focus {
    outline: none;
    border-color: #076471;
    box-shadow: 0 0 0 3px rgba(7, 100, 113, 0.1);
}

.form-control-inline::file-selector-button {
    padding: 0.3rem 0.6rem;
    margin-right: 0.6rem;
    background-color: #f8f9fa;
    color: #333;
    border: 1px solid #ddd;
    border-radius: 3px;
    cursor: pointer;
    font-size: 0.875rem;
    transition: background-color 0.15s ease-in-out, border-color 0.15s ease-in-out;
}

.form-control-inline::file-selector-button:hover {
    background-color: #e9ecef;
    border-color: #adb5bd;
}

/* Alerts */
.alert {
    padding: 1rem 1.5rem;
    border-radius: 4px;
    margin-bottom: 1.5rem;
}

.alert-warning {
    background-color: #fff3cd;
    border: 1px solid #ffeaa7;
    color: #856404;
}

.alert-danger {
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
}

.alert-success {
    background-color: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
}

/* Login Page */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #076471 0%, #054a54 100%);
}

.login-box {
    background: white;
    padding: 3rem;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    text-align: center;
    min-width: 400px;
}

.login-box h1 {
    color: #076471;
    margin-bottom: 0.5rem;
}

.login-box h2 {
    margin-bottom: 2rem;
    color: #666;
    font-weight: normal;
}

/* Welcome Page */
.welcome-container {
    background: white;
    padding: 3rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.server-info {
    background-color: #f8f9fa;
    padding: 1.5rem;
    border-radius: 4px;
    margin-top: 2rem;
}

.server-info h3 {
    margin-bottom: 1rem;
}

/* Database Login Page */
.database-login-container {
    background: white;
    padding: 3rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    max-width: 600px;
    margin: 0 auto;
}

/* Tasks Page */
.tasks-container {
    background: white;
    margin-top: 1rem;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.tasks-layout {
    display: flex;
    flex-direction: column;
    gap: 0rem;
}

.tasks-list {
    background-color: #f8f9fa;
    padding: 1.5rem;
    border-radius: 4px;
    margin-bottom: 1.5rem;
}

.tasks-list h2 {
    margin-bottom: 1rem;
    font-size: 1.25rem;
}

.list-group {
    list-style: none;
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 1rem;
    padding: 0;
    margin: 0;
    justify-content: flex-start;
    align-items: stretch;
}

.list-group-item {
    padding: 0;
    margin: 0;
    flex: 0 1 auto;
}

.list-group-item a {
    display: block;
    padding: 0.875rem 1.5rem;
    color: #333;
    text-decoration: none;
    border-radius: 6px;
    transition: all 0.3s ease;
    background-color: white;
    border: 2px solid #dee2e6;
    font-weight: 500;
    white-space: nowrap;
    text-align: center;
    font-size: 0.9rem;
    height: 100%;
}

.list-group-item a:hover {
    background-color: #e9ecef;
    border-color: #076471;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.list-group-item.active a {
    background-color: #076471;
    color: white;
    border-color: #076471;
    box-shadow: 0 2px 4px rgba(7, 100, 113, 0.3);
}

.task-details {
    padding: 1.5rem 0;
}

.task-description {
    background-color: #f8f9fa;
    padding: 0.2rem;
    border-radius: 4px;
    margin: 1.5rem 0;
    font-family: inherit;
}

.status-window {
    margin-top: 2rem;
    background-color: #1e1e1e;
    border-radius: 4px;
    overflow: hidden;
}

.status-window h3 {
    background-color: #2d2d2d;
    color: white;
    padding: 0.75rem 1rem;
    margin: 0;
}

.status-window pre {
    color: #d4d4d4;
    padding: 1rem;
    margin: 0;
    overflow-x: auto;
    max-height: 500px;
    overflow-y: auto;
    font-family: 'Consolas', 'Courier New', monospace;
    font-size: 0.9rem;
}

/* Status message colors */
.text-warning {
    color: #ffa500 !important; /* Light orange for warnings */
}

.text-danger {
    color: #ff6b6b !important; /* Red for errors */
}

/* Download Files Section */
#downloadFilesContainer {
    margin-top: 2rem;
}

#downloadFilesContainer h3 {
    margin-bottom: 1rem;
    color: #076471;
}

#downloadFilesContainer .alert-info {
    background-color: #d1ecf1;
    border: 1px solid #bee5eb;
    color: #0c5460;
    padding: 0.75rem 1rem;
    border-radius: 4px;
    margin-bottom: 1rem;
}

#downloadFilesContainer .alert-info i {
    margin-right: 0.5rem;
}

#downloadFilesList .list-group-item {
    padding: 0.75rem 1rem;
    background-color: #fff;
    border: 1px solid #dee2e6;
    color: #076471;
    text-decoration: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.2s;
}

#downloadFilesList .list-group-item:hover {
    background-color: #e7f4f5;
    border-color: #076471;
    transform: translateX(5px);
}

#downloadFilesList .list-group-item i {
    margin-right: 0.5rem;
}

#downloadFilesList .badge {
    padding: 0.05rem 0.3rem;
    border-radius: 3px;
    font-size: 0.875rem;
    margin-left: 8px;
}

#downloadFilesList .bg-secondary {
    background-color: #6c757d !important;
    color: white;
}

/* Responsive Design */
@media (max-width: 768px) {
    .list-group {
        flex-direction: column;
    }
    
    .list-group-item a {
        width: 100%;
    }
    
    .login-box {
        min-width: auto;
        width: 100%;
        max-width: 400px;
    }
}

/* Progress Bar Styles */
.progress {
    display: flex;
    height: 1rem;
    overflow: hidden;
    font-size: 0.75rem;
    background-color: #e9ecef;
    border-radius: 0.25rem;
}

.progress-bar {
    display: flex;
    flex-direction: column;
    justify-content: centered;
    overflow: hidden;
    color: #fff;
    text-align: center;
    white-space: nowrap;
    background-color: #076471;
    transition: width 0.6s ease;
}

.progress-bar-striped {
    background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
    background-size: 1rem 1rem;
}

.progress-bar-animated {
    animation: progress-bar-stripes 1s linear infinite;
}

@keyframes progress-bar-stripes {
    0% {
        background-position: 1rem 0;
    }
    100% {
        background-position: 0 0;
    }
}

.bg-success {
    background-color: #28a745 !important;
}

.bg-danger {
    background-color: #dc3545 !important;
}

.float-end {
    float: right !important;
}

.badge {
    display: inline-block;
    padding: 0.25em 0.4em;
    font-size: 75%;
    font-weight: 700;
    line-height: 1;
    text-align: center;
    white-space: nowrap;
    vertical-align: baseline;
    border-radius: 0.25rem;
}

.spinner-border {
    display: inline-block;
    width: 1rem;
    height: 1rem;
    vertical-align: -0.125em;
    border: 0.15em solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    animation: spinner-border 0.75s linear infinite;
}

.spinner-border-sm {
    width: 0.875rem;
    height: 0.875rem;
    border-width: 0.125em;
}

@keyframes spinner-border {
    to {
        transform: rotate(360deg);
    }
}
