body {
    font-family: Arial, sans-serif;
    background-color: #f4f4f4;
    margin: 0;
    padding: 20px;
    color: #333;
}

.container {
    position: relative;

    max-width: 2000px;
    margin: auto;
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

h1 {
    color: #e67e22;
    text-align: center;
}
/* Centered Login Form */
.login-container {
    width: 100%;
    max-width: 400px;
    margin: 100px auto;
    padding: 20px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    text-align: center;
}

/* Login Heading */
.login-container h2 {
    margin-bottom: 20px;
    font-size: 24px;
    color: #e67e22;
}

/* Login Input Fields */
.login-container input[type="text"],
.login-container input[type="password"] {
    width: 100%;
    padding: 10px;
    margin: 10px 0;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 16px;
    box-sizing: border-box;
}

/* Login Button */
.login-container button {
    width: 100%;
    padding: 12px;
    background-color: #e67e22;
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 18px;
    cursor: pointer;
    margin-top: 10px;
    transition: background 0.3s ease-in-out;
}

.login-container button:hover {
    background-color: #c0392b;
}

/* Flash Message Styling */
.flash-messages {
    margin-bottom: 15px;
}

.flash-success {
    background: #2ecc71;
    color: white;
    padding: 10px;
    border-radius: 5px;
}

.flash-danger {
    background: #e74c3c;
    color: white;
    padding: 10px;
    border-radius: 5px;
}

.logout-container {
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 1000; /* Ensures it's on top */
}

.logout-btn {
    background-color: #e67e22;
    color: white;
    padding: 10px 15px;
    border-radius: 5px;
    text-decoration: none;
    font-size: 16px;
}

.logout-btn:hover {
    background-color: #c82333;
}

/* Limit the width of the  column */
/* td[data-column="value"], th[data-column="value"] {
    max-width: 800px;    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
} 
*/
td[data-column="type"] {
    word-wrap: break-word;
    overflow-wrap: break-word;
    white-space: normal;
}
td[data-column="groups"] {
    max-width: 200px; /* Adjust this value */
    word-wrap: break-word;
    overflow-wrap: break-word;
    white-space: normal;
}
td[data-column="name"] {
    max-width: 180px; /* Adjust this value */
    word-wrap: break-word;
    overflow-wrap: break-word;
    white-space: normal;
}
td[data-column="parent_name"] {
    max-width: 180px; /* Adjust this value */
    word-wrap: break-word;
    overflow-wrap: break-word;
    white-space: normal;
}
td[data-column="variables"] {
    max-width: 180px; /* Adjust this value */
    word-wrap: break-word;
    overflow-wrap: break-word;
    white-space: normal;
}
td[data-column="value"] {
    max-width: 180px; /* Adjust this value */
    word-wrap: break-word;
    overflow-wrap: break-word;
    white-space: normal;
}
td[data-column="description"] {
    max-width: 180px; /* Adjust this value */
    word-wrap: break-word;
    overflow-wrap: break-word;
    white-space: normal;
}
td[data-column="specification"] {
    max-width: 180px; /* Adjust this value */
    word-wrap: break-word;
    overflow-wrap: break-word;
    white-space: normal;
}
td[data-column="owner"] {
    max-width: 100px; /* Adjust this value */
    word-wrap: break-word;
    overflow-wrap: break-word;
    white-space: normal;
}

/* ✅ Ensures buttons have the same height as the search field */
.search-action-btn {
    background: white;
    border: 2px solid #f39c12;
    color: #f39c12;
    padding: 8px 15px; /* Matches the search field */
    height: 40px; /* Fixed height to match input */
    min-width: 40px; /* Ensures consistent button size */
    border-radius: 5px;
    font-size: 16px;
    cursor: pointer;
    transition: background 0.3s, color 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ✅ Hover effect */
.search-action-btn:hover {
    background: #f39c12;
    color: white;
}

/* Style for the global search field */
.styled-search {
    width: 100%;
    max-width: 400px;
    padding: 10px;
    border: 2px solid #f39c12;
    border-radius: 5px;
    font-size: 16px;
    outline: none;
    margin: 3px;
    transition: border-color 0.3s;
}

.styled-search:focus {
    border-color: #e67e22;
}


/* Table Controls (First Row) */
.table-controls {
    display: flex;
    justify-content: flex-start; /* Align table tabs to the left */
    margin-bottom: 20px; /* Adds space below the first row */
}

.table-tabs-container button {
    font-size: 18px; /* Adjust this value to your desired font size */
    padding: 12px 25px; /* Increase padding for better button appearance */
    margin: 3px; /* Adds margin around each button for spacing */
    border-radius: 4px;
    background-color: #f39c12; /* Example background color */
    color: white;
    border: none;
    cursor: pointer;
    transition: background 0.3s;
}

.table-tabs-container button:hover {
    background-color: #e67e22; /* Example hover background color */
}

/* Action Buttons and Toolbar Buttons (Second Row) */
.toolbar-action-buttons {
    display: flex;
    flex-direction: row; /* Align action buttons and toolbar buttons in a row */
    justify-content: space-between; /* Space between the two sections */
    align-items: center; /* Align the buttons vertically */
    margin-bottom: 10px; /* ✅ Adds space below the toolbar */

}

.toolbar-stats {
    display: flex;
    justify-content: center; /* Center align inside the row */
    align-items: center;
    flex-grow: 1;
    font-size: 16px;
    font-weight: bold;
    gap: 4px; /* Space between stats */
}


.toolbar-action {
    display: flex;
    justify-content: flex-start; /* Align the action button to the left */
}

.toolbar-action button {
    background-color: #666;
    color: white;
    border: none;
    padding: 12px 25px; /* Increase padding */
    margin: 3px; /* Adds margin around the action button */
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.3s;
}

.toolbar-action button:hover {
    background-color: #d35400;
}

.toolbar-buttons {
    display: flex;
    justify-content: flex-end; /* Align the buttons to the right */
    gap: 10px;
}

.toolbar-buttons button {
    background-color: #666;
    color: white;
    border: none;
    padding: 12px 25px; /* Increase padding */
    margin: 3px; /* Adds margin around the toolbar buttons */
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.3s;
}

.toolbar-buttons button:hover {
    background-color: #d35400;
}

/* Table Styling */
#data-table {
    width: 100%;
    border-collapse: collapse;
}

#data-table th, #data-table td {
    border: 1px solid #ddd;
    padding: 8px;
    text-align: left;
}

