/* Global Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f5f7fa;
    color: #333;
    line-height: 1.6;
}

a {
    text-decoration: none;
    color: #0779e4;
}

a:hover {
    text-decoration: underline;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 0.5em;
    color: #333;
}

h1 {
    font-size: 1.8rem;
}

h2 {
    font-size: 1.5rem;
}

h3 {
    font-size: 1.2rem;
}

p {
    margin-bottom: 1rem;
}

/* Form Elements */
.form-group {
    margin-bottom: 1.2rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #495057;
}

input, select, textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-size: 1rem;
    transition: border-color 0.2s, box-shadow 0.2s;
}

input:focus, select:focus, textarea:focus {
    border-color: #0779e4;
    outline: none;
    box-shadow: 0 0 0 3px rgba(7, 121, 228, 0.25);
}

/* Buttons */
.btn {
    display: inline-block;
    font-weight: 500;
    text-align: center;
    white-space: nowrap;
    vertical-align: middle;
    user-select: none;
    border: 1px solid transparent;
    padding: 0.5rem 1rem;
    font-size: 1rem;
    line-height: 1.5;
    border-radius: 4px;
    transition: all 0.2s;
    cursor: pointer;
}

.btn-primary {
    background-color: #0779e4;
    color: #fff;
    border-color: #0779e4;
}

.btn-primary:hover {
    background-color: #0568bf;
    border-color: #0568bf;
}

.btn-secondary {
    background-color: #6c757d;
    color: #fff;
    border-color: #6c757d;
}

.btn-secondary:hover {
    background-color: #5a6268;
    border-color: #5a6268;
}

.btn-outline {
    background-color: transparent;
    border-color: #0779e4;
    color: #0779e4;
}

.btn-outline:hover {
    background-color: #0779e4;
    color: #fff;
}

.btn-danger {
    background-color: #dc3545;
    color: #fff;
    border-color: #dc3545;
}

.btn-danger:hover {
    background-color: #c82333;
    border-color: #bd2130;
}

.btn-block {
    display: block;
    width: 100%;
}

/* Utilities */
.text-center {
    text-align: center;
}

.text-right {
    text-align: right;
}

.text-left {
    text-align: left;
}

/* Sidebar Styles */
.sidebar {
    /* Existing sidebar styles if any - this is a placeholder if none exist yet */
    /* For example:
    width: 250px;
    background-color: #343a40; 
    color: #fff;
    */
}

.sidebar-header {
    background-color: #ffffff; /* White background */
    padding: 15px; /* Add some padding around the content */
    border-bottom: 1px solid #e0e0e0; /* Optional: a light border to separate from nav */
    text-align: center; /* Center the logo and title if they aren't already */
}

#logo {
    max-width: 80%; /* Ensure logo isn't too large for the padded area */
    height: auto; /* Maintain aspect ratio */
    margin-bottom: 10px; /* Space between logo and title */
    /* filter: invert(1); Removed as per user feedback */
    border: 1px solid #eee; /* Add a very light border to help separate from white bg */
    padding: 2px; /* Optional: small padding inside the border if needed */
    background-color: #fdfdfd; /* Slightly off-white background for the image itself if it has transparency */
}

.sidebar-footer .last-scrape-info {
    font-size: 0.8em;
    color: #adb5bd; /* Lighter text color for less emphasis */
    text-align: center;
    margin-bottom: 8px;
}

.sidebar-footer .last-scrape-info small {
    display: block; /* Make each small tag take its own line */
}

.sidebar-footer hr { /* Style for the hr added in HTML */
    border-top: 1px solid rgba(255,255,255,0.1);
    margin: 10px 0;
}


/* End Sidebar Styles */

.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 1rem; }
.mt-4 { margin-top: 1.5rem; }
.mt-5 { margin-top: 3rem; }

.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 1rem; }
.mb-4 { margin-bottom: 1.5rem; }
.mb-5 { margin-bottom: 3rem; }

.ml-1 { margin-left: 0.25rem; }
.ml-2 { margin-left: 0.5rem; }
.ml-3 { margin-left: 1rem; }

.mr-1 { margin-right: 0.25rem; }
.mr-2 { margin-right: 0.5rem; }
.mr-3 { margin-right: 1rem; }

.p-1 { padding: 0.25rem; }
.p-2 { padding: 0.5rem; }
.p-3 { padding: 1rem; }
.p-4 { padding: 1.5rem; }
.p-5 { padding: 3rem; }

.d-flex { display: flex; }
.flex-column { flex-direction: column; }
.justify-content-between { justify-content: space-between; }
.justify-content-center { justify-content: center; }
.align-items-center { align-items: center; }

/* Error Messages */
.error-message {
    color: #dc3545;
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
    border-radius: 4px;
    padding: 0.75rem 1.25rem;
    margin-bottom: 1rem;
}

.success-message {
    color: #28a745;
    background-color: #d4edda;
    border: 1px solid #c3e6cb;
    border-radius: 4px;
    padding: 0.75rem 1.25rem;
    margin-bottom: 1rem;
}

/* Container */
.container {
    width: 100%;
    padding-right: 15px;
    padding-left: 15px;
    margin-right: auto;
    margin-left: auto;
}

@media (min-width: 576px) {
    .container {
        max-width: 540px;
    }
}

@media (min-width: 768px) {
    .container {
        max-width: 720px;
    }
}

@media (min-width: 992px) {
    .container {
        max-width: 960px;
    }
}

@media (min-width: 1200px) {
    .container {
        max-width: 1140px;
    }
}

/* Loading Spinner */
.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(0, 0, 0, 0.1);
    border-radius: 50%;
    border-top-color: #0779e4;
    animation: spin 1s ease-in-out infinite;
    margin: 20px auto;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Responsive Helpers */
.d-none {
    display: none !important;
}

.d-block {
    display: block !important;
}

@media (min-width: 768px) {
    .d-md-none {
        display: none !important;
    }

    .d-md-block {
        display: block !important;
    }

    .d-md-flex {
        display: flex !important;
    }
}

@media (min-width: 992px) {
    .d-lg-none {
        display: none !important;
    }

    .d-lg-block {
        display: block !important;
    }

    .d-lg-flex {
        display: flex !important;
    }
}
