/* Profile header layout fix for desktop */
.profile-header-main {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 20px;
}
.profile-header-top {
  flex: 1;
  display: flex;
  align-items: flex-start;
  gap: 20px;
}
.profile-account-info {
  min-width: 260px;
  max-width: 320px;
  background: rgba(255,255,255,0.08);
  border-radius: 12px;
  padding: 24px 20px 20px 20px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.04);
  margin-left: 40px;
  text-align: left;
  align-self: flex-start;
}

@media (max-width: 900px) {
  .profile-header-main {
    flex-direction: column !important;
    gap: 18px !important;
  }
  .profile-header-top {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 14px !important;
  }
  .profile-account-info {
    margin-left: 0 !important;
    margin-top: 18px !important;
    text-align: left !important;
    width: 100% !important;
    align-self: stretch !important;
  }
}
@media (max-width: 900px) {
  .profile-header-main {
    flex-direction: column !important;
    gap: 18px !important;
  }
  .profile-header-top {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 14px !important;
  }
  .profile-account-info {
    margin-left: 0 !important;
    margin-top: 18px !important;
    text-align: left !important;
    width: 100% !important;
    align-self: stretch !important;
  }
}
body {
    margin: 0;
    font-family: 'Segoe UI', Arial, sans-serif;
    background: #fff;
    color: #222;
    min-height: 100vh;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
}

html {
    overflow-x: hidden;
    box-sizing: border-box;
}

*, *::before, *::after {
    box-sizing: border-box;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
    box-sizing: border-box;
}
header, footer {
    background: linear-gradient(135deg, #176cae 0%, #2c5aa0 100%);
    color: #fff;
}
header {
    padding: 0;
    box-shadow: 0 2px 15px rgba(0,0,0,0.1);
    position: relative;
    z-index: 10;
    border-bottom: 3px solid #1e3f73;
}

header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 70px;
    position: relative;
    width: 100%;
    max-width: 1200px;
    padding: 0 15px;
    box-sizing: border-box;
}

header h1 {
    margin: 0;
    font-size: 2.2rem;
    letter-spacing: 2px;
    color: #fff;
}

nav {
    display: flex;
    align-items: center;
    height: 100%;
    transition: all 0.3s ease;
    z-index: 99;
    order: 2;
    flex-wrap: nowrap;
}

nav a {
    color: #fff;
    text-decoration: none;
    margin-left: 20px;
    font-weight: 500;
    font-size: 1.05rem;
    transition: all 0.2s;
    padding: 8px 12px;
    display: inline-block;
    border-radius: 6px;
    white-space: nowrap;
}

nav a:hover {
    color: #6dd5ed;
    background: rgba(255,255,255,0.1);
}

/* Hamburger button - Hidden on desktop, show on mobile */
.hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
    border-radius: 6px;
    transition: background 0.3s ease;
    position: relative;
    z-index: 101;
    order: 3;
}

.hamburger:hover {
    background: rgba(255,255,255,0.1);
}

.hamburger span {
    display: block;
    height: 3px;
    width: 25px;
    background: #fff;
    margin: 3px 0;
    border-radius: 2px;
    transition: 0.3s ease;
    transform-origin: center;
}

/* Hamburger animation */
.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

