/**
 * SpotGold24 - Main Stylesheet
 * Clone UI from city.spotgold24.com
 */

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

html {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
}

:root {
    --bg-dark: #1a1d2e;
    --bg-darker: #0f1119;
    --bg-card: #252837;
    --primary-color: #3b82f6;
    --success-color: #22c55e;
    --warning-color: #f59e0b;
    --danger-color: #ef4444;
    --text-primary: #ffffff;
    --text-secondary: #a0a0a0;
    --border-color: rgba(255, 255, 255, 0.1);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background: var(--bg-darker);
    color: var(--text-primary);
    min-height: 100vh;
    line-height: 1.5;
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: var(--bg-darker);
}

::-webkit-scrollbar-thumb {
    background: var(--bg-card);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-color);
}

/* Top Bar */
.top-bar {
    position: sticky;
    top: 0;
    background: var(--bg-dark);
    padding: 12px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
    z-index: 100;
}

.back-button {
    color: var(--text-primary);
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
}

.back-button svg {
    width: 24px;
    height: 24px;
}

.page-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    flex: 1;
    text-align: center;
}

/* Language Switcher */
.language-switcher {
    position: relative;
    cursor: pointer;
}

.current-lang {
    padding: 6px 12px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
}

.lang-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 8px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
    min-width: 150px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    z-index: 200;
    display: none;
}

.lang-dropdown.show {
    display: block;
}

.lang-option {
    display: block;
    padding: 10px 16px;
    color: var(--text-primary);
    cursor: pointer;
    transition: background 0.2s ease;
}

.lang-option:hover {
    background: rgba(255, 255, 255, 0.05);
}

/* Main Content */
.main-content {
    padding: 16px;
    padding-bottom: 90px;
}

/* Balance Card */
.balance-card {
    background: linear-gradient(135deg, #2d3250 0%, #1a1d2e 100%);
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

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

.balance-label {
    font-size: 14px;
    color: var(--text-secondary);
}

.eye-button {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 8px;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text-secondary);
    transition: all 0.3s ease;
}

.eye-button:hover {
    background: rgba(255, 255, 255, 0.15);
    color: var(--text-primary);
}

.balance-amount .amount {
    font-size: 36px;
    font-weight: 700;
    color: var(--text-primary);
}

/* Action Grid */
.action-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 20px;
}

.action-button {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: var(--text-primary);
    transition: transform 0.2s ease;
}

.action-button:active {
    transform: scale(0.95);
}

.action-icon {
    width: 56px;
    height: 56px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.action-icon.deposit {
    background: rgba(34, 197, 94, 0.15);
    color: var(--success-color);
}

.action-icon.withdraw {
    background: rgba(239, 68, 68, 0.15);
    color: var(--danger-color);
}

.action-icon.transaction {
    background: rgba(236, 72, 153, 0.15);
    color: #ec4899;
}

.action-icon.holding {
    background: rgba(139, 92, 246, 0.15);
    color: #8b5cf6;
}

.action-icon.history {
    background: rgba(245, 158, 11, 0.15);
    color: var(--warning-color);
}

.action-icon.customer {
    background: rgba(20, 184, 166, 0.15);
    color: #14b8a6;
}

.action-label {
    font-size: 12px;
    text-align: center;
    color: var(--text-primary);
    line-height: 1.3;
}

/* Tab Section */
.tab-section {
    background: #1a1d2e;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.tab-buttons {
    display: flex;
    background: var(--bg-dark);
    border-bottom: 1px solid var(--border-color);
}

.tab-button {
    flex: 1;
    padding: 14px;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.tab-button.active {
    color: var(--primary-color);
}

.tab-button.active::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--primary-color);
}

.tab-button.tab-static {
    cursor: default;
    pointer-events: none;
    color: var(--primary-color);
}

.tab-button.tab-static::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--primary-color);
}

.txn-standalone {
    background: #1a1d2e;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.txn-header {
    background: var(--bg-dark);
    border-bottom: 1px solid var(--border-color);
    padding: 14px;
}

.txn-title {
    color: var(--primary-color);
    font-size: 14px;
    font-weight: 500;
    text-align: center;
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 12px;
    display: block;
}

.tab-section.txn-show {
    display: block;
}

.tab-section.txn-hide {
    display: none;
}

.tab-content {
    padding: 20px;
}

.tab-pane {
    display: none;
}

.tab-pane.active {
    display: block;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-secondary);
}

.empty-state p {
    font-size: 14px;
}

/* Bottom Navigation */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--bg-dark);
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: space-around;
    padding: 8px 0;
    z-index: 100;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    text-decoration: none;
    color: var(--text-secondary);
    transition: color 0.3s ease;
    flex: 1;
    padding: 4px;
}

.nav-item.active {
    color: var(--primary-color);
}

.nav-icon {
    display: flex;
    align-items: center;
    justify-content: center;
}

.nav-icon svg {
    width: 24px;
    height: 24px;
}

.nav-icon img {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    object-fit: contain;
}

.nav-label {
    font-size: 11px;
    font-weight: 500;
}

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

.modal.show {
    display: flex;
}

.modal-content {
    background: var(--bg-card);
    border-radius: 12px;
    width: 100%;
    max-width: 400px;
    max-height: 90vh;
    overflow-y: auto;
    animation: slideUp 0.3s ease;
}

.modal-header {
    padding: 16px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    font-size: 18px;
    font-weight: 600;
}

.close {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.close:hover {
    color: var(--text-primary);
}

.modal-body {
    padding: 20px;
}

.modal-footer {
    padding: 16px;
    border-top: 1px solid var(--border-color);
    display: flex;
    gap: 12px;
}

/* Logout Modal */
#logoutModal .modal-content {
    text-align: center;
    padding: 32px 24px;
}

/* Content Modal (About Us, etc.) */
.content-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
}

.content-modal.show {
    display: flex;
}

.content-modal-wrapper {
    background: var(--bg-card);
    border-radius: 16px;
    width: 100%;
    max-width: 420px;
    max-height: 85vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    animation: slideUp 0.3s ease;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.content-modal-header {
    padding: 20px 20px 16px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.content-modal-header h2 {
    font-size: 18px;
    font-weight: 600;
    color: #ffffff;
    margin: 0;
}

.content-modal-close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: #ffffff;
    font-size: 24px;
    cursor: pointer;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    padding: 0;
    line-height: 1;
}

.content-modal-close:hover {
    background: rgba(255, 255, 255, 0.15);
    color: var(--text-primary);
}

.content-modal-body {
    padding: 24px 20px;
    overflow-y: auto;
    flex: 1;
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.7;
}

.content-modal-body p {
    margin: 0 0 16px;
}

.content-modal-body p:last-child {
    margin-bottom: 0;
}

.content-modal-body strong {
    color: var(--text-primary);
}

.content-modal-footer {
    padding: 16px 20px;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: center;
    flex-shrink: 0;
}

.content-modal-btn {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 12px 32px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.content-modal-btn:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

#logoutModal .modal-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 16px;
    background: rgba(239, 68, 68, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ef4444;
}

#logoutModal .modal-title {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 8px;
}

#logoutModal .modal-text {
    font-size: 14px;
    color: var(--text-secondary);
    margin: 0 0 24px;
}

