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

body {
    font-family: 'Helvetica Neue', Arial, sans-serif;
    background-color: #f5f5f5;
    color: #333;
}

.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    background-color: #1a1a1a;
}

.login-box {
    background: white;
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 0 20px rgba(0,0,0,0.1);
    width: 400px;
}

.login-box .logo {
    text-align: center;
    margin-bottom: 30px;
}

.login-box .logo h1 {
    font-size: 32px;
    font-weight: 300;
    letter-spacing: 4px;
    color: #c9a962;
}

.login-box .logo p {
    font-size: 14px;
    color: #888;
    margin-top: 5px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    font-size: 14px;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    border-color: #c9a962;
    outline: none;
}

.form-group textarea {
    height: 100px;
    resize: vertical;
}

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.btn-primary {
    background-color: #c9a962;
    color: white;
}

.btn-primary:hover {
    background-color: #b89851;
}

.btn-secondary {
    background-color: #666;
    color: white;
}

.btn-secondary:hover {
    background-color: #555;
}

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

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

.admin-container {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 250px;
    background-color: #1a1a1a;
    color: white;
    padding: 20px;
    position: fixed;
    height: 100vh;
}

.sidebar .logo h1 {
    font-size: 24px;
    font-weight: 300;
    letter-spacing: 3px;
    color: #c9a962;
    margin-bottom: 30px;
}

.sidebar nav ul {
    list-style: none;
}

.sidebar nav ul li {
    margin-bottom: 10px;
}

.sidebar nav ul li a {
    display: block;
    padding: 12px;
    color: #ccc;
    text-decoration: none;
    transition: all 0.3s;
    font-size: 14px;
    letter-spacing: 1px;
}

.sidebar nav ul li a:hover,
.sidebar nav ul li a.active {
    color: #c9a962;
    background-color: rgba(201, 169, 98, 0.1);
}

.main-content {
    margin-left: 250px;
    flex: 1;
    padding: 30px;
}

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #ddd;
}

.header h2 {
    font-size: 24px;
    font-weight: 300;
    color: #333;
}

.dashboard-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.card {
    background: white;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.card h3 {
    font-size: 14px;
    color: #888;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.card p {
    font-size: 36px;
    font-weight: 300;
    color: #c9a962;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.data-table thead {
    background-color: #1a1a1a;
    color: white;
}

.data-table th,
.data-table td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.data-table th {
    font-weight: 500;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.data-table td img {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border-radius: 4px;
}

.data-table .action-buttons {
    display: flex;
    gap: 10px;
}

.data-table .action-buttons button {
    padding: 6px 12px;
    font-size: 12px;
}

.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.5);
}

.modal-content {
    background-color: white;
    margin: 10% auto;
    padding: 30px;
    border-radius: 8px;
    width: 500px;
    position: relative;
}

.modal-content h3 {
    margin-bottom: 20px;
    font-size: 20px;
    font-weight: 300;
    color: #333;
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close:hover {
    color: #c9a962;
}

.page-content-item {
    background: white;
    padding: 25px;
    border-radius: 8px;
    margin-bottom: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.page-content-item h3 {
    font-size: 16px;
    margin-bottom: 10px;
    color: #333;
}

.page-content-item .subtitle {
    color: #c9a962;
    font-size: 14px;
    margin-bottom: 10px;
}

.page-content-item .content {
    color: #666;
    font-size: 14px;
    line-height: 1.6;
}

.page-content-item .actions {
    margin-top: 15px;
}

.lang-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
}

.lang-tab {
    padding: 8px 16px;
    background: #f5f5f5;
    border: none;
    border-radius: 4px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.3s;
}

.lang-tab:hover {
    background: #e5e5e5;
}

.lang-tab.active {
    background: #c9a962;
    color: white;
}

.lang-content {
    margin-bottom: 20px;
}

.settings-container {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    overflow: hidden;
}

.settings-tabs {
    display: flex;
    border-bottom: 1px solid #eee;
}

.tab-btn {
    padding: 15px 25px;
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.tab-btn:hover {
    color: #c9a962;
}

.tab-btn.active {
    color: #c9a962;
    border-bottom-color: #c9a962;
}

#settings-content {
    padding: 0;
}

.setting-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    border-bottom: 1px solid #f5f5f5;
}

.setting-item:last-child {
    border-bottom: none;
}

.setting-item:hover {
    background-color: #fafafa;
}

.setting-info {
    flex: 1;
}