/* Mobile navigation styles */
@media (max-width: 768px) {
    .hamburger {
        display: flex !important;
        position: relative;
        z-index: 102;
    }
    
    header .container {
        padding: 0 10px;
        overflow: visible;
        position: relative;
        width: 100%;
    }
    
    nav {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: linear-gradient(135deg, #2c5aa0 0%, #1e3f73 100%);
        flex-direction: column;
        padding: 0;
        box-shadow: 0 4px 20px rgba(0,0,0,0.3);
        border-radius: 0 0 12px 12px;
        transform: translateY(-100%);
        opacity: 0;
        visibility: hidden;
        transition: transform 0.3s ease, opacity 0.3s ease, visibility 0.3s ease;
        z-index: 98;
        order: 3;
        min-height: auto;
        width: 100%;
        display: flex;
        overflow: visible;
        /* Äáº£m báº£o ná»n cÃ³ thá»ƒ má»Ÿ rá»™ng theo ná»™i dung */
        height: auto;
        max-height: calc(100vh - 80px);
        overflow-y: auto;
    }
    
    nav.active {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
        display: flex;
        /* Äáº£m báº£o ná»n luÃ´n phá»§ háº¿t content */
        height: auto;
        min-height: fit-content;
    }
    
    nav a {
        margin: 0;
        padding: 18px 30px;
        border-bottom: 1px solid rgba(255,255,255,0.1);
        font-size: 1.1rem;
        width: 100%;
        text-align: left;
        border-radius: 0;
        box-sizing: border-box;
        display: block;
        background: transparent;
        color: #fff;
        flex-shrink: 0;
        min-height: 56px;
    }
    
    nav a:first-child {
        padding-top: 25px;
    }
    
    nav a:last-child {
        border-bottom: none;
        padding-bottom: 25px;
    }
    
    nav a:hover {
        background: rgba(255,255,255,0.15) !important;
        color: #fff !important;
    }
    
    /* Special styling for nav buttons in mobile */
    nav a.btn-white,
    nav a.cta-btn,
    nav a.btn-secondary {
        margin: 15px 20px 15px 20px;
        padding: 15px 25px;
        border-radius: 8px;
        border: 2px solid rgba(255,255,255,0.3);
        text-align: center;
        font-weight: 600;
        border-bottom: none;
        min-height: auto;
    }
    
    nav a.btn-white:last-child,
    nav a.cta-btn:last-child,
    nav a.btn-secondary:last-child {
        margin-bottom: 25px;
        padding-bottom: 15px;
    }
    
    nav a.btn-white {
        background: #fff !important;
        color: #2c5aa0 !important;
        border-color: #fff;
    }
    
    nav a.btn-white:hover {
        background: #f8f9fa !important;
        color: #1e3f73 !important;
    }
    
    nav a.cta-btn {
        background: #fff !important;
        color: #2c5aa0 !important;
        border-color: #fff;
    }
    
    nav a.cta-btn:hover {
        background: #f8f9fa !important;
        color: #1e3f73 !important;
    }
    
    nav a.btn-secondary {
        background: rgba(255,255,255,0.2) !important;
        color: #fff !important;
        border-color: rgba(255,255,255,0.3);
    }
    
    nav a.btn-secondary:hover {
        background: rgba(255,255,255,0.3) !important;
        color: #fff !important;
    }
    
    header h1 {
        font-size: 1.8rem;
    }
}

.hero {
    text-align: center;
    padding: 80px 0 60px 0;
    background: #fff;
}

.hero h2 {
    font-size: 2.5rem;
    margin-bottom: 20px;
    font-weight: 700;
    color: #176cae;
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 30px;
    color: #333;
}

.cta-btn {
    background: #176cae;
    color: #fff;
    padding: 15px 40px;
    border: none;
    border-radius: 30px;
    font-size: 1.1rem;
    font-weight: bold;
    text-decoration: none;
    box-shadow: 0 4px 16px rgba(23,108,174,0.15);
    transition: background 0.3s, transform 0.2s;
    display: inline-block;
}
.cta-btn:hover {
    background: #1565c0;
    color: #fff;
    transform: translateY(-2px) scale(1.03);
}

.features {
    background: #fff;
    padding: 50px 0;
}

.features .container {
    display: flex;
    justify-content: center;
    align-items: stretch;
    gap: 30px;
    flex-wrap: wrap;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
    box-sizing: border-box;
}

.feature {
    background: #e3f0fb;
    border-radius: 16px;
    padding: 30px 25px;
    width: 100%;
    max-width: 320px;
    min-width: 280px;
    box-shadow: 0 2px 12px rgba(33,147,176,0.08);
    text-align: center;
    transition: box-shadow 0.2s;
    display: flex;
    flex-direction: column;
    justify-content: center;
    margin-bottom: 0;
}

.feature:hover {
    box-shadow: 0 6px 24px rgba(33,147,176,0.18);
}

.feature h3 {
    color: #176cae;
    margin-bottom: 12px;
    font-size: 1.3rem;
    font-weight: bold;
}

.feature p {
    color: #333;
    font-size: 1rem;
}

footer {
    text-align: center;
    padding: 20px 0;
    font-size: 1rem;
    color: #fff;
    margin-top: auto;
}

footer .container {
    width: 100%;
    max-width: 1200px;
    padding: 0 15px;
    margin: 0 auto;
    box-sizing: border-box;
}

/* Responsive footer */
@media (max-width: 768px) {
    footer {
        padding: 15px 0;
        font-size: 0.9rem;
    }
    
    footer .container {
        width: 100%;
        padding: 0 10px;
    }
}

@media (max-width: 480px) {
    footer {
        padding: 12px 0;
        font-size: 0.85rem;
    }
    
    footer .container {
        width: 100%;
        padding: 0 10px;
    }
}

/* Navigation button spacing */
.nav-btn-primary {
    margin-left: 20px;
}

.nav-btn-secondary {
    margin-left: 10px;
}

/* Additional margin utilities */
.mb-18 {
    margin-bottom: 18px;
}

/* Hide element utility */
.d-none {
    display: none;
}

/* Message styling */
.mt-10 {
    margin-top: 10px;
}

.text-error {
    color: #d00;
}

/* Button styling variations */
.btn-outline {
    background: transparent;
    color: #176cae;
    border: 2px solid #176cae;
    padding: 10px 20px;
    border-radius: 6px;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.btn-outline:hover {
    background: #176cae;
    color: #fff;
    transform: translateY(-1px);
}

.btn-white {
    background: #fff;
    color: #176cae;
    border: 2px solid #176cae;
    padding: 12px 28px;
    border-radius: 25px;
    font-size: 1.05rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    box-shadow: 0 3px 12px rgba(23,108,174,0.15);
}

.btn-white:hover {
    background: #f0f8ff;
    color: #0d47a1;
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(23,108,174,0.25);
}

/* Success and info message styling */
.text-success {
    color: #00b894;
}

.code-highlight {
    background: #e8f3fd;
    padding: 4px 8px;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 0.9em;
    border: 1px solid #b2d4ff;
}

/* MetaTrader Link Styles */
.metatrader-link {
    color: #176cae;
    text-decoration: none;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 8px;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.metatrader-link:hover {
    background: #e8f3fd;
    color: #0d5a94;
    text-decoration: none;
    transform: translateY(-1px);
}

.metatrader-link i {
    font-size: 14px;
}

.waiting-connection {
    color: #6c757d;
    font-style: italic;
    padding: 4px 8px;
    background: #f8f9fa;
    border-radius: 4px;
    font-size: 14px;
}

/* Trading History Page Specific Styles */
.section-header {
    background: linear-gradient(135deg, #2c5aa0 0%, #1e3f73 100%);
    color: white;
    padding: 25px 30px;
    border-radius: 12px;
    margin-bottom: 25px;
    box-shadow: 0 4px 15px rgba(44, 90, 160, 0.3);
    width: 100%;
    box-sizing: border-box;
}

.section-header h1 {
    margin: 0 0 10px 0;
    font-size: 2.5rem;
    font-weight: 700;
}

.section-header p {
    margin: 5px 0;
    opacity: 0.9;
    font-size: 1.1rem;
}

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

/* Enhanced stats grid for full width */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
    width: 100%;
}

.stat-card {
    background: white;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    display: flex;
    align-items: center;
    gap: 15px;
    transition: transform 0.2s ease;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.12);
}

.stat-icon {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #2c5aa0, #176cae);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 20px;
}

.stat-content {
    flex: 1;
}

.stat-number {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 5px;
    color: #2c3e50;
}

.stat-label {
    font-size: 0.95rem;
    color: #6c757d;
    font-weight: 500;
}

.content-section {
    background: white;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 2px 15px rgba(0,0,0,0.06);
    margin-bottom: 25px;
    width: 100%;
    box-sizing: border-box;
}

/* Enhanced content sections */
.content-section {
    background: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 2px 15px rgba(0,0,0,0.06);
    margin-bottom: 25px;
    width: 100%;
    box-sizing: border-box;
}

.content-section h3 {
    margin: 0 0 20px 0;
    color: #2c3e50;
    font-size: 1.3rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.content-section h3 i {
    color: #176cae;
}

.form-input {
    width: 100%;
    padding: 10px 12px;
    border: 2px solid #e1e5e9;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.2s ease;
}

.form-input:focus {
    outline: none;
    border-color: #176cae;
    box-shadow: 0 0 0 3px rgba(23, 108, 174, 0.1);
}

.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
}

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

.btn-primary:hover {
    background: #0d5a94;
    transform: translateY(-1px);
}

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

.btn-secondary:hover {
    background: #545b62;
    transform: translateY(-1px);
}

/* Trading History Page Styles */
.dashboard-main {
    flex: 1;
    background: #f8f9fa;
    min-height: calc(100vh - 140px);
    padding: 20px;
    width: 100%;
    max-width: none;
    overflow-x: auto;
    box-sizing: border-box;
    min-height: 400px;
}

.dashboard-main h2 {
    color: #333;
    margin-bottom: 15px;
    font-weight: 600;
}

.section-header {
    margin-bottom: 25px;
}

.section-header h2 {
    margin: 0 0 8px 0;
    color: #2c5aa0;
    font-size: 28px;
}

.section-header p {
    margin: 5px 0;
    color: #666;
    font-size: 14px;
}

/* Filter form styling */
.dashboard-main form {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    align-items: end;
}

.dashboard-main form > div {
    display: flex;
    flex-direction: column;
}

.dashboard-main form label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: #555;
    font-size: 14px;
}

.dashboard-main form input,
.dashboard-main form select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.2s;
    box-sizing: border-box;
    margin-bottom: 0 !important;
}