#logoutModal .modal-buttons {
    display: flex;
    gap: 12px;
}

#logoutModal .btn-cancel,
#logoutModal .btn-confirm {
    flex: 1;
    padding: 12px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: background 0.2s ease;
}

#logoutModal .btn-cancel {
    background: var(--bg-dark);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

#logoutModal .btn-cancel:hover {
    background: var(--border-color);
}

#logoutModal .btn-confirm {
    background: #ef4444;
    color: #fff;
}

#logoutModal .btn-confirm:hover {
    background: #dc2626;
}

#logoutModal .btn-confirm:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Bank Account Items */
.bank-account-item {
    background: var(--bg-dark);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 14px;
    margin-bottom: 12px;
    position: relative;
}

.bank-account-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.bank-icon {
    width: 36px;
    height: 36px;
    background: rgba(234, 179, 8, 0.15);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #eab308;
    flex-shrink: 0;
}

.bank-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.bank-holder {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 8px;
    padding-left: 46px;
}

.bank-default-badge {
    background: rgba(234, 179, 8, 0.15);
    color: #eab308;
    font-size: 10px;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 4px;
    white-space: nowrap;
    flex-shrink: 0;
}

.bank-account-details {
    padding-left: 46px;
}

.bank-detail-row {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    margin-bottom: 4px;
}

.bank-detail-label {
    color: var(--text-secondary);
}

.bank-detail-value {
    color: var(--text-primary);
    font-weight: 500;
    font-family: 'Courier New', monospace;
}

.bank-delete-btn {
    display: block;
    width: 100%;
    margin-top: 10px;
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.2);
    border-radius: 6px;
    padding: 8px 12px;
    font-size: 12px;
    cursor: pointer;
    text-align: center;
    transition: all 0.2s ease;
}

.bank-delete-btn:hover {
    background: rgba(239, 68, 68, 0.2);
}

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

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

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-size: 14px;
    color: var(--text-secondary);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px;
    background: var(--bg-dark);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 14px;
    transition: border-color 0.2s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

.form-group input::placeholder {
    color: var(--text-secondary);
}

.form-group input:read-only {
    background: var(--bg-darker);
    color: var(--text-secondary);
    cursor: not-allowed;
}

.form-group .input-with-btn, .form-group .amount-input-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
}

.form-group .input-with-btn input, .form-group .amount-input-wrapper input {
    flex: 1;
}

.max-btn {
    padding: 12px 16px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.max-btn:hover {
    opacity: 0.9;
}

.withdraw-fee-hint {
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 6px;
}

.withdraw-fee-summary {
    margin-top: 8px;
    padding: 8px 12px;
    background: rgba(74, 111, 220, 0.1);
    border-radius: 6px;
    font-size: 13px;
    color: var(--text-secondary);
}

.withdraw-fee-summary strong {
    color: var(--primary-color);
}

.max-btn:active {
    transform: scale(0.98);
}

/* Buttons */
.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
}

.btn-success {
    background: var(--success-color);
    color: white;
}

.btn-danger {
    background: var(--danger-color);
    color: white;
}

.btn-secondary {
    background: var(--bg-dark);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

.btn:active {
    transform: translateY(0);
}

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

.btn-block {
    width: 100%;
}

.btn-submit {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, var(--primary-color) 0%, #2563eb 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-submit:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(59, 130, 246, 0.4);
}

.btn-submit:active {
    transform: translateY(0);
}

/* Toast */
.toast {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.7);
    background: var(--bg-card);
    border-radius: 12px;
    padding: 24px;
    display: flex;
    align-items: center;
    gap: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    min-width: 300px;
    max-width: 90%;
}

.toast.show {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, -50%) scale(1);
}

.toast-icon {
    width: 48px;
    height: 48px;
    background: var(--success-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.toast-icon.error {
    background: var(--danger-color);
}

.toast-content {
    flex: 1;
}

.toast-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.toast-message {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.4;
}

/* Alert */
.alert {
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 16px;
    font-size: 14px;
}

.alert-success {
    background: rgba(34, 197, 94, 0.15);
    color: var(--success-color);
    border: 1px solid rgba(34, 197, 94, 0.3);
}

.alert-danger {
    background: rgba(239, 68, 68, 0.15);
    color: var(--danger-color);
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.alert-warning {
    background: rgba(245, 158, 11, 0.15);
    color: var(--warning-color);
    border: 1px solid rgba(245, 158, 11, 0.3);
}

/* Table */
.table-container {
    overflow-x: auto;
}

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

.table th,
.table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.table th {
    background: var(--bg-dark);
    font-weight: 600;
    font-size: 13px;
    color: var(--text-secondary);
    text-transform: uppercase;
}

.table td {
    font-size: 14px;
}

.table tr:hover {
    background: rgba(255, 255, 255, 0.02);
}

/* Status Badge */
.badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

.badge-success {
    background: rgba(34, 197, 94, 0.15);
    color: var(--success-color);
}

.badge-danger {
    background: rgba(239, 68, 68, 0.15);
    color: var(--danger-color);
}

.badge-warning {
    background: rgba(245, 158, 11, 0.15);
    color: var(--warning-color);
}

.badge-primary {
    background: rgba(59, 130, 246, 0.15);
    color: var(--primary-color);
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 20px;
}

.page-btn {
    padding: 6px 10px;
    background: var(--bg-dark);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    color: var(--text-primary);
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 36px;
    text-align: center;
}

.page-btn:hover {
    border-color: var(--primary-color);
    background: rgba(59, 130, 246, 0.1);
}

.page-btn.active {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

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

.pagination-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 16px;
    padding: 12px 0;
    flex-wrap: nowrap;
    overflow: hidden;
    max-width: 100%;
}

.pagination-info {
    font-size: 13px;
    color: var(--text-secondary);
    white-space: nowrap;
}

.pagination-buttons {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 3px;
}

.page-ellipsis {
    color: var(--text-secondary);
    font-size: 13px;
    display: inline-block;
    min-width: 20px;
    text-align: center;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.loading {
    animation: pulse 1.5s infinite;
}

/* Support Chat Button */
#supportChatBtn {
    position: fixed;
    right: 14px;
    bottom: 92px;
    z-index: 4000;
    background: #2563eb;
    color: #fff;
    border: none;
    border-radius: 9999px;
    padding: 11px 14px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.35);
    display: flex;
    align-items: center;
    gap: 6px;
}

#supportChatUnreadBadge {
    position: absolute;
    top: -6px;
    right: -6px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 9999px;
    background: #ef4444;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    display: none;
    align-items: center;
    justify-content: center;
}

#supportChatUnreadBadge.show {
    display: flex;
}

/* Chat Lightbox */
#supportChatLightbox {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 4000;
    backdrop-filter: blur(2px);
}

/* Chat Panel */
#supportChatPanel {
    position: fixed;
    right: 14px;
    bottom: 92px;
    width: 320px;
    max-width: calc(100vw - 28px);
    height: 480px;
    background: #1a1d2e;
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 16px;
    z-index: 4001;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    display: none;
    flex-direction: column;
}

#supportChatPanel:not(.sf-hidden) {
    display: flex;
}

