@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-weight: 400;
    background: linear-gradient(155deg, #f0f4ff 0%, #faf5ff 30%, #fdf2f2 70%, #fef3f2 100%);
    color: #1f2937;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    letter-spacing: -0.01em;
}

.container {
    width: 100%;
    max-width: 1200px;
    padding: 24px;
}

.card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 48px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04), 0 1px 2px rgba(0, 0, 0, 0.03);
}

.logo-container {
    text-align: center;
    margin-bottom: 32px;
}

.logo-container img {
    height: 36px;
    width: auto;
    opacity: 0.9;
}

h1, h2, h3 {
    color: #1f2937;
    font-weight: 600;
    letter-spacing: -0.02em;
}

h1 {
    font-size: 24px;
    text-align: center;
    margin-bottom: 8px;
}

h2 {
    font-size: 18px;
    margin-bottom: 16px;
}

h3 {
    font-size: 16px;
    margin-bottom: 12px;
}

.subtitle {
    text-align: center;
    color: #6b7280;
    margin-bottom: 36px;
    font-size: 14px;
    font-weight: 400;
}

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

label {
    display: block;
    margin-bottom: 8px;
    color: #374151;
    font-size: 13px;
    font-weight: 500;
}

input[type="text"],
input[type="password"],
input[type="number"],
textarea,
select {
    width: 100%;
    padding: 10px 14px;
    background: #ffffff;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    color: #1f2937;
    font-size: 14px;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    transition: border-color 0.2s, box-shadow 0.2s;
    outline: none;
}

input:focus, textarea:focus, select:focus {
    border-color: #635bff;
    box-shadow: 0 0 0 1px rgba(99, 91, 255, 0.15);
}

input::placeholder, textarea::placeholder {
    color: #9ca3af;
}

.btn {
    display: inline-block;
    padding: 11px 24px;
    background: #635bff;
    color: #ffffff;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
    text-align: center;
    width: 100%;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    letter-spacing: -0.01em;
}

.btn:hover {
    background: #5552d9;
}

.btn:active {
    background: #4a47b8;
}

.btn:disabled {
    background: #d1d5db;
    color: #9ca3af;
    cursor: not-allowed;
}

.btn-secondary {
    background: #f3f4f6;
    color: #374151;
    border: 1px solid #d1d5db;
}

.btn-secondary:hover {
    background: #e5e7eb;
    color: #1f2937;
}

.btn-secondary:active {
    background: #d1d5db;
}

.btn-danger {
    background: #ffffff;
    color: #dc2626;
    border: 1px solid #fca5a5;
}

.btn-danger:hover {
    background: #fef2f2;
    border-color: #f87171;
}

.btn-danger:active {
    background: #fee2e2;
}

.btn-warning {
    background: #fffbeb;
    color: #b45309;
    border: 1px solid #fcd34d;
}

.btn-warning:hover {
    background: #fef3c7;
    border-color: #fbbf24;
}

.btn-warning:active {
    background: #fde68a;
}

.btn-small {
    padding: 7px 14px;
    font-size: 13px;
    width: auto;
}

.error-message {
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 8px;
    padding: 12px 16px;
    color: #dc2626;
    margin-bottom: 20px;
    display: none;
    font-size: 13px;
    font-weight: 400;
}

.success-message {
    background: #ecfdf5;
    border: 1px solid #a7f3d0;
    border-radius: 8px;
    padding: 12px 16px;
    color: #059669;
    margin-bottom: 20px;
    display: none;
    font-size: 13px;
    font-weight: 400;
}

.loading {
    text-align: center;
    padding: 40px;
    color: #9ca3af;
    font-size: 14px;
}

.loading::after {
    content: '';
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid #d1d5db;
    border-top-color: #635bff;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
    margin-left: 10px;
    vertical-align: middle;
}

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

.hidden {
    display: none !important;
}

.navbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 14px 24px;
    margin-bottom: 24px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
}

.navbar-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 16px;
    font-weight: 600;
    color: #1f2937;
}

.navbar-brand img {
    height: 28px;
    width: auto;
}

.navbar-user {
    display: flex;
    align-items: center;
    gap: 16px;
    font-size: 13px;
    color: #6b7280;
}