#data-table th {
    background-color: #f39c12;
    color: white;
}

#data-table tr:nth-child(even) {
    background-color: #f9f9f9;
}

#data-table tr:hover {
    background-color: #f4d03f;
    cursor: pointer;
}

/* Table header styling */
th {
    text-align: left;
    padding: 10px;
    background-color: #f5f5f5;
    position: relative;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.column-title {
    font-weight: bold;
    font-size: 14px;
}

.sort-icons {
    display: flex;
    gap: 0 !important;  /* Force no gap */
    margin-left: auto;
    padding: 0 !important;  /* Force no padding */
    align-items: center;
}

.sort-icon {
    cursor: pointer;
    font-size: 18px !important;  /* Ensure font size is applied */
    color: #666 !important;
    margin: 0 !important; /* Force no margin */
    padding: 0 !important; /* Force no padding */
}
.sort-icon:hover {
    color: #000;
}


.search-field {
    padding: 5px;
    border: 1px solid #ccc;
    border-radius: 4px;
    width: 100%;
    box-sizing: border-box;
    margin-top: 5px;
}

/* Customize Flatpickr input */
.flatpickr-input {
    border: 1px solid #ccc;
    border-radius: 4px;
    padding: 5px;
    width: 100%;
    box-sizing: border-box;
}

.logo {
    display: block;
    margin-left: auto;
    margin-right: auto;
    max-width: 100%; /* Optional: Make sure the image doesn't exceed its container width */
    height: auto; /* Maintain aspect ratio */
    margin-bottom: 20px; /* Adjust this value to control the space below the logo */
}

/* Footer Styling */
footer {
    text-align: center;
    background-color: #ecf0f1; /* Light Grey */
    color: #333;
    padding: 20px 0;
    margin-top: 40px;
    font-size: 16px;
    width: 100%;
    position: relative;
    bottom: 0;
    left: 0;
    border-radius: 10px 10px 10px 10px; /* Rounded top corners */
}

footer p {
    margin: 5px 0;
}

footer a {
    color: #f39c12; /* Blue Links */
    text-decoration: none;
    font-weight: bold;
}

footer a:hover {
    color: #f39c12;
}

td {
    vertical-align: top; /* Align all table cells' content to the top */
    padding: 8px; /* Optional: Adjust padding for better spacing */
}

.cell-container {
    display: flex;
    justify-content: space-between;
    align-items: flex-start; /* Align content to the top */
    gap: 5px;
    width: 100%;
}

td {
    vertical-align: top; /* Align text at the top of the cell */
    padding: 8px;
}

.price_pur,
.price {
    text-align: right; /* Ensures price is right-aligned */
    flex-grow: 1; /* Pushes text to the right */
    min-width: 70px; /* Prevents collapse */
}

.copy-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 16px;
    color: #666;
    transition: background 0.3s, color 0.3s;
    align-self: flex-start; /* Keep copy button at the top */
    padding: 0px;
    border-radius: 4px;
}