/* Chat Panel Header */
.scp-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    flex-shrink: 0;
}
.scp-header-left {
    display: flex;
    align-items: center;
    gap: 10px;
}
.scp-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #22c55e;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.3);
}
.scp-header-info { flex: 1; min-width: 0; }
.scp-header-title {
    font-size: 15px;
    font-weight: 600;
    color: #f1f5f9;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.scp-header-status {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 11px;
    color: #86efac;
    margin-top: 2px;
}
.scp-status-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #22c55e;
    animation: scp-pulse 2s infinite;
}
.scp-header-right {
    display: flex;
    align-items: center;
    gap: 4px;
}
.scp-icon-btn {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    border: none;
    background: rgba(255, 255, 255, 0.08);
    color: #94a3b8;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}
.scp-icon-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    color: #f1f5f9;
}

/* Chat Messages Area */
.scp-messages {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    background: #0f172a;
}
.scp-messages::-webkit-scrollbar { width: 4px; }
.scp-messages::-webkit-scrollbar-track { background: transparent; }
.scp-messages::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 4px;
}

/* Welcome Screen */
.scp-welcome {
    text-align: center;
    padding: 32px 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}
.scp-welcome-icon { animation: scp-bounce 2s ease-in-out infinite; }
.scp-welcome-title { font-size: 16px; font-weight: 700; color: #f1f5f9; }
.scp-welcome-text { font-size: 12px; color: #64748b; line-height: 1.6; max-width: 240px; }

/* Message Bubbles */
.scp-msg { animation: scp-msg-in 0.3s ease; }
.scp-msg-user { display: flex; justify-content: flex-end; }
.scp-msg-user .scp-bubble {
    background: #2563eb;
    color: #fff;
    border-radius: 16px 16px 4px 16px;
    max-width: 75%;
}
.scp-msg-bot { display: flex; justify-content: flex-start; }
.scp-msg-bot .scp-bubble {
    background: #1e293b;
    color: #e2e8f0;
    border-radius: 16px 16px 16px 4px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    max-width: 75%;
}
.scp-bubble {
    padding: 10px 14px;
    font-size: 13px;
    line-height: 1.5;
    word-break: break-word;
}
.scp-msg-time {
    font-size: 10px;
    color: #475569;
    margin-top: 4px;
    padding: 0 4px;
}

/* Chat Input Area */
.scp-input-area {
    display: flex;
    align-items: flex-end;
    gap: 8px;
    padding: 12px 14px;
    background: #1a1d2e;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    flex-shrink: 0;
}
.scp-input-area textarea {
    flex: 1;
    background: #0f172a;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 12px;
    padding: 10px 14px;
    color: #f1f5f9;
    font-size: 13px;
    resize: none;
    outline: none;
    max-height: 80px;
    line-height: 1.5;
    transition: border-color 0.2s;
    font-family: inherit;
}
.scp-input-area textarea:focus { border-color: #2563eb; }
.scp-input-area textarea::placeholder { color: #475569; }
.scp-send-btn {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    border: none;
    background: #2563eb;
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.2s;
}
.scp-send-btn:hover { background: #1d4ed8; transform: scale(1.05); }
.scp-send-btn:active { transform: scale(0.97); }

.scp-input-row {
    display: flex;
    align-items: flex-end;
    gap: 6px;
}
.scp-input-row textarea {
    flex: 1;
    resize: none;
    min-height: 40px;
    max-height: 80px;
}
.scp-attach-btn {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: rgba(255,255,255,0.08);
    color: #64748b;
    border: 1px solid rgba(255,255,255,0.12);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.2s;
    padding: 0;
}
.scp-attach-btn:hover {
    background: rgba(255,255,255,0.15);
    color: #94a3b8;
}
.scp-image-preview {
    flex-shrink: 0;
}
.scp-image-preview > div {
    display: inline-block;
    position: relative;
}
.scp-image-preview img {
    max-width: 80px;
    max-height: 80px;
    border-radius: 8px;
    object-fit: cover;
}
.scp-msg-image {
    max-width: 180px;
    max-height: 180px;
    border-radius: 10px;
    cursor: pointer;
    display: block;
    margin-bottom: 4px;
    object-fit: cover;
}
.scp-msg-bot .scp-msg-image {
    border: 1px solid rgba(255,255,255,0.1);
}
.scp-msg-user .scp-msg-image {
    border: 1px solid rgba(37,99,235,0.3);
}

/* Animations */
@keyframes scp-pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.6; transform: scale(1.3); }
}
@keyframes scp-msg-in {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes scp-bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-6px); }
}

/* Responsive */
@media (max-width: 480px) {
    #supportChatPanel {
        top: 0;
        right: 0;
        bottom: 0;
        left: 0;
        width: 100vw;
        max-width: 100vw;
        height: 100dvh;
        min-height: 100dvh;
        border-radius: 0;
        border: none;
    }
}

