/* Accounts Pages Specific Styles */

/* Import CSS variables */
@import url("../variables.a45104a2cb93.css");

/* Common Styles for All Account Pages */
.container-fluid {
    padding-top: var(--spacing-lg);
    padding-bottom: var(--spacing-xl);
}

/* ================================================
   FAVORITES GRID - Modern Card Design
   ================================================ */

.favorites-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 1rem;
}

/* Favorite Card */
.favorite-card {
    background: white;
    border-radius: 16px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    border: 1px solid rgba(0, 0, 0, 0.06);
    overflow: hidden;
    transition: all 0.3s ease;
}

.favorite-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.08);
    border-color: var(--gold-primary, #FFB700);
}

/* Card Header */
.favorite-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 16px 12px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.04);
}

.favorite-asset-info {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
    min-width: 0;
}

.favorite-details {
    flex: 1;
    min-width: 0;
}

.favorite-name {
    font-size: 1rem;
    font-weight: 600;
    color: #1A1A1A;
    text-decoration: none;
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: color 0.2s ease;
}

.favorite-name:hover {
    color: var(--gold-dark, #E67E00);
}

.favorite-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 4px;
}

.favorite-ticker {
    font-size: 0.75rem;
    font-weight: 600;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.favorite-category {
    font-size: 0.7rem;
    color: #999;
    padding: 2px 8px;
    background: #f5f5f5;
    border-radius: 4px;
}

.favorite-change {
    flex-shrink: 0;
}

/* Price Section */
.favorite-prices {
    padding: 12px 16px;
}

.favorite-prices.empty {
    padding: 24px 16px;
    text-align: center;
}

.price-row {
    display: flex;
    gap: 16px;
}

.price-item {
    flex: 1;
    text-align: center;
    padding: 8px;
    background: #fafafa;
    border-radius: 8px;
}

.favorite-prices .price-label {
    font-size: 0.7rem;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 500;
    margin-bottom: 4px;
}

.favorite-prices .price-value {
    font-size: 1rem;
    font-weight: 700;
    color: #1A1A1A;
    display: block;
}

.favorite-prices .price-value.bid {
    color: #28a745;
}

.favorite-prices .price-value.ask {
    color: #dc3545;
}

/* 24h Range Section */
.range-section {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid rgba(0, 0, 0, 0.04);
}

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

.range-label {
    font-size: 0.7rem;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 500;
}

.range-values {
    font-size: 0.75rem;
    color: #666;
    font-weight: 500;
}

.range-bar {
    height: 6px;
    background: linear-gradient(90deg, #28a745 0%, #ffc107 50%, #dc3545 100%);
    border-radius: 3px;
    position: relative;
    overflow: visible;
}

.range-progress {
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    background: transparent;
    border-radius: 3px;
}

.range-marker {
    position: absolute;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 12px;
    height: 12px;
    background: white;
    border: 2px solid #1A1A1A;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* Card Footer */
.favorite-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: #fafafa;
    border-top: 1px solid rgba(0, 0, 0, 0.04);
}

.favorite-date {
    font-size: 0.75rem;
    color: #888;
    display: flex;
    align-items: center;
    gap: 6px;
}

.favorite-date i {
    font-size: 0.7rem;
}

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

.action-btn {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.875rem;
}

.action-btn.detail {
    background: rgba(13, 110, 253, 0.1);
    color: #0d6efd;
}

.action-btn.detail:hover {
    background: #0d6efd;
    color: white;
    transform: translateY(-2px);
}

.action-btn.alert {
    background: rgba(23, 162, 184, 0.1);
    color: #17a2b8;
}

.action-btn.alert:hover {
    background: #17a2b8;
    color: white;
    transform: translateY(-2px);
}

.action-btn.remove {
    background: rgba(220, 53, 69, 0.1);
    color: #dc3545;
}

.action-btn.remove:hover {
    background: #dc3545;
    color: white;
    transform: translateY(-2px);
}

/* Mobile Responsive */
@media (max-width: 767px) {
    .favorites-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .favorite-card-header {
        padding: 12px 12px 10px;
    }

    .favorite-name {
        font-size: 0.9rem;
    }

    .favorite-prices {
        padding: 10px 12px;
    }

    .favorite-prices .price-value {
        font-size: 0.9rem;
    }

    .favorite-card-footer {
        padding: 10px 12px;
    }

    .action-btn {
        width: 32px;
        height: 32px;
        font-size: 0.8rem;
    }
}

/* Shimmer effect for loading */
.favorite-card.shimmer {
    position: relative;
    overflow: hidden;
    background-image: linear-gradient(
        90deg,
        #f0f0f0 0%,
        #f8f8f8 20%,
        #f0f0f0 40%,
        #f0f0f0 100%
    );
    background-size: 200% 100%;
    animation: shimmer-bg 1.5s linear infinite;
}

.favorite-card.shimmer:hover {
    transform: none;
}

@keyframes shimmer-bg {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* ================================================
   END FAVORITES GRID
   ================================================ */

/* Sidebar Card */
.col-md-3 .card {
    background: var(--bg-white);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
    overflow: hidden;
}

.col-md-3 .card-body {
    padding: var(--spacing-xl);
}

/* User Icon */
.col-md-3 .fa-user-circle {
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Sidebar Links */
.col-md-3 .list-group-item {
    border: none !important;
    padding: var(--spacing-md) var(--spacing-lg);
    margin-bottom: var(--spacing-xs);
    border-radius: var(--radius-md) !important;
    transition: var(--transition-fast);
    font-weight: 500;
    position: relative;
    overflow: hidden;
    background-color: transparent;
}

.col-md-3 .list-group-item:first-child {
    border-top-left-radius: var(--radius-md) !important;
    border-top-right-radius: var(--radius-md) !important;
}

.col-md-3 .list-group-item:last-child {
    border-bottom-left-radius: var(--radius-md) !important;
    border-bottom-right-radius: var(--radius-md) !important;
}

.col-md-3 .list-group-item:hover {
    background: var(--bg-light);
    transform: translateX(5px);
}

.col-md-3 .list-group-item.active {
    background: var(--primary-light);
    color: var(--primary-dark);
    padding-left: calc(var(--spacing-lg) + 4px);
    border-radius: var(--radius-md) !important;
}

.col-md-3 .list-group-item.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: var(--primary-color);
    border-radius: 0 4px 4px 0;
}

.col-md-3 .list-group-item i {
    width: 20px;
    margin-right: var(--spacing-sm);
}

/* Empty State */
.favorites-container + .text-center {
    padding: var(--spacing-xxl);
}

/* Refresh Button */
.btn-outline-secondary {
    border: 2px solid var(--border-color);
    background: var(--bg-white);
    font-weight: 600;
    transition: var(--transition-base);
}

.btn-outline-secondary:hover {
    background: var(--primary-gradient);
    border-color: var(--primary-color);
    color: var(--text-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* Alert Modal */
#alertModal .modal-content {
    border-radius: var(--radius-xl);
    border: none;
    box-shadow: var(--shadow-xl);
}

#alertModal .modal-header {
    background: var(--primary-gradient);
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
    padding: var(--spacing-lg);
}

#alertModal .modal-title {
    font-weight: 700;
    color: var(--text-dark);
}

#alertModal .btn-close {
    background: var(--bg-white);
    border-radius: 50%;
    opacity: 0.8;
    padding: 0.5rem;
}

/* Settings Page Specific Styles */
.settings-form .form-control,
.settings-form .form-select {
    background: var(--bg-white);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 0.75rem 1rem;
    font-size: 1rem;
    transition: var(--transition-base);
    color: var(--text-dark);
}

.settings-form .form-control:focus,
.settings-form .form-select:focus {
    border-color: var(--primary-color) !important;
    background: var(--bg-white);
    box-shadow: 0 0 0 0.2rem rgba(255, 215, 0, 0.25) !important;
    outline: none !important;
}

.settings-form .form-control:hover,
.settings-form .form-select:hover {
    border-color: var(--primary-light);
}

/* Fix for readonly inputs */
.settings-form .form-control[readonly] {
    background-color: var(--bg-light);
    cursor: not-allowed;
    opacity: 0.8;
}

/* Phone input specific */
.settings-form input[type="tel"],
.settings-form input#id_phone {
    cursor: text !important;
    -webkit-user-select: text !important;
    -moz-user-select: text !important;
    user-select: text !important;
}

