/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 24px 12px;
    color: #333;
}

::placeholder {
  color: #d4d4d4;   /* светло-серый */
  /* или color: rgba(0,0,0,0.25); */
}

/* Container */
.container {
    max-width: 1400px;
    margin: 0 auto;
}

/* Card */
.card {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    margin-bottom: 16px;
}

.auth-card {
    margin-bottom: 16px;
}

.card-header {
    padding: 20px 24px;
    border-bottom: 1px solid #e4e7ed;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

.card-header h2 {
    margin: 0;
    color: #303133;
    font-size: 24px;
}

.card-header h3 {
    margin: 0;
    color: #303133;
    font-size: 18px;
}

/* Stats Bar */
.stats-bar {
    display: flex;
    justify-content: center;
    gap: 32px;
    padding: 10px 24px;
    background: rgba(255, 255, 255, 0.12);
    border-radius: 8px;
    margin-bottom: 12px;
    backdrop-filter: blur(4px);
}

.stat-item {
    color: #fff;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.stat-icon {
    font-size: 16px;
}

.stat-item strong {
    font-weight: 600;
    color: #fff;
}

/* Auth Status */
.auth-status {
    padding: 20px 24px;
    text-align: center;
}

.auth-info {
    color: #909399;
    font-size: 14px;
}

.auth-success {
    color: #67c23a;
    font-size: 14px;
    font-weight: 500;
}

/* Seller Login Link */
.seller-login-link {
    padding: 0 24px 12px;
    text-align: center;
}

.seller-login-link a {
    color: #909399;
    font-size: 13px;
    text-decoration: none;
    transition: color 0.3s;
}

.seller-login-link a:hover {
    color: #409eff;
    text-decoration: underline;
}

/* Auth Buttons */
#authButtons {
    display: flex;
    gap: 8px;
    align-items: center;
}

#loggedInView {
    display: flex;
    gap: 12px;
    align-items: center;
}

.user-tag {
    background: #67c23a;
    color: white;
    padding: 8px 16px;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
}

/* Buttons */
.btn {
    padding: 10px 20px;
    border: 1px solid #dcdfe6;
    border-radius: 4px;
    background: white;
    color: #606266;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s;
    font-weight: 500;
}

.btn:hover {
    background: #f5f7fa;
    border-color: #c0c4cc;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-primary {
    background: #409eff;
    color: white;
    border-color: #409eff;
}

.btn-primary:hover:not(:disabled) {
    background: #66b1ff;
    border-color: #66b1ff;
}

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

.btn-danger:hover:not(:disabled) {
    background: #f78989;
    border-color: #f78989;
}

.btn-success {
    background: #67c23a;
    color: white;
    border-color: #67c23a;
}

.btn-success:hover:not(:disabled) {
    background: #85ce61;
    border-color: #85ce61;
}

.btn-text {
    background: transparent;
    border: none;
    color: #409eff;
    padding: 8px 12px;
}

.btn-text:hover {
    background: transparent;
    color: #66b1ff;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 12px;
    margin: 2px;
}

/* Search Form */
.search-form {
    padding: 24px;
    display: flex;
    gap: 12px;
    align-items: flex-end;
    flex-wrap: wrap;
}

/* Alerts */
.alert {
    padding: 12px 16px;
    border-radius: 4px;
    margin-bottom: 16px;
}

.alert-info {
    background: #ecf5ff;
    color: #409eff;
    border: 1px solid #b3d8ff;
}

.alert-success {
    background: #f0f9ff;
    color: #67c23a;
    border: 1px solid #c2e7b0;
}

.alert-error {
    background: #fef0f0;
    color: #f56c6c;
    border: 1px solid #fbc4c4;
}

.alert-warning {
    background: #fdf6ec;
    color: #e6a23c;
    border: 1px solid #f5dab1;
}

/* Descriptions */
.descriptions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 12px;
    margin-bottom: 16px;
    padding: 16px;
    background: #f5f7fa;
    border-radius: 4px;
}

.desc-item {
    padding: 8px;
}

.desc-item.desc-full {
    grid-column: 1 / -1;
}

.desc-item strong {
    color: #606266;
    margin-right: 8px;
}

/* Tables */
.table-container {
    padding: 0 24px 24px;
    overflow-x: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    border: 1px solid #ebeef5;
}

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

.data-table th {
    background: #f5f7fa;
    color: #606266;
    font-weight: 600;
    font-size: 14px;
}