/* Home Page Styles */
.hero-section {
    background: linear-gradient(135deg, #2d3250 0%, #1a1d2e 100%);
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 20px;
    text-align: center;
}

.hero-title {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 8px;
}

.hero-subtitle {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 16px;
}

.quick-actions {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-bottom: 20px;
}

.quick-action {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 16px 8px;
    background: var(--bg-card);
    border-radius: 12px;
    text-decoration: none;
    color: var(--text-primary);
    transition: all 0.2s ease;
}

.quick-action:hover {
    background: rgba(59, 130, 246, 0.1);
}

.quick-action-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.quick-action-label {
    font-size: 12px;
    text-align: center;
}

.quick-action.trade .quick-action-icon {
    background: rgba(59, 130, 246, 0.15);
    color: var(--primary-color);
}

.quick-action.deposit .quick-action-icon {
    background: rgba(34, 197, 94, 0.15);
    color: var(--success-color);
}

.quick-action.withdraw .quick-action-icon {
    background: rgba(239, 68, 68, 0.15);
    color: var(--danger-color);
}

.quick-action.account .quick-action-icon {
    background: rgba(139, 92, 246, 0.15);
    color: #8b5cf6;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 20px;
}

.stat-card {
    background: var(--bg-card);
    border-radius: 12px;
    padding: 16px;
}

.stat-label {
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 4px;
}

.stat-value {
    font-size: 20px;
    font-weight: 700;
}

.stat-value.profit {
    color: var(--success-color);
}

.stat-value.loss {
    color: var(--danger-color);
}

/* Profile Page */
.user-info-section {
    background: var(--bg-dark);
    padding: 32px 16px 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    border-bottom: 1px solid var(--border-color);
}

.user-avatar {
    width: 80px;
    height: 80px;
    border-radius: 12px;
    overflow: hidden;
    background: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px;
    margin-bottom: 16px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.user-avatar img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.username {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 8px;
}

.username .label {
    font-size: 14px;
    color: var(--text-secondary);
}

.username .value {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
}

.credit-score {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}

.credit-score .label {
    font-size: 13px;
    color: var(--text-secondary);
}

.credit-score .score-value {
    font-size: 16px;
    font-weight: 600;
    color: var(--warning-color);
    background: rgba(245, 158, 11, 0.1);
    padding: 4px 12px;
    border-radius: 12px;
}

.welcome-message {
    width: 100%;
    overflow: hidden;
    position: relative;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.welcome-message span {
    display: inline-block;
    white-space: nowrap;
    font-size: 12px;
    color: var(--danger-color);
    font-weight: 500;
    padding: 0 16px;
    opacity: 0;
}

.welcome-message span.animate {
    animation: scrollTextAndFade 8s linear forwards;
}

@keyframes scrollTextAndFade {
    0% { transform: translateX(100%); opacity: 1; }
    90% { transform: translateX(-100%); opacity: 1; }
    100% { transform: translateX(-100%); opacity: 0; }
}

.progress-bar {
    height: 4px;
    background: var(--bg-darker);
    position: relative;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    width: 100%;
    background: linear-gradient(90deg, #ef4444 0%, #f59e0b 20%, #eab308 40%, #22c55e 60%, #3b82f6 80%, #8b5cf6 100%);
}

.menu-list {
    background: var(--bg-dark);
    margin-top: 12px;
}

.menu-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    background: var(--bg-dark);
    border-bottom: 1px solid var(--border-color);
    text-decoration: none;
    color: var(--text-primary);
    transition: background 0.2s ease;
    cursor: pointer;
}

.menu-item:active {
    background: rgba(255, 255, 255, 0.05);
}

.menu-icon {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.menu-icon svg {
    width: 20px;
    height: 20px;
    color: var(--text-secondary);
}

.menu-text {
    flex: 1;
    font-size: 15px;
    color: var(--text-primary);
}

.menu-arrow {
    font-size: 20px;
    color: var(--text-secondary);
    font-weight: 300;
}

/* Trade Page */
.price-stats-compact {
    background: var(--bg-card);
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 8px;
    flex-shrink: 0;
}

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

.stat-row:last-child {
    margin-bottom: 0;
}

.stat-item {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.stat-label {
    font-size: 11px;
    color: var(--text-secondary);
    font-weight: 500;
}

.stat-label.high {
    color: var(--success-color);
}

.stat-label.low {
    color: var(--danger-color);
}

.stat-value {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
}

.stat-value.high {
    color: var(--success-color);
}

.stat-value.low {
    color: var(--danger-color);
}

.chart-container {
    background: var(--bg-card);
    border-radius: 8px;
    padding: 12px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.chart-header {
    margin-bottom: 10px;
    flex-shrink: 0;
}

.timeframe-tabs {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.timeframe-tabs::-webkit-scrollbar {
    display: none;
}

.timeframe-tab {
    padding: 8px 14px;
    background: rgba(255, 255, 255, 0.05);
    border: none;
    border-radius: 6px;
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    flex-shrink: 0;
}

.timeframe-tab:hover {
    background: rgba(255, 255, 255, 0.1);
}

.timeframe-tab.active {
    background: var(--primary-color);
    color: var(--text-primary);
}

.chart {
    width: 100%;
    flex: 1;
    border-radius: 8px;
    min-height: 250px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-dark);
}

/* Trading Buttons */
.trading-buttons-fixed {
    position: fixed;
    bottom: 60px;
    left: 0;
    right: 0;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    padding: 8px;
    background: var(--bg-darker);
    border-top: 1px solid var(--border-color);
    z-index: 99;
}

.trade-button {
    padding: 14px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.trade-button .button-text {
    font-size: 16px;
    font-weight: 600;
}

.trade-button.buy {
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
    color: white;
}

.trade-button.buy:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(34, 197, 94, 0.3);
}

.trade-button.buy:active {
    transform: translateY(0);
}

.trade-button.sell {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
}

.trade-button.sell:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

.trade-button.sell:active {
    transform: translateY(0);
}

/* Admin Styles */
.admin-layout {
    min-height: 100vh;
    display: flex;
}

.admin-sidebar {
    width: 240px;
    background: var(--bg-dark);
    border-right: 1px solid var(--border-color);
    position: fixed;
    height: 100vh;
    overflow-y: auto;
}

.admin-logo {
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
    text-align: center;
}

.admin-logo h1 {
    font-size: 20px;
    font-weight: 700;
    color: var(--primary-color);
}

.admin-nav {
    padding: 16px 0;
}

.admin-nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    color: var(--text-secondary);
    text-decoration: none;
    transition: all 0.2s ease;
}

.admin-nav-item:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
}

.admin-nav-item.active {
    background: rgba(59, 130, 246, 0.1);
    color: var(--primary-color);
    border-right: 3px solid var(--primary-color);
}

.admin-nav-item svg {
    width: 20px;
    height: 20px;
}

.admin-main {
    flex: 1;
    margin-left: 240px;
    padding: 24px;
    background: var(--bg-darker);
    min-height: 100vh;
}

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

.admin-title {
    font-size: 24px;
    font-weight: 700;
}

.admin-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

.admin-stat-card {
    background: var(--bg-card);
    border-radius: 12px;
    padding: 20px;
}

.admin-stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
}

.admin-stat-value {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 4px;
}

.admin-stat-label {
    font-size: 13px;
    color: var(--text-secondary);
}

/* Auth Pages */
.auth-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.auth-card {
    background: var(--bg-card);
    border-radius: 16px;
    width: 100%;
    max-width: 400px;
    padding: 32px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.auth-logo {
    text-align: center;
    margin-bottom: 24px;
}

.auth-logo h1 {
    font-size: 28px;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 8px;
}

.auth-logo p {
    color: var(--text-secondary);
    font-size: 14px;
}

.auth-title {
    font-size: 20px;
    font-weight: 600;
    text-align: center;
    margin-bottom: 24px;
}

.auth-footer {
    text-align: center;
    margin-top: 20px;
    font-size: 14px;
    color: var(--text-secondary);
}

.auth-footer a {
    color: var(--primary-color);
}

/* Hidden utility */
.sf-hidden {
    display: none !important;
}

/* Responsive */
@media (min-width: 768px) {
    body {
        max-width: 480px;
        margin: 0 auto;
        box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
    }
    
    .admin-layout {
        display: flex;
    }
    
    .admin-sidebar {
        position: fixed;
    }
    
    .admin-main {
        margin-left: 240px;
    }
}

@media (max-width: 767px) {
    .admin-stats {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .admin-sidebar {
        position: fixed;
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        z-index: 1000;
    }
    
    .admin-sidebar.show {
        transform: translateX(0);
    }
    
    .admin-main {
        margin-left: 0;
    }
    
    .quick-actions {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 375px) {
    .action-grid {
        gap: 12px;
    }
    
    .action-icon {
        width: 52px;
        height: 52px;
    }
    
    .action-label {
        font-size: 11px;
    }
    
    .balance-amount .amount {
        font-size: 32px;
    }
}

/* List Items */
.list-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 0;
    border-bottom: 1px solid var(--border-color);
}

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

.list-item-left {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.list-item-label {
    font-size: 13px;
    color: var(--text-secondary);
}

.list-item-value {
    font-size: 15px;
    font-weight: 500;
}

.list-item-right {
    text-align: right;
}

/* Transaction Item */
.transaction-item {
    background: var(--bg-card);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 12px;
    border: 1px solid var(--border-color);
}

.transaction-item:last-child {
    margin-bottom: 0;
}

.transaction-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 12px;
}

.transaction-info {
    flex: 1;
}

.transaction-type {
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 4px;
}

.transaction-date {
    font-size: 12px;
    color: var(--text-secondary);
}

.transaction-amount {
    font-size: 15px;
    font-weight: 600;
}

.transaction-amount.positive {
    color: var(--success-color);
}

.transaction-amount.negative {
    color: var(--danger-color);
}

.transaction-list {
    padding: 0;
}

.transaction-list .transaction-item {
    margin-bottom: 12px;
}

.transaction-list .transaction-item:last-child {
    margin-bottom: 0;
}

.transaction-list .transaction-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.transaction-list .transaction-type {
    display: flex;
    align-items: center;
    gap: 8px;
}

.transaction-list .transaction-amount {
    font-size: 15px;
    font-weight: 700;
}

.transaction-list .transaction-amount.deposit {
    color: var(--success-color);
}

.transaction-list .transaction-amount.withdraw {
    color: var(--danger-color);
}

.type-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    text-transform: capitalize;
}

.type-badge.deposit {
    background: rgba(34, 197, 94, 0.15);
    color: var(--success-color);
}

.type-badge.withdraw {
    background: rgba(239, 68, 68, 0.15);
    color: var(--danger-color);
}

.transaction-fee-note {
    font-size: 12px;
    color: var(--text-secondary);
    padding-left: 2px;
}

.transaction-list .transaction-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.info-row {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
}

.info-label {
    color: var(--text-secondary);
}

.info-value {
    color: var(--text-primary);
}

.status-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 600;
    text-transform: capitalize;
}

.status-badge.successful {
    background: rgba(34, 197, 94, 0.15);
    color: var(--success-color);
}

.status-badge.pending {
    background: rgba(251, 191, 36, 0.15);
    color: var(--warning-color, #f59e0b);
}

.status-badge.failed,
.status-badge.rejected {
    background: rgba(239, 68, 68, 0.15);
    color: var(--danger-color);
}

/* Order Item */
.order-item {
    background: var(--bg-dark);
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 12px;
}

.order-item:last-child {
    margin-bottom: 0;
}

.order-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.order-symbol {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
}

.order-type {
    font-size: 12px;
    padding: 2px 8px;
    border-radius: 4px;
}

.order-type.buy {
    background: rgba(34, 197, 94, 0.15);
    color: var(--success-color);
}

.order-type.sell {
    background: rgba(239, 68, 68, 0.15);
    color: var(--danger-color);
}

.order-details {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    font-size: 13px;
}

.order-detail-label {
    color: var(--text-secondary);
}

.order-profit {
    font-weight: 600;
}

.order-profit.positive {
    color: var(--success-color);
}

.order-profit.negative {
    color: var(--danger-color);
}

/* Orders List (Holding) */
.orders-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 0;
}

.order-card {
    background: var(--bg-card);
    border-radius: 12px;
    padding: 16px;
}

.order-card.holding {
    background: var(--bg-card);
    border-radius: 12px;
    padding: 16px;
    border: 1px solid var(--border-color);
    border-left: 4px solid var(--primary-color);
    margin-bottom: 0;
}

.order-card.holding .order-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.order-card.holding .order-symbol {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
}

.order-card.holding .order-direction {
    font-size: 14px;
    font-weight: 600;
    padding: 4px 12px;
    border-radius: 6px;
}

.order-card.holding .order-direction.buy {
    background: rgba(16,185,129,0.1);
    color: var(--success-color);
}

.order-card.holding .order-direction.sell {
    background: rgba(239,68,68,0.1);
    color: var(--danger-color);
}

.order-card.holding .order-body {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.order-card.holding .order-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
}

.order-card.holding .order-row > span:first-child {
    color: var(--text-secondary);
}

.order-card.holding .order-row .value {
    font-weight: 600;
    color: var(--text-primary);
}

.order-card.holding .order-row .value.profit {
    color: var(--success-color);
}

.order-card.holding .order-row .value.countdown {
    color: var(--text-primary);
    font-variant-numeric: tabular-nums;
}

.order-card.holding .order-row .value.countdown.countdown-expired {
    color: var(--danger-color);
}

/* Holding card - blue border when countdown is active (not expired) */
.order-card.holding.active-order {
    border: 1px solid var(--border-color);
    border-left: 4px solid var(--primary-color);
}

.order-card.holding:not(.active-order) {
    border: 1px solid var(--border-color);
    border-left: 4px solid rgba(255,255,255,0.2);
}

/* History Order Card */
.order-card.history {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-left: 4px solid rgba(255,255,255,0.2);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 0;
}

.order-card.history.win {
    border-left: 4px solid var(--success-color);
}

.order-card.history.lose {
    border-left: 4px solid var(--danger-color);
}

.order-card.history .order-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.order-card.history .order-symbol {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
}

.order-card.history .order-direction {
    font-size: 14px;
    font-weight: 600;
    padding: 4px 12px;
    border-radius: 6px;
}

.order-card.history .order-direction.buy {
    background: rgba(16,185,129,0.1);
    color: var(--success-color);
}

.order-card.history .order-direction.sell {
    background: rgba(239,68,68,0.1);
    color: var(--danger-color);
}

.order-card.history .order-result {
    font-size: 20px;
    margin-left: 4px;
}

.order-card.history .order-body {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.order-card.history .order-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
}

.order-card.history .order-row > span:first-child {
    color: var(--text-secondary);
}

.order-card.history .order-row .value {
    font-weight: 600;
    color: var(--text-primary);
}

.order-card.history .order-row .value.win {
    color: var(--success-color);
}

.order-card.history .order-row .value.lose {
    color: var(--danger-color);
}

.order-card.history .order-row .value.time {
    font-size: 12px;
    color: var(--text-secondary);
}

/* Amount Input */
.amount-input {
    width: 100%;
    padding: 12px;
    background: var(--bg-dark);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 16px;
    text-align: center;
}

.amount-input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.amount-input::placeholder {
    color: var(--text-secondary);
}

/* Chip Buttons */
.chip-group {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.chip-btn {
    padding: 8px 16px;
    background: var(--bg-dark);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    color: var(--text-primary);
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.chip-btn:hover {
    border-color: var(--primary-color);
    background: rgba(59, 130, 246, 0.1);
}

.chip-btn.active {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

.chip-max {
    background: rgba(59, 130, 246, 0.15);
    color: var(--primary-color);
}

.chip-max:hover {
    background: rgba(59, 130, 246, 0.25);
}

/* Order Modal */
.order-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.order-modal.show {
    display: flex;
}

.order-modal-content {
    background: var(--bg-card);
    border-radius: 16px;
    width: 100%;
    max-width: 400px;
    overflow: hidden;
}

.order-modal-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.order-modal-title {
    font-size: 18px;
    font-weight: 600;
}

.order-modal-body {
    padding: 20px;
}

.order-modal-footer {
    padding: 16px 20px;
    border-top: 1px solid var(--border-color);
}

.time-option {
    padding: 12px;
    background: var(--bg-dark);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.time-option:hover {
    border-color: var(--primary-color);
}

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

.time-option.disabled:hover {
    border-color: transparent;
}

/* Order direction */
.direction-toggle {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 16px;
}

.direction-btn {
    padding: 16px;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    background: transparent;
    color: var(--text-primary);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.direction-btn.buy {
    border-color: var(--success-color);
    color: var(--success-color);
}

.direction-btn.buy.active {
    background: rgba(34, 197, 94, 0.15);
}

.direction-btn.sell {
    border-color: var(--danger-color);
    color: var(--danger-color);
}

.direction-btn.sell.active {
    background: rgba(239, 68, 68, 0.15);
}

.direction-btn .direction-label {
    font-size: 14px;
    margin-top: 4px;
    opacity: 0.8;
}

/* New Order Modal - Enhanced Layout */
.order-modal .order-modal-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    padding: 20px 20px 16px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

.modal-title-section {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.order-modal .order-modal-header h2 {
    margin: 0;
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.2;
}

.modal-subtitle {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--text-secondary);
}

.modal-subtitle .separator {
    opacity: 0.4;
}

.direction-badge {
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
}

.direction-badge.buy {
    background: rgba(34, 197, 94, 0.15);
    color: #22c55e;
}

.direction-badge.sell {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
}

.order-modal-close {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    line-height: 1;
    opacity: 0.6;
    transition: opacity 0.2s;
    margin-top: -2px;
}

.order-modal-close:hover {
    opacity: 1;
}

/* Compact Info Bar */
.compact-info-bar {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-bottom: 16px;
}

.compact-info-bar .info-item {
    background: var(--bg-dark);
    border-radius: 10px;
    padding: 10px 12px;
    text-align: center;
}

.compact-info-bar .info-item .label {
    display: block;
    font-size: 11px;
    color: var(--text-secondary);
    margin-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.compact-info-bar .info-item .value {
    display: block;
    font-size: 14px;
    font-weight: 700;
    color: var(--text-primary);
}

/* Duration Options */
.duration-options {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    margin-bottom: 16px;
}

.duration-options .time-option {
    padding: 12px 10px;
    background: var(--bg-dark);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
}

.duration-options .time-option:hover {
    border-color: var(--primary-color);
    background: rgba(234, 179, 8, 0.05);
}

.duration-options .time-option.selected {
    border-color: var(--primary-color);
    background: rgba(234, 179, 8, 0.1);
}

.duration-options .time-option .time-duration {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 2px;
}

.duration-options .time-option .time-profit {
    font-size: 13px;
    font-weight: 600;
    color: #22c55e;
    margin-bottom: 2px;
}

.duration-options .time-option .time-range {
    font-size: 10px;
    color: var(--text-secondary);
}

/* Amount Input Section */
.amount-input-section {
    margin-bottom: 16px;
}

.amount-input-section .input-label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.amount-input-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
}

.amount-input {
    width: 100%;
    padding: 12px 14px;
    background: var(--bg-dark);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    color: var(--text-primary);
    font-size: 15px;
    font-weight: 600;
    outline: none;
    transition: border-color 0.2s;
    box-sizing: border-box;
}

.amount-input:focus {
    border-color: var(--primary-color);
}

.amount-input::placeholder {
    color: var(--text-secondary);
    font-weight: 400;
}

/* Quick Amount Chips */
.quick-amount-chips {
    display: flex;
    gap: 6px;
}

.chip-btn {
    flex: 1;
    padding: 8px 4px;
    background: var(--bg-dark);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-secondary);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
}

.chip-btn:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.chip-btn.chip-max {
    background: rgba(234, 179, 8, 0.1);
    border-color: var(--primary-color);
    color: var(--primary-color);
}

/* Order Summary */
.order-summary {
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 10px;
    padding: 12px 16px;
    margin-bottom: 16px;
}

.order-summary .summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    color: var(--text-secondary);
}

.order-summary .summary-row .amount-value {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-primary);
}

/* Confirm Order Button */
.confirm-order-btn {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #eab308 0%, #ca8a04 100%);
    border: none;
    border-radius: 12px;
    color: #000;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
}

.confirm-order-btn:hover {
    background: linear-gradient(135deg, #facc15 0%, #eab308 100%);
    transform: translateY(-1px);
}

.confirm-order-btn:active {
    transform: translateY(0);
}

.confirm-order-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* ============================================
   ADMIN STYLES
   ============================================ */

.admin-layout {
    display: flex;
    min-height: 100vh;
    background: var(--bg-darker);
}

.admin-sidebar {
    width: 240px;
    background: var(--bg-darker);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    z-index: 100;
}

.admin-logo {
    padding: 24px 16px;
    border-bottom: 1px solid var(--border-color);
    text-align: center;
}

.admin-logo h1 {
    color: var(--text-primary);
    font-size: 18px;
    font-weight: 700;
    letter-spacing: 1px;
    background: linear-gradient(135deg, #FFD700, #FFA500);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.admin-nav {
    display: flex;
    flex-direction: column;
    padding: 16px 0;
    flex: 1;
}

.admin-nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
    border-left: 3px solid transparent;
}

.admin-nav-item:hover {
    background: rgba(255, 215, 0, 0.05);
    color: var(--text-primary);
}

.admin-nav-item.active {
    background: rgba(255, 215, 0, 0.1);
    color: #FFD700;
    border-left-color: #FFD700;
}

.admin-nav-item svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.admin-main {
    flex: 1;
    margin-left: 240px;
    padding: 24px;
    min-height: 100vh;
}

.admin-header {
    margin-bottom: 32px;
}

.admin-title {
    color: var(--text-primary);
    font-size: 24px;
    font-weight: 700;
}

.admin-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 32px;
}

.admin-stat-card {
    background: var(--bg-card);
    border-radius: 12px;
    padding: 20px;
    border: 1px solid var(--border-color);
}

.admin-stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
}

.admin-stat-icon svg {
    width: 24px;
    height: 24px;
}

.admin-stat-value {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.admin-stat-label {
    font-size: 13px;
    color: var(--text-secondary);
}

.admin-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 20px;
    padding: 16px;
    background: var(--bg-card);
    border-radius: 12px;
    border: 1px solid var(--border-color);
    align-items: center;
}

.admin-filters .form-group {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    min-width: 200px;
}

.admin-filters label {
    font-size: 13px;
    color: var(--text-secondary);
    white-space: nowrap;
}

.admin-filters input,
.admin-filters select {
    flex: 1;
    min-width: 120px;
}

.admin-section {
    background: var(--bg-card);
    border-radius: 12px;
    border: 1px solid var(--border-color);
    margin-bottom: 24px;
}

.admin-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-color);
}

.admin-section-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
}

.admin-section-body {
    padding: 20px;
}

.admin-tabs {
    display: flex;
    gap: 0;
    border-bottom: 1px solid var(--border-color);
    padding: 0 20px;
}

.admin-tab {
    padding: 12px 20px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    border-bottom: 2px solid transparent;
    transition: all 0.2s ease;
    cursor: pointer;
}

.admin-tab:hover {
    color: var(--text-primary);
}

.admin-tab.active {
    color: #FFD700;
    border-bottom-color: #FFD700;
}

.admin-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 20px;
    flex-wrap: wrap;
}