/* Tab navigation */
.nav-tabs {
    border-bottom: 2px solid var(--border-color);
    margin-bottom: 2rem;
}

.nav-tabs .nav-link {
    color: var(--text-muted);
    border: none;
    border-bottom: 3px solid transparent;
    padding: 0.75rem 1.5rem;
    font-weight: 500;
    transition: var(--transition-base);
    background: transparent;
}

.nav-tabs .nav-link:hover {
    color: var(--text-dark);
    border-color: transparent;
    background: var(--bg-light);
}

.nav-tabs .nav-link.active {
    color: var(--primary-dark);
    background: transparent;
    border-color: transparent;
    border-bottom-color: var(--primary-color);
}

/* Form labels */
.settings-form .form-label {
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}

/* Submit buttons */
.settings-form .btn-primary {
    background: var(--primary-gradient);
    border: none;
    padding: 0.75rem 2rem;
    font-weight: 600;
    border-radius: var(--radius-md);
    transition: var(--transition-base);
}

.settings-form .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 215, 0, 0.3);
}

/* Input group styling */
.input-group-text {
    background: var(--bg-light);
    border: 2px solid var(--border-color);
    border-right: none;
    color: var(--text-muted);
}

.input-group .form-control {
    border-left: none;
}

.input-group .form-control:focus {
    border-left: none !important;
}