.navbar-user .user-name {
    color: #374151;
    font-weight: 500;
}

.navbar-balance {
    background: #f0f4ff;
    border: 1px solid #dbe4ff;
    border-radius: 8px;
    padding: 5px 12px;
    font-size: 13px;
    color: #635bff;
    font-weight: 500;
}

.captcha-container {
    display: flex;
    align-items: center;
    gap: 12px;
}

.captcha-container svg {
    cursor: pointer;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
    background: #f9fafb;
}

.captcha-container .refresh-btn {
    background: #ffffff;
    border: 1px solid #d1d5db;
    color: #6b7280;
    padding: 8px 12px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    transition: all 0.2s;
}

.captcha-container .refresh-btn:hover {
    border-color: #635bff;
    color: #635bff;
    background: #fafaff;
}

.modal-close {
    background: none;
    border: none;
    color: #9ca3af;
    font-size: 24px;
    cursor: pointer;
    padding: 0 4px;
    line-height: 1;
    transition: color 0.2s;
}

.modal-close:hover {
    color: #374151;
}

.topup-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.topup-header h2 {
    margin-bottom: 0;
}

.amount-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-bottom: 12px;
}

.amount-btn {
    padding: 14px 16px;
    background: #ffffff;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    color: #374151;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.amount-btn:hover {
    border-color: #635bff;
    color: #635bff;
}

.amount-btn.selected {
    border-color: #635bff;
    background: #f0f4ff;
    color: #635bff;
}

.custom-amount-row {
    display: flex;
    gap: 10px;
}

.custom-amount-row input {
    flex: 1;
}

.qr-container {
    text-align: center;
    margin: 20px 0;
}

.qr-container img {
    max-width: 220px;
    border-radius: 10px;
    border: 1px solid #e5e7eb;
}

.verification-code-display {
    text-align: center;
    font-size: 13px;
    color: #6b7280;
    margin: 12px 0;
}

.verification-code-display span {
    font-size: 22px;
    font-weight: 600;
    color: #635bff;
    letter-spacing: 4px;
}

.cooldown-btn {
    position: relative;
    background: #635bff;
    color: #ffffff;
}

.cooldown-btn:hover {
    background: #5552d9;
}

.cooldown-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(243, 244, 246, 0.85);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    color: #6b7280;
    font-weight: 500;
}

.commodity-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
    margin-top: 16px;
}

.commodity-card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 24px;
    transition: border-color 0.2s;
}

.commodity-card:hover {
    border-color: #635bff;
}

.commodity-card .item-id {
    font-family: 'SF Mono', 'Fira Code', 'Courier New', monospace;
    font-size: 11px;
    color: #9ca3af;
    margin-bottom: 6px;
    font-weight: 400;
}

.commodity-card .item-name {
    font-size: 17px;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 12px;
}