.admin-pagination a,
.admin-pagination span {
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 14px;
}

.admin-pagination a {
    background: var(--bg-darker);
    color: var(--text-secondary);
    text-decoration: none;
    border: 1px solid var(--border-color);
    transition: all 0.2s ease;
}

.admin-pagination a:hover {
    border-color: #FFD700;
    color: #FFD700;
}

.admin-pagination .current {
    background: rgba(255, 215, 0, 0.1);
    color: #FFD700;
    border: 1px solid #FFD700;
}

.admin-pagination .disabled {
    opacity: 0.5;
    pointer-events: none;
}

.admin-chat-container {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 20px;
    height: calc(100vh - 200px);
    max-height: calc(100vh - 200px);
    overflow: hidden;
    overflow-y: hidden;
}

.admin-header + .admin-chat-container {
    margin-top: -16px;
}

.admin-chat-list {
    background: var(--bg-card);
    border-radius: 12px;
    border: 1px solid var(--border-color);
    overflow: hidden;
}

.admin-chat-list-header {
    padding: 16px;
    border-bottom: 1px solid var(--border-color);
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}

.admin-chat-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    cursor: pointer;
    transition: all 0.2s ease;
    border-bottom: 1px solid var(--border-color);
}

.admin-chat-item:hover {
    background: rgba(255, 215, 0, 0.05);
}