.dashboard-main form input:focus,
.dashboard-main form select:focus {
    outline: none;
    border-color: #2c5aa0;
    box-shadow: 0 0 0 2px rgba(44, 90, 160, 0.1);
}

/* Button styling for forms */
.dashboard-main form .btn-primary {
    background: #2c5aa0;
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: background-color 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.dashboard-main form .btn-primary:hover {
    background: #1e3f73;
}

.dashboard-main form .btn-outline {
    background: white;
    color: #2c5aa0;
    padding: 10px 20px;
    border: 1px solid #2c5aa0;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.2s;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.dashboard-main form .btn-outline:hover {
    background: #2c5aa0;
    color: white;
}

/* Dashboard Container Styles */
.dashboard-container {
    display: grid;
    grid-template-columns: 280px 1fr;
    min-height: 100vh;
    width: 100%;
    background: #f8f9fa;
    overflow: visible;
    position: relative;
}

/* Create background that extends full height */
.dashboard-container::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 280px;
    height: 100%;
    min-height: 100vh;
    background: linear-gradient(135deg, #2c5aa0 0%, #1e3f73 100%);
    z-index: 0;
    box-shadow: 2px 0 10px rgba(0,0,0,0.1);
}

/* Dashboard Sidebar Styles */
.dashboard-sidebar {
    background: transparent;
    padding: 20px 0;
    position: relative;
    overflow-y: auto;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
    grid-row: 1 / -1;
    z-index: 1;
}

/* Ensure sidebar fills full height on desktop */
@media (min-width: 769px) {
    .dashboard-sidebar {
        min-height: 100vh;
    }
    
    .dashboard-container {
        min-height: 100vh;
    }
    
    .dashboard-container::before {
        display: block;
    }
}

/* Hide pseudo-element background on mobile */
@media (max-width: 768px) {
    .dashboard-container::before {
        display: none;
    }
    
    .dashboard-sidebar {
        background: linear-gradient(135deg, #2c5aa0 0%, #1e3f73 100%);
    }
}

.dashboard-sidebar::-webkit-scrollbar {
    display: none;
}

.sidebar-tab {
    display: block;
    width: 100%;
    padding: 15px 25px;
    background: none;
    border: none;
    color: #ffffff;
    font-size: 16px;
    font-weight: 500;
    text-align: left;
    cursor: pointer;
    transition: all 0.3s ease;
    border-left: 4px solid transparent;
    position: relative;
    padding: 12px 15px;
    font-size: 13px;
    min-width: 80px;
    flex-shrink: 0;
}

.sidebar-tab:hover {
    background: rgba(255,255,255,0.1);
    color: #ffffff;
    border-left-color: #6dd5ed;
}

.sidebar-tab.active {
    background: rgba(255,255,255,0.15);
    color: #ffffff;
    border-left-color: #ffffff;
    font-weight: 600;
}

.sidebar-tab.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: linear-gradient(135deg, #6dd5ed, #2193b0);
}

/* Dashboard Main Content */
.dashboard-main {
    flex: 1;
    padding: 30px 40px;
    background: #f8f9fa;
    overflow-y: auto;
    overflow-x: auto;
    width: 100%;
    max-width: none;
    box-sizing: border-box;
}

.dashboard-main h2 {
    color: #2c3e50;
    margin-bottom: 25px;
    font-size: 28px;
    font-weight: 600;
    border-bottom: 3px solid #e9ecef;
    padding-bottom: 10px;
}

/* Account Header Styles */
.account-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: white;
    padding: 20px 25px;
    border-radius: 12px;
    box-shadow: 0 2px 15px rgba(0,0,0,0.08);
    margin-bottom: 25px;
}

.account-info {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.key-count {
    font-size: 18px;
    font-weight: 600;
    color: #2c5aa0;
    background: #e8f3fd;
    padding: 8px 16px;
    border-radius: 20px;
    display: inline-block;
}

.limit-reached {
    color: #dc3545;
    font-size: 14px;
    font-weight: 500;
    background: #f8d7da;
    padding: 6px 12px;
    border-radius: 15px;
    border: 1px solid #f5c6cb;
}

/* Account Table Styles */
.account-table {
    width: 100%;
    min-width: 800px;
    background: white;
    border-radius: 12px;
    border-collapse: collapse;
    margin: 0;
}

.account-table thead {
    background: linear-gradient(135deg, #2c5aa0 0%, #1e3f73 100%);
}

.account-table thead th {
    color: white;
    padding: 18px 15px;
    font-weight: 600;
    font-size: 14px;
    text-align: left;
    border: none;
}

.account-table tbody {
    background: white;
}

.account-table tbody tr {
    transition: background-color 0.2s ease;
    border-bottom: 1px solid #e9ecef;
}

.account-table tbody tr:hover {
    background: #f8f9fa;
}

.account-table tbody tr:last-child {
    border-bottom: none;
}

.account-table tbody td {
    padding: 15px;
    color: #495057;
    font-size: 14px;
    border: none;
    background: white;
    border-bottom: 1px solid #dee2e6;
}

/* Table wrapper for horizontal scroll */
.table-wrapper {
    overflow-x: auto;
    overflow-y: visible;
    width: 100%;
    margin-bottom: 20px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    background: white;
}

/* Mobile table adjustments */
@media (max-width: 768px) {
    .table-wrapper {
        display: none;
    }
    
    .accounts-mobile {
        display: flex;
        flex-direction: column;
    }
}

/* Tablet adjustments */
@media (max-width: 992px) and (min-width: 769px) {
    .table-wrapper {
        margin: 0 -15px 20px -15px;
        border-radius: 0;
        overflow-x: auto;
    }
}

/* Key Container Styles */
.key-container {
    display: flex;
    align-items: center;
    gap: 8px;
    max-width: 200px;
}

.key-password-field {
    flex: 1;
    padding: 8px 10px;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    font-size: 12px;
    background: #f8f9fa;
    font-family: 'Courier New', monospace;
    width: 120px;
}

.key-copy-btn {
    background: #28a745;
    color: white;
    border: none;
    padding: 8px 10px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 12px;
}

.key-copy-btn:hover {
    background: #218838;
    transform: translateY(-1px);
}

.key-copy-btn.copied {
    background: #17a2b8;
}

/* MetaTrader Link Styles Enhanced */
.metatrader-link {
    color: #2c5aa0;
    text-decoration: none;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 6px;
    transition: all 0.2s ease;
    background: #e8f3fd;
    border: 1px solid #bee5eb;
}

.metatrader-link:hover {
    background: #2c5aa0;
    color: white;
    text-decoration: none;
    transform: translateY(-1px);
}

/* Mobile Account Cards */
.accounts-mobile {
    display: none;
    flex-direction: column;
    gap: 20px;
}

/* Default: Show table on desktop, hide mobile cards */
.table-wrapper {
    display: block;
}

.accounts-mobile {
    display: none;
}

.account-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    transition: transform 0.2s ease;
    width: 100%;
}

.account-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(0,0,0,0.12);
}

.account-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 2px solid #e9ecef;
}