/* Hover effect */

.copy-btn:hover {
    color: #000;
}
#tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 6px; /* ✅ Reduced space between tags */
    padding: 10px;
    margin: 15px 0;
    border-radius: 8px;
    justify-content: center;
    align-items: center;
    height: 90px; /* ✅ Slightly smaller fixed height */
    overflow-y: auto; /* ✅ Allows scrolling if too many tags */
    border: 1px solid #fff;
    background: #fff;
    position: relative;
}

/* ✅ Placeholder for when no tags are available */
#tag-cloud:empty::after {
    content: "No tags available";
    color: #aaa;
    font-size: 12px; /* ✅ Smaller placeholder text */
    position: absolute;
}

.tag-button {
    padding: 2px 4px; /* ✅ Reduced padding */
    font-size: 12px; /* ✅ Smaller font size */
    border: 1px solid #f39c12; /* ✅ Thinner border */
    background-color: white;
    color: #555;
    cursor: pointer;
    border-radius: 15px; /* ✅ Smaller, rounded shape */
    transition: background 0.2s ease-in-out, color 0.2s ease-in-out, border 0.2s ease-in-out;
    display: flex;
    align-items: center;
    gap: 4px;
    min-width: 70px; /* ✅ Smaller minimum width */
    height: 28px; /* ✅ Shorter height */
    justify-content: center;
    text-align: center;
    white-space: nowrap;
}

.tag-button .tag-count {
    background: #f39c12;
    color: white;
    font-size: 12px; /* ✅ Smaller count text */
    padding: 2px 4px; /* ✅ Reduced padding */
    border-radius: 10px;
    display: inline-block;
    min-width: 18px; /* ✅ Ensures a stable size */
    text-align: center;
}

.tag-button:hover {
    background-color: #f39c12;
    color: white;
    border-color: #e67e22;
}

.tag-button:hover .tag-count {
    background: white;
    color: #f39c12;
    border: 1px solid #f39c12;
}

.loading-spinner {
    position: fixed;
    top: 40%; /* ✅ Ensures it's always visible even on long pages */
    left: 50%;
    width: 40px;
    height: 40px;
    border: 4px solid rgba(243, 156, 18, 0.3);
    border-top-color: #f39c12;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    transform: translate(-50%, -50%);
    display: none;
    z-index: 9999; /* ✅ Ensures spinner stays on top */
    background: rgba(255, 255, 255, 0.7);
    padding: 10px;
}

@keyframes spin {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

.version-label {
    position: absolute;
    top: 10px;
    left: 15px;
    background-color: white;
    color: #f39c12;
    font-size: 14px;
    font-weight: bold;
    padding: 5px 10px;
    border-radius: 5px;
}