.commodity-card .item-details {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.commodity-card .item-price {
    color: #635bff;
    font-size: 16px;
    font-weight: 600;
}

.commodity-card .item-quantity {
    color: #9ca3af;
    font-size: 13px;
    font-weight: 400;
}

.quantity-selector {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 14px;
}

.quantity-selector input {
    width: 72px;
    padding: 8px 10px;
    text-align: center;
}

.quantity-selector .qty-btn {
    width: 34px;
    height: 34px;
    background: #f9fafb;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    color: #374151;
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.quantity-selector .qty-btn:hover {
    border-color: #635bff;
    color: #635bff;
    background: #fafaff;
}

.status-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

.status-pending {
    background: #fffbeb;
    color: #d97706;
    border: 1px solid #fde68a;
}

.status-completed {
    background: #ecfdf5;
    color: #059669;
    border: 1px solid #a7f3d0;
}

.status-refunded {
    background: #fef2f2;
    color: #dc2626;
    border: 1px solid #fecaca;
}

.order-table {
    width: 100%;
    border-collapse: collapse;
}

.order-table th, .order-table td {
    padding: 10px 14px;
    text-align: left;
    border-bottom: 1px solid #f3f4f6;
    font-size: 13px;
}

.order-table th {
    color: #6b7280;
    font-size: 11px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.order-table td {
    color: #374151;
}

.order-table tr:hover {
    background: #f9fafb;
}

.table-container {
    overflow-x: auto;
}

.status-failed {
    background: #fef2f2;
    color: #dc2626;
    border: 1px solid #fecaca;
}

.text-center {
    text-align: center;
}

.mt-10 { margin-top: 10px; }
.mt-20 { margin-top: 20px; }
.mb-20 { margin-bottom: 20px; }
.mb-10 { margin-bottom: 10px; }

@media (max-width: 768px) {
    .card {
        padding: 28px 24px;
    }
    .commodity-grid {
        grid-template-columns: 1fr;
    }
    .navbar {
        flex-direction: column;
        gap: 10px;
    }
    .navbar-user {
        flex-wrap: wrap;
        justify-content: center;
    }
    .amount-grid {
        grid-template-columns: 1fr;
    }
}

.tab-btn {
    padding: 8px 20px;
    background: #ffffff;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    color: #6b7280;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.tab-btn:hover {
    border-color: #635bff;
    color: #635bff;
}

.tab-btn.tab-active {
    background: #635bff;
    color: #ffffff;
    border-color: #635bff;
}

.dummy-status-card {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 16px;
}

.dummy-status-row {
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
}

.dummy-status-item {
    flex: 1;
    min-width: 140px;
    text-align: center;
}

.dummy-status-label {
    display: block;
    font-size: 12px;
    color: #9ca3af;
    margin-bottom: 6px;
    font-weight: 500;
}

.dummy-status-value {
    display: block;
    font-size: 18px;
    font-weight: 600;
    color: #1f2937;
}

.dummy-active-info {
    background: #fefce8;
    border: 1px solid #fde68a;
    border-radius: 10px;
    padding: 20px;
}

.dummy-active-details {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    margin-top: 12px;
}

.dummy-active-details .detail-item {
    flex: 1;
    min-width: 120px;
}

.dummy-active-details .detail-label {
    font-size: 11px;
    color: #9ca3af;
    margin-bottom: 2px;
}

.dummy-active-details .detail-value {
    font-size: 14px;
    font-weight: 500;
    color: #374151;
}

.dummy-countdown {
    text-align: center;
    margin-top: 16px;
    font-size: 20px;
    font-weight: 700;
    color: #dc2626;
}

.dummy-coord-row {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.dummy-coord-row .form-group {
    margin-bottom: 16px;
}

.dummy-coord-row input {
    padding: 10px 14px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 14px;
    width: 100%;
    box-sizing: border-box;
}

.confirm-btn {
    padding: 6px 14px;
    background: #635bff;
    color: #ffffff;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 500;
    transition: background 0.2s;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.confirm-btn:hover {
    background: #5552d9;
}

.confirm-btn:disabled {
    background: #d1d5db;
    color: #9ca3af;
    cursor: not-allowed;
}

.reject-btn {
    padding: 6px 14px;
    background: #ffffff;
    color: #dc2626;
    border: 1px solid #fca5a5;
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 500;
    transition: all 0.2s;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    margin-left: 6px;
}

.reject-btn:hover {
    background: #fef2f2;
    border-color: #f87171;
}

.reject-btn:disabled {
    background: #f3f4f6;
    color: #d1d5db;
    border-color: #e5e7eb;
    cursor: not-allowed;
}

.bounty-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 12px;
}

.bounty-card {
    padding: 16px 20px;
    cursor: pointer;
    transition: box-shadow 0.2s, transform 0.1s;
}

.bounty-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transform: translateY(-1px);
}

.bounty-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}

.bounty-id {
    font-size: 13px;
    color: #6b7280;
    font-weight: 500;
}

.bounty-status {
    font-size: 12px;
    padding: 2px 8px;
    border-radius: 10px;
    font-weight: 500;
}

.status-pending {
    background: #fef3c7;
    color: #92400e;
}

.status-accepted {
    background: #dbeafe;
    color: #1e40af;
}

.status-confirming {
    background: #ede9fe;
    color: #5b21b6;
}

.status-done {
    background: #d1fae5;
    color: #065f46;
}

.bounty-card-body {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}

.bounty-name {
    font-size: 14px;
    color: #374151;
}

.bounty-price {
    font-size: 16px;
    font-weight: 600;
    color: #059669;
}

.bounty-card-footer {
    font-size: 12px;
    color: #9ca3af;
    display: flex;
    align-items: center;
    gap: 12px;
}

.bounty-detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 12px;
    margin-bottom: 16px;
}

.bounty-detail-item {
    padding: 8px 12px;
    background: #f9fafb;
    border-radius: 8px;
}

.bounty-detail-item label {
    font-size: 11px;
    color: #9ca3af;
    margin-bottom: 4px;
    display: block;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.bounty-detail-item span {
    font-size: 14px;
    color: #374151;
    font-weight: 500;
}

.bounty-description {
    margin: 16px 0;
    padding: 16px;
    background: #f9fafb;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
}

.bounty-description label {
    font-size: 13px;
    color: #6b7280;
    margin-bottom: 8px;
    display: block;
}

.bounty-description p {
    font-size: 14px;
    color: #374151;
    line-height: 1.6;
    white-space: pre-wrap;
    word-break: break-word;
}

.bounty-pictures {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin: 12px 0;
}

.bounty-picture {
    width: 120px;
    height: 120px;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
    cursor: pointer;
    transition: transform 0.15s;
}

.bounty-picture:hover {
    transform: scale(1.05);
}

.bounty-actions {
    display: flex;
    gap: 8px;
    margin-top: 16px;
    flex-wrap: wrap;
}

.bounty-upload-area {
    border: 2px dashed #d1d5db;
    border-radius: 10px;
    padding: 28px;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
    color: #6b7280;
}

.bounty-upload-area:hover,
.bounty-upload-area.dragover {
    border-color: #635bff;
    background: #f5f3ff;
}

.bounty-upload-area p {
    margin: 0;
    font-size: 13px;
}

.chat-messages {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.chat-messages-container {
    max-height: 360px;
    overflow-y: auto;
    padding: 12px;
    background: #f9fafb;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
    margin-bottom: 12px;
}

.chat-msg {
    max-width: 70%;
    padding: 8px 12px;
    border-radius: 12px;
    font-size: 13px;
    line-height: 1.5;
    word-break: break-word;
}

.chat-msg-left {
    align-self: flex-start;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-bottom-left-radius: 4px;
}

.chat-msg-right {
    align-self: flex-end;
    background: #635bff;
    color: #ffffff;
    border-bottom-right-radius: 4px;
}

.chat-msg-right .chat-msg-sender {
    color: rgba(255, 255, 255, 0.7);
}

.chat-msg-right .chat-msg-content {
    color: #ffffff;
}

.chat-msg-right .chat-msg-time {
    color: rgba(255, 255, 255, 0.5);
}

.chat-msg-sender {
    font-size: 11px;
    color: #9ca3af;
    margin-bottom: 2px;
    font-weight: 500;
}

.chat-msg-content {
    color: #374151;
}

.chat-msg-time {
    font-size: 10px;
    color: #d1d5db;
    margin-top: 4px;
}

.chat-image {
    border-radius: 8px;
    cursor: pointer;
    transition: opacity 0.15s;
}

.chat-image:hover {
    opacity: 0.85;
}

.chat-input-area {
    display: flex;
    gap: 8px;
    align-items: center;
}

.chat-input-area input[type="text"] {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 13px;
}

.chat-input-area input[type="text"]:focus {
    outline: none;
    border-color: #635bff;
    box-shadow: 0 0 0 3px rgba(99, 91, 255, 0.1);
}

.pagination {
    margin-top: 20px;
}

.pagination-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
}

.pagination-info {
    font-size: 13px;
    color: #6b7280;
}

.pagination-btns {
    display: flex;
    gap: 6px;
    align-items: center;
}

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

.page-num-btn {
    min-width: 36px;
    height: 36px;
    padding: 0 8px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    background: #ffffff;
    color: #374151;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.15s;
}

.page-num-btn:hover:not(.page-active) {
    border-color: #635bff;
    color: #635bff;
}

.page-active {
    background: #635bff;
    color: #ffffff;
    border-color: #635bff;
}
