/* ===================== */
/* MOBILE STYLES (<= 768px) */
/* ===================== */
/* =============== */
/* MOBILE KYC BUTTON */
/* =============== */
@media (max-width: 768px) {
  .mobile-kyc-btn {
    display: block;
    width: 100%;
    margin-top: 10px;
    padding: 12px;
    background-color: var(--primary);
    color: white;
    border: none;
    border-radius: 8px;
    text-align: center;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
  }
  
  .mobile-kyc-btn:hover {
    background-color: var(--primary-dark);
  }
  
  .mobile-kyc-btn i {
    margin-right: 8px;
  }
}

@media (min-width: 769px) {
  .mobile-kyc-btn {
    display: none;
  }
}

/* ===================== */
/* MOBILE KYC SECTION */
/* ===================== */
.kyc-mobile-btn {
    text-decoration: none !important;
}
@media (max-width: 768px) {
  .kyc-mobile-section {
    background-color: var(--card-bg);
    border-radius: var(--card-radius);
    border: 1px solid var(--border);
    padding: 16px;
    margin: 16px 0;
  }

  .kyc-mobile-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
  }

  .kyc-mobile-header h3 {
    font-size: 1.1rem;
    margin: 0;
    color: var(--dark);
  }

  .kyc-mobile-status {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
  }

  .kyc-mobile-status i {
    font-size: 1rem;
  }

  .kyc-mobile-status.verified i {
    color: var(--success);
  }

  .kyc-mobile-status.pending i {
    color: var(--warning);
  }

  .kyc-mobile-status.unverified i {
    color: var(--danger);
  }

  .kyc-mobile-prompt {
    margin-top: 12px;
    padding: 12px;
    border-radius: 8px;
    font-size: 0.9rem;
    line-height: 1.4;
  }

  .kyc-mobile-prompt.verified {
    background-color: rgba(16, 185, 129, 0.1);
    border-left: 3px solid var(--success);
    color: var(--success);
  }

  .kyc-mobile-prompt.pending {
    background-color: rgba(245, 158, 11, 0.1);
    border-left: 3px solid var(--warning);
    color: var(--warning);
  }

  .kyc-mobile-prompt.unverified {
    background-color: rgba(239, 68, 68, 0.1);
    border-left: 3px solid var(--danger);
    color: var(--danger);
  }

  .kyc-mobile-actions {
    margin-top: 16px;
  }

  .kyc-mobile-btn {
    width: 100%;
    padding: 12px;
    border-radius: 8px;
    font-weight: 500;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.2s ease;
  }

  .kyc-mobile-btn i {
    font-size: 1rem;
  }

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

  .kyc-mobile-btn.primary:hover {
    background-color: var(--primary-dark);
    transform: translateY(-1px);
  }

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

  .kyc-mobile-btn.secondary:hover {
    background-color: var(--border);
    transform: translateY(-1px);
  }
}

@media (min-width: 769px) {
  .kyc-mobile-section {
    display: none;
  }
}

