html.in-frame .vselect-change-container {
    display: none !important;
}

html.in-frame .container,
html.in-frame .mycontent {
    min-height: 0;
    height: auto;
    padding: 0;
    gap: 0;
}

html.in-frame .ProductDiv,
html.in-frame .page-content,
html.in-frame .loginDiv {
    flex: 1;
    width: 100%;
    box-shadow: none;
}

.container {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.mycontent {
    flex: 1;
    display: flex;
    flex-direction: row;
    align-items: stretch;
    padding: 16px;
    gap: 16px;
    box-sizing: border-box;
}

.vselect-change-container {
    flex: 0 0 200px;
    display: flex;
    flex-direction: column;
    background-color: #2c3e50;
    padding: 16px;
    border-radius: 8px;
    box-sizing: border-box;
}

.vselect-change-container a {
    display: block;
    margin-bottom: 8px;
    padding: 10px 12px;
    color: #ecf0f1;
    text-decoration: none;
    border-radius: 6px;
    font-size: 14px;
}

.vselect-change-container a:hover {
    background-color: #34495e;
    color: #fff;
}

.vselect-change-container a.active {
    background-color: #1abc9c;
    color: #fff;
}

#welcome {
    margin: 16px 0 8px;
    font-size: 13px;
    color: #bdc3c7;
    line-height: 1.4;
}

#username-label {
    color: #fff !important;
    font-weight: 600;
}

#btn-logout {
    width: 100%;
    height: 36px;
    background-color: #e74c3c;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    margin-top: 8px;
}

#btn-logout:hover {
    background-color: #c0392b;
}

.page-content {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.ProductDiv {
    flex: 1;
    min-width: 0;
    background-color: #fff;
    border-radius: 8px;
    padding: 20px 24px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}

.page-content .ProductDiv {
    flex: 0 0 auto;
}

.UpgradeDiv {
    margin-top: 24px;
    background-color: #fff;
    border-radius: 8px;
    padding: 20px 24px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}

.page-content .UpgradeDiv {
    margin-top: 0;
}

.page-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.page-toolbar label {
    font-size: 14px;
    font-weight: 600;
}

.page-toolbar input[type="text"],
.page-toolbar select {
    padding: 8px 10px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 14px;
    min-width: 180px;
}

.page-toolbar button {
    padding: 8px 16px;
    border: none;
    border-radius: 6px;
    background-color: #3498db;
    color: white;
    cursor: pointer;
    font-size: 14px;
}

.page-toolbar button:hover {
    background-color: #2980b9;
}

.page-toolbar button.btn-danger {
    background-color: #e74c3c;
}

.page-toolbar button.btn-danger:hover {
    background-color: #c0392b;
}

input[type=text] {
    padding: 8px 10px;
    border: 1px solid #ccc;
    border-radius: 6px;
}

button {
    padding: 8px 16px;
    border: none;
    border-radius: 6px;
    background-color: #333;
    color: white;
    cursor: pointer;
}

table {
    width: 100%;
    border-collapse: collapse;
    table-layout: auto;
    font-size: 13px;
}

th, td {
    padding: 8px 10px;
    border: 1px solid #e0e0e0;
    word-break: break-word;
    vertical-align: top;
}

th {
    background: #f0f3f6;
    font-weight: 600;
    cursor: pointer;
    user-select: none;
}

tbody tr:nth-child(even) {
    background: #fafbfc;
}

tbody tr:hover {
    background: #f0f8ff;
}

#pagination, #upgradePagination {
    margin-top: 16px;
    font-size: 14px;
    line-height: 2;
}

#pagination a, #upgradePagination a {
    margin: 0 4px;
    padding: 4px 10px;
    border-radius: 4px;
    text-decoration: none;
    color: #3498db;
    border: 1px solid #3498db;
}

#pagination a:hover, #upgradePagination a:hover {
    background: #3498db;
    color: #fff;
}