.admin-chat-item.active {
    background: rgba(255, 215, 0, 0.1);
    border-left: 3px solid #FFD700;
}

.admin-chat-item.unread {
    background: rgba(255, 215, 0, 0.05);
}

.admin-chat-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #FFD700, #FFA500);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
    color: var(--bg-dark);
    flex-shrink: 0;
}

.admin-chat-info {
    flex: 1;
    min-width: 0;
}

.admin-chat-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 2px;
}

.admin-chat-preview {
    font-size: 12px;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.admin-chat-meta {
    text-align: right;
    flex-shrink: 0;
}

.admin-chat-time {
    font-size: 11px;
    color: var(--text-secondary);
}

.admin-chat-badge {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--danger-color);
    margin-left: auto;
    margin-top: 4px;
}

.admin-chat-panel {
    background: var(--bg-card);
    border-radius: 12px;
    border: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.admin-chat-header {
    padding: 16px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 12px;
}

.admin-chat-header-info h3 {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
}

.admin-chat-header-info span {
    font-size: 12px;
    color: var(--text-secondary);
}

.admin-chat-messages {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-height: 0;
}

/* Custom scrollbar for chat messages */
.admin-chat-messages::-webkit-scrollbar {
    width: 6px;
}
.admin-chat-messages::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 3px;
}
.admin-chat-messages::-webkit-scrollbar-thumb {
    background: rgba(255, 215, 0, 0.4);
    border-radius: 3px;
}
.admin-chat-messages::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 215, 0, 0.7);
}