.data-table td {
    color: #606266;
    font-size: 14px;
}

.data-table tbody tr:hover {
    background: #f5f7fa;
}

.no-results {
    text-align: center;
    padding: 40px;
    color: #909399;
}

/* Shop cell styles */
.shop-cell {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.shop-name a {
    color: #409eff;
    text-decoration: none;
    font-weight: 600;
}
.shop-name a:hover {
    text-decoration: underline;
}
.shop-details {
    font-size: 12px;
    color: #606266;
    line-height: 1.4;
}
.shop-details strong {
    color: #303133;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-content {
    background: white;
    border-radius: 8px;
    width: 100%;
    max-width: 450px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.3);
}

.modal-wide {
    max-width: 720px;
}

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

.modal-header h3 {
    margin: 0;
    color: #303133;
    font-size: 18px;
}

.modal-header h4 {
    margin: 20px 24px 12px;
    color: #303133;
    font-size: 16px;
}

.close {
    font-size: 28px;
    color: #909399;
    cursor: pointer;
    line-height: 1;
    transition: color 0.3s;
}

.close:hover {
    color: #606266;
}

.modal-content form {
    padding: 24px;
}

.modal-content h4 {
    padding: 0 24px;
    margin-top: 20px;
    margin-bottom: 12px;
    color: #303133;
}

.modal-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 24px;
    flex-wrap: wrap;
    gap: 12px;
}

.modal-footer > div {
    display: flex;
    gap: 8px;
}

.forgot-password-block {
    text-align: center;
    padding-top: 8px;
    border-top: 1px solid #e4e7ed;
    margin-top: 12px;
}

.forgot-password-btn {
    color: #409eff;
    font-size: 13px;
    cursor: pointer;
}

.forgot-password-btn:hover {
    color: #66b1ff;
    text-decoration: underline;
}

/* Forms */
.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    color: #606266;
    font-size: 14px;
    font-weight: 500;
}

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

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

.form-group input:disabled {
    background: #f5f7fa;
    cursor: not-allowed;
}

/* Review Form */
.review-form {
    padding: 0 24px 24px;
}

.rating-input {
    display: flex;
    flex-direction: row-reverse;
    justify-content: flex-end;
    gap: 4px;
}

.rating-input input {
    display: none;
}

.rating-input label {
    font-size: 32px;
    color: #dcdfe6;
    cursor: pointer;
    transition: color 0.2s;
}

.rating-input input:checked ~ label,
.rating-input label:hover,
.rating-input label:hover ~ label {
    color: #f7ba2a;
}

/* Messages */
.message {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(-100px);
    padding: 12px 20px;
    border-radius: 4px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);
    z-index: 2000;
    transition: transform 0.3s;
    min-width: 300px;
    text-align: center;
}

.message.show {
    transform: translateX(-50%) translateY(0);
}

.message-success {
    background: #f0f9ff;
    color: #67c23a;
    border: 1px solid #c2e7b0;
}

.message-error {
    background: #fef0f0;
    color: #f56c6c;
    border: 1px solid #fbc4c4;
}

.message-warning {
    background: #fdf6ec;
    color: #e6a23c;
    border: 1px solid #f5dab1;
}

.message-info {
    background: #ecf5ff;
    color: #409eff;
    border: 1px solid #b3d8ff;
}

/* Search highlight */
.search-highlight {
    background-color: #ffeb3b;
    padding: 0 2px;
    border-radius: 2px;
    font-weight: 600;
}

/* Allow long part numbers to wrap */
.data-table td:first-child {
    word-break: break-all;
    max-width: 200px;
}

/* Price column - bold, larger, right-aligned */
.data-table td:nth-child(5) {
    font-weight: 700;

/* Update time column - small, muted text */
.update-time {
    font-size: 11px;
    color: #909399;
    white-space: nowrap;
    font-size: 16px;
    color: #060606;
    white-space: nowrap;
    text-align: right;
}

/* Responsive */
@media (max-width: 768px) {
    .search-form {
        flex-direction: column;
        align-items: stretch;
    }
    
    .modal-content {
        max-width: 100%;
    }
    
    .card-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    #authButtons {
        width: 100%;
        justify-content: flex-end;
    }
    
    .data-table {
        font-size: 12px;
    }
    
    .data-table th,
    .data-table td {
        padding: 8px;
    }
}