.input-group:focus-within .input-group-text {
    border-color: var(--primary-color);
    color: var(--primary-dark);
}

/* Responsive */
@media (max-width: 767px) {
    .favorites-container .price-card {
        padding: var(--spacing-md);
    }
    
    .favorites-container .asset-icon {
        width: 48px;
        height: 48px;
        font-size: var(--font-xl);
        margin-right: var(--spacing-md);
    }
    
    .favorites-container .price-value {
        font-size: var(--font-lg);
    }
    
    .favorites-container .d-flex.gap-4 {
        gap: 1rem !important;
    }
    
    .favorites-container .btn-sm {
        padding: 0.4rem 0.6rem;
        font-size: 0.8rem;
    }
    
    .col-md-3 {
        margin-bottom: var(--spacing-lg);
    }
}

@media (max-width: 575px) {
    .favorites-container .d-flex.gap-4 {
        flex-wrap: wrap;
        gap: 0.5rem !important;
    }
    
    .favorites-container .ms-4 {
        margin-left: 0 !important;
        margin-top: var(--spacing-md);
        width: 100%;
        justify-content: space-between;
    }
}

/* Shimmer effect for loading - Only background */
.favorites-container .price-card.shimmer {
    position: relative;
    overflow: hidden;
    background-image: linear-gradient(
        90deg,
        #f0f0f0 0%,
        #f8f8f8 20%,
        #f0f0f0 40%,
        #f0f0f0 100%
    );
    background-size: 200% 100%;
    animation: shimmer-bg 1.5s linear infinite;
}

/* Disable hover effects during shimmer */
.favorites-container .price-card.shimmer:hover {
    transform: none;
}