.account-card-key {
    display: flex;
    align-items: center;
    gap: 8px;
}

.account-card-status {
    font-size: 14px;
    font-weight: 500;
}

.account-card-body {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 12px 20px;
    margin-bottom: 15px;
}

.account-card-item {
    text-align: left;
    padding: 8px 0;
}

.account-card-label {
    font-size: 11px;
    color: #6c757d;
    font-weight: 500;
    margin-bottom: 3px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.account-card-value {
    font-size: 16px;
    font-weight: 600;
    color: #2c3e50;
}

.account-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 15px;
    border-top: 1px solid #e9ecef;
}

.metatrader-link-mobile {
    background: #2c5aa0;
    color: white;
    padding: 8px 12px;
    border-radius: 6px;
    text-decoration: none;
    font-size: 12px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.metatrader-link-mobile:hover {
    background: #1e3f73;
    color: white;
    transform: translateY(-1px);
}

.waiting-connection-mobile {
    font-size: 12px;
    color: #6c757d;
    font-style: italic;
}

/* Modal Styles for Login/Register */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    backdrop-filter: blur(5px);
}

.modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

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

.modal-content {
    background-color: #fff;
    padding: 30px;
    border-radius: 15px;
    width: 90%;
    max-width: 450px;
    position: relative;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from { 
        opacity: 0;
        transform: translateY(-50px) scale(0.9);
    }
    to { 
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.modal-content p {
    margin-bottom: 20px;
    color: #333;
    font-size: 16px;
    text-align: center;
}

.modal-content form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.modal-content input {
    padding: 12px 15px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.2s ease;
}

.modal-content input:focus {
    outline: none;
    border-color: #2c5aa0;
    box-shadow: 0 0 0 3px rgba(44, 90, 160, 0.1);
}

.close {
    position: absolute;
    top: 15px;
    right: 20px;
    color: #aaa;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.2s ease;
}

.close:hover,
.close:focus {
    color: #2c5aa0;
}

/* Profile Section Styles */
.profile-info {
    padding: 25px;
    border-radius: 10px;
    margin-bottom: 25px;
}

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

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

.profile-item label {
    font-weight: 600;
    color: #495057;
    display: flex;
    align-items: center;
    gap: 8px;
}

.profile-item label i {
    color: #2c5aa0;
    width: 16px;
}

.profile-item span {
    color: #6c757d;
    font-weight: 500;
}

.profile-actions {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.profile-actions .btn-outline {
    flex: 1;
    min-width: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

/* Enhanced button styles */
.btn-outline i {
    font-size: 14px;
}

/* Content section general styling */
.content-section {
    background: white;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 2px 15px rgba(0,0,0,0.06);
    margin-bottom: 25px;
}

/* Admin Profile Styles */
#profile-container {
    display: grid;
    gap: 20px;
    max-width: 1200px;
}

.stats-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-top: 15px;
}

.stat-item {
    display: flex;
    flex-direction: column;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #007bff;
}

.stat-label {
    font-size: 12px;
    color: #6c757d;
    margin-bottom: 5px;
    font-weight: 500;
}

.stat-value {
    font-size: 18px;
    font-weight: 600;
    color: #495057;
}

.form-help {
    display: block;
    margin-top: 5px;
    font-size: 12px;
    color: #6c757d;
    line-height: 1.4;
}

.form-help i {
    margin-right: 5px;
    color: #007bff;
}

.btn-danger {
    background: #dc3545;
    border: 1px solid #dc3545;
    color: white;
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-danger:hover {
    background: #c82333;
    border-color: #bd2130;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(220, 53, 69, 0.3);
}

.btn-danger:active {
    transform: translateY(0);
    box-shadow: 0 1px 4px rgba(220, 53, 69, 0.3);
}

.alert {
    padding: 12px 16px;
    border-radius: 6px;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    line-height: 1.4;
}

.alert-success {
    background-color: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
}

.alert-error {
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
}

.alert-info {
    background-color: #d1ecf1;
    border: 1px solid #bee5eb;
    color: #0c5460;
}

/* Profile tab specific adjustments */
#tab-profile h2 {
    color: #495057;
    margin-bottom: 25px;
    font-size: 28px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 12px;
}

#tab-profile .settings-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
    overflow: hidden;
    border: 1px solid #e9ecef;
}

#tab-profile .settings-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px 25px;
}

#tab-profile .settings-header h3 {
    margin: 0 0 8px 0;
    font-size: 18px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}

#tab-profile .settings-header p {
    margin: 0;
    opacity: 0.9;
    font-size: 14px;
    line-height: 1.4;
}

#tab-profile .settings-content {
    padding: 25px;
}

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

#tab-profile .form-group:last-child {
    margin-bottom: 0;
}

#tab-profile label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #495057;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}

#tab-profile .form-select {
    width: 100%;
    padding: 10px 12px;
    border: 2px solid #e9ecef;
    border-radius: 6px;
    font-size: 14px;
    color: #495057;
    background: white;
    transition: all 0.2s ease;
}

#tab-profile .form-select:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

#tab-profile .checkbox-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 12px;
    margin-top: 10px;
}

#tab-profile .checkbox-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

#tab-profile .checkbox-item:hover {
    border-color: #667eea;
    background: #f8f9ff;
}

#tab-profile .checkbox-item input[type="checkbox"] {
    display: none;
}

#tab-profile .checkmark {
    width: 20px;
    height: 20px;
    border: 2px solid #ddd;
    border-radius: 4px;
    position: relative;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

#tab-profile .checkbox-item input[type="checkbox"]:checked + .checkmark {
    background: #667eea;
    border-color: #667eea;
}

#tab-profile .checkbox-item input[type="checkbox"]:checked + .checkmark::after {
    content: '✔';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 12px;
    font-weight: bold;
}

#tab-profile .checkbox-item input[type="checkbox"]:checked ~ .label-text {
    color: #667eea;
    font-weight: 600;
}

.label-text {
    font-size: 14px;
    color: #333;
    transition: all 0.3s ease;
}

#tab-profile .settings-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 25px;
    justify-content: flex-start;
}

/* Dashboard specific - signals grid for My Signal tab */
#tab-profile .signals-grid {
    margin: 0; /* Remove auto margin for Dashboard My Signal tab */
    max-width: none;
    padding: 0;
}

/* Responsive adjustments for profile */
@media (max-width: 768px) {
    .stats-row {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .stat-item {
        padding: 12px;
    }
    
    .stat-value {
        font-size: 16px;
    }
    
    #tab-profile .settings-content {
        padding: 20px;
    }
    
    #tab-profile .settings-header {
        padding: 16px 20px;
    }
    
    #tab-profile .settings-actions {
        flex-direction: column;
    }
    
    #tab-profile .settings-actions button {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    #tab-profile .settings-content {
        padding: 15px;
    }
    
    #tab-profile .settings-header {
        padding: 12px 15px;
    }
}