.setting-key {
    display: block;
    font-size: 12px;
    color: #888;
    margin-bottom: 5px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.setting-value {
    display: block;
    font-size: 14px;
    color: #333;
}

.setting-actions {
    display: flex;
    gap: 10px;
}

.setting-actions button {
    padding: 6px 12px;
    font-size: 12px;
}

.setting-item-batch {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 12px 0;
    border-bottom: 1px solid #f0f0f0;
}

.setting-label {
    font-size: 14px;
    color: #333;
    font-weight: 500;
    display: block;
    margin-bottom: 4px;
}

.setting-input {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    transition: border-color 0.3s;
}

.setting-input:focus {
    outline: none;
    border-color: #c9a962;
}

.setting-row {
    padding: 18px 20px;
    border-bottom: 1px solid #f0f0f0;
    transition: background-color 0.2s;
}

.setting-row:hover {
    background-color: #fafafa;
}

.setting-row-info {
    margin-bottom: 10px;
}

.setting-desc {
    display: block;
    font-size: 12px;
    color: #999;
    margin-top: 2px;
    line-height: 1.4;
}

.setting-row-body {
    display: flex;
    gap: 10px;
    align-items: center;
}

.setting-row-body .setting-input {
    flex: 1;
}

.btn-sm {
    padding: 8px 16px;
    font-size: 13px;
    white-space: nowrap;
    min-width: 70px;
}

.setting-status {
    margin-top: 8px;
    font-size: 13px;
    min-height: 20px;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: opacity 0.3s;
}

.setting-status.loading {
    color: #c9a962;
}

.setting-status.success {
    color: #52c41a;
}

.setting-status.error {
    color: #f5222d;
}

.batch-status {
    flex: 1;
    font-size: 13px;
    padding: 8px 0;
    display: flex;
    align-items: center;
    gap: 6px;
}

.batch-status.loading {
    color: #c9a962;
}

.batch-status.success {
    color: #52c41a;
}

.batch-status.error {
    color: #f5222d;
}

.status-icon {
    display: inline-block;
    width: 14px;
    height: 14px;
    vertical-align: middle;
}

.status-icon.spinner {
    border: 2px solid #c9a962;
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.status-icon.check {
    color: #52c41a;
    font-weight: bold;
}

.status-icon.cross {
    color: #f5222d;
    font-weight: bold;
}

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

.settings-batch-actions {
    padding: 20px;
    text-align: right;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    border-top: 1px solid #f0f0f0;
    background: #fafafa;
}

.settings-batch-actions .btn {
    padding: 10px 30px;
    font-size: 14px;
}

.image-upload-area {
    border: 2px dashed #ddd;
    border-radius: 8px;
    padding: 30px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    background-color: #fafafa;
}

.image-upload-area:hover {
    border-color: #c9a962;
    background-color: #f5f5f5;
}

.image-upload-area input {
    display: none;
}

.upload-hint {
    color: #888;
    font-size: 14px;
}

.images-preview {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-top: 15px;
}

.image-preview-item {
    position: relative;
    width: 120px;
    height: 120px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.image-preview-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.image-preview-item button {
    position: absolute;
    top: 5px;
    right: 5px;
    background: rgba(0,0,0,0.7);
    color: white;
    border: none;
    border-radius: 4px;
    padding: 4px 8px;
    font-size: 10px;
    cursor: pointer;
}

.cover-checkbox {
    position: absolute;
    bottom: 5px;
    left: 5px;
    right: 5px;
    background: rgba(0,0,0,0.7);
    color: white;
    padding: 3px 6px;
    font-size: 10px;
    cursor: pointer;
    border-radius: 4px;
}

.cover-checkbox input {
    margin-right: 4px;
}

.products-tabs {
    display: flex;
    gap: 0;
    border-bottom: 2px solid #eee;
    margin-bottom: 25px;
    background: white;
    border-radius: 8px 8px 0 0;
    overflow: hidden;
}

.products-tabs .tab-btn {
    flex: 1;
    padding: 16px 24px;
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    font-weight: 500;
    position: relative;
}

.products-tabs .tab-btn:hover {
    color: #c9a962;
    background-color: #fafafa;
}

.products-tabs .tab-btn.active {
    color: #c9a962;
    border-bottom-color: #c9a962;
    background-color: #fff;
}

.products-tabs .tab-btn.active::after {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 0;
    right: 0;
    height: 3px;
    background: #c9a962;
}

#products-panel,
#categories-panel {
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.category-table .sort-badge {
    display: inline-block;
    background: #f0f0f0;
    color: #666;
    padding: 2px 10px;
    border-radius: 12px;
    font-size: 12px;
}

.settings-tabs .tab-btn {
    flex: 1;
}

.product-cover-cell {
    width: 70px;
    text-align: center;
}

.product-cover-thumb {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border-radius: 4px;
    border: 1px solid #eee;
}

.featured-toggle-btn {
    width: 24px;
    height: 24px;
    border: 2px solid #ddd;
    background: white;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    color: transparent;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.featured-toggle-btn:hover {
    border-color: #c9a962;
}

.featured-toggle-btn.active {
    background: #c9a962;
    border-color: #c9a962;
    color: white;
}

.checkbox-group label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-weight: normal;
}

.checkbox-group input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}