#pagination span, #upgradePagination span {
    margin: 0 4px;
    padding: 4px 10px;
    border-radius: 4px;
    background: #3498db;
    color: #fff;
}

#pagination span.page-meta, #upgradePagination span.page-meta {
    margin-right: 12px;
    padding-left: 0;
    background: transparent;
    color: #666;
    font-weight: 500;
}

#pagination span.page-ellipsis, #upgradePagination span.page-ellipsis {
    background: transparent;
    color: #666;
    border: 0;
    padding: 4px 2px;
}

#btn-delete-bm {
    display: inline-block !important;
}

#btn-delete-bm:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.form-page-wrap {
    flex: 1;
    min-width: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 32px 24px;
    box-sizing: border-box;
}

.form-card {
    background: #fff;
    border-radius: 8px;
    padding: 24px 28px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
    width: 100%;
    max-width: 720px;
    box-sizing: border-box;
}

.form-card h1 {
    margin: 0 0 8px;
    font-size: 22px;
}

.form-horizontal {
    width: 100%;
}

.form-group {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    margin-bottom: 16px;
    gap: 8px 12px;
}

.control-label {
    width: 140px;
    font-weight: 600;
    font-size: 14px;
    flex: 0 0 140px;
}

.form-control,
.select-option {
    flex: 1;
    min-width: 220px;
    height: 38px;
    padding: 8px 10px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 14px;
    box-sizing: border-box;
}

.select-option {
    background: #fff;
}

.file-input {
    display: inline-block;
    padding: 8px 14px;
    border: 1px solid #ccc;
    border-radius: 6px;
    background: #fff;
    cursor: pointer;
    font-size: 14px;
}

.file-input:hover {
    border-color: #3498db;
    color: #3498db;
}

.btn,
.btn-primary,
#btn-commit,
#btn-upload,
#btn-update,
#btn-delete,
#btn-commit-add,
#closePopup,
#btn-login,
#btn-reg,
#download {
    padding: 8px 16px;
    border: none;
    border-radius: 6px;
    background-color: #3498db;
    color: #fff;
    cursor: pointer;
    font-size: 14px;
    height: auto;
    width: auto;
}

#btn-delete,
#closePopup {
    background-color: #e74c3c;
}

.btn:hover,
.btn-primary:hover,
#btn-commit:hover,
#btn-upload:hover,
#btn-login:hover,
#download:hover {
    background-color: #2980b9;
}

#progressBarContainer {
    margin: 12px 0;
}

#progressBar {
    height: 8px;
    background-color: #1abc9c;
    border-radius: 4px;
}

.switch-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.switch {
    position: relative;
    display: inline-block;
    width: 52px;
    height: 28px;
    flex: 0 0 52px;
}
.switch input { opacity: 0; width: 0; height: 0; }
.slider {
    position: absolute;
    cursor: pointer;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: #ccc;
    transition: .2s;
    border-radius: 28px;
}
.slider:before {
    position: absolute;
    content: "";
    height: 22px;
    width: 22px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .2s;
    border-radius: 50%;
}
input:checked + .slider { background-color: #1abc9c; }
input:checked + .slider:before { transform: translateX(24px); }

#product_add {
    display: none;
    margin-top: 16px;
}

#latestVersion {
    background-color: #eee;
}

.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f5f6f8;
}

.login-card {
    width: 380px;
    background: #fff;
    border-radius: 8px;
    padding: 32px 28px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}

.login-card h2 {
    margin: 0 0 20px;
    text-align: center;
}

.login-card .form-group {
    display: block;
}

.login-card .control-label {
    display: block;
    width: auto;
    margin-bottom: 6px;
}

.login-card .form-control,
.login-card #btn-login,
.login-card #btn-reg {
    width: 100%;
}

.login-card #btn-login,
.login-card #btn-reg {
    margin-top: 8px;
    height: 40px;
}