/* Global responsive fixes to prevent overflow */
html {
    overflow-x: hidden;
    box-sizing: border-box;
}

*, *::before, *::after {
    box-sizing: border-box;
}

/* Ensure all containers respect viewport width */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
    box-sizing: border-box;
}

/* Override any fixed widths that might cause overflow */
img {
    max-width: 100%;
    height: auto;
}

/* Ensure buttons don't overflow */
button, .btn-primary, .btn-outline, .cta-btn {
    max-width: 100%;
    box-sizing: border-box;
}

/* Text overflow protection */
h1, h2, h3, h4, h5, h6, p {
    word-wrap: break-word;
    overflow-wrap: break-word;
}

/* Responsive Design */
@media (max-width: 768px) {
    .dashboard-container,
    main.dashboard-container {
        display: flex !important;
        flex-direction: column;
        grid-template-columns: none;
        overflow: visible;
    }
    
    .dashboard-sidebar {
        width: 100%;
        min-width: 100%;
        padding: 0;
        order: 1;
        height: auto;
        min-height: auto;
        overflow-y: visible;
        background: linear-gradient(135deg, #2c5aa0 0%, #1e3f73 100%);
        display: flex;
        flex-direction: row;
        box-shadow: 0 2px 10px rgba(0,0,0,0.1);
        border-radius: 0;
        grid-row: auto;
    }
    
    .sidebar-tab {
        padding: 15px 20px;
        font-size: 14px;
        border-left: none;
        border-bottom: 3px solid transparent;
        flex: 1;
        text-align: center;
        white-space: nowrap;
        min-width: 0;
        border-radius: 0;
    }
    
    .sidebar-tab:hover {
        background: rgba(255,255,255,0.1);
        border-bottom-color: #6dd5ed;
        border-left-color: transparent;
    }
    
    .sidebar-tab.active {
        background: rgba(255,255,255,0.15);
        border-bottom-color: #ffffff;
        border-left-color: transparent;
        font-weight: 600;
    }
    
    .sidebar-tab.active::before {
        display: none;
    }
    
    .dashboard-main {
        padding: 20px 15px;
        order: 2;
        width: 100%;
        max-width: none;
        overflow-x: auto;
        box-sizing: border-box;
    }
    
    .account-header {
        flex-direction: column;
        gap: 15px;
        align-items: stretch;
        text-align: center;
        padding: 15px 20px;
        margin: 0 -15px 20px -15px;
    }
    
    .account-table {
        display: none;
    }
    
    .accounts-mobile {
        display: block;
    }
    
    .account-card {
        margin-bottom: 15px;
        padding: 15px;
    }
    
    .modal-content {
        padding: 25px 20px;
        margin: 20px;
    }
    
    .container {
        width: 98%;
        padding: 0 10px;
    }
}

@media (max-width: 480px) {
    .dashboard-main {
        padding: 15px 10px;
        width: 100%;
        max-width: none;
        overflow-x: auto;
    }
    
    .account-card-body {
        grid-template-columns: 1fr 1fr !important;
        gap: 8px 15px;
    }
    
    .account-card-footer {
        flex-direction: column;
        gap: 10px;
        align-items: flex-start;
    }
    
    .key-password-field {
        width: 100px;
        font-size: 11px;
    }
    
    .container {
        width: 100%;
        padding: 0 5px;
    }
    
    .dashboard-sidebar {
        padding: 10px 0;
    }
}

/* Trading History Responsive Tables */
.trading-table {
    width: 100%;
    min-width: 900px;
    border-collapse: collapse;
    font-size: 14px;
}

.trading-table th,
.trading-table td {
    padding: 12px 8px;
    border-bottom: 1px solid #dee2e6;
}

.trading-table thead tr {
    background: #f8f9fa;
    border-bottom: 2px solid #dee2e6;
}

.trading-table thead th {
    font-weight: 600;
    color: #495057;
}

/* Table container for horizontal scroll on smaller screens */
.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    width: 100%;
    margin-bottom: 20px;
}