@keyframes shimmer-bg {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* ================================================
   MODERN ACCOUNT SIDEBAR
   ================================================ */

.account-sidebar {
    background: white;
    border-radius: 16px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    overflow: hidden;
    border: 1px solid var(--border-color, #e9ecef);
}

/* Profile Section */
.sidebar-profile {
    padding: 24px 20px;
    background: linear-gradient(135deg, #FFB700 0%, #FF9500 100%);
    color: white;
    display: flex;
    align-items: center;
    gap: 16px;
    position: relative;
    overflow: hidden;
}

.sidebar-profile::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    pointer-events: none;
}

.profile-avatar {
    position: relative;
    flex-shrink: 0;
}

.avatar-circle {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    transition: all 0.3s ease;
}

.sidebar-profile:hover .avatar-circle {
    transform: scale(1.05);
    border-color: rgba(255, 255, 255, 0.5);
}

.verified-badge {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 20px;
    height: 20px;
    background: #28a745;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid white;
    font-size: 10px;
}

.profile-info {
    flex: 1;
    min-width: 0;
    position: relative;
    z-index: 1;
}

.profile-name {
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 4px 0;
    color: white;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.profile-email {
    font-size: 13px;
    margin: 0;
    opacity: 0.9;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Navigation */
.sidebar-nav {
    padding: 8px;
    max-height: calc(100vh - 300px);
    overflow-y: auto;
    overflow-x: hidden;
}

.sidebar-nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 12px;
    border-radius: 10px;
    text-decoration: none;
    color: var(--text-primary, #1A1A1A);
    transition: all 0.2s ease;
    position: relative;
    margin-bottom: 4px;
    background: transparent;
    border: none;
    width: 100%;
    text-align: left;
    cursor: pointer;
}

.sidebar-nav-item:hover {
    background: #f8f9fa;
    transform: translateX(4px);
}

.sidebar-nav-item.active {
    background: linear-gradient(135deg, rgba(255, 183, 0, 0.1) 0%, rgba(255, 149, 0, 0.05) 100%);
    color: var(--gold-dark, #E67E00);
}

.sidebar-nav-item.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 60%;
    background: linear-gradient(135deg, #FFB700 0%, #FF9500 100%);
    border-radius: 0 4px 4px 0;
}

.nav-item-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8f9fa;
    flex-shrink: 0;
    font-size: 16px;
    transition: all 0.2s ease;
}

.sidebar-nav-item:hover .nav-item-icon {
    background: rgba(255, 183, 0, 0.15);
    color: var(--gold-dark, #E67E00);
}

.sidebar-nav-item.active .nav-item-icon {
    background: rgba(255, 183, 0, 0.2);
    color: var(--gold-dark, #E67E00);
}

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

.nav-item-label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 2px;
}

.nav-item-desc {
    display: block;
    font-size: 12px;
    color: var(--text-muted, #8A8A8A);
    line-height: 1.3;
}

.nav-item-badge {
    min-width: 24px;
    height: 24px;
    padding: 0 8px;
    background: var(--gold-primary, #FFB700);
    color: white;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
}

.nav-item-badge.pulse {
    animation: badge-pulse 2s infinite;
}

@keyframes badge-pulse {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(255, 183, 0, 0.4);
    }
    50% {
        box-shadow: 0 0 0 6px rgba(255, 183, 0, 0);
    }
}

/* Divider */
.sidebar-divider {
    height: 1px;
    background: var(--border-color, #e9ecef);
    margin: 8px 12px;
}

/* Logout Button */
.sidebar-logout-form {
    margin: 0;
}

.sidebar-nav-item.logout {
    color: #dc3545;
}

.sidebar-nav-item.logout:hover {
    background: rgba(220, 53, 69, 0.08);
}

.sidebar-nav-item.logout .nav-item-icon {
    background: rgba(220, 53, 69, 0.1);
    color: #dc3545;
}

.sidebar-nav-item.logout:hover .nav-item-icon {
    background: rgba(220, 53, 69, 0.15);
}

/* Scrollbar */
.sidebar-nav::-webkit-scrollbar {
    width: 4px;
}

.sidebar-nav::-webkit-scrollbar-track {
    background: transparent;
}

.sidebar-nav::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.1);
    border-radius: 4px;
}

.sidebar-nav::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.2);
}

/* Sidebar Responsive */
@media (max-width: 767px) {
    .account-sidebar {
        margin-bottom: 24px;
    }

    .nav-item-desc {
        display: none;
    }

    .sidebar-nav-item {
        padding: 10px 12px;
    }

    .nav-item-icon {
        width: 36px;
        height: 36px;
    }
}

/* ================================================
   END MODERN ACCOUNT SIDEBAR
   ================================================ */

/* Danger zone card */
.card.border-danger {
    border-color: rgba(220, 53, 69, 0.3) !important;
    background: rgba(220, 53, 69, 0.02);
}

.card.border-danger .card-body {
    padding: 2rem;
}

.card.border-danger h5 {
    font-weight: 700;
    margin-bottom: 1.5rem;
}

.card.border-danger h6 {
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: var(--text-dark);
}

.card.border-danger .btn-warning {
    background: linear-gradient(135deg, #ffc107 0%, #ff9800 100%);
    border: none;
    color: var(--text-dark);
    font-weight: 600;
    padding: 0.5rem 1.5rem;
    transition: var(--transition-base);
}

.card.border-danger .btn-warning:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 152, 0, 0.3);
}

.card.border-danger .btn-danger {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
    border: none;
    font-weight: 600;
    padding: 0.5rem 1.5rem;
    transition: var(--transition-base);
}

.card.border-danger .btn-danger:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(220, 53, 69, 0.3);
}