body {
    font-family: Arial, sans-serif;
    margin: 0;
    background-color: #f0f2f5;
    color: #333;
    padding: 20px;
}

.container {
    max-width: 1200px;
    margin: auto;
    background-color: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 0 15px rgba(0,0,0,0.1);
}

h1, h2, h3 {
    color: #1877f2;
    margin-top: 0;
}
h1 { text-align: center; margin-bottom: 20px; }
h2 { border-bottom: 2px solid #e0e0e0; padding-bottom: 10px; margin-bottom: 15px;}

.card {
    background-color: #ffffff;
    border: 1px solid #dddfe2;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.main-tab-content .card {
    margin-top: 0;
    margin-bottom: 25px; /* Add margin back for cards within main tabs if they are the primary content blocks */
}
.setup-area.card { margin-bottom: 0;} /* Setup area is container for sub-tabs, no extra margin */


.input-group {
    margin-bottom: 15px;
    display: flex;
    gap: 10px;
    align-items: center;
}
.input-group.inline-edit {
    display: inline-flex;
    margin-left: 10px;
}
.input-group label {
    font-weight: bold;
    min-width: 80px;
}
.auth-section .input-group input { /* Specific for auth inputs if needed */
    margin-bottom: 5px;
}


input[type="text"], input[type="number"], input[type="date"], input[type="email"], input[type="password"], select {
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 1em;
    flex-grow: 1;
}
input[type="date"] { flex-grow: 0;}

button {
    padding: 10px 18px;
    background-color: #1877f2;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1em;
    transition: background-color 0.3s ease;
    margin-left: 5px;
}
button:first-of-type {
    margin-left: 0;
}
button:hover {
    background-color: #166fe5;
}
button.secondary {
    background-color: #e4e6eb;
    color: #050505;
}
button.secondary:hover {
    background-color: #d8dadf;
}
button.danger {
    background-color: #fa383e;
}
button.danger:hover {
    background-color: #e02020;
}
.action-buttons button {
    padding: 5px 10px;
    font-size: 0.9em;
    margin-left: 5px;
}

/* Auth Section */
.auth-section { margin-bottom: 20px; }
.auth-section h4 { margin-top: 15px; margin-bottom: 5px;}
.auth-section hr { margin: 15px 0; }


/* Main Tab Styling */
.main-tabs {
    overflow: hidden;
    border-bottom: 2px solid #0056b3;
    margin-bottom: 20px;
    background-color: #f8f9fa;
}
.main-tab-button {
    background-color: inherit;
    float: left;
    border: none;
    outline: none;
    cursor: pointer;
    padding: 14px 20px;
    transition: 0.3s;
    font-size: 1.1em;
    color: #0056b3;
    border-radius: 6px 6px 0 0;
    margin-right: 5px;
    margin-left:0; /* override general button rule */
    border-top: 1px solid #dee2e6;
    border-left: 1px solid #dee2e6;
    border-right: 1px solid #dee2e6;
}
.main-tab-button:hover {
    background-color: #e9ecef;
}
.main-tab-button.active {
    background-color: #007bff;
    color: white;
    border-color: #007bff;
}
.main-tab-content {
    display: none;
    padding: 0; /* Content cards will provide their own padding */
}
.main-tab-content.active-main-content {
    display: block;
}

/* Sub-Tab Styling (within Setup) */
.setup-area .tabs {
    overflow: hidden;
    border-bottom: 1px solid #ccc;
    margin-bottom: 15px;
}
.setup-area .tab-button {
    background-color: #f1f1f1;
    float: left;
    border: none;
    outline: none;
    cursor: pointer;
    padding: 12px 18px;
    transition: 0.3s;
    color: #333;
    border-radius: 4px 4px 0 0;
    margin-left: 0;
    font-size: 1em;
}
.setup-area .tab-button:hover {
    background-color: #ddd;
}
.setup-area .tab-button.active {
    background-color: #6c757d;
    color: white;
}
.sub-tab-content {
    display: none;
    padding: 10px 0;
}
.sub-tab-content.active-sub-content {
    display: block;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
}
th, td {
    border: 1px solid #ddd;
    padding: 10px;
    text-align: left;
    vertical-align: middle;
}
th {
    background-color: #f0f2f5;
    font-weight: bold;
}

/* Product List Item Styling */
.product-item {
    border: 1px solid #e0e0e0;
    padding: 10px;
    margin-bottom: 10px;
    border-radius: 4px;
    background-color: #f9f9f9;
}
.product-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    cursor: pointer;
}
.product-item-header .product-name-area {
    display: flex;
    align-items: center;
}
.toggle-product-btn {
    background-color: #6c757d;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 3px 8px;
    font-size: 0.9em;
    margin-right: 10px;
    cursor: pointer;
    min-width: 25px;
    text-align: center;
    line-height: 1.2;
}
.toggle-product-btn:hover {
    background-color: #5a6268;
}
.product-details {
    padding-left: 20px;
    border-left: 2px solid #e0e0e0;
    margin-left: 10px;
    overflow: hidden;
}
.product-item .input-group { margin-bottom: 5px;}
.size-list { list-style: none; padding-left: 0; }
.size-list li {
    margin-bottom: 8px;
    padding: 5px;
    background-color: #fff;
    border: 1px solid #eee;
    border-radius: 3px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.item-name {
    flex-grow: 1;
}

/* Company List Table */
#companyListContainer table {
    width: 100%;
    margin-top: 15px;
    border-collapse: collapse;
}
#companyListContainer th,
#companyListContainer td {
    border: 1px solid #ddd;
    padding: 10px;
    text-align: left;
    vertical-align: middle;
}
#companyListContainer th {
    background-color: #f0f2f5;
}
#companyListContainer .action-buttons button {
    margin-right: 5px;
}
#companyListContainer .action-buttons button:last-child {
    margin-right: 0;
}


/* Markup Table Inputs */
#markupTableContainer input[type="number"] {
    width: 80px;
}
.input-group input[type="checkbox"] {
    margin-right: 5px;
    flex-grow: 0;
}
.input-group label[for*="selectAllSizesMarkup"] {
    margin-left: 0;
    font-weight: normal; /* Override bold if needed */
    min-width: auto; /* Override min-width if needed */
}
#markupTableContainer th:first-child,
#markupTableContainer td:first-child {
    width: 60px;
    text-align: center;
}
#markupTableContainer input[type="number"].markup-input:disabled {
    background-color: #e9ecef;
    cursor: not-allowed;
}