/* Mobile responsive columns - Hidden by default on mobile */
@media (max-width: 768px) {
    /* Open Positions - Hide these columns on mobile by default */
    .col-op-ticket,
    .col-op-current-price,
    .col-op-open-time,
    .col-op-comment {
        display: none;
    }
    
    /* Trade History - Hide these columns on mobile by default */
    .col-th-ticket,
    .col-th-open-time,
    .col-th-close-time,
    .col-th-commission,
    .col-th-swap,
    .col-th-comment {
        display: none;
    }
    
    /* Show columns when enabled */
    .show-op-ticket .col-op-ticket,
    .show-op-current-price .col-op-current-price,
    .show-op-open-time .col-op-open-time,
    .show-op-comment .col-op-comment,
    .show-th-ticket .col-th-ticket,
    .show-th-open-time .col-th-open-time,
    .show-th-close-time .col-th-close-time,
    .show-th-commission .col-th-commission,
    .show-th-swap .col-th-swap,
    .show-th-comment .col-th-comment {
        display: table-cell;
    }
    
    /* Make tables horizontally scrollable */
    .table-responsive {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    /* Reduce font size on very small screens */
    .trading-table {
        font-size: 12px;
    }
    
    .trading-table th,
    .trading-table td {
        padding: 8px 6px;
    }
    
    /* Stats grid responsive */
    .stats-grid {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
        gap: 10px;
    }
    
    .stat-card {
        padding: 15px;
    }
    
    .stat-card div[style*="font-size: 24px"] {
        font-size: 20px !important;
    }
    
    /* Filters responsive */
    .filters-form {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .filters-form .btn-group {
        grid-column: 1;
    }
}

/* Trading History Table Responsive - Card Layout for Mobile */
@media (max-width: 768px) {
    /* Hide table and show cards instead */
    .trading-table-desktop {
        display: none;
    }
    
    .trading-cards-mobile {
        display: block;
    }
    
    /* Card styles for mobile */
    .trade-card {
        background: white;
        border-radius: 8px;
        margin-bottom: 15px;
        padding: 15px;
        box-shadow: 0 2px 8px rgba(0,0,0,0.1);
        border-left: 4px solid #176cae;
    }
    
    .trade-card-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 12px;
        padding-bottom: 8px;
        border-bottom: 1px solid #e9ecef;
    }
    
    .trade-symbol {
        background: #e9ecef;
        padding: 4px 8px;
        border-radius: 4px;
        font-weight: 600;
        color: #495057;
        font-size: 14px;
    }
    
    .trade-type {
        padding: 4px 8px;
        border-radius: 4px;
        color: white;
        font-size: 12px;
        font-weight: 600;
    }
    
    .trade-type.buy {
        background: #007bff;
    }
    
    .trade-type.sell {
        background: #fd7e14;
    }
    .trade-row span {
        display: block !important;
    }
    button.btn-add-note {
        padding: 10px !important;
        margin-top: 5px;
        width: 80%;
    }
    .trade-card-body {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 10px;
        font-size: 14px;
    }
    
    .trade-detail {
        display: flex;
        flex-direction: column;
    }
    
    .trade-detail-label {
        font-size: 11px;
        color: #6c757d;
        text-transform: uppercase;
        font-weight: 600;
        margin-bottom: 2px;
    }
    
    .trade-detail-value {
        font-weight: 600;
        color: #495057;
    }
    
    .trade-detail-value.profit {
        color: #28a745;
    }
    
    .trade-detail-value.loss {
        color: #dc3545;
    }
    
    .trade-card-footer {
        margin-top: 12px;
        padding-top: 8px;
        border-top: 1px solid #e9ecef;
        display: flex;
        justify-content: center;
    }
    
    .notes-btn-mobile {
        background: #007bff;
        color: white;
        border: none;
        padding: 8px 16px;
        border-radius: 6px;
        cursor: pointer;
        font-size: 12px;
        font-weight: 500;
        transition: all 0.2s;
        width: 100%;
    }
    
    .notes-btn-mobile:hover {
        background: #0056b3;
        transform: translateY(-1px);
    }
}

/* Desktop table - show normally */
@media (min-width: 769px) {
    .trading-table-desktop {
        display: block;
    }
    
    .trading-cards-mobile {
        display: none;
    }
}

/* =================================
   OPEN POSITIONS RESPONSIVE LAYOUT
   ================================= */

/* Desktop table - hide mobile cards */
.mobile-cards {
    display: none;
}

.desktop-table {
    display: block;
}

/* Mobile responsive for Open Positions */
@media (max-width: 768px) {
    /* Hide desktop table on mobile */
    .desktop-table {
        display: none !important;
    }
    
    /* Show mobile cards */
    .mobile-cards {
        display: block;
    }
    
    /* Hide specific columns on mobile table view */
    .hide-on-mobile {
        display: none !important;
    }
    
    /* Responsive notes button */
    .notes-btn-responsive .btn-text {
        display: none;
    }
    
    .notes-btn-responsive {
        padding: 8px !important;
        min-width: auto !important;
    }
}

/* Mobile card specific styles for Open Positions */
@media (max-width: 768px) {
    .mobile-cards .trade-card {
        margin-bottom: 15px;
        border-radius: 12px;
        overflow: hidden;
        box-shadow: 0 4px 12px rgba(0,0,0,0.1);
        border: 1px solid #e0e6ed;
        background: white;
    }
    
    .mobile-cards .trade-card-header {
        /* background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); */
        color: white;
        padding: 0 0 10px;
        display: flex;
        justify-content: space-between;
        align-items: center;
    }
    
    .mobile-cards .symbol-badge {
        background: #e9ecef;
        border-radius: 4px;
        font-weight: 600;
        color: #495057;
        font-size: 14px;
        padding: 4px 8px;
    }
    
    .mobile-cards .type-badge {
        padding: 4px 8px;
        border-radius: 4px;
        font-size: 11px;
        font-weight: 600;
        text-transform: uppercase;
    }
    
    .mobile-cards .trade-card-content {
        padding: 0;
        display: grid;
        grid-template-columns: 1fr 1fr;
    }
    span.trade-value {
        font-weight: 600;
    }
    span.trade-label {
        color: #6c757d;
    }
    
    .mobile-cards .trade-row {
        /* display: flex; */
        justify-content: space-between;
        align-items: center;
        margin-bottom: 2px;
        padding: 4px 0;
    }
    
    .mobile-cards .trade-row:last-child {
        margin-bottom: 0;
    }
    
    .mobile-cards .trade-label {
        font-size: 14px;
        color: #6c757d;
        font-weight: 500;
    }

    button.btn-add-note {
        width: 100%;
    }
    
    .mobile-cards .trade-value {
        font-size: 14px;
        font-weight: 600;
        color: #495057;
    }
    
    /* .mobile-cards .trade-card-footer {
        padding: 12px 15px;
        background: #f8f9fa;
        border-top: 1px solid #e9ecef;
    } */
    
    .mobile-cards .notes-btn-mobile {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 6px;
    }
}

/* Ensure Open Positions responsive behavior on larger mobile screens */
@media (max-width: 992px) and (min-width: 769px) {
    .hide-on-mobile {
        display: table-cell !important;
    }
    
    .desktop-table {
        display: block !important;
    }
    
    .mobile-cards {
        display: none !important;
    }
}

/* =================================
   SETTINGS TAB STYLES
   ================================= */

.settings-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    overflow: hidden;
    border: 1px solid #e9ecef;
}

.settings-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px;
}

.settings-header h3 {
    margin: 0 0 8px 0;
    font-size: 1.2rem;
    font-weight: 600;
}

.settings-header p {
    margin: 0;
    opacity: 0.9;
    font-size: 14px;
}

.settings-content {
    padding: 20px;
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
    font-size: 14px;
}

.form-group label i {
    margin-right: 8px;
    color: #667eea;
    width: 16px;
}

.form-select {
    width: 100%;
    max-width: 300px;
    padding: 10px 12px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 14px;
    background: white;
    transition: all 0.3s ease;
}

.form-select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.checkbox-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 12px;
    margin-top: 10px;
}

.checkbox-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.checkbox-item:hover {
    border-color: #667eea;
    background: #f8f9ff;
}

.checkbox-item input[type="checkbox"] {
    display: none;
}

.checkmark {
    width: 20px;
    height: 20px;
    border: 2px solid #ddd;
    border-radius: 4px;
    position: relative;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.checkbox-item input[type="checkbox"]:checked + .checkmark {
    background: #667eea;
    border-color: #667eea;
}

.checkbox-item input[type="checkbox"]:checked + .checkmark::after {
    content: 'âœ“';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 12px;
    font-weight: bold;
}

.checkbox-item input[type="checkbox"]:checked ~ .label-text {
    color: #667eea;
    font-weight: 600;
}

.label-text {
    font-size: 14px;
    color: #333;
    transition: all 0.3s ease;
}

.settings-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 12px;
}