.admin-chat-message {
    max-width: 80%;
    padding: 10px 14px;
    border-radius: 12px;
    font-size: 14px;
}

.admin-chat-message.user {
    background: rgba(255, 215, 0, 0.1);
    color: var(--text-primary);
    border: 1px solid rgba(255, 215, 0, 0.2);
    align-self: flex-start;
    border-bottom-left-radius: 4px;
}

.admin-chat-message.admin {
    background: rgba(255, 215, 0, 0.2);
    color: var(--text-primary);
    border: 1px solid rgba(255, 215, 0, 0.3);
    align-self: flex-end;
    border-bottom-right-radius: 4px;
}

.admin-chat-message-time {
    font-size: 11px;
    color: var(--text-secondary);
    margin-top: 4px;
}

.admin-chat-input {
    padding: 16px;
    border-top: 1px solid var(--border-color);
    display: flex;
    gap: 12px;
}

.admin-chat-input input {
    flex: 1;
}

.admin-no-chat {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: var(--text-secondary);
    gap: 12px;
}

.admin-no-chat svg {
    width: 48px;
    height: 48px;
    opacity: 0.5;
}

.admin-actions {
    display: flex;
    gap: 8px;
}

.admin-actions form {
    display: inline;
}

.admin-actions button,
.admin-actions a {
    padding: 4px 8px;
    font-size: 12px;
    border-radius: 6px;
}

.admin-detail-row {
    display: flex;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-color);
}

.admin-detail-row:last-child {
    border-bottom: none;
}

.admin-detail-label {
    width: 160px;
    font-size: 14px;
    color: var(--text-secondary);
    flex-shrink: 0;
}

.admin-detail-value {
    flex: 1;
    font-size: 14px;
    color: var(--text-primary);
    word-break: break-all;
}

.admin-detail-value.success {
    color: var(--success-color);
}

.admin-detail-value.danger {
    color: var(--danger-color);
}

.admin-detail-value.warning {
    color: var(--warning-color);
}

.admin-settings-form {
    max-width: 600px;
}

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

.admin-settings-form .form-actions {
    display: flex;
    gap: 12px;
    margin-top: 24px;
}

/* Mobile admin */
@media (max-width: 768px) {
    .admin-sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s ease;
    }

    .admin-sidebar.open {
        transform: translateX(0);
    }

    .admin-main {
        margin-left: 0;
    }

    .admin-chat-container {
        grid-template-columns: 1fr;
        height: auto;
        max-height: none;
        overflow: visible;
    }

    .admin-chat-panel {
        min-height: 400px;
    }

    .admin-chat-messages {
        max-height: 300px;
    }

    .admin-stats {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Logo in top bar */
.top-bar .logo {
    display: flex;
    align-items: center;
}

.top-bar .logo img {
    height: 32px;
    border-radius: 6px;
    object-fit: contain;
}

/* Banner Carousel */
.banner-carousel {
    position: relative;
    width: 100%;
    height: 180px;
    overflow: hidden;
    background: var(--bg-dark);
}

.carousel-container {
    position: relative;
    width: 100%;
    height: 100%;
}

.carousel-slide {
    position: absolute;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.carousel-slide.active {
    opacity: 1;
}

.carousel-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.carousel-dots {
    position: absolute;
    bottom: 12px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 10;
}

.dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    cursor: pointer;
    transition: all 0.3s ease;
}

.dot.active {
    width: 24px;
    border-radius: 4px;
    background: var(--primary-color);
}

.content-spacer {
    height: 16px;
    background: var(--bg-darker);
}

/* Live Notifications */
.live-notifications {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.15) 0%, rgba(37, 40, 55, 0.8) 100%);
    border-left: 4px solid var(--primary-color);
    padding: 14px 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin: 0;
    border-bottom: 1px solid var(--border-color);
    position: relative;
    overflow: hidden;
}

.notification-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.notification-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--warning-color);
    flex-shrink: 0;
}

.notification-icon svg {
    width: 24px;
    height: 24px;
}

.notification-content {
    flex: 1;
    min-width: 0;
}

.notification-title {
    font-size: 11px;
    font-weight: 700;
    color: var(--warning-color);
    letter-spacing: 0.5px;
    margin-bottom: 4px;
    text-transform: uppercase;
}

.notification-text {
    font-size: 13px;
    color: var(--text-primary);
    line-height: 1.4;
    position: relative;
    min-height: 20px;
}

.notification-marquee-wrap {
    width: 100%;
    overflow: hidden;
}

.notification-marquee {
    display: flex;
    animation: marquee-scroll 50s linear infinite;
    white-space: nowrap;
}

.notification-marquee .marquee-text {
    color: #ef4444;
    font-size: 13px;
    font-weight: 500;
    padding-right: 3em;
    flex-shrink: 0;
}

@keyframes marquee-scroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

.notification-text.fade-in {
    animation: fadeInUp 0.5s ease forwards;
}

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

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