@media (max-width: 768px) {
  /* =============== */
  /* SIDEBAR REMOVAL */
  /* =============== */
  .sidebar {
    display: none !important;
    width: 0 !important;
  }

  /* =============== */
  /* LAYOUT ADJUSTMENTS */
  /* =============== */
  .dashboard-container {
    display: flex;
    flex-direction: column;
    width: 100%;
    margin: 0;
    padding: 0;
    min-height: 100vh;
  }

  .main-content {
    margin-left: 0 !important;
    width: 100% !important;
    margin-top: 60px;
  }

  /* =============== */
  /* FIXED HEADER */
  /* =============== */
  .dashboard-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 16px;
    height: 60px;
    z-index: 1000;
    background: var(--card-bg);
    border-bottom: 1px solid var(--border);
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
  }

  .header-left {
    flex: 1;
    min-width: 0;
    overflow: hidden;
  }

  .header-left h1 {
    font-size: 1.2rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin: 0;
    line-height: 1.2;
  }

  .header-right {
    display: flex;
    gap: 12px;
    margin-left: auto;
  }

  /* =============== */
  /* CONTENT AREA */
  /* =============== */
  .dashboard-content {
    width: 100%;
    max-width: 95%;
    padding: 16px;
    box-sizing: border-box;
  }

  /* =============== */
  /* KYC STATUS CARD */
  /* =============== */
  .kyc-mobile-card {
    width: 100%;
    margin: 16px 0;
    padding: 20px;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
  }

  /* =============== */
  /* PORTFOLIO CARDS */
  /* =============== */
  .portfolio-summary {
    grid-template-columns: 1fr;
    gap: 16px;
    margin-bottom: 16px;
    width: 100%;
  }

  .summary-card {
    width: 100%;
  }

  /* =============== */
  /* QUICK ACTIONS */
  /* =============== */
  .quick-actions .card-body {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    padding: 16px;
  }

  /* =============== */
  /* RECENT TRANSACTIONS - MOBILE STYLES */
  /* =============== */
  .transactions-section {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  .transactions-table {
    min-width: 400px;
    overflow-x: auto;
    background-color: var(--card-bg);
    border-radius: var(--card-radius);
    border: 1px solid var(--border);
  }
  
  .transactions-table table {
    width: 100%;
    display: table;
  }
  
  .transactions-table th,
  .transactions-table td {
    padding: 10px 8px;
    font-size: 0.75rem;
  }
  
  .transactions-table th {
    white-space: nowrap;
    background-color: var(--bg);
  }
  
  /* Hide Asset column */
  .transactions-table th:nth-child(3),
  .transactions-table td:nth-child(3) {
    display: none;
  }
  
  /* Show full type name instead of initial */
  .transactions-table .type-badge {
    display: none !important;
  }
  
  .transactions-table .type-text {
    display: inline !important;
  }
  
  /* Adjust column widths */
  .transactions-table th:nth-child(1),
  .transactions-table td:nth-child(1) {
    width: 25%;
  }
  
  .transactions-table th:nth-child(2),
  .transactions-table td:nth-child(2) {
    width: 25%;
  }
  
  .transactions-table th:nth-child(4),
  .transactions-table td:nth-child(4) {
    width: 20%;
  }
  
  .transactions-table th:nth-child(5),
  .transactions-table td:nth-child(5) {
    width: 15%;
  }
  
  .transactions-table th:nth-child(6),
  .transactions-table td:nth-child(6) {
    width: 15%;
  }
  
  /* Hide time portion of date in mobile view */
  .transactions-table td:first-child::after {
    content: attr(data-date);
  }
  
  .transactions-table td:first-child span {
    display: none;
  }
  
  .transactions-table .view-transaction {
    padding: 4px 8px;
    font-size: 0.7rem;
  }
  
  .section-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    margin-bottom: 12px;
  }
  
  .section-header h2 {
    font-size: 1.1rem;
    margin: 0;
  }
  
  .section-header .view-all {
    font-size: 0.8rem;
    align-self: flex-end;
  }

  /* =============== */
  /* NOTIFICATIONS */
  /* =============== */
  .notification-dropdown {
    width: 300px;
    right: -100px;
  }

  /* =============== */
  /* MODALS */
  /* =============== */
  .modal-content {
    width: 95%;
    max-width: 95%;
  }

  /* =============== */
  /* MOBILE MENU TOGGLE REMOVAL */
  /* =============== */
  .mobile-menu-toggle {
    display: none !important;
  }

  /* =============== */
  /* UTILITY CLASSES */
  /* =============== */
  .mobile-only {
    display: block;
  }
  .desktop-only {
    display: none;
  }
}

/* ===================== */
/* SMALLER MOBILE DEVICES (<= 480px) */
/* ===================== */
@media (max-width: 480px) {
  .dashboard-header {
    padding: 0 12px;
  }

  .dashboard-content {
    padding: 12px;
    max-width: 100%;
  }

  .quick-actions .card-body {
    grid-template-columns: 1fr;
  }

  .notification-dropdown {
    width: 280px;
    right: -50px;
  }

  /* Further adjustments for very small screens */
  .transactions-table {
    min-width: 350px;
  }
  
  .transactions-table th,
  .transactions-table td {
    padding: 8px 6px;
  }
  
  /* Make type names shorter if needed */
  .transactions-table .type-text {
    font-size: 0.7rem;
  }
  
  /* Further adjust column widths */
  .transactions-table th:nth-child(1),
  .transactions-table td:nth-child(1) {
    width: 30%;
  }
  
  .transactions-table th:nth-child(2),
  .transactions-table td:nth-child(2) {
    width: 20%;
  }
  
  .transactions-table th:nth-child(4),
  .transactions-table td:nth-child(4) {
    width: 15%;
  }
  
  .transactions-table .badge {
    padding: 2px 4px;
    font-size: 0.65rem;
  }
  
  .transactions-table .view-transaction i {
    display: none;
  }

  /* KYC Section adjustments for small screens */
  .kyc-mobile-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .kyc-mobile-status {
    align-self: flex-start;
  }

  .kyc-mobile-prompt {
    font-size: 0.85rem;
    padding: 10px;
  }
}

/* =============== */
/* MOBILE LOGOUT BUTTON */
/* =============== */
@media (max-width: 768px) {
  .mobile-logout-btn {
    display: block;
    width: 100%;
    margin-top: 20px;
    padding: 12px;
    background-color: var(--danger);
    color: white;
    border: none;
    border-radius: 8px;
    text-align: center;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
  }
  
  .mobile-logout-btn:hover {
    background-color: var(--danger-dark);
  }
  
  .mobile-logout-btn i {
    margin-right: 8px;
  }
}

@media (min-width: 769px) {
  .mobile-logout-btn {
    display: none;
  }
}

/* ===================== */
/* DESKTOP-ONLY ELEMENTS */
/* ===================== */
@media (min-width: 769px) {
  .mobile-only {
    display: none;
  }
  .desktop-only {
    display: block;
  }
}