.settings-actions button {
    padding: 12px 24px;
    font-size: 15px;
    font-weight: 600;
    border-radius: 8px;
    border: none;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    min-width: 160px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

.settings-actions .btn-primary {
    background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
    color: white;
}

.settings-actions .btn-primary:hover {
    background: linear-gradient(135deg, #45a049 0%, #3d8b40 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.25);
}

.settings-actions .btn-outline {
    background: white;
    color: #6c757d;
    border: 2px solid #e9ecef;
}

.settings-actions .btn-outline:hover {
    background: #f8f9fa;
    border-color: #6c757d;
    color: #495057;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(108, 117, 125, 0.15);
}

.settings-status {
    padding: 15px;
    border-radius: 8px;
    text-align: center;
    font-weight: 600;
    margin-top: 10px;
}

.settings-status.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.settings-status.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.settings-status.loading {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

/* Mobile responsive for settings */
@media (max-width: 768px) {
    .checkbox-grid {
        grid-template-columns: 1fr;
    }
    
    .settings-actions {
        flex-direction: column;
        gap: 12px;
        padding: 20px 15px;
    }
    
    .settings-actions button {
        width: 100%;
        padding: 14px 20px;
        font-size: 16px;
        font-weight: 600;
        border-radius: 12px;
        border: none;
        transition: all 0.3s ease;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
        box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    }
    
    .settings-actions .btn-primary {
        background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
        color: white;
        position: relative;
        overflow: hidden;
    }
    
    .settings-actions .btn-primary:hover {
        background: linear-gradient(135deg, #45a049 0%, #3d8b40 100%);
        transform: translateY(-2px);
        box-shadow: 0 4px 16px rgba(76, 175, 80, 0.3);
    }
    
    .settings-actions .btn-primary:active {
        transform: translateY(0);
        box-shadow: 0 2px 8px rgba(76, 175, 80, 0.2);
    }
    
    .settings-actions .btn-outline {
        background: white;
        color: #6c757d;
        border: 2px solid #e9ecef;
    }
    
    .settings-actions .btn-outline:hover {
        background: #f8f9fa;
        border-color: #6c757d;
        color: #495057;
        transform: translateY(-2px);
        box-shadow: 0 4px 16px rgba(108, 117, 125, 0.15);
    }
    
    .settings-actions .btn-outline:active {
        transform: translateY(0);
        box-shadow: 0 2px 8px rgba(108, 117, 125, 0.1);
    }
    
    .form-select {
        max-width: 100%;
    }
    
    .settings-content {
        padding: 15px;
    }
    
    .settings-header {
        padding: 15px;
    }
}

/* Dashboard Debug Styles */
.dashboard-main {
    min-height: 400px;
}

.account-table tbody {
    background: white;
}

.account-table tbody td {
    background: white;
    border-bottom: 1px solid #dee2e6;
}

/* ========================================
   NOTIFICATION BELL STYLES
   ======================================== */

/* Notification Container */
.notification-container {
    position: relative;
    display: inline-block;
    margin-left: 15px;
    order: 2; /* Desktop: after nav, before hamburger */
}

/* Notification Bell Button */
.notification-bell {
    position: relative;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    transition: all 0.3s ease;
    color: white;
    font-size: 18px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.notification-bell:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: scale(1.05);
}

.notification-bell:active {
    transform: scale(0.95);
}

/* Notification Badge */
.notification-badge {
    position: absolute;
    top: 2px;
    right: 2px;
    background: #dc3545;
    color: white;
    border-radius: 50%;
    padding: 2px 6px;
    font-size: 11px;
    font-weight: 600;
    min-width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    animation: pulse-badge 2s infinite;
}

.notification-badge:empty {
    display: none;
}

@keyframes pulse-badge {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

/* Notification Dropdown */
.notification-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    width: 380px;
    max-width: 90vw;
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px) scale(0.95);
    transition: all 0.3s ease;
    border: 1px solid #e9ecef;
    max-height: 500px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.notification-dropdown.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

/* Notification Header */
.notification-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid #e9ecef;
    background: #f8f9fa;
    border-radius: 12px 12px 0 0;
    position: sticky;
    top: 0;
    z-index: 5;
}

.notification-header h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: #333;
}

.mark-all-read {
    background: none;
    border: none;
    color: #007bff;
    font-size: 12px;
    cursor: pointer;
    padding: 6px 10px;
    border-radius: 4px;
    transition: all 0.2s ease;
    font-weight: 500;
}

.mark-all-read:hover {
    background: #e3f2fd;
    color: #0056b3;
}

/* Notification List */
.notification-list {
    max-height: 350px;
    overflow-y: auto;
    padding: 0;
    width: 100%;
}

.notification-list::-webkit-scrollbar {
    width: 6px;
}

.notification-list::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.notification-list::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

.notification-list::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* Notification Item */
.notification-item {
    display: flex;
    align-items: flex-start;
    padding: 15px 20px;
    border-bottom: 1px solid #f1f3f4;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    width: 100%;
    box-sizing: border-box;
}

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

.notification-item:hover {
    background: #f8f9fa;
}

.notification-item.unread {
    background: linear-gradient(90deg, rgba(227,242,253,0.7) 0%, rgba(255,255,255,1) 100%);
    border-left: 3px solid #007bff;
}

.notification-item.unread::before {
    content: '';
    position: absolute;
    left: 8px;
    top: 50%;
    transform: translateY(-50%);
    width: 6px;
    height: 6px;
    background: #007bff;
    border-radius: 50%;
}

.notification-item.read {
    opacity: 0.7;
}

/* Notification Icon */
.notification-icon {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8f9fa;
    border-radius: 50%;
    margin-right: 12px;
    font-size: 16px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

/* Notification Content */
.notification-content {
    flex: 1;
    min-width: 0;
    overflow: hidden;
}

.notification-title {
    font-weight: 600;
    font-size: 14px;
    color: #333;
    margin-bottom: 4px;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.notification-message {
    font-size: 13px;
    color: #6c757d;
    margin-bottom: 6px;
    line-height: 1.4;
    word-wrap: break-word;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    max-height: 2.8em;
}

.notification-time {
    font-size: 12px;
    color: #adb5bd;
    font-weight: 500;
}

/* Notification Footer */
.notification-footer {
    padding: 12px 20px;
    text-align: center;
    border-top: 1px solid #e9ecef;
    background: #f8f9fa;
    border-radius: 0 0 12px 12px;
}

.view-all-notifications {
    color: #007bff;
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    padding: 6px 12px;
    border-radius: 6px;
    transition: all 0.2s ease;
    display: inline-block;
}

.view-all-notifications:hover {
    background: #e3f2fd;
    color: #0056b3;
    text-decoration: none;
}

/* Responsive Design */
@media (max-width: 768px) {
    .notification-container {
        order: 1; /* Mobile: before hamburger */
        margin-left: 0;
        margin-right: 15px;
    }
    
    .notification-dropdown {
        width: 350px;
        right: -10px;
    }
    
    .notification-item {
        padding: 12px 15px;
    }
    
    .notification-header {
        padding: 12px 15px;
    }
    
    .notification-footer {
        padding: 10px 15px;
    }
}

@media (max-width: 480px) {
    .notification-dropdown {
        width: calc(100vw - 20px);
        right: -50px;
        left: 50%;
        transform: translateX(-50%) translateY(-10px) scale(0.95);
    }
    
    .notification-dropdown.show {
        transform: translateX(-50%) translateY(0) scale(1);
    }
}

/* Header Layout Adjustments for Notifications */
@media (max-width: 768px) {
    .notification-container {
        display: flex;
        align-items: center;
        order: 1; /* Mobile: before hamburger */
        margin-left: 0;
        margin-right: 15px;
    }
    
    header .hamburger {
        order: 2;
    }
}

/* Pending Orders Styles */
.pending-orders-table-desktop {
    display: block;
}

.pending-orders-cards-mobile {
    display: none;
}

@media (max-width: 768px) {
    .pending-orders-table-desktop {
        display: none;
    }
    
    .pending-orders-cards-mobile {
        display: block;
        padding: 20px;
    }
}

/* Additional responsive styles for pending orders */
@media (max-width: 480px) {
    .pending-orders-cards-mobile {
        padding: 0;
    }
    
    .pending-orders-cards-mobile .trade-card {
        margin-bottom: 12px;
    }
}

/* Social Trading Page Styles */
.social-trading-container {
    background: #f8f9fa;
    min-height: 100vh;
    padding: 80px 20px 40px;
}

.social-trading-header {
    text-align: center;
    color: #2c3e50;
    margin-bottom: 50px;
}

.social-trading-header h1 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 15px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.social-trading-header p {
    font-size: 1.2rem;
    opacity: 0.8;
    max-width: 600px;
    margin: 0 auto;
    color: #495057;
}

/* Filters Section */
.filters-section {
    background: white;
    padding: 25px;
    border-radius: 12px;
    margin-bottom: 40px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    max-width: 1400px;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 40px;
}

.filters-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.filter-label {
    font-weight: 600;
    color: #2c3e50;
    font-size: 0.9rem;
}

.filter-select {
    padding: 10px 15px;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    background: white;
    color: #495057;
    font-size: 0.9rem;
    transition: all 0.2s ease;
}

.filter-select:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

.signals-grid {
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
    padding: 0 20px;
}

.signal-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    padding: 0;
    overflow: hidden;
    transition: all 0.3s ease;
    border: 1px solid #e3e6ea;
}

.signal-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.12);
    border-color: #007bff;
}

.signal-header {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 15px 20px;
    border-bottom: 1px solid #dee2e6;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.signal-pair-container {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
}

.signal-pair {
    font-weight: 700;
    font-size: 1.1rem;
    color: #2c3e50;
}

.signal-time {
    font-size: 0.75rem;
    color: #6c757d;
    font-weight: 500;
}

.signal-type {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    color: white;
    background: #6c757d; /* Default background if no specific class */
}

.signal-type.buy {
    background: #28a745;
}

.signal-type.sell {
    background: #dc3545;
}

.signal-type.buy-limit {
    background: #17a2b8;
}

.signal-type.sell-limit {
    background: #fd7e14;
}

.signal-image {
    height: 120px;
    background: linear-gradient(135deg, #f1f3f4 0%, #e9ecef 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    border-bottom: 1px solid #e9ecef;
}

.chart-placeholder {
    color: #6c757d;
    font-size: 3rem;
}

.signal-details {
    padding: 20px;
}

.signal-prices {
    margin-bottom: 15px;
}

.price-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 0.9rem;
}

.price-label {
    color: #6c757d;
    font-weight: 500;
}

.price-value {
    font-family: 'Courier New', monospace;
    font-weight: 600;
    color: #2c3e50;
}

.copy-button {
    width: 100%;
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 15px;
    font-size: 0.9rem;
}

.copy-button:hover {
    background: linear-gradient(135deg, #0056b3 0%, #004085 100%);
    transform: translateY(-1px);
}

.trader-info {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 15px 0;
    border-top: 1px solid #e9ecef;
    border-bottom: 1px solid #e9ecef;
}

.trader-avatar {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #6c757d 0%, #495057 100%);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
}

.trader-details {
    flex: 1;
}

.trader-name {
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 4px;
    font-size: 0.9rem;
}

.trader-stats {
    font-size: 0.8rem;
    color: #6c757d;
}

.follow-button {
    background: #28a745;
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.follow-button:hover {
    background: #218838;
    transform: translateY(-1px);
}

/* Load More Button Styles */
.load-more-container {
    max-width: 1400px;
    margin: 40px auto 0;
    padding: 0 20px;
    text-align: center;
}

.load-more-button {
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 123, 255, 0.3);
    min-width: 200px;
}

.load-more-button:hover {
    background: linear-gradient(135deg, #0056b3 0%, #004085 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 123, 255, 0.4);
}

.load-more-button:active {
    transform: translateY(0);
    box-shadow: 0 3px 10px rgba(0, 123, 255, 0.3);
}

.load-more-button i {
    margin-right: 8px;
}

/* Load More Button Responsive */
@media (max-width: 768px) {
    .load-more-container {
        margin: 30px auto 0;
        padding: 0 15px;
    }
    
    .load-more-button {
        padding: 12px 20px;
        font-size: 0.9rem;
        min-width: 180px;
        width: 100%;
        max-width: 300px;
    }
}

/* Social Trading Responsive */
@media (max-width: 768px) {
    .social-trading-container {
        padding: 60px 15px 30px;
    }
    
    .social-trading-header h1 {
        font-size: 2.2rem;
    }
    
    .social-trading-header p {
        font-size: 1rem;
        padding: 0 10px;
    }
    
    .filters-section {
        padding: 20px 15px;
        margin: 0 15px 30px;
    }
    
    .filters-container {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .signals-grid {
        grid-template-columns: 1fr;
        gap: 20px;
        padding: 0 15px;
    }
    /* div.profile-tab-content {
        padding: 20px;
    } */
    
    .signal-card {
        margin: 0 auto;
        width: 100%;
    }
    
    .signal-header {
        padding: 12px 15px;
    }
    
    .signal-pair {
        font-size: 1rem;
    }
    
    .signal-time {
        font-size: 0.7rem;
    }
    
    .signal-details {
        padding: 15px;
    }
    
    .trader-info {
        gap: 10px;
        padding: 12px 0;
    }
    
    .trader-avatar {
        width: 35px;
        height: 35px;
        font-size: 1rem;
    }
}

/* Notification responsive & special styles */
@media (max-width: 576px) {
    .notification-dropdown {
        position: fixed;
        top: 60px;
        left: 0;
        right: 0;
        width: 100%;
        max-width: 100%;
        border-radius: 0;
        max-height: calc(100vh - 60px);
    }
    
    .notification-header {
        border-radius: 0;
    }
    
    .notification-list {
        max-height: calc(100vh - 120px);
    }
    
    .notification-icon {
        width: 36px;
        height: 36px;
        font-size: 14px;
    }
}

/* Special styling for drawdown notifications */
.notification-item .notification-icon i.fa-exclamation-triangle {
    animation: pulse-warning 2s infinite;
}

@keyframes pulse-warning {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.15); color: #ff4136; }
}

/* Empty notification state */
.notification-list:empty::after {
    content: "No notifications yet";
    display: block;
    text-align: center;
    padding: 40px 20px;
    color: #adb5bd;
    font-style: italic;
}