/* New Home Page Layout - Matching Template */
.main-content {
    padding: 16px;
    padding-bottom: 90px;
}

.section-header {
    margin: 24px 0 16px 0;
}

.section-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
}

.quick-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 8px;
}

.action-card {
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 16px;
    text-decoration: none;
    transition: all 0.3s ease;
}

.action-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.3);
    border-color: var(--primary-color);
}

.action-trade {
    background: linear-gradient(135deg, rgba(59,130,246,0.1) 0%, var(--bg-card) 100%);
}

.action-account {
    background: linear-gradient(135deg, rgba(34,197,94,0.1) 0%, var(--bg-card) 100%);
}

.action-icon {
    width: 56px;
    height: 56px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--primary-color), #2563eb);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    flex-shrink: 0;
}

.action-account .action-icon {
    background: linear-gradient(135deg, var(--success-color), #16a34a);
}

.action-info {
    flex: 1;
}

.action-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 4px 0;
}

.action-desc {
    font-size: 13px;
    color: var(--text-secondary);
    margin: 0;
}

.action-arrow {
    color: var(--text-secondary);
    flex-shrink: 0;
}

.market-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 8px;
}

.market-header {
    margin-bottom: 20px;
}

.market-symbol {
    display: flex;
    align-items: center;
    gap: 12px;
}

.symbol-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: rgba(255,215,0,0.1);
    display: flex;
    align-items: center;
    justify-content: center;
}

.symbol-icon svg {
    width: 28px;
    height: 28px;
    color: #FFD700;
}

.symbol-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.symbol-name {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}

.symbol-label {
    font-size: 12px;
    color: var(--text-secondary);
    margin: 0;
}

.market-price {
    display: flex;
    align-items: baseline;
    gap: 12px;
    margin-bottom: 20px;
}

.current-price {
    font-size: 36px;
    font-weight: 700;
    color: var(--text-primary);
    font-variant-numeric: tabular-nums;
}

.price-change {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
}

.price-change.positive {
    background: rgba(34,197,94,0.15);
    color: var(--success-color);
}

.price-change.negative {
    background: rgba(239,68,68,0.15);
    color: #ef4444;
}

.market-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    margin-bottom: 20px;
    padding: 16px;
    background: rgba(255,255,255,0.02);
    border-radius: 12px;
}

.stat-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.market-stats .stat-label {
    font-size: 12px;
    color: var(--text-secondary);
    margin: 0;
}

.market-stats .stat-value {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-primary);
    font-variant-numeric: tabular-nums;
}

.trade-now-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, var(--primary-color), #2563eb);
    border: none;
    border-radius: 10px;
    color: white;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
}

.trade-now-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(59,130,246,0.4);
}

/* Hot Products List */
.products-list {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    overflow: hidden;
    margin-bottom: 16px;
}

.products-header {
    display: flex;
    align-items: center;
    padding: 10px 16px;
    font-size: 11px;
    font-weight: 700;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--border-color);
    text-transform: uppercase;
    letter-spacing: 0.3px;
    gap: 12px;
}

.col-name   { flex: 1; min-width: 0; white-space: nowrap; }
.col-price  { flex: 0 0 80px; text-align: right; white-space: nowrap; }
.col-change { flex: 0 0 70px; text-align: right; white-space: nowrap; }
.col-status { flex: 0 0 80px; text-align: right; white-space: nowrap; }

.product-row {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-color);
    text-decoration: none;
    transition: background 0.2s ease;
    cursor: pointer;
    gap: 12px;
}

.product-row:last-child {
    border-bottom: none;
}

.product-row:hover {
    background: rgba(255,255,255,0.03);
}

.product-info {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
    min-width: 0;
    overflow: hidden;
}

.product-icon {
    width: 34px;
    height: 34px;
    border-radius: 8px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-color: rgba(255,255,255,0.05);
    flex-shrink: 0;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-icon img {
    width: 34px;
    height: 34px;
    border-radius: 8px;
    object-fit: cover;
    display: block;
}

.product-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.product-symbol {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-primary);
    white-space: nowrap;
}

.product-desc {
    font-size: 10px;
    color: var(--text-secondary);
    white-space: nowrap;
}

.product-price {
    font-size: 13px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    text-align: right;
    white-space: nowrap;
    flex: 0 0 80px;
    color: var(--text-primary);
}

.product-price.positive { color: var(--success-color); }
.product-price.negative { color: #ef4444; }

.product-change-pct {
    font-size: 13px;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    text-align: right;
    white-space: nowrap;
    flex: 0 0 70px;
    color: var(--text-secondary);
}

.product-change-pct.positive { color: var(--success-color); }
.product-change-pct.negative { color: #ef4444; }
.product-change-pct.neutral { color: var(--text-secondary); }

.product-status {
    font-size: 11px;
    font-weight: 600;
    text-align: right;
    white-space: nowrap;
    flex: 0 0 65px;
}

.product-status.available { color: var(--success-color); }
.product-status.unavailable { color: var(--text-secondary); }

@media (max-width: 480px) {
    .products-list {
        border-radius: 12px;
    }
}

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

.feature-item {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 10px;
    transition: all 0.3s ease;
}

.feature-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.2);
}

.feature-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.feature-icon-blue {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
}

.feature-icon-green {
    background: linear-gradient(135deg, #22c55e, #16a34a);
}

.feature-icon-purple {
    background: linear-gradient(135deg, #a855f7, #9333ea);
}

.feature-icon-orange {
    background: linear-gradient(135deg, #f59e0b, #d97706);
}

.feature-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.feature-desc {
    font-size: 12px;
    color: var(--text-secondary);
    margin: 0;
    line-height: 1.4;
}

/* Balance Adjustment Buttons */
.balance-buttons {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
}

.balance-btn {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px 12px;
    border-radius: 12px;
    border: 2px solid var(--border-color);
    background: var(--bg-card);
    cursor: pointer;
    transition: all 0.2s ease;
    gap: 6px;
    color: var(--text-secondary);
}

.balance-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.balance-btn.active {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.balance-btn .btn-icon-large {
    font-size: 28px;
    line-height: 1;
    font-weight: 700;
}

.balance-btn .btn-label {
    font-size: 15px;
    font-weight: 600;
    line-height: 1.2;
    text-align: center;
}

.balance-btn .btn-description {
    font-size: 12px;
    opacity: 0.7;
    line-height: 1.3;
    text-align: center;
}

.add-btn {
    border-color: rgba(34, 197, 94, 0.3);
}

.add-btn:hover,
.add-btn.active {
    border-color: #22c55e;
    background: rgba(34, 197, 94, 0.08);
}

.add-btn .btn-icon-large,
.add-btn .btn-label {
    color: #22c55e;
}

.deduct-btn {
    border-color: rgba(239, 68, 68, 0.3);
}

.deduct-btn:hover,
.deduct-btn.active {
    border-color: #ef4444;
    background: rgba(239, 68, 68, 0.08);
}

.deduct-btn .btn-icon-large,
.deduct-btn .btn-label {
    color: #ef4444;
}

@media (min-width: 768px) {
    body {
        max-width: 480px;
        margin: 0 auto;
        box-shadow: 0 0 20px rgba(0,0,0,0.5);
    }
}
